CbmRoot
qa/CbmRichRecoQa.h
Go to the documentation of this file.
1 
2 #ifndef CBM_RICH_RECO_QA
3 #define CBM_RICH_RECO_QA
4 
5 #include "FairTask.h"
6 class TClonesArray;
7 class CbmRichRing;
8 class TCanvas;
9 class CbmHistManager;
10 class TH1D;
11 class TH2D;
12 class TH2;
13 class TH3;
14 class CbmMCTrack;
15 class CbmDigiManager;
16 
17 #include <map>
18 #include <vector>
19 
20 using namespace std;
21 
22 class CbmRichRecoQa : public FairTask {
23 
24 public:
29 
33  virtual ~CbmRichRecoQa() {}
34 
38  virtual InitStatus Init();
39 
43  virtual void Exec(Option_t* option);
44 
48  virtual void Finish();
49 
50  static Bool_t IsMcPrimaryElectron(const CbmMCTrack* mctrack);
51 
52  static Bool_t IsMcPion(const CbmMCTrack* mctrack);
53 
58  void SetOutputDir(const string& dir) { fOutputDir = dir; }
59 
63  void DrawFromFile(const string& fileName, const string& outputDir);
64 
65 private:
70 
75 
80 
85 
89  void DrawHist();
90 
94  string GetMeanRmsOverflowString(TH1* h, Bool_t withOverflow = true);
95 
99  void DrawRingTrackDistHistWithSuffix(const string& suffix);
100 
101  /*
102  * \brief Check that the ring with an input MCTrackId was found
103  */
104  bool WasRingFound(Int_t mcTrackId);
105 
106  /*
107  * \brief Check that the ring was matched with some global track
108  */
109  bool WasRingMatched(Int_t mcTrackId);
110 
111  /*
112  * \brief Check that the Sts track projection was matched with RICH ring
113  */
114  bool WasRichProjectionMatched(Int_t stsTrackId);
115 
116  /*
117  * Check that STS track has projection in the RICH
118  */
119  bool HasRichProjection(Int_t stsTrackId);
120 
121 
126 
131 
132 
133  CbmHistManager* fHM;
134 
135  Int_t fEventNum;
136 
137  string fOutputDir; // output dir for results
138 
139  TClonesArray* fMCTracks;
140  TClonesArray* fRichPoints;
141  TClonesArray* fRichHits;
142  TClonesArray* fRichRings;
143  TClonesArray* fRichRingMatches;
144  TClonesArray* fGlobalTracks;
145  TClonesArray* fStsTracks;
146  TClonesArray* fStsTrackMatches;
147  TClonesArray* fRichProjections;
149 
150  // Number of hits in the MC RICH ring
151  std::map<Int_t, Int_t> fNofHitsInRingMap;
152 
153  vector<TCanvas*> fCanvas;
154 
155  ClassDef(CbmRichRecoQa, 1)
156 };
157 
158 #endif
CbmRichRecoQa::WasRingMatched
bool WasRingMatched(Int_t mcTrackId)
h
Generates beam ions for transport simulation.
Definition: CbmBeamGenerator.h:17
CbmRichRecoQa::Init
virtual InitStatus Init()
Inherited from FairTask.
CbmRichRecoQa::WasRichProjectionMatched
bool WasRichProjectionMatched(Int_t stsTrackId)
CbmRichRecoQa::operator=
CbmRichRecoQa & operator=(const CbmRichRecoQa &)
Assignment operator.
CbmRichRecoQa::~CbmRichRecoQa
virtual ~CbmRichRecoQa()
Standard destructor.
Definition: qa/CbmRichRecoQa.h:33
CbmRichRing
Definition: CbmRichRing.h:17
CbmRichRecoQa
Definition: alignment/CbmRichRecoQa.h:21
CbmRichRecoQa::FillRichRingNofHits
void FillRichRingNofHits()
Fill map mcTrackId -> nof RICH hits.
CbmRichRecoQa::CbmRichRecoQa
CbmRichRecoQa(const CbmRichRecoQa &)
Copy constructor.
CbmHistManager
Histogram manager.
Definition: CbmHistManager.h:41
CbmRichRecoQa::DrawFromFile
void DrawFromFile(const string &fileName, const string &outputDir)
Draw histogram from file.
CbmRichRecoQa::Exec
virtual void Exec(Option_t *option)
Inherited from FairTask.
CbmRichRecoQa::WasRingFound
bool WasRingFound(Int_t mcTrackId)
CbmRichRecoQa::SetOutputDir
void SetOutputDir(const string &dir)
Set output directory where you want to write results (figures and json).
Definition: qa/CbmRichRecoQa.h:58
CbmRichRecoQa::Finish
virtual void Finish()
Inherited from FairTask.
CbmRichRecoQa::GetMeanRmsOverflowString
string GetMeanRmsOverflowString(TH1 *h, Bool_t withOverflow=true)
Return string with mean, RMS and overflow percent for input TH1.
CbmRichRecoQa::DrawHist
void DrawHist()
Draw histograms.
CbmDigiManager
CbmDigiManager.
Definition: CbmDigiManager.h:37
CbmRichRecoQa::CbmRichRecoQa
CbmRichRecoQa()
Standard constructor.
CbmRichRecoQa::InitHistograms
void InitHistograms()
Initialize histograms.
CbmRichRecoQa::FillRingTrackDistance
void FillRingTrackDistance()
Fill histogramms related to ring track distance.
CbmRichRecoQa::RingTrackMismatchSource
void RingTrackMismatchSource()
Fill histograms related to study of the source of ring-track mismatch.
CbmRichRecoQa::DrawRingTrackDistHistWithSuffix
void DrawRingTrackDistHistWithSuffix(const string &suffix)
Draw histograms related to ring-track distance for pions or electrons (+/-).
CbmMCTrack
Definition: CbmMCTrack.h:34
CbmRichRecoQa::fDigiMan
CbmDigiManager * fDigiMan
Definition: qa/CbmRichRecoQa.h:148
CbmRichRecoQa::IsMcPion
static Bool_t IsMcPion(const CbmMCTrack *mctrack)
CbmRichRecoQa::IsMcPrimaryElectron
static Bool_t IsMcPrimaryElectron(const CbmMCTrack *mctrack)
CbmRichRecoQa::HasRichProjection
bool HasRichProjection(Int_t stsTrackId)