FairRoot/PandaRoot
PndSttCellTrackFinderTask.h
Go to the documentation of this file.
1 #ifndef PndSttCellTrackFinderTask_H_
2 #define PndSttCellTrackFinderTask_H_
3 
4 #include "FairTask.h"
5 #include "PndGeoSttPar.h"
6 #include "PndSttGeometryMap.h"
7 #include "PndSttStrawMap.h"
9 
10 #include <vector>
11 
12 extern "C" int* AllocateStaticData(int*, int);
13 extern "C" void FreeStaticData(int*);
14 
15 class PndSttCellTrackFinderTask: public FairTask {
16 public:
17 
19  FairTask("Stt Cell Track Finder"), fClusterTime(250.0), fUseGPU(kFALSE), fDev_tubeNeighborings(0), fRunTimeBased(kFALSE), fCalcWithCorrectedIsochrones(kFALSE), fVerbose(0), fPersistence(kTRUE),
20  fAnalyseSteps(kFALSE), fTrackFinder(0){
23  }
24  ;
25 
27  }
28  ;
29 
31  virtual void SetParContainers();
32  virtual InitStatus Init();
33  //virtual InitStatus ReInit();
34 
36  virtual void Exec(Option_t* opt);
37 
38  virtual void FinishEvent();
39 
40  virtual void FinishTask();
41 
42  //void AddHitBranch(TString branchName);//Has to be called before Init() is used otherwise the default names are taken!
43 
44  void SetVerbose(Int_t verbose) {
45  fVerbose = verbose;
46  }
47  ;
49  fPersistence = val;
50  }
51  ;
54  }
55  ;
57  fUseGPU=val;
58  };
61  };
62  void SetClusterTime(double val){
63  fClusterTime = val;
64  }; // J.R. 20/04-2018
67  }
68  // define a Prefix for the Output in case you run more Instances of the CellTrackFinderTask
70  // set a prefix for the defoult inbut Branch names
71  void SetInBranchNamePrefix(TString prefix){fInBranchNamePrefix = prefix+"_";};
72  //if nothing is defined, the standard STTHit branches are used.
73  //If InputBranches are defined, so far only Branches holding data of type STTHit are further processed (See "initHitArray" method)
74  void AddHitBranch(TString branchName){fHitBranch.push_back(branchName);};
75  // initialise all STTHit type data, If someone wants to change this also the "Addhit" method of the Trackfinder must be adapted!
76  void InitHitArray(TString branchName);
77 
78 private:
79 
80  double fClusterTime;
81  //for GPU computing
84 
86 
88 
91 
92  std::vector<TString> fHitBranch;
93  std::vector<TString> fSTTHitBranch;
94  //TString fTrackBranch;
95 
96  std::vector<TClonesArray*> fSTTHitArray;
97 
98  // first step of trackfinding
99  TClonesArray* fFirstTrackCandArray;
100  TClonesArray* fFirstTrackArray;
101  TClonesArray* fFirstRiemannTrackArray;
102 
103  // second step of trackfinding
104  TClonesArray* fCombiTrackCandArray;
105  TClonesArray* fCombiRiemannTrackArray;
106  TClonesArray* fCombiTrackArray;
108 
109  Int_t fVerbose;
110  Bool_t fPersistence; // safe data?
111  Bool_t fAnalyseSteps; // if true, results of first step (generating tracklets) will be stored for AnalysisTask
112 
113  PndGeoSttPar *fSttParameters; // needed for SttStrawMap
114  TClonesArray *fTubeArray; // needed for SttStrawMap
115 
119 
120  TClonesArray* fEventHeader;
121 
122  //for runtime analysis: numHits, numHitsWithoutDouble, numUnambiguousHits
123  std::vector<std::vector<int> > fNumHitsPerEvent;
124 
125 ClassDef(PndSttCellTrackFinderTask,1)
126  ;
127 
128 };
129 
130 #endif /*PndSttCellTrackFinderTask_H_*/
Double_t val[nBoxes][nFEBox]
Definition: createCalib.C:11
#define verbose
std::vector< TString > fHitBranch
PndSttCellTrackFinder * fTrackFinder
std::vector< std::vector< int > > fNumHitsPerEvent
std::vector< TString > fSTTHitBranch
virtual void Exec(Option_t *opt)
void SetOutBranchNamePrefix(TString prefix)
std::vector< TClonesArray * > fSTTHitArray
void AddHitBranch(TString branchName)
void SetInBranchNamePrefix(TString prefix)
void InitHitArray(TString branchName)
void SetCalcWithCorrectedIsochrones(Bool_t val)
int * AllocateStaticData(int *, int)
void FreeStaticData(int *)