CbmRoot
Loading...
Searching...
No Matches
qa/CbmRichRecoQa.h
Go to the documentation of this file.
1/* Copyright (C) 2016-2024 GSI/JINR-LIT, Darmstadt/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Andrey Lebedev [committer], Semen Lebedev, Martin Beyer */
4
5#ifndef CBM_RICH_RECO_QA
6#define CBM_RICH_RECO_QA
7
8#include "FairTask.h"
9class TClonesArray;
10class CbmMCDataArray;
11class CbmRichRing;
12class CbmHistManager;
13class TH1D;
14class TH2D;
15class TH1;
16class TH2;
17class TH3;
18class CbmMCTrack;
19class CbmDigiManager;
20class CbmMCEventList;
21class CbmLink;
22
23#include <map>
24#include <vector>
25
26class CbmRichRecoQa : public FairTask {
27
28 public:
33
37 virtual ~CbmRichRecoQa() {}
38
42 virtual InitStatus Init();
43
47 virtual void Exec(Option_t* option);
48
52 virtual void Finish();
53
54 static bool IsMcPrimaryElectron(const CbmMCTrack* mctrack);
55
56 static bool IsMcPion(const CbmMCTrack* mctrack);
57
62 void SetOutputDir(const std::string& dir) { fOutputDir = dir; }
63
67 void DrawFromFile(const std::string& fileName, const std::string& outputDir);
68
69 private:
74
79
84
89
93 void DrawMismatchSrc();
94
98 void DrawHist();
99
103 std::string GetMeanRmsOverflowString(TH1* h, bool withOverflow = true);
104
108 void DrawRingTrackDist(const std::string& opt);
109
110 /*
111 * \brief Check that the ring with an input MCTrackId was found
112 */
113 bool WasRingFound(const CbmLink& mcTrackLink);
114
115 /*
116 * \brief Check that the ring was matched with some global track
117 */
118 bool WasRingMatched(const CbmLink& mcTrackLink);
119
120 /*
121 * \brief Check that the Sts track projection was matched with RICH ring
122 */
123 bool WasRichProjectionMatched(int stsTrackId);
124
125 /*
126 * Check that STS track has projection in the RICH
127 */
128 bool HasRichProjection(int stsTrackId);
129
130
135
140
141
142 CbmHistManager* fHM = nullptr;
143
144 int fEventNum = 0;
145
146 std::string fOutputDir = ""; // output dir for results
147
150 TClonesArray* fRichHits = nullptr;
151 TClonesArray* fRichRings = nullptr;
152 TClonesArray* fRichRingMatches = nullptr;
153 TClonesArray* fGlobalTracks = nullptr;
154 TClonesArray* fStsTracks = nullptr;
155 TClonesArray* fStsTrackMatches = nullptr;
156 TClonesArray* fRichProjections = nullptr;
159
160 // Number of hits in the MC RICH ring
161 std::map<CbmLink, int> fNofHitsInRingMap;
162
163 ClassDef(CbmRichRecoQa, 1)
164};
165
166#endif
CbmDigiManager.
Histogram manager.
Access to a MC data branch for time-based analysis.
Container class for MC events with number, file and start time.
TClonesArray * fRichProjections
bool WasRichProjectionMatched(int stsTrackId)
void RingTrackMismatchSource()
Fill histograms related to study of the source of ring-track mismatch.
virtual ~CbmRichRecoQa()
Standard destructor.
TClonesArray * fGlobalTracks
virtual InitStatus Init()
Inherited from FairTask.
void DrawRingTrackDist(const std::string &opt)
Draw histograms related to ring-track distance for pions or electrons (+/-).
virtual void Exec(Option_t *option)
Inherited from FairTask.
CbmMCDataArray * fMcTracks
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 DrawMismatchSrc()
Draw MismatchSrc histogram and canvas.
TClonesArray * fRichRings
bool HasRichProjection(Int_t stsTrackId)
bool WasRingMatched(Int_t mcTrackId)
std::map< CbmLink, int > fNofHitsInRingMap
TClonesArray * fRichRingMatches
void DrawFromFile(const std::string &fileName, const std::string &outputDir)
Draw histogram from file.
void SetOutputDir(const std::string &dir)
Set output directory where you want to write results (figures and json).
TClonesArray * fStsTracks
CbmDigiManager * fDigiMan
TClonesArray * fStsTrackMatches
CbmMCEventList * fEventList
virtual void Finish()
Inherited from FairTask.
CbmRichRecoQa(const CbmRichRecoQa &)
Copy constructor.
bool WasRingFound(Int_t mcTrackId)
static bool IsMcPrimaryElectron(const CbmMCTrack *mctrack)
TClonesArray * fRichPoints
void DrawHist()
Draw histograms.
CbmRichRecoQa()
Standard constructor.
static bool IsMcPion(const CbmMCTrack *mctrack)
void FillRichRingNofHits()
Fill map mcTrackId -> nof RICH hits.
CbmRichRecoQa & operator=(const CbmRichRecoQa &)
Assignment operator.
Data class with information on a STS local track.