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