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