Belle II Software development
TrackCluster_t Struct Reference

Struct to hold variables for track clusters. More...

#include <PXDPerformanceStructs.h>

Public Member Functions

 TrackCluster_t ()
 Default constructor.
 
RecoTracksetValues (const PXDIntercept &pxdIntercept, const std::string &recoTracksName="", const std::string &pxdTrackClustersName="PXDClustersFromTracks", const double &mass=Const::electronMass)
 Update values from a PXDIntercept.
 

Public Attributes

bool usedInTrack
 True if the cluster is used in tracking.
 
float dU
 Residual (meas - prediction) in U.
 
float dV
 Residual (meas - prediciton) in V.
 
Cluster_t cluster
 Cluster associated to the track.
 
TrackPoint_t intersection
 The track-module intersection.
 

Detailed Description

Struct to hold variables for track clusters.

Definition at line 85 of file PXDPerformanceStructs.h.

Constructor & Destructor Documentation

◆ TrackCluster_t()

TrackCluster_t ( )
inline

Default constructor.

Definition at line 87 of file PXDPerformanceStructs.h.

87: usedInTrack(false), dU(INFINITY), dV(INFINITY) {}
float dU
Residual (meas - prediction) in U.
bool usedInTrack
True if the cluster is used in tracking.
float dV
Residual (meas - prediciton) in V.

Member Function Documentation

◆ setValues()

RecoTrack * setValues ( const PXDIntercept pxdIntercept,
const std::string &  recoTracksName = "",
const std::string &  pxdTrackClustersName = "PXDClustersFromTracks",
const double &  mass = Const::electronMass 
)

Update values from a PXDIntercept.

Parameters
pxdIntercepta PXDIntercept object.
recoTracksNameName of RecoTrack collection
pxdTrackClustersNameName of track matched PXDClusters
massMass of the impinging particle
Returns
the pointer of the related RecoTrack object.

Definition at line 74 of file PXDPerformanceStructs.cc.

78 {
79 auto recoTrackPtr = intersection.setValues(pxdIntercept, recoTracksName, mass);
80 // sensor ID from intersectioon
81 //VxdID sensorID(pxdIntercept.getSensorID());
82 if (!recoTrackPtr) return nullptr; // return nullptr
83 // Always set cluster pxdID for saving module id of the intersection.
84 cluster.pxdID = getPXDModuleID(VxdID(pxdIntercept.getSensorID()));
85 RelationVector<PXDCluster> pxdClusters = DataStore::getRelationsWithObj<PXDCluster>(recoTrackPtr, pxdTrackClustersName);
86 // Avoid returning nullptr (false) when no clusters associated,
87 // otherwise efficiency is overestimated!
88 // if (!pxdClusters.size()) return nullptr;
89 usedInTrack = false;
90 for (auto& aCluster : pxdClusters) {
91 if (aCluster.getSensorID().getID() == pxdIntercept.getSensorID()) {
92 cluster.setValues(aCluster);
93 dU = aCluster.getU() - pxdIntercept.getCoorU();
94 dV = aCluster.getV() - pxdIntercept.getCoorV();
95 usedInTrack = true;
96 break;
97 }
98 }
99 // If usedInTrack is still false, we can loop PXDClusters datastore to find one closest to the track point. (To be implemented)
100 return recoTrackPtr;
101 }
unsigned short getPXDModuleID(const VxdID &sensorID)
Helper function to get DHE id like module id from VxdID.
Definition: PXDUtilities.h:78
unsigned short pxdID
Human readable id: layer * 1000 + ladder * 10 + sensor.
void setValues(const PXDCluster &pxdCluster)
Update values from a PXDCluster.
Cluster_t cluster
Cluster associated to the track.
TrackPoint_t intersection
The track-module intersection.
RecoTrack * setValues(const PXDIntercept &pxdIntercept, const std::string &recoTracksName="", const double &mass=Const::electronMass)
Update values from a PXDCluster.

Member Data Documentation

◆ cluster

Cluster_t cluster

Cluster associated to the track.

Definition at line 104 of file PXDPerformanceStructs.h.

◆ dU

float dU

Residual (meas - prediction) in U.

Definition at line 102 of file PXDPerformanceStructs.h.

◆ dV

float dV

Residual (meas - prediciton) in V.

Definition at line 103 of file PXDPerformanceStructs.h.

◆ intersection

TrackPoint_t intersection

The track-module intersection.

Definition at line 105 of file PXDPerformanceStructs.h.

◆ usedInTrack

bool usedInTrack

True if the cluster is used in tracking.

Definition at line 101 of file PXDPerformanceStructs.h.


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