CbmRoot
LxTBTrdTask.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: LxTBTrdTask.h
9  * Author: tablyaz
10  *
11  * Created on October 4, 2016, 6:43 PM
12  */
13 
14 #ifndef LXTBTRDTASK_H
15 #define LXTBTRDTASK_H
16 
17 #include "CbmMCDataArray.h"
18 #include "FairTask.h"
19 #include "LxTBBinned.h"
20 
21 #define CUR_TIMEBIN_LENGTH 100
22 #define CUR_NOF_STATIONS 4
23 #define CUR_LAST_STATION CUR_NOF_STATIONS - 1
24 
25 class LxTBTrdFinder : public FairTask {
26 public:
27 #ifdef LXTB_QA
28  struct TrackDataHolder {
30  bool isSignal;
31  Int_t pdg;
32  Double_t z;
33 
34  TrackDataHolder() : isSignal(false), pdg(-1), z(0) {
35  for (int i = 0; i < CUR_NOF_STATIONS; ++i)
36  pointInds[i] = -1;
37  }
38  };
39 
40  struct PointDataHolder {
41  Double_t x;
42  Double_t y;
43  Double_t z;
44  Double_t t;
45  Int_t eventId;
46  Int_t trackId;
47  Int_t pointId;
48  Int_t layerNumber;
49  };
50 #endif //LXTB_QA
51 
52 public:
54  LxTBTrdFinder(const LxTBTrdFinder&) = delete;
56 
57  InitStatus Init(); // Overridden from FairTask
58  void Exec(Option_t* opt); // Overridden from FairTask
59  void Finish(); // Overridden from FairTask
60 
61  void SetTrigDistance(Double_t v) { fTrigDistance = v; }
62 
63 #ifdef LXTB_QA
64  void SetNEvents(Int_t v) { fNEvents = v; }
65 #endif //LXTB_QA
66 
67 private:
68  void HandleGeometry();
70  Double_t fTrigDistance;
71  std::list<LxTbBinnedFinder::Chain*> recoTracks;
72  unsigned int nof_timebins;
73  unsigned int last_timebin;
74  TClonesArray* fTrdHits;
75  TClonesArray* fTrdClusters;
76  TClonesArray* fTrdDigiMatches;
77  TClonesArray* fTrdTracks;
78  TClonesArray* fGlobalTracks;
79 #ifdef LXTB_QA
81  std::vector<std::vector<TrackDataHolder>> fMCTracks;
82  std::vector<std::vector<PointDataHolder>> fTrdPoints;
83  Int_t fNEvents;
84 #endif //LXTB_QA
85 
86  ClassDef(LxTBTrdFinder, 1)
87 };
88 
89 #endif /* LXTBTRDTASK_H */
LxTBTrdFinder::fTrdDigiMatches
TClonesArray * fTrdDigiMatches
Definition: LxTBTrdTask.h:76
LxTBTrdFinder::LxTBTrdFinder
LxTBTrdFinder(const LxTBTrdFinder &)=delete
CUR_NOF_STATIONS
#define CUR_NOF_STATIONS
Definition: LxTBTrdTask.h:22
LxTBTrdFinder::TrackDataHolder::pointInds
Int_t pointInds[CUR_NOF_STATIONS]
Definition: LxTBTrdTask.h:29
LxTBTrdFinder::fGlobalTracks
TClonesArray * fGlobalTracks
Definition: LxTBTrdTask.h:78
LxTBTrdFinder
Definition: LxTBTrdTask.h:25
LxTBTrdFinder::HandleGeometry
void HandleGeometry()
Definition: LxTBTrdTask.cxx:72
LxTBTrdFinder::PointDataHolder::x
Double_t x
Definition: LxTBTrdTask.h:41
LxTBTrdFinder::fNEvents
Int_t fNEvents
Definition: LxTBTrdTask.h:83
LxTBTrdFinder::LxTBTrdFinder
LxTBTrdFinder()
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
LxTBTrdFinder::SetTrigDistance
void SetTrigDistance(Double_t v)
Definition: LxTBTrdTask.h:61
LxTBTrdFinder::fFinder
LxTbBinnedFinder * fFinder
Definition: LxTBTrdTask.h:69
CbmMCDataArray.h
LxTBTrdFinder::TrackDataHolder::pdg
Int_t pdg
Definition: LxTBTrdTask.h:31
CbmMCDataArray
Access to a MC data branch for time-based analysis.
Definition: CbmMCDataArray.h:35
LxTBTrdFinder::SetNEvents
void SetNEvents(Int_t v)
Definition: LxTBTrdTask.h:64
LxTBBinned.h
LxTBTrdFinder::Finish
void Finish()
Definition: LxTBTrdTask.cxx:583
LxTBTrdFinder::Init
InitStatus Init()
Definition: LxTBTrdTask.cxx:166
LxTBTrdFinder::PointDataHolder::layerNumber
Int_t layerNumber
Definition: LxTBTrdTask.h:48
LxTBTrdFinder::fMCTracks
std::vector< std::vector< TrackDataHolder > > fMCTracks
Definition: LxTBTrdTask.h:81
LxTBTrdFinder::nof_timebins
unsigned int nof_timebins
Definition: LxTBTrdTask.h:72
LxTbBinnedFinder
Definition: LxTBBinned.h:336
LxTBTrdFinder::operator=
LxTBTrdFinder & operator=(const LxTBTrdFinder &)=delete
LxTBTrdFinder::fTrigDistance
Double_t fTrigDistance
Definition: LxTBTrdTask.h:70
LxTBTrdFinder::TrackDataHolder::z
Double_t z
Definition: LxTBTrdTask.h:32
LxTBTrdFinder::fTrdClusters
TClonesArray * fTrdClusters
Definition: LxTBTrdTask.h:75
LxTBTrdFinder::fTrdTracks
TClonesArray * fTrdTracks
Definition: LxTBTrdTask.h:77
LxTBTrdFinder::PointDataHolder::eventId
Int_t eventId
Definition: LxTBTrdTask.h:45
LxTBTrdFinder::fTrdPoints
std::vector< std::vector< PointDataHolder > > fTrdPoints
Definition: LxTBTrdTask.h:82
LxTBTrdFinder::PointDataHolder::pointId
Int_t pointId
Definition: LxTBTrdTask.h:47
LxTBTrdFinder::fTrdMCPoints
CbmMCDataArray * fTrdMCPoints
Definition: LxTBTrdTask.h:80
v
__m128 v
Definition: L1/vectors/P4_F32vec4.h:1
LxTBTrdFinder::fTrdHits
TClonesArray * fTrdHits
Definition: LxTBTrdTask.h:74
LxTBTrdFinder::Exec
void Exec(Option_t *opt)
Definition: LxTBTrdTask.cxx:415
LxTBTrdFinder::PointDataHolder::z
Double_t z
Definition: LxTBTrdTask.h:43
LxTBTrdFinder::PointDataHolder
Definition: LxTBTrdTask.h:40
LxTBTrdFinder::PointDataHolder::t
Double_t t
Definition: LxTBTrdTask.h:44
LxTBTrdFinder::PointDataHolder::trackId
Int_t trackId
Definition: LxTBTrdTask.h:46
LxTBTrdFinder::last_timebin
unsigned int last_timebin
Definition: LxTBTrdTask.h:73
LxTBTrdFinder::recoTracks
std::list< LxTbBinnedFinder::Chain * > recoTracks
Definition: LxTBTrdTask.h:71
LxTBTrdFinder::PointDataHolder::y
Double_t y
Definition: LxTBTrdTask.h:42
LxTBTrdFinder::TrackDataHolder
Definition: LxTBTrdTask.h:28
LxTBTrdFinder::TrackDataHolder::TrackDataHolder
TrackDataHolder()
Definition: LxTBTrdTask.h:34
LxTBTrdFinder::TrackDataHolder::isSignal
bool isSignal
Definition: LxTBTrdTask.h:30