PandaRoot
PndLmdQATask.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 //-----------------------------------------------------------
14 //
15 // Description:
16 // Task to generate and store some useful histograms
17 //
18 // Author List:
19 // Anastasia Karavdina
20 // Mathias Michel
21 //
22 //-----------------------------------------------------------
23 
24 #ifndef PNDLMDQATASK_H
25 #define PNDLMDQATASK_H
26 
27 // Base Class Headers ----------------
28 #include "FairTask.h"
29 
30 // Collaborating Class Headers -------
31 #include <map>
32 #include "TString.h"
33 #include "TH2.h"
34 #include "TH1.h"
35 
36 // Collaborating Class Declarations --
37 class TClonesArray;
38 class TGeoManager;
39 
40 class PndLmdQATask : public FairTask {
41 
42  public:
43  // Constructors/Destructors ---------
44  PndLmdQATask(TString mcHitBranch = "LMDPoint", TString mcTrkBranch = "MCTrack", TString clusterBranch = "LMDPixelClusterCand", TString digiBrunch = "LMDPixelDigis",
45  TString hitBranch = "LmdHits", TString TrkCandBranch = "LMDTrackCand", TString trackBranch = "LMDTrack", TString geaneBranch = "GeaneTrackFinal",
46  TString outFile = "tmpOutput/QA.root");
47 #ifndef __CINT__
48  PndLmdQATask(const PndLmdQATask &) = delete;
49  PndLmdQATask &operator=(const PndLmdQATask &) = delete;
50 #endif
51  virtual ~PndLmdQATask();
52  void SetVerboseLevel(int verbose) { verboseLevel = verbose; };
53  void WriteHists();
54  virtual InitStatus Init();
55 
56  virtual void FinishTask();
57 
58  virtual void Exec(Option_t *opt);
59 
60  protected:
62  // double fPlab;
63  // Input Data------------
64  TClonesArray *fmcHitArray;
65  TClonesArray *fmcTrkArray;
66  TClonesArray *fHitArray;
67  TClonesArray *fClusterArray;
68  TClonesArray *fDigiArray;
69  TClonesArray *fTrkCandArray;
70  TClonesArray *fTrkArray;
71  TClonesArray *fGeaneArray;
72 
73  TString fmcHitName;
74  TString fmcTrkName;
75  TString fHitName;
76  TString fDigiName;
77  TString fClusterName;
78  TString fTrkCandName;
79  TString fTrkName;
80  TString fGeaneName;
81 
82  // storage / output
83  TString foutFile;
84  Double_t trkpar[4];
85  int tot;
87  Int_t fEvent;
88 
89  // Analysis Functions
90  void ResoAndPulls();
91  bool HitReco();
92  // void Acceptance(); TODO
93 
94  // histos ResoAndPulls
95  // Near IP
96  TH1 *hResMom;
97  TH1 *hErrMom;
98  TH1 *hPullMom;
99  TH1 *hResTheta;
100  TH2 *hResTheta_th; // resolution vs. theta
101  TH2 *hResTheta_ph; // resolution vs. phi
102  TH1 *hErrTheta;
104  TH1 *hResPhi;
105  TH1 *hErrPhi;
106  TH1 *hPullPhi;
110 
114 
118 
125 
126  /* //QA candidates */
127  /* TH1 *hPullLikePointX; */
128  /* TH1 *hPullLikePointY; */
129  /* TH1 *hPullLikePointZ; */
130  /* TH2 *hPullLikeX_Zmc; */
131  /* TH2 *hPullLikeY_Zmc; */
132  /* TH2 *hPullLikeZ_Zmc; */
133  /* TH2 *hPullLikeTh_Zmc; */
134  /* TH2 *hPullLikePh_Zmc; */
135  /* TH2 *hPullLikeP_Zmc; */
136  /* TH2 *hXrecZmc; */
137  /* TH2 *hYrecZmc; */
138  /* TH2 *hZrecZmc; */
139  /* TH2 *hThrecZmc; */
140  /* TH2 *hPhrecZmc; */
141  /* TH2 *hPrecZmc; */
142  /* TH2 *hResXrecZmc; */
143  /* TH2 *hResYrecZmc; */
144  /* TH2 *hResZrecZmc; */
145  /* TH2 *hResThrecZmc; */
146  /* TH2 *hResPhrecZmc; */
147  /* TH2 *hResPrecZmc; */
148  /* TH2 *herrXrecZmc; */
149  /* TH2 *herrYrecZmc; */
150  /* TH2 *herrZrecZmc; */
151  /* TH2 *herrThrecZmc; */
152  /* TH2 *herrPhrecZmc; */
153  /* TH2 *herrPrecZmc; */
154 
155  /* TH2 *hPullLikeX_Xmc; */
156  /* TH2 *hPullLikeY_Xmc; */
157  /* TH2 *hPullLikeZ_Xmc; */
158  /* TH2 *hPullLikeTh_Xmc; */
159  /* TH2 *hPullLikePh_Xmc; */
160  /* TH2 *hPullLikeP_Xmc; */
161  /* TH2 *hXrecXmc; */
162  /* TH2 *hYrecXmc; */
163  /* TH2 *hZrecXmc; */
164  /* TH2 *hThrecXmc; */
165  /* TH2 *hPhrecXmc; */
166  /* TH2 *hPrecXmc; */
167  /* TH2 *hResXrecXmc; */
168  /* TH2 *hResYrecXmc; */
169  /* TH2 *hResZrecXmc; */
170  /* TH2 *hResThrecXmc; */
171  /* TH2 *hResPhrecXmc; */
172  /* TH2 *hResPrecXmc; */
173  /* TH2 *herrXrecXmc; */
174  /* TH2 *herrYrecXmc; */
175  /* TH2 *herrZrecXmc; */
176  /* TH2 *herrThrecXmc; */
177  /* TH2 *herrPhrecXmc; */
178  /* TH2 *herrPrecXmc; */
179 
180  /* TH2 *hPullLikeX_Ymc; */
181  /* TH2 *hPullLikeY_Ymc; */
182  /* TH2 *hPullLikeZ_Ymc; */
183  /* TH2 *hPullLikeTh_Ymc; */
184  /* TH2 *hPullLikePh_Ymc; */
185  /* TH2 *hPullLikeP_Ymc; */
186  /* TH2 *hXrecYmc; */
187  /* TH2 *hYrecYmc; */
188  /* TH2 *hZrecYmc; */
189  /* TH2 *hThrecYmc; */
190  /* TH2 *hPhrecYmc; */
191  /* TH2 *hPrecYmc; */
192  /* TH2 *hResXrecYmc; */
193  /* TH2 *hResYrecYmc; */
194  /* TH2 *hResZrecYmc; */
195  /* TH2 *hResThrecYmc; */
196  /* TH2 *hResPhrecYmc; */
197  /* TH2 *hResPrecYmc; */
198  /* TH2 *herrXrecYmc; */
199  /* TH2 *herrYrecYmc; */
200  /* TH2 *herrZrecYmc; */
201  /* TH2 *herrThrecYmc; */
202  /* TH2 *herrPhrecYmc; */
203  /* TH2 *herrPrecYmc; */
204 
205  // Near 1st LMD plane
206  TH1 *hResHitX;
207  TH1 *hResHitY;
208  TH1 *hResHitZ;
209  TH1 *hhits;
210  TH1 *hchi2;
220 
224 
231 
235 
241 
242  // TFile *fouthists;
244 };
245 
246 #endif
TH1 * hResLumiTrkPointPzErr
Definition: PndLmdQATask.h:230
TH1 * hResLumiTrkPointPyErr
Definition: PndLmdQATask.h:229
TH1 * hResLumiTrkPointPx
Definition: PndLmdQATask.h:221
void WriteHists()
TH1 * hResLumiTrkPointXErr
Definition: PndLmdQATask.h:225
TH2 * hMCLumiTrkTheta2D
Definition: PndLmdQATask.h:215
TString fmcHitName
Definition: PndLmdQATask.h:73
TString fTrkCandName
Definition: PndLmdQATask.h:78
void ResoAndPulls()
bool HitReco()
TH1 * hResLumiTrkPointPyPull
Definition: PndLmdQATask.h:237
TString fmcTrkName
Definition: PndLmdQATask.h:74
virtual void Exec(Option_t *opt)
TClonesArray * fmcHitArray
Definition: PndLmdQATask.h:64
TH1 * hResLumiTrkPointPz
Definition: PndLmdQATask.h:223
TH1 * hResLumiTrkPhiPull
Definition: PndLmdQATask.h:240
TH1 * hResPointPx
Definition: PndLmdQATask.h:107
TH1 * hResLumiTrkMom
Definition: PndLmdQATask.h:211
TH1 * hResPointPy
Definition: PndLmdQATask.h:111
TH1 * hResPointX
Definition: PndLmdQATask.h:119
TH1 * hResLumiTrkPointPxPull
Definition: PndLmdQATask.h:236
TH1 * hResLumiTrkPointXPull
Definition: PndLmdQATask.h:232
TString fGeaneName
Definition: PndLmdQATask.h:80
TString fTrkName
Definition: PndLmdQATask.h:79
TH1 * hPullPointPy
Definition: PndLmdQATask.h:113
TClonesArray * fTrkCandArray
Definition: PndLmdQATask.h:69
TH1 * hResLumiTrkThetaPull
Definition: PndLmdQATask.h:239
TH2 * hResLumiTrkTheta2D
Definition: PndLmdQATask.h:214
TH1 * hResTheta
Definition: PndLmdQATask.h:99
TH1 * hResLumiTrkPointYPull
Definition: PndLmdQATask.h:233
TH1 * hResLumiTrkPointPzPull
Definition: PndLmdQATask.h:238
TH1 * hErrPointPz
Definition: PndLmdQATask.h:116
TH1 * hPullPointPx
Definition: PndLmdQATask.h:109
TH1 * hResLumiTrkPointZ
Definition: PndLmdQATask.h:219
TClonesArray * fClusterArray
Definition: PndLmdQATask.h:67
TH1 * hErrPointPx
Definition: PndLmdQATask.h:108
TH1 * hResLumiTrkPointPy
Definition: PndLmdQATask.h:222
TH1 * hResPointY
Definition: PndLmdQATask.h:121
TH1 * hResPointZ
Definition: PndLmdQATask.h:123
TH1 * hResLumiTrkTheta
Definition: PndLmdQATask.h:212
TH1 * hPullPointX
Definition: PndLmdQATask.h:120
TH1 * hPullPointPz
Definition: PndLmdQATask.h:117
TH1 * hResLumiTrkPointX
Definition: PndLmdQATask.h:217
TH1 * hPullMom
Definition: PndLmdQATask.h:98
TH1 * hResLumiTrkPhi
Definition: PndLmdQATask.h:213
PndLmdQATask(TString mcHitBranch="LMDPoint", TString mcTrkBranch="MCTrack", TString clusterBranch="LMDPixelClusterCand", TString digiBrunch="LMDPixelDigis", TString hitBranch="LmdHits", TString TrkCandBranch="LMDTrackCand", TString trackBranch="LMDTrack", TString geaneBranch="GeaneTrackFinal", TString outFile="tmpOutput/QA.root")
TH1 * hResLumiTrkPointPxErr
Definition: PndLmdQATask.h:228
TClonesArray * fTrkArray
Definition: PndLmdQATask.h:70
TH1 * hErrPointPy
Definition: PndLmdQATask.h:112
TH1 * hPullPointZ
Definition: PndLmdQATask.h:124
TH1 * hPullPointY
Definition: PndLmdQATask.h:122
virtual InitStatus Init()
TString fClusterName
Definition: PndLmdQATask.h:77
TString fHitName
Definition: PndLmdQATask.h:75
void SetVerboseLevel(int verbose)
Definition: PndLmdQATask.h:52
TH1 * hResLumiTrkPointYErr
Definition: PndLmdQATask.h:226
TH1 * hResLumiTrkPointZPull
Definition: PndLmdQATask.h:234
TH2 * hRecLumiTrkTheta2D
Definition: PndLmdQATask.h:216
ClassDef(PndLmdQATask, 1)
TH2 * hResTheta_ph
Definition: PndLmdQATask.h:101
TH1 * hResLumiTrkPointZErr
Definition: PndLmdQATask.h:227
TString foutFile
Definition: PndLmdQATask.h:83
TH1 * hResLumiTrkPointY
Definition: PndLmdQATask.h:218
PndLmdQATask & operator=(const PndLmdQATask &)=delete
TClonesArray * fHitArray
Definition: PndLmdQATask.h:66
Double_t trkpar[4]
Definition: PndLmdQATask.h:84
virtual void FinishTask()
virtual ~PndLmdQATask()
TClonesArray * fmcTrkArray
Definition: PndLmdQATask.h:65
TH1 * hResPointPz
Definition: PndLmdQATask.h:115
TH2 * hResTheta_th
Definition: PndLmdQATask.h:100
TClonesArray * fGeaneArray
Definition: PndLmdQATask.h:71
TClonesArray * fDigiArray
Definition: PndLmdQATask.h:68
TString fDigiName
Definition: PndLmdQATask.h:76
TH1 * hPullTheta
Definition: PndLmdQATask.h:103