CbmRoot
Loading...
Searching...
No Matches
CbmLitTofQa.h
Go to the documentation of this file.
1/* Copyright (C) 2013-2018 GSI/JINR-LIT, Darmstadt/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Andrey Lebedev [committer] */
4
12#ifndef CBMLITTOFQA_H_
13#define CBMLITTOFQA_H_
14
15#include "FairTask.h"
16
17#include <map>
18#include <set>
19#include <string>
20#include <vector>
21
22class CbmHistManager;
23class CbmVertex;
24class FairTrackParam;
25class CbmMCDataArray;
26class TClonesArray;
27
28using std::map;
29using std::pair;
30using std::set;
31using std::string;
32using std::vector;
33
40class CbmLitTofQa : public FairTask {
41 public:
46
50 virtual ~CbmLitTofQa();
51
55 virtual InitStatus Init();
56
60 virtual void Exec(Option_t* opt);
61
65 virtual void Finish();
66
67 /* Setters */
68 void SetOutputDir(const string& dir) { fOutputDir = dir; }
69
73 void SetPRange(Int_t bins, Int_t min, Int_t max)
74 {
75 fPRangeBins = bins;
78 }
79
80 private:
84 void ReadDataBranches();
85
90
94 void CreateHistograms();
95
96 void ProcessMC(Int_t iEvent);
97
99
100 void ProcessTofHits();
101
102 void ProcessTofTracks();
103
104 void FitHistograms();
105
108
109 Bool_t fIsFixedBounds; // if true than fixed bounds are used for histograms
110
111 string fOutputDir; // Output directory for images
112
113 Double_t fPRangeMin; // Min momentum
114 Double_t fPRangeMax; // Max momentum
115 Int_t fPRangeBins; // Number of bins
116
117 CbmHistManager* fHM; // Histogram manager
118
119 // Data branches
120 TClonesArray* fGlobalTracks; // CbmGlobalTrack array
121 TClonesArray* fStsTracks; // CbmStsTrack array
122 TClonesArray* fStsTrackMatches; // CbmTrackMatchNew array
123 TClonesArray* fTofHits; // CbmTofHit array
124 CbmMCDataArray* fTofPoints; // CbmTofPoint array
125 TClonesArray* fTofHitsMatches;
126 TClonesArray* fTofTracks; // CbmTofTrack array
127 CbmMCDataArray* fMCTracks; // CbmMCTrack array
128
129 CbmVertex* fPrimVertex; // Pointer to the primary vertex
130
131 vector<string> fTrackCategories; // Vector of track category names
132
133
134 //#ifndef __ROOTCLING__
135 typedef Bool_t (*LitTrackAcceptanceFunction)(CbmMCDataArray* mcTracks, Int_t eventNo, Int_t index);
136 map<string, LitTrackAcceptanceFunction>
137 fTrackAcceptanceFunctions; // maps track category name to track acceptance function
138 //#endif
139
140 set<pair<Int_t, Int_t>> fMCTrackIdForTofHits; // Set of MC track IDs for all existing TOF hits
141 set<pair<Int_t, Int_t>> fMCTrackIdForTofPoints; // Set of MC track IDs for all existing TOF points
142
143 ClassDef(CbmLitTofQa, 1)
144};
145
146#endif /* CBMLITTOFQA_H_ */
static vector< vector< QAMCTrack > > mcTracks
friend fscal max(fscal x, fscal y)
friend fscal min(fscal x, fscal y)
Histogram manager.
Task for TOF QA.
Definition CbmLitTofQa.h:40
void FitHistograms()
void ProcessTofHits()
virtual ~CbmLitTofQa()
Destructor.
CbmMCDataArray * fTofPoints
Double_t fPRangeMax
TClonesArray * fStsTracks
Bool_t fIsFixedBounds
CbmLitTofQa(const CbmLitTofQa &)
virtual void Finish()
Inherited from FairTask.
void SetOutputDir(const string &dir)
Definition CbmLitTofQa.h:68
Int_t fPRangeBins
void FillTrackCategoriesAndAcceptanceFunctions()
Assign default track categories and track acceptance functions.
void ProcessMC(Int_t iEvent)
set< pair< Int_t, Int_t > > fMCTrackIdForTofHits
string fOutputDir
TClonesArray * fTofTracks
Double_t fPRangeMin
set< pair< Int_t, Int_t > > fMCTrackIdForTofPoints
virtual void Exec(Option_t *opt)
Inherited from FairTask.
CbmMCDataArray * fMCTracks
CbmLitTofQa()
Constructor.
void ReadDataBranches()
Reads data branches.
CbmVertex * fPrimVertex
void ProcessGlobalTracks()
TClonesArray * fTofHits
CbmLitTofQa & operator=(const CbmLitTofQa &)
TClonesArray * fStsTrackMatches
TClonesArray * fGlobalTracks
vector< string > fTrackCategories
void CreateHistograms()
Creates histograms.
TClonesArray * fTofHitsMatches
map< string, LitTrackAcceptanceFunction > fTrackAcceptanceFunctions
CbmHistManager * fHM
Bool_t(*) LitTrackAcceptanceFunction(CbmMCDataArray *mcTracks, Int_t eventNo, Int_t index)
void SetPRange(Int_t bins, Int_t min, Int_t max)
Set momentum range and number of bins for histograms.
Definition CbmLitTofQa.h:73
void ProcessTofTracks()
virtual InitStatus Init()
Inherited from FairTask.
Access to a MC data branch for time-based analysis.