CbmRoot
CbmRichRecoTbQa.h
Go to the documentation of this file.
1 
2 #ifndef CBM_RICH_RECO_TB_QA
3 #define CBM_RICH_RECO_TB_QA
4 
5 #include "FairTask.h"
6 class CbmMCDataArray;
7 class TClonesArray;
8 class CbmHistManager;
9 class CbmRichPoint;
10 class CbmMCTrack;
11 class CbmMCEventList;
12 class CbmDigiManager;
13 
14 #include <map>
15 #include <vector>
16 
17 using namespace std;
18 
19 class CbmRichRecoTbQa : public FairTask {
20 
21 public:
26 
30  virtual ~CbmRichRecoTbQa() {}
31 
35  virtual InitStatus Init();
36 
40  virtual void Exec(Option_t* option);
41 
45  virtual void Finish();
46 
47 
52  void SetOutputDir(const string& dir) { fOutputDir = dir; }
53 
57  void DrawFromFile(const string& fileName, const string& outputDir);
58 
59 private:
63  void InitHistograms();
64 
65  void DrawHist();
66 
67  void Process();
68 
69  void ProcessMc();
70 
71  void RingRecoEfficiency();
72 
73  Int_t GetNofPrimaryMcTracks(Int_t iEv);
74 
75  Bool_t
76  IsCherenkovPhoton(const CbmRichPoint* point, Int_t fileId, Int_t eventId);
77 
78  Bool_t IsCherenkovPhotonFromPrimaryElectron(const CbmRichPoint* point,
79  Int_t fileId,
80  Int_t eventId);
81 
82  Bool_t IsCherenkovPhotonFromSecondaryElectron(const CbmRichPoint* point,
83  Int_t fileId,
84  Int_t eventId);
85 
86  Bool_t IsMcPrimaryElectron(const CbmMCTrack* mctrack);
87 
88  Bool_t IsCherenkovPhotonFromPion(const CbmRichPoint* point,
89  Int_t fileId,
90  Int_t eventId);
91 
92  Bool_t IsMcPion(const CbmMCTrack* mctrack);
93 
94  void DrawTimeLog(const string& hMainName,
95  Int_t nofLogEvents,
96  bool withNoise = false);
97 
102 
107 
108 
110 
112 
114  string fOutputDir; // output dir for results
115 
120  TClonesArray* fRichHits;
121  TClonesArray* fRichRings;
122  TClonesArray* fRichRingMatches;
124 
125  vector<pair<Int_t, Int_t>> fRecRings;
126 
127  ClassDef(CbmRichRecoTbQa, 1)
128 };
129 
130 #endif
CbmRichRecoTbQa::~CbmRichRecoTbQa
virtual ~CbmRichRecoTbQa()
Standard destructor.
Definition: CbmRichRecoTbQa.h:30
CbmRichRecoTbQa::fHM
CbmHistManager * fHM
Definition: CbmRichRecoTbQa.h:109
CbmRichRecoTbQa::fMCTracks
CbmMCDataArray * fMCTracks
Definition: CbmRichRecoTbQa.h:116
CbmRichRecoTbQa::fRichHits
TClonesArray * fRichHits
Definition: CbmRichRecoTbQa.h:120
CbmMCDataArray
Access to a MC data branch for time-based analysis.
Definition: CbmMCDataArray.h:35
CbmRichRecoTbQa::fNofLogEvents
Int_t fNofLogEvents
Definition: CbmRichRecoTbQa.h:113
CbmHistManager
Histogram manager.
Definition: CbmHistManager.h:41
CbmRichRecoTbQa::fTimeSliceNum
Int_t fTimeSliceNum
Definition: CbmRichRecoTbQa.h:111
CbmRichRecoTbQa::SetOutputDir
void SetOutputDir(const string &dir)
Set output directory where you want to write results (figures and json).
Definition: CbmRichRecoTbQa.h:52
CbmRichRecoTbQa::fEventList
CbmMCEventList * fEventList
Definition: CbmRichRecoTbQa.h:123
CbmRichRecoTbQa::CbmRichRecoTbQa
CbmRichRecoTbQa(const CbmRichRecoTbQa &)
Copy constructor.
CbmDigiManager
CbmDigiManager.
Definition: CbmDigiManager.h:37
CbmMCEventList
Container class for MC events with number, file and start time.
Definition: CbmMCEventList.h:38
CbmRichRecoTbQa::fRichRings
TClonesArray * fRichRings
Definition: CbmRichRecoTbQa.h:121
CbmRichRecoTbQa::fStsPoints
CbmMCDataArray * fStsPoints
Definition: CbmRichRecoTbQa.h:118
CbmRichRecoTbQa::fDigiMan
CbmDigiManager * fDigiMan
Definition: CbmRichRecoTbQa.h:119
CbmMCTrack
Definition: CbmMCTrack.h:34
CbmRichRecoTbQa
Definition: CbmRichRecoTbQa.h:19
CbmRichRecoTbQa::operator=
CbmRichRecoTbQa & operator=(const CbmRichRecoTbQa &)
Assignment operator.
CbmRichRecoTbQa::fRecRings
vector< pair< Int_t, Int_t > > fRecRings
Definition: CbmRichRecoTbQa.h:125
CbmRichPoint
Definition: CbmRichPoint.h:24
CbmRichRecoTbQa::fRichRingMatches
TClonesArray * fRichRingMatches
Definition: CbmRichRecoTbQa.h:122
CbmRichRecoTbQa::fRichPoints
CbmMCDataArray * fRichPoints
Definition: CbmRichRecoTbQa.h:117
CbmRichRecoTbQa::fOutputDir
string fOutputDir
Definition: CbmRichRecoTbQa.h:114
CbmRichRecoTbQa::DrawFromFile
void DrawFromFile(const string &fileName, const string &outputDir)
Draw histogram from file.