HerdSoftware
0.3.2
|
Class describing a track. More...
#include <dataobjects/Track.h>
Public Member Functions | |
Track () | |
Default constructor. More... | |
Track (Line line) | |
Constructor. More... | |
Track (const Track2D &proj1, RefFrame::View view1, const Track2D &proj2, RefFrame::View view2) | |
Constructor. More... | |
virtual | ~Track ()=default |
Virtual destructor. More... | |
const Herd::Line & | GetLine () const |
Returns the line associated to the track. More... | |
void | SetLine (Herd::Line line) |
Returns the line associated to the track. More... | |
void | SetCaloHits (CaloHits hits, std::string objName="", size_t index=Herd::defaultValue< size_t >) |
Set CALO hits. More... | |
void | AddClusters (const StkClustersColl &clusterColl) |
Add STK clusters to the current collection. More... | |
void | AddClusters (const ScdClustersColl &clusterColl) |
Add SCD clusters to the current collection. More... | |
void | AddClusters (const FitClustersColl &clusterColl) |
Add FIT clusters to the current collection. More... | |
void | SetCaloClusterIndex (size_t index) |
Sets the index of the CALO hits cluster used to build the track. More... | |
void | SetCaloDataObjName (std::string name) |
Sets the name of the CALO data object from which the cluster used to build the track was taken. More... | |
const StkClustersColl & | GetStkClusters () const |
Returns the STK clusters associated to the track. More... | |
const ScdClustersColl & | GetScdClusters () const |
Returns the SCD clusters associated to the track. More... | |
const FitClustersColl & | GetFitClusters () const |
Returns the FIT clusters associated to the track. More... | |
const Herd::CaloHits & | CaloHits () const |
Returns the calorimeter hits associated to the track. More... | |
size_t | CaloClusterIndex () const |
Returns the index of the hits cluster used to build the axis. More... | |
const std::string & | CaloDataObjName () const |
Returns the name of the CALO data object used to build the track was taken. More... | |
Private Attributes | |
Herd::CaloHits | m_caloHits |
StkClustersColl | m_stkClusterColl |
ScdClustersColl | m_scdClusterColl |
FitClustersColl | m_fitClusterColl |
Herd::Line | m_line |
size_t | m_caloClustersIndex |
std::string | m_caloDataObjName |
Class describing a track.
Track describes a reconstructed particle track. It is constituted by a Line describing the particle trajectory and by the detector data used for reconstruction. Depending on the reconstruction method the detector data can be:
|
inline |
Default constructor.
|
inline |
Constructor.
Constructs a track starting from a already pre-computed line.
line | Already computed Line object. |
Herd::Track::Track | ( | const Track2D & | proj1, |
RefFrame::View | view1, | ||
const Track2D & | proj2, | ||
RefFrame::View | view2 | ||
) |
Constructor.
Constructs a 3D track starting from two 2D projections. The clusters of tracking detectors used to reconstruct the 2D tracks are added to the Track clusters.
proj1 | The first projection. |
view1 | The view of the first projection. |
proj2 | The second projection. |
view1 | The view of the second projection. |
Exception | if the 2D lines in the given projections are not valid. |
|
virtualdefault |
Virtual destructor.
void Herd::Track::AddClusters | ( | const StkClustersColl & | clusterColl | ) |
Add STK clusters to the current collection.
Append new clusters to the current STK clusters collection.
clusterColl | Collection of measured clusters. |
void Herd::Track::AddClusters | ( | const ScdClustersColl & | clusterColl | ) |
Add SCD clusters to the current collection.
Append new clusters to the current SCD clusters collection.
clusterColl | Collection of measured clusters. |
void Herd::Track::AddClusters | ( | const FitClustersColl & | clusterColl | ) |
Add FIT clusters to the current collection.
Append new clusters to the current FIT clusters collection.
clusterColl | Collection of measured clusters. |
|
inline |
Returns the index of the hits cluster used to build the axis.
This method returns the index of the cluster in the cluster collection as set by SetCaloHits. If this value was not set then defaltValue<size_t> will be returned, so before using it the check:
size_t clusterID = axis->ClusterIndex(); if (clusterID != defaltValue<size_t>) { . . .
must be performed. Usually clusterID == defaltValue<size_t> means that the track was not reconstructed using the calorimeter or that the full CALO has been used.
|
inline |
Returns the name of the CALO data object used to build the track was taken.
This method returns the name of the CALO data object as set by SetCaloHits; this can be the name of the CALO hits object if the full CALO has been used or the name of the CALO clusters collection. If this value was not set then an empty string will be returned, so before using it the check:
std::string clustersName = axis->CaloClustersName(); if (clustersName != "") { . . .
must be performed. Usually clustersName == "" means that the track was not reconstructed using the calorimeter.
|
inline |
Returns the calorimeter hits associated to the track.
|
inline |
Returns the FIT clusters associated to the track.
|
inline |
Returns the line associated to the track.
|
inline |
Returns the SCD clusters associated to the track.
|
inline |
Returns the STK clusters associated to the track.
|
inline |
Sets the index of the CALO hits cluster used to build the track.
index | The index of the cluster in the CALO clusters collection. |
|
inline |
Sets the name of the CALO data object from which the cluster used to build the track was taken.
The name can be either that of the CALO hits object (if the full CALO has been used) or of the CALO clusters object; in the latter case it is appropriate to call also #SetClusterIndex.
name | The name of the clusters collection. |
void Herd::Track::SetCaloHits | ( | CaloHits | hits, |
std::string | objName = "" , |
||
size_t | index = Herd::defaultValue<size_t> |
||
) |
Set CALO hits.
Sets the CALO hits used to reconstruct the track. To keep track of the origin of the hits, the name of the hits data object can be specified as well. This can either be the name of the complete full CALO hits object or the name of a CALO clusters object; in the latter case the index of the hits in the clusters vector can be specified as well.
clusterColl | Collection of CALO hits. |
objName | The name of the hits object (either the full CALO hits or a CALO clusters vector). |
index | The index of the hits in the CALO clusters vector. |
|
inline |
Returns the line associated to the track.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |