BmnRoot
Loading...
Searching...
No Matches
CbmL1.h
Go to the documentation of this file.
1/*
2 *====================================================================
3 *
4 * CBM Level 1 Reconstruction
5 *
6 * Authors: I.Kisel, S.Gorbunov
7 *
8 * e-mail : ikisel@kip.uni-heidelberg.de
9 *
10 *====================================================================
11 *
12 * CbmL1 header file
13 *
14 *====================================================================
15 */
16
17#ifndef _CbmL1_h_
18#define _CbmL1_h_
19
20#include "CbmL1Track.h"
21#include "CbmL1Vtx.h"
22#include "CbmKFParticle.h"
23#include "CbmL1MCTrack.h"
24#include "CbmL1MCPoint.h"
25#include "CbmL1StsHit.h"
26#include "CbmStsDigiScheme.h"
28#include "KFMCParticle.h"
29#include "KFParticleMatch.h"
30
31#include "BmnTask.h"
32
33#include "TClonesArray.h"
34
35#include <vector>
36
37using std::vector;
38
39class L1Algo;
40
42 public:
45 double x, y;
46};
47
48class CbmL1 : public BmnTask
49{
50 private:
51 CbmL1(const CbmL1&);
52 CbmL1 operator=(const CbmL1&);
53 public:
54
57
58 vector<CbmL1Track> vRTracks;
59
60 static CbmL1 *Instance(){ return fInstance; }
61
62 void SetParContainers();
63 virtual InitStatus ReInit();
64 virtual InitStatus Init();
65 void Exec(Option_t * option);
66
67 CbmL1();
68
74 CbmL1(const char *name, Int_t iVerbose = 1, Int_t _fPerformance = 0, int fSTAPDataMode_ = 0, TString fSTAPDataDir_ = "./", int findParticleMode_ = 0);
75
76 ~CbmL1( /*if (targetFieldSlice) delete;*/ );
77
78 void SetMaterialBudgetFileName( TString s ){ fMatBudgetFileName = s; }
79 void SetExtrapolateToTheEndOfSTS( bool b ){ fExtrapolateToTheEndOfSTS = b; }
80 void Finish();
81
82// void SetTrackingLevel( Int_t iLevel ){ fTrackingLevel = iLevel; }
83// void MomentumCutOff( Double_t cut ){ fMomentumCutOff = cut; }
84// void SetGhostSuppression( Bool_t b ){ fGhostSuppression= b; }
85// void SetDetectorEfficiency( Double_t eff ){ fDetectorEfficiency = eff; }
86
87 vector<CbmL1HitStore> vHitStore; // diff hit information
88
89 void Reconstruct();
90
91 friend class L1AlgoDraw;
92 friend class L1AlgoPulls;
93 template<int NHits> friend class L1AlgoEfficiencyPerformance;
94 friend class CbmL1MCTrack;
95 friend class CbmL1PFFitter;
96 private:
97 void IdealTrackFinder(); // just copy all reconstructable MCTracks into RecoTracks.
98
100 void ReadEvent();
101 bool ReadMCPoint( CbmL1MCPoint *MC, int iPoint, bool MVD ); // help procedure
102
104 void HitMatch(); // Procedure for match hits and MCPoints.
105 void FieldApproxCheck(); // Build histos with difference between Field map and approximated field
106 void FieldIntegralCheck(); // Build 2D histo: dependence of the field integral on phi and theta
107 void InputPerformance(); // Build histos about input data, like hit pulls, etc.
108
110 void TrackMatch(); // Procedure for match Reconstructed and MC Tracks. Should be called before Performances
111 void EfficienciesPerformance(); // calculate efficiencies
112 void GetMCParticles(); // create MC particles from MC tracks
113 void FindReconstructableMCParticles();
114 void MatchParticles(); // Procedure for match Reconstructed and MC Particles. Should be called before Performances
115 void PartEffPerformance(); // calculate efficiencies
116 void TrackFitPerformance(); // pulls & residuals. Can be called only after Performance()
117 void HistoPerformance(); // fill some histograms and calculate efficiencies
118 void PartHistoPerformance(); // histograms for particle finder
119
121 void WriteSTAPGeoData(void *geo, int size); // create geo_algo.dat
122 void WriteSTAPAlgoData(); // create data_algo.dat
123 void WriteSTAPPerfData(); // create data_perfo.dat
124 void ReadSTAPGeoData(void *geo, int &size);
125 void ReadSTAPAlgoData();
126 void ReadSTAPPerfData();
128 void WriteSIMDKFData();
129
130 static istream& eatwhite(istream& is); // skip spaces
131 static void writedir2current( TObject *obj ); // help procedure
132
133 int NStation, NMvdStations, NStsStations; // number of detector stations (all\sts\mvd)
134 Int_t fPerformance; // 0 - w\o perf. 1 - L1-Efficiency definition. 2 - QA-Eff.definition
135 int fSTAPDataMode; // way to work with file for standalone package. 0 (off) , 1 (write), 2 (read data and work only with it), 3 (debug - write and read)
136 TString fSTAPDataDir;
137
138 Int_t fTrackingLevel; // really doesn't used
139 Double_t fMomentumCutOff; // really doesn't used
140 Bool_t fGhostSuppression; // really doesn't used
141 Bool_t fUseMVD; // really doesn't used
142// Double_t fDetectorEfficiency; // really doesn't used
143
144 //AZ CbmStsDigiScheme StsDigi;
145 CbmStsDigiScheme *StsDigi;
146 CbmL1Vtx PrimVtx;
147// L1FieldSlice *targetFieldSlice _fvecalignment;
148
150 TClonesArray *listMCTracks;
151 TClonesArray *listStsPts;
152 TClonesArray *listStsDigi;
153 TClonesArray *listStsClusters;
154 TClonesArray *listStsHits;
155
156 TClonesArray *listMvdPts;
157 TClonesArray *listMvdHits;
158 TClonesArray *listMvdHitMatches;
159
161 vector<CbmL1StsHit> vStsHits;
162 vector<CbmL1MCPoint> vMCPoints;
163 vector<CbmL1MCTrack> vMCTracks;
164 vector<int> vHitMCRef; // indices of MCPoints in vMCPoints, indexed by index of hit in algo->vStsHits array. According to StsMatch. Used for IdealResponce
165
166 vector<CbmKFParticle> vRParticles;
167 vector<KFMCParticle> vMCParticles;
168 vector<KFMatchParticles> MCtoRParticleId;
169 vector<KFMatchParticles> RtoMCParticleId;
170
171 TDirectory *histodir;
172
173 static CbmL1 *fInstance;
174
175 private:
176 void CheckMCParticleIsReconstructable(KFMCParticle &part); // recursive func, used in FindReconstructableMCParticles
177
178 int fFindParticlesMode;
179
180 TString fMatBudgetFileName;
181 bool fExtrapolateToTheEndOfSTS;
182
183 ClassDef(CbmL1,1);
184};
185
186#endif //_CbmL1_h_
void writedir2current(TObject *obj)
BmnTask.
Definition BmnTask.h:13
double y
Definition CbmL1.h:45
int ExtIndex
Definition CbmL1.h:43
double x
Definition CbmL1.h:45
int iStation
Definition CbmL1.h:44
Definition CbmL1.h:49
L1Algo * algo
Definition CbmL1.h:55
static CbmL1 * Instance()
reconstructed tracks
Definition CbmL1.h:60
vector< CbmL1HitStore > vHitStore
Definition CbmL1.h:87
virtual InitStatus Init()
Definition CbmL1.cxx:202
CbmL1()
Definition CbmL1.cxx:51
vector< CbmL1Track > vRTracks
Definition CbmL1.h:58
void Finish()
Definition CbmL1.cxx:757
void Exec(Option_t *option)
Definition CbmL1.cxx:593
CbmL1ParticlesFinder * PF
for access to L1 Algorithm from L1::Instance
Definition CbmL1.h:56
void Reconstruct()
Definition CbmL1.cxx:595
void SetMaterialBudgetFileName(TString s)
Definition CbmL1.h:78
void SetParContainers()
Definition CbmL1.cxx:182
~CbmL1()
Definition CbmL1.cxx:175
void SetExtrapolateToTheEndOfSTS(bool b)
Definition CbmL1.h:79
virtual InitStatus ReInit()
Definition CbmL1.cxx:194