PandaRoot
PndTrackingQualityMCInfo.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
20 #ifndef PNDTRACKINGQUALITYMCINFO_H
21 #define PNDTRACKINGQUALITYMCINFO_H
22 
23 // #include "PndTrack.h"
24 #include "TVector3.h"
25 #include "TArrayI.h"
26 
27 class PndTrackingQualityMCInfo : public TObject {
28 
29  public:
31  PndTrackingQualityMCInfo(int nofmvdpix, int nofmvdstr, int nofsttparal, int nofsttskew, int nofgem, int noffts);
34 
36 
37  void SetPositionFirst(TVector3 pos) { fPosFirst = pos; }
38  void SetMomentumFirst(TVector3 mom) { fMomFirst = mom; }
39  void SetPositionLast(TVector3 pos) { fPosLast = pos; }
40  void SetMomentumLast(TVector3 mom) { fMomLast = mom; }
41 
42  void SetCharge(int ch) { fCharge = ch; }
43  void SetIsPrimary(Bool_t val) { fIsPrimary = val; }
44  void SetVertex(TVector3 val) { fVertex = val; }
45  void SetMomentum(TVector3 val) { fMomentum = val; }
46 
53  Int_t GetNofGemPoints() { return fNofGemPoints; }
54  Int_t GetNofFtsPoints() { return fNofFtsPoints; }
56 
57  Int_t GetMCTrackID() { return fMCTrackID; } //< Returns the corresponding MCTrack to an ideal track
58  Short_t GetNofRecoTracks(void) const { return fRecoTrackIDs.size(); } //< Returns the number of reco tracks associated to the ideal track
59  Int_t GetRecoTrackID(Int_t i = 0) const
60  { //< Returns the id of the ith reco track associated to the ideal track
61  if (i < GetNofRecoTracks())
62  return fRecoTrackIDs[i];
63  return -1;
64  }
65  Int_t GetAssoRecoTrackID() const { return fAssoRecoTrackID; }
66 
67  TVector3 GetPositionFirst() { return fPosFirst; }
68  TVector3 GetMomentumFirst() { return fMomFirst; }
69  TVector3 GetPositionLast() { return fPosLast; }
70  TVector3 GetMomentumLast() { return fMomLast; }
71 
72  Int_t GetCharge() { return fCharge; }
73  Bool_t GetIsPrimary() { return fIsPrimary; }
74  TVector3 GetVertex() { return fVertex; }
75  TVector3 GetStartMomentum() { return fMomentum; }
76 
77  void SetPDGCode(int pdg) { fPDGCode = pdg; }
78  Int_t GetPDGCode() { return fPDGCode; }
79 
82 
83  void SetMCTrackID(Int_t mctrackid) { fMCTrackID = mctrackid; }
84  void SetRecoTrackIDs(const std::vector<int> recotrkids) { fRecoTrackIDs = recotrkids; }
85  void SetRecoTrackID(int recotrkid) { fRecoTrackIDs.push_back(recotrkid); }
86  void SetAssoRecoTrackID(int asso) { fAssoRecoTrackID = asso; }
87  Bool_t IsReconstructed() { return GetNofRecoTracks() > 0; }
88 
89  void SetQuality(int quality) { fQuality = quality; }
90  Int_t GetQuality() { return fQuality; }
91 
92  void SetMCQuality(int mcquality) { fMCQuality = mcquality; }
93  Int_t GetMCQuality() { return fMCQuality; }
94 
95  protected:
96  // PndTrack* fAssociatedIdealTrack; // This pointer is used in the time based simulation in order to connect the MC trackInfo to the ideal track
97 
99 
101  Int_t fMCTrackID;
102  std::vector<int> fRecoTrackIDs;
103  TVector3 fPosFirst, fMomFirst;
104  TVector3 fPosLast, fMomLast;
105 
106  Int_t fCharge; //< Charge from MCTrack
107  Bool_t fIsPrimary;
108  TVector3 fVertex; //< Vertex position from MCTrack
109  TVector3 fMomentum; //< Momentum at vertex position from MCTrack
110  Int_t fPDGCode; //< PDG code from MCTrack
111 
112  Int_t fQuality;
113  Int_t fMCQuality;
114  Int_t fAssoRecoTrackID; //< Id of the reco track with the highest efficiency (or highest purity if two tracks with identical eff. exist)
115 
117 };
118 
119 #endif
ClassDef(PndTrackingQualityMCInfo, 3)
void SetMCTrackID(Int_t mctrackid)
void SetRecoTrackID(int recotrkid)
unsigned int i
Definition: P4_F32vec4.h:33
Int_t GetRecoTrackID(Int_t i=0) const
PndTrackingQualityMCInfo & operator=(const PndTrackingQualityMCInfo &info)
void SetRecoTrackIDs(const std::vector< int > recotrkids)
void SetReconstructabilityStatus(Int_t reco)
Short_t GetNofRecoTracks(void) const