CbmRoot
LxTBMLTask.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: LxTBMLTask.h
9  * Author: tablyaz
10  *
11  * Created on October 14, 2016, 11:35 AM
12  */
13 
14 #ifndef LXTBMLTASK_H
15 #define LXTBMLTASK_H
16 
17 #include "CbmMCDataArray.h"
18 #include "FairTask.h"
19 #include "LxTBBinned2.h"
20 
21 class LxTBMLFinder : public FairTask {
22 public:
23  struct Chain {
26 
28  : chi2(Chi2) {
29  for (int i = 0; i < NOF_STATIONS; ++i) {
30  for (int j = 0; j < NOF_LAYERS; ++j)
31  points[i][j] = new LxTbBinnedPoint(*pts[i][j]);
32  }
33  }
34 
35  Chain(const Chain& origingal) : chi2(origingal.chi2) {
36  for (int i = 0; i < NOF_STATIONS; ++i) {
37  for (int j = 0; j < NOF_LAYERS; ++j)
38  points[i][j] = new LxTbBinnedPoint(*origingal.points[i][j]);
39  }
40  }
41 
42  ~Chain() {
43  for (int i = 0; i < NOF_STATIONS; ++i) {
44  for (int j = 0; j < NOF_LAYERS; ++j)
45  delete points[i][j];
46  }
47  }
48  };
49 
50 #ifdef LXTB_QA
51  struct PointDataHolder {
52  Double_t x;
53  Double_t y;
54  Double_t z;
55  Double_t t;
56  Int_t eventId;
57  Int_t trackId;
58  Int_t pointId;
60  Int_t layerNumber;
61  };
62 
63  struct TrackDataHolder {
65  bool isSignal;
66  bool isPos;
67 
68  TrackDataHolder() : isSignal(false), isPos(false) {
69  for (int i = 0; i < NOF_STATIONS; ++i) {
70  for (int j = 0; j < NOF_LAYERS; ++j)
71  pointInds[i][j] = -1;
72  }
73  }
74  };
75 #endif //LXTB_QA
76 
77  LxTBMLFinder();
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) {
83  fIsEvByEv = v;
84  fNofTBins = fIsEvByEv ? 5 : 1000;
85  }
86 
87  void SetNEvents(int v) { fNEvents = v; }
88 
89 private:
91  bool fIsEvByEv;
92  int fNofXBins;
93  int fNofYBins;
94  int fNofTBins;
95 
97  TClonesArray* fMuchPixelHits;
98  TClonesArray* fMuchClusters;
99  TClonesArray* fMuchPixelDigiMatches;
100  std::list<Chain*> recoTracks;
101 
102 #ifdef LXTB_QA
103  std::vector<std::vector<PointDataHolder>> fMuchPoints;
104  std::vector<std::vector<TrackDataHolder>> fMCTracks;
105  std::vector<Double_t> fEventTimes;
106 #endif //LXTB_QA
107  int fNEvents;
108 
109  ClassDef(LxTBMLFinder, 1)
110 };
111 
112 #endif /* LXTBMLTASK_H */
LxTBMLFinder::PointDataHolder::stationNumber
Int_t stationNumber
Definition: LxTBMLTask.h:59
LxTBMLFinder::PointDataHolder::pointId
Int_t pointId
Definition: LxTBMLTask.h:58
LxTBMLFinder::TrackDataHolder::isPos
bool isPos
Definition: LxTBMLTask.h:66
NOF_LAYERS
#define NOF_LAYERS
Definition: LxTBBinned2.h:22
LxTBMLFinder::fMCTracks
std::vector< std::vector< TrackDataHolder > > fMCTracks
Definition: LxTBMLTask.h:104
scaltype
#define scaltype
Definition: CbmGlobalTrackingDefs.h:17
LxTBMLFinder::fMuchPoints
std::vector< std::vector< PointDataHolder > > fMuchPoints
Definition: LxTBMLTask.h:103
LxTBMLFinder::SetEvByEv
void SetEvByEv(bool v)
Definition: LxTBMLTask.h:82
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
LxTBMLFinder::Finish
void Finish()
Definition: LxTBMLTask.cxx:1688
LxTBMLFinder::TrackDataHolder::TrackDataHolder
TrackDataHolder()
Definition: LxTBMLTask.h:68
CbmMCDataArray.h
LxTBMLFinder::fMuchMCPoints
CbmMCDataArray * fMuchMCPoints
Definition: LxTBMLTask.h:96
CbmMCDataArray
Access to a MC data branch for time-based analysis.
Definition: CbmMCDataArray.h:35
LxTBBinned2.h
LxTBMLFinder::fReconstructor
void * fReconstructor
Definition: LxTBMLTask.h:90
LxTBMLFinder::Chain::Chain
Chain(LxTbBinnedPoint *pts[NOF_STATIONS][NOF_LAYERS], scaltype Chi2)
Definition: LxTBMLTask.h:27
LxTBMLFinder::PointDataHolder::layerNumber
Int_t layerNumber
Definition: LxTBMLTask.h:60
LxTBMLFinder::PointDataHolder::z
Double_t z
Definition: LxTBMLTask.h:54
LxTBMLFinder::Chain::~Chain
~Chain()
Definition: LxTBMLTask.h:42
LxTBMLFinder::fMuchPixelDigiMatches
TClonesArray * fMuchPixelDigiMatches
Definition: LxTBMLTask.h:99
LxTBMLFinder::PointDataHolder
Definition: LxTBMLTask.h:51
LxTBMLFinder::recoTracks
std::list< Chain * > recoTracks
Definition: LxTBMLTask.h:100
LxTBMLFinder::fMuchClusters
TClonesArray * fMuchClusters
Definition: LxTBMLTask.h:98
LxTBMLFinder::Chain::chi2
scaltype chi2
Definition: LxTBMLTask.h:25
LxTBMLFinder::PointDataHolder::eventId
Int_t eventId
Definition: LxTBMLTask.h:56
LxTBMLFinder::fIsEvByEv
bool fIsEvByEv
Definition: LxTBMLTask.h:91
LxTBMLFinder::TrackDataHolder
Definition: LxTBMLTask.h:63
LxTBMLFinder
Definition: LxTBMLTask.h:21
LxTBMLFinder::PointDataHolder::y
Double_t y
Definition: LxTBMLTask.h:53
LxTBMLFinder::Chain
Definition: LxTBMLTask.h:23
LxTBMLFinder::LxTBMLFinder
LxTBMLFinder()
Definition: LxTBMLTask.cxx:867
LxTBMLFinder::Init
InitStatus Init()
Definition: LxTBMLTask.cxx:885
LxTBMLFinder::fNEvents
int fNEvents
Definition: LxTBMLTask.h:107
LxTBMLFinder::fMuchPixelHits
TClonesArray * fMuchPixelHits
Definition: LxTBMLTask.h:97
LxTBMLFinder::Chain::Chain
Chain(const Chain &origingal)
Definition: LxTBMLTask.h:35
LxTBMLFinder::SetNEvents
void SetNEvents(int v)
Definition: LxTBMLTask.h:87
LxTBMLFinder::PointDataHolder::t
Double_t t
Definition: LxTBMLTask.h:55
v
__m128 v
Definition: L1/vectors/P4_F32vec4.h:1
NOF_STATIONS
#define NOF_STATIONS
Definition: LxTBBinned2.h:24
LxTBMLFinder::PointDataHolder::trackId
Int_t trackId
Definition: LxTBMLTask.h:57
LxTBMLFinder::fNofXBins
int fNofXBins
Definition: LxTBMLTask.h:92
LxTBMLFinder::TrackDataHolder::isSignal
bool isSignal
Definition: LxTBMLTask.h:65
LxTBMLFinder::TrackDataHolder::pointInds
Int_t pointInds[NOF_STATIONS][NOF_LAYERS]
Definition: LxTBMLTask.h:64
LxTbBinnedPoint
Definition: LxTBBinned.h:78
LxTBMLFinder::fEventTimes
std::vector< Double_t > fEventTimes
Definition: LxTBMLTask.h:105
LxTBMLFinder::Exec
void Exec(Option_t *opt)
Definition: LxTBMLTask.cxx:1133
LxTBMLFinder::Chain::points
LxTbBinnedPoint * points[NOF_STATIONS][NOF_LAYERS]
Definition: LxTBMLTask.h:24
LxTBMLFinder::fNofYBins
int fNofYBins
Definition: LxTBMLTask.h:93
LxTBMLFinder::fNofTBins
int fNofTBins
Definition: LxTBMLTask.h:94
LxTBMLFinder::PointDataHolder::x
Double_t x
Definition: LxTBMLTask.h:52