CbmRoot
alignment/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 
16 #include <map>
17 #include <vector>
18 
19 using namespace std;
20 
21 class CbmRichRecoQa : public FairTask {
22 
23 public:
27  CbmRichRecoQa();
28 
32  virtual ~CbmRichRecoQa() {}
33 
37  virtual InitStatus Init();
38 
42  virtual void Exec(Option_t* option);
43 
47  virtual void Finish();
48 
49  static Bool_t IsMcPrimaryElectron(const CbmMCTrack* mctrack);
50 
51  static Bool_t IsMcPion(const CbmMCTrack* mctrack);
52 
57  void SetOutputDir(const string& dir) { fOutputDir = dir; }
58 
62  void DrawFromFile(const string& fileName, const string& outputDir);
63 
64  void SetCorrection(string s) { fCorrection = s; }
65 
66 private:
70  void InitHistograms();
71 
75  void FillRichRingNofHits();
76 
80  void FillRingTrackDistance();
81 
85  void RingTrackMismatchSource();
86 
90  void DrawHist();
91 
95  string GetMeanRmsOverflowString(TH1* h, Bool_t withOverflow = true);
96 
100  void DrawRingTrackDistHistWithSuffix(const string& suffix);
101 
102  void DrawRingTrackDistHistWithSuffixPmtHalf(const string& suffix);
103 
104  /*
105  * \brief Check that the ring with an input MCTrackId was found
106  */
107  bool WasRingFound(Int_t mcTrackId);
108 
109  /*
110  * \brief Check that the ring was matched with some global track
111  */
112  bool WasRingMatched(Int_t mcTrackId);
113 
114  /*
115  * \brief Check that the Sts track projection was matched with RICH ring
116  */
117  bool WasRichProjectionMatched(Int_t stsTrackId);
118 
119  /*
120  * Check that STS track has projection in the RICH
121  */
122  bool HasRichProjection(Int_t stsTrackId);
123 
124 
129 
134 
135 
137 
138  Int_t fEventNum;
139 
140  string fOutputDir; // output dir for results
141 
142  TClonesArray* fMCTracks;
143  TClonesArray* fRichPoints;
144  TClonesArray* fRichDigis;
145  TClonesArray* fRichHits;
146  TClonesArray* fRichRings;
147  TClonesArray* fRichRingMatches;
148  TClonesArray* fGlobalTracks;
149  TClonesArray* fStsTracks;
150  TClonesArray* fStsTrackMatches;
151  TClonesArray* fRichProjections;
152 
153  // Number of hits in the MC RICH ring
154  std::map<Int_t, Int_t> fNofHitsInRingMap;
155 
156  string fCorrection; // Is correction on or not
157 
158  vector<TCanvas*> fCanvas;
159 
160  ClassDef(CbmRichRecoQa, 1)
161 };
162 
163 #endif
h
Generates beam ions for transport simulation.
Definition: CbmBeamGenerator.h:17
CbmRichRecoQa::fGlobalTracks
TClonesArray * fGlobalTracks
Definition: alignment/CbmRichRecoQa.h:148
CbmRichRecoQa::fStsTracks
TClonesArray * fStsTracks
Definition: alignment/CbmRichRecoQa.h:149
CbmRichRecoQa::fEventNum
Int_t fEventNum
Definition: alignment/CbmRichRecoQa.h:138
CbmRichRecoQa::fOutputDir
string fOutputDir
Definition: alignment/CbmRichRecoQa.h:140
CbmRichRecoQa::WasRichProjectionMatched
bool WasRichProjectionMatched(Int_t stsTrackId)
CbmRichRecoQa::fCanvas
vector< TCanvas * > fCanvas
Definition: alignment/CbmRichRecoQa.h:158
CbmRichRecoQa::operator=
CbmRichRecoQa & operator=(const CbmRichRecoQa &)
Assignment operator.
CbmRichRecoQa::~CbmRichRecoQa
virtual ~CbmRichRecoQa()
Standard destructor.
Definition: alignment/CbmRichRecoQa.h:32
CbmRichRing
Definition: CbmRichRing.h:17
CbmRichRecoQa
Definition: alignment/CbmRichRecoQa.h:21
CbmRichRecoQa::fMCTracks
TClonesArray * fMCTracks
Definition: alignment/CbmRichRecoQa.h:142
CbmRichRecoQa::fRichRings
TClonesArray * fRichRings
Definition: alignment/CbmRichRecoQa.h:146
CbmRichRecoQa::CbmRichRecoQa
CbmRichRecoQa(const CbmRichRecoQa &)
Copy constructor.
CbmHistManager
Histogram manager.
Definition: CbmHistManager.h:41
CbmRichRecoQa::fRichHits
TClonesArray * fRichHits
Definition: alignment/CbmRichRecoQa.h:145
CbmRichRecoQa::SetOutputDir
void SetOutputDir(const string &dir)
Set output directory where you want to write results (figures and json).
Definition: alignment/CbmRichRecoQa.h:57
CbmRichRecoQa::fStsTrackMatches
TClonesArray * fStsTrackMatches
Definition: alignment/CbmRichRecoQa.h:150
CbmRichRecoQa::fCorrection
string fCorrection
Definition: alignment/CbmRichRecoQa.h:156
CbmRichRecoQa::fHM
CbmHistManager * fHM
Definition: alignment/CbmRichRecoQa.h:136
CbmRichRecoQa::fRichDigis
TClonesArray * fRichDigis
Definition: alignment/CbmRichRecoQa.h:144
CbmMCTrack
Definition: CbmMCTrack.h:34
CbmRichRecoQa::fRichProjections
TClonesArray * fRichProjections
Definition: alignment/CbmRichRecoQa.h:151
CbmRichRecoQa::fRichPoints
TClonesArray * fRichPoints
Definition: alignment/CbmRichRecoQa.h:143
CbmRichRecoQa::fRichRingMatches
TClonesArray * fRichRingMatches
Definition: alignment/CbmRichRecoQa.h:147
CbmRichRecoQa::fNofHitsInRingMap
std::map< Int_t, Int_t > fNofHitsInRingMap
Definition: alignment/CbmRichRecoQa.h:154
CbmRichRecoQa::SetCorrection
void SetCorrection(string s)
Definition: alignment/CbmRichRecoQa.h:64