CbmRoot
LxTBTask.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: LxTBTask.h
9  * Author: Timur Ablyazimov
10  *
11  * Created on 14 Mar 2016
12  */
13 
14 #ifndef LXTBTASK_H
15 #define LXTBTASK_H
16 
17 #include "CbmMuchPoint.h"
18 #include "CbmTrdPoint.h"
19 #include "FairTask.h"
20 #include "LxTBDefinitions.h"
21 #include <vector>
22 
23 #define CUR_NOF_TRD_LAYERS 4
24 #define CUR_LAST_TRD_LAYER CUR_NOF_TRD_LAYERS - 1
25 
26 #include "CbmMCDataArray.h"
27 #include "CbmPixelHit.h"
28 #include "CbmStsTrack.h"
29 #include "LxTBTieTracks.h"
30 #include "TGeoManager.h"
31 
32 #define CUR_NOF_STATIONS 4
33 #define CUR_LAST_STATION CUR_NOF_STATIONS - 1
34 //#define CUR_NOF_TIMEBINS 5
35 //#define CUR_LAST_TIMEBIN CUR_NOF_TIMEBINS - 1
36 #define CUR_TIMEBIN_LENGTH 100
37 
38 #include "LxTBBinned.h"
39 
40 class LxTBFinder : public FairTask {
41 public:
42 #ifdef LXTB_QA
43  struct PointDataHolder {
44  Double_t x;
45  Double_t y;
46  Double_t z;
47  Double_t t;
48  Int_t eventId;
49  Int_t trackId;
50  Int_t pointId;
52  Int_t layerNumber;
53  };
54 
55  struct TrackDataHolder {
60  bool isPos;
61 
63  : isSignalShort(false), isSignalLong(false), isPos(false) {
64  for (int i = 0; i < CUR_NOF_STATIONS; ++i)
65  pointInds[i] = -1;
66 
67  for (int i = 0; i < CUR_NOF_TRD_LAYERS; ++i)
68  trdPointInds[i] = -1;
69  }
70  };
71 #endif //LXTB_QA
72 
73 public:
74  LxTBFinder();
75  LxTBFinder(const LxTBFinder&) = delete;
76  LxTBFinder& operator=(const LxTBFinder&) = delete;
77 
78  InitStatus Init(); // Overridden from FairTask
79  void Exec(Option_t* opt); // Overridden from FairTask
80  void Finish(); // Overridden from FairTask
81 
82  void SetEvByEv(bool v = true) {
83  isEvByEv = v;
84 
85  if (isEvByEv)
86 #ifdef LXTB_EMU_TS
87  nof_timebins = 1000;
88 #else //LXTB_EMU_TS
89  nof_timebins = 5;
90 #endif //LXTB_EMU_TS
91  else
92  nof_timebins = 1000;
93 
95  }
96 
97  void SetUseTrd(bool v = true) { useTrd = v; }
98  void SetUseIdeal(bool v = true) { useIdeal = v; }
99  void SetUseAsciiSig(bool v = true) { useAsciiSig = v; }
100  void SetSignalParticle(const char* name) { fSignalParticle = name; }
101  void SetNEvents(Int_t v) { fNEvents = v; }
102 
103 private:
104  void HandleGeometry();
105 #ifdef LXTB_QA
106  void
107  AddHit(const CbmPixelHit* hit, Int_t stationNumber, Int_t refId, bool isTrd);
108 #else
109  void AddHit(const CbmPixelHit* hit, Int_t stationNumber, Int_t refId);
110 #endif //LXTB_QA
111 
112 #ifdef LXTB_TIE
113  void AddLayerHit(const CbmPixelHit* hit,
114  Int_t layerNumber,
115  Int_t refId,
116  bool isTrd);
117  void AddStsTrack(const CbmStsTrack& stsTrack, Int_t selfId);
118 #endif //LXTB_TIE
119 
120  std::vector<std::vector<PointDataHolder>> fMuchPoints;
122  TClonesArray* fMuchPixelHits;
123  TClonesArray* fMuchClusters;
124  TClonesArray* fMuchPixelDigiMatches;
125 
126  std::vector<std::vector<PointDataHolder>> fTrdPoints;
128  TClonesArray* fTrdHits;
129  TClonesArray* fTrdClusters;
130  TClonesArray* fTrdDigiMatches;
131 
132 #ifdef LXTB_QA
133  TClonesArray* fMvdDigis;
134  TClonesArray* fStsDigis;
135  TClonesArray* fTofDigis;
136 #endif //LXTB_QA
137 
138 #ifdef LXTB_QA
139  std::vector<std::vector<TrackDataHolder>> fMCTracks;
140 #endif //LXTB_QA
141  bool isEvByEv;
143  std::list<LxTbBinnedFinder::Chain*> recoTracks;
144  bool hasTrd;
145  bool useTrd;
146  bool useIdeal;
148  const char* fSignalParticle;
149  unsigned int nof_timebins;
150  unsigned int last_timebin;
151  Int_t fNEvents;
152  std::vector<Double_t> fEventTimes;
153 #ifdef LXTB_TIE
154  TClonesArray* fStsHits;
155  TClonesArray* fStsTracks;
156  TClonesArray* fStsClusters;
157  TClonesArray* fStsDigiMatches;
158  LxTBBinnedDetector* fDetector;
159 #endif //LXTB_TIE
160  int dummy;
161 
162  ClassDef(LxTBFinder, 1)
163 };
164 
165 #endif /* LXTBTASK_H */
LxTBFinder::LxTBFinder
LxTBFinder()
Definition: LxTBTask.cxx:56
LxTBFinder::SetUseAsciiSig
void SetUseAsciiSig(bool v=true)
Definition: LxTBTask.h:99
LxTBFinder::fStsDigis
TClonesArray * fStsDigis
Definition: LxTBTask.h:134
LxTBFinder::fSignalParticle
const char * fSignalParticle
Definition: LxTBTask.h:148
LxTBFinder::PointDataHolder::x
Double_t x
Definition: LxTBTask.h:44
LxTBFinder::PointDataHolder::layerNumber
Int_t layerNumber
Definition: LxTBTask.h:52
LxTBFinder::isEvByEv
bool isEvByEv
Definition: LxTBTask.h:141
LxTBFinder::fTrdMCPoints
CbmMCDataArray * fTrdMCPoints
Definition: LxTBTask.h:127
LxTBFinder::fMCTracks
std::vector< std::vector< TrackDataHolder > > fMCTracks
Definition: LxTBTask.h:139
LxTBFinder::hasTrd
bool hasTrd
Definition: LxTBTask.h:144
LxTBFinder::fTofDigis
TClonesArray * fTofDigis
Definition: LxTBTask.h:135
LxTBFinder::TrackDataHolder::isSignalLong
bool isSignalLong
Definition: LxTBTask.h:59
LxTBFinder::Init
InitStatus Init()
Definition: LxTBTask.cxx:411
LxTBFinder::fMvdDigis
TClonesArray * fMvdDigis
Definition: LxTBTask.h:133
LxTBTieTracks.h
LxTBFinder::TrackDataHolder::isPos
bool isPos
Definition: LxTBTask.h:60
LxTBFinder::PointDataHolder::t
Double_t t
Definition: LxTBTask.h:47
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
CbmMCDataArray.h
LxTBFinder::last_timebin
unsigned int last_timebin
Definition: LxTBTask.h:150
LxTBFinder::fMuchPoints
std::vector< std::vector< PointDataHolder > > fMuchPoints
Definition: LxTBTask.h:120
CbmMCDataArray
Access to a MC data branch for time-based analysis.
Definition: CbmMCDataArray.h:35
LxTBBinned.h
LxTBFinder::fMuchPixelHits
TClonesArray * fMuchPixelHits
Definition: LxTBTask.h:122
LxTBFinder::HandleGeometry
void HandleGeometry()
Definition: LxTBTask.cxx:138
LxTBFinder::Finish
void Finish()
Definition: LxTBTask.cxx:1525
LxTBFinder::PointDataHolder::pointId
Int_t pointId
Definition: LxTBTask.h:50
LxTBFinder::PointDataHolder::z
Double_t z
Definition: LxTBTask.h:46
LxTBFinder::SetUseTrd
void SetUseTrd(bool v=true)
Definition: LxTBTask.h:97
LxTBFinder::AddHit
void AddHit(const CbmPixelHit *hit, Int_t stationNumber, Int_t refId, bool isTrd)
Definition: LxTBTask.cxx:965
LxTBFinder::useTrd
bool useTrd
Definition: LxTBTask.h:145
LxTBFinder::TrackDataHolder::pointInds
Int_t pointInds[CUR_NOF_STATIONS]
Definition: LxTBTask.h:56
CbmStsTrack.h
Data class for STS tracks.
LxTBFinder::PointDataHolder::y
Double_t y
Definition: LxTBTask.h:45
CbmMuchPoint.h
LxTbBinnedFinder
Definition: LxTBBinned.h:336
LxTBFinder::recoTracks
std::list< LxTbBinnedFinder::Chain * > recoTracks
Definition: LxTBTask.h:143
LxTBFinder
Definition: LxTBTask.h:40
LxTBFinder::SetEvByEv
void SetEvByEv(bool v=true)
Definition: LxTBTask.h:82
LxTBFinder::TrackDataHolder::trdPointInds
Int_t trdPointInds[CUR_NOF_TRD_LAYERS]
Definition: LxTBTask.h:57
LxTBFinder::PointDataHolder::trackId
Int_t trackId
Definition: LxTBTask.h:49
CUR_NOF_TRD_LAYERS
#define CUR_NOF_TRD_LAYERS
Definition: LxTBTask.h:23
LxTBFinder::SetNEvents
void SetNEvents(Int_t v)
Definition: LxTBTask.h:101
LxTBFinder::useAsciiSig
bool useAsciiSig
Definition: LxTBTask.h:147
LxTBFinder::PointDataHolder
Definition: LxTBTask.h:43
CUR_NOF_STATIONS
#define CUR_NOF_STATIONS
Definition: LxTBTask.h:32
CbmPixelHit.h
LxTBFinder::PointDataHolder::stationNumber
Int_t stationNumber
Definition: LxTBTask.h:51
LxTBBinnedDetector
Definition: LxTBTieTracks.h:200
LxTBFinder::dummy
int dummy
Definition: LxTBTask.h:160
LxTBFinder::Exec
void Exec(Option_t *opt)
Definition: LxTBTask.cxx:1304
LxTBFinder::fEventTimes
std::vector< Double_t > fEventTimes
Definition: LxTBTask.h:152
LxTBFinder::fMuchClusters
TClonesArray * fMuchClusters
Definition: LxTBTask.h:123
LxTBFinder::fMuchPixelDigiMatches
TClonesArray * fMuchPixelDigiMatches
Definition: LxTBTask.h:124
LxTBFinder::PointDataHolder::eventId
Int_t eventId
Definition: LxTBTask.h:48
LxTBFinder::fTrdHits
TClonesArray * fTrdHits
Definition: LxTBTask.h:128
LxTBFinder::fTrdDigiMatches
TClonesArray * fTrdDigiMatches
Definition: LxTBTask.h:130
v
__m128 v
Definition: L1/vectors/P4_F32vec4.h:1
CbmTrdPoint.h
LxTBFinder::TrackDataHolder::TrackDataHolder
TrackDataHolder()
Definition: LxTBTask.h:62
CbmPixelHit
Definition: CbmPixelHit.h:21
LxTBFinder::fTrdPoints
std::vector< std::vector< PointDataHolder > > fTrdPoints
Definition: LxTBTask.h:126
LxTBFinder::SetSignalParticle
void SetSignalParticle(const char *name)
Definition: LxTBTask.h:100
LxTBFinder::operator=
LxTBFinder & operator=(const LxTBFinder &)=delete
LxTBFinder::LxTBFinder
LxTBFinder(const LxTBFinder &)=delete
LxTBFinder::fTrdClusters
TClonesArray * fTrdClusters
Definition: LxTBTask.h:129
LxTBFinder::fFinder
LxTbBinnedFinder * fFinder
Definition: LxTBTask.h:142
LxTBDefinitions.h
CbmStsTrack
Definition: CbmStsTrack.h:37
LxTBFinder::TrackDataHolder::isSignalShort
bool isSignalShort
Definition: LxTBTask.h:58
LxTBFinder::fMuchMCPoints
CbmMCDataArray * fMuchMCPoints
Definition: LxTBTask.h:121
LxTBFinder::SetUseIdeal
void SetUseIdeal(bool v=true)
Definition: LxTBTask.h:98
LxTBFinder::fNEvents
Int_t fNEvents
Definition: LxTBTask.h:151
LxTBFinder::nof_timebins
unsigned int nof_timebins
Definition: LxTBTask.h:149
LxTBFinder::TrackDataHolder
Definition: LxTBTask.h:55
LxTBFinder::useIdeal
bool useIdeal
Definition: LxTBTask.h:146