CbmRoot
Loading...
Searching...
No Matches
alignment/CbmRichRecoQa.h
Go to the documentation of this file.
1/* Copyright (C) 2017 Justus-Liebig-Universitaet Giessen, Giessen
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Jordan Bendarouach [committer] */
4
5#ifndef CBM_RICH_RECO_QA
6#define CBM_RICH_RECO_QA
7
8#include "FairTask.h"
9class TClonesArray;
10class CbmRichRing;
11class TCanvas;
12class CbmHistManager;
13class TH1D;
14class TH2D;
15class TH2;
16class TH3;
17class CbmMCTrack;
18
19#include <map>
20#include <vector>
21
22using namespace std;
23
24class CbmRichRecoQa : public FairTask {
25
26 public:
31
35 virtual ~CbmRichRecoQa() {}
36
40 virtual InitStatus Init();
41
45 virtual void Exec(Option_t* option);
46
50 virtual void Finish();
51
52 static Bool_t IsMcPrimaryElectron(const CbmMCTrack* mctrack);
53
54 static Bool_t IsMcPion(const CbmMCTrack* mctrack);
55
60 void SetOutputDir(const string& dir) { fOutputDir = dir; }
61
65 void DrawFromFile(const string& fileName, const string& outputDir);
66
67 void SetCorrection(string s) { fCorrection = s; }
68
69 private:
73 void InitHistograms();
74
79
84
89
93 void DrawHist();
94
98 string GetMeanRmsOverflowString(TH1* h, Bool_t withOverflow = true);
99
103 void DrawRingTrackDistHistWithSuffix(const string& suffix);
104
105 void DrawRingTrackDistHistWithSuffixPmtHalf(const string& suffix);
106
107 /*
108 * \brief Check that the ring with an input MCTrackId was found
109 */
110 bool WasRingFound(Int_t mcTrackId);
111
112 /*
113 * \brief Check that the ring was matched with some global track
114 */
115 bool WasRingMatched(Int_t mcTrackId);
116
117 /*
118 * \brief Check that the Sts track projection was matched with RICH ring
119 */
120 bool WasRichProjectionMatched(Int_t stsTrackId);
121
122 /*
123 * Check that STS track has projection in the RICH
124 */
125 bool HasRichProjection(Int_t stsTrackId);
126
127
132
137
138
140
142
143 string fOutputDir; // output dir for results
144
145 TClonesArray* fMCTracks;
146 TClonesArray* fRichPoints;
147 TClonesArray* fRichDigis;
148 TClonesArray* fRichHits;
149 TClonesArray* fRichRings;
150 TClonesArray* fRichRingMatches;
151 TClonesArray* fGlobalTracks;
152 TClonesArray* fStsTracks;
153 TClonesArray* fStsTrackMatches;
154 TClonesArray* fRichProjections;
155
156 // Number of hits in the MC RICH ring
157 std::map<Int_t, Int_t> fNofHitsInRingMap;
158
159 string fCorrection; // Is correction on or not
160
161 vector<TCanvas*> fCanvas;
162
163 ClassDef(CbmRichRecoQa, 1)
164};
165
166#endif
Histogram manager.
TClonesArray * fRichProjections
void RingTrackMismatchSource()
Fill histograms related to study of the source of ring-track mismatch.
virtual ~CbmRichRecoQa()
Standard destructor.
void DrawRingTrackDistHistWithSuffix(const string &suffix)
Draw histograms related to ring-track distance for pions or electrons (+/-).
bool WasRichProjectionMatched(Int_t stsTrackId)
TClonesArray * fGlobalTracks
std::map< Int_t, Int_t > fNofHitsInRingMap
TClonesArray * fRichDigis
void FillRingTrackDistance()
Fill histogramms related to ring track distance.
void InitHistograms()
Initialize histograms.
string GetMeanRmsOverflowString(TH1 *h, Bool_t withOverflow=true)
Return string with mean, RMS and overflow percent for input TH1.
void SetCorrection(string s)
static Bool_t IsMcPrimaryElectron(const CbmMCTrack *mctrack)
TClonesArray * fRichRings
virtual InitStatus Init()
Inherited from FairTask.
void SetOutputDir(const string &dir)
Set output directory where you want to write results (figures and json).
bool HasRichProjection(Int_t stsTrackId)
void DrawRingTrackDistHistWithSuffixPmtHalf(const string &suffix)
bool WasRingMatched(Int_t mcTrackId)
TClonesArray * fRichRingMatches
void DrawFromFile(const string &fileName, const string &outputDir)
Draw histogram from file.
TClonesArray * fStsTracks
TClonesArray * fStsTrackMatches
CbmRichRecoQa(const CbmRichRecoQa &)
Copy constructor.
bool WasRingFound(Int_t mcTrackId)
static Bool_t IsMcPion(const CbmMCTrack *mctrack)
vector< TCanvas * > fCanvas
TClonesArray * fRichPoints
void DrawHist()
Draw histograms.
virtual void Exec(Option_t *option)
Inherited from FairTask.
CbmRichRecoQa()
Standard constructor.
virtual void Finish()
Inherited from FairTask.
void FillRichRingNofHits()
Fill map mcTrackId -> nof RICH hits.
CbmRichRecoQa & operator=(const CbmRichRecoQa &)
Assignment operator.
Data class with information on a STS local track.
Hash for CbmL1LinkKey.