CbmRoot
CbmGlobalTrackingQA.h
Go to the documentation of this file.
1 /*
2  * To change this license header, choose License Headers in Project Properties.
3  * To change this template file, choose Tools | Templates
4  * and open the template in the editor.
5  */
6 
7 /*
8  * File: CbmGlobalTrackingQA.h
9  * Author: tablyaz
10  *
11  * Created on April 5, 2017, 5:07 PM
12  */
13 
14 #ifndef CBMGLOBALTRACKINGQA_H
15 #define CBMGLOBALTRACKINGQA_H
16 
17 #include "CbmGlobalTrackingDefs.h"
18 #include "CbmMCDataArray.h"
19 #include "CbmMatch.h"
20 #include "CbmTofDigi.h"
21 #include "CbmTofHit.h"
22 #include "FairTask.h"
23 #include "TClonesArray.h"
24 #include <list>
25 #include <set>
26 #include <vector>
27 
28 class CbmDigiManager;
29 
30 
31 class CbmGlobalTrackingQA : public FairTask {
32 public:
33  struct PointData;
34 
35  struct TrackData {
36  bool hasSts;
43  std::list<PointData*> tofPoints;
44  bool use;
45  int evN;
46  int ind;
47  std::set<const CbmTofHit*> tofHits;
48  bool used;
50  std::list<TrackData*> offsprings;
51 
53  : hasSts(false)
54  , x(0)
55  , y(0)
56  , z(0)
57  , t(0)
58  , tx(0)
59  , ty(0)
60  , tofPoints()
61  , use(false)
62  , evN(0)
63  , ind(0)
64  , tofHits()
65  , used(false)
66  , parent(nullptr)
67  , offsprings() {}
68  TrackData(const TrackData&) = default;
69  TrackData& operator=(const TrackData&) = delete;
70  };
71 
72  struct PointData {
78  int evN;
79  int ind;
80  };
81 
82 public:
84 
87 
88  InitStatus Init(); // Overridden from FairTask
89  void Exec(Option_t* opt); // Overridden from FairTask
90  void Finish(); // Overridden from FairTask
91 
92  void SetNofEvents(Int_t v) { fNofEvents = v; }
93 
94 private:
95  bool CheckMatch(const TrackData* stsMCTrack,
96  Int_t tofHitInd,
97  bool deepSearch = false) const;
98  bool SemiTofTrack(const TrackData* mcTrack) const;
99 
100 private:
102  TClonesArray* fTofHits = nullptr;
103  TClonesArray* fStsTracks = nullptr;
104  TClonesArray* fGlobalTracks = nullptr;
105  TClonesArray* fTofHitMatches = nullptr;
106  TClonesArray* fStsHits = nullptr;
107  TClonesArray* fStsClusters = nullptr;
112  std::vector<std::vector<TrackData>> fTracks {};
113  std::vector<std::vector<PointData>> fTofPoints {};
114  std::vector<std::vector<PointData>> fStsPoints {};
115  Int_t fNofEvents = 0;
116  ClassDef(CbmGlobalTrackingQA, 1)
117 };
118 
119 #endif /* CBMGLOBALTRACKINGQA_H */
CbmGlobalTrackingQA::fGlobalTracks
TClonesArray * fGlobalTracks
Definition: CbmGlobalTrackingQA.h:104
CbmGlobalTrackingQA::fMCTracks
CbmMCDataArray * fMCTracks
Definition: CbmGlobalTrackingQA.h:108
CbmGlobalTrackingQA::TrackData::tofHits
std::set< const CbmTofHit * > tofHits
Definition: CbmGlobalTrackingQA.h:47
CbmGlobalTrackingQA::PointData::ind
int ind
Definition: CbmGlobalTrackingQA.h:79
CbmGlobalTrackingQA::fTofMCPoints
CbmMCDataArray * fTofMCPoints
Definition: CbmGlobalTrackingQA.h:111
CbmGlobalTrackingQA::PointData::y
scaltype y
Definition: CbmGlobalTrackingQA.h:74
scaltype
#define scaltype
Definition: CbmGlobalTrackingDefs.h:17
CbmGlobalTrackingQA
Definition: CbmGlobalTrackingQA.h:31
CbmGlobalTrackingQA::fTofHitMatches
TClonesArray * fTofHitMatches
Definition: CbmGlobalTrackingQA.h:105
CbmGlobalTrackingQA::fStsMCPoints
CbmMCDataArray * fStsMCPoints
Definition: CbmGlobalTrackingQA.h:109
CbmMCDataArray.h
CbmGlobalTrackingQA::TrackData::TrackData
TrackData(const TrackData &)=default
CbmMCDataArray
Access to a MC data branch for time-based analysis.
Definition: CbmMCDataArray.h:35
CbmGlobalTrackingQA::PointData
Definition: CbmGlobalTrackingQA.h:72
CbmGlobalTrackingQA::PointData::track
TrackData * track
Definition: CbmGlobalTrackingQA.h:77
CbmTofDigi.h
CbmMatch.h
CbmGlobalTrackingQA::TrackData::offsprings
std::list< TrackData * > offsprings
Definition: CbmGlobalTrackingQA.h:50
CbmGlobalTrackingQA::fStsHits
TClonesArray * fStsHits
Definition: CbmGlobalTrackingQA.h:106
CbmGlobalTrackingQA::fTracks
std::vector< std::vector< TrackData > > fTracks
Definition: CbmGlobalTrackingQA.h:112
CbmGlobalTrackingQA::PointData::x
scaltype x
Definition: CbmGlobalTrackingQA.h:73
CbmGlobalTrackingQA::TrackData::hasSts
bool hasSts
Definition: CbmGlobalTrackingQA.h:36
CbmGlobalTrackingQA::TrackData::ty
scaltype ty
Definition: CbmGlobalTrackingQA.h:42
CbmGlobalTrackingQA::fTrdMCPoints
CbmMCDataArray * fTrdMCPoints
Definition: CbmGlobalTrackingQA.h:110
CbmGlobalTrackingQA::TrackData::evN
int evN
Definition: CbmGlobalTrackingQA.h:45
CbmGlobalTrackingQA::SemiTofTrack
bool SemiTofTrack(const TrackData *mcTrack) const
Definition: CbmGlobalTrackingQA.cxx:204
CbmGlobalTrackingDefs.h
CbmGlobalTrackingQA::TrackData::tx
scaltype tx
Definition: CbmGlobalTrackingQA.h:41
CbmGlobalTrackingQA::Exec
void Exec(Option_t *opt)
Definition: CbmGlobalTrackingQA.cxx:230
CbmGlobalTrackingQA::fDigiMan
CbmDigiManager * fDigiMan
Definition: CbmGlobalTrackingQA.h:101
CbmGlobalTrackingQA::TrackData::x
scaltype x
Definition: CbmGlobalTrackingQA.h:37
CbmGlobalTrackingQA::SetNofEvents
void SetNofEvents(Int_t v)
Definition: CbmGlobalTrackingQA.h:92
CbmGlobalTrackingQA::PointData::t
scaltype t
Definition: CbmGlobalTrackingQA.h:76
CbmGlobalTrackingQA::PointData::evN
int evN
Definition: CbmGlobalTrackingQA.h:78
CbmGlobalTrackingQA::TrackData::use
bool use
Definition: CbmGlobalTrackingQA.h:44
CbmGlobalTrackingQA::TrackData::z
scaltype z
Definition: CbmGlobalTrackingQA.h:39
CbmDigiManager
CbmDigiManager.
Definition: CbmDigiManager.h:37
CbmGlobalTrackingQA::TrackData::TrackData
TrackData()
Definition: CbmGlobalTrackingQA.h:52
CbmGlobalTrackingQA::TrackData::y
scaltype y
Definition: CbmGlobalTrackingQA.h:38
CbmGlobalTrackingQA::operator=
CbmGlobalTrackingQA & operator=(const CbmGlobalTrackingQA &)=delete
CbmGlobalTrackingQA::fStsPoints
std::vector< std::vector< PointData > > fStsPoints
Definition: CbmGlobalTrackingQA.h:114
CbmGlobalTrackingQA::Finish
void Finish()
Definition: CbmGlobalTrackingQA.cxx:367
CbmGlobalTrackingQA::TrackData::parent
TrackData * parent
Definition: CbmGlobalTrackingQA.h:49
CbmGlobalTrackingQA::fNofEvents
Int_t fNofEvents
Definition: CbmGlobalTrackingQA.h:115
CbmGlobalTrackingQA::PointData::z
scaltype z
Definition: CbmGlobalTrackingQA.h:75
CbmGlobalTrackingQA::TrackData::ind
int ind
Definition: CbmGlobalTrackingQA.h:46
v
__m128 v
Definition: L1/vectors/P4_F32vec4.h:1
CbmGlobalTrackingQA::fStsTracks
TClonesArray * fStsTracks
Definition: CbmGlobalTrackingQA.h:103
CbmGlobalTrackingQA::Init
InitStatus Init()
Definition: CbmGlobalTrackingQA.cxx:33
CbmGlobalTrackingQA::CheckMatch
bool CheckMatch(const TrackData *stsMCTrack, Int_t tofHitInd, bool deepSearch=false) const
Definition: CbmGlobalTrackingQA.cxx:170
CbmGlobalTrackingQA::CbmGlobalTrackingQA
CbmGlobalTrackingQA(const CbmGlobalTrackingQA &)=delete
CbmGlobalTrackingQA::TrackData::tofPoints
std::list< PointData * > tofPoints
Definition: CbmGlobalTrackingQA.h:43
CbmGlobalTrackingQA::TrackData::used
bool used
Definition: CbmGlobalTrackingQA.h:48
CbmGlobalTrackingQA::TrackData
Definition: CbmGlobalTrackingQA.h:35
CbmGlobalTrackingQA::TrackData::t
scaltype t
Definition: CbmGlobalTrackingQA.h:40
CbmGlobalTrackingQA::CbmGlobalTrackingQA
CbmGlobalTrackingQA()
Definition: CbmGlobalTrackingQA.cxx:31
CbmGlobalTrackingQA::fTofHits
TClonesArray * fTofHits
Definition: CbmGlobalTrackingQA.h:102
CbmGlobalTrackingQA::fStsClusters
TClonesArray * fStsClusters
Definition: CbmGlobalTrackingQA.h:107
CbmGlobalTrackingQA::fTofPoints
std::vector< std::vector< PointData > > fTofPoints
Definition: CbmGlobalTrackingQA.h:113
CbmGlobalTrackingQA::TrackData::operator=
TrackData & operator=(const TrackData &)=delete