ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
ActsPlugins::RootMeasurementIo Class Reference

Helper class to manage the I/O of measurements and associated clusters to and from ROOT files. More...

#include <ActsPlugins/Root/RootMeasurementIo.hpp>

Classes

struct  Config

Public Member Functions

 RootMeasurementIo (const Config &config)
 Constructor from configuration struct.
void clear ()
 Clear the payload.
void connectForWrite (TTree &measurementTree)
 sets the branch connection for writing to a file
void fillBoundMeasurement (const std::vector< double > &measurement, const std::vector< double > &variances, const std::vector< unsigned int > &subspaceIndex)
 Convenience function to fill bound parameters.
void fillCluster (const std::vector< std::tuple< int, int, float > > &channels)
 Convenience function to fill the cluster information.
void fillGlobalPosition (const Acts::Vector3 &pos)
 Fill global information of the cluster/measurement.
void fillIdentification (int evnt, const Acts::GeometryIdentifier &geoId)
 Convenience function to register identification.
void fillTruthParameters (const Acts::Vector2 &lp, const Acts::Vector4 &xt, const Acts::Vector3 &dir, const std::pair< double, double > angles)
 Convenience function to register the truth parameters.

Detailed Description

Helper class to manage the I/O of measurements and associated clusters to and from ROOT files.

Constructor & Destructor Documentation

◆ RootMeasurementIo()

ActsPlugins::RootMeasurementIo::RootMeasurementIo ( const Config & config)
explicit

Constructor from configuration struct.

Parameters
configthe configuration for the accessor

Member Function Documentation

◆ clear()

void ActsPlugins::RootMeasurementIo::clear ( )

Clear the payload.

◆ connectForWrite()

void ActsPlugins::RootMeasurementIo::connectForWrite ( TTree & measurementTree)

sets the branch connection for writing to a file

Parameters
measurementTreethe TTree to write the measurement track to

◆ fillBoundMeasurement()

void ActsPlugins::RootMeasurementIo::fillBoundMeasurement ( const std::vector< double > & measurement,
const std::vector< double > & variances,
const std::vector< unsigned int > & subspaceIndex )

Convenience function to fill bound parameters.

  • abstracted to be used in different contexts
Parameters
measurementThe measurement parameters
variancesThe measurement variances (assumed diagonally)
subspaceIndexThe subspace indices of the measurement

◆ fillCluster()

void ActsPlugins::RootMeasurementIo::fillCluster ( const std::vector< std::tuple< int, int, float > > & channels)

Convenience function to fill the cluster information.

  • abstracted to be used in different contexts
Parameters
channelsThe channel information

◆ fillGlobalPosition()

void ActsPlugins::RootMeasurementIo::fillGlobalPosition ( const Acts::Vector3 & pos)

Fill global information of the cluster/measurement.

Parameters
posThe global position of the cluster

◆ fillIdentification()

void ActsPlugins::RootMeasurementIo::fillIdentification ( int evnt,
const Acts::GeometryIdentifier & geoId )

Convenience function to register identification.

Parameters
evntThe event number
geoIdThe geometry identifier of the measurement

◆ fillTruthParameters()

void ActsPlugins::RootMeasurementIo::fillTruthParameters ( const Acts::Vector2 & lp,
const Acts::Vector4 & xt,
const Acts::Vector3 & dir,
const std::pair< double, double > angles )

Convenience function to register the truth parameters.

Parameters
lpThe true local position
xtThe true 4D global position
dirThe true particle direction
anglesThe incident angles