CbmRoot
CbmLitTofQa.h
Go to the documentation of this file.
1 
8 #ifndef CBMLITTOFQA_H_
9 #define CBMLITTOFQA_H_
10 
11 #include "CbmStsKFTrackFitter.h"
12 #include "FairTask.h"
13 #include <map>
14 #include <set>
15 #include <string>
16 #include <vector>
17 
18 class CbmHistManager;
19 class CbmVertex;
20 class FairTrackParam;
21 class CbmMCDataArray;
22 
23 using std::map;
24 using std::pair;
25 using std::set;
26 using std::string;
27 using std::vector;
28 
35 class CbmLitTofQa : public FairTask {
36 public:
40  CbmLitTofQa();
41 
45  virtual ~CbmLitTofQa();
46 
50  virtual InitStatus Init();
51 
55  virtual void Exec(Option_t* opt);
56 
60  virtual void Finish();
61 
62  /* Setters */
63  void SetOutputDir(const string& dir) { fOutputDir = dir; }
64 
68  void SetPRange(Int_t bins, Int_t min, Int_t max) {
69  fPRangeBins = bins;
70  fPRangeMin = min;
71  fPRangeMax = max;
72  }
73 
74 private:
78  void ReadDataBranches();
79 
84 
88  void CreateHistograms();
89 
90  void ProcessMC(Int_t iEvent);
91 
92  void ProcessGlobalTracks();
93 
94  void ProcessTofHits();
95 
96  void ProcessTofTracks();
97 
98  void FitHistograms();
99 
102 
103  Bool_t fIsFixedBounds; // if true than fixed bounds are used for histograms
104 
105  string fOutputDir; // Output directory for images
106 
107  Double_t fPRangeMin; // Min momentum
108  Double_t fPRangeMax; // Max momentum
109  Int_t fPRangeBins; // Number of bins
110 
111  CbmHistManager* fHM; // Histogram manager
112 
113  // Data branches
114  TClonesArray* fGlobalTracks; // CbmGlobalTrack array
115  TClonesArray* fStsTracks; // CbmStsTrack array
116  TClonesArray* fStsTrackMatches; // CbmTrackMatchNew array
117  TClonesArray* fTofHits; // CbmTofHit array
118  CbmMCDataArray* fTofPoints; // CbmTofPoint array
119  TClonesArray* fTofHitsMatches;
120  TClonesArray* fTofTracks; // CbmTofTrack array
121  CbmMCDataArray* fMCTracks; // CbmMCTrack array
122 
123  CbmVertex* fPrimVertex; // Pointer to the primary vertex
125  fKFFitter; // Pointer to the Kalman Filter Fitter algorithm
126 
127  vector<string> fTrackCategories; // Vector of track category names
128 
129 
130  //#ifndef __ROOTCLING__
132  Int_t eventNo,
133  Int_t index);
134  map<string, LitTrackAcceptanceFunction>
135  fTrackAcceptanceFunctions; // maps track category name to track acceptance function
136  //#endif
137 
138  set<pair<Int_t, Int_t>>
139  fMCTrackIdForTofHits; // Set of MC track IDs for all existing TOF hits
140  set<pair<Int_t, Int_t>>
141  fMCTrackIdForTofPoints; // Set of MC track IDs for all existing TOF points
142 
143  ClassDef(CbmLitTofQa, 1)
144 };
145 
146 #endif /* CBMLITTOFQA_H_ */
CbmLitTofQa::ProcessMC
void ProcessMC(Int_t iEvent)
Definition: CbmLitTofQa.cxx:279
CbmLitTofQa::Init
virtual InitStatus Init()
Inherited from FairTask.
Definition: CbmLitTofQa.cxx:66
CbmLitTofQa::fMCTrackIdForTofHits
set< pair< Int_t, Int_t > > fMCTrackIdForTofHits
Definition: CbmLitTofQa.h:139
CbmLitTofQa::ProcessTofTracks
void ProcessTofTracks()
Definition: CbmLitTofQa.cxx:431
CbmLitTofQa::fStsTrackMatches
TClonesArray * fStsTrackMatches
Definition: CbmLitTofQa.h:116
CbmLitTofQa::fStsTracks
TClonesArray * fStsTracks
Definition: CbmLitTofQa.h:115
CbmLitTofQa::SetOutputDir
void SetOutputDir(const string &dir)
Definition: CbmLitTofQa.h:63
CbmLitTofQa::fPRangeMax
Double_t fPRangeMax
Definition: CbmLitTofQa.h:108
CbmLitTofQa::fPRangeMin
Double_t fPRangeMin
Definition: CbmLitTofQa.h:107
CbmLitTofQa::fTofHitsMatches
TClonesArray * fTofHitsMatches
Definition: CbmLitTofQa.h:119
CbmMCDataArray
Access to a MC data branch for time-based analysis.
Definition: CbmMCDataArray.h:35
CbmLitTofQa::fTofTracks
TClonesArray * fTofTracks
Definition: CbmLitTofQa.h:120
CbmLitTofQa::fGlobalTracks
TClonesArray * fGlobalTracks
Definition: CbmLitTofQa.h:114
CbmLitTofQa
Task for TOF QA.
Definition: CbmLitTofQa.h:35
min
friend F32vec4 min(const F32vec4 &a, const F32vec4 &b)
Definition: L1/vectors/P4_F32vec4.h:33
CbmLitTofQa::fTrackCategories
vector< string > fTrackCategories
Definition: CbmLitTofQa.h:127
CbmLitTofQa::ProcessTofHits
void ProcessTofHits()
Definition: CbmLitTofQa.cxx:414
CbmLitTofQa::fHM
CbmHistManager * fHM
Definition: CbmLitTofQa.h:111
CbmLitTofQa::CbmLitTofQa
CbmLitTofQa(const CbmLitTofQa &)
CbmLitTofQa::Finish
virtual void Finish()
Inherited from FairTask.
Definition: CbmLitTofQa.cxx:84
CbmLitTofQa::fPRangeBins
Int_t fPRangeBins
Definition: CbmLitTofQa.h:109
CbmHistManager
Histogram manager.
Definition: CbmHistManager.h:41
CbmLitTofQa::fMCTrackIdForTofPoints
set< pair< Int_t, Int_t > > fMCTrackIdForTofPoints
Definition: CbmLitTofQa.h:141
CbmLitTofQa::ProcessGlobalTracks
void ProcessGlobalTracks()
Definition: CbmLitTofQa.cxx:305
CbmStsKFTrackFitter
Definition: CbmStsKFTrackFitter.h:14
CbmLitTofQa::operator=
CbmLitTofQa & operator=(const CbmLitTofQa &)
mcTracks
static vector< vector< QAMCTrack > > mcTracks
Definition: CbmTofHitFinderTBQA.cxx:112
CbmLitTofQa::fTrackAcceptanceFunctions
map< string, LitTrackAcceptanceFunction > fTrackAcceptanceFunctions
Definition: CbmLitTofQa.h:135
CbmLitTofQa::fOutputDir
string fOutputDir
Definition: CbmLitTofQa.h:105
CbmLitTofQa::fPrimVertex
CbmVertex * fPrimVertex
Definition: CbmLitTofQa.h:123
CbmVertex
Definition: CbmVertex.h:26
CbmLitTofQa::SetPRange
void SetPRange(Int_t bins, Int_t min, Int_t max)
Set momentum range and number of bins for histograms.
Definition: CbmLitTofQa.h:68
CbmLitTofQa::ReadDataBranches
void ReadDataBranches()
Reads data branches.
Definition: CbmLitTofQa.cxx:100
CbmLitTofQa::LitTrackAcceptanceFunction
Bool_t(* LitTrackAcceptanceFunction)(CbmMCDataArray *mcTracks, Int_t eventNo, Int_t index)
Definition: CbmLitTofQa.h:131
CbmLitTofQa::FillTrackCategoriesAndAcceptanceFunctions
void FillTrackCategoriesAndAcceptanceFunctions()
Assign default track categories and track acceptance functions.
Definition: CbmLitTofQa.cxx:128
CbmLitTofQa::~CbmLitTofQa
virtual ~CbmLitTofQa()
Destructor.
Definition: CbmLitTofQa.cxx:62
CbmLitTofQa::CreateHistograms
void CreateHistograms()
Creates histograms.
Definition: CbmLitTofQa.cxx:166
CbmLitTofQa::fTofPoints
CbmMCDataArray * fTofPoints
Definition: CbmLitTofQa.h:118
CbmLitTofQa::fMCTracks
CbmMCDataArray * fMCTracks
Definition: CbmLitTofQa.h:121
CbmLitTofQa::Exec
virtual void Exec(Option_t *opt)
Inherited from FairTask.
Definition: CbmLitTofQa.cxx:74
CbmLitTofQa::fIsFixedBounds
Bool_t fIsFixedBounds
Definition: CbmLitTofQa.h:103
CbmLitTofQa::fTofHits
TClonesArray * fTofHits
Definition: CbmLitTofQa.h:117
max
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
Definition: L1/vectors/P4_F32vec4.h:36
CbmLitTofQa::fKFFitter
CbmStsKFTrackFitter fKFFitter
Definition: CbmLitTofQa.h:125
CbmLitTofQa::CbmLitTofQa
CbmLitTofQa()
Constructor.
Definition: CbmLitTofQa.cxx:38
CbmStsKFTrackFitter.h
CbmLitTofQa::FitHistograms
void FitHistograms()
Definition: CbmLitTofQa.cxx:478