HerdSoftware  0.3.2
Public Member Functions | Private Attributes | List of all members
Herd::Track Class Reference

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::LineGetLine () 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 StkClustersCollGetStkClusters () const
 Returns the STK clusters associated to the track. More...
 
const ScdClustersCollGetScdClusters () const
 Returns the SCD clusters associated to the track. More...
 
const FitClustersCollGetFitClusters () const
 Returns the FIT clusters associated to the track. More...
 
const Herd::CaloHitsCaloHits () 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
 

Detailed Description

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:

Constructor & Destructor Documentation

◆ Track() [1/3]

Herd::Track::Track ( )
inline

Default constructor.

◆ Track() [2/3]

Herd::Track::Track ( Line  line)
inline

Constructor.

Constructs a track starting from a already pre-computed line.

Parameters
lineAlready computed Line object.

◆ Track() [3/3]

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.

Parameters
proj1The first projection.
view1The view of the first projection.
proj2The second projection.
view1The view of the second projection.
Exceptions
Exceptionif the 2D lines in the given projections are not valid.
See also
Line::Line(const Line2D &, RefFrame::View, const Line2D &, RefFrame::View).

◆ ~Track()

virtual Herd::Track::~Track ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ AddClusters() [1/3]

void Herd::Track::AddClusters ( const StkClustersColl clusterColl)

Add STK clusters to the current collection.

Append new clusters to the current STK clusters collection.

Parameters
clusterCollCollection of measured clusters.

◆ AddClusters() [2/3]

void Herd::Track::AddClusters ( const ScdClustersColl clusterColl)

Add SCD clusters to the current collection.

Append new clusters to the current SCD clusters collection.

Parameters
clusterCollCollection of measured clusters.

◆ AddClusters() [3/3]

void Herd::Track::AddClusters ( const FitClustersColl clusterColl)

Add FIT clusters to the current collection.

Append new clusters to the current FIT clusters collection.

Parameters
clusterCollCollection of measured clusters.

◆ CaloClusterIndex()

size_t Herd::Track::CaloClusterIndex ( ) const
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.

Returns
The index of the cluster in the clusters collection.

◆ CaloDataObjName()

const std::string& Herd::Track::CaloDataObjName ( ) const
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.

Returns
The name of the clusters collection.

◆ CaloHits()

const Herd::CaloHits& Herd::Track::CaloHits ( ) const
inline

Returns the calorimeter hits associated to the track.

Returns
the calorimeter cluster.

◆ GetFitClusters()

const FitClustersColl& Herd::Track::GetFitClusters ( ) const
inline

Returns the FIT clusters associated to the track.

Returns
the vector of clusters.

◆ GetLine()

const Herd::Line& Herd::Track::GetLine ( ) const
inline

Returns the line associated to the track.

Returns
The line associated to the track

◆ GetScdClusters()

const ScdClustersColl& Herd::Track::GetScdClusters ( ) const
inline

Returns the SCD clusters associated to the track.

Returns
the vector of clusters.

◆ GetStkClusters()

const StkClustersColl& Herd::Track::GetStkClusters ( ) const
inline

Returns the STK clusters associated to the track.

Returns
the vector of clusters.

◆ SetCaloClusterIndex()

void Herd::Track::SetCaloClusterIndex ( size_t  index)
inline

Sets the index of the CALO hits cluster used to build the track.

Parameters
indexThe index of the cluster in the CALO clusters collection.

◆ SetCaloDataObjName()

void Herd::Track::SetCaloDataObjName ( std::string  name)
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.

Parameters
nameThe name of the clusters collection.

◆ SetCaloHits()

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.

Parameters
clusterCollCollection of CALO hits.
objNameThe name of the hits object (either the full CALO hits or a CALO clusters vector).
indexThe index of the hits in the CALO clusters vector.

◆ SetLine()

void Herd::Track::SetLine ( Herd::Line  line)
inline

Returns the line associated to the track.

Returns
The line associated to the track

Member Data Documentation

◆ m_caloClustersIndex

size_t Herd::Track::m_caloClustersIndex
private

◆ m_caloDataObjName

std::string Herd::Track::m_caloDataObjName
private

◆ m_caloHits

Herd::CaloHits Herd::Track::m_caloHits
private

◆ m_fitClusterColl

FitClustersColl Herd::Track::m_fitClusterColl
private

◆ m_line

Herd::Line Herd::Track::m_line
private

◆ m_scdClusterColl

ScdClustersColl Herd::Track::m_scdClusterColl
private

◆ m_stkClusterColl

StkClustersColl Herd::Track::m_stkClusterColl
private

The documentation for this class was generated from the following files: