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