]>
Commit | Line | Data |
---|---|---|
9725fd2a | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | /* $Id: $ */ | |
16 | ||
a6f26052 | 17 | //_________________________________________________________________________ |
18 | // Class to check results from simulations or reconstructed real data. | |
19 | // Fill few histograms and do some checking plots | |
20 | // | |
21 | //-- Author: Gustavo Conesa (INFN-LNF) | |
22 | //_________________________________________________________________________ | |
9725fd2a | 23 | |
24 | ||
a6f26052 | 25 | // --- ROOT system --- |
26 | //#include "Riostream.h" | |
591cc579 | 27 | #include "TObjArray.h" |
9725fd2a | 28 | #include "TParticle.h" |
c180f65d | 29 | #include "TDatabasePDG.h" |
9725fd2a | 30 | #include "TCanvas.h" |
31 | #include "TPad.h" | |
32 | #include "TROOT.h" | |
a5fafd85 | 33 | #include "TH3F.h" |
9725fd2a | 34 | #include "TH2F.h" |
35 | #include "TLegend.h" | |
a5fafd85 | 36 | #include "TStyle.h" |
0c1383b5 | 37 | #include <TObjString.h> |
9725fd2a | 38 | |
a6f26052 | 39 | //---- AliRoot system ---- |
9725fd2a | 40 | #include "AliAnaCalorimeterQA.h" |
41 | #include "AliCaloTrackReader.h" | |
42 | #include "AliStack.h" | |
c8fe2783 | 43 | #include "AliVCaloCells.h" |
ff45398a | 44 | #include "AliFiducialCut.h" |
c8fe2783 | 45 | #include "AliVTrack.h" |
46 | #include "AliVCluster.h" | |
47 | #include "AliVEvent.h" | |
902aa95c | 48 | #include "AliVEventHandler.h" |
49 | #include "AliAnalysisManager.h" | |
50 | #include "AliAODMCParticle.h" | |
51 | #include "AliMCAnalysisUtils.h" | |
6fa7d352 | 52 | #include "AliAODPid.h" |
c8fe2783 | 53 | #include "AliExternalTrackParam.h" |
9725fd2a | 54 | |
55 | ClassImp(AliAnaCalorimeterQA) | |
c8fe2783 | 56 | |
a6f26052 | 57 | //____________________________________________________________________________ |
c8fe2783 | 58 | AliAnaCalorimeterQA::AliAnaCalorimeterQA() : |
59 | AliAnaPartCorrBaseClass(), fCalorimeter(""), fStyleMacro(""), | |
a6f26052 | 60 | fMakePlots(kFALSE), fFillAllPosHisto(kFALSE), fFillAllTH12(kFALSE), |
61 | fCorrelateCalos(kFALSE), fNModules(12), fNRCU(2), | |
c8fe2783 | 62 | fTimeCutMin(-1), fTimeCutMax(9999999), |
b8187de4 | 63 | fHistoFinePtBins(1000), fHistoFinePtMax(5.), fHistoFinePtMin(0.), |
a6f26052 | 64 | fHistoPOverEBins(100), fHistoPOverEMax(100.), fHistoPOverEMin(0.), |
65 | fHistodEdxBins(100), fHistodEdxMax(100.), fHistodEdxMin(0.), | |
66 | fHistodRBins(100), fHistodRMax(100.), fHistodRMin(0.), | |
67 | fHistoTimeBins(100), fHistoTimeMax(100.), fHistoTimeMin(0.), | |
68 | fHistoNBins(100), fHistoNMax(100), fHistoNMin(0), | |
69 | fHistoRatioBins(100), fHistoRatioMax(100.), fHistoRatioMin(0.), | |
70 | fHistoVertexDistBins(100), fHistoVertexDistMax(100.), fHistoVertexDistMin(0.), | |
c8fe2783 | 71 | fHistoRBins(100), fHistoRMax(1000), fHistoRMin(-1000), |
72 | fHistoXBins(100), fHistoXMax(1000), fHistoXMin(-1000), | |
73 | fHistoYBins(100), fHistoYMax(1000), fHistoYMin(-1000), | |
74 | fHistoZBins(100), fHistoZMax(1000), fHistoZMin(-1000), | |
a6f26052 | 75 | fHistoSSBins(25), fHistoSSMax(5), fHistoSSMin(0), |
c8fe2783 | 76 | fhE(0),fhPt(0),fhPhi(0),fhEta(0), fhEtaPhiE(0), |
77 | fhECharged(0),fhPtCharged(0),fhPhiCharged(0),fhEtaCharged(0), fhEtaPhiECharged(0), | |
c8fe2783 | 78 | fhDeltaE(0), fhDeltaPt(0),fhDeltaPhi(0),fhDeltaEta(0), fhRatioE(0), fhRatioPt(0),fhRatioPhi(0),fhRatioEta(0), |
79 | fh2E(0),fh2Pt(0),fh2Phi(0),fh2Eta(0), | |
80 | fhLambda(0), fhDispersion(0), | |
81 | fhIM(0), fhIMCellCut(0),fhAsym(0), | |
82 | fhNCellsPerCluster(0),fhNCellsPerClusterMIP(0), fhNCellsPerClusterMIPCharged(0), fhNClusters(0), | |
83 | fhClusterTimeEnergy(0),fhCellTimeSpreadRespectToCellMax(0),fhCellIdCellLargeTimeSpread(0), | |
84 | fhRNCells(0),fhXNCells(0),fhYNCells(0),fhZNCells(0), | |
85 | fhRE(0), fhXE(0), fhYE(0), fhZE(0), fhXYZ(0), | |
86 | fhRCellE(0), fhXCellE(0), fhYCellE(0), fhZCellE(0),fhXYZCell(0), | |
87 | fhDeltaCellClusterRNCells(0),fhDeltaCellClusterXNCells(0),fhDeltaCellClusterYNCells(0),fhDeltaCellClusterZNCells(0), | |
88 | fhDeltaCellClusterRE(0), fhDeltaCellClusterXE(0), fhDeltaCellClusterYE(0), fhDeltaCellClusterZE(0), | |
89 | fhNCells(0), fhAmplitude(0), fhAmpId(0), fhEtaPhiAmp(0), | |
90 | fhTime(0), fhTimeId(0), fhTimeAmp(0), //fhT0Time(0), fhT0TimeId(0), fhT0TimeAmp(0), | |
91 | fhCaloCorrNClusters(0), fhCaloCorrEClusters(0), fhCaloCorrNCells(0), fhCaloCorrECells(0), | |
92 | fhEMod(0), fhNClustersMod(0), fhNCellsPerClusterMod(0), fhNCellsMod(0), | |
93 | fhGridCellsMod(0), fhGridCellsEMod(0), fhGridCellsTimeMod(0), | |
a6f26052 | 94 | fhAmplitudeMod(0), fhAmplitudeModFraction(0),fhTimeAmpPerRCU(0), //fhT0TimeAmpPerRCU(0), fhTimeCorrRCU(0), |
c8fe2783 | 95 | fhIMMod(0), fhIMCellCutMod(0), |
96 | fhGenGamPt(0),fhGenGamEta(0),fhGenGamPhi(0),fhGenPi0Pt(0),fhGenPi0Eta(0),fhGenPi0Phi(0), | |
97 | fhGenEtaPt(0),fhGenEtaEta(0),fhGenEtaPhi(0),fhGenOmegaPt(0),fhGenOmegaEta(0),fhGenOmegaPhi(0), | |
98 | fhGenElePt(0),fhGenEleEta(0),fhGenElePhi(0), fhEMVxyz(0), fhEMR(0), fhHaVxyz(0), fhHaR(0), | |
99 | fhGamE(0),fhGamPt(0),fhGamPhi(0),fhGamEta(0), | |
100 | fhGamDeltaE(0), fhGamDeltaPt(0),fhGamDeltaPhi(0),fhGamDeltaEta(0), | |
101 | fhGamRatioE(0), fhGamRatioPt(0),fhGamRatioPhi(0),fhGamRatioEta(0), | |
102 | fhEleE(0),fhElePt(0),fhElePhi(0),fhEleEta(0), | |
103 | fhPi0E(0),fhPi0Pt(0),fhPi0Phi(0),fhPi0Eta(0), | |
104 | fhNeHadE(0),fhNeHadPt(0),fhNeHadPhi(0),fhNeHadEta(0), | |
105 | fhChHadE(0),fhChHadPt(0),fhChHadPhi(0),fhChHadEta(0), | |
106 | fhGamECharged(0),fhGamPtCharged(0),fhGamPhiCharged(0),fhGamEtaCharged(0), | |
107 | fhEleECharged(0),fhElePtCharged(0),fhElePhiCharged(0),fhEleEtaCharged(0), | |
108 | fhPi0ECharged(0),fhPi0PtCharged(0),fhPi0PhiCharged(0),fhPi0EtaCharged(0), | |
109 | fhNeHadECharged(0),fhNeHadPtCharged(0),fhNeHadPhiCharged(0),fhNeHadEtaCharged(0), | |
110 | fhChHadECharged(0),fhChHadPtCharged(0),fhChHadPhiCharged(0),fhChHadEtaCharged(0), | |
111 | fhGenGamAccE(0),fhGenGamAccPt(0),fhGenGamAccEta(0),fhGenGamAccPhi(0), | |
112 | fhGenPi0AccE(0),fhGenPi0AccPt(0),fhGenPi0AccEta(0),fhGenPi0AccPhi(0), | |
113 | fh1pOverE(0),fh1dR(0),fh2EledEdx(0), fh2MatchdEdx(0),fhMCEle1pOverE(0),fhMCEle1dR(0),fhMCEle2MatchdEdx(0), | |
114 | fhMCChHad1pOverE(0), fhMCChHad1dR(0), fhMCChHad2MatchdEdx(0), | |
115 | fhMCNeutral1pOverE(0),fhMCNeutral1dR(0),fhMCNeutral2MatchdEdx(0), | |
116 | fh1pOverER02(0), fhMCEle1pOverER02(0), fhMCChHad1pOverER02(0), fhMCNeutral1pOverER02(0) | |
9725fd2a | 117 | { |
a6f26052 | 118 | //Default Ctor |
afabc52f | 119 | |
a6f26052 | 120 | //Initialize parameters |
9725fd2a | 121 | InitParameters(); |
122 | } | |
a5fafd85 | 123 | |
a6f26052 | 124 | //________________________________________________________________________ |
0c1383b5 | 125 | TObjString * AliAnaCalorimeterQA::GetAnalysisCuts() |
126 | { | |
a6f26052 | 127 | //Save parameters used for analysis |
0c1383b5 | 128 | TString parList ; //this will be list of parameters used for this analysis. |
f8006433 | 129 | const Int_t buffersize = 255; |
130 | char onePar[buffersize] ; | |
0c1383b5 | 131 | |
f8006433 | 132 | snprintf(onePar,buffersize,"--- AliAnaCalorimeterQA ---\n") ; |
0c1383b5 | 133 | parList+=onePar ; |
f8006433 | 134 | snprintf(onePar,buffersize,"Calorimeter: %s\n",fCalorimeter.Data()) ; |
0c1383b5 | 135 | parList+=onePar ; |
f8006433 | 136 | snprintf(onePar,buffersize,"Time Cut : %2.2f < T < %2.2f ns \n",fTimeCutMin, fTimeCutMax) ; |
0c1383b5 | 137 | parList+=onePar ; |
c8fe2783 | 138 | |
a6f26052 | 139 | //Get parameters set in base class. |
140 | //parList += GetBaseParametersList() ; | |
0c1383b5 | 141 | |
a6f26052 | 142 | //Get parameters set in FiducialCut class (not available yet) |
143 | //parlist += GetFidCut()->GetFidCutParametersList() | |
0c1383b5 | 144 | |
145 | return new TObjString(parList) ; | |
146 | } | |
147 | ||
a5fafd85 | 148 | |
a6f26052 | 149 | //________________________________________________________________________ |
9725fd2a | 150 | TList * AliAnaCalorimeterQA::GetCreateOutputObjects() |
151 | { | |
a6f26052 | 152 | // Create histograms to be saved in output file and |
153 | // store them in outputContainer | |
c8fe2783 | 154 | |
9725fd2a | 155 | TList * outputContainer = new TList() ; |
4865e325 | 156 | outputContainer->SetName("QAHistos") ; |
9725fd2a | 157 | |
a6f26052 | 158 | //Histograms |
5a2dbc3c | 159 | Int_t nptbins = GetHistoPtBins(); Float_t ptmax = GetHistoPtMax(); Float_t ptmin = GetHistoPtMin(); |
b8187de4 | 160 | Int_t nfineptbins = GetHistoFinePtBins(); Float_t ptfinemax = GetHistoFinePtMax(); Float_t ptfinemin = GetHistoFinePtMin(); |
5a2dbc3c | 161 | Int_t nphibins = GetHistoPhiBins(); Float_t phimax = GetHistoPhiMax(); Float_t phimin = GetHistoPhiMin(); |
162 | Int_t netabins = GetHistoEtaBins(); Float_t etamax = GetHistoEtaMax(); Float_t etamin = GetHistoEtaMin(); | |
163 | Int_t nmassbins = GetHistoMassBins(); Float_t massmax = GetHistoMassMax(); Float_t massmin = GetHistoMassMin(); | |
164 | Int_t nasymbins = GetHistoAsymmetryBins(); Float_t asymmax = GetHistoAsymmetryMax(); Float_t asymmin = GetHistoAsymmetryMin(); | |
165 | Int_t nPoverEbins = GetHistoPOverEBins(); Float_t pOverEmax = GetHistoPOverEMax(); Float_t pOverEmin = GetHistoPOverEMin(); | |
166 | Int_t ndedxbins = GetHistodEdxBins(); Float_t dedxmax = GetHistodEdxMax(); Float_t dedxmin = GetHistodEdxMin(); | |
167 | Int_t ndRbins = GetHistodRBins(); Float_t dRmax = GetHistodRMax(); Float_t dRmin = GetHistodRMin(); | |
168 | Int_t ntimebins = GetHistoTimeBins(); Float_t timemax = GetHistoTimeMax(); Float_t timemin = GetHistoTimeMin(); | |
169 | Int_t nbins = GetHistoNClusterCellBins(); Int_t nmax = GetHistoNClusterCellMax(); Int_t nmin = GetHistoNClusterCellMin(); | |
170 | Int_t nratiobins = GetHistoRatioBins(); Float_t ratiomax = GetHistoRatioMax(); Float_t ratiomin = GetHistoRatioMin(); | |
171 | Int_t nvdistbins = GetHistoVertexDistBins(); Float_t vdistmax = GetHistoVertexDistMax(); Float_t vdistmin = GetHistoVertexDistMin(); | |
5a35dd37 | 172 | Int_t rbins = GetHistoRBins(); Float_t rmax = GetHistoRMax(); Float_t rmin = GetHistoRMin(); |
173 | Int_t xbins = GetHistoXBins(); Float_t xmax = GetHistoXMax(); Float_t xmin = GetHistoXMin(); | |
174 | Int_t ybins = GetHistoYBins(); Float_t ymax = GetHistoYMax(); Float_t ymin = GetHistoYMin(); | |
175 | Int_t zbins = GetHistoZBins(); Float_t zmax = GetHistoZMax(); Float_t zmin = GetHistoZMin(); | |
eb5a51ae | 176 | Int_t ssbins = GetHistoShowerShapeBins(); Float_t ssmax = GetHistoShowerShapeMax(); Float_t ssmin = GetHistoShowerShapeMin(); |
5a2dbc3c | 177 | |
a6f26052 | 178 | //EMCAL |
5a2dbc3c | 179 | Int_t colmax = 48; |
180 | Int_t rowmax = 24; | |
eb5a51ae | 181 | fNRCU = 2 ; |
a6f26052 | 182 | //PHOS |
5a2dbc3c | 183 | if(fCalorimeter=="PHOS"){ |
eb5a51ae | 184 | colmax = 56; |
185 | rowmax = 64; | |
186 | fNRCU = 4 ; | |
5a2dbc3c | 187 | } |
188 | ||
9725fd2a | 189 | |
a6f26052 | 190 | fhE = new TH1F ("hE","E reconstructed clusters ", nptbins*5,ptmin,ptmax*5); |
9725fd2a | 191 | fhE->SetXTitle("E (GeV)"); |
192 | outputContainer->Add(fhE); | |
a6f26052 | 193 | |
194 | if(fFillAllTH12){ | |
195 | fhPt = new TH1F ("hPt","p_{T} reconstructed clusters", nptbins,ptmin,ptmax); | |
196 | fhPt->SetXTitle("p_{T} (GeV/c)"); | |
197 | outputContainer->Add(fhPt); | |
198 | ||
199 | fhPhi = new TH1F ("hPhi","#phi reconstructed clusters ",nphibins,phimin,phimax); | |
200 | fhPhi->SetXTitle("#phi (rad)"); | |
201 | outputContainer->Add(fhPhi); | |
202 | ||
203 | fhEta = new TH1F ("hEta","#eta reconstructed clusters ",netabins,etamin,etamax); | |
204 | fhEta->SetXTitle("#eta "); | |
205 | outputContainer->Add(fhEta); | |
206 | } | |
207 | ||
0866d83a | 208 | fhEtaPhiE = new TH3F ("hEtaPhiE","#eta vs #phi vs energy, reconstructed clusters", |
c8fe2783 | 209 | netabins,etamin,etamax,nphibins,phimin,phimax,nptbins,ptmin,ptmax); |
a5fafd85 | 210 | fhEtaPhiE->SetXTitle("#eta "); |
211 | fhEtaPhiE->SetYTitle("#phi (rad)"); | |
212 | fhEtaPhiE->SetZTitle("E (GeV) "); | |
213 | outputContainer->Add(fhEtaPhiE); | |
eb5a51ae | 214 | |
4cf55759 | 215 | fhClusterTimeEnergy = new TH2F ("hClusterTimeEnergy","energy vs TOF, reconstructed clusters", |
c8fe2783 | 216 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
4cf55759 | 217 | fhClusterTimeEnergy->SetXTitle("E (GeV) "); |
218 | fhClusterTimeEnergy->SetYTitle("TOF (ns)"); | |
219 | outputContainer->Add(fhClusterTimeEnergy); | |
220 | ||
221 | ||
a6f26052 | 222 | //Shower shape |
eb5a51ae | 223 | fhLambda = new TH3F ("hLambda","#lambda_{0}^{2} vs #lambda_{1}^{2} vs energy, reconstructed clusters", |
c8fe2783 | 224 | ssbins,ssmin,ssmax,ssbins,ssmin,ssmax,nptbins,ptmin,ptmax); |
eb5a51ae | 225 | fhLambda->SetXTitle("#lambda_{0}^{2} "); |
226 | fhLambda->SetYTitle("#lambda_{1}^{2} "); | |
227 | fhLambda->SetZTitle("E (GeV) "); | |
228 | outputContainer->Add(fhLambda); | |
229 | ||
230 | fhDispersion = new TH2F ("hDispersion"," dispersion vs energy, reconstructed clusters", | |
c8fe2783 | 231 | ssbins,ssmin,ssmax,nptbins,ptmin,ptmax); |
eb5a51ae | 232 | fhDispersion->SetXTitle("Dispersion "); |
233 | fhDispersion->SetYTitle("E (GeV) "); | |
234 | outputContainer->Add(fhDispersion); | |
235 | ||
a6f26052 | 236 | //Track Matching |
237 | if(fFillAllTH12){ | |
238 | fhECharged = new TH1F ("hECharged","E reconstructed clusters, matched with track", nptbins,ptmin,ptmax); | |
239 | fhECharged->SetXTitle("E (GeV)"); | |
240 | outputContainer->Add(fhECharged); | |
241 | ||
242 | fhPtCharged = new TH1F ("hPtCharged","p_{T} reconstructed clusters, matched with track", nptbins,ptmin,ptmax); | |
243 | fhPtCharged->SetXTitle("p_{T} (GeV/c)"); | |
244 | outputContainer->Add(fhPtCharged); | |
245 | ||
246 | fhPhiCharged = new TH1F ("hPhiCharged","#phi reconstructed clusters, matched with track",nphibins,phimin,phimax); | |
247 | fhPhiCharged->SetXTitle("#phi (rad)"); | |
248 | outputContainer->Add(fhPhiCharged); | |
249 | ||
250 | fhEtaCharged = new TH1F ("hEtaCharged","#eta reconstructed clusters, matched with track",netabins,etamin,etamax); | |
251 | fhEtaCharged->SetXTitle("#eta "); | |
252 | outputContainer->Add(fhEtaCharged); | |
253 | } | |
c8fe2783 | 254 | |
0866d83a | 255 | fhEtaPhiECharged = new TH3F ("hEtaPhiECharged","#eta vs #phi, reconstructed clusters, matched with track", |
c8fe2783 | 256 | netabins,etamin,etamax,nphibins,phimin,phimax,nptbins,ptmin,ptmax); |
0866d83a | 257 | fhEtaPhiECharged->SetXTitle("#eta "); |
258 | fhEtaPhiECharged->SetYTitle("#phi "); | |
259 | fhEtaPhiECharged->SetZTitle("E (GeV) "); | |
260 | outputContainer->Add(fhEtaPhiECharged); | |
c8fe2783 | 261 | |
5a2dbc3c | 262 | fh1pOverE = new TH2F("h1pOverE","TRACK matches p/E",nptbins,ptmin,ptmax, nPoverEbins,pOverEmin,pOverEmax); |
a0bb4dc0 | 263 | fh1pOverE->SetYTitle("p/E"); |
264 | fh1pOverE->SetXTitle("p_{T} (GeV/c)"); | |
265 | outputContainer->Add(fh1pOverE); | |
266 | ||
5a2dbc3c | 267 | fh1dR = new TH1F("h1dR","TRACK matches dR",ndRbins,dRmin,dRmax); |
a0bb4dc0 | 268 | fh1dR->SetXTitle("#Delta R (rad)"); |
269 | outputContainer->Add(fh1dR) ; | |
270 | ||
5a2dbc3c | 271 | fh2MatchdEdx = new TH2F("h2MatchdEdx","dE/dx vs. p for all matches",nptbins,ptmin,ptmax,ndedxbins,dedxmin,dedxmax); |
a0bb4dc0 | 272 | fh2MatchdEdx->SetXTitle("p (GeV/c)"); |
273 | fh2MatchdEdx->SetYTitle("<dE/dx>"); | |
274 | outputContainer->Add(fh2MatchdEdx); | |
275 | ||
5a2dbc3c | 276 | fh2EledEdx = new TH2F("h2EledEdx","dE/dx vs. p for electrons",nptbins,ptmin,ptmax,ndedxbins,dedxmin,dedxmax); |
a0bb4dc0 | 277 | fh2EledEdx->SetXTitle("p (GeV/c)"); |
278 | fh2EledEdx->SetYTitle("<dE/dx>"); | |
279 | outputContainer->Add(fh2EledEdx) ; | |
280 | ||
5a2dbc3c | 281 | fh1pOverER02 = new TH2F("h1pOverER02","TRACK matches p/E, all",nptbins,ptmin,ptmax, nPoverEbins,pOverEmin,pOverEmax); |
a0bb4dc0 | 282 | fh1pOverER02->SetYTitle("p/E"); |
283 | fh1pOverER02->SetXTitle("p_{T} (GeV/c)"); | |
284 | outputContainer->Add(fh1pOverER02); | |
285 | ||
5a2dbc3c | 286 | fhIM = new TH2F ("hIM","Cluster pairs Invariant mass vs reconstructed pair energy",nptbins,ptmin,ptmax,nmassbins,massmin,massmax); |
583c48f1 | 287 | fhIM->SetXTitle("p_{T, cluster pairs} (GeV) "); |
9725fd2a | 288 | fhIM->SetYTitle("M_{cluster pairs} (GeV/c^{2})"); |
289 | outputContainer->Add(fhIM); | |
290 | ||
5a2dbc3c | 291 | fhIMCellCut = new TH2F ("hIMCellCut","Cluster (n cell > 1) pairs Invariant mass vs reconstructed pair energy",nptbins,ptmin,ptmax,nmassbins,massmin,massmax); |
583c48f1 | 292 | fhIMCellCut->SetXTitle("p_{T, cluster pairs} (GeV) "); |
a5fafd85 | 293 | fhIMCellCut->SetYTitle("M_{cluster pairs} (GeV/c^{2})"); |
294 | outputContainer->Add(fhIMCellCut); | |
a6f26052 | 295 | |
b8187de4 | 296 | fhAsym = new TH2F ("hAssym","Cluster pairs Asymmetry vs reconstructed pair energy",nptbins,ptmin,ptmax,nasymbins,asymmin,asymmax); |
297 | fhAsym->SetXTitle("p_{T, cluster pairs} (GeV) "); | |
298 | fhAsym->SetYTitle("Asymmetry"); | |
299 | outputContainer->Add(fhAsym); | |
300 | ||
a6f26052 | 301 | |
b8187de4 | 302 | Int_t nlargeetabins = 3; |
303 | if(fCalorimeter=="EMCAL") nlargeetabins = 8; | |
304 | ||
305 | fhNCellsPerCluster = new TH3F ("hNCellsPerCluster","# cells per cluster vs energy vs #eta",nptbins,ptmin,ptmax, nbins,nmin,nmax, nlargeetabins,etamin,etamax); | |
9725fd2a | 306 | fhNCellsPerCluster->SetXTitle("E (GeV)"); |
307 | fhNCellsPerCluster->SetYTitle("n cells"); | |
0866d83a | 308 | fhNCellsPerCluster->SetZTitle("#eta"); |
9725fd2a | 309 | outputContainer->Add(fhNCellsPerCluster); |
310 | ||
8b5f17b6 | 311 | |
0866d83a | 312 | fhNCellsPerClusterMIP = new TH3F ("hNCellsPerClusterMIP","# cells per cluster vs energy vs #eta, smaller bin for MIP search", |
b8187de4 | 313 | 40,0.,2., 11,0,10,nlargeetabins,etamin,etamax); |
0cdb88b8 | 314 | fhNCellsPerClusterMIP->SetXTitle("E (GeV)"); |
315 | fhNCellsPerClusterMIP->SetYTitle("n cells"); | |
0866d83a | 316 | fhNCellsPerClusterMIP->SetZTitle("#eta"); |
0cdb88b8 | 317 | outputContainer->Add(fhNCellsPerClusterMIP); |
318 | ||
b8187de4 | 319 | |
0866d83a | 320 | fhNCellsPerClusterMIPCharged = new TH3F ("hNCellsPerClusterMIPCharged","# cells per track-matched cluster vs energy vs #eta, smaller bin for MIP search", |
b8187de4 | 321 | 40,0.,2., 11,0,10,nlargeetabins,etamin,etamax); |
0866d83a | 322 | fhNCellsPerClusterMIPCharged->SetXTitle("E (GeV)"); |
323 | fhNCellsPerClusterMIPCharged->SetYTitle("n cells"); | |
324 | fhNCellsPerClusterMIPCharged->SetZTitle("#eta"); | |
325 | outputContainer->Add(fhNCellsPerClusterMIPCharged); | |
326 | ||
8b5f17b6 | 327 | |
5a2dbc3c | 328 | fhNClusters = new TH1F ("hNClusters","# clusters", nbins,nmin,nmax); |
9725fd2a | 329 | fhNClusters->SetXTitle("number of clusters"); |
330 | outputContainer->Add(fhNClusters); | |
c8fe2783 | 331 | |
b8187de4 | 332 | fhXYZ = new TH3F ("hXYZ","Cluster: x vs y vs z",xbins,xmin,xmax,ybins,ymin,ymax,zbins,zmin,zmax); |
333 | fhXYZ->SetXTitle("x (cm)"); | |
334 | fhXYZ->SetYTitle("y (cm)"); | |
335 | fhXYZ->SetZTitle("z (cm) "); | |
336 | outputContainer->Add(fhXYZ); | |
337 | ||
338 | fhXNCells = new TH2F ("hXNCells","Cluster X position vs N Clusters per Cell",xbins,xmin,xmax,nbins,nmin,nmax); | |
339 | fhXNCells->SetXTitle("x (cm)"); | |
340 | fhXNCells->SetYTitle("N cells per cluster"); | |
341 | outputContainer->Add(fhXNCells); | |
342 | ||
343 | fhZNCells = new TH2F ("hZNCells","Cluster Z position vs N Clusters per Cell",zbins,zmin,zmax,nbins,nmin,nmax); | |
344 | fhZNCells->SetXTitle("z (cm)"); | |
345 | fhZNCells->SetYTitle("N cells per cluster"); | |
346 | outputContainer->Add(fhZNCells); | |
347 | ||
348 | fhXE = new TH2F ("hXE","Cluster X position vs cluster energy",xbins,xmin,xmax,nptbins,ptmin,ptmax); | |
349 | fhXE->SetXTitle("x (cm)"); | |
350 | fhXE->SetYTitle("E (GeV)"); | |
351 | outputContainer->Add(fhXE); | |
352 | ||
353 | fhZE = new TH2F ("hZE","Cluster Z position vs cluster energy",zbins,zmin,zmax,nptbins,ptmin,ptmax); | |
354 | fhZE->SetXTitle("z (cm)"); | |
355 | fhZE->SetYTitle("E (GeV)"); | |
356 | outputContainer->Add(fhZE); | |
357 | ||
358 | ||
359 | fhRNCells = new TH2F ("hRNCells","Cluster R position vs N Clusters per Cell",rbins,rmin,rmax,nbins,nmin,nmax); | |
360 | fhRNCells->SetXTitle("r = #sqrt{x^{2}+y^{2}} (cm)"); | |
361 | fhRNCells->SetYTitle("N cells per cluster"); | |
362 | outputContainer->Add(fhRNCells); | |
363 | ||
364 | ||
365 | fhYNCells = new TH2F ("hYNCells","Cluster Y position vs N Clusters per Cell",ybins,ymin,ymax,nbins,nmin,nmax); | |
366 | fhYNCells->SetXTitle("y (cm)"); | |
367 | fhYNCells->SetYTitle("N cells per cluster"); | |
368 | outputContainer->Add(fhYNCells); | |
369 | ||
370 | fhRE = new TH2F ("hRE","Cluster R position vs cluster energy",rbins,rmin,rmax,nptbins,ptmin,ptmax); | |
371 | fhRE->SetXTitle("r = #sqrt{x^{2}+y^{2}} (cm)"); | |
372 | fhRE->SetYTitle("E (GeV)"); | |
373 | outputContainer->Add(fhRE); | |
374 | ||
375 | fhYE = new TH2F ("hYE","Cluster Y position vs cluster energy",ybins,ymin,ymax,nptbins,ptmin,ptmax); | |
376 | fhYE->SetXTitle("y (cm)"); | |
377 | fhYE->SetYTitle("E (GeV)"); | |
378 | outputContainer->Add(fhYE); | |
a6f26052 | 379 | |
b8187de4 | 380 | if(fFillAllPosHisto){ |
381 | ||
382 | ||
a6f26052 | 383 | fhRCellE = new TH2F ("hRCellE","Cell R position vs cell energy",rbins,rmin,rmax,nptbins,ptmin,ptmax); |
384 | fhRCellE->SetXTitle("r = #sqrt{x^{2}+y^{2}} (cm)"); | |
385 | fhRCellE->SetYTitle("E (GeV)"); | |
386 | outputContainer->Add(fhRCellE); | |
387 | ||
388 | fhXCellE = new TH2F ("hXCellE","Cell X position vs cell energy",xbins,xmin,xmax,nptbins,ptmin,ptmax); | |
389 | fhXCellE->SetXTitle("x (cm)"); | |
390 | fhXCellE->SetYTitle("E (GeV)"); | |
391 | outputContainer->Add(fhXCellE); | |
392 | ||
393 | fhYCellE = new TH2F ("hYCellE","Cell Y position vs cell energy",ybins,ymin,ymax,nptbins,ptmin,ptmax); | |
394 | fhYCellE->SetXTitle("y (cm)"); | |
395 | fhYCellE->SetYTitle("E (GeV)"); | |
396 | outputContainer->Add(fhYCellE); | |
397 | ||
398 | fhZCellE = new TH2F ("hZCellE","Cell Z position vs cell energy",zbins,zmin,zmax,nptbins,ptmin,ptmax); | |
399 | fhZCellE->SetXTitle("z (cm)"); | |
400 | fhZCellE->SetYTitle("E (GeV)"); | |
401 | outputContainer->Add(fhZCellE); | |
402 | ||
403 | fhXYZCell = new TH3F ("hXYZCell","Cell : x vs y vs z",xbins,xmin,xmax,ybins,ymin,ymax,zbins,zmin,zmax); | |
404 | fhXYZCell->SetXTitle("x (cm)"); | |
405 | fhXYZCell->SetYTitle("y (cm)"); | |
406 | fhXYZCell->SetZTitle("z (cm)"); | |
407 | outputContainer->Add(fhXYZCell); | |
408 | ||
409 | ||
410 | Float_t dx = TMath::Abs(xmin)+TMath::Abs(xmax); | |
411 | Float_t dy = TMath::Abs(ymin)+TMath::Abs(ymax); | |
412 | Float_t dz = TMath::Abs(zmin)+TMath::Abs(zmax); | |
413 | Float_t dr = TMath::Abs(rmin)+TMath::Abs(rmax); | |
414 | ||
415 | fhDeltaCellClusterRNCells = new TH2F ("hDeltaCellClusterRNCells","Cluster-Cell R position vs N Clusters per Cell",rbins*2,-dr,dr,nbins,nmin,nmax); | |
416 | fhDeltaCellClusterRNCells->SetXTitle("r = #sqrt{x^{2}+y^{2}} (cm)"); | |
417 | fhDeltaCellClusterRNCells->SetYTitle("N cells per cluster"); | |
418 | outputContainer->Add(fhDeltaCellClusterRNCells); | |
419 | ||
420 | fhDeltaCellClusterXNCells = new TH2F ("hDeltaCellClusterXNCells","Cluster-Cell X position vs N Clusters per Cell",xbins*2,-dx,dx,nbins,nmin,nmax); | |
421 | fhDeltaCellClusterXNCells->SetXTitle("x (cm)"); | |
422 | fhDeltaCellClusterXNCells->SetYTitle("N cells per cluster"); | |
423 | outputContainer->Add(fhDeltaCellClusterXNCells); | |
424 | ||
425 | fhDeltaCellClusterYNCells = new TH2F ("hDeltaCellClusterYNCells","Cluster-Cell Y position vs N Clusters per Cell",ybins*2,-dy,dy,nbins,nmin,nmax); | |
426 | fhDeltaCellClusterYNCells->SetXTitle("y (cm)"); | |
427 | fhDeltaCellClusterYNCells->SetYTitle("N cells per cluster"); | |
428 | outputContainer->Add(fhDeltaCellClusterYNCells); | |
429 | ||
430 | fhDeltaCellClusterZNCells = new TH2F ("hDeltaCellClusterZNCells","Cluster-Cell Z position vs N Clusters per Cell",zbins*2,-dz,dz,nbins,nmin,nmax); | |
431 | fhDeltaCellClusterZNCells->SetXTitle("z (cm)"); | |
432 | fhDeltaCellClusterZNCells->SetYTitle("N cells per cluster"); | |
433 | outputContainer->Add(fhDeltaCellClusterZNCells); | |
434 | ||
435 | fhDeltaCellClusterRE = new TH2F ("hDeltaCellClusterRE","Cluster-Cell R position vs cluster energy",rbins*2,-dr,dr,nptbins,ptmin,ptmax); | |
436 | fhDeltaCellClusterRE->SetXTitle("r = #sqrt{x^{2}+y^{2}} (cm)"); | |
437 | fhDeltaCellClusterRE->SetYTitle("E (GeV)"); | |
438 | outputContainer->Add(fhDeltaCellClusterRE); | |
439 | ||
440 | fhDeltaCellClusterXE = new TH2F ("hDeltaCellClusterXE","Cluster-Cell X position vs cluster energy",xbins*2,-dx,dx,nptbins,ptmin,ptmax); | |
441 | fhDeltaCellClusterXE->SetXTitle("x (cm)"); | |
442 | fhDeltaCellClusterXE->SetYTitle("E (GeV)"); | |
443 | outputContainer->Add(fhDeltaCellClusterXE); | |
444 | ||
445 | fhDeltaCellClusterYE = new TH2F ("hDeltaCellClusterYE","Cluster-Cell Y position vs cluster energy",ybins*2,-dy,dy,nptbins,ptmin,ptmax); | |
446 | fhDeltaCellClusterYE->SetXTitle("y (cm)"); | |
447 | fhDeltaCellClusterYE->SetYTitle("E (GeV)"); | |
448 | outputContainer->Add(fhDeltaCellClusterYE); | |
449 | ||
450 | fhDeltaCellClusterZE = new TH2F ("hDeltaCellClusterZE","Cluster-Cell Z position vs cluster energy",zbins*2,-dz,dz,nptbins,ptmin,ptmax); | |
451 | fhDeltaCellClusterZE->SetXTitle("z (cm)"); | |
452 | fhDeltaCellClusterZE->SetYTitle("E (GeV)"); | |
453 | outputContainer->Add(fhDeltaCellClusterZE); | |
454 | ||
455 | fhEtaPhiAmp = new TH3F ("hEtaPhiAmp","Cell #eta vs cell #phi vs cell energy",netabins,etamin,etamax,nphibins,phimin,phimax,nptbins,ptmin,ptmax); | |
456 | fhEtaPhiAmp->SetXTitle("#eta "); | |
457 | fhEtaPhiAmp->SetYTitle("#phi (rad)"); | |
458 | fhEtaPhiAmp->SetZTitle("E (GeV) "); | |
459 | outputContainer->Add(fhEtaPhiAmp); | |
460 | ||
461 | } | |
c8fe2783 | 462 | |
a6f26052 | 463 | //Calo cells |
5a2dbc3c | 464 | fhNCells = new TH1F ("hNCells","# cells", colmax*rowmax*fNModules,0,colmax*rowmax*fNModules); |
9725fd2a | 465 | fhNCells->SetXTitle("n cells"); |
466 | outputContainer->Add(fhNCells); | |
c8fe2783 | 467 | |
3a75604b | 468 | fhAmplitude = new TH1F ("hAmplitude","Cell Energy", nptbins*2,ptmin,ptmax); |
a5fafd85 | 469 | fhAmplitude->SetXTitle("Cell Energy (GeV)"); |
9725fd2a | 470 | outputContainer->Add(fhAmplitude); |
b8187de4 | 471 | |
472 | fhAmpId = new TH2F ("hAmpId","Cell Energy", nfineptbins,ptfinemin,ptfinemax,rowmax*colmax*fNModules,0,rowmax*colmax*fNModules); | |
0cdb88b8 | 473 | fhAmpId->SetXTitle("Cell Energy (GeV)"); |
474 | outputContainer->Add(fhAmpId); | |
475 | ||
0866d83a | 476 | |
a6f26052 | 477 | //Cell Time histograms, time only available in ESDs |
5a2dbc3c | 478 | if(GetReader()->GetDataType()==AliCaloTrackReader::kESD) { |
50f39b97 | 479 | |
480 | fhCellTimeSpreadRespectToCellMax = new TH1F ("hCellTimeSpreadRespectToCellMax","t_{cell max}-t_{cell i} per cluster", 100,-200,200); | |
481 | fhCellTimeSpreadRespectToCellMax->SetXTitle("#Delta t (ns)"); | |
482 | outputContainer->Add(fhCellTimeSpreadRespectToCellMax); | |
483 | ||
484 | fhCellIdCellLargeTimeSpread= new TH1F ("hCellIdCellLargeTimeSpread","", colmax*rowmax*fNModules,0,colmax*rowmax*fNModules); | |
485 | fhCellIdCellLargeTimeSpread->SetXTitle("Absolute Cell Id"); | |
486 | outputContainer->Add(fhCellIdCellLargeTimeSpread); | |
487 | ||
5a2dbc3c | 488 | fhTime = new TH1F ("hTime","Cell Time",ntimebins,timemin,timemax); |
489 | fhTime->SetXTitle("Cell Time (ns)"); | |
490 | outputContainer->Add(fhTime); | |
c8fe2783 | 491 | |
50f39b97 | 492 | fhTimeId = new TH2F ("hTimeId","Cell Time vs Absolute Id",ntimebins,timemin,timemax,rowmax*colmax*fNModules,0,rowmax*colmax*fNModules); |
5a2dbc3c | 493 | fhTimeId->SetXTitle("Cell Time (ns)"); |
494 | fhTimeId->SetYTitle("Cell Absolute Id"); | |
495 | outputContainer->Add(fhTimeId); | |
c8fe2783 | 496 | |
f2a06a87 | 497 | fhTimeAmp = new TH2F ("hTimeAmp","Cell Time vs Cell Energy",nptbins*2,ptmin,ptmax,ntimebins,timemin,timemax); |
5a2dbc3c | 498 | fhTimeAmp->SetYTitle("Cell Time (ns)"); |
499 | fhTimeAmp->SetXTitle("Cell Energy (GeV)"); | |
500 | outputContainer->Add(fhTimeAmp); | |
c1ac3823 | 501 | |
a6f26052 | 502 | // fhT0Time = new TH1F ("hT0Time","Cell Time",ntimebins,timemin,timemax); |
503 | // fhT0Time->SetXTitle("T_{0} - T_{EMCal} (ns)"); | |
504 | // outputContainer->Add(fhT0Time); | |
505 | // | |
506 | // fhT0TimeId = new TH2F ("hT0TimeId","Cell Time vs Absolute Id",ntimebins,timemin,timemax,rowmax*colmax*fNModules,0,rowmax*colmax*fNModules); | |
507 | // fhT0TimeId->SetXTitle("T_{0} - T_{EMCal} (ns)"); | |
508 | // fhT0TimeId->SetYTitle("Cell Absolute Id"); | |
509 | // outputContainer->Add(fhT0TimeId); | |
510 | // | |
511 | // fhT0TimeAmp = new TH2F ("hT0TimeAmp","Cell Time vs Cell Energy",nptbins*2,ptmin,ptmax,ntimebins,timemin,timemax); | |
512 | // fhT0TimeAmp->SetYTitle("T_{0} - T_{EMCal} (ns)"); | |
513 | // fhT0TimeAmp->SetXTitle("Cell Energy (GeV)"); | |
514 | // outputContainer->Add(fhT0TimeAmp); | |
5a2dbc3c | 515 | } |
516 | ||
a0bb4dc0 | 517 | if(fCorrelateCalos){ |
5a2dbc3c | 518 | fhCaloCorrNClusters = new TH2F ("hCaloCorrNClusters","# clusters in EMCAL vs PHOS", nbins,nmin,nmax,nbins,nmin,nmax); |
a0bb4dc0 | 519 | fhCaloCorrNClusters->SetXTitle("number of clusters in EMCAL"); |
520 | fhCaloCorrNClusters->SetYTitle("number of clusters in PHOS"); | |
521 | outputContainer->Add(fhCaloCorrNClusters); | |
c8fe2783 | 522 | |
5a2dbc3c | 523 | fhCaloCorrEClusters = new TH2F ("hCaloCorrEClusters","summed energy of clusters in EMCAL vs PHOS", nptbins*2,ptmin,ptmax*2,nptbins,ptmin,ptmax*2); |
a0bb4dc0 | 524 | fhCaloCorrEClusters->SetXTitle("#Sigma E of clusters in EMCAL (GeV)"); |
525 | fhCaloCorrEClusters->SetYTitle("#Sigma E of clusters in PHOS (GeV)"); | |
526 | outputContainer->Add(fhCaloCorrEClusters); | |
c8fe2783 | 527 | |
5a2dbc3c | 528 | fhCaloCorrNCells = new TH2F ("hCaloCorrNCells","# Cells in EMCAL vs PHOS", nbins,nmin,nmax, nbins,nmin,nmax); |
a0bb4dc0 | 529 | fhCaloCorrNCells->SetXTitle("number of Cells in EMCAL"); |
530 | fhCaloCorrNCells->SetYTitle("number of Cells in PHOS"); | |
531 | outputContainer->Add(fhCaloCorrNCells); | |
c8fe2783 | 532 | |
5a2dbc3c | 533 | fhCaloCorrECells = new TH2F ("hCaloCorrECells","summed energy of Cells in EMCAL vs PHOS", nptbins*2,ptmin,ptmax*2,nptbins,ptmin,ptmax*2); |
a0bb4dc0 | 534 | fhCaloCorrECells->SetXTitle("#Sigma E of Cells in EMCAL (GeV)"); |
535 | fhCaloCorrECells->SetYTitle("#Sigma E of Cells in PHOS (GeV)"); | |
536 | outputContainer->Add(fhCaloCorrECells); | |
537 | }//correlate calorimeters | |
538 | ||
a6f26052 | 539 | //Module histograms |
50f39b97 | 540 | fhEMod = new TH1F*[fNModules]; |
541 | fhNClustersMod = new TH1F*[fNModules]; | |
542 | fhNCellsPerClusterMod = new TH2F*[fNModules]; | |
543 | fhNCellsMod = new TH1F*[fNModules]; | |
544 | fhGridCellsMod = new TH2F*[fNModules]; | |
545 | fhGridCellsEMod = new TH2F*[fNModules]; | |
546 | fhGridCellsTimeMod = new TH2F*[fNModules]; | |
547 | fhAmplitudeMod = new TH1F*[fNModules]; | |
548 | if(fCalorimeter=="EMCAL") | |
549 | fhAmplitudeModFraction = new TH1F*[fNModules*3]; | |
c8fe2783 | 550 | |
eb5a51ae | 551 | fhTimeAmpPerRCU = new TH2F*[fNModules*fNRCU]; |
a6f26052 | 552 | //fhT0TimeAmpPerRCU = new TH2F*[fNModules*fNRCU]; |
553 | //fhTimeCorrRCU = new TH2F*[fNModules*fNRCU*fNModules*fNRCU]; | |
c1ac3823 | 554 | |
50f39b97 | 555 | fhIMMod = new TH2F*[fNModules]; |
556 | fhIMCellCutMod = new TH2F*[fNModules]; | |
c8fe2783 | 557 | |
a5fafd85 | 558 | for(Int_t imod = 0; imod < fNModules; imod++){ |
559 | ||
560 | fhEMod[imod] = new TH1F (Form("hE_Mod%d",imod),Form("Cluster reconstructed Energy in Module %d ",imod), nptbins,ptmin,ptmax); | |
561 | fhEMod[imod]->SetXTitle("E (GeV)"); | |
562 | outputContainer->Add(fhEMod[imod]); | |
563 | ||
5a2dbc3c | 564 | fhNClustersMod[imod] = new TH1F (Form("hNClusters_Mod%d",imod),Form("# clusters in Module %d",imod), nbins,nmin,nmax); |
a5fafd85 | 565 | fhNClustersMod[imod]->SetXTitle("number of clusters"); |
566 | outputContainer->Add(fhNClustersMod[imod]); | |
567 | ||
568 | fhNCellsPerClusterMod[imod] = new TH2F (Form("hNCellsPerCluster_Mod%d",imod), | |
c8fe2783 | 569 | Form("# cells per cluster vs cluster energy in Module %d",imod), |
570 | nptbins,ptmin,ptmax, nbins,nmin,nmax); | |
a5fafd85 | 571 | fhNCellsPerClusterMod[imod]->SetXTitle("E (GeV)"); |
572 | fhNCellsPerClusterMod[imod]->SetYTitle("n cells"); | |
573 | outputContainer->Add(fhNCellsPerClusterMod[imod]); | |
574 | ||
5a2dbc3c | 575 | fhNCellsMod[imod] = new TH1F (Form("hNCells_Mod%d",imod),Form("# cells in Module %d",imod), colmax*rowmax,0,colmax*rowmax); |
a5fafd85 | 576 | fhNCellsMod[imod]->SetXTitle("n cells"); |
577 | outputContainer->Add(fhNCellsMod[imod]); | |
a5fafd85 | 578 | fhGridCellsMod[imod] = new TH2F (Form("hGridCells_Mod%d",imod),Form("Entries in grid of cells in Module %d",imod), |
c8fe2783 | 579 | colmax+2,-1.5,colmax+0.5, rowmax+2,-1.5,rowmax+0.5); |
f2a06a87 | 580 | fhGridCellsMod[imod]->SetYTitle("row (phi direction)"); |
a5fafd85 | 581 | fhGridCellsMod[imod]->SetXTitle("column (eta direction)"); |
582 | outputContainer->Add(fhGridCellsMod[imod]); | |
c8fe2783 | 583 | |
a5fafd85 | 584 | fhGridCellsEMod[imod] = new TH2F (Form("hGridCellsE_Mod%d",imod),Form("Accumulated energy in grid of cells in Module %d",imod), |
c8fe2783 | 585 | colmax+2,-1.5,colmax+0.5, rowmax+2,-1.5,rowmax+0.5); |
f2a06a87 | 586 | fhGridCellsEMod[imod]->SetYTitle("row (phi direction)"); |
a5fafd85 | 587 | fhGridCellsEMod[imod]->SetXTitle("column (eta direction)"); |
588 | outputContainer->Add(fhGridCellsEMod[imod]); | |
589 | ||
50f39b97 | 590 | fhGridCellsTimeMod[imod] = new TH2F (Form("hGridCellsTime_Mod%d",imod),Form("Accumulated time in grid of cells in Module %d, with E > 0.5 GeV",imod), |
c8fe2783 | 591 | colmax+2,-1.5,colmax+0.5, rowmax+2,-1.5,rowmax+0.5); |
50f39b97 | 592 | fhGridCellsTimeMod[imod]->SetYTitle("row (phi direction)"); |
593 | fhGridCellsTimeMod[imod]->SetXTitle("column (eta direction)"); | |
594 | outputContainer->Add(fhGridCellsTimeMod[imod]); | |
595 | ||
5a2dbc3c | 596 | fhAmplitudeMod[imod] = new TH1F (Form("hAmplitude_Mod%d",imod),Form("Cell Energy in Module %d",imod), nptbins*2,ptmin,ptmax); |
a5fafd85 | 597 | fhAmplitudeMod[imod]->SetXTitle("Cell Energy (GeV)"); |
598 | outputContainer->Add(fhAmplitudeMod[imod]); | |
599 | ||
50f39b97 | 600 | if(fCalorimeter == "EMCAL"){ |
601 | for(Int_t ifrac = 0; ifrac < 3; ifrac++){ | |
602 | fhAmplitudeModFraction[imod*3+ifrac] = new TH1F (Form("hAmplitude_Mod%d_Frac%d",imod,ifrac),Form("Cell reconstructed Energy in Module %d, Fraction %d ",imod,ifrac), nptbins,ptmin,ptmax); | |
603 | fhAmplitudeModFraction[imod*3+ifrac]->SetXTitle("E (GeV)"); | |
604 | outputContainer->Add(fhAmplitudeModFraction[imod*3+ifrac]); | |
605 | } | |
eb5a51ae | 606 | |
50f39b97 | 607 | } |
608 | ||
eb5a51ae | 609 | for(Int_t ircu = 0; ircu < fNRCU; ircu++){ |
c8fe2783 | 610 | fhTimeAmpPerRCU[imod*fNRCU+ircu] = new TH2F (Form("hTimeAmp_Mod%d_RCU%d",imod,ircu), |
611 | Form("Cell Energy vs Cell Time in Module %d, RCU %d ",imod,ircu), | |
612 | nptbins,ptmin,ptmax,ntimebins,timemin,timemax); | |
613 | fhTimeAmpPerRCU[imod*fNRCU+ircu]->SetXTitle("E (GeV)"); | |
614 | fhTimeAmpPerRCU[imod*fNRCU+ircu]->SetYTitle("time (ns)"); | |
615 | outputContainer->Add(fhTimeAmpPerRCU[imod*fNRCU+ircu]); | |
c1ac3823 | 616 | |
a6f26052 | 617 | // fhT0TimeAmpPerRCU[imod*fNRCU+ircu] = new TH2F (Form("hT0TimeAmp_Mod%d_RCU%d",imod,ircu), |
618 | // Form("Cell Energy vs T0-Cell Time in Module %d, RCU %d ",imod,ircu), | |
619 | // nptbins,ptmin,ptmax,ntimebins,timemin,timemax); | |
620 | // fhT0TimeAmpPerRCU[imod*fNRCU+ircu]->SetXTitle("E (GeV)"); | |
621 | // fhT0TimeAmpPerRCU[imod*fNRCU+ircu]->SetYTitle("T_{0} - T_{EMCal} (ns)"); | |
622 | // outputContainer->Add(fhT0TimeAmpPerRCU[imod*fNRCU+ircu]); | |
623 | // | |
c1ac3823 | 624 | |
a6f26052 | 625 | // for(Int_t imod2 = 0; imod2 < fNModules; imod2++){ |
626 | // for(Int_t ircu2 = 0; ircu2 < fNModules; ircu2++){ | |
627 | // Int_t index = (imod2*fNRCU+ircu2)+(fNModules*fNRCU)*(ircu+imod)+fNRCU*fNModules*imod; | |
628 | // fhTimeCorrRCU[index] = new TH2F (Form("hTimeCorrRCU_Mod%d_RCU%d_CompareTo_Mod%d_RCU%d",imod, ircu,imod2, ircu2), | |
629 | // Form("Cell Energy > 0.3, Correlate cell Time in Module %d, RCU %d to Module %d, RCU %d",imod,ircu,imod2, ircu2), | |
630 | // ntimebins,timemin,timemax,ntimebins,timemin,timemax); | |
631 | // fhTimeCorrRCU[index]->SetXTitle("Trigger Cell Time (ns)"); | |
632 | // fhTimeCorrRCU[index]->SetYTitle("Cell Time (ns)"); | |
633 | // outputContainer->Add(fhTimeCorrRCU[index]); | |
634 | // } | |
635 | // } | |
eb5a51ae | 636 | } |
637 | ||
638 | ||
a5fafd85 | 639 | fhIMMod[imod] = new TH2F (Form("hIM_Mod%d",imod), |
c8fe2783 | 640 | Form("Cluster pairs Invariant mass vs reconstructed pair energy in Module %d",imod), |
641 | nptbins,ptmin,ptmax,nmassbins,massmin,massmax); | |
583c48f1 | 642 | fhIMMod[imod]->SetXTitle("p_{T, cluster pairs} (GeV) "); |
a5fafd85 | 643 | fhIMMod[imod]->SetYTitle("M_{cluster pairs} (GeV/c^{2})"); |
644 | outputContainer->Add(fhIMMod[imod]); | |
c8fe2783 | 645 | |
a5fafd85 | 646 | fhIMCellCutMod[imod] = new TH2F (Form("hIMCellCut_Mod%d",imod), |
c8fe2783 | 647 | Form("Cluster (n cells > 1) pairs Invariant mass vs reconstructed pair energy in Module %d",imod), |
648 | nptbins,ptmin,ptmax,nmassbins,massmin,massmax); | |
583c48f1 | 649 | fhIMCellCutMod[imod]->SetXTitle("p_{T, cluster pairs} (GeV) "); |
a5fafd85 | 650 | fhIMCellCutMod[imod]->SetYTitle("M_{cluster pairs} (GeV/c^{2})"); |
651 | outputContainer->Add(fhIMCellCutMod[imod]); | |
652 | ||
653 | } | |
654 | ||
655 | ||
a6f26052 | 656 | //Monte Carlo Histograms |
9725fd2a | 657 | if(IsDataMC()){ |
658 | ||
5a2dbc3c | 659 | fhDeltaE = new TH1F ("hDeltaE","MC - Reco E ", nptbins*2,-ptmax,ptmax); |
9725fd2a | 660 | fhDeltaE->SetXTitle("#Delta E (GeV)"); |
661 | outputContainer->Add(fhDeltaE); | |
662 | ||
5a2dbc3c | 663 | fhDeltaPt = new TH1F ("hDeltaPt","MC - Reco p_{T} ", nptbins*2,-ptmax,ptmax); |
9725fd2a | 664 | fhDeltaPt->SetXTitle("#Delta p_{T} (GeV/c)"); |
665 | outputContainer->Add(fhDeltaPt); | |
666 | ||
5a2dbc3c | 667 | fhDeltaPhi = new TH1F ("hDeltaPhi","MC - Reco #phi ",nphibins*2,-phimax,phimax); |
9725fd2a | 668 | fhDeltaPhi->SetXTitle("#Delta #phi (rad)"); |
669 | outputContainer->Add(fhDeltaPhi); | |
670 | ||
5a2dbc3c | 671 | fhDeltaEta = new TH1F ("hDeltaEta","MC- Reco #eta",netabins*2,-etamax,etamax); |
9725fd2a | 672 | fhDeltaEta->SetXTitle("#Delta #eta "); |
673 | outputContainer->Add(fhDeltaEta); | |
674 | ||
5a2dbc3c | 675 | fhRatioE = new TH1F ("hRatioE","Reco/MC E ", nratiobins,ratiomin,ratiomax); |
9725fd2a | 676 | fhRatioE->SetXTitle("E_{reco}/E_{gen}"); |
677 | outputContainer->Add(fhRatioE); | |
678 | ||
5a2dbc3c | 679 | fhRatioPt = new TH1F ("hRatioPt","Reco/MC p_{T} ", nratiobins,ratiomin,ratiomax); |
9725fd2a | 680 | fhRatioPt->SetXTitle("p_{T, reco}/p_{T, gen}"); |
681 | outputContainer->Add(fhRatioPt); | |
682 | ||
5a2dbc3c | 683 | fhRatioPhi = new TH1F ("hRatioPhi","Reco/MC #phi ",nratiobins,ratiomin,ratiomax); |
9725fd2a | 684 | fhRatioPhi->SetXTitle("#phi_{reco}/#phi_{gen}"); |
685 | outputContainer->Add(fhRatioPhi); | |
686 | ||
5a2dbc3c | 687 | fhRatioEta = new TH1F ("hRatioEta","Reco/MC #eta",nratiobins,ratiomin,ratiomax); |
9725fd2a | 688 | fhRatioEta->SetXTitle("#eta_{reco}/#eta_{gen} "); |
689 | outputContainer->Add(fhRatioEta); | |
690 | ||
691 | fh2E = new TH2F ("h2E","E distribution, reconstructed vs generated", nptbins,ptmin,ptmax,nptbins,ptmin,ptmax); | |
692 | fh2E->SetXTitle("E_{rec} (GeV)"); | |
693 | fh2E->SetYTitle("E_{gen} (GeV)"); | |
694 | outputContainer->Add(fh2E); | |
695 | ||
696 | fh2Pt = new TH2F ("h2Pt","p_T distribution, reconstructed vs generated", nptbins,ptmin,ptmax,nptbins,ptmin,ptmax); | |
697 | fh2Pt->SetXTitle("p_{T,rec} (GeV/c)"); | |
698 | fh2Pt->SetYTitle("p_{T,gen} (GeV/c)"); | |
699 | outputContainer->Add(fh2Pt); | |
700 | ||
701 | fh2Phi = new TH2F ("h2Phi","#phi distribution, reconstructed vs generated", nphibins,phimin,phimax, nphibins,phimin,phimax); | |
702 | fh2Phi->SetXTitle("#phi_{rec} (rad)"); | |
703 | fh2Phi->SetYTitle("#phi_{gen} (rad)"); | |
704 | outputContainer->Add(fh2Phi); | |
705 | ||
706 | fh2Eta = new TH2F ("h2Eta","#eta distribution, reconstructed vs generated", netabins,etamin,etamax,netabins,etamin,etamax); | |
707 | fh2Eta->SetXTitle("#eta_{rec} "); | |
708 | fh2Eta->SetYTitle("#eta_{gen} "); | |
709 | outputContainer->Add(fh2Eta); | |
710 | ||
a6f26052 | 711 | //Fill histos depending on origin of cluster |
9725fd2a | 712 | fhGamE = new TH2F ("hGamE","E reconstructed vs E generated from #gamma", nptbins,ptmin,ptmax, nptbins,ptmin,ptmax); |
06e5656a | 713 | fhGamE->SetXTitle("E_{rec} (GeV)"); |
714 | fhGamE->SetXTitle("E_{gen} (GeV)"); | |
9725fd2a | 715 | outputContainer->Add(fhGamE); |
716 | ||
717 | fhGamPt = new TH2F ("hGamPt","p_{T} reconstructed vs E generated from #gamma", nptbins,ptmin,ptmax, nptbins,ptmin,ptmax); | |
06e5656a | 718 | fhGamPt->SetXTitle("p_{T rec} (GeV/c)"); |
719 | fhGamPt->SetYTitle("p_{T gen} (GeV/c)"); | |
9725fd2a | 720 | outputContainer->Add(fhGamPt); |
721 | ||
722 | fhGamPhi = new TH2F ("hGamPhi","#phi reconstructed vs E generated from #gamma",nphibins,phimin,phimax,nphibins,phimin,phimax); | |
06e5656a | 723 | fhGamPhi->SetXTitle("#phi_{rec} (rad)"); |
724 | fhGamPhi->SetYTitle("#phi_{gen} (rad)"); | |
9725fd2a | 725 | outputContainer->Add(fhGamPhi); |
726 | ||
727 | fhGamEta = new TH2F ("hGamEta","#eta reconstructed vs E generated from #gamma",netabins,etamin,etamax,netabins,etamin,etamax); | |
06e5656a | 728 | fhGamEta->SetXTitle("#eta_{rec} "); |
729 | fhGamEta->SetYTitle("#eta_{gen} "); | |
9725fd2a | 730 | outputContainer->Add(fhGamEta); |
731 | ||
5a2dbc3c | 732 | fhGamDeltaE = new TH1F ("hGamDeltaE","#gamma MC - Reco E ", nptbins*2,-ptmax,ptmax); |
9725fd2a | 733 | fhGamDeltaE->SetXTitle("#Delta E (GeV)"); |
734 | outputContainer->Add(fhGamDeltaE); | |
735 | ||
5a2dbc3c | 736 | fhGamDeltaPt = new TH1F ("hGamDeltaPt","#gamma MC - Reco p_{T} ", nptbins*2,-ptmax,ptmax); |
9725fd2a | 737 | fhGamDeltaPt->SetXTitle("#Delta p_{T} (GeV/c)"); |
738 | outputContainer->Add(fhGamDeltaPt); | |
739 | ||
5a2dbc3c | 740 | fhGamDeltaPhi = new TH1F ("hGamDeltaPhi","#gamma MC - Reco #phi ",nphibins*2,-phimax,phimax); |
9725fd2a | 741 | fhGamDeltaPhi->SetXTitle("#Delta #phi (rad)"); |
742 | outputContainer->Add(fhGamDeltaPhi); | |
743 | ||
5a2dbc3c | 744 | fhGamDeltaEta = new TH1F ("hGamDeltaEta","#gamma MC- Reco #eta",netabins*2,-etamax,etamax); |
9725fd2a | 745 | fhGamDeltaEta->SetXTitle("#Delta #eta "); |
746 | outputContainer->Add(fhGamDeltaEta); | |
747 | ||
5a2dbc3c | 748 | fhGamRatioE = new TH1F ("hGamRatioE","#gamma Reco/MC E ", nratiobins,ratiomin,ratiomax); |
9725fd2a | 749 | fhGamRatioE->SetXTitle("E_{reco}/E_{gen}"); |
750 | outputContainer->Add(fhGamRatioE); | |
751 | ||
5a2dbc3c | 752 | fhGamRatioPt = new TH1F ("hGamRatioPt","#gamma Reco/MC p_{T} ", nratiobins,ratiomin,ratiomax); |
9725fd2a | 753 | fhGamRatioPt->SetXTitle("p_{T, reco}/p_{T, gen}"); |
754 | outputContainer->Add(fhGamRatioPt); | |
755 | ||
5a2dbc3c | 756 | fhGamRatioPhi = new TH1F ("hGamRatioPhi","#gamma Reco/MC #phi ",nratiobins,ratiomin,ratiomax); |
9725fd2a | 757 | fhGamRatioPhi->SetXTitle("#phi_{reco}/#phi_{gen}"); |
758 | outputContainer->Add(fhGamRatioPhi); | |
759 | ||
5a2dbc3c | 760 | fhGamRatioEta = new TH1F ("hGamRatioEta","#gamma Reco/MC #eta",nratiobins,ratiomin,ratiomax); |
9725fd2a | 761 | fhGamRatioEta->SetXTitle("#eta_{reco}/#eta_{gen} "); |
762 | outputContainer->Add(fhGamRatioEta); | |
c8fe2783 | 763 | |
06e5656a | 764 | fhPi0E = new TH2F ("hPi0E","E reconstructed vs E generated from #pi^{0}", nptbins,ptmin,ptmax, nptbins,ptmin,ptmax); |
765 | fhPi0E->SetXTitle("E_{rec} (GeV)"); | |
766 | fhPi0E->SetYTitle("E_{gen} (GeV)"); | |
9725fd2a | 767 | outputContainer->Add(fhPi0E); |
768 | ||
769 | fhPi0Pt = new TH2F ("hPi0Pt","p_{T} reconstructed vs E generated from #pi^{0}", nptbins,ptmin,ptmax, nptbins,ptmin,ptmax); | |
06e5656a | 770 | fhPi0Pt->SetXTitle("p_{T rec} (GeV/c)"); |
771 | fhPi0Pt->SetYTitle("p_{T gen} (GeV/c)"); | |
9725fd2a | 772 | outputContainer->Add(fhPi0Pt); |
773 | ||
774 | fhPi0Phi = new TH2F ("hPi0Phi","#phi reconstructed vs E generated from #pi^{0}",nphibins,phimin,phimax,nphibins,phimin,phimax); | |
06e5656a | 775 | fhPi0Phi->SetXTitle("#phi_{rec} (rad)"); |
776 | fhPi0Phi->SetYTitle("#phi_{gen} (rad)"); | |
9725fd2a | 777 | outputContainer->Add(fhPi0Phi); |
778 | ||
779 | fhPi0Eta = new TH2F ("hPi0Eta","#eta reconstructed vs E generated from #pi^{0}",netabins,etamin,etamax,netabins,etamin,etamax); | |
06e5656a | 780 | fhPi0Eta->SetXTitle("#eta_{rec} "); |
781 | fhPi0Eta->SetYTitle("#eta_{gen} "); | |
9725fd2a | 782 | outputContainer->Add(fhPi0Eta); |
783 | ||
784 | fhEleE = new TH2F ("hEleE","E reconstructed vs E generated from e^{#pm}", nptbins,ptmin,ptmax, nptbins,ptmin,ptmax); | |
06e5656a | 785 | fhEleE->SetXTitle("E_{rec} (GeV)"); |
786 | fhEleE->SetXTitle("E_{gen} (GeV)"); | |
9725fd2a | 787 | outputContainer->Add(fhEleE); |
788 | ||
789 | fhElePt = new TH2F ("hElePt","p_{T} reconstructed vs E generated from e^{#pm}", nptbins,ptmin,ptmax, nptbins,ptmin,ptmax); | |
06e5656a | 790 | fhElePt->SetXTitle("p_{T rec} (GeV/c)"); |
791 | fhElePt->SetYTitle("p_{T gen} (GeV/c)"); | |
9725fd2a | 792 | outputContainer->Add(fhElePt); |
793 | ||
06e5656a | 794 | fhElePhi = new TH2F ("hElePhi","#phi reconstructed vs E generated from e^{#pm}",nphibins,phimin,phimax,nphibins,phimin,phimax); |
795 | fhElePhi->SetXTitle("#phi_{rec} (rad)"); | |
796 | fhElePhi->SetYTitle("#phi_{gen} (rad)"); | |
9725fd2a | 797 | outputContainer->Add(fhElePhi); |
798 | ||
799 | fhEleEta = new TH2F ("hEleEta","#eta reconstructed vs E generated from e^{#pm}",netabins,etamin,etamax,netabins,etamin,etamax); | |
06e5656a | 800 | fhEleEta->SetXTitle("#eta_{rec} "); |
801 | fhEleEta->SetYTitle("#eta_{gen} "); | |
9725fd2a | 802 | outputContainer->Add(fhEleEta); |
803 | ||
06e5656a | 804 | fhNeHadE = new TH2F ("hNeHadE","E reconstructed vs E generated from neutral hadron", nptbins,ptmin,ptmax, nptbins,ptmin,ptmax); |
805 | fhNeHadE->SetXTitle("E_{rec} (GeV)"); | |
806 | fhNeHadE->SetYTitle("E_{gen} (GeV)"); | |
9725fd2a | 807 | outputContainer->Add(fhNeHadE); |
808 | ||
809 | fhNeHadPt = new TH2F ("hNeHadPt","p_{T} reconstructed vs E generated from neutral hadron", nptbins,ptmin,ptmax, nptbins,ptmin,ptmax); | |
06e5656a | 810 | fhNeHadPt->SetXTitle("p_{T rec} (GeV/c)"); |
811 | fhNeHadPt->SetYTitle("p_{T gen} (GeV/c)"); | |
9725fd2a | 812 | outputContainer->Add(fhNeHadPt); |
813 | ||
814 | fhNeHadPhi = new TH2F ("hNeHadPhi","#phi reconstructed vs E generated from neutral hadron",nphibins,phimin,phimax,nphibins,phimin,phimax); | |
06e5656a | 815 | fhNeHadPhi->SetXTitle("#phi_{rec} (rad)"); |
816 | fhNeHadPhi->SetYTitle("#phi_{gen} (rad)"); | |
9725fd2a | 817 | outputContainer->Add(fhNeHadPhi); |
818 | ||
819 | fhNeHadEta = new TH2F ("hNeHadEta","#eta reconstructed vs E generated from neutral hadron",netabins,etamin,etamax,netabins,etamin,etamax); | |
06e5656a | 820 | fhNeHadEta->SetXTitle("#eta_{rec} "); |
821 | fhNeHadEta->SetYTitle("#eta_{gen} "); | |
9725fd2a | 822 | outputContainer->Add(fhNeHadEta); |
823 | ||
06e5656a | 824 | fhChHadE = new TH2F ("hChHadE","E reconstructed vs E generated from charged hadron", nptbins,ptmin,ptmax, nptbins,ptmin,ptmax); |
825 | fhChHadE->SetXTitle("E_{rec} (GeV)"); | |
826 | fhChHadE->SetYTitle("E_{gen} (GeV)"); | |
9725fd2a | 827 | outputContainer->Add(fhChHadE); |
828 | ||
829 | fhChHadPt = new TH2F ("hChHadPt","p_{T} reconstructed vs E generated from charged hadron", nptbins,ptmin,ptmax, nptbins,ptmin,ptmax); | |
06e5656a | 830 | fhChHadPt->SetXTitle("p_{T rec} (GeV/c)"); |
831 | fhChHadPt->SetYTitle("p_{T gen} (GeV/c)"); | |
9725fd2a | 832 | outputContainer->Add(fhChHadPt); |
833 | ||
834 | fhChHadPhi = new TH2F ("hChHadPhi","#phi reconstructed vs E generated from charged hadron",nphibins,phimin,phimax,nphibins,phimin,phimax); | |
06e5656a | 835 | fhChHadPhi->SetXTitle("#phi_{rec} (rad)"); |
836 | fhChHadPhi->SetYTitle("#phi_{gen} (rad)"); | |
9725fd2a | 837 | outputContainer->Add(fhChHadPhi); |
838 | ||
839 | fhChHadEta = new TH2F ("hChHadEta","#eta reconstructed vs E generated from charged hadron",netabins,etamin,etamax,netabins,etamin,etamax); | |
06e5656a | 840 | fhChHadEta->SetXTitle("#eta_{rec} "); |
841 | fhChHadEta->SetYTitle("#eta_{gen} "); | |
9725fd2a | 842 | outputContainer->Add(fhChHadEta); |
843 | ||
a6f26052 | 844 | //Charged clusters |
06e5656a | 845 | |
846 | fhGamECharged = new TH2F ("hGamECharged","E reconstructed vs E generated from #gamma, track matched cluster", nptbins,ptmin,ptmax, nptbins,ptmin,ptmax); | |
847 | fhGamECharged->SetXTitle("E_{rec} (GeV)"); | |
848 | fhGamECharged->SetXTitle("E_{gen} (GeV)"); | |
849 | outputContainer->Add(fhGamECharged); | |
850 | ||
851 | fhGamPtCharged = new TH2F ("hGamPtCharged","p_{T} reconstructed vs E generated from #gamma, track matched cluster", nptbins,ptmin,ptmax, nptbins,ptmin,ptmax); | |
852 | fhGamPtCharged->SetXTitle("p_{T rec} (GeV/c)"); | |
853 | fhGamPtCharged->SetYTitle("p_{T gen} (GeV/c)"); | |
854 | outputContainer->Add(fhGamPtCharged); | |
855 | ||
856 | fhGamPhiCharged = new TH2F ("hGamPhiCharged","#phi reconstructed vs E generated from #gamma, track matched cluster",nphibins,phimin,phimax,nphibins,phimin,phimax); | |
857 | fhGamPhiCharged->SetXTitle("#phi_{rec} (rad)"); | |
858 | fhGamPhiCharged->SetYTitle("#phi_{gen} (rad)"); | |
859 | outputContainer->Add(fhGamPhiCharged); | |
860 | ||
861 | fhGamEtaCharged = new TH2F ("hGamEtaCharged","#eta reconstructed vs E generated from #gamma, track matched cluster",netabins,etamin,etamax,netabins,etamin,etamax); | |
862 | fhGamEtaCharged->SetXTitle("#eta_{rec} "); | |
863 | fhGamEtaCharged->SetYTitle("#eta_{gen} "); | |
864 | outputContainer->Add(fhGamEtaCharged); | |
865 | ||
866 | fhPi0ECharged = new TH2F ("hPi0ECharged","E reconstructed vs E generated from #pi^{0}, track matched cluster", nptbins,ptmin,ptmax, nptbins,ptmin,ptmax); | |
867 | fhPi0ECharged->SetXTitle("E_{rec} (GeV)"); | |
868 | fhPi0ECharged->SetYTitle("E_{gen} (GeV)"); | |
869 | outputContainer->Add(fhPi0ECharged); | |
870 | ||
871 | fhPi0PtCharged = new TH2F ("hPi0PtCharged","p_{T} reconstructed vs E generated from #pi^{0}, track matched cluster", nptbins,ptmin,ptmax, nptbins,ptmin,ptmax); | |
872 | fhPi0PtCharged->SetXTitle("p_{T rec} (GeV/c)"); | |
873 | fhPi0PtCharged->SetYTitle("p_{T gen} (GeV/c)"); | |
874 | outputContainer->Add(fhPi0PtCharged); | |
875 | ||
876 | fhPi0PhiCharged = new TH2F ("hPi0PhiCharged","#phi reconstructed vs E generated from #pi^{0}, track matched cluster",nphibins,phimin,phimax,nphibins,phimin,phimax); | |
877 | fhPi0PhiCharged->SetXTitle("#phi_{rec} (rad)"); | |
878 | fhPi0PhiCharged->SetYTitle("#phi_{gen} (rad)"); | |
879 | outputContainer->Add(fhPi0PhiCharged); | |
880 | ||
881 | fhPi0EtaCharged = new TH2F ("hPi0EtaCharged","#eta reconstructed vs E generated from #pi^{0}, track matched cluster",netabins,etamin,etamax,netabins,etamin,etamax); | |
882 | fhPi0EtaCharged->SetXTitle("#eta_{rec} "); | |
883 | fhPi0EtaCharged->SetYTitle("#eta_{gen} "); | |
884 | outputContainer->Add(fhPi0EtaCharged); | |
885 | ||
886 | fhEleECharged = new TH2F ("hEleECharged","E reconstructed vs E generated from e^{#pm}, track matched cluster", nptbins,ptmin,ptmax, nptbins,ptmin,ptmax); | |
887 | fhEleECharged->SetXTitle("E_{rec} (GeV)"); | |
888 | fhEleECharged->SetXTitle("E_{gen} (GeV)"); | |
889 | outputContainer->Add(fhEleECharged); | |
890 | ||
891 | fhElePtCharged = new TH2F ("hElePtCharged","p_{T} reconstructed vs E generated from e^{#pm}, track matched cluster", nptbins,ptmin,ptmax, nptbins,ptmin,ptmax); | |
892 | fhElePtCharged->SetXTitle("p_{T rec} (GeV/c)"); | |
893 | fhElePtCharged->SetYTitle("p_{T gen} (GeV/c)"); | |
894 | outputContainer->Add(fhElePtCharged); | |
895 | ||
896 | fhElePhiCharged = new TH2F ("hElePhiCharged","#phi reconstructed vs E generated from e^{#pm}, track matched cluster",nphibins,phimin,phimax,nphibins,phimin,phimax); | |
897 | fhElePhiCharged->SetXTitle("#phi_{rec} (rad)"); | |
898 | fhElePhiCharged->SetYTitle("#phi_{gen} (rad)"); | |
899 | outputContainer->Add(fhElePhiCharged); | |
900 | ||
901 | fhEleEtaCharged = new TH2F ("hEleEtaCharged","#eta reconstructed vs E generated from e^{#pm}, track matched cluster",netabins,etamin,etamax,netabins,etamin,etamax); | |
902 | fhEleEtaCharged->SetXTitle("#eta_{rec} "); | |
903 | fhEleEtaCharged->SetYTitle("#eta_{gen} "); | |
904 | outputContainer->Add(fhEleEtaCharged); | |
905 | ||
906 | fhNeHadECharged = new TH2F ("hNeHadECharged","E reconstructed vs E generated from neutral hadron, track matched cluster", nptbins,ptmin,ptmax, nptbins,ptmin,ptmax); | |
907 | fhNeHadECharged->SetXTitle("E_{rec} (GeV)"); | |
908 | fhNeHadECharged->SetYTitle("E_{gen} (GeV)"); | |
909 | outputContainer->Add(fhNeHadECharged); | |
910 | ||
911 | fhNeHadPtCharged = new TH2F ("hNeHadPtCharged","p_{T} reconstructed vs E generated from neutral hadron, track matched cluster", nptbins,ptmin,ptmax, nptbins,ptmin,ptmax); | |
912 | fhNeHadPtCharged->SetXTitle("p_{T rec} (GeV/c)"); | |
913 | fhNeHadPtCharged->SetYTitle("p_{T gen} (GeV/c)"); | |
914 | outputContainer->Add(fhNeHadPtCharged); | |
915 | ||
916 | fhNeHadPhiCharged = new TH2F ("hNeHadPhiCharged","#phi reconstructed vs E generated from neutral hadron, track matched cluster",nphibins,phimin,phimax,nphibins,phimin,phimax); | |
917 | fhNeHadPhiCharged->SetXTitle("#phi_{rec} (rad)"); | |
918 | fhNeHadPhiCharged->SetYTitle("#phi_{gen} (rad)"); | |
919 | outputContainer->Add(fhNeHadPhiCharged); | |
920 | ||
921 | fhNeHadEtaCharged = new TH2F ("hNeHadEtaCharged","#eta reconstructed vs E generated from neutral hadron, track matched cluster",netabins,etamin,etamax,netabins,etamin,etamax); | |
922 | fhNeHadEtaCharged->SetXTitle("#eta_{rec} "); | |
923 | fhNeHadEtaCharged->SetYTitle("#eta_{gen} "); | |
924 | outputContainer->Add(fhNeHadEtaCharged); | |
925 | ||
926 | fhChHadECharged = new TH2F ("hChHadECharged","E reconstructed vs E generated from charged hadron, track matched cluster", nptbins,ptmin,ptmax, nptbins,ptmin,ptmax); | |
927 | fhChHadECharged->SetXTitle("E_{rec} (GeV)"); | |
928 | fhChHadECharged->SetYTitle("E_{gen} (GeV)"); | |
929 | outputContainer->Add(fhChHadECharged); | |
930 | ||
931 | fhChHadPtCharged = new TH2F ("hChHadPtCharged","p_{T} reconstructed vs E generated from charged hadron, track matched cluster", nptbins,ptmin,ptmax, nptbins,ptmin,ptmax); | |
932 | fhChHadPtCharged->SetXTitle("p_{T rec} (GeV/c)"); | |
933 | fhChHadPtCharged->SetYTitle("p_{T gen} (GeV/c)"); | |
934 | outputContainer->Add(fhChHadPtCharged); | |
935 | ||
936 | fhChHadPhiCharged = new TH2F ("hChHadPhiCharged","#phi reconstructed vs E generated from charged hadron, track matched cluster",nphibins,phimin,phimax,nphibins,phimin,phimax); | |
937 | fhChHadPhiCharged->SetXTitle("#phi (rad)"); | |
938 | fhChHadPhiCharged->SetXTitle("#phi_{rec} (rad)"); | |
939 | fhChHadPhiCharged->SetYTitle("#phi_{gen} (rad)"); | |
940 | outputContainer->Add(fhChHadPhiCharged); | |
941 | ||
942 | fhChHadEtaCharged = new TH2F ("hChHadEtaCharged","#eta reconstructed vs E generated from charged hadron, track matched cluster",netabins,etamin,etamax,netabins,etamin,etamax); | |
943 | fhChHadEtaCharged->SetXTitle("#eta_{rec} "); | |
944 | fhChHadEtaCharged->SetYTitle("#eta_{gen} "); | |
945 | outputContainer->Add(fhChHadEtaCharged); | |
946 | ||
a6f26052 | 947 | //Vertex of generated particles |
9725fd2a | 948 | |
5a2dbc3c | 949 | fhEMVxyz = new TH2F ("hEMVxyz","Production vertex of reconstructed ElectroMagnetic particles",nvdistbins,vdistmin,vdistmax,nvdistbins,vdistmin,vdistmax);//,100,0,500); |
9725fd2a | 950 | fhEMVxyz->SetXTitle("v_{x}"); |
951 | fhEMVxyz->SetYTitle("v_{y}"); | |
a6f26052 | 952 | //fhEMVxyz->SetZTitle("v_{z}"); |
9725fd2a | 953 | outputContainer->Add(fhEMVxyz); |
954 | ||
5a2dbc3c | 955 | fhHaVxyz = new TH2F ("hHaVxyz","Production vertex of reconstructed hadrons",nvdistbins,vdistmin,vdistmax,nvdistbins,vdistmin,vdistmax);//,100,0,500); |
9725fd2a | 956 | fhHaVxyz->SetXTitle("v_{x}"); |
957 | fhHaVxyz->SetYTitle("v_{y}"); | |
a6f26052 | 958 | //fhHaVxyz->SetZTitle("v_{z}"); |
9725fd2a | 959 | outputContainer->Add(fhHaVxyz); |
960 | ||
5a2dbc3c | 961 | fhEMR = new TH2F ("hEMR","Distance to production vertex of reconstructed ElectroMagnetic particles vs E rec",nptbins,ptmin,ptmax,nvdistbins,vdistmin,vdistmax); |
9725fd2a | 962 | fhEMR->SetXTitle("E (GeV)"); |
963 | fhEMR->SetYTitle("TMath::Sqrt(v_{x}^{2}+v_{y}^{2})"); | |
964 | outputContainer->Add(fhEMR); | |
965 | ||
5a2dbc3c | 966 | fhHaR = new TH2F ("hHaR","Distance to production vertex of reconstructed Hadrons vs E rec",nptbins,ptmin,ptmax,nvdistbins,vdistmin,vdistmax); |
9725fd2a | 967 | fhHaR->SetXTitle("E (GeV)"); |
968 | fhHaR->SetYTitle("TMath::Sqrt(v_{x}^{2}+v_{y}^{2})"); | |
969 | outputContainer->Add(fhHaR); | |
970 | ||
c8fe2783 | 971 | |
9725fd2a | 972 | |
a6f26052 | 973 | //Pure MC |
9725fd2a | 974 | fhGenGamPt = new TH1F("hGenGamPt" ,"p_{T} of generated #gamma",nptbins,ptmin,ptmax); |
975 | fhGenGamEta = new TH1F("hGenGamEta","Y of generated #gamma",netabins,etamin,etamax); | |
976 | fhGenGamPhi = new TH1F("hGenGamPhi","#phi of generated #gamma",nphibins,phimin,phimax); | |
977 | ||
978 | fhGenPi0Pt = new TH1F("hGenPi0Pt" ,"p_{T} of generated #pi^{0}",nptbins,ptmin,ptmax); | |
979 | fhGenPi0Eta = new TH1F("hGenPi0Eta","Y of generated #pi^{0}",netabins,etamin,etamax); | |
980 | fhGenPi0Phi = new TH1F("hGenPi0Phi","#phi of generated #pi^{0}",nphibins,phimin,phimax); | |
981 | ||
982 | fhGenEtaPt = new TH1F("hGenEtaPt" ,"p_{T} of generated #eta",nptbins,ptmin,ptmax); | |
983 | fhGenEtaEta = new TH1F("hGenEtaEta","Y of generated #eta",netabins,etamin,etamax); | |
984 | fhGenEtaPhi = new TH1F("hGenEtaPhi","#phi of generated #eta",nphibins,phimin,phimax); | |
985 | ||
986 | fhGenOmegaPt = new TH1F("hGenOmegaPt" ,"p_{T} of generated #omega",nptbins,ptmin,ptmax); | |
987 | fhGenOmegaEta = new TH1F("hGenOmegaEta","Y of generated #omega",netabins,etamin,etamax); | |
988 | fhGenOmegaPhi = new TH1F("hGenOmegaPhi","#phi of generated #omega",nphibins,phimin,phimax); | |
989 | ||
990 | fhGenElePt = new TH1F("hGenElePt" ,"p_{T} of generated e^{#pm}",nptbins,ptmin,ptmax); | |
991 | fhGenEleEta = new TH1F("hGenEleEta","Y of generated e^{#pm}",netabins,etamin,etamax); | |
992 | fhGenElePhi = new TH1F("hGenElePhi","#phi of generated e^{#pm}",nphibins,phimin,phimax); | |
993 | ||
994 | fhGenGamPt->SetXTitle("p_{T} (GeV/c)"); | |
995 | fhGenGamEta->SetXTitle("#eta"); | |
996 | fhGenGamPhi->SetXTitle("#phi (rad)"); | |
997 | outputContainer->Add(fhGenGamPt); | |
998 | outputContainer->Add(fhGenGamEta); | |
999 | outputContainer->Add(fhGenGamPhi); | |
c8fe2783 | 1000 | |
9725fd2a | 1001 | fhGenPi0Pt->SetXTitle("p_{T} (GeV/c)"); |
1002 | fhGenPi0Eta->SetXTitle("#eta"); | |
1003 | fhGenPi0Phi->SetXTitle("#phi (rad)"); | |
1004 | outputContainer->Add(fhGenPi0Pt); | |
1005 | outputContainer->Add(fhGenPi0Eta); | |
1006 | outputContainer->Add(fhGenPi0Phi); | |
1007 | ||
1008 | fhGenEtaPt->SetXTitle("p_{T} (GeV/c)"); | |
1009 | fhGenEtaEta->SetXTitle("#eta"); | |
1010 | fhGenEtaPhi->SetXTitle("#phi (rad)"); | |
1011 | outputContainer->Add(fhGenEtaPt); | |
1012 | outputContainer->Add(fhGenEtaEta); | |
1013 | outputContainer->Add(fhGenEtaPhi); | |
c8fe2783 | 1014 | |
9725fd2a | 1015 | fhGenOmegaPt->SetXTitle("p_{T} (GeV/c)"); |
1016 | fhGenOmegaEta->SetXTitle("#eta"); | |
1017 | fhGenOmegaPhi->SetXTitle("#phi (rad)"); | |
1018 | outputContainer->Add(fhGenOmegaPt); | |
1019 | outputContainer->Add(fhGenOmegaEta); | |
1020 | outputContainer->Add(fhGenOmegaPhi); | |
1021 | ||
1022 | fhGenElePt->SetXTitle("p_{T} (GeV/c)"); | |
1023 | fhGenEleEta->SetXTitle("#eta"); | |
1024 | fhGenElePhi->SetXTitle("#phi (rad)"); | |
1025 | outputContainer->Add(fhGenElePt); | |
1026 | outputContainer->Add(fhGenEleEta); | |
1027 | outputContainer->Add(fhGenElePhi); | |
1028 | ||
1029 | fhGenGamAccE = new TH1F("hGenGamAccE" ,"E of generated #gamma in calorimeter acceptance",nptbins,ptmin,ptmax); | |
1030 | fhGenGamAccPt = new TH1F("hGenGamAccPt" ,"p_{T} of generated #gamma in calorimeter acceptance",nptbins,ptmin,ptmax); | |
1031 | fhGenGamAccEta = new TH1F("hGenGamAccEta","Y of generated #gamma in calorimeter acceptance",netabins,etamin,etamax); | |
1032 | fhGenGamAccPhi = new TH1F("hGenGamAccPhi","#phi of generated #gamma in calorimeter acceptance",nphibins,phimin,phimax); | |
1033 | ||
17708df9 | 1034 | fhGenPi0AccE = new TH1F("hGenPi0AccE" ,"E of generated #pi^{0} in calorimeter acceptance",nptbins,ptmin,ptmax); |
9725fd2a | 1035 | fhGenPi0AccPt = new TH1F("hGenPi0AccPt" ,"p_{T} of generated #pi^{0} in calorimeter acceptance",nptbins,ptmin,ptmax); |
1036 | fhGenPi0AccEta = new TH1F("hGenPi0AccEta","Y of generated #pi^{0} in calorimeter acceptance",netabins,etamin,etamax); | |
1037 | fhGenPi0AccPhi = new TH1F("hGenPi0AccPhi","#phi of generated #pi^{0} in calorimeter acceptance",nphibins,phimin,phimax); | |
1038 | ||
1039 | fhGenGamAccE ->SetXTitle("E (GeV)"); | |
1040 | fhGenGamAccPt ->SetXTitle("p_{T} (GeV/c)"); | |
1041 | fhGenGamAccEta->SetXTitle("#eta"); | |
1042 | fhGenGamAccPhi->SetXTitle("#phi (rad)"); | |
1043 | outputContainer->Add(fhGenGamAccE); | |
1044 | outputContainer->Add(fhGenGamAccPt); | |
1045 | outputContainer->Add(fhGenGamAccEta); | |
1046 | outputContainer->Add(fhGenGamAccPhi); | |
1047 | ||
1048 | fhGenPi0AccE ->SetXTitle("E (GeV)"); | |
1049 | fhGenPi0AccPt ->SetXTitle("p_{T} (GeV/c)"); | |
1050 | fhGenPi0AccEta->SetXTitle("#eta"); | |
1051 | fhGenPi0AccPhi->SetXTitle("#phi (rad)"); | |
1052 | outputContainer->Add(fhGenPi0AccE); | |
1053 | outputContainer->Add(fhGenPi0AccPt); | |
1054 | outputContainer->Add(fhGenPi0AccEta); | |
1055 | outputContainer->Add(fhGenPi0AccPhi); | |
1056 | ||
a6f26052 | 1057 | //Track Matching |
a0bb4dc0 | 1058 | |
5a2dbc3c | 1059 | fhMCEle1pOverE = new TH2F("hMCEle1pOverE","TRACK matches p/E, MC electrons",nptbins,ptmin,ptmax, nPoverEbins,pOverEmin,pOverEmax); |
a0bb4dc0 | 1060 | fhMCEle1pOverE->SetYTitle("p/E"); |
1061 | fhMCEle1pOverE->SetXTitle("p_{T} (GeV/c)"); | |
1062 | outputContainer->Add(fhMCEle1pOverE); | |
1063 | ||
5a2dbc3c | 1064 | fhMCEle1dR = new TH1F("hMCEle1dR","TRACK matches dR, MC electrons",ndRbins,dRmin,dRmax); |
a0bb4dc0 | 1065 | fhMCEle1dR->SetXTitle("#Delta R (rad)"); |
1066 | outputContainer->Add(fhMCEle1dR) ; | |
1067 | ||
5a2dbc3c | 1068 | fhMCEle2MatchdEdx = new TH2F("hMCEle2MatchdEdx","dE/dx vs. p for all matches, MC electrons",nptbins,ptmin,ptmax,ndedxbins,dedxmin,dedxmax); |
a0bb4dc0 | 1069 | fhMCEle2MatchdEdx->SetXTitle("p (GeV/c)"); |
1070 | fhMCEle2MatchdEdx->SetYTitle("<dE/dx>"); | |
1071 | outputContainer->Add(fhMCEle2MatchdEdx); | |
1072 | ||
5a2dbc3c | 1073 | fhMCChHad1pOverE = new TH2F("hMCChHad1pOverE","TRACK matches p/E, MC charged hadrons",nptbins,ptmin,ptmax, nPoverEbins,pOverEmin,pOverEmax); |
a0bb4dc0 | 1074 | fhMCChHad1pOverE->SetYTitle("p/E"); |
1075 | fhMCChHad1pOverE->SetXTitle("p_{T} (GeV/c)"); | |
1076 | outputContainer->Add(fhMCChHad1pOverE); | |
1077 | ||
5a2dbc3c | 1078 | fhMCChHad1dR = new TH1F("hMCChHad1dR","TRACK matches dR, MC charged hadrons",ndRbins,dRmin,dRmax); |
a0bb4dc0 | 1079 | fhMCChHad1dR->SetXTitle("#Delta R (rad)"); |
1080 | outputContainer->Add(fhMCChHad1dR) ; | |
1081 | ||
5a2dbc3c | 1082 | fhMCChHad2MatchdEdx = new TH2F("hMCChHad2MatchdEdx","dE/dx vs. p for all matches, MC charged hadrons",nptbins,ptmin,ptmax,ndedxbins,dedxmin,dedxmax); |
a0bb4dc0 | 1083 | fhMCChHad2MatchdEdx->SetXTitle("p (GeV/c)"); |
1084 | fhMCChHad2MatchdEdx->SetYTitle("<dE/dx>"); | |
1085 | outputContainer->Add(fhMCChHad2MatchdEdx); | |
1086 | ||
5a2dbc3c | 1087 | fhMCNeutral1pOverE = new TH2F("hMCNeutral1pOverE","TRACK matches p/E, MC neutrals",nptbins,ptmin,ptmax, nPoverEbins,pOverEmin,pOverEmax); |
a0bb4dc0 | 1088 | fhMCNeutral1pOverE->SetYTitle("p/E"); |
1089 | fhMCNeutral1pOverE->SetXTitle("p_{T} (GeV/c)"); | |
1090 | outputContainer->Add(fhMCNeutral1pOverE); | |
1091 | ||
5a2dbc3c | 1092 | fhMCNeutral1dR = new TH1F("hMCNeutral1dR","TRACK matches dR, MC neutrals",ndRbins,dRmin,dRmax); |
a0bb4dc0 | 1093 | fhMCNeutral1dR->SetXTitle("#Delta R (rad)"); |
1094 | outputContainer->Add(fhMCNeutral1dR) ; | |
1095 | ||
5a2dbc3c | 1096 | fhMCNeutral2MatchdEdx = new TH2F("hMCNeutral2MatchdEdx","dE/dx vs. p for all matches, MC neutrals",nptbins,ptmin,ptmax,ndedxbins,dedxmin,dedxmax); |
a0bb4dc0 | 1097 | fhMCNeutral2MatchdEdx->SetXTitle("p (GeV/c)"); |
1098 | fhMCNeutral2MatchdEdx->SetYTitle("<dE/dx>"); | |
1099 | outputContainer->Add(fhMCNeutral2MatchdEdx); | |
c8fe2783 | 1100 | |
5a2dbc3c | 1101 | fhMCEle1pOverER02 = new TH2F("hMCEle1pOverER02","TRACK matches p/E, MC electrons",nptbins,ptmin,ptmax, nPoverEbins,pOverEmin,pOverEmax); |
a0bb4dc0 | 1102 | fhMCEle1pOverER02->SetYTitle("p/E"); |
1103 | fhMCEle1pOverER02->SetXTitle("p_{T} (GeV/c)"); | |
1104 | outputContainer->Add(fhMCEle1pOverER02); | |
1105 | ||
5a2dbc3c | 1106 | fhMCChHad1pOverER02 = new TH2F("hMCChHad1pOverER02","TRACK matches p/E, MC charged hadrons",nptbins,ptmin,ptmax, nPoverEbins,pOverEmin,pOverEmax); |
a0bb4dc0 | 1107 | fhMCChHad1pOverER02->SetYTitle("p/E"); |
1108 | fhMCChHad1pOverER02->SetXTitle("p_{T} (GeV/c)"); | |
1109 | outputContainer->Add(fhMCChHad1pOverER02); | |
1110 | ||
5a2dbc3c | 1111 | fhMCNeutral1pOverER02 = new TH2F("hMCNeutral1pOverER02","TRACK matches p/E, MC neutrals",nptbins,ptmin,ptmax, nPoverEbins,pOverEmin,pOverEmax); |
a0bb4dc0 | 1112 | fhMCNeutral1pOverER02->SetYTitle("p/E"); |
1113 | fhMCNeutral1pOverER02->SetXTitle("p_{T} (GeV/c)"); | |
1114 | outputContainer->Add(fhMCNeutral1pOverER02); | |
9725fd2a | 1115 | } |
c8fe2783 | 1116 | |
9725fd2a | 1117 | return outputContainer; |
1118 | } | |
1119 | ||
a6f26052 | 1120 | //_______________________________________________________________________________________________________________________________________ |
3a75604b | 1121 | Int_t AliAnaCalorimeterQA::GetNewRebinForRePlotting(TH1D* histo, const Float_t newXmin, const Float_t newXmax,const Int_t newXnbins) const |
1122 | { | |
a6f26052 | 1123 | //Calculate the rebinning for the new requested bin size, only used when replotting executing the Terminte |
3a75604b | 1124 | Float_t oldbinsize = histo->GetBinWidth(0); |
1125 | Float_t newbinsize = TMath::Abs(newXmax-newXmin) / newXnbins; | |
a6f26052 | 1126 | //printf("bin size, old %f, new %f\n",oldbinsize,newbinsize); |
3a75604b | 1127 | if(newbinsize > oldbinsize) return (Int_t) (newbinsize/oldbinsize); |
1128 | else return 1; | |
1129 | } | |
a5fafd85 | 1130 | |
a6f26052 | 1131 | //__________________________________________________ |
9725fd2a | 1132 | void AliAnaCalorimeterQA::Init() |
1133 | { | |
a6f26052 | 1134 | //Check if the data or settings are ok |
9725fd2a | 1135 | if(fCalorimeter != "PHOS" && fCalorimeter !="EMCAL"){ |
1136 | printf("AliAnaCalorimeterQA::Init() - Wrong calorimeter name <%s>, END\n", fCalorimeter.Data()); | |
1137 | abort(); | |
1138 | } | |
1139 | ||
1140 | if(GetReader()->GetDataType()== AliCaloTrackReader::kMC){ | |
1141 | printf("AliAnaCalorimeterQA::Init() - Analysis of reconstructed data, MC reader not aplicable\n"); | |
1142 | abort(); | |
1143 | } | |
1144 | ||
1145 | } | |
1146 | ||
1147 | ||
a6f26052 | 1148 | //__________________________________________________ |
9725fd2a | 1149 | void AliAnaCalorimeterQA::InitParameters() |
1150 | { | |
a6f26052 | 1151 | //Initialize the parameters of the analysis. |
9725fd2a | 1152 | AddToHistogramsName("AnaCaloQA_"); |
c8fe2783 | 1153 | |
9725fd2a | 1154 | fCalorimeter = "EMCAL"; //or PHOS |
5a2dbc3c | 1155 | fStyleMacro = "" ; |
1156 | fNModules = 12; // set maximum to maximum number of EMCAL modules | |
eb5a51ae | 1157 | fNRCU = 2; // set maximum number of RCU in EMCAL per SM |
4cf55759 | 1158 | fTimeCutMin = -1; |
1159 | fTimeCutMax = 9999999; | |
eb5a51ae | 1160 | |
5a2dbc3c | 1161 | fHistoPOverEBins = 100 ; fHistoPOverEMax = 10. ; fHistoPOverEMin = 0. ; |
1162 | fHistodEdxBins = 200 ; fHistodEdxMax = 400. ; fHistodEdxMin = 0. ; | |
1163 | fHistodRBins = 300 ; fHistodRMax = 3.15 ; fHistodRMin = 0. ; | |
c9141a7c | 1164 | fHistoTimeBins = 1000; fHistoTimeMax = 1.e3 ; fHistoTimeMin = 0. ;//ns |
5a2dbc3c | 1165 | fHistoNBins = 300 ; fHistoNMax = 300 ; fHistoNMin = 0 ; |
1166 | fHistoRatioBins = 200 ; fHistoRatioMax = 2 ; fHistoRatioMin = 0. ; | |
1167 | fHistoVertexDistBins = 100 ; fHistoVertexDistMax = 500. ; fHistoVertexDistMin = 0. ; | |
0866d83a | 1168 | fHistoRBins = 100 ; fHistoRMax = 500 ; fHistoRMin = -500 ;//cm |
1169 | fHistoXBins = 100 ; fHistoXMax = 500 ; fHistoXMin = -500 ;//cm | |
1170 | fHistoYBins = 100 ; fHistoYMax = 500 ; fHistoYMin = -500 ;//cm | |
1171 | fHistoZBins = 100 ; fHistoZMax = 600 ; fHistoZMin = -500 ;//cm | |
eb5a51ae | 1172 | fHistoSSBins = 40 ; fHistoSSMax = 10 ; fHistoSSMin = 0 ; |
1173 | ||
9725fd2a | 1174 | } |
1175 | ||
a6f26052 | 1176 | //__________________________________________________________________ |
9725fd2a | 1177 | void AliAnaCalorimeterQA::Print(const Option_t * opt) const |
1178 | { | |
a6f26052 | 1179 | //Print some relevant parameters set for the analysis |
9725fd2a | 1180 | if(! opt) |
1181 | return; | |
1182 | ||
1183 | printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ; | |
1184 | AliAnaPartCorrBaseClass::Print(" "); | |
c8fe2783 | 1185 | |
9725fd2a | 1186 | printf("Select Calorimeter %s \n",fCalorimeter.Data()); |
63f1dd86 | 1187 | printf("Make plots? %d \n",fMakePlots); |
1188 | printf("Plots style macro %s \n",fStyleMacro.Data()); | |
4cf55759 | 1189 | printf("Time Cut: %3.1f < TOF < %3.1f\n", fTimeCutMin, fTimeCutMax); |
5a2dbc3c | 1190 | printf("Histograms: %3.1f < p/E < %3.1f, Nbin = %d\n", fHistoPOverEMin, fHistoPOverEMax, fHistoPOverEBins); |
1191 | printf("Histograms: %3.1f < dEdx < %3.1f, Nbin = %d\n", fHistodEdxMin, fHistodEdxMax, fHistodEdxBins); | |
0866d83a | 1192 | printf("Histograms: %3.1f < dR (track cluster) < %3.1f, Nbin = %d\n", fHistodRMin, fHistodRMax, fHistodRBins); |
255b904d | 1193 | printf("Histograms: %3.1f < R=sqrt{x^2+y^2} < %3.1f, Nbin = %d\n", fHistoRMin, fHistoRMax, fHistoRBins); |
0866d83a | 1194 | printf("Histograms: %3.1f < X < %3.1f, Nbin = %d\n", fHistoXMin, fHistoXMax, fHistoXBins); |
1195 | printf("Histograms: %3.1f < Y < %3.1f, Nbin = %d\n", fHistoYMin, fHistoYMax, fHistoYBins); | |
1196 | printf("Histograms: %3.1f < Z < %3.1f, Nbin = %d\n", fHistoZMin, fHistoZMax, fHistoZBins); | |
5a2dbc3c | 1197 | printf("Histograms: %g < Time < %g, Nbin = %d\n" , fHistoTimeMin, fHistoTimeMax, fHistoTimeBins); |
1198 | printf("Histograms: %d < N < %d, Nbin = %d\n" , fHistoNMin, fHistoNMax, fHistoNBins); | |
1199 | printf("Histograms: %3.1f < Ratio< %3.1f, Nbin = %d\n", fHistoRatioMin, fHistoRatioMax, fHistoRatioBins); | |
1200 | printf("Histograms: %3.1f < Vertex Distance < %3.1f, Nbin = %d\n", fHistoVertexDistMin, fHistoVertexDistMax, fHistoVertexDistBins); | |
c8fe2783 | 1201 | |
9725fd2a | 1202 | } |
1203 | ||
a6f26052 | 1204 | //__________________________________________________________________ |
9725fd2a | 1205 | void AliAnaCalorimeterQA::MakeAnalysisFillHistograms() |
1206 | { | |
a6f26052 | 1207 | //Fill Calorimeter QA histograms |
17708df9 | 1208 | TLorentzVector mom ; |
9725fd2a | 1209 | TLorentzVector mom2 ; |
17708df9 | 1210 | TObjArray * caloClusters = NULL; |
902aa95c | 1211 | Int_t nLabel = 0; |
1212 | Int_t *labels=0x0; | |
1213 | Int_t nCaloClusters = 0; | |
1214 | Int_t nCaloCellsPerCluster = 0; | |
1215 | Int_t nTracksMatched = 0; | |
1216 | Int_t trackIndex = 0; | |
a5fafd85 | 1217 | Int_t nModule = -1; |
c8fe2783 | 1218 | |
a6f26052 | 1219 | //Play with the MC stack if available |
1220 | //Get the MC arrays and do some checks | |
902aa95c | 1221 | if(IsDataMC()){ |
1222 | if(GetReader()->ReadStack()){ | |
c8fe2783 | 1223 | |
902aa95c | 1224 | if(!GetMCStack()) { |
1225 | printf("AliAnaPhoton::MakeAnalysisFillHistograms() - Stack not available, is the MC handler called? STOP\n"); | |
1226 | abort(); | |
1227 | } | |
a6f26052 | 1228 | //Fill some pure MC histograms, only primaries. |
902aa95c | 1229 | for(Int_t i=0 ; i<GetMCStack()->GetNprimary(); i++){//Only primary particles, for all MC transport put GetNtrack() |
1230 | TParticle *primary = GetMCStack()->Particle(i) ; | |
a6f26052 | 1231 | //printf("i %d, %s: status = %d, primary? %d\n",i, primary->GetName(), primary->GetStatusCode(), primary->IsPrimary()); |
902aa95c | 1232 | if (primary->GetStatusCode() > 11) continue; //Working for PYTHIA and simple generators, check for HERWIG |
1233 | primary->Momentum(mom); | |
1234 | MCHistograms(mom,TMath::Abs(primary->GetPdgCode())); | |
1235 | } //primary loop | |
1236 | } | |
1237 | else if(GetReader()->ReadAODMCParticles()){ | |
c8fe2783 | 1238 | |
902aa95c | 1239 | if(!GetReader()->GetAODMCParticles(0)) { |
1240 | printf("AliAnaPhoton::MakeAnalysisFillHistograms() - AODMCParticles not available!\n"); | |
1241 | abort(); | |
1242 | } | |
a6f26052 | 1243 | //Fill some pure MC histograms, only primaries. |
902aa95c | 1244 | for(Int_t i=0 ; i < (GetReader()->GetAODMCParticles(0))->GetEntriesFast(); i++){ |
1245 | AliAODMCParticle *aodprimary = (AliAODMCParticle*) (GetReader()->GetAODMCParticles(0))->At(i) ; | |
a6f26052 | 1246 | //printf("i %d, %s: primary? %d physical primary? %d, flag %d\n", |
1247 | // i,(TDatabasePDG::Instance()->GetParticle(aodprimary->GetPdgCode()))->GetName(), | |
1248 | // aodprimary->IsPrimary(), aodprimary->IsPhysicalPrimary(), aodprimary->GetFlag()); | |
902aa95c | 1249 | if (!aodprimary->IsPrimary()) continue; //accept all which is not MC transport generated. Don't know how to avoid partons |
a6f26052 | 1250 | //aodprimary->Momentum(mom); |
902aa95c | 1251 | mom.SetPxPyPzE(aodprimary->Px(),aodprimary->Py(),aodprimary->Pz(),aodprimary->E()); |
1252 | MCHistograms(mom,TMath::Abs(aodprimary->GetPdgCode())); | |
1253 | } //primary loop | |
1254 | ||
1255 | } | |
1256 | }// is data and MC | |
1257 | ||
1258 | ||
a6f26052 | 1259 | //Get List with CaloClusters |
17708df9 | 1260 | if (fCalorimeter == "PHOS") caloClusters = GetAODPHOS(); |
1261 | else if (fCalorimeter == "EMCAL") caloClusters = GetAODEMCAL(); | |
f8006433 | 1262 | else |
1263 | AliFatal(Form("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - Wrong calorimeter name <%s>, END\n", fCalorimeter.Data())); | |
17708df9 | 1264 | |
f8006433 | 1265 | // if (fCalorimeter == "EMCAL") GetReader()->GetInputEvent()->GetEMCALClusters(caloClusters);//GetAODEMCAL(); |
1266 | // else if(fCalorimeter == "PHOS") GetReader()->GetInputEvent()->GetPHOSClusters (caloClusters);//GetAODPHOS(); | |
1267 | // else | |
1268 | // AliFatal(Form("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - Wrong calorimeter name <%s>, END\n", fCalorimeter.Data())); | |
9725fd2a | 1269 | |
f8006433 | 1270 | if(!caloClusters) { |
c8fe2783 | 1271 | AliFatal(Form("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - No CaloClusters available\n")); |
f8006433 | 1272 | } |
1273 | else{ | |
1274 | //---------------------------------------------------------- | |
1275 | //Correlate Calorimeters | |
1276 | //---------------------------------------------------------- | |
1277 | //if(fCorrelateCalos) CorrelateCalorimeters(caloClusters); | |
1278 | if(fCorrelateCalos) CorrelateCalorimeters(); | |
1279 | ||
1280 | ||
1281 | //---------------------------------------------------------- | |
1282 | // CALOCLUSTERS | |
1283 | //---------------------------------------------------------- | |
1284 | ||
1285 | nCaloClusters = caloClusters->GetEntriesFast() ; | |
1286 | fhNClusters->Fill(nCaloClusters); | |
1287 | Int_t *nClustersInModule = new Int_t[fNModules]; | |
1288 | for(Int_t imod = 0; imod < fNModules; imod++ ) nClustersInModule[imod] = 0; | |
1289 | ||
1290 | if(GetDebug() > 0) | |
1291 | printf("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - In %s there are %d clusters \n", fCalorimeter.Data(), nCaloClusters); | |
1292 | ||
1293 | //Get vertex for photon momentum calculation | |
1294 | Double_t v[3] = {0,0,0}; //vertex ; | |
1295 | GetReader()->GetVertex(v); | |
1296 | AliVTrack * track = 0x0; | |
1297 | ||
1298 | Float_t pos[3] ; | |
1299 | Float_t showerShape[3] ; | |
1300 | Double_t tof = 0; | |
1301 | //Loop over CaloClusters | |
1302 | //if(nCaloClusters > 0)printf("QA : Vertex Cut passed %f, cut %f, entries %d, %s\n",v[2], 40., nCaloClusters, fCalorimeter.Data()); | |
1303 | for(Int_t iclus = 0; iclus < nCaloClusters; iclus++){ | |
c8fe2783 | 1304 | |
f8006433 | 1305 | if(GetDebug() > 0) printf("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - cluster: %d/%d, data %d \n", |
1306 | iclus+1,nCaloClusters,GetReader()->GetDataType()); | |
c8fe2783 | 1307 | |
f8006433 | 1308 | if(GetReader()->GetDataType()==AliCaloTrackReader::kESD){ |
1309 | AliVCluster* clus = (AliVCluster*)caloClusters->At(iclus); | |
1310 | AliVCaloCells * cell = 0x0; | |
1311 | if(fCalorimeter == "PHOS") cell = GetPHOSCells(); | |
1312 | else cell = GetEMCALCells(); | |
c8fe2783 | 1313 | |
f8006433 | 1314 | //Get cluster kinematics |
1315 | clus->GetPosition(pos); | |
1316 | clus->GetMomentum(mom,v); | |
1317 | tof = clus->GetTOF()*1e9; | |
1318 | if(tof < fTimeCutMin || tof > fTimeCutMax) continue; | |
c8fe2783 | 1319 | |
f8006433 | 1320 | //Check only certain regions |
1321 | Bool_t in = kTRUE; | |
1322 | if(IsFiducialCutOn()) in = GetFiducialCut()->IsInFiducialCut(mom,fCalorimeter) ; | |
1323 | if(!in) continue; | |
1324 | //Get module of cluster | |
1325 | nModule = GetModuleNumber(clus); | |
1326 | if(nModule >=0 && nModule < fNModules) nClustersInModule[nModule]++; | |
1327 | //MC labels | |
1328 | nLabel = clus->GetNLabels(); | |
1329 | labels = clus->GetLabels(); | |
1330 | //Cells per cluster | |
1331 | nCaloCellsPerCluster = clus->GetNCells(); | |
1332 | //if(mom.E() > 10 && nCaloCellsPerCluster == 1 ) printf("%s:************** E = %f ********** ncells = %d\n",fCalorimeter.Data(), mom.E(),nCaloCellsPerCluster); | |
1333 | //matched cluster with tracks | |
1334 | nTracksMatched = clus->GetNTracksMatched(); | |
1335 | trackIndex = clus->GetTrackMatchedIndex(); | |
1336 | if(trackIndex >= 0){ | |
1337 | track = (AliVTrack*)GetReader()->GetInputEvent()->GetTrack(trackIndex); | |
1338 | } | |
1339 | else{ | |
1340 | if(nTracksMatched == 1) nTracksMatched = 0; | |
1341 | track = 0; | |
c8fe2783 | 1342 | } |
c8fe2783 | 1343 | |
f8006433 | 1344 | //Shower shape parameters |
1345 | showerShape[0] = clus->GetM20(); | |
1346 | showerShape[1] = clus->GetM02(); | |
1347 | showerShape[2] = clus->GetDispersion(); | |
c8fe2783 | 1348 | |
f8006433 | 1349 | //====================== |
1350 | //Cells in cluster | |
1351 | //====================== | |
c8fe2783 | 1352 | |
f8006433 | 1353 | //Get list of contributors |
1354 | UShort_t * indexList = clus->GetCellsAbsId() ; | |
1355 | // check time of cells respect to max energy cell | |
1356 | //Get maximum energy cell | |
1357 | Float_t emax = -1; | |
1358 | Double_t tmax = -1; | |
1359 | Int_t imax = -1; | |
1360 | Int_t absId = -1 ; | |
1361 | //printf("nCaloCellsPerCluster %d\n",nCaloCellsPerCluster); | |
1362 | //Loop on cluster cells | |
1363 | for (Int_t ipos = 0; ipos < nCaloCellsPerCluster; ipos++) { | |
1364 | // printf("Index %d\n",ipos); | |
1365 | absId = indexList[ipos]; | |
1366 | ||
1367 | //Get position of cell compare to cluster | |
1368 | if(fFillAllPosHisto){ | |
1369 | if(fCalorimeter=="EMCAL" && GetCaloUtils()->IsEMCALGeoMatrixSet()){ | |
1370 | ||
1371 | Double_t cellpos[] = {0, 0, 0}; | |
1372 | GetEMCALGeometry()->GetGlobal(absId, cellpos); | |
1373 | ||
1374 | fhDeltaCellClusterXNCells->Fill(pos[0]-cellpos[0],nCaloCellsPerCluster) ; | |
1375 | fhDeltaCellClusterYNCells->Fill(pos[1]-cellpos[1],nCaloCellsPerCluster) ; | |
1376 | fhDeltaCellClusterZNCells->Fill(pos[2]-cellpos[2],nCaloCellsPerCluster) ; | |
1377 | ||
1378 | fhDeltaCellClusterXE->Fill(pos[0]-cellpos[0],mom.E()) ; | |
1379 | fhDeltaCellClusterYE->Fill(pos[1]-cellpos[1],mom.E()) ; | |
1380 | fhDeltaCellClusterZE->Fill(pos[2]-cellpos[2],mom.E()) ; | |
1381 | ||
1382 | Float_t r = TMath::Sqrt(pos[0]*pos[0] +pos[1]*pos[1]);// +pos[2]*pos[2]); | |
1383 | Float_t rcell = TMath::Sqrt(cellpos[0]*cellpos[0]+cellpos[1]*cellpos[1]);//+cellpos[2]*cellpos[2]); | |
1384 | fhDeltaCellClusterRNCells->Fill(r-rcell, nCaloCellsPerCluster) ; | |
1385 | fhDeltaCellClusterRE ->Fill(r-rcell, mom.E()) ; | |
1386 | ||
1387 | // Float_t celleta = 0, cellphi = 0; | |
1388 | // GetEMCALGeometry()->EtaPhiFromIndex(absId, celleta, cellphi); | |
1389 | // Int_t imod = -1, iTower = -1, iIphi = -1, iIeta = -1, iphi = -1, ieta = -1; | |
1390 | // GetEMCALGeometry()->GetCellIndex(absId,imod,iTower,iIphi,iIeta); | |
1391 | // GetEMCALGeometry()->GetCellPhiEtaIndexInSModule(imod,iTower, | |
1392 | // iIphi, iIeta,iphi,ieta); | |
1393 | // printf("AbsId %d, SM %d, Index eta %d, phi %d\n", absId, imod, ieta, iphi); | |
1394 | // printf("Cluster E %f, eta %f, phi %f; Cell: Amp %f, eta %f, phi%f\n", mom.E(),mom.Eta(), mom.Phi()*TMath::RadToDeg(), cell->GetCellAmplitude(absId),celleta, cellphi*TMath::RadToDeg()); | |
1395 | // printf("x cluster %f, x cell %f, cluster-cell %f\n",pos[0], cellpos[0],pos[0]-cellpos[0]); | |
1396 | // printf("y cluster %f, y cell %f, cluster-cell %f\n",pos[1], cellpos[1],pos[1]-cellpos[1]); | |
1397 | // printf("z cluster %f, z cell %f, cluster-cell %f\n",pos[2], cellpos[2],pos[2]-cellpos[2]); | |
1398 | // printf("r cluster %f, r cell %f, cluster-cell %f\n",r, rcell, r-rcell); | |
1399 | // | |
1400 | ||
1401 | }//EMCAL and its matrices are available | |
1402 | else if(fCalorimeter=="PHOS" && GetCaloUtils()->IsPHOSGeoMatrixSet()){ | |
1403 | TVector3 xyz; | |
1404 | Int_t relId[4], module; | |
1405 | Float_t xCell, zCell; | |
1406 | ||
1407 | GetPHOSGeometry()->AbsToRelNumbering(absId,relId); | |
1408 | module = relId[0]; | |
1409 | GetPHOSGeometry()->RelPosInModule(relId,xCell,zCell); | |
1410 | GetPHOSGeometry()->Local2Global(module,xCell,zCell,xyz); | |
1411 | ||
1412 | fhDeltaCellClusterXNCells->Fill(pos[0]-xyz.X(),nCaloCellsPerCluster) ; | |
1413 | fhDeltaCellClusterYNCells->Fill(pos[1]-xyz.Y(),nCaloCellsPerCluster) ; | |
1414 | fhDeltaCellClusterZNCells->Fill(pos[2]-xyz.Z(),nCaloCellsPerCluster) ; | |
1415 | ||
1416 | fhDeltaCellClusterXE->Fill(pos[0]-xyz.X(),mom.E()) ; | |
1417 | fhDeltaCellClusterYE->Fill(pos[1]-xyz.Y(),mom.E()) ; | |
1418 | fhDeltaCellClusterZE->Fill(pos[2]-xyz.Z(),mom.E()) ; | |
1419 | ||
1420 | Float_t r = TMath::Sqrt(pos[0]*pos[0] +pos[1]*pos[1]);// +pos[2]*pos[2]); | |
1421 | Float_t rcell = TMath::Sqrt(xyz.X()*xyz.X()+xyz.Y()*xyz.Y());//+xyz.Z()*xyz.Z()); | |
1422 | fhDeltaCellClusterRNCells->Fill(r-rcell, nCaloCellsPerCluster) ; | |
1423 | fhDeltaCellClusterRE ->Fill(r-rcell, mom.E()) ; | |
1424 | ||
1425 | // printf("x cluster %f, x cell %f, cluster-cell %f\n",pos[0], cellpos[0],pos[0]-cellpos[0]); | |
1426 | // printf("y cluster %f, y cell %f, cluster-cell %f\n",pos[1], cellpos[1],pos[1]-cellpos[1]); | |
1427 | // printf("z cluster %f, z cell %f, cluster-cell %f\n",pos[2], cellpos[2],pos[2]-cellpos[2]); | |
1428 | // printf("r cluster %f, r cell %f, cluster-cell %f\n",r, rcell, r-rcell); | |
1429 | }//PHOS and its matrices are available | |
1430 | }//Fill all position histograms | |
1431 | ||
1432 | //Find maximum energy cluster | |
1433 | if(cell->GetCellAmplitude(absId) > emax) { | |
1434 | imax = ipos; | |
1435 | emax = cell->GetCellAmplitude(absId); | |
1436 | tmax = cell->GetCellTime(absId); | |
1437 | } | |
1438 | ||
1439 | }// cluster cell loop | |
c8fe2783 | 1440 | |
f8006433 | 1441 | // check time of cells respect to max energy cell |
1442 | if(nCaloCellsPerCluster > 1){ | |
1443 | for (Int_t ipos = 0; ipos < nCaloCellsPerCluster; ipos++) { | |
1444 | if(imax == ipos) continue; | |
1445 | absId = indexList[ipos]; | |
1446 | Float_t diff = (tmax-cell->GetCellTime(absId))*1e9; | |
1447 | fhCellTimeSpreadRespectToCellMax->Fill(diff); | |
1448 | if(TMath::Abs(TMath::Abs(diff) > 100)) fhCellIdCellLargeTimeSpread->Fill(absId); | |
1449 | }// fill cell-cluster histogram loop | |
1450 | ||
1451 | }//check time of cells respect to max energy cell | |
1452 | ||
1453 | //----------------------------------------------------------- | |
1454 | //Fill histograms related to single cluster or track matching | |
1455 | //----------------------------------------------------------- | |
1456 | ||
1457 | ClusterHistograms(mom, tof, pos, showerShape, nCaloCellsPerCluster, nModule, nTracksMatched, track, labels, nLabel); | |
1458 | ||
1459 | ||
1460 | //----------------------------------------------------------- | |
1461 | //Invariant mass | |
1462 | //----------------------------------------------------------- | |
1463 | if(GetDebug()>1) printf("Invariant mass \n"); | |
1464 | ||
1465 | //do not do for bad vertex | |
1466 | Float_t fZvtxCut = 40. ; | |
1467 | if(v[2]<-fZvtxCut || v[2]> fZvtxCut) continue ; //Event can not be used (vertex, centrality,... cuts not fulfilled) | |
1468 | ||
1469 | Int_t nModule2 = -1; | |
1470 | Int_t nCaloCellsPerCluster2=0; | |
1471 | if (nCaloClusters > 1 ) { | |
1472 | for(Int_t jclus = iclus + 1 ; jclus < nCaloClusters ; jclus++) { | |
1473 | AliVCluster* clus2 = (AliVCluster*)caloClusters->At(jclus); | |
1474 | ||
1475 | //Get cluster kinematics | |
1476 | clus2->GetMomentum(mom2,v); | |
1477 | //Check only certain regions | |
1478 | Bool_t in2 = kTRUE; | |
1479 | if(IsFiducialCutOn()) in2 = GetFiducialCut()->IsInFiducialCut(mom2,fCalorimeter) ; | |
1480 | if(!in2) continue; | |
1481 | //Get module of cluster | |
1482 | nModule2 = GetModuleNumber(clus2); | |
1483 | //Cells per cluster | |
1484 | nCaloCellsPerCluster2 = clus2->GetNCells(); | |
1485 | } | |
1486 | //Fill invariant mass histograms | |
1487 | //All modules | |
1488 | ||
1489 | //printf("QA : Fill inv mass histo: pt1 %f, pt2 %f, pt12 %f, mass %f, calo %s \n",mom.Pt(),mom2.Pt(),(mom+mom2).Pt(),(mom+mom2).M(), fCalorimeter.Data()); | |
1490 | fhIM ->Fill((mom+mom2).Pt(),(mom+mom2).M()); | |
1491 | //Single module | |
1492 | if(nModule == nModule2 && nModule >=0 && nModule < fNModules) | |
1493 | fhIMMod[nModule]->Fill((mom+mom2).Pt(),(mom+mom2).M()); | |
1494 | ||
1495 | //Select only clusters with at least 2 cells | |
1496 | if(nCaloCellsPerCluster > 1 && nCaloCellsPerCluster2 > 1) { | |
1497 | //All modules | |
1498 | fhIMCellCut ->Fill((mom+mom2).Pt(),(mom+mom2).M()); | |
1499 | //Single modules | |
1500 | if(nModule == nModule2 && nModule >=0 && nModule < fNModules) | |
1501 | fhIMCellCutMod[nModule]->Fill((mom+mom2).Pt(),(mom+mom2).M()); | |
1502 | } | |
1503 | ||
1504 | //Asymetry histograms | |
1505 | fhAsym->Fill((mom+mom2).Pt(),TMath::Abs((mom.E()-mom2.E())/(mom.E()+mom2.E()))); | |
1506 | ||
1507 | }// 2nd cluster loop | |
1508 | }////more than 1 cluster in calorimeter | |
1509 | }//cluster loop | |
1510 | ||
1511 | //Number of clusters per module | |
1512 | for(Int_t imod = 0; imod < fNModules; imod++ ){ | |
1513 | if(GetDebug() > 1) | |
1514 | printf("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - module %d calo %s clusters %d\n", imod, fCalorimeter.Data(), nClustersInModule[imod]); | |
1515 | fhNClustersMod[imod]->Fill(nClustersInModule[imod]); | |
1516 | } | |
1517 | delete [] nClustersInModule; | |
1518 | //delete caloClusters; | |
1519 | }// calo clusters array exists | |
c8fe2783 | 1520 | |
a6f26052 | 1521 | //---------------------------------------------------------- |
1522 | // CALOCELLS | |
1523 | //---------------------------------------------------------- | |
0866d83a | 1524 | |
491e4f8b | 1525 | Int_t *nCellsInModule = new Int_t[fNModules]; |
a5fafd85 | 1526 | for(Int_t imod = 0; imod < fNModules; imod++ ) nCellsInModule[imod] = 0; |
fa991e42 | 1527 | Int_t icol = -1; |
1528 | Int_t irow = -1; | |
1529 | Int_t iRCU = -1; | |
1530 | Float_t amp = 0.; | |
1531 | Float_t time = 0.; | |
1532 | Int_t id = -1; | |
1533 | Float_t recalF = 1.; | |
1534 | ||
c8fe2783 | 1535 | AliVCaloCells * cell = 0x0; |
1536 | Int_t ncells = 0; | |
1537 | if(fCalorimeter == "PHOS") | |
17708df9 | 1538 | cell = GetPHOSCells(); |
c8fe2783 | 1539 | else |
17708df9 | 1540 | cell = GetEMCALCells(); |
c8fe2783 | 1541 | |
1542 | if(!cell) { | |
1543 | printf("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - STOP: No %s ESD CELLS available for analysis\n",fCalorimeter.Data()); | |
1544 | abort(); | |
1545 | } | |
1546 | ||
1547 | ncells = cell->GetNumberOfCells() ; | |
1548 | fhNCells->Fill(ncells) ; | |
1549 | if(GetDebug() > 0) | |
1550 | printf("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - In ESD %s cell entries %d\n", fCalorimeter.Data(), ncells); | |
1551 | ||
1552 | for (Int_t iCell = 0; iCell < ncells; iCell++) { | |
1553 | if(GetDebug() > 2) printf("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - Cell : amp %f, absId %d \n", cell->GetAmplitude(iCell), cell->GetCellNumber(iCell)); | |
1554 | nModule = GetModuleNumberCellIndexes(cell->GetCellNumber(iCell),fCalorimeter, icol, irow, iRCU); | |
1555 | if(GetDebug() > 2) printf("\t module %d, column %d, row %d \n", nModule,icol,irow); | |
1556 | ||
1557 | if(nModule < fNModules) { | |
a6f26052 | 1558 | //Check if the cell is a bad channel |
c8fe2783 | 1559 | if(GetCaloUtils()->IsBadChannelsRemovalSwitchedOn()){ |
1560 | if(fCalorimeter=="EMCAL"){ | |
1561 | if(GetCaloUtils()->GetEMCALChannelStatus(nModule,icol,irow)) continue; | |
1562 | } | |
1563 | else { | |
1564 | if(GetCaloUtils()->GetPHOSChannelStatus(nModule,icol,irow)) { | |
1565 | printf("PHOS bad channel\n"); | |
1566 | continue; | |
1567 | } | |
1568 | } | |
1569 | } | |
1570 | ||
a6f26052 | 1571 | //Get Recalibration factor if set |
c8fe2783 | 1572 | if (GetCaloUtils()->IsRecalibrationOn()) { |
1573 | if(fCalorimeter == "PHOS") recalF = GetCaloUtils()->GetPHOSChannelRecalibrationFactor(nModule,icol,irow); | |
17708df9 | 1574 | else recalF = GetCaloUtils()->GetEMCALChannelRecalibrationFactor(nModule,icol,irow); |
c8fe2783 | 1575 | if(fCalorimeter == "PHOS")printf("Recalibration factor (sm,row,col)=(%d,%d,%d) - %f\n",nModule,icol,irow,recalF); |
1576 | } | |
1577 | ||
1578 | amp = cell->GetAmplitude(iCell)*recalF; | |
1579 | time = cell->GetTime(iCell)*1e9;//transform time to ns | |
1580 | ||
a6f26052 | 1581 | //if(amp > 3 && fCalorimeter=="EMCAL") printf("Amp = %f, time = %f, (mod, col, row)= (%d,%d,%d)\n", |
1582 | // amp,time,nModule,icol,irow); | |
c8fe2783 | 1583 | |
1584 | if(time < fTimeCutMin || time > fTimeCutMax) continue; | |
1585 | ||
a6f26052 | 1586 | //printf("%s: time %g\n",fCalorimeter.Data(), time); |
c8fe2783 | 1587 | id = cell->GetCellNumber(iCell); |
1588 | fhAmplitude->Fill(amp); | |
1589 | fhAmpId ->Fill(amp,id); | |
1590 | fhTime ->Fill(time); | |
1591 | fhTimeId ->Fill(time,id); | |
1592 | fhTimeAmp ->Fill(amp,time); | |
a6f26052 | 1593 | //Double_t t0 = GetReader()->GetInputEvent()->GetT0(); |
1594 | //printf("---->>> Time EMCal %e, T0 %e, T0 vertex %e, T0 clock %e, T0 trig %d \n",time,t0, | |
1595 | // GetReader()->GetInputEvent()->GetT0zVertex(), | |
1596 | // GetReader()->GetInputEvent()->GetT0clock(), | |
1597 | // GetReader()->GetInputEvent()->GetT0Trig()); | |
1598 | //fhT0Time ->Fill(time-t0); | |
1599 | //fhT0TimeId ->Fill(time-t0,id); | |
1600 | //fhT0TimeAmp ->Fill(amp,time-t0); | |
c8fe2783 | 1601 | |
1602 | fhAmplitudeMod[nModule]->Fill(amp); | |
1603 | if(fCalorimeter=="EMCAL"){ | |
1604 | Int_t ifrac = 0; | |
1605 | if(icol > 15 && icol < 32) ifrac = 1; | |
1606 | else if(icol > 31) ifrac = 2; | |
1607 | fhAmplitudeModFraction[nModule*3+ifrac]->Fill(amp); | |
1608 | ||
1609 | ||
1610 | } | |
1611 | ||
1612 | fhTimeAmpPerRCU [nModule*fNRCU+iRCU]->Fill(amp, time); | |
a6f26052 | 1613 | //printf("id %d, nModule %d, iRCU %d: Histo Name %s\n",id, nModule,iRCU, fhTimeAmpPerRCU[nModule*fNRCU+iRCU]->GetName()); |
1614 | //fhT0TimeAmpPerRCU[nModule*fNRCU+iRCU]->Fill(amp, time-t0); | |
c8fe2783 | 1615 | nCellsInModule[nModule]++; |
1616 | fhGridCellsMod[nModule] ->Fill(icol,irow); | |
1617 | fhGridCellsEMod[nModule] ->Fill(icol,irow,amp); | |
1618 | if(amp > 0.3){ | |
1619 | fhGridCellsTimeMod[nModule]->Fill(icol,irow,time); | |
1620 | ||
a6f26052 | 1621 | // AliESDCaloCells * cell2 = 0x0; |
1622 | // if(fCalorimeter == "PHOS") cell2 = GetReader()->GetInputEvent()->GetPHOSCells(); | |
1623 | // else cell2 = GetReader()->GetInputEvent()->GetEMCALCells(); | |
1624 | // Int_t icol2 = -1; | |
1625 | // Int_t irow2 = -1; | |
1626 | // Int_t iRCU2 = -1; | |
1627 | // Float_t amp2 = 0.; | |
1628 | // Float_t time2 = 0.; | |
1629 | // Int_t id2 = -1; | |
1630 | // Int_t nModule2 = -1; | |
1631 | // for (Int_t iCell2 = 0; iCell2 < ncells; iCell2++) { | |
1632 | // amp2 = cell2->GetAmplitude(iCell2); | |
1633 | // if(amp2 < 0.3) continue; | |
1634 | // if(iCell2 == iCell) continue; | |
1635 | // time2 = cell2->GetTime(iCell2)*1e9;//transform time to ns | |
1636 | // //printf("%s: time %g\n",fCalorimeter.Data(), time); | |
1637 | // id2 = cell2->GetCellNumber(iCell2); | |
1638 | // nModule2 = GetModuleNumberCellIndexes(cell2->GetCellNumber(iCell2), fCalorimeter, icol2, irow2, iRCU2); | |
1639 | // Int_t index = (nModule2*fNRCU+iRCU2)+(fNModules*fNRCU)*(iRCU+fNRCU*nModule); | |
1640 | // //printf("id %d, nModule %d, iRCU %d, id2 %d, nModule2 %d, iRCU2 %d, index %d: Histo Name %s\n",id, nModule,iRCU,cell2->GetCellNumber(iCell2),nModule2,iRCU2,index, fhTimeCorrRCU[index]->GetName()); | |
1641 | // fhTimeCorrRCU[index]->Fill(time,time2); | |
1642 | // | |
1643 | // }// second cell loop | |
c8fe2783 | 1644 | }// amplitude cut |
1645 | }//nmodules | |
1646 | ||
a6f26052 | 1647 | //Get Eta-Phi position of Cell |
b8187de4 | 1648 | //if(fFillAllPosHisto) |
a6f26052 | 1649 | { |
1650 | if(fCalorimeter=="EMCAL" && GetCaloUtils()->IsEMCALGeoMatrixSet()){ | |
1651 | Float_t celleta = 0.; | |
1652 | Float_t cellphi = 0.; | |
1653 | GetEMCALGeometry()->EtaPhiFromIndex(id, celleta, cellphi); | |
1654 | fhEtaPhiAmp->Fill(celleta,cellphi,amp); | |
1655 | Double_t cellpos[] = {0, 0, 0}; | |
1656 | GetEMCALGeometry()->GetGlobal(id, cellpos); | |
1657 | fhXCellE->Fill(cellpos[0],amp) ; | |
1658 | fhYCellE->Fill(cellpos[1],amp) ; | |
1659 | fhZCellE->Fill(cellpos[2],amp) ; | |
1660 | Float_t rcell = TMath::Sqrt(cellpos[0]*cellpos[0]+cellpos[1]*cellpos[1]);//+cellpos[2]*cellpos[2]); | |
1661 | fhRCellE->Fill(rcell,amp) ; | |
1662 | fhXYZCell->Fill(cellpos[0],cellpos[1],cellpos[2]) ; | |
1663 | }//EMCAL Cells | |
1664 | else if(fCalorimeter=="PHOS" && GetCaloUtils()->IsPHOSGeoMatrixSet()){ | |
1665 | TVector3 xyz; | |
1666 | Int_t relId[4], module; | |
1667 | Float_t xCell, zCell; | |
1668 | ||
1669 | GetPHOSGeometry()->AbsToRelNumbering(id,relId); | |
1670 | module = relId[0]; | |
1671 | GetPHOSGeometry()->RelPosInModule(relId,xCell,zCell); | |
1672 | GetPHOSGeometry()->Local2Global(module,xCell,zCell,xyz); | |
1673 | Float_t rcell = TMath::Sqrt(xyz.X()*xyz.X()+xyz.Y()*xyz.Y()); | |
1674 | fhXCellE ->Fill(xyz.X(),amp) ; | |
1675 | fhYCellE ->Fill(xyz.Y(),amp) ; | |
1676 | fhZCellE ->Fill(xyz.Z(),amp) ; | |
1677 | fhRCellE ->Fill(rcell ,amp) ; | |
1678 | fhXYZCell->Fill(xyz.X(),xyz.Y(),xyz.Z()) ; | |
1679 | }//PHOS cells | |
1680 | }//fill cell position histograms | |
c8fe2783 | 1681 | }//cell loop |
1682 | ||
a6f26052 | 1683 | //Number of cells per module |
63f1dd86 | 1684 | for(Int_t imod = 0; imod < fNModules; imod++ ) { |
1685 | if(GetDebug() > 1) | |
1686 | printf("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - module %d calo %s cells %d\n", imod, fCalorimeter.Data(), nCellsInModule[imod]); | |
1687 | fhNCellsMod[imod]->Fill(nCellsInModule[imod]) ; | |
1688 | } | |
4a745797 | 1689 | delete [] nCellsInModule; |
1690 | ||
902aa95c | 1691 | if(GetDebug() > 0) |
1692 | printf("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - End \n"); | |
1693 | } | |
1694 | ||
a0bb4dc0 | 1695 | |
17708df9 | 1696 | //_____________________________________________________________________________________________ |
1697 | void AliAnaCalorimeterQA::ClusterHistograms(const TLorentzVector mom, const Double_t tof, | |
1698 | Float_t *pos, Float_t *showerShape, | |
c8fe2783 | 1699 | const Int_t nCaloCellsPerCluster,const Int_t nModule, |
1700 | const Int_t nTracksMatched, const AliVTrack * track, | |
1701 | const Int_t * labels, const Int_t nLabels){ | |
a6f26052 | 1702 | //Fill CaloCluster related histograms |
9725fd2a | 1703 | |
902aa95c | 1704 | AliAODMCParticle * aodprimary = 0x0; |
1705 | TParticle * primary = 0x0; | |
c8fe2783 | 1706 | Int_t tag = 0; |
902aa95c | 1707 | |
1708 | Float_t e = mom.E(); | |
1709 | Float_t pt = mom.Pt(); | |
1710 | Float_t eta = mom.Eta(); | |
1711 | Float_t phi = mom.Phi(); | |
1712 | if(phi < 0) phi +=TMath::TwoPi(); | |
1713 | if(GetDebug() > 0) { | |
1714 | printf("AliAnaCalorimeterQA::ClusterHistograms() - cluster: E %2.3f, pT %2.3f, eta %2.3f, phi %2.3f \n",e,pt,eta,phi*TMath::RadToDeg()); | |
1715 | if(IsDataMC()) { | |
a6f26052 | 1716 | //printf("\t Primaries: nlabels %d, labels pointer %p\n",nLabels,labels); |
491e4f8b | 1717 | printf("\t Primaries: nlabels %d\n",nLabels); |
902aa95c | 1718 | if(!nLabels || !labels) printf("\t Strange, no labels!!!\n"); |
1719 | } | |
9725fd2a | 1720 | } |
c8fe2783 | 1721 | |
13d4407a | 1722 | fhE ->Fill(e); |
f8006433 | 1723 | if(nModule >=0 && nModule < fNModules) fhEMod[nModule]->Fill(e); |
a6f26052 | 1724 | if(fFillAllTH12){ |
1725 | fhPt ->Fill(pt); | |
1726 | fhPhi ->Fill(phi); | |
1727 | fhEta ->Fill(eta); | |
1728 | } | |
a5fafd85 | 1729 | fhEtaPhiE->Fill(eta,phi,e); |
a6f26052 | 1730 | |
1731 | //Cells per cluster | |
1732 | fhNCellsPerCluster ->Fill(e, nCaloCellsPerCluster,eta); | |
1733 | fhNCellsPerClusterMIP->Fill(e, nCaloCellsPerCluster,eta); | |
1734 | ||
1735 | //Position | |
b8187de4 | 1736 | //if(fFillAllPosHisto) |
1737 | { | |
a6f26052 | 1738 | fhXE ->Fill(pos[0],e); |
1739 | fhYE ->Fill(pos[1],e); | |
1740 | fhZE ->Fill(pos[2],e); | |
1741 | fhXYZ ->Fill(pos[0], pos[1],pos[2]); | |
1742 | ||
1743 | fhXNCells->Fill(pos[0],nCaloCellsPerCluster); | |
1744 | fhYNCells->Fill(pos[1],nCaloCellsPerCluster); | |
1745 | fhZNCells->Fill(pos[2],nCaloCellsPerCluster); | |
1746 | Float_t rxyz = TMath::Sqrt(pos[0]*pos[0]+pos[1]*pos[1]);//+pos[2]*pos[2]); | |
1747 | fhRE ->Fill(rxyz,e); | |
1748 | fhRNCells->Fill(rxyz ,nCaloCellsPerCluster); | |
1749 | } | |
b8187de4 | 1750 | |
4cf55759 | 1751 | fhClusterTimeEnergy->Fill(e,tof); |
0866d83a | 1752 | |
a6f26052 | 1753 | //Shower shape parameters |
eb5a51ae | 1754 | fhLambda->Fill(showerShape[0], showerShape[1], e); |
1755 | fhDispersion->Fill(showerShape[2],e); | |
c8fe2783 | 1756 | |
f8006433 | 1757 | if(nModule >=0 && nModule < fNModules) fhNCellsPerClusterMod[nModule]->Fill(e, nCaloCellsPerCluster); |
50f39b97 | 1758 | |
a6f26052 | 1759 | //Fill histograms only possible when simulation |
902aa95c | 1760 | if(IsDataMC() && nLabels > 0 && labels){ |
c8fe2783 | 1761 | |
a6f26052 | 1762 | //Play with the MC stack if available |
902aa95c | 1763 | Int_t label = labels[0]; |
c8fe2783 | 1764 | |
902aa95c | 1765 | if(label < 0) { |
1766 | if(GetDebug() >= 0) printf("AliAnaCalorimeterQA::ClusterHistograms() *** bad label ***: label %d \n", label); | |
1767 | return; | |
1768 | } | |
c8fe2783 | 1769 | |
902aa95c | 1770 | Int_t pdg =-1; Int_t pdg0 =-1;Int_t status = -1; Int_t iMother = -1; Int_t iParent = -1; |
1771 | Float_t vxMC= 0; Float_t vyMC = 0; | |
1772 | Float_t eMC = 0; Float_t ptMC= 0; Float_t phiMC =0; Float_t etaMC = 0; | |
1773 | Int_t charge = 0; | |
1774 | ||
a6f26052 | 1775 | //Check the origin. |
902aa95c | 1776 | tag = GetMCAnalysisUtils()->CheckOrigin(labels,nLabels, GetReader(),0); |
c8fe2783 | 1777 | |
902aa95c | 1778 | if(GetReader()->ReadStack() && !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCUnknown)){ //it MC stack and known tag |
c8fe2783 | 1779 | |
902aa95c | 1780 | if( label >= GetMCStack()->GetNtrack()) { |
1781 | if(GetDebug() >= 0) printf("AliAnaCalorimeterQA::ClusterHistograms() *** large label ***: label %d, n tracks %d \n", label, GetMCStack()->GetNtrack()); | |
1782 | return ; | |
1783 | } | |
9725fd2a | 1784 | |
902aa95c | 1785 | primary = GetMCStack()->Particle(label); |
1786 | iMother = label; | |
1787 | pdg0 = TMath::Abs(primary->GetPdgCode()); | |
1788 | pdg = pdg0; | |
1789 | status = primary->GetStatusCode(); | |
1790 | vxMC = primary->Vx(); | |
1791 | vyMC = primary->Vy(); | |
1792 | iParent = primary->GetFirstMother(); | |
c8fe2783 | 1793 | |
902aa95c | 1794 | if(GetDebug() > 1 ) { |
1795 | printf("AliAnaCalorimeterQA::ClusterHistograms() - Cluster most contributing mother: \n"); | |
1796 | printf("\t Mother label %d, pdg %d, %s, status %d, parent %d \n",iMother, pdg0, primary->GetName(),status, iParent); | |
1797 | } | |
c8fe2783 | 1798 | |
a6f26052 | 1799 | //Get final particle, no conversion products |
902aa95c | 1800 | if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCConversion)){ |
a6f26052 | 1801 | //Get the parent |
902aa95c | 1802 | primary = GetMCStack()->Particle(iParent); |
1803 | pdg = TMath::Abs(primary->GetPdgCode()); | |
1804 | if(GetDebug() > 1 ) printf("AliAnaCalorimeterQA::ClusterHistograms() - Converted cluster!. Find before conversion: \n"); | |
1805 | while((pdg == 22 || pdg == 11) && status != 1){ | |
1806 | iMother = iParent; | |
1807 | primary = GetMCStack()->Particle(iMother); | |
1808 | status = primary->GetStatusCode(); | |
1809 | iParent = primary->GetFirstMother(); | |
1810 | pdg = TMath::Abs(primary->GetPdgCode()); | |
1811 | if(GetDebug() > 1 )printf("\t pdg %d, index %d, %s, status %d \n",pdg, iMother, primary->GetName(),status); | |
1812 | } | |
c8fe2783 | 1813 | |
902aa95c | 1814 | if(GetDebug() > 1 ) { |
1815 | printf("AliAnaCalorimeterQA::ClusterHistograms() - Converted Cluster mother before conversion: \n"); | |
1816 | printf("\t Mother label %d, pdg %d, %s, status %d, parent %d \n",iMother, pdg, primary->GetName(), status, iParent); | |
1817 | } | |
c8fe2783 | 1818 | |
902aa95c | 1819 | } |
c8fe2783 | 1820 | |
a6f26052 | 1821 | //Overlapped pi0 (or eta, there will be very few), get the meson |
902aa95c | 1822 | if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPi0) || |
c8fe2783 | 1823 | GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCEta)){ |
902aa95c | 1824 | if(GetDebug() > 1 ) printf("AliAnaCalorimeterQA::ClusterHistograms() - Overlapped Meson decay!, Find it: \n"); |
1825 | while(pdg != 111 && pdg != 221){ | |
1826 | iMother = iParent; | |
1827 | primary = GetMCStack()->Particle(iMother); | |
1828 | status = primary->GetStatusCode(); | |
1829 | iParent = primary->GetFirstMother(); | |
1830 | pdg = TMath::Abs(primary->GetPdgCode()); | |
1831 | if(GetDebug() > 1 ) printf("\t pdg %d, %s, index %d\n",pdg, primary->GetName(),iMother); | |
1832 | if(iMother==-1) { | |
1833 | printf("AliAnaCalorimeterQA::ClusterHistograms() - Tagged as Overlapped photon but meson not found, why?\n"); | |
a6f26052 | 1834 | //break; |
902aa95c | 1835 | } |
1836 | } | |
c8fe2783 | 1837 | |
902aa95c | 1838 | if(GetDebug() > 2 ) printf("AliAnaCalorimeterQA::ClusterHistograms() - Overlapped %s decay, label %d \n", |
a6f26052 | 1839 | primary->GetName(),iMother); |
902aa95c | 1840 | } |
c8fe2783 | 1841 | |
902aa95c | 1842 | eMC = primary->Energy(); |
1843 | ptMC = primary->Pt(); | |
1844 | phiMC = primary->Phi(); | |
1845 | etaMC = primary->Eta(); | |
1846 | pdg = TMath::Abs(primary->GetPdgCode()); | |
1847 | charge = (Int_t) TDatabasePDG::Instance()->GetParticle(pdg)->Charge(); | |
c8fe2783 | 1848 | |
902aa95c | 1849 | } |
1850 | else if(GetReader()->ReadAODMCParticles() && !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCUnknown)){//it MC AOD and known tag | |
a6f26052 | 1851 | //Get the list of MC particles |
902aa95c | 1852 | if(!GetReader()->GetAODMCParticles(0)) { |
1853 | printf("AliAnaCalorimeterQA::ClusterHistograms() - MCParticles not available!\n"); | |
1854 | abort(); | |
1855 | } | |
9725fd2a | 1856 | |
902aa95c | 1857 | aodprimary = (AliAODMCParticle*) (GetReader()->GetAODMCParticles(0))->At(label); |
1858 | iMother = label; | |
1859 | pdg0 = TMath::Abs(aodprimary->GetPdgCode()); | |
1860 | pdg = pdg0; | |
1861 | status = aodprimary->IsPrimary(); | |
1862 | vxMC = aodprimary->Xv(); | |
1863 | vyMC = aodprimary->Yv(); | |
1864 | iParent = aodprimary->GetMother(); | |
c8fe2783 | 1865 | |
902aa95c | 1866 | if(GetDebug() > 1 ) { |
1867 | printf("AliAnaCalorimeterQA::ClusterHistograms() - Cluster most contributing mother: \n"); | |
1868 | printf("\t Mother label %d, pdg %d, Primary? %d, Physical Primary? %d, parent %d \n", | |
a6f26052 | 1869 | iMother, pdg0, aodprimary->IsPrimary(), aodprimary->IsPhysicalPrimary(), iParent); |
902aa95c | 1870 | } |
9725fd2a | 1871 | |
a6f26052 | 1872 | //Get final particle, no conversion products |
902aa95c | 1873 | if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCConversion)){ |
1874 | if(GetDebug() > 1 ) | |
1875 | printf("AliAnaCalorimeterQA::ClusterHistograms() - Converted cluster!. Find before conversion: \n"); | |
a6f26052 | 1876 | //Get the parent |
902aa95c | 1877 | aodprimary = (AliAODMCParticle*)(GetReader()->GetAODMCParticles(0))->At(iParent); |
1878 | pdg = TMath::Abs(aodprimary->GetPdgCode()); | |
1879 | while ((pdg == 22 || pdg == 11) && !aodprimary->IsPhysicalPrimary()) { | |
1880 | iMother = iParent; | |
1881 | aodprimary = (AliAODMCParticle*)(GetReader()->GetAODMCParticles(0))->At(iMother); | |
1882 | status = aodprimary->IsPrimary(); | |
1883 | iParent = aodprimary->GetMother(); | |
1884 | pdg = TMath::Abs(aodprimary->GetPdgCode()); | |
1885 | if(GetDebug() > 1 ) | |
1886 | printf("\t pdg %d, index %d, Primary? %d, Physical Primary? %d \n", | |
a6f26052 | 1887 | pdg, iMother, aodprimary->IsPrimary(), aodprimary->IsPhysicalPrimary()); |
902aa95c | 1888 | } |
1889 | ||
1890 | if(GetDebug() > 1 ) { | |
1891 | printf("AliAnaCalorimeterQA::ClusterHistograms() - Converted Cluster mother before conversion: \n"); | |
1892 | printf("\t Mother label %d, pdg %d, parent %d, Primary? %d, Physical Primary? %d \n", | |
a6f26052 | 1893 | iMother, pdg, iParent, aodprimary->IsPrimary(), aodprimary->IsPhysicalPrimary()); |
9725fd2a | 1894 | } |
902aa95c | 1895 | |
9725fd2a | 1896 | } |
c8fe2783 | 1897 | |
a6f26052 | 1898 | //Overlapped pi0 (or eta, there will be very few), get the meson |
902aa95c | 1899 | if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPi0) || |
c8fe2783 | 1900 | GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCEta)){ |
902aa95c | 1901 | if(GetDebug() > 1 ) printf("AliAnaCalorimeterQA::ClusterHistograms() - Overlapped Meson decay!, Find it: PDG %d, mom %d \n",pdg, iMother); |
1902 | while(pdg != 111 && pdg != 221){ | |
1903 | ||
1904 | iMother = iParent; | |
1905 | aodprimary = (AliAODMCParticle*)(GetReader()->GetAODMCParticles(0))->At(iMother); | |
1906 | status = aodprimary->IsPrimary(); | |
1907 | iParent = aodprimary->GetMother(); | |
1908 | pdg = TMath::Abs(aodprimary->GetPdgCode()); | |
c8fe2783 | 1909 | |
902aa95c | 1910 | if(GetDebug() > 1 ) printf("\t pdg %d, index %d\n",pdg, iMother); |
1911 | ||
1912 | if(iMother==-1) { | |
1913 | printf("AliAnaCalorimeterQA::ClusterHistograms() - Tagged as Overlapped photon but meson not found, why?\n"); | |
a6f26052 | 1914 | //break; |
902aa95c | 1915 | } |
1916 | } | |
1917 | ||
1918 | if(GetDebug() > 2 ) printf("AliAnaCalorimeterQA::ClusterHistograms() - Overlapped %s decay, label %d \n", | |
a6f26052 | 1919 | aodprimary->GetName(),iMother); |
902aa95c | 1920 | } |
c8fe2783 | 1921 | |
902aa95c | 1922 | status = aodprimary->IsPrimary(); |
1923 | eMC = aodprimary->E(); | |
1924 | ptMC = aodprimary->Pt(); | |
1925 | phiMC = aodprimary->Phi(); | |
1926 | etaMC = aodprimary->Eta(); | |
1927 | pdg = TMath::Abs(aodprimary->GetPdgCode()); | |
1928 | charge = aodprimary->Charge(); | |
c8fe2783 | 1929 | |
902aa95c | 1930 | } |
c8fe2783 | 1931 | |
a6f26052 | 1932 | //Float_t vz = primary->Vz(); |
0866d83a | 1933 | Float_t rVMC = TMath::Sqrt(vxMC*vxMC + vyMC*vyMC); |
902aa95c | 1934 | if((pdg == 22 || TMath::Abs(pdg)==11) && status!=1) { |
1935 | fhEMVxyz ->Fill(vxMC,vyMC);//,vz); | |
0866d83a | 1936 | fhEMR ->Fill(e,rVMC); |
902aa95c | 1937 | } |
c8fe2783 | 1938 | |
a6f26052 | 1939 | //printf("reco e %f, pt %f, phi %f, eta %f \n", e, pt, phi, eta); |
1940 | //printf("prim e %f, pt %f, phi %f, eta %f \n", eMC,ptMC,phiMC ,etaMC ); | |
1941 | //printf("vertex: vx %f, vy %f, vz %f, r %f \n", vxMC, vyMC, vz, r); | |
c8fe2783 | 1942 | |
1943 | ||
902aa95c | 1944 | fh2E ->Fill(e, eMC); |
1945 | fh2Pt ->Fill(pt, ptMC); | |
1946 | fh2Phi ->Fill(phi, phiMC); | |
1947 | fh2Eta ->Fill(eta, etaMC); | |
1948 | fhDeltaE ->Fill(eMC-e); | |
1949 | fhDeltaPt ->Fill(ptMC-pt); | |
1950 | fhDeltaPhi->Fill(phiMC-phi); | |
1951 | fhDeltaEta->Fill(etaMC-eta); | |
1952 | if(eMC > 0) fhRatioE ->Fill(e/eMC); | |
1953 | if(ptMC > 0) fhRatioPt ->Fill(pt/ptMC); | |
1954 | if(phiMC > 0) fhRatioPhi->Fill(phi/phiMC); | |
1955 | if(etaMC > 0) fhRatioEta->Fill(eta/etaMC); | |
c8fe2783 | 1956 | |
1957 | ||
a6f26052 | 1958 | //Overlapped pi0 (or eta, there will be very few) |
902aa95c | 1959 | if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPi0) || |
c8fe2783 | 1960 | GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCEta)){ |
1961 | fhPi0E ->Fill(e,eMC); | |
1962 | fhPi0Pt ->Fill(pt,ptMC); | |
1963 | fhPi0Eta ->Fill(eta,etaMC); | |
1964 | fhPi0Phi ->Fill(phi,phiMC); | |
1965 | if( nTracksMatched > 0){ | |
1966 | fhPi0ECharged ->Fill(e,eMC); | |
1967 | fhPi0PtCharged ->Fill(pt,ptMC); | |
1968 | fhPi0PhiCharged ->Fill(phi,phiMC); | |
1969 | fhPi0EtaCharged ->Fill(eta,etaMC); | |
1970 | } | |
902aa95c | 1971 | }//Overlapped pizero decay |
1972 | else if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPhoton)){ | |
c8fe2783 | 1973 | fhGamE ->Fill(e,eMC); |
1974 | fhGamPt ->Fill(pt,ptMC); | |
1975 | fhGamEta ->Fill(eta,etaMC); | |
1976 | fhGamPhi ->Fill(phi,phiMC); | |
1977 | fhGamDeltaE ->Fill(eMC-e); | |
1978 | fhGamDeltaPt ->Fill(ptMC-pt); | |
1979 | fhGamDeltaPhi->Fill(phiMC-phi); | |
1980 | fhGamDeltaEta->Fill(etaMC-eta); | |
1981 | if(eMC > 0) fhGamRatioE ->Fill(e/eMC); | |
1982 | if(ptMC > 0) fhGamRatioPt ->Fill(pt/ptMC); | |
1983 | if(phiMC > 0) fhGamRatioPhi->Fill(phi/phiMC); | |
1984 | if(etaMC > 0) fhGamRatioEta->Fill(eta/etaMC); | |
1985 | if( nTracksMatched > 0){ | |
1986 | fhGamECharged ->Fill(e,eMC); | |
1987 | fhGamPtCharged ->Fill(pt,ptMC); | |
1988 | fhGamPhiCharged ->Fill(phi,phiMC); | |
1989 | fhGamEtaCharged ->Fill(eta,etaMC); | |
1990 | } | |
902aa95c | 1991 | }//photon |
1992 | else if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCElectron)){ | |
1993 | fhEleE ->Fill(e,eMC); | |
1994 | fhElePt ->Fill(pt,ptMC); | |
1995 | fhEleEta ->Fill(eta,etaMC); | |
1996 | fhElePhi ->Fill(phi,phiMC); | |
1997 | fhEMVxyz ->Fill(vxMC,vyMC);//,vz); | |
0866d83a | 1998 | fhEMR ->Fill(e,rVMC); |
902aa95c | 1999 | if( nTracksMatched > 0){ |
2000 | fhEleECharged ->Fill(e,eMC); | |
2001 | fhElePtCharged ->Fill(pt,ptMC); | |
2002 | fhElePhiCharged ->Fill(phi,phiMC); | |
2003 | fhEleEtaCharged ->Fill(eta,etaMC); | |
2004 | } | |
2005 | } | |
2006 | else if(charge == 0){ | |
2007 | fhNeHadE ->Fill(e,eMC); | |
2008 | fhNeHadPt ->Fill(pt,ptMC); | |
2009 | fhNeHadEta ->Fill(eta,etaMC); | |
2010 | fhNeHadPhi ->Fill(phi,phiMC); | |
2011 | fhHaVxyz ->Fill(vxMC,vyMC);//,vz); | |
0866d83a | 2012 | fhHaR ->Fill(e,rVMC); |
902aa95c | 2013 | if( nTracksMatched > 0){ |
2014 | fhNeHadECharged ->Fill(e,eMC); | |
2015 | fhNeHadPtCharged ->Fill(pt,ptMC); | |
2016 | fhNeHadPhiCharged ->Fill(phi,phiMC); | |
2017 | fhNeHadEtaCharged ->Fill(eta,etaMC); | |
9725fd2a | 2018 | } |
902aa95c | 2019 | } |
2020 | else if(charge!=0){ | |
2021 | fhChHadE ->Fill(e,eMC); | |
2022 | fhChHadPt ->Fill(pt,ptMC); | |
2023 | fhChHadEta ->Fill(eta,etaMC); | |
2024 | fhChHadPhi ->Fill(phi,phiMC); | |
2025 | fhHaVxyz ->Fill(vxMC,vyMC);//,vz); | |
0866d83a | 2026 | fhHaR ->Fill(e,rVMC); |
902aa95c | 2027 | if( nTracksMatched > 0){ |
2028 | fhChHadECharged ->Fill(e,eMC); | |
2029 | fhChHadPtCharged ->Fill(pt,ptMC); | |
2030 | fhChHadPhiCharged ->Fill(phi,phiMC); | |
2031 | fhChHadEtaCharged ->Fill(eta,etaMC); | |
9725fd2a | 2032 | } |
902aa95c | 2033 | } |
2034 | }//Work with MC | |
c8fe2783 | 2035 | |
902aa95c | 2036 | |
a6f26052 | 2037 | //Match tracks and clusters |
2038 | //To be Modified in case of AODs | |
902aa95c | 2039 | |
a6f26052 | 2040 | //if(ntracksmatched==1 && trackIndex==-1) ntracksmatched=0; |
902aa95c | 2041 | |
2042 | if( nTracksMatched > 0){ | |
a6f26052 | 2043 | if(fFillAllTH12){ |
2044 | fhECharged ->Fill(e); | |
2045 | fhPtCharged ->Fill(pt); | |
2046 | fhPhiCharged ->Fill(phi); | |
2047 | fhEtaCharged ->Fill(eta); | |
2048 | } | |
0866d83a | 2049 | fhEtaPhiECharged->Fill(eta,phi,e); |
2050 | fhNCellsPerClusterMIPCharged->Fill(e, nCaloCellsPerCluster,eta); | |
902aa95c | 2051 | |
a6f26052 | 2052 | //printf("track index %d ntracks %d\n", esd->GetNumberOfTracks()); |
2053 | //Study the track and matched cluster if track exists. | |
6fa7d352 | 2054 | if(!track) return; |
2055 | Double_t emcpos[3] = {0.,0.,0.}; | |
2056 | Double_t emcmom[3] = {0.,0.,0.}; | |
2057 | Double_t radius = 441.0; //[cm] EMCAL radius +13cm | |
2058 | Double_t bfield = 0.; | |
2059 | Double_t tphi = 0; | |
2060 | Double_t teta = 0; | |
2061 | Double_t tmom = 0; | |
2062 | Double_t tpt = 0; | |
2063 | Double_t tmom2 = 0; | |
2064 | Double_t tpcSignal = 0; | |
2065 | Bool_t okpos = kFALSE; | |
2066 | Bool_t okmom = kFALSE; | |
2067 | Bool_t okout = kFALSE; | |
2068 | Int_t nITS = 0; | |
2069 | Int_t nTPC = 0; | |
2070 | ||
a6f26052 | 2071 | //In case of ESDs get the parameters in this way |
2072 | // if(GetReader()->GetDataType()==AliCaloTrackReader::kESD) { | |
c8fe2783 | 2073 | if (track->GetOuterParam() ) { |
2074 | okout = kTRUE; | |
2075 | ||
2076 | bfield = GetReader()->GetInputEvent()->GetMagneticField(); | |
2077 | okpos = track->GetOuterParam()->GetXYZAt(radius,bfield,emcpos); | |
2078 | okmom = track->GetOuterParam()->GetPxPyPzAt(radius,bfield,emcmom); | |
2079 | if(!(okpos && okmom)) return; | |
2080 | ||
2081 | TVector3 position(emcpos[0],emcpos[1],emcpos[2]); | |
2082 | TVector3 momentum(emcmom[0],emcmom[1],emcmom[2]); | |
2083 | tphi = position.Phi(); | |
2084 | teta = position.Eta(); | |
2085 | tmom = momentum.Mag(); | |
2086 | ||
a6f26052 | 2087 | //Double_t tphi = track->GetOuterParam()->Phi(); |
2088 | //Double_t teta = track->GetOuterParam()->Eta(); | |
2089 | //Double_t tmom = track->GetOuterParam()->P(); | |
c8fe2783 | 2090 | tpt = track->Pt(); |
2091 | tmom2 = track->P(); | |
2092 | tpcSignal = track->GetTPCsignal(); | |
2093 | ||
2094 | nITS = track->GetNcls(0); | |
2095 | nTPC = track->GetNcls(1); | |
2096 | }//Outer param available | |
a6f26052 | 2097 | //}// ESDs |
2098 | // else if(GetReader()->GetDataType()==AliCaloTrackReader::kAOD) { | |
2099 | // AliAODPid* pid = (AliAODPid*) ((AliAODTrack *) track)->GetDetPid(); | |
2100 | // if (pid) { | |
2101 | // okout = kTRUE; | |
2102 | // pid->GetEMCALPosition(emcpos); | |
2103 | // pid->GetEMCALMomentum(emcmom); | |
2104 | // | |
2105 | // TVector3 position(emcpos[0],emcpos[1],emcpos[2]); | |
2106 | // TVector3 momentum(emcmom[0],emcmom[1],emcmom[2]); | |
2107 | // tphi = position.Phi(); | |
2108 | // teta = position.Eta(); | |
2109 | // tmom = momentum.Mag(); | |
2110 | // | |
2111 | // tpt = ((AliAODTrack*)track)->Pt(); | |
2112 | // tmom2 = ((AliAODTrack*)track)->P(); | |
2113 | // tpcSignal = pid->GetTPCsignal(); | |
2114 | // | |
2115 | // //nITS = ((AliAODTrack*)track)->GetNcls(0); | |
2116 | // //nTPC = ((AliAODTrack*)track)->GetNcls(1); | |
2117 | // }//Outer param available | |
2118 | // }//AODs | |
2119 | // else return; //Do nothing case not implemented. | |
c8fe2783 | 2120 | |
2121 | if(okout){ | |
2122 | Double_t deta = teta - eta; | |
2123 | Double_t dphi = tphi - phi; | |
2124 | if(dphi > TMath::Pi()) dphi -= 2*TMath::Pi(); | |
2125 | if(dphi < -TMath::Pi()) dphi += 2*TMath::Pi(); | |
2126 | Double_t dR = sqrt(dphi*dphi + deta*deta); | |
6fa7d352 | 2127 | |
c8fe2783 | 2128 | Double_t pOverE = tmom/e; |
6fa7d352 | 2129 | |
c8fe2783 | 2130 | fh1pOverE->Fill(tpt, pOverE); |
2131 | if(dR < 0.02) fh1pOverER02->Fill(tpt,pOverE); | |
6fa7d352 | 2132 | |
c8fe2783 | 2133 | fh1dR->Fill(dR); |
2134 | fh2MatchdEdx->Fill(tmom2,tpcSignal); | |
6fa7d352 | 2135 | |
c8fe2783 | 2136 | if(IsDataMC() && primary){ |
2137 | Int_t pdg = primary->GetPdgCode(); | |
2138 | Double_t charge = TDatabasePDG::Instance()->GetParticle(pdg)->Charge(); | |
6fa7d352 | 2139 | |
c8fe2783 | 2140 | if(TMath::Abs(pdg) == 11){ |
2141 | fhMCEle1pOverE->Fill(tpt,pOverE); | |
2142 | fhMCEle1dR->Fill(dR); | |
2143 | fhMCEle2MatchdEdx->Fill(tmom2,tpcSignal); | |
2144 | if(dR < 0.02) fhMCEle1pOverER02->Fill(tpt,pOverE); | |
2145 | } | |
2146 | else if(charge!=0){ | |
2147 | fhMCChHad1pOverE->Fill(tpt,pOverE); | |
2148 | fhMCChHad1dR->Fill(dR); | |
2149 | fhMCChHad2MatchdEdx->Fill(tmom2,tpcSignal); | |
2150 | if(dR < 0.02) fhMCChHad1pOverER02->Fill(tpt,pOverE); | |
2151 | } | |
2152 | else if(charge == 0){ | |
2153 | fhMCNeutral1pOverE->Fill(tpt,pOverE); | |
2154 | fhMCNeutral1dR->Fill(dR); | |
2155 | fhMCNeutral2MatchdEdx->Fill(tmom2,tpcSignal); | |
2156 | if(dR < 0.02) fhMCNeutral1pOverER02->Fill(tpt,pOverE); | |
2157 | } | |
2158 | }//DataMC | |
2159 | ||
2160 | if(dR < 0.02 && pOverE > 0.5 && pOverE < 1.5 | |
2161 | && nCaloCellsPerCluster > 1 && nITS > 3 && nTPC > 20) { | |
2162 | fh2EledEdx->Fill(tmom2,tpcSignal); | |
2163 | } | |
2164 | } | |
2165 | else{//no ESD external param or AODPid | |
a6f26052 | 2166 | // ULong_t status=AliESDtrack::kTPCrefit; |
2167 | // status|=AliESDtrack::kITSrefit; | |
2168 | //printf("track status %d\n", track->GetStatus() ); | |
2169 | // fhEChargedNoOut ->Fill(e); | |
2170 | // fhPtChargedNoOut ->Fill(pt); | |
2171 | // fhPhiChargedNoOut ->Fill(phi); | |
2172 | // fhEtaChargedNoOut ->Fill(eta); | |
2173 | // fhEtaPhiChargedNoOut ->Fill(eta,phi); | |
2174 | // if(GetDebug() >= 0 && ((track->GetStatus() & status) == status)) printf("ITS+TPC\n"); | |
c8fe2783 | 2175 | if(GetDebug() >= 0) printf("No ESD external param or AliAODPid \n"); |
2176 | ||
2177 | }//No out params | |
6fa7d352 | 2178 | }//matched clusters with tracks |
c8fe2783 | 2179 | |
902aa95c | 2180 | }// Clusters |
c8fe2783 | 2181 | |
a6f26052 | 2182 | //__________________________________ |
17708df9 | 2183 | //void AliAnaCalorimeterQA::CorrelateCalorimeters(TRefArray* refArray){ |
2184 | // // Correlate information from PHOS and EMCAL | |
2185 | // TRefArray * caloClustersEMCAL = 0; | |
2186 | // TRefArray * caloClustersPHOS = 0; | |
2187 | // | |
2188 | // // Get once the array of clusters per calorimeter, avoid an extra loop. | |
2189 | // if(fCalorimeter == "EMCAL"){ | |
2190 | // caloClustersPHOS = new TRefArray(); | |
2191 | // GetReader()->GetInputEvent()->GetPHOSClusters(caloClustersPHOS); | |
2192 | // caloClustersEMCAL = new TRefArray(*refArray); | |
2193 | // } | |
2194 | // else if(fCalorimeter == "PHOS") { | |
2195 | // caloClustersEMCAL = new TRefArray(); | |
2196 | // GetReader()->GetInputEvent()->GetEMCALClusters (caloClustersEMCAL); | |
2197 | // caloClustersPHOS = new TRefArray(*refArray); | |
2198 | // } | |
2199 | // | |
2200 | // //Fill histograms with clusters | |
2201 | // | |
2202 | // fhCaloCorrNClusters->Fill(caloClustersEMCAL->GetEntriesFast(),caloClustersPHOS->GetEntriesFast()); | |
2203 | // Float_t sumClusterEnergyEMCAL = 0; | |
2204 | // Float_t sumClusterEnergyPHOS = 0; | |
2205 | // Int_t iclus = 0; | |
2206 | // for(iclus = 0 ; iclus < caloClustersEMCAL->GetEntriesFast() ; iclus++) | |
2207 | // sumClusterEnergyEMCAL += ((AliVCluster*)caloClustersEMCAL->At(iclus))->E(); | |
2208 | // for(iclus = 0 ; iclus < caloClustersPHOS->GetEntriesFast(); iclus++) | |
2209 | // sumClusterEnergyPHOS += ((AliVCluster*)caloClustersPHOS->At(iclus))->E(); | |
2210 | // fhCaloCorrEClusters->Fill(sumClusterEnergyEMCAL,sumClusterEnergyPHOS); | |
2211 | // | |
2212 | // //Fill histograms with cells | |
2213 | // | |
2214 | // AliVCaloCells * cellsEMCAL = GetReader()->GetInputEvent()->GetEMCALCells(); | |
2215 | // AliVCaloCells * cellsPHOS = GetReader()->GetInputEvent()->GetPHOSCells(); | |
2216 | // fhCaloCorrNCells ->Fill(cellsEMCAL->GetNumberOfCells(),cellsPHOS->GetNumberOfCells()); | |
2217 | // | |
2218 | // Int_t icell = 0; | |
2219 | // Float_t sumCellEnergyEMCAL = 0; | |
2220 | // Float_t sumCellEnergyPHOS = 0; | |
2221 | // for(icell = 0 ; icell < cellsEMCAL->GetNumberOfCells() ; icell++) | |
2222 | // sumCellEnergyEMCAL += cellsEMCAL->GetAmplitude(icell); | |
2223 | // for(icell = 0 ; icell < cellsPHOS->GetNumberOfCells(); icell++) | |
2224 | // sumCellEnergyPHOS += cellsPHOS->GetAmplitude(icell); | |
2225 | // fhCaloCorrECells->Fill(sumCellEnergyEMCAL,sumCellEnergyPHOS); | |
2226 | // if(GetDebug() > 0 ){ | |
2227 | // printf("AliAnaCalorimeterQA::CorrelateCalorimeters() - ESD: \n"); | |
2228 | // printf("\t EMCAL: N cells %d, N clusters %d, summed E cells %f, summed E clusters %f \n", | |
2229 | // cellsEMCAL->GetNumberOfCells(),caloClustersEMCAL->GetEntriesFast(),sumCellEnergyEMCAL,sumClusterEnergyEMCAL); | |
2230 | // printf("\t PHOS : N cells %d, N clusters %d, summed E cells %f, summed E clusters %f \n", | |
2231 | // cellsPHOS->GetNumberOfCells(),caloClustersPHOS->GetEntriesFast(),sumCellEnergyPHOS,sumClusterEnergyPHOS); | |
2232 | // } | |
2233 | // | |
2234 | // delete caloClustersEMCAL; | |
2235 | // delete caloClustersPHOS; | |
2236 | // | |
2237 | //} | |
2238 | ||
2239 | //__________________________________ | |
2240 | void AliAnaCalorimeterQA::CorrelateCalorimeters(){ | |
a6f26052 | 2241 | // Correlate information from PHOS and EMCAL |
17708df9 | 2242 | TObjArray * caloClustersEMCAL = GetAODEMCAL(); |
2243 | TObjArray * caloClustersPHOS = GetAODPHOS(); | |
2244 | ||
a6f26052 | 2245 | //Fill histograms with clusters |
c8fe2783 | 2246 | |
2247 | fhCaloCorrNClusters->Fill(caloClustersEMCAL->GetEntriesFast(),caloClustersPHOS->GetEntriesFast()); | |
2248 | Float_t sumClusterEnergyEMCAL = 0; | |
2249 | Float_t sumClusterEnergyPHOS = 0; | |
2250 | Int_t iclus = 0; | |
2251 | for(iclus = 0 ; iclus < caloClustersEMCAL->GetEntriesFast() ; iclus++) | |
2252 | sumClusterEnergyEMCAL += ((AliVCluster*)caloClustersEMCAL->At(iclus))->E(); | |
2253 | for(iclus = 0 ; iclus < caloClustersPHOS->GetEntriesFast(); iclus++) | |
2254 | sumClusterEnergyPHOS += ((AliVCluster*)caloClustersPHOS->At(iclus))->E(); | |
2255 | fhCaloCorrEClusters->Fill(sumClusterEnergyEMCAL,sumClusterEnergyPHOS); | |
2256 | ||
a6f26052 | 2257 | //Fill histograms with cells |
c8fe2783 | 2258 | |
17708df9 | 2259 | AliVCaloCells * cellsEMCAL = GetEMCALCells(); |
2260 | AliVCaloCells * cellsPHOS = GetPHOSCells(); | |
c8fe2783 | 2261 | fhCaloCorrNCells ->Fill(cellsEMCAL->GetNumberOfCells(),cellsPHOS->GetNumberOfCells()); |
2262 | ||
2263 | Int_t icell = 0; | |
2264 | Float_t sumCellEnergyEMCAL = 0; | |
2265 | Float_t sumCellEnergyPHOS = 0; | |
2266 | for(icell = 0 ; icell < cellsEMCAL->GetNumberOfCells() ; icell++) | |
2267 | sumCellEnergyEMCAL += cellsEMCAL->GetAmplitude(icell); | |
2268 | for(icell = 0 ; icell < cellsPHOS->GetNumberOfCells(); icell++) | |
2269 | sumCellEnergyPHOS += cellsPHOS->GetAmplitude(icell); | |
2270 | fhCaloCorrECells->Fill(sumCellEnergyEMCAL,sumCellEnergyPHOS); | |
2271 | if(GetDebug() > 0 ){ | |
2272 | printf("AliAnaCalorimeterQA::CorrelateCalorimeters() - ESD: \n"); | |
2273 | printf("\t EMCAL: N cells %d, N clusters %d, summed E cells %f, summed E clusters %f \n", | |
a6f26052 | 2274 | cellsEMCAL->GetNumberOfCells(),caloClustersEMCAL->GetEntriesFast(),sumCellEnergyEMCAL,sumClusterEnergyEMCAL); |
c8fe2783 | 2275 | printf("\t PHOS : N cells %d, N clusters %d, summed E cells %f, summed E clusters %f \n", |
a6f26052 | 2276 | cellsPHOS->GetNumberOfCells(),caloClustersPHOS->GetEntriesFast(),sumCellEnergyPHOS,sumClusterEnergyPHOS); |
c8fe2783 | 2277 | } |
a0bb4dc0 | 2278 | } |
2279 | ||
17708df9 | 2280 | |
a6f26052 | 2281 | //______________________________________________________________________________ |
902aa95c | 2282 | void AliAnaCalorimeterQA::MCHistograms(const TLorentzVector mom, const Int_t pdg){ |
a6f26052 | 2283 | //Fill pure monte carlo related histograms |
4865e325 | 2284 | |
902aa95c | 2285 | Float_t eMC = mom.E(); |
2286 | Float_t ptMC = mom.Pt(); | |
2287 | Float_t phiMC = mom.Phi(); | |
2288 | if(phiMC < 0) | |
2289 | phiMC += TMath::TwoPi(); | |
2290 | Float_t etaMC = mom.Eta(); | |
2291 | ||
2292 | if (TMath::Abs(etaMC) > 1) return; | |
c8fe2783 | 2293 | |
902aa95c | 2294 | Bool_t in = kTRUE; |
ff45398a | 2295 | if(IsFiducialCutOn()) in = GetFiducialCut()->IsInFiducialCut(mom,fCalorimeter) ; |
902aa95c | 2296 | |
2297 | if (pdg==22) { | |
2298 | fhGenGamPt ->Fill(ptMC); | |
2299 | fhGenGamEta->Fill(etaMC); | |
2300 | fhGenGamPhi->Fill(phiMC); | |
2301 | if(in){ | |
2302 | fhGenGamAccE ->Fill(eMC); | |
2303 | fhGenGamAccPt ->Fill(ptMC); | |
2304 | fhGenGamAccEta->Fill(etaMC); | |
2305 | fhGenGamAccPhi->Fill(phiMC); | |
2306 | } | |
2307 | } | |
2308 | else if (pdg==111) { | |
2309 | fhGenPi0Pt ->Fill(ptMC); | |
2310 | fhGenPi0Eta->Fill(etaMC); | |
2311 | fhGenPi0Phi->Fill(phiMC); | |
2312 | if(in){ | |
2313 | fhGenPi0AccE ->Fill(eMC); | |
2314 | fhGenPi0AccPt ->Fill(ptMC); | |
2315 | fhGenPi0AccEta->Fill(etaMC); | |
2316 | fhGenPi0AccPhi->Fill(phiMC); | |
2317 | } | |
2318 | } | |
2319 | else if (pdg==221) { | |
2320 | fhGenEtaPt ->Fill(ptMC); | |
2321 | fhGenEtaEta->Fill(etaMC); | |
2322 | fhGenEtaPhi->Fill(phiMC); | |
2323 | } | |
2324 | else if (pdg==223) { | |
2325 | fhGenOmegaPt ->Fill(ptMC); | |
2326 | fhGenOmegaEta->Fill(etaMC); | |
2327 | fhGenOmegaPhi->Fill(phiMC); | |
2328 | } | |
2329 | else if (TMath::Abs(pdg)==11) { | |
2330 | fhGenElePt ->Fill(ptMC); | |
2331 | fhGenEleEta->Fill(etaMC); | |
2332 | fhGenElePhi->Fill(phiMC); | |
2333 | } | |
2334 | ||
2335 | } | |
c8fe2783 | 2336 | |
a6f26052 | 2337 | //________________________________________________________________________ |
9725fd2a | 2338 | void AliAnaCalorimeterQA::ReadHistograms(TList* outputList) |
2339 | { | |
a6f26052 | 2340 | // Needed when Terminate is executed in distributed environment |
2341 | // Refill analysis histograms of this class with corresponding histograms in output list. | |
9725fd2a | 2342 | |
a6f26052 | 2343 | // Histograms of this analsys are kept in the same list as other analysis, recover the position of |
2344 | // the first one and then add the next | |
9725fd2a | 2345 | Int_t index = outputList->IndexOf(outputList->FindObject(GetAddedHistogramsStringToName()+"hE")); |
a6f26052 | 2346 | //printf("Calo: %s, index: %d, nmodules %d\n",fCalorimeter.Data(),index,fNModules); |
63f1dd86 | 2347 | |
a6f26052 | 2348 | //Read histograms, must be in the same order as in GetCreateOutputObject. |
a5fafd85 | 2349 | fhE = (TH1F *) outputList->At(index++); |
a6f26052 | 2350 | if(fFillAllTH12){ |
2351 | fhPt = (TH1F *) outputList->At(index++); | |
2352 | fhPhi = (TH1F *) outputList->At(index++); | |
2353 | fhEta = (TH1F *) outputList->At(index++); | |
2354 | } | |
a5fafd85 | 2355 | fhEtaPhiE = (TH3F *) outputList->At(index++); |
a6f26052 | 2356 | |
4cf55759 | 2357 | fhClusterTimeEnergy = (TH2F*) outputList->At(index++); |
2358 | ||
eb5a51ae | 2359 | fhLambda = (TH3F *) outputList->At(index++); |
2360 | fhDispersion = (TH2F *) outputList->At(index++); | |
a6f26052 | 2361 | if(fFillAllTH12){ |
2362 | fhECharged = (TH1F *) outputList->At(index++); | |
2363 | fhPtCharged = (TH1F *) outputList->At(index++); | |
2364 | fhPhiCharged = (TH1F *) outputList->At(index++); | |
2365 | fhEtaCharged = (TH1F *) outputList->At(index++); | |
2366 | } | |
0866d83a | 2367 | fhEtaPhiECharged = (TH3F *) outputList->At(index++); |
9725fd2a | 2368 | |
a0bb4dc0 | 2369 | fh1pOverE = (TH2F *) outputList->At(index++); |
2370 | fh1dR = (TH1F *) outputList->At(index++); | |
2371 | fh2MatchdEdx = (TH2F *) outputList->At(index++); | |
2372 | fh2EledEdx = (TH2F *) outputList->At(index++); | |
2373 | fh1pOverER02 = (TH2F *) outputList->At(index++); | |
2374 | ||
a5fafd85 | 2375 | fhIM = (TH2F *) outputList->At(index++); |
2376 | fhIMCellCut = (TH2F *) outputList->At(index++); | |
b8187de4 | 2377 | fhAsym = (TH2F *) outputList->At(index++); |
9725fd2a | 2378 | |
0866d83a | 2379 | fhNCellsPerCluster = (TH3F *) outputList->At(index++); |
2380 | fhNCellsPerClusterMIP = (TH3F *) outputList->At(index++); | |
2381 | fhNCellsPerClusterMIPCharged = (TH3F *) outputList->At(index++); | |
9725fd2a | 2382 | fhNClusters = (TH1F *) outputList->At(index++); |
a6f26052 | 2383 | |
a6f26052 | 2384 | fhRNCells = (TH2F *) outputList->At(index++); |
2385 | fhXNCells = (TH2F *) outputList->At(index++); | |
2386 | fhYNCells = (TH2F *) outputList->At(index++); | |
2387 | fhZNCells = (TH2F *) outputList->At(index++); | |
2388 | fhRE = (TH2F *) outputList->At(index++); | |
2389 | fhXE = (TH2F *) outputList->At(index++); | |
2390 | fhYE = (TH2F *) outputList->At(index++); | |
2391 | fhZE = (TH2F *) outputList->At(index++); | |
b8187de4 | 2392 | fhXYZ = (TH3F *) outputList->At(index++); |
2393 | if(fFillAllPosHisto){ | |
a6f26052 | 2394 | fhRCellE = (TH2F *) outputList->At(index++); |
2395 | fhXCellE = (TH2F *) outputList->At(index++); | |
2396 | fhYCellE = (TH2F *) outputList->At(index++); | |
2397 | fhZCellE = (TH2F *) outputList->At(index++); | |
2398 | fhXYZCell = (TH3F *) outputList->At(index++); | |
2399 | fhDeltaCellClusterRNCells = (TH2F *) outputList->At(index++); | |
2400 | fhDeltaCellClusterXNCells = (TH2F *) outputList->At(index++); | |
2401 | fhDeltaCellClusterYNCells = (TH2F *) outputList->At(index++); | |
2402 | fhDeltaCellClusterZNCells = (TH2F *) outputList->At(index++); | |
2403 | fhDeltaCellClusterRE = (TH2F *) outputList->At(index++); | |
2404 | fhDeltaCellClusterXE = (TH2F *) outputList->At(index++); | |
2405 | fhDeltaCellClusterYE = (TH2F *) outputList->At(index++); | |
2406 | fhDeltaCellClusterZE = (TH2F *) outputList->At(index++); | |
2407 | fhEtaPhiAmp = (TH3F *) outputList->At(index++); | |
2408 | } | |
2409 | ||
9725fd2a | 2410 | fhNCells = (TH1F *) outputList->At(index++); |
2411 | fhAmplitude = (TH1F *) outputList->At(index++); | |
0cdb88b8 | 2412 | fhAmpId = (TH2F *) outputList->At(index++); |
c8fe2783 | 2413 | |
5a2dbc3c | 2414 | if(GetReader()->GetDataType()==AliCaloTrackReader::kESD) { |
50f39b97 | 2415 | |
2416 | fhCellTimeSpreadRespectToCellMax = (TH1F *) outputList->At(index++); | |
2417 | fhCellIdCellLargeTimeSpread = (TH1F *) outputList->At(index++); | |
c8fe2783 | 2418 | |
5a2dbc3c | 2419 | fhTime = (TH1F *) outputList->At(index++); |
2420 | fhTimeId = (TH2F *) outputList->At(index++); | |
2421 | fhTimeAmp = (TH2F *) outputList->At(index++); | |
c1ac3823 | 2422 | |
a6f26052 | 2423 | // fhT0Time = (TH1F *) outputList->At(index++); |
2424 | // fhT0TimeId = (TH2F *) outputList->At(index++); | |
2425 | // fhT0TimeAmp = (TH2F *) outputList->At(index++); | |
c1ac3823 | 2426 | |
5a2dbc3c | 2427 | } |
9725fd2a | 2428 | |
0866d83a | 2429 | |
a0bb4dc0 | 2430 | if(fCorrelateCalos){ |
2431 | fhCaloCorrNClusters = (TH2F *) outputList->At(index++); | |
2432 | fhCaloCorrEClusters = (TH2F *) outputList->At(index++); | |
2433 | fhCaloCorrNCells = (TH2F *) outputList->At(index++); | |
2434 | fhCaloCorrECells = (TH2F *) outputList->At(index++); | |
2435 | } | |
63f1dd86 | 2436 | |
a6f26052 | 2437 | //Module histograms |
50f39b97 | 2438 | fhEMod = new TH1F*[fNModules]; |
2439 | fhNClustersMod = new TH1F*[fNModules]; | |
2440 | fhNCellsPerClusterMod = new TH2F*[fNModules]; | |
2441 | fhNCellsMod = new TH1F*[fNModules]; | |
2442 | fhGridCellsMod = new TH2F*[fNModules]; | |
2443 | fhGridCellsEMod = new TH2F*[fNModules]; | |
2444 | if(GetReader()->GetDataType()==AliCaloTrackReader::kESD) | |
2445 | fhGridCellsTimeMod = new TH2F*[fNModules]; | |
2446 | fhAmplitudeMod = new TH1F*[fNModules]; | |
2447 | if(fCalorimeter=="EMCAL") | |
eb5a51ae | 2448 | fhAmplitudeModFraction = new TH1F*[fNModules*3]; |
2449 | ||
a6f26052 | 2450 | //EMCAL |
eb5a51ae | 2451 | fhTimeAmpPerRCU = new TH2F*[fNModules*fNRCU]; |
2452 | ||
50f39b97 | 2453 | fhIMMod = new TH2F*[fNModules]; |
2454 | fhIMCellCutMod = new TH2F*[fNModules]; | |
c8fe2783 | 2455 | |
a5fafd85 | 2456 | for(Int_t imod = 0 ; imod < fNModules; imod++){ |
50f39b97 | 2457 | fhEMod[imod] = (TH1F *) outputList->At(index++); |
2458 | fhNClustersMod[imod] = (TH1F *) outputList->At(index++); | |
2459 | fhNCellsPerClusterMod[imod] = (TH2F *) outputList->At(index++); | |
2460 | fhNCellsMod[imod] = (TH1F *) outputList->At(index++); | |
2461 | fhGridCellsMod[imod] = (TH2F *) outputList->At(index++); | |
2462 | fhGridCellsEMod[imod] = (TH2F *) outputList->At(index++); | |
2463 | if(GetReader()->GetDataType()==AliCaloTrackReader::kESD) | |
2464 | fhGridCellsTimeMod[imod] = (TH2F *) outputList->At(index++); | |
2465 | fhAmplitudeMod[imod] = (TH1F *) outputList->At(index++); | |
eb5a51ae | 2466 | |
50f39b97 | 2467 | if(fCalorimeter=="EMCAL"){ |
2468 | for(Int_t ifrac = 0; ifrac < 3; ifrac++){ | |
2469 | fhAmplitudeModFraction[imod*3+ifrac] = (TH1F *) outputList->At(index++); | |
2470 | } | |
2471 | } | |
eb5a51ae | 2472 | |
c1ac3823 | 2473 | for(Int_t ircu = 0; ircu < fNRCU; ircu++){ |
eb5a51ae | 2474 | fhTimeAmpPerRCU[imod*fNRCU+ircu] = (TH2F *) outputList->At(index++); |
a6f26052 | 2475 | //fhT0TimeAmpPerRCU[imod*fNRCU+ircu] = (TH2F *) outputList->At(index++); |
2476 | // for(Int_t imod2 = 0; imod2 < fNModules; imod2++){ | |
2477 | // for(Int_t ircu2 = 0; ircu2 < fNModules; ircu2++){ | |
2478 | // fhTimeCorrRCU[imod*fNRCU+ircu+imod2*fNRCU+ircu2] = (TH2F *) outputList->At(index++); | |
2479 | // } | |
2480 | // } | |
c1ac3823 | 2481 | } |
50f39b97 | 2482 | fhIMMod[imod] = (TH2F *) outputList->At(index++); |
2483 | fhIMCellCutMod[imod] = (TH2F *) outputList->At(index++); | |
c8fe2783 | 2484 | |
a5fafd85 | 2485 | } |
a0bb4dc0 | 2486 | |
9725fd2a | 2487 | if(IsDataMC()){ |
2488 | fhDeltaE = (TH1F *) outputList->At(index++); | |
2489 | fhDeltaPt = (TH1F *) outputList->At(index++); | |
2490 | fhDeltaPhi = (TH1F *) outputList->At(index++); | |
2491 | fhDeltaEta = (TH1F *) outputList->At(index++); | |
2492 | ||
2493 | fhRatioE = (TH1F *) outputList->At(index++); | |
2494 | fhRatioPt = (TH1F *) outputList->At(index++); | |
2495 | fhRatioPhi = (TH1F *) outputList->At(index++); | |
2496 | fhRatioEta = (TH1F *) outputList->At(index++); | |
2497 | ||
2498 | fh2E = (TH2F *) outputList->At(index++); | |
2499 | fh2Pt = (TH2F *) outputList->At(index++); | |
2500 | fh2Phi = (TH2F *) outputList->At(index++); | |
2501 | fh2Eta = (TH2F *) outputList->At(index++); | |
2502 | ||
2503 | fhGamE = (TH2F *) outputList->At(index++); | |
2504 | fhGamPt = (TH2F *) outputList->At(index++); | |
2505 | fhGamPhi = (TH2F *) outputList->At(index++); | |
2506 | fhGamEta = (TH2F *) outputList->At(index++); | |
2507 | ||
2508 | fhGamDeltaE = (TH1F *) outputList->At(index++); | |
2509 | fhGamDeltaPt = (TH1F *) outputList->At(index++); | |
2510 | fhGamDeltaPhi = (TH1F *) outputList->At(index++); | |
2511 | fhGamDeltaEta = (TH1F *) outputList->At(index++); | |
2512 | ||
2513 | fhGamRatioE = (TH1F *) outputList->At(index++); | |
2514 | fhGamRatioPt = (TH1F *) outputList->At(index++); | |
2515 | fhGamRatioPhi = (TH1F *) outputList->At(index++); | |
2516 | fhGamRatioEta = (TH1F *) outputList->At(index++); | |
c8fe2783 | 2517 | |
9725fd2a | 2518 | fhPi0E = (TH2F *) outputList->At(index++); |
2519 | fhPi0Pt = (TH2F *) outputList->At(index++); | |
2520 | fhPi0Phi = (TH2F *) outputList->At(index++); | |
2521 | fhPi0Eta = (TH2F *) outputList->At(index++); | |
2522 | ||
2523 | fhEleE = (TH2F *) outputList->At(index++); | |
2524 | fhElePt = (TH2F *) outputList->At(index++); | |
2525 | fhElePhi = (TH2F *) outputList->At(index++); | |
2526 | fhEleEta = (TH2F *) outputList->At(index++); | |
2527 | ||
2528 | fhNeHadE = (TH2F *) outputList->At(index++); | |
2529 | fhNeHadPt = (TH2F *) outputList->At(index++); | |
2530 | fhNeHadPhi = (TH2F *) outputList->At(index++); | |
2531 | fhNeHadEta = (TH2F *) outputList->At(index++); | |
2532 | ||
2533 | fhChHadE = (TH2F *) outputList->At(index++); | |
2534 | fhChHadPt = (TH2F *) outputList->At(index++); | |
2535 | fhChHadPhi = (TH2F *) outputList->At(index++); | |
2536 | fhChHadEta = (TH2F *) outputList->At(index++); | |
2537 | ||
06e5656a | 2538 | fhGamECharged = (TH2F *) outputList->At(index++); |
2539 | fhGamPtCharged = (TH2F *) outputList->At(index++); | |
2540 | fhGamPhiCharged = (TH2F *) outputList->At(index++); | |
2541 | fhGamEtaCharged = (TH2F *) outputList->At(index++); | |
c8fe2783 | 2542 | |
06e5656a | 2543 | fhPi0ECharged = (TH2F *) outputList->At(index++); |
2544 | fhPi0PtCharged = (TH2F *) outputList->At(index++); | |
2545 | fhPi0PhiCharged = (TH2F *) outputList->At(index++); | |
2546 | fhPi0EtaCharged = (TH2F *) outputList->At(index++); | |
2547 | ||
2548 | fhEleECharged = (TH2F *) outputList->At(index++); | |
2549 | fhElePtCharged = (TH2F *) outputList->At(index++); | |
2550 | fhElePhiCharged = (TH2F *) outputList->At(index++); | |
2551 | fhEleEtaCharged = (TH2F *) outputList->At(index++); | |
2552 | ||
2553 | fhNeHadECharged = (TH2F *) outputList->At(index++); | |
2554 | fhNeHadPtCharged = (TH2F *) outputList->At(index++); | |
2555 | fhNeHadPhiCharged = (TH2F *) outputList->At(index++); | |
2556 | fhNeHadEtaCharged = (TH2F *) outputList->At(index++); | |
2557 | ||
2558 | fhChHadECharged = (TH2F *) outputList->At(index++); | |
2559 | fhChHadPtCharged = (TH2F *) outputList->At(index++); | |
2560 | fhChHadPhiCharged = (TH2F *) outputList->At(index++); | |
2561 | fhChHadEtaCharged = (TH2F *) outputList->At(index++); | |
2562 | ||
a6f26052 | 2563 | // fhEMVxyz = (TH3F *) outputList->At(index++); |
2564 | // fhHaVxyz = (TH3F *) outputList->At(index++); | |
9725fd2a | 2565 | |
2566 | fhEMVxyz = (TH2F *) outputList->At(index++); | |
2567 | fhHaVxyz = (TH2F *) outputList->At(index++); | |
2568 | fhEMR = (TH2F *) outputList->At(index++); | |
2569 | fhHaR = (TH2F *) outputList->At(index++); | |
2570 | ||
2571 | fhGenGamPt = (TH1F *) outputList->At(index++); | |
2572 | fhGenGamEta = (TH1F *) outputList->At(index++); | |
2573 | fhGenGamPhi = (TH1F *) outputList->At(index++); | |
2574 | ||
2575 | fhGenPi0Pt = (TH1F *) outputList->At(index++); | |
2576 | fhGenPi0Eta = (TH1F *) outputList->At(index++); | |
2577 | fhGenPi0Phi = (TH1F *) outputList->At(index++); | |
2578 | ||
2579 | fhGenEtaPt = (TH1F *) outputList->At(index++); | |
2580 | fhGenEtaEta = (TH1F *) outputList->At(index++); | |
2581 | fhGenEtaPhi = (TH1F *) outputList->At(index++); | |
2582 | ||
2583 | fhGenOmegaPt = (TH1F *) outputList->At(index++); | |
2584 | fhGenOmegaEta = (TH1F *) outputList->At(index++); | |
2585 | fhGenOmegaPhi = (TH1F *) outputList->At(index++); | |
2586 | ||
2587 | fhGenElePt = (TH1F *) outputList->At(index++); | |
2588 | fhGenEleEta = (TH1F *) outputList->At(index++); | |
2589 | fhGenElePhi = (TH1F *) outputList->At(index++); | |
2590 | ||
2591 | fhGenGamAccE = (TH1F *) outputList->At(index++); | |
2592 | fhGenGamAccPt = (TH1F *) outputList->At(index++); | |
2593 | fhGenGamAccEta = (TH1F *) outputList->At(index++); | |
2594 | fhGenGamAccPhi = (TH1F *) outputList->At(index++); | |
2595 | ||
2596 | fhGenPi0AccE = (TH1F *) outputList->At(index++); | |
2597 | fhGenPi0AccPt = (TH1F *) outputList->At(index++); | |
2598 | fhGenPi0AccEta = (TH1F *) outputList->At(index++); | |
2599 | fhGenPi0AccPhi = (TH1F *) outputList->At(index++); | |
2600 | ||
6fa7d352 | 2601 | fhMCEle1pOverE = (TH2F *) outputList->At(index++); |
06e5656a | 2602 | fhMCEle1dR = (TH1F *) outputList->At(index++); |
2603 | fhMCEle2MatchdEdx = (TH2F *) outputList->At(index++); | |
2604 | ||
6fa7d352 | 2605 | fhMCChHad1pOverE = (TH2F *) outputList->At(index++); |
06e5656a | 2606 | fhMCChHad1dR = (TH1F *) outputList->At(index++); |
2607 | fhMCChHad2MatchdEdx = (TH2F *) outputList->At(index++); | |
2608 | ||
6fa7d352 | 2609 | fhMCNeutral1pOverE = (TH2F *) outputList->At(index++); |
06e5656a | 2610 | fhMCNeutral1dR = (TH1F *) outputList->At(index++); |
2611 | fhMCNeutral2MatchdEdx = (TH2F *) outputList->At(index++); | |
2612 | ||
6fa7d352 | 2613 | fhMCEle1pOverER02 = (TH2F *) outputList->At(index++); |
2614 | fhMCChHad1pOverER02 = (TH2F *) outputList->At(index++); | |
2615 | fhMCNeutral1pOverER02 = (TH2F *) outputList->At(index++); | |
06e5656a | 2616 | } |
9725fd2a | 2617 | } |
2618 | ||
a6f26052 | 2619 | //__________________________________________________________________ |
9725fd2a | 2620 | void AliAnaCalorimeterQA::Terminate(TList* outputList) |
2621 | { | |
a6f26052 | 2622 | //Do plots if requested |
c8fe2783 | 2623 | |
5a2dbc3c | 2624 | if(GetDebug() > 0) printf("AliAnaCalorimeterQA::Terminate() - Make plots for %s? %d\n",fCalorimeter.Data(), fMakePlots); |
21d9bc2a | 2625 | if(!fMakePlots) return; |
9725fd2a | 2626 | |
a6f26052 | 2627 | //Do some plots to end |
c8fe2783 | 2628 | if(fStyleMacro!="")gROOT->Macro(fStyleMacro); |
a6f26052 | 2629 | //Recover histograms from output histograms list, needed for distributed analysis. |
9725fd2a | 2630 | ReadHistograms(outputList); |
2631 | ||
a6f26052 | 2632 | //printf(" AliAnaCalorimeterQA::Terminate() *** %s Report:", GetName()) ; |
2633 | //printf(" AliAnaCalorimeterQA::Terminate() pt : %5.3f , RMS : %5.3f \n", fhPt->GetMean(), fhPt->GetRMS() ) ; | |
c8fe2783 | 2634 | |
9725fd2a | 2635 | char name[128]; |
2636 | char cname[128]; | |
255b904d | 2637 | |
a6f26052 | 2638 | //In case terminate is executed after the analysis, in a second step, and we want to rebin or to change the range of the histograms for plotting |
255b904d | 2639 | Int_t nptbins = GetHistoPtBins(); Float_t ptmax = GetHistoPtMax(); Float_t ptmin = GetHistoPtMin(); |
3a75604b | 2640 | Int_t nphibins = GetHistoPhiBins(); Float_t phimax = GetHistoPhiMax(); Float_t phimin = GetHistoPhiMin(); |
255b904d | 2641 | Int_t netabins = GetHistoEtaBins(); Float_t etamax = GetHistoEtaMax(); Float_t etamin = GetHistoEtaMin(); |
a6f26052 | 2642 | // Int_t nmassbins = GetHistoMassBins(); Float_t massmax = GetHistoMassMax(); Float_t massmin = GetHistoMassMin(); |
2643 | // Int_t nasymbins = GetHistoAsymmetryBins(); Float_t asymmax = GetHistoAsymmetryMax(); Float_t asymmin = GetHistoAsymmetryMin(); | |
2644 | // Int_t nPoverEbins = GetHistoPOverEBins(); Float_t pOverEmax = GetHistoPOverEMax(); Float_t pOverEmin = GetHistoPOverEMin(); | |
2645 | // Int_t ndedxbins = GetHistodEdxBins(); Float_t dedxmax = GetHistodEdxMax(); Float_t dedxmin = GetHistodEdxMin(); | |
2646 | // Int_t ndRbins = GetHistodRBins(); Float_t dRmax = GetHistodRMax(); Float_t dRmin = GetHistodRMin(); | |
255b904d | 2647 | Int_t ntimebins = GetHistoTimeBins(); Float_t timemax = GetHistoTimeMax(); Float_t timemin = GetHistoTimeMin(); |
2648 | Int_t nbins = GetHistoNClusterCellBins(); Int_t nmax = GetHistoNClusterCellMax(); Int_t nmin = GetHistoNClusterCellMin(); | |
a6f26052 | 2649 | // Int_t nratiobins = GetHistoRatioBins(); Float_t ratiomax = GetHistoRatioMax(); Float_t ratiomin = GetHistoRatioMin(); |
2650 | // Int_t nvdistbins = GetHistoVertexDistBins(); Float_t vdistmax = GetHistoVertexDistMax(); Float_t vdistmin = GetHistoVertexDistMin(); | |
5a35dd37 | 2651 | Int_t rbins = GetHistoRBins(); Float_t rmax = GetHistoRMax(); Float_t rmin = GetHistoRMin(); |
2652 | Int_t xbins = GetHistoXBins(); Float_t xmax = GetHistoXMax(); Float_t xmin = GetHistoXMin(); | |
2653 | Int_t ybins = GetHistoYBins(); Float_t ymax = GetHistoYMax(); Float_t ymin = GetHistoYMin(); | |
2654 | Int_t zbins = GetHistoZBins(); Float_t zmax = GetHistoZMax(); Float_t zmin = GetHistoZMin(); | |
255b904d | 2655 | |
a6f26052 | 2656 | //Color code for the different modules |
255b904d | 2657 | Int_t modColorIndex[]={2,4,6,8}; |
2658 | ||
a6f26052 | 2659 | //-------------------------------------------------- |
2660 | // Cluster energy distributions, module dependence | |
2661 | //-------------------------------------------------- | |
255b904d | 2662 | sprintf(cname,"QA_%s_ClusterEnergy",fCalorimeter.Data()); |
2663 | TCanvas * c = new TCanvas(cname, "Energy distributions", 800, 400) ; | |
2664 | c->Divide(2, 1); | |
3a75604b | 2665 | Int_t rbE = GetNewRebinForRePlotting((TH1D*)fhE, ptmin, ptmax,nptbins) ; |
a6f26052 | 2666 | //printf("new E rb %d\n",rbE); |
255b904d | 2667 | fhE->Rebin(rbE); |
2668 | fhE->SetAxisRange(ptmin,ptmax,"X"); | |
2669 | c->cd(1) ; | |
2670 | if(fhE->GetEntries() > 0) gPad->SetLogy(); | |
2671 | TLegend pLegendE(0.7,0.6,0.9,0.8); | |
2672 | pLegendE.SetTextSize(0.03); | |
2673 | pLegendE.AddEntry(fhE,"all modules","L"); | |
2674 | pLegendE.SetFillColor(10); | |
2675 | pLegendE.SetBorderSize(1); | |
2676 | ||
2677 | fhE->SetMinimum(1); | |
2678 | fhE->SetLineColor(1); | |
2679 | fhE->Draw("HE"); | |
2680 | for(Int_t imod = 0; imod < fNModules; imod++){ | |
2681 | fhEMod[imod]->Rebin(rbE); | |
2682 | fhEMod[imod]->SetLineColor(modColorIndex[imod]); | |
2683 | fhEMod[imod]->Draw("HE same"); | |
2684 | pLegendE.AddEntry(fhEMod[imod],Form("module %d",imod),"L"); | |
2685 | } | |
2686 | pLegendE.Draw(); | |
2687 | ||
a6f26052 | 2688 | //Ratio of modules |
255b904d | 2689 | c->cd(2) ; |
2690 | TLegend pLegendER(0.55,0.8,0.9,0.9); | |
2691 | pLegendER.SetTextSize(0.03); | |
2692 | pLegendER.SetFillColor(10); | |
2693 | pLegendER.SetBorderSize(1); | |
c8fe2783 | 2694 | |
255b904d | 2695 | for(Int_t imod = 1; imod < fNModules; imod++){ |
2696 | TH1D * htmp = (TH1D*)fhEMod[imod]->Clone(Form("hERat%d",imod)); | |
2697 | htmp->Divide(fhEMod[0]); | |
2698 | htmp->SetLineColor(modColorIndex[imod]); | |
2699 | if(imod==1){ | |
2700 | htmp->SetTitle("Ratio module X / module 0"); | |
2701 | htmp->SetAxisRange(ptmin,ptmax,"X"); | |
2702 | htmp->SetMaximum(5); | |
2703 | htmp->SetMinimum(0); | |
2704 | htmp->SetAxisRange(ptmin,ptmax,"X"); | |
2705 | htmp->Draw("HE"); | |
2706 | } | |
2707 | else | |
2708 | htmp->Draw("same HE"); | |
2709 | ||
2710 | pLegendER.AddEntry(fhEMod[imod],Form("module %d / module 0",imod),"L"); | |
2711 | } | |
2712 | pLegendER.Draw(); | |
2713 | ||
2714 | sprintf(name,"QA_%s_ClusterEnergy.eps",fCalorimeter.Data()); | |
2715 | c->Print(name); printf("Plot: %s\n",name); | |
2716 | ||
a6f26052 | 2717 | //-------------------------------------------------- |
2718 | // Cell energy distributions, module dependence | |
2719 | //-------------------------------------------------- | |
255b904d | 2720 | sprintf(cname,"%s_QA_CellEnergy",fCalorimeter.Data()); |
2721 | TCanvas * ca = new TCanvas(cname, "Cell Energy distributions", 800, 400) ; | |
2722 | ca->Divide(2, 1); | |
2723 | ||
3a75604b | 2724 | Int_t rbAmp = GetNewRebinForRePlotting((TH1D*)fhAmplitude, ptmin, ptmax,nptbins*2) ; |
a6f26052 | 2725 | //printf("new Amp rb %d\n",rbAmp); |
255b904d | 2726 | fhAmplitude->Rebin(rbAmp); |
2727 | fhAmplitude->SetAxisRange(ptmin,ptmax,"X"); | |
2728 | ||
2729 | ca->cd(1) ; | |
2730 | if(fhAmplitude->GetEntries() > 0) gPad->SetLogy(); | |
2731 | TLegend pLegendA(0.7,0.6,0.9,0.8); | |
2732 | pLegendA.SetTextSize(0.03); | |
2733 | pLegendA.AddEntry(fhE,"all modules","L"); | |
2734 | pLegendA.SetFillColor(10); | |
2735 | pLegendA.SetBorderSize(1); | |
2736 | fhAmplitude->SetMinimum(0.1); | |
2737 | fhAmplitude->SetLineColor(1); | |
2738 | fhAmplitude->Draw("HE"); | |
2739 | ||
2740 | for(Int_t imod = 0; imod < fNModules; imod++){ | |
2741 | fhAmplitudeMod[imod]->Rebin(rbAmp); | |
2742 | fhAmplitudeMod[imod]->SetLineColor(modColorIndex[imod]); | |
2743 | fhAmplitudeMod[imod]->Draw("HE same"); | |
2744 | pLegendA.AddEntry(fhAmplitudeMod[imod],Form("module %d",imod),"L"); | |
2745 | } | |
2746 | pLegendA.Draw(); | |
2747 | ||
2748 | ||
2749 | ca->cd(2) ; | |
2750 | TLegend pLegendAR(0.55,0.8,0.9,0.9); | |
2751 | pLegendAR.SetTextSize(0.03); | |
2752 | pLegendAR.SetFillColor(10); | |
2753 | pLegendAR.SetBorderSize(1); | |
2754 | ||
2755 | for(Int_t imod = 1; imod < fNModules; imod++){ | |
2756 | TH1D * htmp = (TH1D*)fhAmplitudeMod[imod]->Clone(Form("hAmpRat%d",imod)); | |
2757 | htmp->Divide(fhAmplitudeMod[0]); | |
2758 | htmp->SetLineColor(modColorIndex[imod]); | |
2759 | if(imod==1){ | |
2760 | htmp->SetTitle("Ratio cells energy in module X / module 0"); | |
2761 | htmp->SetAxisRange(ptmin,ptmax,"X"); | |
2762 | htmp->SetMaximum(5); | |
2763 | htmp->SetMinimum(0); | |
2764 | htmp->Draw("HE"); | |
2765 | } | |
2766 | else | |
2767 | htmp->Draw("same HE"); | |
2768 | pLegendAR.AddEntry(fhAmplitudeMod[imod],Form("module %d",imod),"L"); | |
255b904d | 2769 | } |
2770 | ||
2771 | pLegendAR.Draw(); | |
2772 | sprintf(name,"QA_%s_CellEnergy.eps",fCalorimeter.Data()); | |
2773 | ca->Print(name); printf("Plot: %s\n",name); | |
c8fe2783 | 2774 | |
a6f26052 | 2775 | //---------------------------------------------------------- |
2776 | // Cell energy distributions, FRACTION of module dependence | |
2777 | // See Super Module calibration difference | |
2778 | //--------------------------------------------------------- | |
255b904d | 2779 | if(fCalorimeter=="EMCAL"){ |
a6f26052 | 2780 | //Close To Eta 0 |
255b904d | 2781 | sprintf(cname,"%s_QA_SMThirds",fCalorimeter.Data()); |
2782 | TCanvas * cfrac = new TCanvas(cname, "SM Thirds ratios", 800, 1200) ; | |
2783 | cfrac->Divide(2, 3); | |
2784 | cfrac->cd(1) ; | |
2785 | if(fhAmplitude->GetEntries() > 0) | |
2786 | gPad->SetLogy(); | |
2787 | TLegend pLegend1(0.6,0.6,0.9,0.8); | |
2788 | pLegend1.SetTextSize(0.03); | |
2789 | pLegend1.SetFillColor(10); | |
2790 | pLegend1.SetBorderSize(1); | |
2791 | pLegend1.SetHeader("Third close to Eta=0"); | |
2792 | fhAmplitudeModFraction[0]->SetTitle("Third close to Eta=0"); | |
2793 | fhAmplitudeModFraction[0]->SetAxisRange(ptmin,ptmax,"X"); | |
2794 | fhAmplitudeModFraction[0]->Draw("axis"); | |
2795 | TH1D * hAverageThird1 = (TH1D *)fhAmplitudeModFraction[3*0+2]->Clone("AverageThird1"); | |
2796 | for(Int_t imod = 0; imod < fNModules; imod++){ | |
2797 | Int_t ifrac = 0; | |
2798 | if(imod%2==0) ifrac = 2; | |
2799 | if(imod > 0) hAverageThird1->Add( fhAmplitudeModFraction[3*imod+ifrac]); | |
2800 | fhAmplitudeModFraction[3*imod+ifrac]->SetLineColor(modColorIndex[imod]); | |
2801 | fhAmplitudeModFraction[3*imod+ifrac]->Draw("HE same"); | |
2802 | pLegend1.AddEntry(fhAmplitudeModFraction[3*imod+ifrac],Form("super module %d",imod),"L"); | |
2803 | } | |
2804 | hAverageThird1 ->Scale(1./fNModules); | |
2805 | pLegend1.Draw(); | |
a6f26052 | 2806 | //Ratio |
255b904d | 2807 | cfrac->cd(2) ; |
2808 | for(Int_t imod = 0; imod < fNModules; imod++){ | |
2809 | Int_t ifrac = 0; | |
2810 | if(imod%2==0) ifrac = 2; | |
2811 | TH1D * htmp = (TH1D*)fhAmplitudeModFraction[3*imod+ifrac]->Clone(Form("ThirdFractionAverage_%d_%d",imod,ifrac)); | |
2812 | htmp->Divide(hAverageThird1); | |
2813 | if(imod ==0) { | |
2814 | htmp ->SetTitle("Close to eta = 0"); | |
2815 | htmp ->SetMaximum(5); | |
2816 | htmp ->SetMinimum(0); | |
2817 | htmp ->SetAxisRange(ptmin,ptmax,"X"); | |
2818 | htmp ->SetYTitle("ratio third to average"); | |
2819 | htmp -> Draw("HE"); | |
2820 | } | |
2821 | else htmp -> Draw("same HE"); | |
2822 | } | |
a6f26052 | 2823 | //pLegend1.Draw(); |
255b904d | 2824 | |
a6f26052 | 2825 | //Middle Eta |
255b904d | 2826 | cfrac->cd(3) ; |
2827 | if(fhAmplitude->GetEntries() > 0) | |
2828 | gPad->SetLogy(); | |
2829 | TLegend pLegend2(0.6,0.6,0.9,0.8); | |
2830 | pLegend2.SetTextSize(0.03); | |
2831 | pLegend2.SetFillColor(10); | |
2832 | pLegend2.SetBorderSize(1); | |
2833 | pLegend2.SetHeader("Middle Third"); | |
2834 | ||
2835 | fhAmplitudeModFraction[0]->SetTitle("Middle Third"); | |
2836 | fhAmplitudeModFraction[0]->SetAxisRange(ptmin,ptmax,"X"); | |
2837 | fhAmplitudeModFraction[0]->Draw("axis"); | |
2838 | ||
2839 | TH1D * hAverageThird2 = (TH1D *)fhAmplitudeModFraction[3*0+1]->Clone("AverageThird2"); | |
2840 | for(Int_t imod = 0; imod < fNModules; imod++){ | |
2841 | Int_t ifrac = 1; | |
2842 | if(imod > 0) hAverageThird2->Add( fhAmplitudeModFraction[3*imod+ifrac]); | |
2843 | fhAmplitudeModFraction[3*imod+ifrac]->SetLineColor(modColorIndex[imod]); | |
2844 | fhAmplitudeModFraction[3*imod+ifrac]->Draw("HE same"); | |
2845 | pLegend2.AddEntry(fhAmplitudeModFraction[3*imod+ifrac],Form("super module %d",imod),"L"); | |
2846 | } | |
2847 | hAverageThird2->Scale(1./fNModules); | |
2848 | pLegend2.Draw(); | |
2849 | ||
a6f26052 | 2850 | //Ratio |
255b904d | 2851 | cfrac->cd(4) ; |
2852 | ||
2853 | for(Int_t imod = 0; imod < fNModules; imod++){ | |
2854 | Int_t ifrac = 1; | |
2855 | TH1D * htmp = (TH1D*)fhAmplitudeModFraction[3*imod+ifrac]->Clone(Form("ThirdFractionAverage_%d_%d",imod,ifrac)); | |
2856 | htmp->Divide(hAverageThird2); | |
2857 | if(imod ==0) { | |
2858 | htmp ->SetTitle("Middle"); | |
2859 | htmp ->SetMaximum(5); | |
2860 | htmp ->SetMinimum(0); | |
2861 | htmp ->SetAxisRange(ptmin,ptmax,"X"); | |
2862 | htmp ->SetYTitle("ratio third to average"); | |
2863 | htmp -> Draw("HE"); | |
2864 | } | |
2865 | else htmp -> Draw("same HE"); | |
2866 | } | |
a6f26052 | 2867 | //pLegend2.Draw(); |
255b904d | 2868 | |
a6f26052 | 2869 | //Close To Eta 0.7 |
255b904d | 2870 | cfrac->cd(5) ; |
2871 | if(fhAmplitude->GetEntries() > 0) | |
2872 | gPad->SetLogy(); | |
2873 | TLegend pLegend3(0.6,0.6,0.9,0.8); | |
2874 | pLegend3.SetTextSize(0.03); | |
2875 | pLegend3.SetFillColor(10); | |
2876 | pLegend3.SetBorderSize(1); | |
2877 | pLegend3.SetHeader("Third close to Eta=0.7"); | |
2878 | ||
2879 | fhAmplitudeModFraction[0]->SetTitle("Third close to Eta=0.7"); | |
2880 | fhAmplitudeModFraction[0]->SetAxisRange(ptmin,ptmax,"X"); | |
2881 | fhAmplitudeModFraction[0]->Draw("axis"); | |
2882 | ||
2883 | TH1D * hAverageThird3 = (TH1D *)fhAmplitudeModFraction[3*0+0]->Clone("AverageThird3"); | |
2884 | for(Int_t imod = 0; imod < 4; imod++){ | |
2885 | Int_t ifrac = 2; | |
2886 | if(imod%2==0) ifrac = 0; | |
2887 | if(imod > 0) hAverageThird3->Add( fhAmplitudeModFraction[3*imod+ifrac]); | |
2888 | fhAmplitudeModFraction[3*imod+ifrac]->SetLineColor(modColorIndex[imod]); | |
2889 | fhAmplitudeModFraction[3*imod+ifrac]->Draw("HE same"); | |
2890 | pLegend3.AddEntry(fhAmplitudeModFraction[3*imod+ifrac],Form("super module %d",imod),"L"); | |
2891 | } | |
2892 | hAverageThird3 ->Scale(1./fNModules); | |
2893 | pLegend3.Draw(); | |
2894 | ||
2895 | cfrac->cd(6) ; | |
2896 | ||
2897 | for(Int_t imod = 0; imod < fNModules; imod++){ | |
2898 | Int_t ifrac = 2; | |
2899 | if(imod%2==0) ifrac = 0; | |
2900 | TH1D * htmp = (TH1D*)fhAmplitudeModFraction[3*imod+ifrac]->Clone(Form("ThirdFractionAverage_%d_%d",imod,ifrac)); | |
2901 | htmp->Divide(hAverageThird3); | |
2902 | if(imod ==0) { | |
2903 | htmp ->SetTitle("Close to eta = 0.7"); | |
2904 | htmp ->SetMaximum(5); | |
2905 | htmp ->SetMinimum(0); | |
2906 | htmp ->SetAxisRange(ptmin,ptmax,"X"); | |
2907 | htmp ->SetYTitle("ratio third to average"); | |
2908 | htmp ->Draw("HE"); | |
2909 | } | |
2910 | else htmp ->Draw("same HE"); | |
2911 | } | |
a6f26052 | 2912 | //pLegend3.Draw(); |
255b904d | 2913 | |
2914 | sprintf(name,"QA_%s_CellEnergyModuleFraction.eps",fCalorimeter.Data()); | |
2915 | cfrac->Print(name); printf("Create plot %s\n",name); | |
2916 | }//EMCAL | |
2917 | ||
2918 | ||
a6f26052 | 2919 | //---------------------------------------------------------- |
2920 | // Cluster eta and phi distributions, energy cut dependence | |
2921 | //--------------------------------------------------------- | |
255b904d | 2922 | |
2923 | sprintf(cname,"%s_QA_EtaPhiCluster",fCalorimeter.Data()); | |
2924 | TCanvas * cetaphic = new TCanvas(cname, "Eta-Phi Reconstructed distributions", 1200, 400) ; | |
2925 | cetaphic->Divide(3, 1); | |
2926 | Int_t binmin = 0; | |
2927 | Int_t rbPhi = 1; | |
2928 | Int_t rbEta = 1; | |
2929 | Int_t ncuts = 7; | |
5a35dd37 | 2930 | Float_t ecut[] = {0.1, 0.3, 0.5, 0.7, 0.9, 1.1, 1.3}; |
2931 | Int_t ecutcolor[]= {2, 4, 6, 7, 8, 9, 12}; | |
255b904d | 2932 | TH1D * hE = fhEtaPhiE->ProjectionZ(); |
2933 | ||
a6f26052 | 2934 | //PHI |
255b904d | 2935 | cetaphic->cd(1) ; |
2936 | gPad->SetLogy(); | |
2937 | gPad->SetGridy(); | |
2938 | ||
2939 | TLegend pLegendPhiCl(0.83,0.6,0.95,0.93); | |
2940 | pLegendPhiCl.SetTextSize(0.03); | |
2941 | pLegendPhiCl.SetFillColor(10); | |
2942 | pLegendPhiCl.SetBorderSize(1); | |
2943 | ||
2944 | TH1D * htmp = fhEtaPhiE->ProjectionY("hphi_cluster_nocut",0,-1,0,-1); | |
2945 | if(htmp){ | |
3a75604b | 2946 | htmp->SetMinimum(1); |
2947 | rbPhi = GetNewRebinForRePlotting(htmp, phimin, phimax,nphibins) ; | |
a6f26052 | 2948 | //printf("new Phi rb %d\n",rbPhi); |
3a75604b | 2949 | htmp->Rebin(rbPhi); |
2950 | htmp->SetTitle("#phi of clusters for energy in cluster > threshold"); | |
2951 | htmp->SetAxisRange(phimin,phimax,"X"); | |
2952 | htmp->Draw("HE"); | |
2953 | pLegendPhiCl.AddEntry(htmp,"No cut","L"); | |
c8fe2783 | 2954 | |
3a75604b | 2955 | for (Int_t i = 0; i < ncuts; i++) { |
2956 | binmin = hE->FindBin(ecut[i]); | |
a6f26052 | 2957 | //printf(" bins %d for e %f\n",binmin[i],ecut[i]); |
3a75604b | 2958 | htmp = fhEtaPhiE->ProjectionY(Form("hphi_cluster_cut%d",i),0,-1,binmin,-1); |
2959 | htmp->SetLineColor(ecutcolor[i]); | |
2960 | htmp->Rebin(rbPhi); | |
255b904d | 2961 | htmp->Draw("same HE"); |
3a75604b | 2962 | pLegendPhiCl.AddEntry(htmp,Form("E>%1.1f",ecut[i]),"L"); |
2963 | ||
2964 | } | |
255b904d | 2965 | } |
2966 | pLegendPhiCl.Draw(); | |
2967 | ||
a6f26052 | 2968 | //ETA |
255b904d | 2969 | cetaphic->cd(2) ; |
2970 | gPad->SetLogy(); | |
2971 | gPad->SetGridy(); | |
2972 | ||
2973 | htmp = fhEtaPhiE->ProjectionX("heta_cluster_nocut",0,-1,0,-1); | |
2974 | htmp ->SetLineColor(1); | |
3a75604b | 2975 | rbEta = GetNewRebinForRePlotting(htmp,etamin, etamax,netabins) ; |
a6f26052 | 2976 | //printf("new Eta rb %d\n",rbEta); |
255b904d | 2977 | if(htmp){ |
3a75604b | 2978 | htmp->Rebin(rbEta); |
2979 | htmp->SetMinimum(1); | |
2980 | htmp->SetTitle("#eta of clusters for energy in cluster > threshold"); | |
2981 | htmp->SetAxisRange(etamin,etamax,"X"); | |
2982 | htmp->Draw("HE"); | |
2983 | ||
2984 | for (Int_t i = 0; i < ncuts; i++) { | |
2985 | binmin = hE->FindBin(ecut[i]); | |
a6f26052 | 2986 | //printf(" bins %d for e %f\n",binmin[i],ecut[i]); |
3a75604b | 2987 | htmp = fhEtaPhiE->ProjectionX(Form("heta_cluster_cut%d",i),0,-1,binmin,-1); |
2988 | htmp->SetLineColor(ecutcolor[i]); | |
2989 | htmp->Rebin(rbEta); | |
2990 | htmp->Draw("same HE"); | |
2991 | } | |
255b904d | 2992 | } |
a6f26052 | 2993 | //ETA vs PHI |
255b904d | 2994 | cetaphic->cd(3) ; |
2995 | TH2D* hEtaPhiCl = (TH2D*) fhEtaPhiE->Project3D("xy"); | |
2996 | hEtaPhiCl->SetAxisRange(etamin,etamax,"X"); | |
2997 | hEtaPhiCl->SetAxisRange(phimin,phimax,"Y"); | |
2998 | hEtaPhiCl->Draw("colz"); | |
c8fe2783 | 2999 | |
255b904d | 3000 | sprintf(name,"QA_%s_ClusterEtaPhi.eps",fCalorimeter.Data()); |
3001 | cetaphic->Print(name); printf("Create plot %s\n",name); | |
c8fe2783 | 3002 | |
a6f26052 | 3003 | //---------------------------------------------------------- |
3004 | // Cell eta and phi distributions, energy cut dependence | |
3005 | //--------------------------------------------------------- | |
255b904d | 3006 | |
3007 | sprintf(cname,"%s_QA_EtaPhiCell",fCalorimeter.Data()); | |
3008 | TCanvas * cetaphicell = new TCanvas(cname, "Eta-Phi Cells distributions", 1200, 400) ; | |
3009 | cetaphicell->Divide(3, 1); | |
3010 | ||
a6f26052 | 3011 | //PHI |
255b904d | 3012 | cetaphicell->cd(1) ; |
3013 | gPad->SetLogy(); | |
3014 | gPad->SetGridy(); | |
3015 | ||
3016 | TLegend pLegendPhiCell(0.83,0.6,0.95,0.93); | |
3017 | pLegendPhiCell.SetTextSize(0.03); | |
3018 | pLegendPhiCell.SetFillColor(10); | |
3019 | pLegendPhiCell.SetBorderSize(1); | |
3020 | ||
3021 | htmp = fhEtaPhiAmp->ProjectionY("hphi_cell_nocut",0,-1,0,-1); | |
3022 | if(htmp){ | |
3a75604b | 3023 | htmp->SetMinimum(1); |
3024 | htmp->Rebin(rbPhi); | |
3025 | htmp->SetTitle("#phi of cells for cell energy > threshold"); | |
3026 | htmp->SetAxisRange(phimin,phimax,"X"); | |
3027 | htmp->Draw("HE"); | |
3028 | pLegendPhiCell.AddEntry(htmp,"No cut","L"); | |
3029 | ||
3030 | for (Int_t i = 0; i < ncuts; i++) { | |
3031 | binmin = hE->FindBin(ecut[i]); | |
a6f26052 | 3032 | //printf(" bins %d for e %f\n",binmin[i],ecut[i]); |
3a75604b | 3033 | htmp = fhEtaPhiAmp->ProjectionY(Form("hphi_cell_cut%d",i),0,-1,binmin,-1); |
3034 | htmp->SetLineColor(ecutcolor[i]); | |
3035 | htmp->Rebin(rbPhi); | |
255b904d | 3036 | htmp->Draw("same HE"); |
3a75604b | 3037 | pLegendPhiCl.AddEntry(htmp,Form("E>%1.1f",ecut[i]),"L"); |
3038 | ||
3039 | } | |
255b904d | 3040 | } |
3041 | pLegendPhiCell.Draw(); | |
3042 | ||
a6f26052 | 3043 | //ETA |
255b904d | 3044 | cetaphicell->cd(2) ; |
3045 | gPad->SetLogy(); | |
3046 | gPad->SetGridy(); | |
3047 | ||
3048 | htmp = fhEtaPhiAmp->ProjectionX("heta_cell_nocut",0,-1,0,-1); | |
3049 | if(htmp){ | |
3a75604b | 3050 | htmp ->SetLineColor(1); |
3051 | htmp->Rebin(rbEta); | |
3052 | htmp->SetMinimum(1); | |
3053 | htmp->SetTitle("#eta of cells for cell energy > threshold"); | |
3054 | htmp->SetAxisRange(etamin,etamax,"X"); | |
3055 | htmp->Draw("HE"); | |
3056 | ||
3057 | for (Int_t i = 0; i < ncuts; i++) { | |
3058 | binmin = hE->FindBin(ecut[i]); | |
a6f26052 | 3059 | //printf(" bins %d for e %f\n",binmin[i],ecut[i]); |
3a75604b | 3060 | htmp = fhEtaPhiAmp->ProjectionX(Form("heta_cell_cut%d",i),0,-1,binmin,-1); |
3061 | htmp->SetLineColor(ecutcolor[i]); | |
3062 | htmp->Rebin(rbEta); | |
255b904d | 3063 | htmp->Draw("same HE"); |
3a75604b | 3064 | |
3065 | } | |
255b904d | 3066 | } |
a6f26052 | 3067 | //ETA vs PHI |
255b904d | 3068 | cetaphicell->cd(3) ; |
3069 | TH2D* hEtaPhiCell = (TH2D*) fhEtaPhiAmp->Project3D("xy"); | |
3070 | hEtaPhiCell->SetAxisRange(etamin,etamax,"X"); | |
3071 | hEtaPhiCell->SetAxisRange(phimin,phimax,"Y"); | |
3072 | hEtaPhiCell->Draw("colz"); | |
3073 | ||
3074 | sprintf(name,"QA_%s_CellEtaPhi.eps",fCalorimeter.Data()); | |
3075 | cetaphicell->Print(name); printf("Create plot %s\n",name); | |
3076 | ||
c8fe2783 | 3077 | |
a6f26052 | 3078 | //////////////////////////////////////// |
3079 | ///////// Global Positions ///////////// | |
3080 | //////////////////////////////////////// | |
3081 | ||
3082 | //CLUSTERS | |
b8187de4 | 3083 | Int_t rbX = 1; |
3084 | Int_t rbY = 1; | |
3085 | Int_t rbZ = 1; | |
3086 | //if(fFillAllPosHisto) | |
3087 | { | |
a6f26052 | 3088 | sprintf(cname,"%s_QA_ClusterXY",fCalorimeter.Data()); |
3089 | TCanvas * cxyz = new TCanvas(cname, "Cluster XY distributions", 1200, 400) ; | |
3090 | cxyz->Divide(3, 1); | |
3091 | ||
3092 | cxyz->cd(1) ; | |
3093 | TH2D * hXY = (TH2D*) fhXYZ->Project3D("yx" ); | |
3094 | hXY->SetTitle("Cluster X vs Y"); | |
3095 | hXY->GetYaxis()->SetTitleOffset(1.6); | |
3096 | hXY->Draw("colz"); | |
3097 | cxyz->cd(2) ; | |
3098 | TH2D * hYZ = (TH2D*) fhXYZ->Project3D("yz" ); | |
3099 | hYZ->SetTitle("Cluster Z vs Y"); | |
3100 | hYZ->GetYaxis()->SetTitleOffset(1.6); | |
3101 | hYZ->Draw("colz"); | |
3102 | cxyz->cd(3) ; | |
3103 | TH2D * hXZ = (TH2D*) fhXYZ->Project3D("zx" ); | |
3104 | hXZ->SetTitle("Cluster X vs Z"); | |
3105 | hXZ->GetYaxis()->SetTitleOffset(1.6); | |
3106 | hXZ->Draw("colz"); | |
3107 | ||
3108 | sprintf(name,"QA_%s_ClusterXY_YZ_XZ.eps",fCalorimeter.Data()); | |
3109 | cxyz->Print(name); printf("Create plot %s\n",name); | |
3110 | ||
a6f26052 | 3111 | sprintf(cname,"QA_%s_ClusterX",fCalorimeter.Data()); |
3112 | TCanvas * cx = new TCanvas(cname, "Cluster X distributions", 1200, 400) ; | |
3113 | cx->Divide(3, 1); | |
3114 | ||
3115 | cx->cd(1) ; | |
3116 | TH1D * hX = (TH1D*) fhXYZ->Project3D("xe" ); | |
c8fe2783 | 3117 | //gPad->SetLogy(); |
a6f26052 | 3118 | gPad->SetGridy(); |
3119 | hX->SetTitle("Cluster X "); | |
3120 | hX->Draw("HE"); | |
3121 | rbX = GetNewRebinForRePlotting(hX, xmin, xmax,xbins) ; | |
c8fe2783 | 3122 | //printf("new X rb %d\n",rbX); |
a6f26052 | 3123 | hX->Rebin(rbX); |
3124 | hX->SetMinimum(hX->GetMaximum()/2); | |
3125 | hX->SetAxisRange(xmin,xmax); | |
3126 | ||
3127 | cx->cd(2) ; | |
3128 | TH1D * hY = (TH1D*) fhXYZ->Project3D("ye" ); | |
c8fe2783 | 3129 | //gPad->SetLogy(); |
a6f26052 | 3130 | hY->SetTitle("Cluster Y "); |
3131 | rbY = GetNewRebinForRePlotting(hY, ymin, ymax, ybins) ; | |
c8fe2783 | 3132 | //printf("new Y rb %d\n",rbY); |
a6f26052 | 3133 | hY->Rebin(rbY); |
3134 | hY->SetMinimum(1); | |
3135 | hY->SetAxisRange(ymin,ymax); | |
3136 | hY->Draw("HE"); | |
3137 | ||
3138 | cx->cd(3) ; | |
3139 | TH1D * hZ = (TH1D*) fhXYZ->Project3D("ze" ); | |
c8fe2783 | 3140 | //gPad->SetLogy(); |
a6f26052 | 3141 | gPad->SetGridy(); |
3142 | rbZ = GetNewRebinForRePlotting(hZ,zmin, zmax,zbins) ; | |
c8fe2783 | 3143 | //printf("new Z rb %d\n",rbZ); |
a6f26052 | 3144 | hZ->Rebin(rbZ); |
3145 | hZ->SetMinimum(hZ->GetMaximum()/2); | |
3146 | hZ->SetAxisRange(zmin,zmax); | |
3147 | hZ->Draw("HE"); | |
3148 | ||
3149 | sprintf(name,"QA_%s_ClusterX_Y_Z.eps",fCalorimeter.Data()); | |
3150 | cx->Print(name); printf("Create plot %s\n",name); | |
b8187de4 | 3151 | } |
c8fe2783 | 3152 | //CELLS |
b8187de4 | 3153 | if(fFillAllPosHisto) |
3154 | { | |
a6f26052 | 3155 | sprintf(cname,"%s_QA_CellXY",fCalorimeter.Data()); |
3156 | TCanvas * cellxyz = new TCanvas(cname, "Cell XY distributions", 1200, 400) ; | |
3157 | cellxyz->Divide(3, 1); | |
3158 | ||
3159 | cellxyz->cd(1) ; | |
3160 | TH2D * hXYCell = (TH2D*) fhXYZCell->Project3D("yx" ); | |
3161 | hXYCell->SetTitle("Cell X vs Y"); | |
3162 | hXYCell->GetYaxis()->SetTitleOffset(1.6); | |
3163 | hXYCell->Draw("colz"); | |
3164 | cellxyz->cd(2) ; | |
3165 | TH2D * hYZCell = (TH2D*) fhXYZCell->Project3D("yz" ); | |
3166 | hYZCell->SetTitle("Cell Z vs Y"); | |
3167 | hYZCell->GetYaxis()->SetTitleOffset(1.6); | |
3168 | hYZCell->Draw("colz"); | |
3169 | cellxyz->cd(3) ; | |
3170 | TH2D * hXZCell = (TH2D*) fhXYZCell->Project3D("zx" ); | |
3171 | hXZCell->SetTitle("Cell X vs Z"); | |
3172 | hXZCell->GetYaxis()->SetTitleOffset(1.6); | |
3173 | hXZCell->Draw("colz"); | |
3174 | ||
3175 | sprintf(name,"QA_%s_CellXY_YZ_XZ.eps",fCalorimeter.Data()); | |
3176 | cellxyz->Print(name); printf("Create plot %s\n",name); | |
3177 | ||
3178 | ||
3179 | sprintf(cname,"%s_QA_CellX",fCalorimeter.Data()); | |
3180 | TCanvas * cellx = new TCanvas(cname, "Cell X distributions", 1200, 400) ; | |
3181 | cellx->Divide(3, 1); | |
3182 | ||
3183 | cellx->cd(1) ; | |
3184 | TH1D * hXCell = (TH1D*) fhXYZCell->Project3D("xe" ); | |
c8fe2783 | 3185 | //gPad->SetLogy(); |
a6f26052 | 3186 | gPad->SetGridy(); |
3187 | hXCell->SetTitle("Cell X "); | |
3188 | hXCell->Rebin(rbX); | |
3189 | hXCell->SetMinimum(hXCell->GetMaximum()/2); | |
3190 | hXCell->SetAxisRange(xmin,xmax); | |
3191 | hXCell->Draw("HE"); | |
3192 | ||
3193 | cellx->cd(2) ; | |
3194 | TH1D * hYCell = (TH1D*) fhXYZCell->Project3D("ye" ); | |
c8fe2783 | 3195 | //gPad->SetLogy(); |
a6f26052 | 3196 | hYCell->SetTitle("Cell Y "); |
3197 | hYCell->Rebin(rbY); | |
3198 | hYCell->SetAxisRange(ymin,ymax); | |
3199 | hYCell->SetMinimum(1); | |
3200 | hYCell->Draw("HE"); | |
3201 | ||
3202 | cellx->cd(3) ; | |
3203 | TH1D * hZCell = (TH1D*) fhXYZCell->Project3D("ze" ); | |
c8fe2783 | 3204 | //gPad->SetLogy(); |
a6f26052 | 3205 | gPad->SetGridy(); |
3206 | hZCell->SetAxisRange(zmin,zmax); | |
3207 | hZCell->SetTitle("Cell Z "); | |
3208 | hZCell->Rebin(rbZ); | |
3209 | hZCell->SetMinimum(hZCell->GetMaximum()/2); | |
3210 | hZCell->Draw("HE"); | |
3211 | ||
3212 | sprintf(name,"QA_%s_CellX_Y_Z.eps",fCalorimeter.Data()); | |
3213 | cellx->Print(name); printf("Create plot %s\n",name); | |
3214 | ||
3215 | ||
c8fe2783 | 3216 | //---------------------------------------------------------- |
3217 | // Cluster X, Y, Z, R, energy cut dependence | |
3218 | //--------------------------------------------------------- | |
a6f26052 | 3219 | |
3220 | sprintf(cname,"%s_QA_ClusterX_Y_Z_R_ECut",fCalorimeter.Data()); | |
3221 | TCanvas * cxe = new TCanvas(cname, "Cluster X Y Z R, E cut", 800, 800) ; | |
3222 | cxe->Divide(2, 2); | |
c8fe2783 | 3223 | //R |
a6f26052 | 3224 | cxe->cd(1) ; |
3225 | gPad->SetLogy(); | |
3226 | gPad->SetGridy(); | |
3227 | ||
3228 | TLegend pLegendXCl(0.83,0.6,0.95,0.93); | |
3229 | pLegendXCl.SetTextSize(0.03); | |
3230 | pLegendXCl.SetFillColor(10); | |
3231 | pLegendXCl.SetBorderSize(1); | |
3232 | ||
3233 | htmp = fhRE->ProjectionX("hre_cluster_nocut",0,-1); | |
3234 | Int_t rbR=1; | |
3235 | if(htmp){ | |
3236 | htmp->SetMinimum(1); | |
3237 | rbR = GetNewRebinForRePlotting(htmp, rmin, rmax,rbins) ; | |
c8fe2783 | 3238 | //printf("new R rb %d\n",rbR); |
a6f26052 | 3239 | htmp->Rebin(rbR); |
3240 | htmp->SetTitle("r of clusters for energy in cluster > threshold"); | |
3241 | htmp->SetAxisRange(rmin,rmax,"X"); | |
3242 | htmp->Draw("HE"); | |
3243 | pLegendXCl.AddEntry(htmp,"No cut","L"); | |
3244 | ||
3245 | for (Int_t i = 0; i < ncuts; i++) { | |
3246 | binmin = hE->FindBin(ecut[i]); | |
c8fe2783 | 3247 | //printf(" bins %d for e %f\n",binmin[i],ecut[i]); |
a6f26052 | 3248 | htmp = fhRE->ProjectionX(Form("hre_cluster_cut%d",i),binmin,-1); |
3249 | htmp->SetLineColor(ecutcolor[i]); | |
3250 | htmp->Rebin(rbR); | |
3251 | htmp->Draw("same HE"); | |
3252 | pLegendXCl.AddEntry(htmp,Form("E>%1.1f",ecut[i]),"L"); | |
3253 | } | |
3254 | } | |
3255 | pLegendXCl.Draw(); | |
3256 | ||
c8fe2783 | 3257 | //X |
a6f26052 | 3258 | cxe->cd(2) ; |
3259 | gPad->SetLogy(); | |
3260 | gPad->SetGridy(); | |
3261 | htmp = fhXE->ProjectionX("hxe_cluster_nocut",0,-1); | |
3262 | if(htmp){ | |
3263 | htmp->SetMinimum(1); | |
3264 | htmp->Rebin(rbX); | |
3265 | htmp->SetTitle("x of clusters for energy in cluster > threshold"); | |
3266 | htmp->SetAxisRange(xmin,xmax,"X"); | |
3267 | htmp->Draw("HE"); | |
3268 | ||
3269 | for (Int_t i = 0; i < ncuts; i++) { | |
3270 | binmin = hE->FindBin(ecut[i]); | |
c8fe2783 | 3271 | //printf(" bins %d for e %f\n",binmin[i],ecut[i]); |
a6f26052 | 3272 | htmp = fhXE->ProjectionX(Form("hxe_cluster_cut%d",i),binmin,-1); |
3273 | htmp->SetLineColor(ecutcolor[i]); | |
3274 | htmp->Rebin(rbX); | |
3275 | htmp->Draw("same HE"); | |
3276 | } | |
3277 | } | |
c8fe2783 | 3278 | //Y |
a6f26052 | 3279 | cxe->cd(3) ; |
3280 | gPad->SetLogy(); | |
3281 | gPad->SetGridy(); | |
3282 | htmp = fhYE->ProjectionX("hye_cluster_nocut",0,-1); | |
3283 | if(htmp){ | |
3284 | htmp->SetMinimum(1); | |
3285 | htmp->Rebin(rbY); | |
3286 | htmp->SetTitle("y of clusters for energy in cluster > threshold"); | |
3287 | htmp->SetAxisRange(ymin,ymax,"X"); | |
3288 | htmp->Draw("HE"); | |
3289 | ||
3290 | for (Int_t i = 0; i < ncuts; i++) { | |
3291 | binmin = hE->FindBin(ecut[i]); | |
c8fe2783 | 3292 | //printf(" bins %d for e %f\n",binmin[i],ecut[i]); |
a6f26052 | 3293 | htmp = fhYE->ProjectionX(Form("hye_cluster_cut%d",i),binmin,-1); |
3294 | htmp->SetLineColor(ecutcolor[i]); | |
3295 | htmp->Rebin(rbY); | |
3296 | htmp->Draw("same HE"); | |
3297 | } | |
3298 | } | |
c8fe2783 | 3299 | //Z |
a6f26052 | 3300 | cxe->cd(4) ; |
3301 | gPad->SetLogy(); | |
3302 | gPad->SetGridy(); | |
3303 | ||
3304 | htmp = fhZE->ProjectionX("hze_cluster_nocut",0,-1); | |
3305 | if(htmp){ | |
3306 | htmp->SetMinimum(1); | |
3307 | htmp->Rebin(rbZ); | |
3308 | htmp->SetTitle("z of clusters for energy in cluster > threshold"); | |
3309 | htmp->SetAxisRange(zmin,zmax,"X"); | |
3310 | htmp->Draw("HE"); | |
3311 | ||
3312 | for (Int_t i = 0; i < ncuts; i++) { | |
3313 | binmin = hE->FindBin(ecut[i]); | |
c8fe2783 | 3314 | //printf(" bins %d for e %f\n",binmin[i],ecut[i]); |
a6f26052 | 3315 | htmp = fhZE->ProjectionX(Form("hze_cluster_cut%d",i),binmin,-1); |
3316 | htmp->SetLineColor(ecutcolor[i]); | |
3317 | htmp->Rebin(rbZ); | |
3318 | htmp->Draw("same HE"); | |
3319 | } | |
3320 | } | |
3321 | ||
3322 | sprintf(name,"QA_%s_ClusterX_Y_Z_R_ECut.eps",fCalorimeter.Data()); | |
3323 | cxe->Print(name); printf("Create plot %s\n",name); | |
3324 | ||
3325 | ||
c8fe2783 | 3326 | //---------------------------------------------------------- |
3327 | // Cluster X, Y, Z, R, NCells in cluster dependence | |
3328 | //--------------------------------------------------------- | |
a6f26052 | 3329 | Int_t ncellcut[]={2, 3, 4}; |
3330 | Int_t ncellcuts = 3; | |
3331 | sprintf(cname,"%s_QA_ClusterX_Y_Z_R_NCellsCut",fCalorimeter.Data()); | |
3332 | TCanvas * cxn = new TCanvas(cname, "Cluster X Y Z R, NCells cut", 800, 800) ; | |
3333 | cxn->Divide(2, 2); | |
c8fe2783 | 3334 | //R |
a6f26052 | 3335 | cxn->cd(1) ; |
3336 | gPad->SetLogy(); | |
3337 | gPad->SetGridy(); | |
3338 | ||
3339 | TLegend pLegendXClN(0.83,0.6,0.95,0.93); | |
3340 | pLegendXClN.SetTextSize(0.03); | |
3341 | pLegendXClN.SetFillColor(10); | |
3342 | pLegendXClN.SetBorderSize(1); | |
3343 | ||
3344 | htmp = fhRNCells->ProjectionX("hrn_cluster_nocut",0,-1); | |
3345 | if(htmp){ | |
3346 | htmp->SetMinimum(1); | |
3347 | htmp->Rebin(rbR); | |
3348 | htmp->SetTitle("r of clusters for energy in cluster > threshold"); | |
3349 | htmp->SetAxisRange(rmin,rmax,"X"); | |
3350 | htmp->Draw("HE"); | |
3351 | pLegendXClN.AddEntry(htmp,"No cut","L"); | |
3352 | ||
3353 | for (Int_t i = 0; i < ncellcuts; i++) { | |
3354 | if(i < ncellcuts-1) htmp = fhRNCells->ProjectionX(Form("hrn_cluster_cut%d",i),ncellcut[i],ncellcut[i]); | |
3355 | else htmp = fhRNCells->ProjectionX(Form("hrn_cluster_cut%d",i),ncellcut[i],-1); | |
3356 | htmp->SetLineColor(ecutcolor[i]); | |
3357 | htmp->Rebin(rbR); | |
3358 | htmp->Draw("same HE"); | |
3359 | if(i < ncellcuts-1) pLegendXClN.AddEntry(htmp,Form("n = %1.1d",ncellcut[i]-1),"L"); | |
3360 | else pLegendXClN.AddEntry(htmp,Form("n >= %1.1d",ncellcut[i]-1),"L"); | |
3361 | ||
3362 | } | |
3363 | } | |
3364 | pLegendXClN.Draw(); | |
3365 | ||
c8fe2783 | 3366 | //X |
a6f26052 | 3367 | cxn->cd(2) ; |
3368 | gPad->SetLogy(); | |
3369 | gPad->SetGridy(); | |
3370 | htmp = fhXNCells->ProjectionX("hxn_cluster_nocut",0,-1); | |
3371 | if(htmp){ | |
3372 | htmp->SetMinimum(1); | |
3373 | htmp->Rebin(rbX); | |
3374 | htmp->SetTitle("x of clusters for energy in cluster > threshold"); | |
3375 | htmp->SetAxisRange(xmin,xmax,"X"); | |
3376 | htmp->Draw("HE"); | |
3377 | ||
3378 | for (Int_t i = 0; i < ncellcuts; i++) { | |
3379 | if(i < ncellcuts-1)htmp = fhXNCells->ProjectionX(Form("hxn_cluster_cut%d",i),ncellcut[i],ncellcut[i]); | |
3380 | else htmp = fhXNCells->ProjectionX(Form("hxn_cluster_cut%d",i),ncellcut[i],-1); | |
3381 | htmp->SetLineColor(ecutcolor[i]); | |
3382 | htmp->Rebin(rbX); | |
3383 | htmp->Draw("same HE"); | |
3384 | } | |
3385 | } | |
c8fe2783 | 3386 | //Y |
a6f26052 | 3387 | cxn->cd(3) ; |
3388 | gPad->SetLogy(); | |
3389 | gPad->SetGridy(); | |
3390 | htmp = fhYNCells->ProjectionX("hyn_cluster_nocut",0,-1); | |
3391 | if(htmp){ | |
3392 | htmp->SetMinimum(1); | |
3393 | htmp->Rebin(rbY); | |
3394 | htmp->SetTitle("y of clusters for energy in cluster > threshold"); | |
3395 | htmp->SetAxisRange(ymin,ymax,"X"); | |
3396 | htmp->Draw("HE"); | |
3397 | ||
3398 | for (Int_t i = 0; i < ncellcuts; i++) { | |
3399 | if(i < ncellcuts-1) htmp = fhYNCells->ProjectionX(Form("hyn_cluster_cut%d",i),ncellcut[i],ncellcut[i]); | |
3400 | else htmp = fhYNCells->ProjectionX(Form("hyn_cluster_cut%d",i),ncellcut[i],-1); | |
3401 | htmp->SetLineColor(ecutcolor[i]); | |
3402 | htmp->Rebin(rbY); | |
3403 | htmp->Draw("same HE"); | |
3404 | } | |
3405 | } | |
c8fe2783 | 3406 | //Z |
a6f26052 | 3407 | cxn->cd(4) ; |
3408 | gPad->SetLogy(); | |
3409 | gPad->SetGridy(); | |
3410 | ||
3411 | htmp = fhZNCells->ProjectionX("hzn_cluster_nocut",0,-1); | |
3412 | if(htmp){ | |
3413 | htmp->SetMinimum(1); | |
3414 | htmp->Rebin(rbZ); | |
3415 | htmp->SetTitle("z of clusters for energy in cluster > threshold"); | |
3416 | htmp->SetAxisRange(zmin,zmax,"X"); | |
3417 | htmp->Draw("HE"); | |
3418 | ||
3419 | for (Int_t i = 0; i < ncellcuts; i++) { | |
3420 | if(i < ncellcuts-1)htmp = fhZNCells->ProjectionX(Form("hzn_cluster_cut%d",i),ncellcut[i],ncellcut[i]); | |
3421 | else htmp = fhZNCells->ProjectionX(Form("hzn_cluster_cut%d",i),ncellcut[i],-1); | |
3422 | htmp->SetLineColor(ecutcolor[i]); | |
3423 | htmp->Rebin(rbZ); | |
3424 | htmp->Draw("same HE"); | |
3425 | } | |
3426 | } | |
3427 | ||
3428 | sprintf(name,"QA_%s_ClusterX_Y_Z_R_NCellsCut.eps",fCalorimeter.Data()); | |
3429 | cxn->Print(name); printf("Create plot %s\n",name); | |
3430 | ||
3431 | ||
c8fe2783 | 3432 | //---------------------------------------------------------- |
3433 | // Cell X, Y, Z, R, energy cut dependence | |
3434 | //--------------------------------------------------------- | |
a6f26052 | 3435 | |
3436 | sprintf(cname,"%s_QA_CellX_Y_Z_R_ECut",fCalorimeter.Data()); | |
3437 | TCanvas * cxecell = new TCanvas(cname, "Cell X Y Z R, E cut", 800, 800) ; | |
3438 | cxecell->Divide(2, 2); | |
c8fe2783 | 3439 | //R |
a6f26052 | 3440 | cxecell->cd(1) ; |
3441 | gPad->SetLogy(); | |
3442 | gPad->SetGridy(); | |
3443 | ||
3444 | TLegend pLegendXCell(0.83,0.6,0.95,0.93); | |
3445 | pLegendXCell.SetTextSize(0.03); | |
3446 | pLegendXCell.SetFillColor(10); | |
3447 | pLegendXCell.SetBorderSize(1); | |
3448 | ||
3449 | htmp = fhRCellE->ProjectionX("hre_cell_nocut",0,-1); | |
3450 | if(htmp){ | |
3451 | htmp->SetMinimum(1); | |
3452 | htmp->Rebin(rbR); | |
3453 | htmp->SetTitle("r of cells for energy in cluster > threshold"); | |
3454 | htmp->SetAxisRange(rmin,rmax,"X"); | |
3455 | htmp->Draw("HE"); | |
3456 | pLegendXCell.AddEntry(htmp,"No cut","L"); | |
3457 | ||
3458 | for (Int_t i = 0; i < ncuts; i++) { | |
3459 | binmin = hE->FindBin(ecut[i]); | |
c8fe2783 | 3460 | //printf(" bins %d for e %f\n",binmin[i],ecut[i]); |
a6f26052 | 3461 | htmp = fhRCellE->ProjectionX(Form("hre_celr_cut%d",i),binmin,-1); |
3462 | htmp->SetLineColor(ecutcolor[i]); | |
3463 | htmp->Rebin(rbR); | |
3464 | htmp->Draw("same HE"); | |
3465 | pLegendXCell.AddEntry(htmp,Form("E>%1.1f",ecut[i]),"L"); | |
3466 | } | |
3467 | } | |
3468 | pLegendXCell.Draw(); | |
3469 | ||
c8fe2783 | 3470 | //X |
a6f26052 | 3471 | cxecell->cd(2) ; |
3472 | gPad->SetLogy(); | |
3473 | gPad->SetGridy(); | |
3474 | ||
3475 | htmp = fhXCellE->ProjectionX("hxe_cells_nocut",0,-1); | |
3476 | if(htmp){ | |
3477 | htmp->SetMinimum(1); | |
3478 | htmp->Rebin(rbX); | |
3479 | htmp->SetTitle("x of cells for energy in cluster > threshold"); | |
3480 | htmp->SetAxisRange(xmin,xmax,"X"); | |
3481 | htmp->Draw("HE"); | |
3482 | ||
3483 | for (Int_t i = 0; i < ncuts; i++) { | |
3484 | binmin = hE->FindBin(ecut[i]); | |
c8fe2783 | 3485 | //printf(" bins %d for e %f\n",binmin[i],ecut[i]); |
a6f26052 | 3486 | htmp = fhXCellE->ProjectionX(Form("hxe_cells_cut%d",i),binmin,-1); |
3487 | htmp->SetLineColor(ecutcolor[i]); | |
3488 | htmp->Rebin(rbX); | |
3489 | htmp->Draw("same HE"); | |
3490 | } | |
3491 | } | |
c8fe2783 | 3492 | //Y |
a6f26052 | 3493 | cxecell->cd(3) ; |
3494 | gPad->SetLogy(); | |
3495 | gPad->SetGridy(); | |
3496 | htmp = fhYCellE->ProjectionX("hye_cells_nocut",0,-1); | |
3497 | if(htmp){ | |
3498 | htmp->SetMinimum(1); | |
3499 | htmp->Rebin(rbY); | |
3500 | htmp->SetTitle("y of cells for energy in cluster > threshold"); | |
3501 | htmp->SetAxisRange(ymin,ymax,"X"); | |
3502 | htmp->Draw("HE"); | |
3503 | ||
3504 | for (Int_t i = 0; i < ncuts; i++) { | |
3505 | binmin = hE->FindBin(ecut[i]); | |
c8fe2783 | 3506 | //printf(" bins %d for e %f\n",binmin[i],ecut[i]); |
a6f26052 | 3507 | htmp = fhYCellE->ProjectionX(Form("hye_cells_cut%d",i),binmin,-1); |
3508 | htmp->SetLineColor(ecutcolor[i]); | |
3509 | htmp->Rebin(rbY); | |
3510 | htmp->Draw("same HE"); | |
3511 | } | |
3512 | } | |
c8fe2783 | 3513 | //Z |
a6f26052 | 3514 | cxecell->cd(4) ; |
3515 | gPad->SetLogy(); | |
3516 | gPad->SetGridy(); | |
3517 | htmp = fhZCellE->ProjectionX("hze_cells_nocut",0,-1); | |
3518 | if(htmp){ | |
3519 | htmp->SetMinimum(1); | |
3520 | htmp->Rebin(rbZ); | |
3521 | htmp->SetTitle("z of cells for energy in cluster > threshold"); | |
3522 | htmp->SetAxisRange(zmin,zmax,"X"); | |
3523 | htmp->Draw("HE"); | |
3524 | ||
3525 | for (Int_t i = 0; i < ncuts; i++) { | |
3526 | binmin = hE->FindBin(ecut[i]); | |
c8fe2783 | 3527 | //printf(" bins %d for e %f\n",binmin[i],ecut[i]); |
a6f26052 | 3528 | htmp = fhZCellE->ProjectionX(Form("hze_cells_cut%d",i),binmin,-1); |
3529 | htmp->SetLineColor(ecutcolor[i]); | |
3530 | htmp->Rebin(rbZ); | |
3531 | htmp->Draw("same HE"); | |
3532 | } | |
3533 | } | |
3534 | sprintf(name,"QA_%s_CellX_Y_Z_R_ECut.eps",fCalorimeter.Data()); | |
3535 | cxecell->Print(name); printf("Create plot %s\n",name); | |
3536 | ||
3537 | ||
c8fe2783 | 3538 | //---------------------------------------------------------- |
3539 | // Cluster-Cell X, Y, Z, R, cluster energy cut dependence | |
3540 | //--------------------------------------------------------- | |
a6f26052 | 3541 | Int_t rbDR= 1;//rbR; |
3542 | Int_t rbDX= 1;//rbX; | |
3543 | Int_t rbDY= 1;//rbY; | |
3544 | Int_t rbDZ= 1;//rbZ; | |
3545 | ||
3546 | sprintf(cname,"%s_QA_DeltaClusterCellX_Y_Z_R_ECut",fCalorimeter.Data()); | |
3547 | TCanvas * cxde = new TCanvas(cname, "Cluster-Cell X, Y, Z, R, E cut", 800, 800) ; | |
3548 | cxde->Divide(2, 2); | |
c8fe2783 | 3549 | //R |
a6f26052 | 3550 | cxde->cd(1) ; |
3551 | gPad->SetLogy(); | |
3552 | gPad->SetGridy(); | |
3553 | ||
3554 | TLegend pLegendXClD(0.83,0.6,0.95,0.93); | |
3555 | pLegendXClD.SetTextSize(0.03); | |
3556 | pLegendXClD.SetFillColor(10); | |
3557 | pLegendXClD.SetBorderSize(1); | |
3558 | ||
3559 | htmp = fhDeltaCellClusterRE->ProjectionX("hrde_nocut",0,-1); | |
3560 | if(htmp){ | |
3561 | htmp->SetMinimum(1); | |
3562 | htmp->Rebin(rbDR); | |
3563 | htmp->SetTitle("r clusters - r cells for energy in cluster > threshold"); | |
3564 | htmp->SetAxisRange(-50,50,"X"); | |
3565 | htmp->Draw("HE"); | |
3566 | pLegendXCl.AddEntry(htmp,"No cut","L"); | |
3567 | ||
3568 | for (Int_t i = 0; i < ncuts; i++) { | |
3569 | binmin = hE->FindBin(ecut[i]); | |
c8fe2783 | 3570 | //printf(" bins %d for e %f\n",binmin[i],ecut[i]); |
a6f26052 | 3571 | htmp = fhDeltaCellClusterRE->ProjectionX(Form("hrde_cut%d",i),binmin,-1); |
3572 | htmp->SetLineColor(ecutcolor[i]); | |
3573 | htmp->Rebin(rbDR); | |
3574 | htmp->Draw("same HE"); | |
3575 | pLegendXClD.AddEntry(htmp,Form("E>%1.1f",ecut[i]),"L"); | |
3576 | } | |
3577 | } | |
3578 | pLegendXClD.Draw(); | |
3579 | ||
c8fe2783 | 3580 | //X |
a6f26052 | 3581 | cxde->cd(2) ; |
3582 | gPad->SetLogy(); | |
3583 | gPad->SetGridy(); | |
3584 | htmp = fhDeltaCellClusterXE->ProjectionX("hxde_nocut",0,-1); | |
3585 | if(htmp){ | |
3586 | htmp->SetMinimum(1); | |
3587 | htmp->Rebin(rbDX); | |
3588 | htmp->SetTitle("x clusters -x cells for energy in cluster > threshold"); | |
3589 | htmp->SetAxisRange(-50,50,"X"); | |
3590 | htmp->Draw("HE"); | |
3591 | ||
3592 | for (Int_t i = 0; i < ncuts; i++) { | |
3593 | binmin = hE->FindBin(ecut[i]); | |
c8fe2783 | 3594 | //printf(" bins %d for e %f\n",binmin[i],ecut[i]); |
a6f26052 | 3595 | htmp = fhDeltaCellClusterXE->ProjectionX(Form("hxde_cut%d",i),binmin,-1); |
3596 | htmp->SetLineColor(ecutcolor[i]); | |
3597 | htmp->Rebin(rbDX); | |
3598 | htmp->Draw("same HE"); | |
3599 | ||
3600 | } | |
3601 | } | |
c8fe2783 | 3602 | //Y |
a6f26052 | 3603 | cxde->cd(3) ; |
3604 | gPad->SetLogy(); | |
3605 | gPad->SetGridy(); | |
3606 | htmp = fhDeltaCellClusterYE->ProjectionX("hyde_nocut",0,-1); | |
3607 | if(htmp){ | |
3608 | htmp->SetMinimum(1); | |
3609 | htmp->Rebin(rbDY); | |
3610 | htmp->SetTitle("y clusters - ycells for energy in cluster > threshold"); | |
3611 | htmp->SetAxisRange(-50,50,"X"); | |
3612 | htmp->Draw("HE"); | |
3613 | ||
3614 | for (Int_t i = 0; i < ncuts; i++) { | |
3615 | binmin = hE->FindBin(ecut[i]); | |
c8fe2783 | 3616 | //printf(" bins %d for e %f\n",binmin[i],ecut[i]); |
a6f26052 | 3617 | htmp = fhDeltaCellClusterYE->ProjectionX(Form("hyde_cut%d",i),binmin,-1); |
3618 | htmp->SetLineColor(ecutcolor[i]); | |
3619 | htmp->Rebin(rbDY); | |
3620 | htmp->Draw("same HE"); | |
3621 | ||
3622 | } | |
3623 | } | |
c8fe2783 | 3624 | //Z |
a6f26052 | 3625 | cxde->cd(4) ; |
3626 | gPad->SetLogy(); | |
3627 | gPad->SetGridy(); | |
3628 | ||
3629 | htmp = fhDeltaCellClusterZE->ProjectionX("hzde_nocut",0,-1); | |
3630 | if(htmp){ | |
3631 | htmp->SetMinimum(1); | |
3632 | htmp->Rebin(rbZ); | |
3633 | htmp->SetTitle("z clusters - z cells for energy in cluster > threshold"); | |
3634 | htmp->SetAxisRange(-50,50,"X"); | |
3635 | htmp->Draw("HE"); | |
3636 | ||
3637 | for (Int_t i = 0; i < ncuts; i++) { | |
3638 | binmin = hE->FindBin(ecut[i]); | |
c8fe2783 | 3639 | //printf(" bins %d for e %f\n",binmin[i],ecut[i]); |
a6f26052 | 3640 | htmp = fhDeltaCellClusterZE->ProjectionX(Form("hzde_cut%d",i),binmin,-1); |
3641 | htmp->SetLineColor(ecutcolor[i]); | |
3642 | htmp->Rebin(rbZ); | |
3643 | htmp->Draw("same HE"); | |
3644 | ||
3645 | } | |
3646 | } | |
3647 | ||
3648 | sprintf(name,"QA_%s_DeltaClusterCellX_Y_Z_R_ECut.eps",fCalorimeter.Data()); | |
3649 | cxde->Print(name); printf("Create plot %s\n",name); | |
3650 | ||
3651 | ||
c8fe2783 | 3652 | //---------------------------------------------------------- |
3653 | // Cluster-Cell X, Y, Z, R, NCells in cluster dependence | |
3654 | //--------------------------------------------------------- | |
a6f26052 | 3655 | sprintf(cname,"%s_QA_DeltaClusterCellX_Y_Z_R_NCellsCut",fCalorimeter.Data()); |
3656 | TCanvas * cxdn = new TCanvas(cname, "Cluster-Cell X Y Z R, NCells cut", 800, 800) ; | |
3657 | cxdn->Divide(2, 2); | |
c8fe2783 | 3658 | //R |
a6f26052 | 3659 | cxdn->cd(1) ; |
3660 | gPad->SetLogy(); | |
3661 | gPad->SetGridy(); | |
3662 | ||
3663 | TLegend pLegendXClDN(0.83,0.6,0.95,0.93); | |
3664 | pLegendXClDN.SetTextSize(0.03); | |
3665 | pLegendXClDN.SetFillColor(10); | |
3666 | pLegendXClDN.SetBorderSize(1); | |
3667 | ||
3668 | htmp = fhDeltaCellClusterRNCells->ProjectionX("hrdn_nocut",0,-1); | |
3669 | if(htmp){ | |
3670 | htmp->SetMinimum(1); | |
3671 | htmp->Rebin(rbDR); | |
3672 | htmp->SetTitle("r clusters - r cells for n cells in cluster > threshold"); | |
3673 | htmp->SetAxisRange(-50,50,"X"); | |
3674 | htmp->Draw("HE"); | |
3675 | pLegendXClDN.AddEntry(htmp,"No cut","L"); | |
3676 | ||
3677 | for (Int_t i = 0; i < ncellcuts; i++) { | |
3678 | if(i < ncellcuts-1) htmp = fhDeltaCellClusterRNCells->ProjectionX(Form("hrdn_cut%d",i),ncellcut[i],ncellcut[i]); | |
3679 | else htmp = fhDeltaCellClusterRNCells->ProjectionX(Form("hrdn_cut%d",i),ncellcut[i],-1); | |
3680 | htmp->SetLineColor(ecutcolor[i]); | |
3681 | htmp->Rebin(rbDR); | |
3682 | htmp->Draw("same HE"); | |
3683 | if(i < ncellcuts-1) pLegendXClDN.AddEntry(htmp,Form("n = %1.1d",ncellcut[i]-1),"L"); | |
3684 | else pLegendXClDN.AddEntry(htmp,Form("n >= %1.1d",ncellcut[i]-1),"L"); | |
3685 | ||
3686 | } | |
3687 | } | |
3688 | pLegendXClDN.Draw(); | |
3689 | ||
c8fe2783 | 3690 | //X |
a6f26052 | 3691 | cxdn->cd(2) ; |
3692 | gPad->SetLogy(); | |
3693 | gPad->SetGridy(); | |
3694 | htmp = fhDeltaCellClusterXNCells->ProjectionX("hxdn_nocut",0,-1); | |
3695 | if(htmp){ | |
3696 | htmp->SetMinimum(1); | |
3697 | htmp->Rebin(rbDX); | |
3698 | htmp->SetTitle("x clusters - x cells for n cells in cluster > threshold"); | |
3699 | htmp->SetAxisRange(-50,50,"X"); | |
3700 | htmp->Draw("HE"); | |
3701 | ||
3702 | for (Int_t i = 0; i < ncellcuts; i++) { | |
3703 | if(i < ncellcuts-1)htmp = fhDeltaCellClusterXNCells->ProjectionX(Form("hxdn_cut%d",i),ncellcut[i],ncellcut[i]); | |
3704 | else htmp = fhDeltaCellClusterXNCells->ProjectionX(Form("hxdn_cut%d",i),ncellcut[i],-1); | |
3705 | htmp->SetLineColor(ecutcolor[i]); | |
3706 | htmp->Rebin(rbDX); | |
3707 | htmp->Draw("same HE"); | |
3708 | ||
3709 | } | |
3710 | } | |
c8fe2783 | 3711 | //Y |
a6f26052 | 3712 | cxdn->cd(3) ; |
3713 | gPad->SetLogy(); | |
3714 | gPad->SetGridy(); | |
3715 | htmp = fhDeltaCellClusterYNCells->ProjectionX("hydn_nocut",0,-1); | |
3716 | if(htmp){ | |
3717 | htmp->SetMinimum(1); | |
3718 | htmp->Rebin(rbDY); | |
3719 | htmp->SetTitle("y clusters - y cells for n cells in cluster > threshold"); | |
3720 | htmp->SetAxisRange(-50,50,"X"); | |
3721 | htmp->Draw("HE"); | |
3722 | ||
3723 | for (Int_t i = 0; i < ncellcuts; i++) { | |
3724 | if(i < ncellcuts-1) htmp = fhDeltaCellClusterYNCells->ProjectionX(Form("hydn_cut%d",i),ncellcut[i],ncellcut[i]); | |
3725 | else htmp = fhDeltaCellClusterYNCells->ProjectionX(Form("hydn_cut%d",i),ncellcut[i],-1); | |
3726 | htmp->SetLineColor(ecutcolor[i]); | |
3727 | htmp->Rebin(rbDY); | |
3728 | htmp->Draw("same HE"); | |
3729 | ||
3730 | } | |
3731 | } | |
c8fe2783 | 3732 | //Z |
a6f26052 | 3733 | cxdn->cd(4) ; |
3734 | gPad->SetLogy(); | |
3735 | gPad->SetGridy(); | |
3736 | ||
3737 | htmp = fhDeltaCellClusterZNCells->ProjectionX("hzdn_nocut",0,-1); | |
3738 | if(htmp){ | |
3739 | htmp->SetMinimum(1); | |
3740 | htmp->Rebin(rbDZ); | |
3741 | htmp->SetTitle("z clusters - z cells for ncells in cluster > threshold"); | |
3742 | htmp->SetAxisRange(-50,50,"X"); | |
3743 | htmp->Draw("HE"); | |
3744 | ||
3745 | for (Int_t i = 0; i < ncellcuts; i++) { | |
3746 | if(i < ncellcuts-1)htmp = fhDeltaCellClusterZNCells->ProjectionX(Form("hzdn_cut%d",i),ncellcut[i],ncellcut[i]); | |
3747 | else htmp = fhDeltaCellClusterZNCells->ProjectionX(Form("hzdn_cut%d",i),ncellcut[i],-1); | |
3748 | htmp->SetLineColor(ecutcolor[i]); | |
3749 | htmp->Rebin(rbDZ); | |
3750 | htmp->Draw("same HE"); | |
3751 | ||
3752 | } | |
3753 | } | |
3754 | ||
3755 | sprintf(name,"QA_%s_DeltaClusterCellX_Y_Z_R_NCellsCut.eps",fCalorimeter.Data()); | |
3756 | cxdn->Print(name); printf("Create plot %s\n",name); | |
3757 | ||
255b904d | 3758 | } |
c8fe2783 | 3759 | |
a6f26052 | 3760 | //---------------------------------------------------------- |
3761 | //Reconstructed clusters energy-eta-phi distributions, matched with tracks | |
3762 | //---------------------------------------------------------- | |
3763 | TH1F * hEChargedClone = 0 ; | |
3764 | TH1F * hPtChargedClone = 0 ; | |
3765 | TH1F * hEtaChargedClone = 0 ; | |
3766 | TH1F * hPhiChargedClone = 0 ; | |
3767 | if(fFillAllTH12){ | |
3768 | hEChargedClone = (TH1F*) fhECharged->Clone(Form("%sClone",fhECharged->GetName())); | |
3769 | hPtChargedClone = (TH1F*) fhPtCharged->Clone(Form("%sClone",fhPtCharged->GetName())); | |
3770 | hEtaChargedClone = (TH1F*) fhEtaCharged->Clone(Form("%sClone",fhEtaCharged->GetName())); | |
3771 | hPhiChargedClone = (TH1F*) fhPhiCharged->Clone(Form("%sClone",fhPhiCharged->GetName())); | |
3772 | ||
3773 | sprintf(cname,"QA_%s_rectrackmatch",fCalorimeter.Data()); | |
3774 | TCanvas * ccltm = new TCanvas(cname, "Reconstructed clusters E-Phi-Eta, matched with tracks", 1200, 400) ; | |
3775 | ccltm->Divide(3, 1); | |
3776 | ||
3777 | ccltm->cd(1) ; | |
3778 | if(fhECharged->GetEntries() > 0) gPad->SetLogy(); | |
3779 | fhECharged->Rebin(rbE); | |
3780 | fhECharged->SetAxisRange(ptmin,ptmax,"X"); | |
3781 | fhECharged->SetMinimum(1); | |
3782 | fhECharged->Draw(); | |
3783 | ||
3784 | ccltm->cd(2) ; | |
3785 | if(fhPhiCharged->GetEntries() > 0) gPad->SetLogy(); | |
3786 | fhPhiCharged->Rebin(rbPhi); | |
3787 | fhPhiCharged->SetAxisRange(phimin,phimax,"X"); | |
3788 | fhPhiCharged->Draw(); | |
3789 | fhPhiCharged->Draw(); | |
3790 | ||
3791 | ccltm->cd(3) ; | |
3792 | if(fhEtaCharged->GetEntries() > 0) gPad->SetLogy(); | |
3793 | fhEtaCharged->Rebin(rbEta); | |
3794 | fhEtaCharged->SetAxisRange(etamin,etamax,"X"); | |
3795 | fhEtaCharged->Draw(); | |
3796 | fhEtaCharged->Draw(); | |
3797 | ||
3798 | sprintf(name,"QA_%s_ClusterEnergyPhiEta_TrackMatched.eps",fCalorimeter.Data()); | |
3799 | ccltm->Print(name); printf("Plot: %s\n",name); | |
3800 | ||
c8fe2783 | 3801 | //---------------------------------------------------------- |
3802 | // Ratio of reconstructed clusters energy-eta-phi distributions, matched with tracks over all | |
3803 | //---------------------------------------------------------- | |
a6f26052 | 3804 | |
3805 | sprintf(cname,"%s_QA_ChargedRatio",fCalorimeter.Data()); | |
3806 | TCanvas * ccharge = new TCanvas(cname, "Charged clusters over all clusters", 1200, 400) ; | |
3807 | ccharge->Divide(3, 1); | |
3808 | ||
3809 | ccharge->cd(1) ; | |
3810 | fhECharged->Sumw2(); | |
3811 | fhE->Sumw2(); | |
3812 | fhECharged->Divide(fhE); | |
3813 | fhECharged->SetAxisRange(ptmin,ptmax,"X"); | |
3814 | fhECharged->SetMaximum(0.5); | |
3815 | fhECharged->SetYTitle("track-matched clusters / all clusters"); | |
3816 | fhECharged->Draw("HE"); | |
3817 | ||
3818 | ccharge->cd(2) ; | |
3819 | fhPhiCharged->Sumw2(); | |
3820 | fhPhi->Rebin(rbPhi); | |
3821 | fhPhi->Sumw2(); | |
3822 | fhPhiCharged->Divide(fhPhi); | |
3823 | fhPhiCharged->SetAxisRange(phimin,phimax,"X"); | |
3824 | fhPhiCharged->SetMaximum(0.5); | |
3825 | fhPhiCharged->SetYTitle("track-matched clusters / all clusters"); | |
3826 | fhPhiCharged->Draw("HE"); | |
3827 | ||
3828 | ccharge->cd(3) ; | |
3829 | fhEtaCharged->Sumw2(); | |
3830 | fhEta->Rebin(rbEta); | |
3831 | fhEta->Sumw2(); | |
3832 | fhEtaCharged->Divide(fhEta); | |
3833 | fhEtaCharged->SetAxisRange(etamin,etamax,"X"); | |
3834 | fhEtaCharged->SetMaximum(0.5); | |
3835 | fhEtaCharged->SetYTitle("track-matched clusters / all clusters"); | |
3836 | fhEtaCharged->Draw("HE"); | |
3837 | ||
3838 | sprintf(name,"QA_%s_ClustersMatchedToAllRatios.eps",fCalorimeter.Data()); | |
3839 | ccharge->Print(name); printf("Create plot %s\n",name); | |
3840 | } | |
3841 | //------------------------------------------- | |
3842 | // N Cells - N Clusters - N Cells per cluster | |
3843 | //------------------------------------------- | |
255b904d | 3844 | sprintf(cname,"QA_%s_nclustercells",fCalorimeter.Data()); |
3845 | TCanvas * cN = new TCanvas(cname, " Number of CaloClusters and CaloCells", 800, 1200) ; | |
3846 | cN->Divide(2, 3); | |
3847 | ||
3848 | cN->cd(1) ; | |
a5fafd85 | 3849 | |
3850 | TLegend pLegendN(0.7,0.6,0.9,0.8); | |
3851 | pLegendN.SetTextSize(0.03); | |
3852 | pLegendN.AddEntry(fhNClusters,"all modules","L"); | |
3853 | pLegendN.SetFillColor(10); | |
3854 | pLegendN.SetBorderSize(1); | |
3855 | ||
8a587055 | 3856 | if(fhNClusters->GetEntries() > 0) gPad->SetLogy(); |
3857 | gPad->SetLogx(); | |
a5fafd85 | 3858 | fhNClusters->SetLineColor(1); |
255b904d | 3859 | |
3860 | Int_t rbN = 1; | |
3861 | if(fhNClusters->GetNbinsX()> nbins) rbN = fhNClusters->GetNbinsX()/nbins; | |
3862 | ||
3863 | fhNClusters->SetAxisRange(nmin,nmax,"X"); | |
3864 | fhNClusters->Draw("HE"); | |
a5fafd85 | 3865 | for(Int_t imod = 0; imod < fNModules; imod++){ |
255b904d | 3866 | fhNClustersMod[imod]->SetAxisRange(nmin,nmax,"X"); |
3867 | fhNClustersMod[imod]->SetLineColor(modColorIndex[imod]); | |
a5fafd85 | 3868 | fhNClustersMod[imod]->Draw("same"); |
3869 | pLegendN.AddEntry(fhNClustersMod[imod],Form("module %d",imod),"L"); | |
3870 | } | |
3871 | pLegendN.Draw(); | |
255b904d | 3872 | |
3873 | cN->cd(2) ; | |
3874 | gPad->SetLogx(); | |
3875 | for(Int_t imod = 1; imod < fNModules; imod++){ | |
3876 | htmp = (TH1D*)fhNClustersMod[imod]->Clone(Form("hNClustersRat%d",imod)); | |
3877 | htmp->Divide(fhNClustersMod[0]); | |
3878 | htmp->SetLineColor(modColorIndex[imod]); | |
3879 | if(imod==1){ | |
3880 | htmp->SetTitle("Ratio # clusters in module X / module 0"); | |
3881 | htmp->SetMaximum(5); | |
3882 | htmp->SetMinimum(0); | |
3883 | htmp->Draw("HE"); | |
3884 | } | |
3885 | else | |
3886 | htmp->Draw("same HE"); | |
3887 | ||
3888 | } | |
3889 | ||
3890 | cN->cd(3) ; | |
8a587055 | 3891 | if(fhNCells->GetEntries() > 0) gPad->SetLogy(); |
3892 | gPad->SetLogx(); | |
a5fafd85 | 3893 | fhNCells->SetLineColor(1); |
255b904d | 3894 | fhNCells->SetAxisRange(nmin,nmax,"X"); |
3895 | fhNCells->Draw("HE"); | |
a5fafd85 | 3896 | for(Int_t imod = 0; imod < fNModules; imod++){ |
255b904d | 3897 | fhNCellsMod[imod]->SetAxisRange(nmin,nmax,"X"); |
3898 | fhNCellsMod[imod]->SetLineColor(modColorIndex[imod]); | |
3899 | fhNCellsMod[imod]->Draw("same HE"); | |
3900 | } | |
3901 | ||
3902 | ||
3903 | cN->cd(4) ; | |
a348c43e | 3904 | gPad->SetLogx(); |
255b904d | 3905 | for(Int_t imod = 1; imod < fNModules; imod++){ |
3906 | htmp = (TH1D*)fhNCellsMod[imod]->Clone(Form("hNCellsRat%d",imod)); | |
3907 | htmp->Divide(fhNCellsMod[0]); | |
3908 | htmp->SetLineColor(modColorIndex[imod]); | |
3909 | if(imod==1){ | |
3910 | htmp->SetTitle("Ratio # cells in module X / module 0"); | |
3911 | htmp->SetMaximum(5); | |
3912 | htmp->SetMinimum(0); | |
3913 | htmp->Draw("HE"); | |
3914 | } | |
3915 | else | |
3916 | htmp->Draw("same HE"); | |
3917 | ||
3918 | } | |
3919 | ||
3920 | cN->cd(5) ; | |
3921 | if(fhNCellsPerCluster->GetEntries() > 0) gPad->SetLogy(); | |
3922 | gPad->SetLogx(); | |
3923 | TH1D *cpc = fhNCellsPerCluster->ProjectionY("cpc",-1,-1,-1,-1); | |
3924 | cpc->SetLineColor(1); | |
3925 | cpc->SetTitle("# cells per cluster"); | |
3926 | cpc->Draw("HE"); | |
3927 | TH1D ** hNCellsCluster1D = new TH1D*[fNModules]; | |
3928 | ||
a5fafd85 | 3929 | for(Int_t imod = 0; imod < fNModules; imod++){ |
255b904d | 3930 | hNCellsCluster1D[imod] = fhNCellsPerClusterMod[imod]->ProjectionY(Form("cpc_%d",imod),-1,-1); |
3931 | hNCellsCluster1D[imod]->SetLineColor(modColorIndex[imod]); | |
3932 | hNCellsCluster1D[imod]->Draw("same HE"); | |
a5fafd85 | 3933 | } |
8a587055 | 3934 | |
8a587055 | 3935 | |
255b904d | 3936 | cN->cd(6) ; |
3937 | gPad->SetLogx(); | |
3938 | for(Int_t imod = 1; imod < fNModules; imod++){ | |
3939 | htmp = (TH1D*)hNCellsCluster1D[imod]->Clone(Form("hNClustersCells1DRat%d",imod)); | |
3940 | htmp->Divide(hNCellsCluster1D[0]); | |
3941 | htmp->SetLineColor(modColorIndex[imod]); | |
3942 | if(imod==1){ | |
3943 | htmp->SetTitle("Ratio # cells per cluster in module X / module 0"); | |
a6f26052 | 3944 | //htmp->SetAxisRange(ptmin,ptmax,"X"); |
255b904d | 3945 | htmp->SetMaximum(3.5); |
3946 | htmp->SetMinimum(0); | |
3947 | htmp->Draw("HE"); | |
3948 | } | |
3949 | else | |
3950 | htmp->Draw("same HE"); | |
3951 | ||
3952 | } | |
3953 | sprintf(name,"QA_%s_NumberCaloClustersAndCaloCells.eps",fCalorimeter.Data()); | |
3954 | cN->Print(name); printf("Print plot %s\n",name); | |
3955 | ||
a6f26052 | 3956 | //---------------------------------------------------- |
3957 | // Cell Time histograms, time only available in ESDs | |
3958 | //---------------------------------------------------- | |
5a2dbc3c | 3959 | if(GetReader()->GetDataType()==AliCaloTrackReader::kESD) { |
c8fe2783 | 3960 | |
5a2dbc3c | 3961 | sprintf(cname,"QA_%s_cellstime",fCalorimeter.Data()); |
3962 | TCanvas * ctime = new TCanvas(cname, " Cells time", 1200, 400) ; | |
3963 | ctime->Divide(3, 1); | |
255b904d | 3964 | |
3965 | Int_t rbTime = 1; | |
3966 | if(fhTime->GetNbinsX()> ntimebins) rbTime = fhTime->GetNbinsX()/ntimebins; | |
3967 | ||
5a2dbc3c | 3968 | ctime->cd(1) ; |
3969 | if(fhTime->GetEntries() > 0) gPad->SetLogy(); | |
255b904d | 3970 | fhTime->Rebin(rbTime); |
3971 | fhTime->SetAxisRange(timemin,timemax,"X"); | |
5a2dbc3c | 3972 | fhTime->Draw(); |
c8fe2783 | 3973 | |
5a2dbc3c | 3974 | ctime->cd(2) ; |
255b904d | 3975 | fhTimeId->SetTitleOffset(1.8,"Y"); |
3976 | fhTimeId->SetAxisRange(timemin,timemax,"X"); | |
5a2dbc3c | 3977 | fhTimeId->Draw("colz"); |
c8fe2783 | 3978 | |
5a2dbc3c | 3979 | ctime->cd(3) ; |
255b904d | 3980 | fhTimeAmp->SetTitle("Cell Energy vs Cell Time"); |
3981 | fhTimeAmp->SetTitleOffset(1.8,"Y"); | |
3982 | fhTimeAmp->SetAxisRange(timemin,timemax,"Y"); | |
3983 | fhTimeAmp->SetAxisRange(ptmin,ptmax,"X"); | |
3984 | fhTimeAmp->Draw("colz"); | |
c8fe2783 | 3985 | |
5a2dbc3c | 3986 | sprintf(name,"QA_%s_CellsTime.eps",fCalorimeter.Data()); |
3987 | ctime->Print(name); printf("Plot: %s\n",name); | |
3988 | } | |
3989 | ||
255b904d | 3990 | |
a6f26052 | 3991 | //--------------------------------- |
3992 | //Grid of cell per module plots | |
3993 | //--------------------------------- | |
255b904d | 3994 | { |
a6f26052 | 3995 | //Number of entries per cell |
c8fe2783 | 3996 | gStyle->SetPadRightMargin(0.15); |
3997 | sprintf(cname,"%s_QA_GridCellEntries",fCalorimeter.Data()); | |
3998 | TCanvas *cgrid = new TCanvas("cgrid","Number of entries per cell", 12,12,800,400); | |
3999 | if(fNModules%2 == 0) | |
4000 | cgrid->Divide(fNModules/2,2); | |
4001 | else | |
4002 | cgrid->Divide(fNModules/2+1,2); | |
4003 | ||
4004 | for(Int_t imod = 0; imod < fNModules ; imod++){ | |
4005 | cgrid->cd(imod+1); | |
4006 | gPad->SetLogz(); | |
4007 | gPad->SetGridy(); | |
4008 | gPad->SetGridx(); | |
a6f26052 | 4009 | //fhGridCellsMod[imod]->GetYAxis()->SetTitleColor(1); |
c8fe2783 | 4010 | fhGridCellsMod[imod]->SetZTitle("Counts "); |
4011 | fhGridCellsMod[imod]->SetYTitle("row (phi direction) "); | |
a6f26052 | 4012 | //fhGridCellsMod[imod]->SetLabelSize(0.025,"z"); |
c8fe2783 | 4013 | fhGridCellsMod[imod]->Draw("colz"); |
4014 | } | |
4015 | sprintf(name,"QA_%s_GridCellsEntries.eps",fCalorimeter.Data()); | |
4016 | cgrid->Print(name); printf("Create plot %s\n",name); | |
4017 | ||
4018 | sprintf(cname,"%s_QA_GridCellAccumEnergy",fCalorimeter.Data()); | |
4019 | TCanvas *cgridE = new TCanvas("cgridE","Summed energy per cell", 12,12,800,400); | |
4020 | if(fNModules%2 == 0) | |
4021 | cgridE->Divide(fNModules/2,2); | |
4022 | else | |
4023 | cgridE->Divide(fNModules/2+1,2); | |
4024 | for(Int_t imod = 0; imod < fNModules ; imod++){ | |
4025 | cgridE->cd(imod+1); | |
4026 | gPad->SetLogz(); | |
4027 | gPad->SetGridy(); | |
4028 | gPad->SetGridx(); | |
a6f26052 | 4029 | //fhGridCellsEMod[imod]->SetLabelSize(0.025,"z"); |
c8fe2783 | 4030 | fhGridCellsEMod[imod]->SetZTitle("Accumulated Energy (GeV) "); |
4031 | fhGridCellsEMod[imod]->SetYTitle("row (phi direction) "); | |
4032 | fhGridCellsEMod[imod]->Draw("colz"); | |
4033 | } | |
4034 | sprintf(name,"QA_%s_GridCellsAccumEnergy.eps",fCalorimeter.Data()); | |
4035 | cgridE->Print(name); printf("Create plot %s\n",name); | |
4036 | ||
a6f26052 | 4037 | //Accumulated energy per cell |
c8fe2783 | 4038 | sprintf(cname,"%s_QA_GridCellAverageEnergy",fCalorimeter.Data()); |
4039 | TCanvas *cgridEA = new TCanvas("cgridEA","Average energy per cell", 12,12,800,400); | |
4040 | if(fNModules%2 == 0) | |
4041 | cgridEA->Divide(fNModules/2,2); | |
4042 | else | |
4043 | cgridEA->Divide(fNModules/2+1,2); | |
4044 | for(Int_t imod = 0; imod < fNModules ; imod++){ | |
4045 | cgridEA->cd(imod+1); | |
4046 | gPad->SetLogz(); | |
4047 | gPad->SetGridy(); | |
4048 | gPad->SetGridx(); | |
a6f26052 | 4049 | //fhGridCellsEMod[imod]->SetLabelSize(0.025,"z"); |
c8fe2783 | 4050 | fhGridCellsEMod[imod]->SetZTitle("Average Energy (GeV) "); |
4051 | fhGridCellsEMod[imod]->Divide(fhGridCellsMod[imod]); | |
4052 | fhGridCellsEMod[imod]->Draw("colz"); | |
4053 | } | |
4054 | sprintf(name,"QA_%s_GridCellsAverageEnergy.eps",fCalorimeter.Data()); | |
4055 | cgridEA->Print(name); printf("Create plot %s\n",name); | |
4056 | ||
a6f26052 | 4057 | //Accumulated Time per cell, E > 0.5 GeV |
c8fe2783 | 4058 | |
4059 | sprintf(cname,"%s_QA_GridCellAccumTime",fCalorimeter.Data()); | |
4060 | TCanvas *cgridT = new TCanvas("cgridT","Summed time per cell", 12,12,800,400); | |
4061 | if(fNModules%2 == 0) | |
4062 | cgridT->Divide(fNModules/2,2); | |
4063 | else | |
4064 | cgridE->Divide(fNModules/2+1,2); | |
4065 | for(Int_t imod = 0; imod < fNModules ; imod++){ | |
4066 | cgridT->cd(imod+1); | |
4067 | gPad->SetLogz(); | |
4068 | gPad->SetGridy(); | |
4069 | gPad->SetGridx(); | |
a6f26052 | 4070 | //fhGridCellsTimeMod[imod]->SetLabelSize(0.025,"z"); |
c8fe2783 | 4071 | fhGridCellsTimeMod[imod]->SetZTitle("Accumulated Time (ns) "); |
4072 | fhGridCellsTimeMod[imod]->SetYTitle("row (phi direction) "); | |
4073 | fhGridCellsTimeMod[imod]->Draw("colz"); | |
4074 | } | |
4075 | sprintf(name,"QA_%s_GridCellsAccumTime.eps",fCalorimeter.Data()); | |
4076 | cgridT->Print(name); printf("Create plot %s\n",name); | |
255b904d | 4077 | |
4078 | } | |
4079 | ||
a6f26052 | 4080 | //--------------------------------------------- |
4081 | //Calorimeter Correlation, PHOS vs EMCAL | |
4082 | //--------------------------------------------- | |
a0bb4dc0 | 4083 | if(fCorrelateCalos){ |
255b904d | 4084 | |
a0bb4dc0 | 4085 | sprintf(cname,"QA_%s_CaloCorr_EMCALvsPHOS",fCalorimeter.Data()); |
4086 | TCanvas * ccorr = new TCanvas(cname, " EMCAL vs PHOS", 400, 400) ; | |
4087 | ccorr->Divide(2, 2); | |
c8fe2783 | 4088 | |
a0bb4dc0 | 4089 | ccorr->cd(1) ; |
a6f26052 | 4090 | //gPad->SetLogy(); |
4091 | //gPad->SetLogx(); | |
255b904d | 4092 | fhCaloCorrNClusters->SetAxisRange(nmin,nmax,"X"); |
4093 | fhCaloCorrNClusters->SetAxisRange(nmin,nmax,"Y"); | |
a0bb4dc0 | 4094 | fhCaloCorrNClusters ->Draw(); |
c8fe2783 | 4095 | |
a0bb4dc0 | 4096 | ccorr->cd(2) ; |
a6f26052 | 4097 | //gPad->SetLogy(); |
4098 | //gPad->SetLogx(); | |
255b904d | 4099 | fhCaloCorrNCells->SetAxisRange(nmin,nmax,"X"); |
4100 | fhCaloCorrNCells->SetAxisRange(nmin,nmax,"Y"); | |
a0bb4dc0 | 4101 | fhCaloCorrNCells->Draw(); |
c8fe2783 | 4102 | |
a6f26052 | 4103 | //gPad->SetLogy(); |
4104 | //gPad->SetLogx(); | |
255b904d | 4105 | fhCaloCorrEClusters->SetAxisRange(ptmin,ptmax,"X"); |
4106 | fhCaloCorrEClusters->SetAxisRange(ptmin,ptmax,"Y"); | |
a0bb4dc0 | 4107 | fhCaloCorrEClusters->Draw(); |
c8fe2783 | 4108 | |
a0bb4dc0 | 4109 | ccorr->cd(4) ; |
a6f26052 | 4110 | //gPad->SetLogy(); |
4111 | //gPad->SetLogx(); | |
255b904d | 4112 | fhCaloCorrECells->SetAxisRange(ptmin,ptmax,"X"); |
4113 | fhCaloCorrECells->SetAxisRange(ptmin,ptmax,"Y"); | |
a0bb4dc0 | 4114 | fhCaloCorrECells->Draw(); |
c8fe2783 | 4115 | |
a0bb4dc0 | 4116 | sprintf(name,"QA_%s_CaloCorr_EMCALvsPHOS.eps",fCalorimeter.Data()); |
4117 | ccorr->Print(name); printf("Plot: %s\n",name); | |
4118 | } | |
c8fe2783 | 4119 | |
a6f26052 | 4120 | //---------------------------- |
4121 | //Invariant mass | |
4122 | //----------------------------- | |
255b904d | 4123 | |
4124 | Int_t imbinmin = -1; | |
4125 | Int_t imbinmax = -1; | |
06e5656a | 4126 | |
9725fd2a | 4127 | if(fhIM->GetEntries() > 1){ |
4128 | Int_t nebins = fhIM->GetNbinsX(); | |
4129 | Int_t emax = (Int_t) fhIM->GetXaxis()->GetXmax(); | |
4130 | Int_t emin = (Int_t) fhIM->GetXaxis()->GetXmin(); | |
4131 | if (emin != 0 ) printf("emin != 0 \n"); | |
a6f26052 | 4132 | //printf("IM: nBinsX %d, emin %2.2f, emax %2.2f\n",nebins,emin,emax); |
9725fd2a | 4133 | |
4134 | sprintf(cname,"QA_%s_IM",fCalorimeter.Data()); | |
a6f26052 | 4135 | // printf("c5\n"); |
a5fafd85 | 4136 | TCanvas * c5 = new TCanvas(cname, "Invariant mass", 600, 400) ; |
4137 | c5->Divide(2, 3); | |
9725fd2a | 4138 | |
4139 | c5->cd(1) ; | |
a6f26052 | 4140 | //fhIM->SetLineColor(4); |
4141 | //fhIM->Draw(); | |
255b904d | 4142 | imbinmin = 0; |
4143 | imbinmax = (Int_t) (1-emin)*nebins/emax; | |
4144 | TH1D *pyim1 = fhIM->ProjectionY(Form("%s_py1",fhIM->GetName()),imbinmin,imbinmax); | |
a5fafd85 | 4145 | pyim1->SetTitle("E_{pair} < 1 GeV"); |
4146 | pyim1->SetLineColor(1); | |
4147 | pyim1->Draw(); | |
4148 | TLegend pLegendIM(0.7,0.6,0.9,0.8); | |
4149 | pLegendIM.SetTextSize(0.03); | |
4150 | pLegendIM.AddEntry(pyim1,"all modules","L"); | |
4151 | pLegendIM.SetFillColor(10); | |
4152 | pLegendIM.SetBorderSize(1); | |
a6f26052 | 4153 | //FIXME |
a5fafd85 | 4154 | for(Int_t imod = 0; imod < fNModules; imod++){ |
255b904d | 4155 | pyim1 = fhIMMod[imod]->ProjectionY(Form("%s_py1",fhIMMod[imod]->GetName()),imbinmin,imbinmax); |
a5fafd85 | 4156 | pLegendIM.AddEntry(pyim1,Form("module %d",imod),"L"); |
4157 | pyim1->SetLineColor(imod+1); | |
4158 | pyim1->Draw("same"); | |
4159 | } | |
4160 | pLegendIM.Draw(); | |
9725fd2a | 4161 | |
4162 | c5->cd(2) ; | |
255b904d | 4163 | imbinmin = (Int_t) (1-emin)*nebins/emax; |
4164 | imbinmax = (Int_t) (2-emin)*nebins/emax; | |
4165 | TH1D *pyim2 = fhIM->ProjectionY(Form("%s_py2",fhIM->GetName()),imbinmin,imbinmax); | |
a5fafd85 | 4166 | pyim2->SetTitle("1 < E_{pair} < 2 GeV"); |
4167 | pyim2->SetLineColor(1); | |
4168 | pyim2->Draw(); | |
4169 | for(Int_t imod = 0; imod < fNModules; imod++){ | |
255b904d | 4170 | pyim2 = fhIMMod[imod]->ProjectionY(Form("%s_py2",fhIMMod[imod]->GetName()),imbinmin,imbinmax); |
a5fafd85 | 4171 | pyim2->SetLineColor(imod+1); |
4172 | pyim2->Draw("same"); | |
4173 | } | |
4174 | ||
4175 | c5->cd(3) ; | |
255b904d | 4176 | imbinmin = (Int_t) (2-emin)*nebins/emax; |
4177 | imbinmax = (Int_t) (3-emin)*nebins/emax; | |
4178 | TH1D *pyim3 = fhIM->ProjectionY(Form("%s_py3",fhIM->GetName()),imbinmin,imbinmax); | |
a5fafd85 | 4179 | pyim3->SetTitle("2 < E_{pair} < 3 GeV"); |
4180 | pyim3->SetLineColor(1); | |
4181 | pyim3->Draw(); | |
4182 | for(Int_t imod = 0; imod < fNModules; imod++){ | |
255b904d | 4183 | pyim3 = fhIMMod[imod]->ProjectionY(Form("%s_py3",fhIMMod[imod]->GetName()),imbinmin,imbinmax); |
a5fafd85 | 4184 | pyim3->SetLineColor(imod+1); |
4185 | pyim3->Draw("same"); | |
4186 | } | |
4187 | ||
4188 | c5->cd(4) ; | |
255b904d | 4189 | imbinmin = (Int_t) (3-emin)*nebins/emax; |
4190 | imbinmax = (Int_t) (4-emin)*nebins/emax; | |
4191 | TH1D *pyim4 = fhIM->ProjectionY(Form("%s_py4",fhIM->GetName()),imbinmin,imbinmax); | |
a5fafd85 | 4192 | pyim4->SetTitle("3 < E_{pair} < 4 GeV"); |
4193 | pyim4->SetLineColor(1); | |
4194 | pyim4->Draw(); | |
4195 | for(Int_t imod = 0; imod < fNModules; imod++){ | |
255b904d | 4196 | pyim4 = fhIMMod[imod]->ProjectionY(Form("%s_py4",fhIMMod[imod]->GetName()),imbinmin,imbinmax); |
a5fafd85 | 4197 | pyim4->SetLineColor(imod+1); |
4198 | pyim4->Draw("same"); | |
4199 | } | |
4200 | ||
4201 | c5->cd(5) ; | |
255b904d | 4202 | imbinmin = (Int_t) (4-emin)*nebins/emax; |
4203 | imbinmax = (Int_t) (5-emin)*nebins/emax; | |
4204 | TH1D *pyim5 = fhIM->ProjectionY(Form("%s_py5",fhIM->GetName()),imbinmin,imbinmax); | |
a5fafd85 | 4205 | pyim5->SetTitle("4< E_{pair} < 5 GeV"); |
4206 | pyim5->SetLineColor(1); | |
9725fd2a | 4207 | pyim5->Draw(); |
a5fafd85 | 4208 | for(Int_t imod = 0; imod < fNModules; imod++){ |
255b904d | 4209 | pyim5 = fhIMMod[imod]->ProjectionY(Form("%s_py5",fhIMMod[imod]->GetName()),imbinmin,imbinmax); |
a5fafd85 | 4210 | pyim5->SetLineColor(imod+1); |
4211 | pyim5->Draw("same"); | |
4212 | } | |
9725fd2a | 4213 | |
a5fafd85 | 4214 | c5->cd(6) ; |
255b904d | 4215 | imbinmin = (Int_t) (5-emin)*nebins/emax; |
4216 | imbinmax = -1; | |
4217 | TH1D *pyim10 = fhIM->ProjectionY(Form("%s_py6",fhIM->GetName()),imbinmin,imbinmax); | |
a5fafd85 | 4218 | pyim10->SetTitle("E_{pair} > 5 GeV"); |
4219 | pyim10->SetLineColor(1); | |
9725fd2a | 4220 | pyim10->Draw(); |
a5fafd85 | 4221 | for(Int_t imod = 0; imod < fNModules; imod++){ |
255b904d | 4222 | pyim10 = fhIMMod[imod]->ProjectionY(Form("%s_py6",fhIMMod[imod]->GetName()),imbinmin,imbinmax); |
a5fafd85 | 4223 | pyim10->SetLineColor(imod+1); |
4224 | pyim10->Draw("same"); | |
4225 | } | |
9725fd2a | 4226 | |
4227 | sprintf(name,"QA_%s_InvariantMass.eps",fCalorimeter.Data()); | |
8a587055 | 4228 | c5->Print(name); printf("Plot: %s\n",name); |
9725fd2a | 4229 | } |
4230 | ||
a6f26052 | 4231 | //-------------------------------------------------- |
4232 | //Invariant mass, clusters with more than one cell | |
4233 | //------------------------------------------------- | |
a5fafd85 | 4234 | if(fhIMCellCut->GetEntries() > 1){ |
4235 | Int_t nebins = fhIMCellCut->GetNbinsX(); | |
4236 | Int_t emax = (Int_t) fhIMCellCut->GetXaxis()->GetXmax(); | |
4237 | Int_t emin = (Int_t) fhIMCellCut->GetXaxis()->GetXmin(); | |
4238 | if (emin != 0 ) printf("emin != 0 \n"); | |
a6f26052 | 4239 | //printf("IMCellCut: nBinsX %d, emin %2.2f, emax %2.2f\n",nebins,emin,emax); |
a5fafd85 | 4240 | |
4241 | sprintf(cname,"QA_%s_IMCellCut",fCalorimeter.Data()); | |
a6f26052 | 4242 | // printf("c5cc\n"); |
a5fafd85 | 4243 | TCanvas * c5cc = new TCanvas(cname, "Invariant mass, Cell Cut", 600, 400) ; |
4244 | c5cc->Divide(2, 3); | |
4245 | ||
4246 | c5cc->cd(1) ; | |
a6f26052 | 4247 | //fhIMCellCut->SetLineColor(4); |
4248 | //fhIMCellCut->Draw(); | |
255b904d | 4249 | imbinmin = 0; |
4250 | imbinmax = (Int_t) (1-emin)*nebins/emax; | |
4251 | TH1D *pyimcc1 = fhIMCellCut->ProjectionY(Form("%s_py1",fhIMCellCut->GetName()),imbinmin,imbinmax); | |
a5fafd85 | 4252 | pyimcc1->SetTitle("E_{pair} < 1 GeV"); |
4253 | pyimcc1->SetLineColor(1); | |
4254 | pyimcc1->Draw(); | |
4255 | TLegend pLegendIMCellCut(0.7,0.6,0.9,0.8); | |
4256 | pLegendIMCellCut.SetTextSize(0.03); | |
4257 | pLegendIMCellCut.AddEntry(pyimcc1,"all modules","L"); | |
4258 | pLegendIMCellCut.SetFillColor(10); | |
4259 | pLegendIMCellCut.SetBorderSize(1); | |
255b904d | 4260 | |
a5fafd85 | 4261 | for(Int_t imod = 0; imod < fNModules; imod++){ |
255b904d | 4262 | pyimcc1 = fhIMCellCutMod[imod]->ProjectionY(Form("%s_py1",fhIMCellCutMod[imod]->GetName()),imbinmin,imbinmax); |
a5fafd85 | 4263 | pLegendIMCellCut.AddEntry(pyimcc1,Form("module %d",imod),"L"); |
4264 | pyimcc1->SetLineColor(imod+1); | |
4265 | pyimcc1->Draw("same"); | |
4266 | } | |
4267 | pLegendIMCellCut.Draw(); | |
4268 | ||
4269 | c5cc->cd(2) ; | |
255b904d | 4270 | imbinmin = (Int_t) (1-emin)*nebins/emax; |
4271 | imbinmax = (Int_t) (2-emin)*nebins/emax; | |
4272 | TH1D *pyimcc2 = fhIMCellCut->ProjectionY(Form("%s_py2",fhIMCellCut->GetName()),imbinmin,imbinmax); | |
a5fafd85 | 4273 | pyimcc2->SetTitle("1 < E_{pair} < 2 GeV"); |
4274 | pyimcc2->SetLineColor(1); | |
4275 | pyimcc2->Draw(); | |
4276 | for(Int_t imod = 0; imod < fNModules; imod++){ | |
255b904d | 4277 | pyimcc2 = fhIMCellCutMod[imod]->ProjectionY(Form("%s_py1",fhIMCellCutMod[imod]->GetName()),imbinmin,imbinmax); |
a5fafd85 | 4278 | pyimcc2->SetLineColor(imod+1); |
4279 | pyimcc2->Draw("same"); | |
4280 | } | |
4281 | ||
4282 | c5cc->cd(3) ; | |
255b904d | 4283 | imbinmin = (Int_t) (2-emin)*nebins/emax; |
4284 | imbinmax = (Int_t) (3-emin)*nebins/emax; | |
4285 | TH1D *pyimcc3 = fhIMCellCut->ProjectionY(Form("%s_py3",fhIMCellCut->GetName()),imbinmin,imbinmax); | |
a5fafd85 | 4286 | pyimcc3->SetTitle("2 < E_{pair} < 3 GeV"); |
4287 | pyimcc3->SetLineColor(1); | |
4288 | pyimcc3->Draw(); | |
4289 | for(Int_t imod = 0; imod < fNModules; imod++){ | |
255b904d | 4290 | pyimcc3 = fhIMCellCutMod[imod]->ProjectionY(Form("%s_py1",fhIMCellCutMod[imod]->GetName()),imbinmin,imbinmax); |
a5fafd85 | 4291 | pyimcc3->SetLineColor(imod+1); |
4292 | pyimcc3->Draw("same"); | |
4293 | } | |
4294 | ||
4295 | c5cc->cd(4) ; | |
255b904d | 4296 | imbinmin = (Int_t) (3-emin)*nebins/emax; |
4297 | imbinmax = (Int_t) (4-emin)*nebins/emax; | |
4298 | TH1D *pyimcc4 = fhIMCellCut->ProjectionY(Form("%s_py4",fhIMCellCut->GetName()),imbinmin,imbinmax); | |
a5fafd85 | 4299 | pyimcc4->SetTitle("3 < E_{pair} < 4 GeV"); |
4300 | pyimcc4->SetLineColor(1); | |
4301 | pyimcc4->Draw(); | |
4302 | for(Int_t imod = 0; imod < fNModules; imod++){ | |
255b904d | 4303 | pyimcc4 = fhIMCellCutMod[imod]->ProjectionY(Form("%s_py5",fhIMCellCutMod[imod]->GetName()),imbinmin,imbinmax); |
a5fafd85 | 4304 | pyimcc4->SetLineColor(imod+1); |
4305 | pyimcc4->Draw("same"); | |
4306 | } | |
4307 | ||
4308 | c5cc->cd(5) ; | |
255b904d | 4309 | imbinmin = (Int_t) (4-emin)*nebins/emax; |
4310 | imbinmax = (Int_t) (5-emin)*nebins/emax; | |
4311 | TH1D *pyimcc5cc = fhIMCellCut->ProjectionY(Form("%s_py5",fhIMCellCut->GetName()),imbinmin,imbinmax); | |
a5fafd85 | 4312 | pyimcc5cc->SetTitle("4< E_{pair} < 5 GeV"); |
4313 | pyimcc5cc->SetLineColor(1); | |
4314 | pyimcc5cc->Draw(); | |
4315 | for(Int_t imod = 0; imod < fNModules; imod++){ | |
255b904d | 4316 | pyimcc5cc = fhIMCellCutMod[imod]->ProjectionY(Form("%s_py5",fhIMCellCutMod[imod]->GetName()),imbinmin,imbinmax); |
a5fafd85 | 4317 | pyimcc5cc->SetLineColor(imod+1); |
4318 | pyimcc5cc->Draw("same"); | |
4319 | } | |
4320 | ||
4321 | c5cc->cd(6) ; | |
255b904d | 4322 | imbinmin = (Int_t) (5-emin)*nebins/emax; |
4323 | imbinmax = -1; | |
4324 | TH1D *pyimcc10 = fhIMCellCut->ProjectionY(Form("%s_py6",fhIMCellCut->GetName()),imbinmin,imbinmax); | |
a5fafd85 | 4325 | pyimcc10->SetTitle("E_{pair} > 5 GeV"); |
4326 | pyimcc10->SetLineColor(1); | |
4327 | pyimcc10->Draw(); | |
4328 | for(Int_t imod = 0; imod < fNModules; imod++){ | |
255b904d | 4329 | pyimcc10 = fhIMCellCutMod[imod]->ProjectionY(Form("%s_py1",fhIMCellCutMod[imod]->GetName()),imbinmin,imbinmax); |
a5fafd85 | 4330 | pyimcc10->SetLineColor(imod+1); |
4331 | pyimcc10->Draw("same"); | |
4332 | } | |
4333 | ||
4334 | sprintf(name,"QA_%s_InvariantMass_CellCut.eps",fCalorimeter.Data()); | |
4335 | c5cc->Print(name); printf("Plot: %s\n",name); | |
4336 | } | |
4337 | ||
4338 | ||
a6f26052 | 4339 | //Asymmetry |
9725fd2a | 4340 | if(fhAsym->GetEntries() > 1){ |
4341 | Int_t nebins = fhAsym->GetNbinsX(); | |
4342 | Int_t emax = (Int_t) fhAsym->GetXaxis()->GetXmax(); | |
4343 | Int_t emin = (Int_t) fhAsym->GetXaxis()->GetXmin(); | |
4344 | if (emin != 0 ) printf("emin != 0 \n"); | |
a6f26052 | 4345 | //printf("Asym: nBinsX %d, emin %2.2f, emax %2.2f\n",nebins,emin,emax); |
9725fd2a | 4346 | |
4347 | sprintf(cname,"QA_%s_Asym",fCalorimeter.Data()); | |
a6f26052 | 4348 | // printf("c5\n"); |
9725fd2a | 4349 | TCanvas * c5b = new TCanvas(cname, "Asymmetry", 400, 400) ; |
4350 | c5b->Divide(2, 2); | |
4351 | ||
4352 | c5b->cd(1) ; | |
06e5656a | 4353 | fhAsym->SetTitleOffset(1.6,"Y"); |
9725fd2a | 4354 | fhAsym->SetLineColor(4); |
4355 | fhAsym->Draw(); | |
4356 | ||
4357 | c5b->cd(2) ; | |
255b904d | 4358 | imbinmin = 0; |
4359 | imbinmax = (Int_t) (5-emin)*nebins/emax; | |
4360 | TH1D *pyAsym5 = fhAsym->ProjectionY(Form("%s_py5",fhAsym->GetName()),imbinmin,imbinmax); | |
9725fd2a | 4361 | pyAsym5->SetTitle("E_{pair} < 5 GeV"); |
4362 | pyAsym5->SetLineColor(4); | |
4363 | pyAsym5->Draw(); | |
4364 | ||
4365 | c5b->cd(3) ; | |
255b904d | 4366 | imbinmin = (Int_t) (5-emin)*nebins/emax; |
4367 | imbinmax = (Int_t) (10-emin)*nebins/emax; | |
4368 | TH1D *pyAsym510 = fhAsym->ProjectionY(Form("%s_py510",fhAsym->GetName()),imbinmin,imbinmax); | |
9725fd2a | 4369 | pyAsym510->SetTitle("5 < E_{pair} < 10 GeV"); |
4370 | pyAsym510->SetLineColor(4); | |
4371 | pyAsym510->Draw(); | |
4372 | ||
4373 | c5b->cd(4) ; | |
255b904d | 4374 | imbinmin = (Int_t) (10-emin)*nebins/emax; |
4375 | imbinmax = -1; | |
4376 | TH1D *pyAsym10 = fhAsym->ProjectionY(Form("%s_py10",fhAsym->GetName()),imbinmin,imbinmax); | |
9725fd2a | 4377 | pyAsym10->SetTitle("E_{pair} > 10 GeV"); |
4378 | pyAsym10->SetLineColor(4); | |
4379 | pyAsym10->Draw(); | |
4380 | ||
4381 | sprintf(name,"QA_%s_Asymmetry.eps",fCalorimeter.Data()); | |
8a587055 | 4382 | c5b->Print(name); printf("Plot: %s\n",name); |
9725fd2a | 4383 | } |
4384 | ||
a5fafd85 | 4385 | |
8a587055 | 4386 | if(IsDataMC()){ |
a6f26052 | 4387 | //Reconstructed vs MC distributions |
4388 | //printf("c6\n"); | |
c8fe2783 | 4389 | sprintf(cname,"QA_%s_recvsmc",fCalorimeter.Data()); |
4390 | TCanvas * c6 = new TCanvas(cname, "Reconstructed vs MC distributions", 400, 400) ; | |
4391 | c6->Divide(2, 2); | |
4392 | ||
4393 | c6->cd(1) ; | |
4394 | fh2E->SetTitleOffset(1.6,"Y"); | |
4395 | fh2E->SetLineColor(4); | |
4396 | fh2E->Draw(); | |
4397 | ||
4398 | c6->cd(2) ; | |
4399 | fh2Pt->SetTitleOffset(1.6,"Y"); | |
4400 | fh2Pt->SetLineColor(4); | |
4401 | fh2Pt->Draw(); | |
4402 | ||
4403 | c6->cd(3) ; | |
4404 | fh2Phi->SetTitleOffset(1.6,"Y"); | |
4405 | fh2Phi->SetLineColor(4); | |
4406 | fh2Phi->Draw(); | |
4407 | ||
4408 | c6->cd(4) ; | |
4409 | fh2Eta->SetTitleOffset(1.6,"Y"); | |
4410 | fh2Eta->SetLineColor(4); | |
4411 | fh2Eta->Draw(); | |
4412 | ||
4413 | sprintf(name,"QA_%s_ReconstructedVSMCDistributions.eps",fCalorimeter.Data()); | |
4414 | c6->Print(name); printf("Plot: %s\n",name); | |
4415 | ||
a6f26052 | 4416 | //Reconstructed vs MC distributions |
4417 | //printf("c6\n"); | |
c8fe2783 | 4418 | sprintf(cname,"QA_%s_gamrecvsmc",fCalorimeter.Data()); |
4419 | TCanvas * c6Gam = new TCanvas(cname, "Reconstructed vs MC distributions", 400, 400) ; | |
4420 | c6Gam->Divide(2, 2); | |
4421 | ||
4422 | c6Gam->cd(1) ; | |
4423 | fhGamE->Draw(); | |
4424 | ||
4425 | c6Gam->cd(2) ; | |
4426 | fhGamPt->Draw(); | |
4427 | ||
4428 | c6Gam->cd(3) ; | |
4429 | fhGamPhi->Draw(); | |
4430 | ||
4431 | c6Gam->cd(4) ; | |
4432 | fhGamEta->Draw(); | |
4433 | ||
4434 | sprintf(name,"QA_%s_GammaReconstructedVSMCDistributions.eps",fCalorimeter.Data()); | |
4435 | c6->Print(name); printf("Plot: %s\n",name); | |
4436 | ||
a6f26052 | 4437 | //Generated - reconstructed |
4438 | //printf("c7\n"); | |
c8fe2783 | 4439 | sprintf(cname,"QA_%s_diffgenrec",fCalorimeter.Data()); |
4440 | TCanvas * c7 = new TCanvas(cname, "generated - reconstructed", 400, 400) ; | |
4441 | c7->Divide(2, 2); | |
4442 | ||
4443 | c7->cd(1) ; | |
4444 | if(fhDeltaE->GetEntries() > 0) gPad->SetLogy(); | |
4445 | fhGamDeltaE->SetLineColor(4); | |
4446 | fhDeltaE->Draw(); | |
4447 | fhGamDeltaE->Draw("same"); | |
4448 | ||
4449 | TLegend pLegendd(0.65,0.55,0.9,0.8); | |
4450 | pLegendd.SetTextSize(0.06); | |
4451 | pLegendd.AddEntry(fhDeltaE,"all","L"); | |
4452 | pLegendd.AddEntry(fhGamDeltaE,"from #gamma","L"); | |
4453 | pLegendd.SetFillColor(10); | |
4454 | pLegendd.SetBorderSize(1); | |
4455 | pLegendd.Draw(); | |
4456 | ||
4457 | c7->cd(2) ; | |
4458 | if(fhDeltaPt->GetEntries() > 0) gPad->SetLogy(); | |
4459 | fhGamDeltaPt->SetLineColor(4); | |
4460 | fhDeltaPt->Draw(); | |
4461 | fhGamDeltaPt->Draw("same"); | |
4462 | ||
4463 | c7->cd(3) ; | |
4464 | fhGamDeltaPhi->SetLineColor(4); | |
4465 | fhDeltaPhi->Draw(); | |
4466 | fhGamDeltaPhi->Draw("same"); | |
4467 | ||
4468 | c7->cd(4) ; | |
4469 | fhGamDeltaEta->SetLineColor(4); | |
4470 | fhDeltaEta->Draw(); | |
4471 | fhGamDeltaEta->Draw("same"); | |
4472 | ||
4473 | sprintf(name,"QA_%s_DiffGeneratedReconstructed.eps",fCalorimeter.Data()); | |
4474 | c7->Print(name); printf("Plot: %s\n",name); | |
4475 | ||
a6f26052 | 4476 | // Reconstructed / Generated |
4477 | //printf("c8\n"); | |
c8fe2783 | 4478 | sprintf(cname,"QA_%s_ratiorecgen",fCalorimeter.Data()); |
4479 | TCanvas * c8 = new TCanvas(cname, " reconstructed / generated", 400, 400) ; | |
4480 | c8->Divide(2, 2); | |
4481 | ||
4482 | c8->cd(1) ; | |
4483 | if(fhRatioE->GetEntries() > 0) gPad->SetLogy(); | |
4484 | fhGamRatioE->SetLineColor(4); | |
4485 | fhRatioE->Draw(); | |
4486 | fhGamRatioE->Draw("same"); | |
4487 | ||
4488 | TLegend pLegendr(0.65,0.55,0.9,0.8); | |
4489 | pLegendr.SetTextSize(0.06); | |
4490 | pLegendr.AddEntry(fhRatioE,"all","L"); | |
4491 | pLegendr.AddEntry(fhGamRatioE,"from #gamma","L"); | |
4492 | pLegendr.SetFillColor(10); | |
4493 | pLegendr.SetBorderSize(1); | |
4494 | pLegendr.Draw(); | |
4495 | ||
4496 | c8->cd(2) ; | |
4497 | if(fhRatioPt->GetEntries() > 0) gPad->SetLogy(); | |
4498 | fhGamRatioPt->SetLineColor(4); | |
4499 | fhRatioPt->Draw(); | |
4500 | fhGamRatioPt->Draw("same"); | |
4501 | ||
4502 | c8->cd(3) ; | |
4503 | fhGamRatioPhi->SetLineColor(4); | |
4504 | fhRatioPhi->Draw(); | |
4505 | fhGamRatioPhi->Draw("same"); | |
4506 | ||
4507 | c8->cd(4) ; | |
4508 | fhGamRatioEta->SetLineColor(4); | |
4509 | fhRatioEta->Draw(); | |
4510 | fhGamRatioEta->Draw("same"); | |
4511 | ||
4512 | sprintf(name,"QA_%s_ReconstructedDivGenerated.eps",fCalorimeter.Data()); | |
4513 | c8->Print(name); printf("Plot: %s\n",name); | |
4514 | ||
a6f26052 | 4515 | //MC |
c8fe2783 | 4516 | |
a6f26052 | 4517 | //Generated distributions |
4518 | //printf("c1\n"); | |
c8fe2783 | 4519 | sprintf(cname,"QA_%s_gen",fCalorimeter.Data()); |
4520 | TCanvas * c10 = new TCanvas(cname, "Generated distributions", 600, 200) ; | |
4521 | c10->Divide(3, 1); | |
4522 | ||
4523 | c10->cd(1) ; | |
4524 | gPad->SetLogy(); | |
4525 | TH1F * haxispt = (TH1F*) fhGenPi0Pt->Clone(Form("%s_axispt",fhGenPi0Pt->GetName())); | |
4526 | haxispt->SetTitle("Generated Particles p_{T}, |#eta| < 1"); | |
4527 | fhGenPi0Pt->SetLineColor(1); | |
4528 | fhGenGamPt->SetLineColor(4); | |
4529 | fhGenEtaPt->SetLineColor(2); | |
4530 | fhGenOmegaPt->SetLineColor(7); | |
4531 | fhGenElePt->SetLineColor(6); | |
4532 | ||
a6f26052 | 4533 | //Select the maximum of the histogram to show all lines. |
c8fe2783 | 4534 | if(fhGenPi0Pt->GetMaximum() >= fhGenGamPt->GetMaximum() && fhGenPi0Pt->GetMaximum() >= fhGenEtaPt->GetMaximum() && |
4535 | fhGenPi0Pt->GetMaximum() >= fhGenOmegaPt->GetMaximum() && fhGenPi0Pt->GetMaximum() >= fhGenElePt->GetMaximum()) | |
4536 | haxispt->SetMaximum(fhGenPi0Pt->GetMaximum()); | |
4537 | else if(fhGenGamPt->GetMaximum() >= fhGenPi0Pt->GetMaximum() && fhGenGamPt->GetMaximum() >= fhGenEtaPt->GetMaximum() && | |
4538 | fhGenGamPt->GetMaximum() >= fhGenOmegaPt->GetMaximum() && fhGenGamPt->GetMaximum() >= fhGenElePt->GetMaximum()) | |
4539 | haxispt->SetMaximum(fhGenGamPt->GetMaximum()); | |
4540 | else if(fhGenEtaPt->GetMaximum() >= fhGenPi0Pt->GetMaximum() && fhGenEtaPt->GetMaximum() >= fhGenGamPt->GetMaximum() && | |
4541 | fhGenEtaPt->GetMaximum() >= fhGenOmegaPt->GetMaximum() && fhGenEtaPt->GetMaximum() >= fhGenElePt->GetMaximum()) | |
4542 | haxispt->SetMaximum(fhGenEtaPt->GetMaximum()); | |
4543 | else if(fhGenOmegaPt->GetMaximum() >= fhGenPi0Pt->GetMaximum() && fhGenOmegaPt->GetMaximum() >= fhGenEtaPt->GetMaximum() && | |
4544 | fhGenOmegaPt->GetMaximum() >= fhGenGamPt->GetMaximum() && fhGenOmegaPt->GetMaximum() >= fhGenElePt->GetMaximum()) | |
4545 | haxispt->SetMaximum(fhGenOmegaPt->GetMaximum()); | |
4546 | else if(fhGenElePt->GetMaximum() >= fhGenPi0Pt->GetMaximum() && fhGenElePt->GetMaximum() >= fhGenEtaPt->GetMaximum() && | |
4547 | fhGenElePt->GetMaximum() >= fhGenOmegaPt->GetMaximum() && fhGenElePt->GetMaximum() >= fhGenGamPt->GetMaximum()) | |
4548 | haxispt->SetMaximum(fhGenElePt->GetMaximum()); | |
4549 | haxispt->SetMinimum(1); | |
4550 | haxispt->Draw("axis"); | |
4551 | fhGenPi0Pt->Draw("same"); | |
4552 | fhGenGamPt->Draw("same"); | |
4553 | fhGenEtaPt->Draw("same"); | |
4554 | fhGenOmegaPt->Draw("same"); | |
4555 | fhGenElePt->Draw("same"); | |
4556 | ||
4557 | TLegend pLegend(0.85,0.65,0.95,0.93); | |
4558 | pLegend.SetTextSize(0.06); | |
4559 | pLegend.AddEntry(fhGenPi0Pt," #pi^{0}","L"); | |
4560 | pLegend.AddEntry(fhGenGamPt," #gamma","L"); | |
4561 | pLegend.AddEntry(fhGenEtaPt," #eta","L"); | |
4562 | pLegend.AddEntry(fhGenOmegaPt," #omega","L"); | |
4563 | pLegend.AddEntry(fhGenElePt," e^{#pm}","L"); | |
4564 | pLegend.SetFillColor(10); | |
4565 | pLegend.SetBorderSize(1); | |
4566 | pLegend.Draw(); | |
4567 | ||
4568 | c10->cd(2) ; | |
4569 | gPad->SetLogy(); | |
4570 | TH1F * haxiseta = (TH1F*) fhGenPi0Eta->Clone(Form("%s_axiseta",fhGenPi0Eta->GetName())); | |
4571 | haxiseta->SetTitle("Generated Particles #eta, |#eta| < 1"); | |
4572 | fhGenPi0Eta->SetLineColor(1); | |
4573 | fhGenGamEta->SetLineColor(4); | |
4574 | fhGenEtaEta->SetLineColor(2); | |
4575 | fhGenOmegaEta->SetLineColor(7); | |
4576 | fhGenEleEta->SetLineColor(6); | |
a6f26052 | 4577 | //Select the maximum of the histogram to show all lines. |
c8fe2783 | 4578 | if(fhGenPi0Eta->GetMaximum() >= fhGenGamEta->GetMaximum() && fhGenPi0Eta->GetMaximum() >= fhGenEtaEta->GetMaximum() && |
4579 | fhGenPi0Eta->GetMaximum() >= fhGenOmegaEta->GetMaximum() && fhGenPi0Eta->GetMaximum() >= fhGenEleEta->GetMaximum()) | |
4580 | haxiseta->SetMaximum(fhGenPi0Eta->GetMaximum()); | |
4581 | else if(fhGenGamEta->GetMaximum() >= fhGenPi0Eta->GetMaximum() && fhGenGamEta->GetMaximum() >= fhGenEtaEta->GetMaximum() && | |
4582 | fhGenGamEta->GetMaximum() >= fhGenOmegaEta->GetMaximum() && fhGenGamEta->GetMaximum() >= fhGenEleEta->GetMaximum()) | |
4583 | haxiseta->SetMaximum(fhGenGamEta->GetMaximum()); | |
4584 | else if(fhGenEtaEta->GetMaximum() >= fhGenPi0Eta->GetMaximum() && fhGenEtaEta->GetMaximum() >= fhGenGamEta->GetMaximum() && | |
4585 | fhGenEtaEta->GetMaximum() >= fhGenOmegaEta->GetMaximum() && fhGenEtaEta->GetMaximum() >= fhGenEleEta->GetMaximum()) | |
4586 | haxiseta->SetMaximum(fhGenEtaEta->GetMaximum()); | |
4587 | else if(fhGenOmegaEta->GetMaximum() >= fhGenPi0Eta->GetMaximum() && fhGenOmegaEta->GetMaximum() >= fhGenEtaEta->GetMaximum() && | |
4588 | fhGenOmegaEta->GetMaximum() >= fhGenGamEta->GetMaximum() && fhGenOmegaEta->GetMaximum() >= fhGenEleEta->GetMaximum()) | |
4589 | haxiseta->SetMaximum(fhGenOmegaEta->GetMaximum()); | |
4590 | else if(fhGenEleEta->GetMaximum() >= fhGenPi0Eta->GetMaximum() && fhGenEleEta->GetMaximum() >= fhGenEtaEta->GetMaximum() && | |
4591 | fhGenEleEta->GetMaximum() >= fhGenOmegaEta->GetMaximum() && fhGenEleEta->GetMaximum() >= fhGenGamEta->GetMaximum()) | |
4592 | haxiseta->SetMaximum(fhGenEleEta->GetMaximum()); | |
4593 | haxiseta->SetMinimum(100); | |
4594 | haxiseta->Draw("axis"); | |
4595 | fhGenPi0Eta->Draw("same"); | |
4596 | fhGenGamEta->Draw("same"); | |
4597 | fhGenEtaEta->Draw("same"); | |
4598 | fhGenOmegaEta->Draw("same"); | |
4599 | fhGenEleEta->Draw("same"); | |
4600 | ||
4601 | ||
4602 | c10->cd(3) ; | |
4603 | gPad->SetLogy(); | |
4604 | TH1F * haxisphi = (TH1F*) fhGenPi0Phi->Clone(Form("%s_axisphi",fhGenPi0Phi->GetName())); | |
4605 | haxisphi->SetTitle("Generated Particles #phi, |#eta| < 1"); | |
4606 | fhGenPi0Phi->SetLineColor(1); | |
4607 | fhGenGamPhi->SetLineColor(4); | |
4608 | fhGenEtaPhi->SetLineColor(2); | |
4609 | fhGenOmegaPhi->SetLineColor(7); | |
4610 | fhGenElePhi->SetLineColor(6); | |
a6f26052 | 4611 | //Select the maximum of the histogram to show all lines. |
c8fe2783 | 4612 | if(fhGenPi0Phi->GetMaximum() >= fhGenGamPhi->GetMaximum() && fhGenPi0Phi->GetMaximum() >= fhGenEtaPhi->GetMaximum() && |
4613 | fhGenPi0Phi->GetMaximum() >= fhGenOmegaPhi->GetMaximum() && fhGenPi0Phi->GetMaximum() >= fhGenElePhi->GetMaximum()) | |
4614 | haxisphi->SetMaximum(fhGenPi0Phi->GetMaximum()); | |
4615 | else if(fhGenGamPhi->GetMaximum() >= fhGenPi0Phi->GetMaximum() && fhGenGamPhi->GetMaximum() >= fhGenEtaPhi->GetMaximum() && | |
4616 | fhGenGamPhi->GetMaximum() >= fhGenOmegaPhi->GetMaximum() && fhGenGamPhi->GetMaximum() >= fhGenElePhi->GetMaximum()) | |
4617 | haxisphi->SetMaximum(fhGenGamPhi->GetMaximum()); | |
4618 | else if(fhGenEtaPhi->GetMaximum() >= fhGenPi0Phi->GetMaximum() && fhGenEtaPhi->GetMaximum() >= fhGenGamPhi->GetMaximum() && | |
4619 | fhGenEtaPhi->GetMaximum() >= fhGenOmegaPhi->GetMaximum() && fhGenEtaPhi->GetMaximum() >= fhGenElePhi->GetMaximum()) | |
4620 | haxisphi->SetMaximum(fhGenEtaPhi->GetMaximum()); | |
4621 | else if(fhGenOmegaPhi->GetMaximum() >= fhGenPi0Phi->GetMaximum() && fhGenOmegaPhi->GetMaximum() >= fhGenEtaPhi->GetMaximum() && | |
4622 | fhGenOmegaPhi->GetMaximum() >= fhGenGamPhi->GetMaximum() && fhGenOmegaPhi->GetMaximum() >= fhGenElePhi->GetMaximum()) | |
4623 | haxisphi->SetMaximum(fhGenOmegaPhi->GetMaximum()); | |
4624 | else if(fhGenElePhi->GetMaximum() >= fhGenPi0Phi->GetMaximum() && fhGenElePhi->GetMaximum() >= fhGenEtaPhi->GetMaximum() && | |
4625 | fhGenElePhi->GetMaximum() >= fhGenOmegaPhi->GetMaximum() && fhGenElePhi->GetMaximum() >= fhGenGamPhi->GetMaximum()) | |
4626 | haxisphi->SetMaximum(fhGenElePhi->GetMaximum()); | |
4627 | haxisphi->SetMinimum(100); | |
4628 | haxisphi->Draw("axis"); | |
4629 | fhGenPi0Phi->Draw("same"); | |
4630 | fhGenGamPhi->Draw("same"); | |
4631 | fhGenEtaPhi->Draw("same"); | |
4632 | fhGenOmegaPhi->Draw("same"); | |
4633 | fhGenElePhi->Draw("same"); | |
4634 | ||
4635 | sprintf(name,"QA_%s_GeneratedDistributions.eps",fCalorimeter.Data()); | |
4636 | c10->Print(name); printf("Plot: %s\n",name); | |
4637 | ||
4638 | ||
a6f26052 | 4639 | //Reconstructed clusters depending on its original particle. |
4640 | //printf("c1\n"); | |
c8fe2783 | 4641 | sprintf(cname,"QA_%s_recgenid",fCalorimeter.Data()); |
4642 | TCanvas * c11 = new TCanvas(cname, "Reconstructed particles, function of their original particle ID", 400, 400) ; | |
4643 | c11->Divide(2, 2); | |
4644 | ||
4645 | ||
4646 | c11->cd(1) ; | |
4647 | gPad->SetLogy(); | |
4648 | TH1F * hGamE = (TH1F*) fhGamE->ProjectionX(Form("%s_px",fhGamE->GetName()),-1,-1); | |
4649 | TH1F * hPi0E = (TH1F*) fhPi0E->ProjectionX(Form("%s_px",fhPi0E->GetName()),-1,-1); | |
4650 | TH1F * hEleE = (TH1F*) fhEleE->ProjectionX(Form("%s_px",fhEleE->GetName()),-1,-1); | |
4651 | TH1F * hNeHadE = (TH1F*) fhNeHadE->ProjectionX(Form("%s_px",fhNeHadE->GetName()),-1,-1); | |
4652 | TH1F * hChHadE = (TH1F*) fhChHadE->ProjectionX(Form("%s_px",fhChHadE->GetName()),-1,-1); | |
4653 | TH1F * haxisE = (TH1F*) hPi0E->Clone(Form("%s_axisE",fhPi0E->GetName())); | |
4654 | haxisE->SetTitle("Reconstructed particles E, function of their original particle ID"); | |
4655 | hPi0E->SetLineColor(1); | |
4656 | hGamE->SetLineColor(4); | |
4657 | hNeHadE->SetLineColor(2); | |
4658 | hChHadE->SetLineColor(7); | |
4659 | hEleE->SetLineColor(6); | |
4660 | ||
a6f26052 | 4661 | //Select the maximum of the histogram to show all lines. |
c8fe2783 | 4662 | if(hPi0E->GetMaximum() >= hGamE->GetMaximum() && hPi0E->GetMaximum() >= hNeHadE->GetMaximum() && |
4663 | hPi0E->GetMaximum() >= hChHadE->GetMaximum() && hPi0E->GetMaximum() >= hEleE->GetMaximum()) | |
4664 | haxisE->SetMaximum(hPi0E->GetMaximum()); | |
4665 | else if(hGamE->GetMaximum() >= hPi0E->GetMaximum() && hGamE->GetMaximum() >= hNeHadE->GetMaximum() && | |
4666 | hGamE->GetMaximum() >= hChHadE->GetMaximum() && hGamE->GetMaximum() >= hEleE->GetMaximum()) | |
4667 | haxisE->SetMaximum(hGamE->GetMaximum()); | |
4668 | else if(hNeHadE->GetMaximum() >= hPi0E->GetMaximum() && hNeHadE->GetMaximum() >= hGamE->GetMaximum() && | |
4669 | hNeHadE->GetMaximum() >= hChHadE->GetMaximum() && hNeHadE->GetMaximum() >= hEleE->GetMaximum()) | |
4670 | haxisE->SetMaximum(hNeHadE->GetMaximum()); | |
4671 | else if(hChHadE->GetMaximum() >= hPi0E->GetMaximum() && hChHadE->GetMaximum() >= hNeHadE->GetMaximum() && | |
4672 | hChHadE->GetMaximum() >= hGamE->GetMaximum() && hChHadE->GetMaximum() >= hEleE->GetMaximum()) | |
4673 | haxisE->SetMaximum(hChHadE->GetMaximum()); | |
4674 | else if(hEleE->GetMaximum() >= hPi0E->GetMaximum() && hEleE->GetMaximum() >= hNeHadE->GetMaximum() && | |
4675 | hEleE->GetMaximum() >= hChHadE->GetMaximum() && hEleE->GetMaximum() >= hGamE->GetMaximum()) | |
4676 | haxisE->SetMaximum(hEleE->GetMaximum()); | |
4677 | haxisE->SetXTitle("E (GeV)"); | |
4678 | haxisE->SetMinimum(1); | |
4679 | haxisE->Draw("axis"); | |
4680 | hPi0E->Draw("same"); | |
4681 | hGamE->Draw("same"); | |
4682 | hNeHadE->Draw("same"); | |
4683 | hChHadE->Draw("same"); | |
4684 | hEleE->Draw("same"); | |
4685 | ||
4686 | TLegend pLegend2(0.8,0.65,0.95,0.93); | |
4687 | pLegend2.SetTextSize(0.06); | |
4688 | pLegend2.AddEntry(hPi0E," #pi^{0}","L"); | |
4689 | pLegend2.AddEntry(hGamE," #gamma","L"); | |
4690 | pLegend2.AddEntry(hEleE," e^{#pm}","L"); | |
4691 | pLegend2.AddEntry(hChHadE," h^{#pm}","L"); | |
4692 | pLegend2.AddEntry(hNeHadE," h^{0}","L"); | |
4693 | pLegend2.SetFillColor(10); | |
4694 | pLegend2.SetBorderSize(1); | |
4695 | pLegend2.Draw(); | |
4696 | ||
4697 | ||
4698 | c11->cd(2) ; | |
4699 | gPad->SetLogy(); | |
a6f26052 | 4700 | //printf("%s, %s, %s, %s, %s\n",fhGamPt->GetName(),fhPi0Pt->GetName(),fhElePt->GetName(),fhNeHadPt->GetName(), fhChHadPt->GetName()); |
c8fe2783 | 4701 | TH1F * hGamPt = (TH1F*) fhGamPt->ProjectionX(Form("%s_px",fhGamPt->GetName()),-1,-1); |
4702 | TH1F * hPi0Pt = (TH1F*) fhPi0Pt->ProjectionX(Form("%s_px",fhPi0Pt->GetName()),-1,-1); | |
4703 | TH1F * hElePt = (TH1F*) fhElePt->ProjectionX(Form("%s_px",fhElePt->GetName()),-1,-1); | |
4704 | TH1F * hNeHadPt = (TH1F*) fhNeHadPt->ProjectionX(Form("%s_px",fhNeHadPt->GetName()),-1,-1); | |
4705 | TH1F * hChHadPt = (TH1F*) fhChHadPt->ProjectionX(Form("%s_px",fhChHadPt->GetName()),-1,-1); | |
4706 | haxispt = (TH1F*) hPi0Pt->Clone(Form("%s_axisPt",fhPi0Pt->GetName())); | |
4707 | haxispt->SetTitle("Reconstructed particles p_{T}, function of their original particle ID"); | |
4708 | hPi0Pt->SetLineColor(1); | |
4709 | hGamPt->SetLineColor(4); | |
4710 | hNeHadPt->SetLineColor(2); | |
4711 | hChHadPt->SetLineColor(7); | |
4712 | hElePt->SetLineColor(6); | |
4713 | ||
a6f26052 | 4714 | //Select the maximum of the histogram to show all lines. |
c8fe2783 | 4715 | if(hPi0Pt->GetMaximum() >= hGamPt->GetMaximum() && hPi0Pt->GetMaximum() >= hNeHadPt->GetMaximum() && |
4716 | hPi0Pt->GetMaximum() >= hChHadPt->GetMaximum() && hPi0Pt->GetMaximum() >= hElePt->GetMaximum()) | |
4717 | haxispt->SetMaximum(hPi0Pt->GetMaximum()); | |
4718 | else if(hGamPt->GetMaximum() >= hPi0Pt->GetMaximum() && hGamPt->GetMaximum() >= hNeHadPt->GetMaximum() && | |
4719 | hGamPt->GetMaximum() >= hChHadPt->GetMaximum() && hGamPt->GetMaximum() >= hElePt->GetMaximum()) | |
4720 | haxispt->SetMaximum(hGamPt->GetMaximum()); | |
4721 | else if(hNeHadPt->GetMaximum() >= hPi0Pt->GetMaximum() && hNeHadPt->GetMaximum() >= hGamPt->GetMaximum() && | |
4722 | hNeHadPt->GetMaximum() >= hChHadPt->GetMaximum() && hNeHadPt->GetMaximum() >= hElePt->GetMaximum()) | |
4723 | haxispt->SetMaximum(hNeHadPt->GetMaximum()); | |
4724 | else if(hChHadPt->GetMaximum() >= hPi0Pt->GetMaximum() && hChHadPt->GetMaximum() >= hNeHadPt->GetMaximum() && | |
4725 | hChHadPt->GetMaximum() >= hGamPt->GetMaximum() && hChHadPt->GetMaximum() >= hElePt->GetMaximum()) | |
4726 | haxispt->SetMaximum(hChHadPt->GetMaximum()); | |
4727 | else if(hElePt->GetMaximum() >= hPi0Pt->GetMaximum() && hElePt->GetMaximum() >= hNeHadPt->GetMaximum() && | |
4728 | hElePt->GetMaximum() >= hChHadPt->GetMaximum() && hElePt->GetMaximum() >= hGamPt->GetMaximum()) | |
4729 | haxispt->SetMaximum(hElePt->GetMaximum()); | |
4730 | haxispt->SetXTitle("p_{T} (GeV/c)"); | |
4731 | haxispt->SetMinimum(1); | |
4732 | haxispt->Draw("axis"); | |
4733 | hPi0Pt->Draw("same"); | |
4734 | hGamPt->Draw("same"); | |
4735 | hNeHadPt->Draw("same"); | |
4736 | hChHadPt->Draw("same"); | |
4737 | hElePt->Draw("same"); | |
4738 | ||
4739 | c11->cd(3) ; | |
4740 | gPad->SetLogy(); | |
4741 | ||
4742 | TH1F * hGamEta = (TH1F*) fhGamEta->ProjectionX(Form("%s_px",fhGamEta->GetName()),-1,-1); | |
4743 | TH1F * hPi0Eta = (TH1F*) fhPi0Eta->ProjectionX(Form("%s_px",fhPi0Eta->GetName()),-1,-1); | |
4744 | TH1F * hEleEta = (TH1F*) fhEleEta->ProjectionX(Form("%s_px",fhEleEta->GetName()),-1,-1); | |
4745 | TH1F * hNeHadEta = (TH1F*) fhNeHadEta->ProjectionX(Form("%s_px",fhNeHadEta->GetName()),-1,-1); | |
4746 | TH1F * hChHadEta = (TH1F*) fhChHadEta->ProjectionX(Form("%s_px",fhChHadEta->GetName()),-1,-1); | |
4747 | haxiseta = (TH1F*) hPi0Eta->Clone(Form("%s_axisEta",fhPi0Eta->GetName())); | |
4748 | haxiseta->SetTitle("Reconstructed particles #eta, function of their original particle ID"); | |
4749 | hPi0Eta->SetLineColor(1); | |
4750 | hGamEta->SetLineColor(4); | |
4751 | hNeHadEta->SetLineColor(2); | |
4752 | hChHadEta->SetLineColor(7); | |
4753 | hEleEta->SetLineColor(6); | |
a6f26052 | 4754 | //Select the maximum of the histogram to show all lines. |
c8fe2783 | 4755 | if(hPi0Eta->GetMaximum() >= hGamEta->GetMaximum() && hPi0Eta->GetMaximum() >= hNeHadEta->GetMaximum() && |
4756 | hPi0Eta->GetMaximum() >= hChHadEta->GetMaximum() && hPi0Eta->GetMaximum() >= hEleEta->GetMaximum()) | |
4757 | haxiseta->SetMaximum(hPi0Eta->GetMaximum()); | |
4758 | else if(hGamEta->GetMaximum() >= hPi0Eta->GetMaximum() && hGamEta->GetMaximum() >= hNeHadEta->GetMaximum() && | |
4759 | hGamEta->GetMaximum() >= hChHadEta->GetMaximum() && hGamEta->GetMaximum() >= hEleEta->GetMaximum()) | |
4760 | haxiseta->SetMaximum(hGamEta->GetMaximum()); | |
4761 | else if(hNeHadEta->GetMaximum() >= hPi0Eta->GetMaximum() && hNeHadEta->GetMaximum() >= hGamEta->GetMaximum() && | |
4762 | hNeHadEta->GetMaximum() >= hChHadEta->GetMaximum() && hNeHadEta->GetMaximum() >= hEleEta->GetMaximum()) | |
4763 | haxiseta->SetMaximum(hNeHadEta->GetMaximum()); | |
4764 | else if(hChHadEta->GetMaximum() >= hPi0Eta->GetMaximum() && hChHadEta->GetMaximum() >= hNeHadEta->GetMaximum() && | |
4765 | hChHadEta->GetMaximum() >= hGamEta->GetMaximum() && hChHadEta->GetMaximum() >= hEleEta->GetMaximum()) | |
4766 | haxiseta->SetMaximum(hChHadEta->GetMaximum()); | |
4767 | else if(hEleEta->GetMaximum() >= hPi0Eta->GetMaximum() && hEleEta->GetMaximum() >= hNeHadEta->GetMaximum() && | |
4768 | hEleEta->GetMaximum() >= hChHadEta->GetMaximum() && hEleEta->GetMaximum() >= hGamEta->GetMaximum()) | |
4769 | haxiseta->SetMaximum(hEleEta->GetMaximum()); | |
4770 | ||
4771 | haxiseta->SetXTitle("#eta"); | |
4772 | haxiseta->Draw("axis"); | |
4773 | hPi0Eta->Draw("same"); | |
4774 | hGamEta->Draw("same"); | |
4775 | hNeHadEta->Draw("same"); | |
4776 | hChHadEta->Draw("same"); | |
4777 | hEleEta->Draw("same"); | |
4778 | ||
4779 | ||
4780 | c11->cd(4) ; | |
4781 | gPad->SetLogy(); | |
4782 | TH1F * hGamPhi = (TH1F*) fhGamPhi->ProjectionX(Form("%s_px",fhGamPhi->GetName()),-1,-1); | |
4783 | TH1F * hPi0Phi = (TH1F*) fhPi0Phi->ProjectionX(Form("%s_px",fhPi0Phi->GetName()),-1,-1); | |
4784 | TH1F * hElePhi = (TH1F*) fhElePhi->ProjectionX(Form("%s_px",fhElePhi->GetName()),-1,-1); | |
4785 | TH1F * hNeHadPhi = (TH1F*) fhNeHadPhi->ProjectionX(Form("%s_px",fhNeHadPhi->GetName()),-1,-1); | |
4786 | TH1F * hChHadPhi = (TH1F*) fhChHadPhi->ProjectionX(Form("%s_px",fhChHadPhi->GetName()),-1,-1); | |
4787 | haxisphi = (TH1F*) hPi0Phi->Clone(Form("%s_axisPhi",fhPi0Phi->GetName())); | |
4788 | haxisphi->SetTitle("Reconstructed particles #phi, function of their original particle ID"); | |
4789 | ||
4790 | hPi0Phi->SetLineColor(1); | |
4791 | hGamPhi->SetLineColor(4); | |
4792 | hNeHadPhi->SetLineColor(2); | |
4793 | hChHadPhi->SetLineColor(7); | |
4794 | hElePhi->SetLineColor(6); | |
a6f26052 | 4795 | //Select the maximum of the histogram to show all lines. |
c8fe2783 | 4796 | if(hPi0Phi->GetMaximum() >= hGamPhi->GetMaximum() && hPi0Phi->GetMaximum() >= hNeHadPhi->GetMaximum() && |
4797 | hPi0Phi->GetMaximum() >= hChHadPhi->GetMaximum() && hPi0Phi->GetMaximum() >= hElePhi->GetMaximum()) | |
4798 | haxisphi->SetMaximum(hPi0Phi->GetMaximum()); | |
4799 | else if(hGamPhi->GetMaximum() >= hPi0Phi->GetMaximum() && hGamPhi->GetMaximum() >= hNeHadPhi->GetMaximum() && | |
4800 | hGamPhi->GetMaximum() >= hChHadPhi->GetMaximum() && hGamPhi->GetMaximum() >= hElePhi->GetMaximum()) | |
4801 | haxisphi->SetMaximum(hGamPhi->GetMaximum()); | |
4802 | else if(hNeHadPhi->GetMaximum() >= hPi0Phi->GetMaximum() && hNeHadPhi->GetMaximum() >= hGamPhi->GetMaximum() && | |
4803 | hNeHadPhi->GetMaximum() >= hChHadPhi->GetMaximum() && hNeHadPhi->GetMaximum() >= hElePhi->GetMaximum()) | |
4804 | haxisphi->SetMaximum(hNeHadPhi->GetMaximum()); | |
4805 | else if(hChHadPhi->GetMaximum() >= hPi0Phi->GetMaximum() && hChHadPhi->GetMaximum() >= hNeHadPhi->GetMaximum() && | |
4806 | hChHadPhi->GetMaximum() >= hGamPhi->GetMaximum() && hChHadPhi->GetMaximum() >= hElePhi->GetMaximum()) | |
4807 | haxisphi->SetMaximum(hChHadPhi->GetMaximum()); | |
4808 | else if(hElePhi->GetMaximum() >= hPi0Phi->GetMaximum() && hElePhi->GetMaximum() >= hNeHadPhi->GetMaximum() && | |
4809 | hElePhi->GetMaximum() >= hChHadPhi->GetMaximum() && hElePhi->GetMaximum() >= hGamPhi->GetMaximum()) | |
4810 | haxisphi->SetMaximum(hElePhi->GetMaximum()); | |
4811 | haxisphi->SetXTitle("#phi (rad)"); | |
4812 | haxisphi->Draw("axis"); | |
4813 | hPi0Phi->Draw("same"); | |
4814 | hGamPhi->Draw("same"); | |
4815 | hNeHadPhi->Draw("same"); | |
4816 | hChHadPhi->Draw("same"); | |
4817 | hElePhi->Draw("same"); | |
4818 | ||
4819 | sprintf(name,"QA_%s_RecDistributionsGenID.eps",fCalorimeter.Data()); | |
4820 | c11->Print(name); printf("Plot: %s\n",name); | |
4821 | ||
4822 | ||
a6f26052 | 4823 | //Ratio reconstructed clusters / generated particles in acceptance, for different particle ID |
4824 | //printf("c1\n"); | |
c8fe2783 | 4825 | |
4826 | TH1F * hPi0EClone = (TH1F*) hPi0E ->Clone(Form("%s_Clone",fhPi0E->GetName())); | |
4827 | TH1F * hGamEClone = (TH1F*) hGamE ->Clone(Form("%s_Clone",fhGamE->GetName())); | |
4828 | TH1F * hPi0PtClone = (TH1F*) hPi0Pt ->Clone(Form("%s_Clone",fhPi0Pt->GetName())); | |
4829 | TH1F * hGamPtClone = (TH1F*) hGamPt ->Clone(Form("%s_Clone",fhGamPt->GetName())); | |
4830 | TH1F * hPi0EtaClone = (TH1F*) hPi0Eta->Clone(Form("%s_Clone",fhPi0Eta->GetName())); | |
4831 | TH1F * hGamEtaClone = (TH1F*) hGamEta->Clone(Form("%s_Clone",fhGamEta->GetName())); | |
4832 | TH1F * hPi0PhiClone = (TH1F*) hPi0Phi->Clone(Form("%s_Clone",fhPi0Phi->GetName())); | |
4833 | TH1F * hGamPhiClone = (TH1F*) hGamPhi->Clone(Form("%s_Clone",fhGamPhi->GetName())); | |
4834 | ||
4835 | sprintf(cname,"QA_%s_recgenidratio",fCalorimeter.Data()); | |
4836 | TCanvas * c12 = new TCanvas(cname, "Ratio reconstructed clusters / generated particles in acceptance, for different particle ID", 400, 400) ; | |
4837 | c12->Divide(2, 2); | |
4838 | ||
4839 | c12->cd(1) ; | |
4840 | gPad->SetLogy(); | |
4841 | haxisE->SetTitle("Ratio reconstructed clusters / generated particles in acceptance, for different particle ID"); | |
4842 | hPi0EClone->Divide(fhGenPi0AccE); | |
4843 | hGamEClone->Divide(fhGenGamAccE); | |
4844 | haxisE->SetMaximum(5); | |
4845 | haxisE->SetMinimum(1e-2); | |
4846 | haxisE->SetXTitle("E (GeV)"); | |
4847 | haxisE->SetYTitle("ratio = rec/gen"); | |
4848 | haxisE->Draw("axis"); | |
4849 | hPi0E->Draw("same"); | |
4850 | hGamE->Draw("same"); | |
4851 | ||
4852 | TLegend pLegend3(0.75,0.2,0.9,0.4); | |
4853 | pLegend3.SetTextSize(0.06); | |
4854 | pLegend3.AddEntry(hPi0EClone," #pi^{0}","L"); | |
4855 | pLegend3.AddEntry(hGamEClone," #gamma","L"); | |
4856 | pLegend3.SetFillColor(10); | |
4857 | pLegend3.SetBorderSize(1); | |
4858 | pLegend3.Draw(); | |
4859 | ||
4860 | c12->cd(2) ; | |
4861 | gPad->SetLogy(); | |
4862 | haxispt->SetTitle("Ratio reconstructed clusters / generated particles in acceptance, for different particle ID"); | |
4863 | hPi0PtClone->Divide(fhGenPi0AccPt); | |
4864 | hGamPtClone->Divide(fhGenGamAccPt); | |
4865 | haxispt->SetMaximum(5); | |
4866 | haxispt->SetMinimum(1e-2); | |
4867 | haxispt->SetXTitle("p_{T} (GeV/c)"); | |
4868 | haxispt->SetYTitle("ratio = rec/gen"); | |
4869 | haxispt->Draw("axis"); | |
4870 | hPi0PtClone->Draw("same"); | |
4871 | hGamPtClone->Draw("same"); | |
4872 | ||
4873 | c12->cd(3) ; | |
4874 | gPad->SetLogy(); | |
4875 | ||
4876 | haxiseta->SetTitle("Ratio reconstructed clusters / generated particles in acceptance, for different particle ID"); | |
4877 | hPi0EtaClone->Divide(fhGenPi0AccEta); | |
4878 | hGamEtaClone->Divide(fhGenGamAccEta); | |
4879 | haxiseta->SetMaximum(1.2); | |
4880 | haxiseta->SetMinimum(1e-2); | |
4881 | haxiseta->SetYTitle("ratio = rec/gen"); | |
4882 | haxiseta->SetXTitle("#eta"); | |
4883 | haxiseta->Draw("axis"); | |
4884 | hPi0EtaClone->Draw("same"); | |
4885 | hGamEtaClone->Draw("same"); | |
4886 | ||
4887 | ||
4888 | c12->cd(4) ; | |
4889 | gPad->SetLogy(); | |
4890 | haxisphi->SetTitle("Ratio reconstructed clusters / generated particles in acceptance, for different particle ID"); | |
4891 | hPi0PhiClone->Divide(fhGenPi0AccPhi); | |
4892 | hGamPhiClone->Divide(fhGenGamAccPhi); | |
4893 | haxisphi->SetYTitle("ratio = rec/gen"); | |
4894 | haxisphi->SetXTitle("#phi (rad)"); | |
4895 | haxisphi->SetMaximum(1.2); | |
4896 | haxisphi->SetMinimum(1e-2); | |
4897 | haxisphi->Draw("axis"); | |
4898 | hPi0PhiClone->Draw("same"); | |
4899 | hGamPhiClone->Draw("same"); | |
4900 | ||
4901 | sprintf(name,"QA_%s_EfficiencyGenID.eps",fCalorimeter.Data()); | |
4902 | c12->Print(name); printf("Plot: %s\n",name); | |
4903 | ||
4904 | ||
4905 | ||
a6f26052 | 4906 | //Reconstructed distributions |
4907 | //printf("c1\n"); | |
c8fe2783 | 4908 | sprintf(cname,"QA_%s_vertex",fCalorimeter.Data()); |
4909 | TCanvas * c13 = new TCanvas(cname, "Particle vertex", 400, 400) ; | |
4910 | c13->Divide(2, 2); | |
4911 | ||
4912 | c13->cd(1) ; | |
a6f26052 | 4913 | //gPad->SetLogy(); |
c8fe2783 | 4914 | fhEMVxyz->SetTitleOffset(1.6,"Y"); |
4915 | fhEMVxyz->Draw(); | |
4916 | ||
4917 | c13->cd(2) ; | |
a6f26052 | 4918 | //gPad->SetLogy(); |
c8fe2783 | 4919 | fhHaVxyz->SetTitleOffset(1.6,"Y"); |
4920 | fhHaVxyz->Draw(); | |
4921 | ||
4922 | c13->cd(3) ; | |
4923 | gPad->SetLogy(); | |
4924 | TH1F * hEMR = (TH1F*) fhEMR->ProjectionY(Form("%s_py",fhEMR->GetName()),-1,-1); | |
4925 | hEMR->SetLineColor(4); | |
4926 | hEMR->Draw(); | |
4927 | ||
4928 | c13->cd(4) ; | |
4929 | gPad->SetLogy(); | |
4930 | TH1F * hHaR = (TH1F*) fhHaR->ProjectionY(Form("%s_py",fhHaR->GetName()),-1,-1); | |
4931 | hHaR->SetLineColor(4); | |
4932 | hHaR->Draw(); | |
4933 | ||
4934 | ||
4935 | sprintf(name,"QA_%s_ParticleVertex.eps",fCalorimeter.Data()); | |
4936 | c13->Print(name); printf("Plot: %s\n",name); | |
4937 | ||
4938 | ||
a6f26052 | 4939 | //Track-matching distributions |
4940 | if(fFillAllTH12){ | |
c8fe2783 | 4941 | //Reconstructed distributions, matched with tracks, generated particle dependence |
4942 | //printf("c2\n"); | |
a6f26052 | 4943 | sprintf(cname,"QA_%s_rectrackmatchGenID",fCalorimeter.Data()); |
4944 | TCanvas * c22ch = new TCanvas(cname, "Reconstructed distributions, matched with tracks, for different particle ID", 400, 400) ; | |
4945 | c22ch->Divide(2, 2); | |
4946 | ||
4947 | c22ch->cd(1) ; | |
4948 | ||
4949 | TH1F * hGamECharged = (TH1F*) fhGamECharged->ProjectionX(Form("%s_px",fhGamECharged->GetName()),-1,-1); | |
4950 | TH1F * hPi0ECharged = (TH1F*) fhPi0ECharged->ProjectionX(Form("%s_px",fhPi0ECharged->GetName()),-1,-1); | |
4951 | TH1F * hEleECharged = (TH1F*) fhEleECharged->ProjectionX(Form("%s_px",fhEleECharged->GetName()),-1,-1); | |
4952 | TH1F * hNeHadECharged = (TH1F*) fhNeHadECharged->ProjectionX(Form("%s_px",fhNeHadECharged->GetName()),-1,-1); | |
4953 | TH1F * hChHadECharged = (TH1F*) fhChHadECharged->ProjectionX(Form("%s_px",fhChHadECharged->GetName()),-1,-1); | |
4954 | hPi0ECharged->SetLineColor(1); | |
4955 | hGamECharged->SetLineColor(4); | |
4956 | hNeHadECharged->SetLineColor(2); | |
4957 | hChHadECharged->SetLineColor(7); | |
4958 | hEleECharged->SetLineColor(6); | |
4959 | gPad->SetLogy(); | |
4960 | fhECharged->SetLineColor(3); | |
4961 | fhECharged->SetMinimum(0.5); | |
4962 | fhECharged->Draw(); | |
4963 | hPi0ECharged->Draw("same"); | |
4964 | hGamECharged->Draw("same"); | |
4965 | hNeHadECharged->Draw("same"); | |
4966 | hChHadECharged->Draw("same"); | |
4967 | hEleECharged->Draw("same"); | |
4968 | TLegend pLegend22(0.75,0.45,0.9,0.8); | |
4969 | pLegend22.SetTextSize(0.06); | |
4970 | pLegend22.AddEntry(fhECharged,"all","L"); | |
4971 | pLegend22.AddEntry(hPi0ECharged,"#pi^{0}","L"); | |
4972 | pLegend22.AddEntry(hGamECharged,"#gamma","L"); | |
4973 | pLegend22.AddEntry(hEleECharged,"e^{#pm}","L"); | |
4974 | pLegend22.AddEntry(hChHadECharged,"h^{#pm}","L"); | |
4975 | pLegend22.AddEntry(hNeHadECharged,"h^{0}","L"); | |
4976 | pLegend22.SetFillColor(10); | |
4977 | pLegend22.SetBorderSize(1); | |
4978 | pLegend22.Draw(); | |
4979 | ||
4980 | c22ch->cd(2) ; | |
4981 | ||
4982 | TH1F * hGamPtCharged = (TH1F*) fhGamPtCharged->ProjectionX(Form("%s_px",fhGamPtCharged->GetName()),-1,-1); | |
4983 | TH1F * hPi0PtCharged = (TH1F*) fhPi0PtCharged->ProjectionX(Form("%s_px",fhPi0PtCharged->GetName()),-1,-1); | |
4984 | TH1F * hElePtCharged = (TH1F*) fhElePtCharged->ProjectionX(Form("%s_px",fhElePtCharged->GetName()),-1,-1); | |
4985 | TH1F * hNeHadPtCharged = (TH1F*) fhNeHadPtCharged->ProjectionX(Form("%s_px",fhNeHadPtCharged->GetName()),-1,-1); | |
4986 | TH1F * hChHadPtCharged = (TH1F*) fhChHadPtCharged->ProjectionX(Form("%s_px",fhChHadPtCharged->GetName()),-1,-1); | |
4987 | hPi0PtCharged->SetLineColor(1); | |
4988 | hGamPtCharged->SetLineColor(4); | |
4989 | hNeHadPtCharged->SetLineColor(2); | |
4990 | hChHadPtCharged->SetLineColor(7); | |
4991 | hElePtCharged->SetLineColor(6); | |
4992 | gPad->SetLogy(); | |
4993 | fhPtCharged->SetLineColor(3); | |
4994 | fhPtCharged->SetMinimum(0.5); | |
4995 | fhPtCharged->Draw(); | |
4996 | hPi0PtCharged->Draw("same"); | |
4997 | hGamPtCharged->Draw("same"); | |
4998 | hNeHadPtCharged->Draw("same"); | |
4999 | hChHadPtCharged->Draw("same"); | |
5000 | hElePtCharged->Draw("same"); | |
5001 | ||
5002 | c22ch->cd(4) ; | |
5003 | ||
5004 | TH1F * hGamEtaCharged = (TH1F*) fhGamEtaCharged->ProjectionX(Form("%s_px",fhGamEtaCharged->GetName()),-1,-1); | |
5005 | TH1F * hPi0EtaCharged = (TH1F*) fhPi0EtaCharged->ProjectionX(Form("%s_px",fhPi0EtaCharged->GetName()),-1,-1); | |
5006 | TH1F * hEleEtaCharged = (TH1F*) fhEleEtaCharged->ProjectionX(Form("%s_px",fhEleEtaCharged->GetName()),-1,-1); | |
5007 | TH1F * hNeHadEtaCharged = (TH1F*) fhNeHadEtaCharged->ProjectionX(Form("%s_px",fhNeHadEtaCharged->GetName()),-1,-1); | |
5008 | TH1F * hChHadEtaCharged = (TH1F*) fhChHadEtaCharged->ProjectionX(Form("%s_px",fhChHadEtaCharged->GetName()),-1,-1); | |
5009 | hPi0EtaCharged->SetLineColor(1); | |
5010 | hGamEtaCharged->SetLineColor(4); | |
5011 | hNeHadEtaCharged->SetLineColor(2); | |
5012 | hChHadEtaCharged->SetLineColor(7); | |
5013 | hEleEtaCharged->SetLineColor(6); | |
5014 | gPad->SetLogy(); | |
5015 | fhEtaCharged->SetLineColor(3); | |
5016 | fhEtaCharged->SetMinimum(0.5); | |
5017 | fhEtaCharged->Draw(); | |
5018 | hPi0EtaCharged->Draw("same"); | |
5019 | hGamEtaCharged->Draw("same"); | |
5020 | hNeHadEtaCharged->Draw("same"); | |
5021 | hChHadEtaCharged->Draw("same"); | |
5022 | hEleEtaCharged->Draw("same"); | |
5023 | ||
5024 | c22ch->cd(3) ; | |
5025 | ||
5026 | TH1F * hGamPhiCharged = (TH1F*) fhGamPhiCharged->ProjectionX(Form("%s_px",fhGamPhiCharged->GetName()),-1,-1); | |
5027 | TH1F * hPi0PhiCharged = (TH1F*) fhPi0PhiCharged->ProjectionX(Form("%s_px",fhPi0PhiCharged->GetName()),-1,-1); | |
5028 | TH1F * hElePhiCharged = (TH1F*) fhElePhiCharged->ProjectionX(Form("%s_px",fhElePhiCharged->GetName()),-1,-1); | |
5029 | TH1F * hNeHadPhiCharged = (TH1F*) fhNeHadPhiCharged->ProjectionX(Form("%s_px",fhNeHadPhiCharged->GetName()),-1,-1); | |
5030 | TH1F * hChHadPhiCharged = (TH1F*) fhChHadPhiCharged->ProjectionX(Form("%s_px",fhChHadPhiCharged->GetName()),-1,-1); | |
5031 | hPi0PhiCharged->SetLineColor(1); | |
5032 | hGamPhiCharged->SetLineColor(4); | |
5033 | hNeHadPhiCharged->SetLineColor(2); | |
5034 | hChHadPhiCharged->SetLineColor(7); | |
5035 | hElePhiCharged->SetLineColor(6); | |
5036 | gPad->SetLogy(); | |
5037 | fhPhiCharged->SetLineColor(3); | |
5038 | fhPhiCharged->SetMinimum(0.5); | |
5039 | fhPhiCharged->Draw(); | |
5040 | hPi0PhiCharged->Draw("same"); | |
5041 | hGamPhiCharged->Draw("same"); | |
5042 | hNeHadPhiCharged->Draw("same"); | |
5043 | hChHadPhiCharged->Draw("same"); | |
5044 | hElePhiCharged->Draw("same"); | |
5045 | ||
5046 | ||
5047 | sprintf(name,"QA_%s_ReconstructedDistributions_TrackMatchedGenID.eps",fCalorimeter.Data()); | |
5048 | c22ch->Print(name); printf("Plot: %s\n",name); | |
5049 | ||
5050 | TH1F * hGamEChargedClone = (TH1F*) hGamECharged->Clone(Form("%s_Clone",fhGamECharged->GetName())); | |
5051 | TH1F * hGamPtChargedClone = (TH1F*) hGamPtCharged->Clone(Form("%s_Clone",fhGamPtCharged->GetName())); | |
5052 | TH1F * hGamEtaChargedClone = (TH1F*) hGamEtaCharged->Clone(Form("%s_Clone",fhGamEtaCharged->GetName())); | |
5053 | TH1F * hGamPhiChargedClone = (TH1F*) hGamPhiCharged->Clone(Form("%s_Clone",fhGamPhiCharged->GetName())); | |
5054 | ||
5055 | TH1F * hPi0EChargedClone = (TH1F*) hPi0ECharged->Clone(Form("%s_Clone",fhPi0ECharged->GetName())); | |
5056 | TH1F * hPi0PtChargedClone = (TH1F*) hPi0PtCharged->Clone(Form("%s_Clone",fhPi0PtCharged->GetName())); | |
5057 | TH1F * hPi0EtaChargedClone = (TH1F*) hPi0EtaCharged->Clone(Form("%s_Clone",fhPi0EtaCharged->GetName())); | |
5058 | TH1F * hPi0PhiChargedClone = (TH1F*) hPi0PhiCharged->Clone(Form("%s_Clone",fhPi0PhiCharged->GetName())); | |
5059 | ||
5060 | TH1F * hEleEChargedClone = (TH1F*) hEleECharged->Clone(Form("%s_Clone",fhEleECharged->GetName())); | |
5061 | TH1F * hElePtChargedClone = (TH1F*) hElePtCharged->Clone(Form("%s_Clone",fhElePtCharged->GetName())); | |
5062 | TH1F * hEleEtaChargedClone = (TH1F*) hEleEtaCharged->Clone(Form("%s_Clone",fhEleEtaCharged->GetName())); | |
5063 | TH1F * hElePhiChargedClone = (TH1F*) hElePhiCharged->Clone(Form("%s_Clone",fhElePhiCharged->GetName())); | |
5064 | ||
5065 | TH1F * hNeHadEChargedClone = (TH1F*) hNeHadECharged->Clone(Form("%s_Clone",fhNeHadECharged->GetName())); | |
5066 | TH1F * hNeHadPtChargedClone = (TH1F*) hNeHadPtCharged->Clone(Form("%s_Clone",fhNeHadPtCharged->GetName())); | |
5067 | TH1F * hNeHadEtaChargedClone = (TH1F*) hNeHadEtaCharged->Clone(Form("%s_Clone",fhNeHadEtaCharged->GetName())); | |
5068 | TH1F * hNeHadPhiChargedClone = (TH1F*) hNeHadPhiCharged->Clone(Form("%s_Clone",fhNeHadPhiCharged->GetName())); | |
5069 | ||
5070 | TH1F * hChHadEChargedClone = (TH1F*) hChHadECharged->Clone(Form("%s_Clone",fhChHadECharged->GetName())); | |
5071 | TH1F * hChHadPtChargedClone = (TH1F*) hChHadPtCharged->Clone(Form("%s_Clone",fhChHadPtCharged->GetName())); | |
5072 | TH1F * hChHadEtaChargedClone = (TH1F*) hChHadEtaCharged->Clone(Form("%s_Clone",fhChHadEtaCharged->GetName())); | |
5073 | TH1F * hChHadPhiChargedClone = (TH1F*) hChHadPhiCharged->Clone(Form("%s_Clone",fhChHadPhiCharged->GetName())); | |
5074 | ||
c8fe2783 | 5075 | //Ratio: reconstructed track matched/ all reconstructed |
5076 | //printf("c3\n"); | |
a6f26052 | 5077 | sprintf(cname,"QA_%s_rectrackmatchratGenID",fCalorimeter.Data()); |
5078 | TCanvas * c3ch = new TCanvas(cname, "Ratio: reconstructed track matched/ all reconstructed, for different particle ID", 400, 400) ; | |
5079 | c3ch->Divide(2, 2); | |
5080 | ||
5081 | c3ch->cd(1) ; | |
5082 | hEChargedClone->SetMaximum(1.2); | |
5083 | hEChargedClone->SetMinimum(0.001); | |
5084 | hEChargedClone->SetLineColor(3); | |
5085 | hEChargedClone->SetYTitle("track matched / all"); | |
5086 | hPi0EChargedClone->Divide(hPi0E); | |
5087 | hGamEChargedClone->Divide(hGamE); | |
5088 | hEleEChargedClone->Divide(hEleE); | |
5089 | hNeHadEChargedClone->Divide(hNeHadE); | |
5090 | hChHadEChargedClone->Divide(hChHadE); | |
5091 | hEChargedClone->Draw(); | |
5092 | hPi0EChargedClone->Draw("same"); | |
5093 | hGamEChargedClone->Draw("same"); | |
5094 | hEleEChargedClone->Draw("same"); | |
5095 | hNeHadEChargedClone->Draw("same"); | |
5096 | hChHadEChargedClone->Draw("same"); | |
5097 | ||
5098 | TLegend pLegend3ch(0.75,0.45,0.9,0.8); | |
5099 | pLegend3ch.SetTextSize(0.06); | |
5100 | pLegend3ch.AddEntry(hEChargedClone,"all","L"); | |
5101 | pLegend3ch.AddEntry(hPi0EChargedClone,"#pi^{0}","L"); | |
5102 | pLegend3ch.AddEntry(hGamEChargedClone,"#gamma","L"); | |
5103 | pLegend3ch.AddEntry(hEleEChargedClone,"e^{#pm}","L"); | |
5104 | pLegend3ch.AddEntry(hChHadEChargedClone,"h^{#pm}","L"); | |
5105 | pLegend3ch.AddEntry(hNeHadEChargedClone,"h^{0}","L"); | |
5106 | pLegend3ch.SetFillColor(10); | |
5107 | pLegend3ch.SetBorderSize(1); | |
5108 | pLegend3ch.Draw(); | |
5109 | ||
5110 | c3ch->cd(2) ; | |
5111 | hPtChargedClone->SetMaximum(1.2); | |
5112 | hPtChargedClone->SetMinimum(0.001); | |
5113 | hPtChargedClone->SetLineColor(3); | |
5114 | hPtChargedClone->SetYTitle("track matched / all"); | |
5115 | hPi0PtChargedClone->Divide(hPi0Pt); | |
5116 | hGamPtChargedClone->Divide(hGamPt); | |
5117 | hElePtChargedClone->Divide(hElePt); | |
5118 | hNeHadPtChargedClone->Divide(hNeHadPt); | |
5119 | hChHadPtChargedClone->Divide(hChHadPt); | |
5120 | hPtChargedClone->Draw(); | |
5121 | hPi0PtChargedClone->Draw("same"); | |
5122 | hGamPtChargedClone->Draw("same"); | |
5123 | hElePtChargedClone->Draw("same"); | |
5124 | hNeHadPtChargedClone->Draw("same"); | |
5125 | hChHadPtChargedClone->Draw("same"); | |
5126 | ||
5127 | c3ch->cd(4) ; | |
5128 | hEtaChargedClone->SetMaximum(1.2); | |
5129 | hEtaChargedClone->SetMinimum(0.001); | |
5130 | hEtaChargedClone->SetLineColor(3); | |
5131 | hEtaChargedClone->SetYTitle("track matched / all"); | |
5132 | hPi0EtaChargedClone->Divide(hPi0Eta); | |
5133 | hGamEtaChargedClone->Divide(hGamEta); | |
5134 | hEleEtaChargedClone->Divide(hEleEta); | |
5135 | hNeHadEtaChargedClone->Divide(hNeHadEta); | |
5136 | hChHadEtaChargedClone->Divide(hChHadEta); | |
5137 | hEtaChargedClone->Draw(); | |
5138 | hPi0EtaChargedClone->Draw("same"); | |
5139 | hGamEtaChargedClone->Draw("same"); | |
5140 | hEleEtaChargedClone->Draw("same"); | |
5141 | hNeHadEtaChargedClone->Draw("same"); | |
5142 | hChHadEtaChargedClone->Draw("same"); | |
5143 | ||
5144 | c3ch->cd(3) ; | |
5145 | hPhiChargedClone->SetMaximum(1.2); | |
5146 | hPhiChargedClone->SetMinimum(0.001); | |
5147 | hPhiChargedClone->SetLineColor(3); | |
5148 | hPhiChargedClone->SetYTitle("track matched / all"); | |
5149 | hPi0PhiChargedClone->Divide(hPi0Phi); | |
5150 | hGamPhiChargedClone->Divide(hGamPhi); | |
5151 | hElePhiChargedClone->Divide(hElePhi); | |
5152 | hNeHadPhiChargedClone->Divide(hNeHadPhi); | |
5153 | hChHadPhiChargedClone->Divide(hChHadPhi); | |
5154 | hPhiChargedClone->Draw(); | |
5155 | hPi0PhiChargedClone->Draw("same"); | |
5156 | hGamPhiChargedClone->Draw("same"); | |
5157 | hElePhiChargedClone->Draw("same"); | |
5158 | hNeHadPhiChargedClone->Draw("same"); | |
5159 | hChHadPhiChargedClone->Draw("same"); | |
5160 | ||
5161 | sprintf(name,"QA_%s_RatioReconstructedMatchedDistributionsGenID.eps",fCalorimeter.Data()); | |
5162 | c3ch->Print(name); printf("Plot: %s\n",name); | |
5163 | ||
5164 | } | |
5165 | } | |
5166 | //Track-matching distributions | |
c8fe2783 | 5167 | |
6fa7d352 | 5168 | sprintf(cname,"QA_%s_trkmatch",fCalorimeter.Data()); |
5169 | TCanvas *cme = new TCanvas(cname,"Track-matching distributions", 400, 400); | |
5170 | cme->Divide(2,2); | |
c8fe2783 | 5171 | |
6fa7d352 | 5172 | TLegend pLegendpE0(0.6,0.55,0.9,0.8); |
5173 | pLegendpE0.SetTextSize(0.04); | |
5174 | pLegendpE0.AddEntry(fh1pOverE,"all","L"); | |
5175 | pLegendpE0.AddEntry(fh1pOverER02,"dR < 0.02","L"); | |
5176 | pLegendpE0.SetFillColor(10); | |
5177 | pLegendpE0.SetBorderSize(1); | |
a6f26052 | 5178 | //pLegendpE0.Draw(); |
c8fe2783 | 5179 | |
6fa7d352 | 5180 | cme->cd(1); |
5181 | if(fh1pOverE->GetEntries() > 0) gPad->SetLogy(); | |
5182 | fh1pOverE->SetTitle("Track matches p/E"); | |
5183 | fh1pOverE->Draw(); | |
5184 | fh1pOverER02->SetLineColor(4); | |
5185 | fh1pOverER02->Draw("same"); | |
5186 | pLegendpE0.Draw(); | |
c8fe2783 | 5187 | |
6fa7d352 | 5188 | cme->cd(2); |
5189 | if(fh1dR->GetEntries() > 0) gPad->SetLogy(); | |
5190 | fh1dR->Draw(); | |
5191 | ||
5192 | cme->cd(3); | |
5193 | fh2MatchdEdx->Draw(); | |
5194 | ||
5195 | cme->cd(4); | |
5196 | fh2EledEdx->Draw(); | |
5197 | ||
5198 | sprintf(name,"QA_%s_TrackMatchingEleDist.eps",fCalorimeter.Data()); | |
5199 | cme->Print(name); printf("Plot: %s\n",name); | |
5200 | ||
5201 | if(IsDataMC()){ | |
c8fe2783 | 5202 | sprintf(cname,"QA_%s_trkmatchMCEle",fCalorimeter.Data()); |
5203 | TCanvas *cmemc = new TCanvas(cname,"Track-matching distributions from MC electrons", 600, 200); | |
5204 | cmemc->Divide(3,1); | |
5205 | ||
5206 | cmemc->cd(1); | |
5207 | gPad->SetLogy(); | |
5208 | fhMCEle1pOverE->Draw(); | |
5209 | fhMCEle1pOverER02->SetLineColor(4); | |
5210 | fhMCEle1pOverE->SetLineColor(1); | |
5211 | fhMCEle1pOverER02->Draw("same"); | |
5212 | pLegendpE0.Draw(); | |
5213 | ||
5214 | cmemc->cd(2); | |
5215 | gPad->SetLogy(); | |
5216 | fhMCEle1dR->Draw(); | |
5217 | ||
5218 | cmemc->cd(3); | |
5219 | fhMCEle2MatchdEdx->Draw(); | |
5220 | ||
5221 | sprintf(name,"QA_%s_TrackMatchingDistMCEle.eps",fCalorimeter.Data()); | |
5222 | cmemc->Print(name); printf("Plot: %s\n",name); | |
5223 | ||
6fa7d352 | 5224 | |
c8fe2783 | 5225 | sprintf(cname,"QA_%s_trkmatchMCChHad",fCalorimeter.Data()); |
5226 | TCanvas *cmemchad = new TCanvas(cname,"Track-matching distributions from MC charged hadrons", 600, 200); | |
5227 | cmemchad->Divide(3,1); | |
5228 | ||
5229 | cmemchad->cd(1); | |
5230 | gPad->SetLogy(); | |
5231 | fhMCChHad1pOverE->Draw(); | |
5232 | fhMCChHad1pOverER02->SetLineColor(4); | |
5233 | fhMCChHad1pOverE->SetLineColor(1); | |
5234 | fhMCChHad1pOverER02->Draw("same"); | |
5235 | pLegendpE0.Draw(); | |
5236 | ||
5237 | cmemchad->cd(2); | |
5238 | gPad->SetLogy(); | |
5239 | fhMCChHad1dR->Draw(); | |
5240 | ||
5241 | cmemchad->cd(3); | |
5242 | fhMCChHad2MatchdEdx->Draw(); | |
6fa7d352 | 5243 | |
c8fe2783 | 5244 | sprintf(name,"QA_%s_TrackMatchingDistMCChHad.eps",fCalorimeter.Data()); |
5245 | cmemchad->Print(name); printf("Plot: %s\n",name); | |
5246 | ||
5247 | sprintf(cname,"QA_%s_trkmatchMCNeutral",fCalorimeter.Data()); | |
5248 | TCanvas *cmemcn = new TCanvas(cname,"Track-matching distributions from MC neutrals", 600, 200); | |
5249 | cmemcn->Divide(3,1); | |
5250 | ||
5251 | cmemcn->cd(1); | |
5252 | gPad->SetLogy(); | |
5253 | fhMCNeutral1pOverE->Draw(); | |
5254 | fhMCNeutral1pOverE->SetLineColor(1); | |
5255 | fhMCNeutral1pOverER02->SetLineColor(4); | |
5256 | fhMCNeutral1pOverER02->Draw("same"); | |
5257 | pLegendpE0.Draw(); | |
5258 | ||
5259 | cmemcn->cd(2); | |
5260 | gPad->SetLogy(); | |
5261 | fhMCNeutral1dR->Draw(); | |
5262 | ||
5263 | cmemcn->cd(3); | |
5264 | fhMCNeutral2MatchdEdx->Draw(); | |
5265 | ||
5266 | sprintf(name,"QA_%s_TrackMatchingDistMCNeutral.eps",fCalorimeter.Data()); | |
5267 | cmemcn->Print(name); printf("Plot: %s\n",name); | |
5268 | ||
5269 | sprintf(cname,"QA_%s_trkmatchpE",fCalorimeter.Data()); | |
5270 | TCanvas *cmpoe = new TCanvas(cname,"Track-matching distributions, p/E", 400, 200); | |
5271 | cmpoe->Divide(2,1); | |
5272 | ||
5273 | cmpoe->cd(1); | |
5274 | gPad->SetLogy(); | |
5275 | fh1pOverE->SetLineColor(1); | |
5276 | fhMCEle1pOverE->SetLineColor(4); | |
5277 | fhMCChHad1pOverE->SetLineColor(2); | |
5278 | fhMCNeutral1pOverE->SetLineColor(7); | |
5279 | fh1pOverER02->SetMinimum(0.5); | |
5280 | fh1pOverE->Draw(); | |
5281 | fhMCEle1pOverE->Draw("same"); | |
5282 | fhMCChHad1pOverE->Draw("same"); | |
5283 | fhMCNeutral1pOverE->Draw("same"); | |
5284 | TLegend pLegendpE(0.65,0.55,0.9,0.8); | |
5285 | pLegendpE.SetTextSize(0.06); | |
5286 | pLegendpE.AddEntry(fh1pOverE,"all","L"); | |
5287 | pLegendpE.AddEntry(fhMCEle1pOverE,"e^{#pm}","L"); | |
5288 | pLegendpE.AddEntry(fhMCChHad1pOverE,"h^{#pm}","L"); | |
5289 | pLegendpE.AddEntry(fhMCNeutral1pOverE,"neutrals","L"); | |
5290 | pLegendpE.SetFillColor(10); | |
5291 | pLegendpE.SetBorderSize(1); | |
5292 | pLegendpE.Draw(); | |
5293 | ||
5294 | cmpoe->cd(2); | |
5295 | gPad->SetLogy(); | |
5296 | fh1pOverER02->SetTitle("Track matches p/E, dR<0.2"); | |
5297 | fh1pOverER02->SetLineColor(1); | |
5298 | fhMCEle1pOverER02->SetLineColor(4); | |
5299 | fhMCChHad1pOverER02->SetLineColor(2); | |
5300 | fhMCNeutral1pOverER02->SetLineColor(7); | |
5301 | fh1pOverER02->SetMaximum(fh1pOverE->GetMaximum()); | |
5302 | fh1pOverER02->SetMinimum(0.5); | |
5303 | fh1pOverER02->Draw(); | |
5304 | fhMCEle1pOverER02->Draw("same"); | |
5305 | fhMCChHad1pOverER02->Draw("same"); | |
5306 | fhMCNeutral1pOverER02->Draw("same"); | |
5307 | ||
a6f26052 | 5308 | // TLegend pLegendpE2(0.65,0.55,0.9,0.8); |
5309 | // pLegendpE2.SetTextSize(0.06); | |
5310 | // pLegendpE2.SetHeader("dR < 0.02"); | |
5311 | // pLegendpE2.SetFillColor(10); | |
5312 | // pLegendpE2.SetBorderSize(1); | |
5313 | // pLegendpE2.Draw(); | |
c8fe2783 | 5314 | |
5315 | sprintf(name,"QA_%s_TrackMatchingPOverE.eps",fCalorimeter.Data()); | |
5316 | cmpoe->Print(name); printf("Plot: %s\n",name); | |
9725fd2a | 5317 | } |
06e5656a | 5318 | |
5a2dbc3c | 5319 | char line[1024] ; |
9725fd2a | 5320 | sprintf(line, ".!tar -zcf QA_%s_%s.tar.gz *%s*.eps", fCalorimeter.Data(), GetName(),fCalorimeter.Data()) ; |
5321 | gROOT->ProcessLine(line); | |
5322 | sprintf(line, ".!rm -fR *.eps"); | |
5323 | gROOT->ProcessLine(line); | |
5324 | ||
5325 | printf("AliAnaCalorimeterQA::Terminate() - !! All the eps files are in QA_%s_%s.tar.gz !!!\n", fCalorimeter.Data(), GetName()); | |
5326 | ||
5327 | } |