CbmRoot
CbmLitFitQa.h
Go to the documentation of this file.
1 
8 #ifndef CBMLITFITQA_H_
9 #define CBMLITFITQA_H_
10 
11 #include "CbmDefs.h"
12 #include "CbmStsKFTrackFitter.h"
13 #include "FairTask.h"
15 #include <string>
16 
17 class CbmHistManager;
18 class CbmVertex;
19 class FairTrackParam;
20 class CbmLitMCPoint;
22 class CbmMCDataArray;
23 class CbmEvent;
24 
25 using std::string;
26 
38 class CbmLitFitQa : public FairTask {
39 public:
43  CbmLitFitQa();
44 
48  virtual ~CbmLitFitQa();
49 
53  virtual InitStatus Init();
54 
58  virtual void Exec(Option_t* opt);
59 
63  virtual void Finish();
64 
65  /* Setters */
66  void SetMvdMinNofHits(Int_t minNofHits) { fMvdMinNofHits = minNofHits; }
67  void SetStsMinNofHits(Int_t minNofHits) { fStsMinNofHits = minNofHits; }
68  void SetTrdMinNofHits(Int_t minNofHits) { fTrdMinNofHits = minNofHits; }
69  void SetMuchMinNofHits(Int_t minNofHits) { fMuchMinNofHits = minNofHits; }
70  void SetOutputDir(const string& dir) { fOutputDir = dir; }
71  void SetFixedBounds(Bool_t isFixedBounds) { fIsFixedBounds = isFixedBounds; }
72 
73  void SetPRange(Int_t bins, Int_t min, Int_t max) {
74  fPRangeBins = bins;
75  fPRangeMin = min;
76  fPRangeMax = max;
77  }
78 
79 private:
83  void ReadDataBranches();
84 
85  void ProcessGlobalTracks();
86 
87  void ProcessStsTrack(Int_t trackId);
88 
89  void ProcessTrdTrack(Int_t trackId);
90 
91  void ProcessMuchTrack(Int_t trackId);
92 
93  void FillResidualsAndPulls(const FairTrackParam* par,
94  const CbmLitMCPoint* mcPoint,
95  const string& histName,
96  Float_t wrongPar,
97  ECbmModuleId detId);
98 
99  void FillTrackParamHistogramm(const string& histName,
100  const FairTrackParam* par);
101 
104 
106 
107  void CreateHistograms();
108 
110  const string& detName);
111 
112  void CreateTrackParamHistograms(ECbmModuleId detId, const string& detName);
113 
114  Bool_t fIsFixedBounds; // if true than fixed bounds are used for histograms
115 
116  Int_t fMvdMinNofHits; // Cut on minimum number of hits in track in MVD
117  Int_t fStsMinNofHits; // Cut on minimum number of hits in track in STS
118  Int_t fTrdMinNofHits; // Cut on minimum number of hits in track in TRD
119  Int_t fMuchMinNofHits; // Cut on minimum number of hits in track in MUCH
120 
121  string fOutputDir; // Output directory for images
122 
123  Double_t fPRangeMin; // Min momentum
124  Double_t fPRangeMax; // Max momentum
125  Int_t fPRangeBins; // Number of bins
126 
127  CbmHistManager* fHM; // Histogram manager
128 
129  // Data branches
130  TClonesArray* fGlobalTracks; // CbmGlobalTrack array
131  TClonesArray* fStsTracks; // CbmStsTrack array
132  TClonesArray* fStsTrackMatches; // CbmTrackMatchNew array
133  TClonesArray* fStsHits; // CbmStsHit
134  TClonesArray* fMvdHits; // CbmMvdHit
135  TClonesArray* fTrdTracks; // CbmTrdTrack array
136  TClonesArray* fTrdTrackMatches; // CbmTrackMatchNew array
137  TClonesArray* fTrdHits; // CbmTrdHit array
138  TClonesArray* fMuchTracks; // CbmStsTrack array
139  TClonesArray* fMuchTrackMatches; // CbmTrackMatchNew array
140  TClonesArray* fMuchPixelHits; // CbmMuchPixelHit array
141  TClonesArray* fMuchStripHits; // CbmMuchStripHit array
142  CbmMCDataArray* fMCTracks; // CbmMCTrack array
143  TClonesArray* fEvents;
144 
145  Double_t fQuota; // percent of correctly attached hits
146 
147  CbmVertex* fPrimVertex; // Pointer to the primary vertex
149  fKFFitter; // Pointer to the Kalman Filter Fitter algorithm
150 
151  CbmLitMCTrackCreator* fMCTrackCreator; // MC track creator tool
152 
153  CbmLitDetectorSetup fDet; // For detector setup determination
154 
157 
158  ClassDef(CbmLitFitQa, 1)
159 };
160 
161 #endif /* CBMLITFITQA_H_ */
CbmLitFitQa::fPRangeMax
Double_t fPRangeMax
Definition: CbmLitFitQa.h:124
CbmLitFitQa::fQuota
Double_t fQuota
Definition: CbmLitFitQa.h:145
CbmLitFitQa::CreateResidualAndPullHistograms
void CreateResidualAndPullHistograms(ECbmModuleId detId, const string &detName)
Definition: CbmLitFitQa.cxx:630
CbmLitFitQa::fMuchStripHits
TClonesArray * fMuchStripHits
Definition: CbmLitFitQa.h:141
CbmLitFitQa::SetPRange
void SetPRange(Int_t bins, Int_t min, Int_t max)
Definition: CbmLitFitQa.h:73
CbmLitFitQa::~CbmLitFitQa
virtual ~CbmLitFitQa()
Destructor.
Definition: CbmLitFitQa.cxx:66
CbmLitFitQa::ProcessGlobalTracks
void ProcessGlobalTracks()
Definition: CbmLitFitQa.cxx:144
CbmLitFitQa::fTrdMinNofHits
Int_t fTrdMinNofHits
Definition: CbmLitFitQa.h:118
CbmLitFitQa::operator=
CbmLitFitQa & operator=(const CbmLitFitQa &)
CbmLitFitQa::fMuchTrackMatches
TClonesArray * fMuchTrackMatches
Definition: CbmLitFitQa.h:139
CbmLitFitQa::fHM
CbmHistManager * fHM
Definition: CbmLitFitQa.h:127
CbmLitMCTrackCreator
Creates CbmLitMCTrack objects.
Definition: CbmLitMCTrackCreator.h:35
CbmLitFitQa::fStsTrackMatches
TClonesArray * fStsTrackMatches
Definition: CbmLitFitQa.h:132
CbmLitFitQa::fKFFitter
CbmStsKFTrackFitter fKFFitter
Definition: CbmLitFitQa.h:149
CbmLitFitQa::fGlobalTracks
TClonesArray * fGlobalTracks
Definition: CbmLitFitQa.h:130
CbmLitFitQa::fPRangeBins
Int_t fPRangeBins
Definition: CbmLitFitQa.h:125
CbmLitFitQa::fPRangeMin
Double_t fPRangeMin
Definition: CbmLitFitQa.h:123
CbmLitFitQa::SetOutputDir
void SetOutputDir(const string &dir)
Definition: CbmLitFitQa.h:70
ECbmModuleId
ECbmModuleId
Definition: CbmDefs.h:33
CbmMCDataArray
Access to a MC data branch for time-based analysis.
Definition: CbmMCDataArray.h:35
CbmLitDetectorSetup
Helper class to access detector presence.
Definition: CbmLitDetectorSetup.h:22
CbmLitFitQa::FillTrackParamHistogramm
void FillTrackParamHistogramm(const string &histName, const FairTrackParam *par)
Definition: CbmLitFitQa.cxx:417
CbmLitFitQa::fOutputDir
string fOutputDir
Definition: CbmLitFitQa.h:121
CbmLitFitQa::fTrdTracks
TClonesArray * fTrdTracks
Definition: CbmLitFitQa.h:135
min
friend F32vec4 min(const F32vec4 &a, const F32vec4 &b)
Definition: L1/vectors/P4_F32vec4.h:33
CbmLitFitQa::FillResidualsAndPulls
void FillResidualsAndPulls(const FairTrackParam *par, const CbmLitMCPoint *mcPoint, const string &histName, Float_t wrongPar, ECbmModuleId detId)
Definition: CbmLitFitQa.cxx:346
CbmLitFitQa::ProcessStsTrack
void ProcessStsTrack(Int_t trackId)
Definition: CbmLitFitQa.cxx:155
CbmLitFitQa::fTrdHits
TClonesArray * fTrdHits
Definition: CbmLitFitQa.h:137
CbmLitFitQa::ProcessTrackMomentumAtVertex
void ProcessTrackMomentumAtVertex()
Definition: CbmLitFitQa.cxx:483
CbmLitFitQa::fMCTracks
CbmMCDataArray * fMCTracks
Definition: CbmLitFitQa.h:142
CbmHistManager
Histogram manager.
Definition: CbmHistManager.h:41
CbmLitFitQa::fMvdMinNofHits
Int_t fMvdMinNofHits
Definition: CbmLitFitQa.h:116
CbmLitMCPoint
Monte-Carlo point.
Definition: CbmLitMCPoint.h:21
CbmLitFitQa::SetFixedBounds
void SetFixedBounds(Bool_t isFixedBounds)
Definition: CbmLitFitQa.h:71
CbmStsKFTrackFitter
Definition: CbmStsKFTrackFitter.h:14
CbmLitFitQa::fStsMinNofHits
Int_t fStsMinNofHits
Definition: CbmLitFitQa.h:117
CbmLitFitQa::ProcessTrdTrack
void ProcessTrdTrack(Int_t trackId)
Definition: CbmLitFitQa.cxx:231
CbmLitFitQa::ProcessMuchTrack
void ProcessMuchTrack(Int_t trackId)
Definition: CbmLitFitQa.cxx:284
CbmLitFitQa::fDet
CbmLitDetectorSetup fDet
Definition: CbmLitFitQa.h:153
CbmLitFitQa::CreateHistograms
void CreateHistograms()
Definition: CbmLitFitQa.cxx:544
CbmLitFitQa::SetMuchMinNofHits
void SetMuchMinNofHits(Int_t minNofHits)
Definition: CbmLitFitQa.h:69
CbmVertex
Definition: CbmVertex.h:26
CbmLitFitQa::Exec
virtual void Exec(Option_t *opt)
Inherited from FairTask.
Definition: CbmLitFitQa.cxx:80
CbmLitFitQa
Track fit QA for track reconstruction.
Definition: CbmLitFitQa.h:38
CbmLitFitQa::fMuchMinNofHits
Int_t fMuchMinNofHits
Definition: CbmLitFitQa.h:119
CbmLitFitQa::fTrdTrackMatches
TClonesArray * fTrdTrackMatches
Definition: CbmLitFitQa.h:136
CbmLitFitQa::fMvdHits
TClonesArray * fMvdHits
Definition: CbmLitFitQa.h:134
CbmLitFitQa::CreateTrackParamHistograms
void CreateTrackParamHistograms(ECbmModuleId detId, const string &detName)
Definition: CbmLitFitQa.cxx:711
CbmLitFitQa::CbmLitFitQa
CbmLitFitQa()
Constructor.
Definition: CbmLitFitQa.cxx:35
CbmLitFitQa::CbmLitFitQa
CbmLitFitQa(const CbmLitFitQa &)
CbmLitFitQa::Init
virtual InitStatus Init()
Inherited from FairTask.
Definition: CbmLitFitQa.cxx:70
CbmLitFitQa::fPrimVertex
CbmVertex * fPrimVertex
Definition: CbmLitFitQa.h:147
CbmLitFitQa::ProcessTrackParamsAtVertex
void ProcessTrackParamsAtVertex()
Definition: CbmLitFitQa.cxx:433
CbmLitFitQa::fEvents
TClonesArray * fEvents
Definition: CbmLitFitQa.h:143
CbmLitFitQa::fMCTrackCreator
CbmLitMCTrackCreator * fMCTrackCreator
Definition: CbmLitFitQa.h:151
CbmLitFitQa::SetMvdMinNofHits
void SetMvdMinNofHits(Int_t minNofHits)
Definition: CbmLitFitQa.h:66
CbmLitFitQa::fMuchPixelHits
TClonesArray * fMuchPixelHits
Definition: CbmLitFitQa.h:140
CbmLitFitQa::fMuchTracks
TClonesArray * fMuchTracks
Definition: CbmLitFitQa.h:138
CbmLitFitQa::ReadDataBranches
void ReadDataBranches()
Reads data branches.
Definition: CbmLitFitQa.cxx:105
CbmLitFitQa::fStsHits
TClonesArray * fStsHits
Definition: CbmLitFitQa.h:133
CbmEvent
Class characterising one event by a collection of links (indices) to data objects,...
Definition: CbmEvent.h:30
CbmLitFitQa::fStsTracks
TClonesArray * fStsTracks
Definition: CbmLitFitQa.h:131
CbmLitFitQa::fIsFixedBounds
Bool_t fIsFixedBounds
Definition: CbmLitFitQa.h:114
CbmLitFitQa::SetStsMinNofHits
void SetStsMinNofHits(Int_t minNofHits)
Definition: CbmLitFitQa.h:67
max
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
Definition: L1/vectors/P4_F32vec4.h:36
CbmStsKFTrackFitter.h
CbmLitFitQa::SetTrdMinNofHits
void SetTrdMinNofHits(Int_t minNofHits)
Definition: CbmLitFitQa.h:68
CbmLitDetectorSetup.h
Helper class to access detector presence.
CbmLitFitQa::Finish
virtual void Finish()
Inherited from FairTask.
Definition: CbmLitFitQa.cxx:90
CbmDefs.h