]>
Commit | Line | Data |
---|---|---|
a3aebfff | 1 | /************************************************************************** |
1c5acb87 | 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 hereby granted * | |
cadbb0f3 | 9 | * without fee, provided that the above copyright notice appears in all * |
1c5acb87 | 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 | **************************************************************************/ | |
1c5acb87 | 15 | |
16 | //_________________________________________________________________________ | |
17 | // | |
18 | // Class for the photon identification. | |
19 | // Clusters from calorimeters are identified as photons | |
20 | // and kept in the AOD. Few histograms produced. | |
6175da48 | 21 | // Produces input for other analysis classes like AliAnaPi0, |
22 | // AliAnaParticleHadronCorrelation ... | |
1c5acb87 | 23 | // |
24 | // -- Author: Gustavo Conesa (LNF-INFN) | |
25 | ////////////////////////////////////////////////////////////////////////////// | |
26 | ||
27 | ||
28 | // --- ROOT system --- | |
29 | #include <TH2F.h> | |
2244659d | 30 | #include <TH3D.h> |
477d6cee | 31 | #include <TClonesArray.h> |
0c1383b5 | 32 | #include <TObjString.h> |
123fc3bd | 33 | #include "TParticle.h" |
6175da48 | 34 | #include "TDatabasePDG.h" |
1c5acb87 | 35 | |
36 | // --- Analysis system --- | |
37 | #include "AliAnaPhoton.h" | |
38 | #include "AliCaloTrackReader.h" | |
123fc3bd | 39 | #include "AliStack.h" |
1c5acb87 | 40 | #include "AliCaloPID.h" |
6639984f | 41 | #include "AliMCAnalysisUtils.h" |
ff45398a | 42 | #include "AliFiducialCut.h" |
0ae57829 | 43 | #include "AliVCluster.h" |
591cc579 | 44 | #include "AliAODMCParticle.h" |
c8fe2783 | 45 | #include "AliMixedEvent.h" |
fc195fd0 | 46 | #include "AliAODEvent.h" |
2ad19c3d | 47 | #include "AliESDEvent.h" |
c8fe2783 | 48 | |
c5693f62 | 49 | // --- Detectors --- |
50 | #include "AliPHOSGeoUtils.h" | |
51 | #include "AliEMCALGeometry.h" | |
1c5acb87 | 52 | |
53 | ClassImp(AliAnaPhoton) | |
54 | ||
5812a064 | 55 | //____________________________ |
521636d2 | 56 | AliAnaPhoton::AliAnaPhoton() : |
09273901 | 57 | AliAnaCaloTrackCorrBaseClass(), fCalorimeter(""), |
521636d2 | 58 | fMinDist(0.), fMinDist2(0.), fMinDist3(0.), |
09273901 | 59 | fRejectTrackMatch(0), fFillTMHisto(kFALSE), |
60 | fTimeCutMin(-10000), fTimeCutMax(10000), | |
9e51e29a | 61 | fNCellsCut(0), |
62 | fNLMCutMin(-1), fNLMCutMax(10), | |
63 | fFillSSHistograms(kFALSE), fFillOnlySimpleSSHisto(1), | |
f66d95af | 64 | fNOriginHistograms(8), fNPrimaryHistograms(4), |
c2a62a94 | 65 | fFillPileUpHistograms(0), fFillEMCALBCHistograms(0), |
c4a7d28a | 66 | // Histograms |
5c46c992 | 67 | fhNCellsE(0), fhCellsE(0), // Control histograms |
68 | fhMaxCellDiffClusterE(0), fhTimeE(0), // Control histograms | |
c2a62a94 | 69 | fhEtaPhi(0), fhEtaPhiEMCALBC0(0), |
70 | fhEtaPhiEMCALBC1(0), fhEtaPhiEMCALBCN(0), | |
afb3af8a | 71 | fhEtaPhiTriggerEMCALBCClusterOverTh(0), |
72 | fhEtaPhiTriggerEMCALBCUMClusterOverTh(0), | |
73 | fhEtaPhiTriggerEMCALBCClusterBelowTh1(0), | |
74 | fhEtaPhiTriggerEMCALBCUMClusterBelowTh1(0), | |
75 | fhEtaPhiTriggerEMCALBCClusterBelowTh2(0), | |
76 | fhEtaPhiTriggerEMCALBCUMClusterBelowTh2(0), | |
77 | fhEtaPhiTriggerEMCALBCExotic(0), fhTimeTriggerEMCALBCExotic(0), | |
78 | fhEtaPhiTriggerEMCALBCUMExotic(0), fhTimeTriggerEMCALBCUMExotic(0), | |
6265ad55 | 79 | fhEtaPhiTriggerEMCALBCBad(0), fhTimeTriggerEMCALBCBad(0), |
80 | fhEtaPhiTriggerEMCALBCUMBad(0), fhTimeTriggerEMCALBCUMBad(0), | |
81 | fhEtaPhiTriggerEMCALBCBadExotic(0), fhTimeTriggerEMCALBCBadExotic(0), | |
82 | fhEtaPhiTriggerEMCALBCUMBadExotic(0), fhTimeTriggerEMCALBCUMBadExotic(0), | |
83 | fhEtaPhiTriggerEMCALBCExoticCluster(0), fhTimeTriggerEMCALBCExoticCluster(0), | |
afb3af8a | 84 | fhEtaPhiTriggerEMCALBCUMExoticCluster(0), fhTimeTriggerEMCALBCUMExoticCluster(0), |
85 | fhEtaPhiTriggerEMCALBCBadCluster(0), fhTimeTriggerEMCALBCBadCluster(0), | |
6265ad55 | 86 | fhEtaPhiTriggerEMCALBCUMBadCluster(0), fhTimeTriggerEMCALBCUMBadCluster(0), |
87 | fhEtaPhiTriggerEMCALBCBadExoticCluster(0), fhTimeTriggerEMCALBCBadExoticCluster(0), | |
88 | fhEtaPhiTriggerEMCALBCUMBadExoticCluster(0), fhTimeTriggerEMCALBCUMBadExoticCluster(0), | |
1035a8d9 | 89 | fhTimeTriggerEMCALBCBadMaxCell(0), fhTimeTriggerEMCALBCUMBadMaxCell(0), |
90 | fhTimeTriggerEMCALBCBadMaxCellExotic(0), fhTimeTriggerEMCALBCUMBadMaxCellExotic(0), | |
afb3af8a | 91 | fhEtaPhiNoTrigger(0), fhTimeNoTrigger(0), |
92 | ||
93 | fhEPhoton(0), fhPtPhoton(0), | |
521636d2 | 94 | fhPhiPhoton(0), fhEtaPhoton(0), |
95 | fhEtaPhiPhoton(0), fhEtaPhi05Photon(0), | |
c2a62a94 | 96 | fhEtaPhiPhotonEMCALBC0(0), fhEtaPhiPhotonEMCALBC1(0), fhEtaPhiPhotonEMCALBCN(0), |
c8710850 | 97 | fhPtCentralityPhoton(0), fhPtEventPlanePhoton(0), |
521636d2 | 98 | |
4c8f7c2e | 99 | // Shower shape histograms |
9e51e29a | 100 | fhNLocMax(0), |
521636d2 | 101 | fhDispE(0), fhLam0E(0), fhLam1E(0), |
521636d2 | 102 | fhDispETRD(0), fhLam0ETRD(0), fhLam1ETRD(0), |
b5dbb99b | 103 | fhDispETM(0), fhLam0ETM(0), fhLam1ETM(0), |
104 | fhDispETMTRD(0), fhLam0ETMTRD(0), fhLam1ETMTRD(0), | |
521636d2 | 105 | |
106 | fhNCellsLam0LowE(0), fhNCellsLam1LowE(0), fhNCellsDispLowE(0), | |
107 | fhNCellsLam0HighE(0), fhNCellsLam1HighE(0), fhNCellsDispHighE(0), | |
521636d2 | 108 | |
109 | fhEtaLam0LowE(0), fhPhiLam0LowE(0), | |
110 | fhEtaLam0HighE(0), fhPhiLam0HighE(0), | |
111 | fhLam0DispLowE(0), fhLam0DispHighE(0), | |
112 | fhLam1Lam0LowE(0), fhLam1Lam0HighE(0), | |
113 | fhDispLam1LowE(0), fhDispLam1HighE(0), | |
34c16486 | 114 | fhDispEtaE(0), fhDispPhiE(0), |
115 | fhSumEtaE(0), fhSumPhiE(0), fhSumEtaPhiE(0), | |
116 | fhDispEtaPhiDiffE(0), fhSphericityE(0), | |
117 | fhDispSumEtaDiffE(0), fhDispSumPhiDiffE(0), | |
521636d2 | 118 | |
4c8f7c2e | 119 | // MC histograms |
8d6b7f60 | 120 | fhMCPhotonELambda0NoOverlap(0), fhMCPhotonELambda0TwoOverlap(0), fhMCPhotonELambda0NOverlap(0), |
b5dbb99b | 121 | // Embedding |
7c65ad18 | 122 | fhEmbeddedSignalFractionEnergy(0), |
8d6b7f60 | 123 | fhEmbedPhotonELambda0FullSignal(0), fhEmbedPhotonELambda0MostlySignal(0), |
124 | fhEmbedPhotonELambda0MostlyBkg(0), fhEmbedPhotonELambda0FullBkg(0), | |
125 | fhEmbedPi0ELambda0FullSignal(0), fhEmbedPi0ELambda0MostlySignal(0), | |
2ad19c3d | 126 | fhEmbedPi0ELambda0MostlyBkg(0), fhEmbedPi0ELambda0FullBkg(0), |
127 | // PileUp | |
128 | fhTimeENoCut(0), fhTimeESPD(0), fhTimeESPDMulti(0), | |
129 | fhTimeNPileUpVertSPD(0), fhTimeNPileUpVertTrack(0), | |
130 | fhTimeNPileUpVertContributors(0), | |
acd56ca4 | 131 | fhTimePileUpMainVertexZDistance(0), fhTimePileUpMainVertexZDiamond(0), |
fedea415 | 132 | fhClusterMultSPDPileUp(), fhClusterMultNoPileUp(), |
133 | fhEtaPhiBC0(0), fhEtaPhiBCPlus(0), fhEtaPhiBCMinus(0), | |
134 | fhEtaPhiBC0PileUpSPD(0), | |
135 | fhEtaPhiBCPlusPileUpSPD(0), | |
136 | fhEtaPhiBCMinusPileUpSPD(0) | |
4bfeae64 | 137 | { |
1c5acb87 | 138 | //default ctor |
139 | ||
4bfeae64 | 140 | for(Int_t i = 0; i < 14; i++) |
141 | { | |
4c8f7c2e | 142 | fhMCPt [i] = 0; |
143 | fhMCE [i] = 0; | |
144 | fhMCPhi [i] = 0; | |
145 | fhMCEta [i] = 0; | |
146 | fhMCDeltaE [i] = 0; | |
147 | fhMCDeltaPt[i] = 0; | |
4c8f7c2e | 148 | fhMC2E [i] = 0; |
149 | fhMC2Pt [i] = 0; | |
521636d2 | 150 | } |
151 | ||
4bfeae64 | 152 | for(Int_t i = 0; i < 7; i++) |
153 | { | |
3d5d5078 | 154 | fhPtPrimMC [i] = 0; |
155 | fhEPrimMC [i] = 0; | |
156 | fhPhiPrimMC[i] = 0; | |
157 | fhYPrimMC [i] = 0; | |
158 | ||
159 | fhPtPrimMCAcc [i] = 0; | |
160 | fhEPrimMCAcc [i] = 0; | |
161 | fhPhiPrimMCAcc[i] = 0; | |
162 | fhYPrimMCAcc [i] = 0; | |
d2655d46 | 163 | |
164 | fhDispEtaDispPhi[i] = 0; | |
165 | fhLambda0DispPhi[i] = 0; | |
166 | fhLambda0DispEta[i] = 0; | |
5e5e056f | 167 | |
fad96885 | 168 | fhPtPileUp [i] = 0; |
169 | fhPtChargedPileUp[i] = 0; | |
170 | fhPtPhotonPileUp [i] = 0; | |
171 | ||
172 | fhLambda0PileUp [i] = 0; | |
173 | fhLambda0ChargedPileUp[i] = 0; | |
5e5e056f | 174 | |
650d1938 | 175 | fhClusterEFracLongTimePileUp [i] = 0; |
176 | ||
fad96885 | 177 | fhClusterTimeDiffPileUp [i] = 0; |
178 | fhClusterTimeDiffChargedPileUp[i] = 0; | |
179 | fhClusterTimeDiffPhotonPileUp [i] = 0; | |
180 | ||
d2655d46 | 181 | for(Int_t j = 0; j < 6; j++) |
182 | { | |
183 | fhMCDispEtaDispPhi[i][j] = 0; | |
184 | fhMCLambda0DispEta[i][j] = 0; | |
185 | fhMCLambda0DispPhi[i][j] = 0; | |
186 | } | |
3d5d5078 | 187 | } |
188 | ||
4bfeae64 | 189 | for(Int_t i = 0; i < 6; i++) |
190 | { | |
f66d95af | 191 | fhMCELambda0 [i] = 0; |
192 | fhMCELambda1 [i] = 0; | |
193 | fhMCEDispersion [i] = 0; | |
f66d95af | 194 | fhMCNCellsE [i] = 0; |
195 | fhMCMaxCellDiffClusterE[i] = 0; | |
bfdcf7fb | 196 | fhLambda0DispEta[i] = 0; |
197 | fhLambda0DispPhi[i] = 0; | |
198 | ||
f66d95af | 199 | fhMCLambda0vsClusterMaxCellDiffE0[i] = 0; |
200 | fhMCLambda0vsClusterMaxCellDiffE2[i] = 0; | |
201 | fhMCLambda0vsClusterMaxCellDiffE6[i] = 0; | |
202 | fhMCNCellsvsClusterMaxCellDiffE0 [i] = 0; | |
203 | fhMCNCellsvsClusterMaxCellDiffE2 [i] = 0; | |
204 | fhMCNCellsvsClusterMaxCellDiffE6 [i] = 0; | |
34c16486 | 205 | |
206 | fhMCEDispEta [i] = 0; | |
207 | fhMCEDispPhi [i] = 0; | |
208 | fhMCESumEtaPhi [i] = 0; | |
209 | fhMCEDispEtaPhiDiff[i] = 0; | |
210 | fhMCESphericity [i] = 0; | |
521636d2 | 211 | } |
212 | ||
34c16486 | 213 | for(Int_t i = 0; i < 5; i++) |
214 | { | |
acd56ca4 | 215 | fhClusterCuts[i] = 0; |
34c16486 | 216 | } |
fc195fd0 | 217 | |
4bfeae64 | 218 | // Track matching residuals |
219 | for(Int_t i = 0; i < 2; i++) | |
220 | { | |
221 | fhTrackMatchedDEta[i] = 0; fhTrackMatchedDPhi[i] = 0; fhTrackMatchedDEtaDPhi[i] = 0; | |
222 | fhTrackMatchedDEtaTRD[i] = 0; fhTrackMatchedDPhiTRD[i] = 0; | |
223 | fhTrackMatchedDEtaMCOverlap[i] = 0; fhTrackMatchedDPhiMCOverlap[i] = 0; | |
224 | fhTrackMatchedDEtaMCNoOverlap[i] = 0; fhTrackMatchedDPhiMCNoOverlap[i] = 0; | |
225 | fhTrackMatchedDEtaMCConversion[i] = 0; fhTrackMatchedDPhiMCConversion[i] = 0; | |
226 | fhTrackMatchedMCParticle[i] = 0; fhTrackMatchedMCParticle[i] = 0; | |
227 | fhdEdx[i] = 0; fhEOverP[i] = 0; | |
228 | fhEOverPTRD[i] = 0; | |
229 | } | |
230 | ||
acd56ca4 | 231 | for(Int_t i = 0; i < 4; i++) |
232 | { | |
233 | fhClusterMultSPDPileUp[i] = 0; | |
234 | fhClusterMultNoPileUp [i] = 0; | |
235 | } | |
236 | ||
afb3af8a | 237 | for(Int_t i = 0; i < 11; i++) |
c2a62a94 | 238 | { |
370169ad | 239 | fhEtaPhiTriggerEMCALBC [i] = 0 ; |
240 | fhTimeTriggerEMCALBC [i] = 0 ; | |
afb3af8a | 241 | fhEtaPhiTriggerEMCALBCUM [i] = 0 ; |
242 | fhTimeTriggerEMCALBCUM [i] = 0 ; | |
243 | ||
370169ad | 244 | fhEtaPhiPhotonTriggerEMCALBC [i] = 0 ; |
245 | fhTimePhotonTriggerEMCALBC [i] = 0 ; | |
afb3af8a | 246 | fhEtaPhiPhotonTriggerEMCALBCUM [i] = 0 ; |
247 | fhTimePhotonTriggerEMCALBCUM [i] = 0 ; | |
248 | ||
249 | fhTimePhotonTriggerEMCALBCPileUpSPD[i] = 0 ; | |
250 | fhTimeTriggerEMCALBCPileUpSPD [i] = 0 ; | |
251 | ||
252 | fhEtaPhiTriggerEMCALBCCluster [i] = 0 ; | |
253 | fhTimeTriggerEMCALBCCluster [i] = 0 ; | |
254 | fhEtaPhiTriggerEMCALBCUMCluster [i] = 0 ; | |
255 | fhTimeTriggerEMCALBCUMCluster [i] = 0 ; | |
256 | ||
c2a62a94 | 257 | } |
258 | ||
1c5acb87 | 259 | //Initialize parameters |
260 | InitParameters(); | |
261 | ||
1c5acb87 | 262 | } |
263 | ||
9e51e29a | 264 | //_____________________________________________________________________________________________________ |
22ad7981 | 265 | Bool_t AliAnaPhoton::ClusterSelected(AliVCluster* calo, TLorentzVector mom, Int_t nMaxima) |
c4a7d28a | 266 | { |
267 | //Select clusters if they pass different cuts | |
fad96885 | 268 | |
c2a62a94 | 269 | Float_t ptcluster = mom.Pt(); |
270 | Float_t ecluster = mom.E(); | |
271 | Float_t l0cluster = calo->GetM02(); | |
272 | Float_t etacluster = mom.Eta(); | |
273 | Float_t phicluster = mom.Phi(); | |
274 | if(phicluster<0) phicluster+=TMath::TwoPi(); | |
275 | Float_t tofcluster = calo->GetTOF()*1.e9; | |
276 | Float_t tofclusterUS = TMath::Abs(tofcluster); | |
277 | ||
fad96885 | 278 | |
279 | if(GetDebug() > 2) | |
afb3af8a | 280 | printf("AliAnaPhoton::ClusterSelected() - Current Event %d; Before selection : E %2.2f, pT %2.2f, phi %2.2f, eta %2.2f\n", |
c4a7d28a | 281 | GetReader()->GetEventNumber(), |
c2a62a94 | 282 | ecluster,ptcluster, phicluster*TMath::RadToDeg(),etacluster); |
fad96885 | 283 | |
284 | fhClusterCuts[1]->Fill(ecluster); | |
c4a7d28a | 285 | |
c2a62a94 | 286 | if(ecluster > 0.5) fhEtaPhi->Fill(etacluster, phicluster); |
287 | ||
288 | if(fFillEMCALBCHistograms && fCalorimeter=="EMCAL") | |
289 | { | |
290 | if(ecluster > 2) | |
291 | { | |
292 | if (tofclusterUS < 25) fhEtaPhiEMCALBC0->Fill(etacluster, phicluster); | |
293 | else if (tofclusterUS < 75) fhEtaPhiEMCALBC1->Fill(etacluster, phicluster); | |
294 | else fhEtaPhiEMCALBCN->Fill(etacluster, phicluster); | |
295 | } | |
296 | ||
1035a8d9 | 297 | Int_t bc = GetReader()->GetTriggerClusterBC(); |
298 | Int_t id = GetReader()->GetTriggerClusterId(); | |
299 | Bool_t badMax = GetReader()->IsBadMaxCellTriggerEvent(); | |
300 | ||
afb3af8a | 301 | if(id==-2) |
c2a62a94 | 302 | { |
afb3af8a | 303 | //printf("AliAnaPhoton::ClusterSelected() - No trigger found bc=%d\n",bc); |
304 | fhEtaPhiNoTrigger->Fill(etacluster, phicluster); | |
305 | fhTimeNoTrigger ->Fill(ecluster, tofcluster); | |
c2a62a94 | 306 | } |
afb3af8a | 307 | else if(TMath::Abs(bc) < 6) |
308 | { | |
309 | if(!GetReader()->IsBadCellTriggerEvent() && !GetReader()->IsExoticEvent() ) | |
310 | { | |
311 | if(GetReader()->IsTriggerMatched()) | |
312 | { | |
313 | if(ecluster > 2) fhEtaPhiTriggerEMCALBC[bc+5]->Fill(etacluster, phicluster); | |
314 | fhTimeTriggerEMCALBC[bc+5]->Fill(ecluster, tofcluster); | |
315 | if(GetReader()->IsPileUpFromSPD()) fhTimeTriggerEMCALBCPileUpSPD[bc+5]->Fill(ecluster, tofcluster); | |
316 | ||
317 | if(calo->GetID() == GetReader()->GetTriggerClusterId()) | |
318 | { | |
319 | fhEtaPhiTriggerEMCALBCCluster[bc+5]->Fill(etacluster, phicluster); | |
320 | fhTimeTriggerEMCALBCCluster[bc+5] ->Fill(ecluster, tofcluster); | |
321 | ||
322 | if(bc==0) | |
323 | { | |
324 | Float_t threshold = GetReader()->GetEventTriggerThreshold() ; | |
325 | if(ecluster > threshold) | |
326 | fhEtaPhiTriggerEMCALBCClusterOverTh->Fill(etacluster, phicluster); | |
327 | else if(ecluster > threshold-1) | |
328 | fhEtaPhiTriggerEMCALBCClusterBelowTh1->Fill(etacluster, phicluster); | |
329 | else | |
330 | fhEtaPhiTriggerEMCALBCClusterBelowTh2->Fill(etacluster, phicluster); | |
331 | } | |
332 | } | |
333 | } | |
334 | else | |
335 | { | |
336 | if(ecluster > 2) fhEtaPhiTriggerEMCALBCUM[bc+5]->Fill(etacluster, phicluster); | |
337 | fhTimeTriggerEMCALBCUM[bc+5]->Fill(ecluster, tofcluster); | |
338 | ||
339 | if(calo->GetID() == GetReader()->GetTriggerClusterId()) | |
340 | { | |
341 | fhEtaPhiTriggerEMCALBCUMCluster[bc+5]->Fill(etacluster, phicluster); | |
342 | fhTimeTriggerEMCALBCUMCluster[bc+5] ->Fill(ecluster, tofcluster); | |
343 | if(bc==0) | |
344 | { | |
345 | Float_t threshold = GetReader()->GetEventTriggerThreshold() ; | |
346 | if(ecluster > threshold) | |
347 | fhEtaPhiTriggerEMCALBCUMClusterOverTh->Fill(etacluster, phicluster); | |
348 | else if(ecluster > threshold-1) | |
349 | fhEtaPhiTriggerEMCALBCUMClusterBelowTh1->Fill(etacluster, phicluster); | |
350 | else | |
351 | fhEtaPhiTriggerEMCALBCUMClusterBelowTh2->Fill(etacluster, phicluster); | |
352 | } | |
353 | } | |
354 | } | |
355 | }// neither bad nor exotic | |
6265ad55 | 356 | else if(GetReader()->IsBadCellTriggerEvent() && GetReader()->IsExoticEvent()) |
357 | { | |
358 | if(GetReader()->IsTriggerMatched()) | |
359 | { | |
360 | if(ecluster > 2) fhEtaPhiTriggerEMCALBCBadExotic->Fill(etacluster, phicluster); | |
361 | fhTimeTriggerEMCALBCBadExotic->Fill(ecluster, tofcluster); | |
1035a8d9 | 362 | if(badMax) fhTimeTriggerEMCALBCBadMaxCellExotic->Fill(ecluster, tofcluster); |
6265ad55 | 363 | } |
364 | else | |
365 | { | |
366 | if(ecluster > 2) fhEtaPhiTriggerEMCALBCUMBadExotic->Fill(etacluster, phicluster); | |
367 | fhTimeTriggerEMCALBCUMBadExotic->Fill(ecluster, tofcluster); | |
1035a8d9 | 368 | if(badMax) fhTimeTriggerEMCALBCUMBadMaxCellExotic->Fill(ecluster, tofcluster); |
369 | ||
6265ad55 | 370 | } |
371 | }// Bad and exotic cluster trigger | |
afb3af8a | 372 | else if(GetReader()->IsBadCellTriggerEvent() ) |
373 | { | |
374 | if(GetReader()->IsTriggerMatched()) | |
375 | { | |
376 | if(ecluster > 2) fhEtaPhiTriggerEMCALBCBad->Fill(etacluster, phicluster); | |
377 | fhTimeTriggerEMCALBCBad->Fill(ecluster, tofcluster); | |
1035a8d9 | 378 | if(badMax) fhTimeTriggerEMCALBCBadMaxCell->Fill(ecluster, tofcluster); |
afb3af8a | 379 | } |
380 | else | |
381 | { | |
382 | if(ecluster > 2) fhEtaPhiTriggerEMCALBCUMBad->Fill(etacluster, phicluster); | |
383 | fhTimeTriggerEMCALBCUMBad->Fill(ecluster, tofcluster); | |
1035a8d9 | 384 | if(badMax) fhTimeTriggerEMCALBCUMBadMaxCell->Fill(ecluster, tofcluster); |
afb3af8a | 385 | } |
386 | }// Bad cluster trigger | |
387 | else if(GetReader()->IsExoticEvent() ) | |
388 | { | |
389 | if(GetReader()->IsTriggerMatched()) | |
390 | { | |
391 | if(ecluster > 2) fhEtaPhiTriggerEMCALBCExotic->Fill(etacluster, phicluster); | |
392 | fhTimeTriggerEMCALBCExotic->Fill(ecluster, tofcluster); | |
afb3af8a | 393 | } |
394 | else | |
395 | { | |
396 | if(ecluster > 2) fhEtaPhiTriggerEMCALBCUMExotic->Fill(etacluster, phicluster); | |
397 | fhTimeTriggerEMCALBCUMExotic->Fill(ecluster, tofcluster); | |
afb3af8a | 398 | } |
399 | } | |
400 | } | |
401 | else if(TMath::Abs(bc) >= 6) | |
402 | printf("AliAnaPhoton::ClusterSelected() - Trigger BC not expected = %d\n",bc); | |
1035a8d9 | 403 | |
c2a62a94 | 404 | } |
405 | ||
c4a7d28a | 406 | //....................................... |
407 | //If too small or big energy, skip it | |
afb3af8a | 408 | if(ecluster < GetMinEnergy() || ecluster > GetMaxEnergy() ) return kFALSE ; |
09273901 | 409 | |
c4a7d28a | 410 | if(GetDebug() > 2) printf("\t Cluster %d Pass E Cut \n",calo->GetID()); |
09273901 | 411 | |
fad96885 | 412 | fhClusterCuts[2]->Fill(ecluster); |
413 | ||
414 | if(fFillPileUpHistograms) | |
415 | { | |
fad96885 | 416 | // Get the fraction of the cluster energy that carries the cell with highest energy and its absId |
417 | AliVCaloCells* cells = 0; | |
418 | if(fCalorimeter == "EMCAL") cells = GetEMCALCells(); | |
419 | else cells = GetPHOSCells(); | |
420 | ||
421 | Float_t maxCellFraction = 0.; | |
422 | Int_t absIdMax = GetCaloUtils()->GetMaxEnergyCell(cells, calo,maxCellFraction); | |
423 | ||
424 | Double_t tmax = cells->GetCellTime(absIdMax); | |
425 | GetCaloUtils()->RecalibrateCellTime(tmax, fCalorimeter, absIdMax,GetReader()->GetInputEvent()->GetBunchCrossNumber()); | |
426 | tmax*=1.e9; | |
427 | ||
428 | Bool_t okPhoton = kFALSE; | |
429 | if( GetCaloPID()->GetIdentifiedParticleType(calo)== AliCaloPID::kPhoton) okPhoton = kTRUE; | |
430 | ||
431 | Bool_t matched = IsTrackMatched(calo,GetReader()->GetInputEvent()); | |
650d1938 | 432 | Float_t clusterLongTimeE = 0; |
433 | Float_t clusterOKTimeE = 0; | |
fad96885 | 434 | //Loop on cells inside cluster |
435 | for (Int_t ipos = 0; ipos < calo->GetNCells(); ipos++) | |
436 | { | |
437 | Int_t absId = calo->GetCellsAbsId()[ipos]; | |
650d1938 | 438 | //if(absId!=absIdMax && cells->GetCellAmplitude(absIdMax) > 0.01) |
439 | if(cells->GetCellAmplitude(absIdMax) > 0.1) | |
fad96885 | 440 | { |
441 | Double_t time = cells->GetCellTime(absId); | |
650d1938 | 442 | Float_t amp = cells->GetCellAmplitude(absId); |
443 | Int_t bc = GetReader()->GetInputEvent()->GetBunchCrossNumber(); | |
444 | GetCaloUtils()->GetEMCALRecoUtils()->AcceptCalibrateCell(absId,bc,amp,time,cells); | |
445 | time*=1e9; | |
fad96885 | 446 | |
650d1938 | 447 | Float_t diff = (tmax-time); |
448 | ||
449 | if(GetReader()->IsInTimeWindow(time,amp)) clusterOKTimeE += amp; | |
450 | else clusterLongTimeE += amp; | |
fad96885 | 451 | |
452 | if(GetReader()->IsPileUpFromSPD()) | |
453 | { | |
454 | fhClusterTimeDiffPileUp[0]->Fill(ecluster, diff); | |
455 | if(!matched) | |
456 | { | |
457 | fhClusterTimeDiffChargedPileUp[0]->Fill(ecluster, diff); | |
458 | if(okPhoton) fhClusterTimeDiffPhotonPileUp[0]->Fill(ecluster, diff); | |
459 | } | |
460 | } | |
461 | ||
462 | if(GetReader()->IsPileUpFromEMCal()) | |
463 | { | |
464 | fhClusterTimeDiffPileUp[1]->Fill(ecluster, diff); | |
465 | if(!matched) | |
466 | { | |
467 | fhClusterTimeDiffChargedPileUp[1]->Fill(ecluster, diff); | |
468 | if(okPhoton) fhClusterTimeDiffPhotonPileUp[1]->Fill(ecluster, diff); | |
469 | } | |
470 | } | |
fc195fd0 | 471 | |
fad96885 | 472 | if(GetReader()->IsPileUpFromSPDOrEMCal()) |
473 | { | |
474 | fhClusterTimeDiffPileUp[2]->Fill(ecluster, diff); | |
475 | if(!matched) | |
476 | { | |
477 | fhClusterTimeDiffChargedPileUp[2]->Fill(ecluster, diff); | |
478 | if(okPhoton) fhClusterTimeDiffPhotonPileUp[2]->Fill(ecluster, diff); | |
479 | } | |
480 | } | |
481 | ||
482 | if(GetReader()->IsPileUpFromSPDAndEMCal()) | |
483 | { | |
484 | fhClusterTimeDiffPileUp[3]->Fill(ecluster, diff); | |
485 | if(!matched) | |
486 | { | |
487 | fhClusterTimeDiffChargedPileUp[3]->Fill(ecluster, diff); | |
488 | if(okPhoton) fhClusterTimeDiffPhotonPileUp[3]->Fill(ecluster, diff); | |
489 | } | |
490 | } | |
491 | ||
492 | if(GetReader()->IsPileUpFromSPDAndNotEMCal()) | |
493 | { | |
494 | fhClusterTimeDiffPileUp[4]->Fill(ecluster, diff); | |
495 | if(!matched) | |
496 | { | |
497 | fhClusterTimeDiffChargedPileUp[4]->Fill(ecluster, diff); | |
498 | if(okPhoton) fhClusterTimeDiffPhotonPileUp[4]->Fill(ecluster, diff); | |
499 | } | |
500 | } | |
501 | ||
502 | if(GetReader()->IsPileUpFromEMCalAndNotSPD()) | |
503 | { | |
504 | fhClusterTimeDiffPileUp[5]->Fill(ecluster, diff); | |
505 | if(!matched) | |
506 | { | |
507 | fhClusterTimeDiffChargedPileUp[5]->Fill(ecluster, diff); | |
508 | if(okPhoton) fhClusterTimeDiffPhotonPileUp[5]->Fill(ecluster, diff); | |
509 | } | |
510 | } | |
511 | ||
512 | if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) | |
513 | { | |
514 | fhClusterTimeDiffPileUp[6]->Fill(ecluster, diff); | |
515 | if(!matched) | |
516 | { | |
517 | fhClusterTimeDiffChargedPileUp[6]->Fill(ecluster, diff); | |
518 | if(okPhoton) fhClusterTimeDiffPhotonPileUp[6]->Fill(ecluster, diff); | |
519 | } | |
520 | } | |
521 | }// Not max | |
522 | }//loop | |
523 | ||
650d1938 | 524 | Float_t frac = 0; |
525 | if(clusterLongTimeE+clusterOKTimeE > 0.001) | |
526 | frac = clusterLongTimeE/(clusterLongTimeE+clusterOKTimeE); | |
527 | //printf("E long %f, E OK %f, Fraction large time %f, E %f\n",clusterLongTimeE,clusterOKTimeE,frac,ecluster); | |
528 | ||
529 | if(GetReader()->IsPileUpFromSPD()) {fhPtPileUp[0]->Fill(ptcluster); fhLambda0PileUp[0]->Fill(ecluster,l0cluster); fhClusterEFracLongTimePileUp[0]->Fill(ecluster,frac);} | |
530 | if(GetReader()->IsPileUpFromEMCal()) {fhPtPileUp[1]->Fill(ptcluster); fhLambda0PileUp[1]->Fill(ecluster,l0cluster); fhClusterEFracLongTimePileUp[1]->Fill(ecluster,frac);} | |
531 | if(GetReader()->IsPileUpFromSPDOrEMCal()) {fhPtPileUp[2]->Fill(ptcluster); fhLambda0PileUp[2]->Fill(ecluster,l0cluster); fhClusterEFracLongTimePileUp[2]->Fill(ecluster,frac);} | |
532 | if(GetReader()->IsPileUpFromSPDAndEMCal()) {fhPtPileUp[3]->Fill(ptcluster); fhLambda0PileUp[3]->Fill(ecluster,l0cluster); fhClusterEFracLongTimePileUp[3]->Fill(ecluster,frac);} | |
533 | if(GetReader()->IsPileUpFromSPDAndNotEMCal()) {fhPtPileUp[4]->Fill(ptcluster); fhLambda0PileUp[4]->Fill(ecluster,l0cluster); fhClusterEFracLongTimePileUp[4]->Fill(ecluster,frac);} | |
534 | if(GetReader()->IsPileUpFromEMCalAndNotSPD()) {fhPtPileUp[5]->Fill(ptcluster); fhLambda0PileUp[5]->Fill(ecluster,l0cluster); fhClusterEFracLongTimePileUp[5]->Fill(ecluster,frac);} | |
535 | if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) {fhPtPileUp[6]->Fill(ptcluster); fhLambda0PileUp[6]->Fill(ecluster,l0cluster); fhClusterEFracLongTimePileUp[6]->Fill(ecluster,frac);} | |
fedea415 | 536 | |
537 | if(tmax > -25 && tmax < 25) {fhEtaPhiBC0 ->Fill(mom.Eta(),mom.Phi()); if(GetReader()->IsPileUpFromSPD()) fhEtaPhiBC0PileUpSPD ->Fill(mom.Eta(),mom.Phi()); } | |
538 | else if (tmax > 25) {fhEtaPhiBCPlus ->Fill(mom.Eta(),mom.Phi()); if(GetReader()->IsPileUpFromSPD()) fhEtaPhiBCPlusPileUpSPD ->Fill(mom.Eta(),mom.Phi()); } | |
539 | else if (tmax <-25) {fhEtaPhiBCMinus->Fill(mom.Eta(),mom.Phi()); if(GetReader()->IsPileUpFromSPD()) fhEtaPhiBCMinusPileUpSPD->Fill(mom.Eta(),mom.Phi()); } | |
fad96885 | 540 | } |
541 | ||
c4a7d28a | 542 | //....................................... |
543 | // TOF cut, BE CAREFUL WITH THIS CUT | |
544 | Double_t tof = calo->GetTOF()*1e9; | |
545 | if(tof < fTimeCutMin || tof > fTimeCutMax) return kFALSE; | |
09273901 | 546 | |
c4a7d28a | 547 | if(GetDebug() > 2) printf("\t Cluster %d Pass Time Cut \n",calo->GetID()); |
09273901 | 548 | |
fad96885 | 549 | fhClusterCuts[3]->Fill(ecluster); |
fc195fd0 | 550 | |
c4a7d28a | 551 | //....................................... |
552 | if(calo->GetNCells() <= fNCellsCut && GetReader()->GetDataType() != AliCaloTrackReader::kMC) return kFALSE; | |
09273901 | 553 | |
c4a7d28a | 554 | if(GetDebug() > 2) printf("\t Cluster %d Pass NCell Cut \n",calo->GetID()); |
09273901 | 555 | |
fad96885 | 556 | fhClusterCuts[4]->Fill(ecluster); |
fc195fd0 | 557 | |
9e51e29a | 558 | if(nMaxima < fNLMCutMin || nMaxima > fNLMCutMax) return kFALSE ; |
559 | if(GetDebug() > 2) printf(" \t Cluster %d pass NLM %d of out of range \n",calo->GetID(), nMaxima); | |
560 | ||
fad96885 | 561 | fhClusterCuts[5]->Fill(ecluster); |
9e51e29a | 562 | |
c4a7d28a | 563 | //....................................... |
564 | //Check acceptance selection | |
34c16486 | 565 | if(IsFiducialCutOn()) |
566 | { | |
c4a7d28a | 567 | Bool_t in = GetFiducialCut()->IsInFiducialCut(mom,fCalorimeter) ; |
568 | if(! in ) return kFALSE ; | |
569 | } | |
09273901 | 570 | |
c4a7d28a | 571 | if(GetDebug() > 2) printf("Fiducial cut passed \n"); |
09273901 | 572 | |
fad96885 | 573 | fhClusterCuts[6]->Fill(ecluster); |
fc195fd0 | 574 | |
c4a7d28a | 575 | //....................................... |
576 | //Skip matched clusters with tracks | |
09273901 | 577 | |
4bfeae64 | 578 | // Fill matching residual histograms before PID cuts |
579 | if(fFillTMHisto) FillTrackMatchingResidualHistograms(calo,0); | |
09273901 | 580 | |
34c16486 | 581 | if(fRejectTrackMatch) |
582 | { | |
583 | if(IsTrackMatched(calo,GetReader()->GetInputEvent())) | |
584 | { | |
c4a7d28a | 585 | if(GetDebug() > 2) printf("\t Reject track-matched clusters\n"); |
586 | return kFALSE ; | |
587 | } | |
588 | else | |
589 | if(GetDebug() > 2) printf(" Track-matching cut passed \n"); | |
590 | }// reject matched clusters | |
09273901 | 591 | |
fad96885 | 592 | fhClusterCuts[7]->Fill(ecluster); |
fc195fd0 | 593 | |
fad96885 | 594 | if(fFillPileUpHistograms) |
595 | { | |
596 | if(GetReader()->IsPileUpFromSPD()) {fhPtChargedPileUp[0]->Fill(ptcluster); fhLambda0ChargedPileUp[0]->Fill(ecluster,l0cluster); } | |
597 | if(GetReader()->IsPileUpFromEMCal()) {fhPtChargedPileUp[1]->Fill(ptcluster); fhLambda0ChargedPileUp[1]->Fill(ecluster,l0cluster); } | |
598 | if(GetReader()->IsPileUpFromSPDOrEMCal()) {fhPtChargedPileUp[2]->Fill(ptcluster); fhLambda0ChargedPileUp[2]->Fill(ecluster,l0cluster); } | |
599 | if(GetReader()->IsPileUpFromSPDAndEMCal()) {fhPtChargedPileUp[3]->Fill(ptcluster); fhLambda0ChargedPileUp[3]->Fill(ecluster,l0cluster); } | |
600 | if(GetReader()->IsPileUpFromSPDAndNotEMCal()) {fhPtChargedPileUp[4]->Fill(ptcluster); fhLambda0ChargedPileUp[4]->Fill(ecluster,l0cluster); } | |
601 | if(GetReader()->IsPileUpFromEMCalAndNotSPD()) {fhPtChargedPileUp[5]->Fill(ptcluster); fhLambda0ChargedPileUp[5]->Fill(ecluster,l0cluster); } | |
602 | if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) {fhPtChargedPileUp[6]->Fill(ptcluster); fhLambda0ChargedPileUp[6]->Fill(ecluster,l0cluster); } | |
603 | } | |
604 | ||
c4a7d28a | 605 | //....................................... |
606 | //Check Distance to Bad channel, set bit. | |
607 | Double_t distBad=calo->GetDistanceToBadChannel() ; //Distance to bad channel | |
608 | if(distBad < 0.) distBad=9999. ; //workout strange convension dist = -1. ; | |
34c16486 | 609 | if(distBad < fMinDist) |
610 | {//In bad channel (PHOS cristal size 2.2x2.2 cm), EMCAL ( cell units ) | |
c4a7d28a | 611 | return kFALSE ; |
612 | } | |
613 | else if(GetDebug() > 2) printf("\t Bad channel cut passed %4.2f > %2.2f \n",distBad, fMinDist); | |
fc195fd0 | 614 | |
fad96885 | 615 | fhClusterCuts[8]->Fill(ecluster); |
09273901 | 616 | |
c4a7d28a | 617 | if(GetDebug() > 0) |
fad96885 | 618 | printf("AliAnaPhoton::ClusterSelected() Current Event %d; After selection : E %2.2f, pT %2.2f, phi %2.2f, eta %2.2f\n", |
c4a7d28a | 619 | GetReader()->GetEventNumber(), |
fad96885 | 620 | ecluster, ptcluster,mom.Phi()*TMath::RadToDeg(),mom.Eta()); |
c4a7d28a | 621 | |
622 | //All checks passed, cluster selected | |
623 | return kTRUE; | |
624 | ||
625 | } | |
626 | ||
34c16486 | 627 | //___________________________________________ |
628 | void AliAnaPhoton::FillAcceptanceHistograms() | |
629 | { | |
3d5d5078 | 630 | //Fill acceptance histograms if MC data is available |
631 | ||
34c16486 | 632 | Double_t photonY = -100 ; |
633 | Double_t photonE = -1 ; | |
634 | Double_t photonPt = -1 ; | |
635 | Double_t photonPhi = 100 ; | |
636 | Double_t photonEta = -1 ; | |
637 | ||
638 | Int_t pdg = 0 ; | |
639 | Int_t tag = 0 ; | |
640 | Int_t mcIndex = 0 ; | |
641 | Bool_t inacceptance = kFALSE; | |
642 | ||
643 | if(GetReader()->ReadStack()) | |
644 | { | |
3d5d5078 | 645 | AliStack * stack = GetMCStack(); |
34c16486 | 646 | if(stack) |
647 | { | |
648 | for(Int_t i=0 ; i<stack->GetNtrack(); i++) | |
649 | { | |
3d5d5078 | 650 | TParticle * prim = stack->Particle(i) ; |
34c16486 | 651 | pdg = prim->GetPdgCode(); |
3d5d5078 | 652 | //printf("i %d, %s %d %s %d \n",i, stack->Particle(i)->GetName(), stack->Particle(i)->GetPdgCode(), |
653 | // prim->GetName(), prim->GetPdgCode()); | |
654 | ||
34c16486 | 655 | if(pdg == 22) |
656 | { | |
3d5d5078 | 657 | // Get tag of this particle photon from fragmentation, decay, prompt ... |
2644ead9 | 658 | tag = GetMCAnalysisUtils()->CheckOrigin(i,GetReader()); |
34c16486 | 659 | if(!GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton)) |
660 | { | |
3d5d5078 | 661 | //A conversion photon from a hadron, skip this kind of photon |
34c16486 | 662 | // printf("AliAnaPhoton::FillAcceptanceHistograms() - not a photon, weird!\n "); |
663 | // GetMCAnalysisUtils()->PrintMCTag(tag); | |
3d5d5078 | 664 | |
665 | return; | |
666 | } | |
667 | ||
668 | //Get photon kinematics | |
669 | if(prim->Energy() == TMath::Abs(prim->Pz())) continue ; //Protection against floating point exception | |
670 | ||
34c16486 | 671 | photonY = 0.5*TMath::Log((prim->Energy()-prim->Pz())/(prim->Energy()+prim->Pz())) ; |
672 | photonE = prim->Energy() ; | |
673 | photonPt = prim->Pt() ; | |
674 | photonPhi = TMath::RadToDeg()*prim->Phi() ; | |
3d5d5078 | 675 | if(photonPhi < 0) photonPhi+=TMath::TwoPi(); |
34c16486 | 676 | photonEta = prim->Eta() ; |
3d5d5078 | 677 | |
678 | //Check if photons hit the Calorimeter | |
679 | TLorentzVector lv; | |
680 | prim->Momentum(lv); | |
34c16486 | 681 | inacceptance = kFALSE; |
682 | if (fCalorimeter == "PHOS") | |
683 | { | |
684 | if(GetPHOSGeometry() && GetCaloUtils()->IsPHOSGeoMatrixSet()) | |
685 | { | |
3d5d5078 | 686 | Int_t mod ; |
687 | Double_t x,z ; | |
688 | if(GetPHOSGeometry()->ImpactOnEmc(prim,mod,z,x)) | |
689 | inacceptance = kTRUE; | |
690 | if(GetDebug() > 2) printf("In %s Real acceptance? %d\n",fCalorimeter.Data(),inacceptance); | |
691 | } | |
34c16486 | 692 | else |
693 | { | |
3d5d5078 | 694 | if(GetFiducialCut()->IsInFiducialCut(lv,fCalorimeter)) |
695 | inacceptance = kTRUE ; | |
696 | if(GetDebug() > 2) printf("In %s fiducial cut acceptance? %d\n",fCalorimeter.Data(),inacceptance); | |
697 | } | |
698 | } | |
34c16486 | 699 | else if(fCalorimeter == "EMCAL" && GetCaloUtils()->IsEMCALGeoMatrixSet()) |
700 | { | |
701 | if(GetEMCALGeometry()) | |
702 | { | |
3d5d5078 | 703 | Int_t absID=0; |
704 | ||
705 | GetEMCALGeometry()->GetAbsCellIdFromEtaPhi(prim->Eta(),prim->Phi(),absID); | |
706 | ||
707 | if( absID >= 0) | |
708 | inacceptance = kTRUE; | |
709 | ||
710 | // if(GetEMCALGeometry()->Impact(phot1) && GetEMCALGeometry()->Impact(phot2)) | |
711 | // inacceptance = kTRUE; | |
712 | if(GetDebug() > 2) printf("In %s Real acceptance? %d\n",fCalorimeter.Data(),inacceptance); | |
713 | } | |
34c16486 | 714 | else |
715 | { | |
3d5d5078 | 716 | if(GetFiducialCut()->IsInFiducialCut(lv,fCalorimeter)) |
717 | inacceptance = kTRUE ; | |
718 | if(GetDebug() > 2) printf("In %s fiducial cut acceptance? %d\n",fCalorimeter.Data(),inacceptance); | |
719 | } | |
720 | } //In EMCAL | |
721 | ||
722 | //Fill histograms | |
c5693f62 | 723 | fhYPrimMC[kmcPPhoton]->Fill(photonPt, photonY) ; |
3d5d5078 | 724 | if(TMath::Abs(photonY) < 1.0) |
725 | { | |
c5693f62 | 726 | fhEPrimMC [kmcPPhoton]->Fill(photonE ) ; |
727 | fhPtPrimMC [kmcPPhoton]->Fill(photonPt) ; | |
728 | fhPhiPrimMC[kmcPPhoton]->Fill(photonE , photonPhi) ; | |
34c16486 | 729 | fhYPrimMC [kmcPPhoton]->Fill(photonE , photonEta) ; |
3d5d5078 | 730 | } |
34c16486 | 731 | if(inacceptance) |
732 | { | |
733 | fhEPrimMCAcc [kmcPPhoton]->Fill(photonE ) ; | |
734 | fhPtPrimMCAcc [kmcPPhoton]->Fill(photonPt) ; | |
c5693f62 | 735 | fhPhiPrimMCAcc[kmcPPhoton]->Fill(photonE , photonPhi) ; |
34c16486 | 736 | fhYPrimMCAcc [kmcPPhoton]->Fill(photonE , photonY) ; |
3d5d5078 | 737 | }//Accepted |
738 | ||
739 | //Origin of photon | |
c5693f62 | 740 | if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt) && fhEPrimMC[kmcPPrompt]) |
3d5d5078 | 741 | { |
34c16486 | 742 | mcIndex = kmcPPrompt; |
3d5d5078 | 743 | } |
c5693f62 | 744 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCFragmentation) && fhEPrimMC[kmcPFragmentation]) |
3d5d5078 | 745 | { |
34c16486 | 746 | mcIndex = kmcPFragmentation ; |
3d5d5078 | 747 | } |
c5693f62 | 748 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCISR) && fhEPrimMC[kmcPISR]) |
3d5d5078 | 749 | { |
34c16486 | 750 | mcIndex = kmcPISR; |
3d5d5078 | 751 | } |
c5693f62 | 752 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay)&& fhEPrimMC[kmcPPi0Decay]) |
3d5d5078 | 753 | { |
34c16486 | 754 | mcIndex = kmcPPi0Decay; |
3d5d5078 | 755 | } |
f586f4aa | 756 | else if( (GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay) || |
c5693f62 | 757 | GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOtherDecay)) && fhEPrimMC[kmcPOtherDecay]) |
3d5d5078 | 758 | { |
34c16486 | 759 | mcIndex = kmcPOtherDecay; |
3d5d5078 | 760 | } |
c5693f62 | 761 | else if(fhEPrimMC[kmcPOther]) |
3d5d5078 | 762 | { |
34c16486 | 763 | mcIndex = kmcPOther; |
3d5d5078 | 764 | }//Other origin |
34c16486 | 765 | |
766 | fhYPrimMC[mcIndex]->Fill(photonPt, photonY) ; | |
767 | if(TMath::Abs(photonY) < 1.0) | |
768 | { | |
769 | fhEPrimMC [mcIndex]->Fill(photonE ) ; | |
770 | fhPtPrimMC [mcIndex]->Fill(photonPt) ; | |
771 | fhPhiPrimMC[mcIndex]->Fill(photonE , photonPhi) ; | |
772 | fhYPrimMC [mcIndex]->Fill(photonE , photonEta) ; | |
773 | } | |
774 | if(inacceptance) | |
775 | { | |
776 | fhEPrimMCAcc [mcIndex]->Fill(photonE ) ; | |
777 | fhPtPrimMCAcc [mcIndex]->Fill(photonPt) ; | |
778 | fhPhiPrimMCAcc[mcIndex]->Fill(photonE , photonPhi) ; | |
779 | fhYPrimMCAcc [mcIndex]->Fill(photonE , photonY) ; | |
780 | }//Accepted | |
781 | ||
3d5d5078 | 782 | }// Primary photon |
783 | }//loop on primaries | |
784 | }//stack exists and data is MC | |
785 | }//read stack | |
34c16486 | 786 | else if(GetReader()->ReadAODMCParticles()) |
787 | { | |
2644ead9 | 788 | TClonesArray * mcparticles = GetReader()->GetAODMCParticles(); |
34c16486 | 789 | if(mcparticles) |
790 | { | |
3d5d5078 | 791 | Int_t nprim = mcparticles->GetEntriesFast(); |
792 | ||
793 | for(Int_t i=0; i < nprim; i++) | |
794 | { | |
795 | AliAODMCParticle * prim = (AliAODMCParticle *) mcparticles->At(i); | |
796 | ||
34c16486 | 797 | pdg = prim->GetPdgCode(); |
3d5d5078 | 798 | |
34c16486 | 799 | if(pdg == 22) |
800 | { | |
3d5d5078 | 801 | // Get tag of this particle photon from fragmentation, decay, prompt ... |
2644ead9 | 802 | tag = GetMCAnalysisUtils()->CheckOrigin(i,GetReader()); |
34c16486 | 803 | if(!GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton)) |
804 | { | |
3d5d5078 | 805 | //A conversion photon from a hadron, skip this kind of photon |
34c16486 | 806 | // printf("AliAnaPhoton::FillAcceptanceHistograms() - not a photon, weird!\n "); |
807 | // GetMCAnalysisUtils()->PrintMCTag(tag); | |
3d5d5078 | 808 | |
809 | return; | |
810 | } | |
811 | ||
812 | //Get photon kinematics | |
813 | if(prim->E() == TMath::Abs(prim->Pz())) continue ; //Protection against floating point exception | |
814 | ||
34c16486 | 815 | photonY = 0.5*TMath::Log((prim->E()-prim->Pz())/(prim->E()+prim->Pz())) ; |
816 | photonE = prim->E() ; | |
817 | photonPt = prim->Pt() ; | |
03734799 | 818 | photonPhi = prim->Phi() ; |
3d5d5078 | 819 | if(photonPhi < 0) photonPhi+=TMath::TwoPi(); |
34c16486 | 820 | photonEta = prim->Eta() ; |
3d5d5078 | 821 | |
822 | //Check if photons hit the Calorimeter | |
823 | TLorentzVector lv; | |
824 | lv.SetPxPyPzE(prim->Px(),prim->Py(),prim->Pz(),prim->E()); | |
34c16486 | 825 | inacceptance = kFALSE; |
826 | if (fCalorimeter == "PHOS") | |
827 | { | |
828 | if(GetPHOSGeometry() && GetCaloUtils()->IsPHOSGeoMatrixSet()) | |
829 | { | |
3d5d5078 | 830 | Int_t mod ; |
831 | Double_t x,z ; | |
832 | Double_t vtx[]={prim->Xv(),prim->Yv(),prim->Zv()}; | |
833 | if(GetPHOSGeometry()->ImpactOnEmc(vtx, prim->Theta(),prim->Phi(),mod,z,x)) | |
834 | inacceptance = kTRUE; | |
835 | if(GetDebug() > 2) printf("In %s Real acceptance? %d\n",fCalorimeter.Data(),inacceptance); | |
836 | } | |
34c16486 | 837 | else |
838 | { | |
3d5d5078 | 839 | if(GetFiducialCut()->IsInFiducialCut(lv,fCalorimeter)) |
840 | inacceptance = kTRUE ; | |
841 | if(GetDebug() > 2) printf("In %s fiducial cut acceptance? %d\n",fCalorimeter.Data(),inacceptance); | |
842 | } | |
843 | } | |
34c16486 | 844 | else if(fCalorimeter == "EMCAL" && GetCaloUtils()->IsEMCALGeoMatrixSet()) |
845 | { | |
846 | if(GetEMCALGeometry()) | |
847 | { | |
3d5d5078 | 848 | Int_t absID=0; |
849 | ||
850 | GetEMCALGeometry()->GetAbsCellIdFromEtaPhi(prim->Eta(),prim->Phi(),absID); | |
851 | ||
852 | if( absID >= 0) | |
853 | inacceptance = kTRUE; | |
854 | ||
855 | if(GetDebug() > 2) printf("In %s Real acceptance? %d\n",fCalorimeter.Data(),inacceptance); | |
856 | } | |
34c16486 | 857 | else |
858 | { | |
3d5d5078 | 859 | if(GetFiducialCut()->IsInFiducialCut(lv,fCalorimeter)) |
860 | inacceptance = kTRUE ; | |
861 | if(GetDebug() > 2) printf("In %s fiducial cut acceptance? %d\n",fCalorimeter.Data(),inacceptance); | |
862 | } | |
863 | } //In EMCAL | |
864 | ||
865 | //Fill histograms | |
866 | ||
c5693f62 | 867 | fhYPrimMC[kmcPPhoton]->Fill(photonPt, photonY) ; |
3d5d5078 | 868 | if(TMath::Abs(photonY) < 1.0) |
869 | { | |
c5693f62 | 870 | fhEPrimMC [kmcPPhoton]->Fill(photonE ) ; |
871 | fhPtPrimMC [kmcPPhoton]->Fill(photonPt) ; | |
872 | fhPhiPrimMC[kmcPPhoton]->Fill(photonE , photonPhi) ; | |
873 | fhYPrimMC[kmcPPhoton]->Fill(photonE , photonEta) ; | |
3d5d5078 | 874 | } |
34c16486 | 875 | |
876 | if(inacceptance) | |
877 | { | |
c5693f62 | 878 | fhEPrimMCAcc[kmcPPhoton] ->Fill(photonE ) ; |
879 | fhPtPrimMCAcc[kmcPPhoton] ->Fill(photonPt) ; | |
880 | fhPhiPrimMCAcc[kmcPPhoton]->Fill(photonE , photonPhi) ; | |
881 | fhYPrimMCAcc[kmcPPhoton] ->Fill(photonE , photonY) ; | |
3d5d5078 | 882 | }//Accepted |
883 | ||
3d5d5078 | 884 | //Origin of photon |
c5693f62 | 885 | if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt) && fhEPrimMC[kmcPPrompt]) |
3d5d5078 | 886 | { |
34c16486 | 887 | mcIndex = kmcPPrompt; |
3d5d5078 | 888 | } |
34c16486 | 889 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCFragmentation) && fhEPrimMC[kmcPFragmentation]) |
3d5d5078 | 890 | { |
34c16486 | 891 | mcIndex = kmcPFragmentation ; |
3d5d5078 | 892 | } |
c5693f62 | 893 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCISR) && fhEPrimMC[kmcPISR]) |
3d5d5078 | 894 | { |
34c16486 | 895 | mcIndex = kmcPISR; |
3d5d5078 | 896 | } |
c5693f62 | 897 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay)&& fhEPrimMC[kmcPPi0Decay]) |
3d5d5078 | 898 | { |
34c16486 | 899 | mcIndex = kmcPPi0Decay; |
3d5d5078 | 900 | } |
34c16486 | 901 | else if( (GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay) || |
902 | GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOtherDecay)) && fhEPrimMC[kmcPOtherDecay]) | |
3d5d5078 | 903 | { |
34c16486 | 904 | mcIndex = kmcPOtherDecay; |
3d5d5078 | 905 | } |
c5693f62 | 906 | else if(fhEPrimMC[kmcPOther]) |
3d5d5078 | 907 | { |
34c16486 | 908 | mcIndex = kmcPOther; |
3d5d5078 | 909 | }//Other origin |
34c16486 | 910 | |
911 | fhYPrimMC[mcIndex]->Fill(photonPt, photonY) ; | |
912 | if(TMath::Abs(photonY) < 1.0) | |
913 | { | |
914 | fhEPrimMC [mcIndex]->Fill(photonE ) ; | |
915 | fhPtPrimMC [mcIndex]->Fill(photonPt) ; | |
916 | fhPhiPrimMC[mcIndex]->Fill(photonE , photonPhi) ; | |
917 | fhYPrimMC [mcIndex]->Fill(photonE , photonEta) ; | |
918 | } | |
919 | if(inacceptance) | |
920 | { | |
921 | fhEPrimMCAcc [mcIndex]->Fill(photonE ) ; | |
922 | fhPtPrimMCAcc [mcIndex]->Fill(photonPt) ; | |
923 | fhPhiPrimMCAcc[mcIndex]->Fill(photonE , photonPhi) ; | |
924 | fhYPrimMCAcc [mcIndex]->Fill(photonE , photonY) ; | |
925 | }//Accepted | |
926 | ||
3d5d5078 | 927 | }// Primary photon |
928 | }//loop on primaries | |
929 | ||
c5693f62 | 930 | }//kmc array exists and data is MC |
3d5d5078 | 931 | } // read AOD MC |
932 | } | |
521636d2 | 933 | |
2ad19c3d | 934 | //___________________________________________________________________ |
acd56ca4 | 935 | void AliAnaPhoton::FillPileUpHistogramsPerEvent(TObjArray * clusters) |
936 | { | |
937 | // Fill some histograms per event to understand pile-up | |
6227a9fd | 938 | // Open the time cut in the reader to be more meaningful |
939 | ||
acd56ca4 | 940 | if(!fFillPileUpHistograms) return; |
941 | ||
942 | // Loop on clusters, get the maximum energy cluster as reference | |
943 | Int_t nclusters = clusters->GetEntriesFast(); | |
944 | Int_t idMax = 0; | |
945 | Float_t eMax = 0; | |
946 | Float_t tMax = 0; | |
947 | for(Int_t iclus = 0; iclus < nclusters ; iclus++) | |
948 | { | |
949 | AliVCluster * clus = (AliVCluster*) (clusters->At(iclus)); | |
6227a9fd | 950 | if(clus->E() > eMax && TMath::Abs(clus->GetTOF()*1e9) < 20) |
acd56ca4 | 951 | { |
952 | eMax = clus->E(); | |
953 | tMax = clus->GetTOF()*1e9; | |
954 | idMax = iclus; | |
955 | } | |
956 | } | |
957 | ||
6227a9fd | 958 | if(eMax < 5) return; |
acd56ca4 | 959 | |
960 | // Loop again on clusters to compare this max cluster t and the rest of the clusters, if E > 0.3 | |
961 | Int_t n20 = 0; | |
962 | Int_t n40 = 0; | |
963 | Int_t n = 0; | |
964 | Int_t nOK = 0; | |
965 | ||
966 | for(Int_t iclus = 0; iclus < nclusters ; iclus++) | |
967 | { | |
968 | AliVCluster * clus = (AliVCluster*) (clusters->At(iclus)); | |
969 | ||
970 | if(clus->E() < 0.3 || iclus==idMax) continue; | |
971 | ||
972 | Float_t tdiff = TMath::Abs(tMax-clus->GetTOF()*1e9); | |
973 | n++; | |
974 | if(tdiff < 20) nOK++; | |
975 | else | |
976 | { | |
977 | n20++; | |
978 | if(tdiff > 40 ) n40++; | |
979 | } | |
980 | } | |
981 | ||
982 | // Check pile-up and fill histograms depending on the different cluster multiplicities | |
983 | if(GetReader()->IsPileUpFromSPD()) | |
984 | { | |
985 | fhClusterMultSPDPileUp[0]->Fill(eMax,n ); | |
986 | fhClusterMultSPDPileUp[1]->Fill(eMax,nOK); | |
987 | fhClusterMultSPDPileUp[2]->Fill(eMax,n20); | |
988 | fhClusterMultSPDPileUp[3]->Fill(eMax,n40); | |
989 | } | |
990 | else | |
991 | { | |
992 | fhClusterMultNoPileUp[0]->Fill(eMax,n ); | |
993 | fhClusterMultNoPileUp[1]->Fill(eMax,nOK); | |
994 | fhClusterMultNoPileUp[2]->Fill(eMax,n20); | |
995 | fhClusterMultNoPileUp[3]->Fill(eMax,n40); | |
996 | } | |
997 | ||
998 | } | |
999 | ||
1000 | ||
fad96885 | 1001 | //_________________________________________________________________________________________________ |
22ad7981 | 1002 | void AliAnaPhoton::FillPileUpHistograms(Float_t energy, Float_t pt, Float_t time) |
2ad19c3d | 1003 | { |
1004 | // Fill some histograms to understand pile-up | |
1005 | if(!fFillPileUpHistograms) return; | |
1006 | ||
1007 | //printf("E %f, time %f\n",energy,time); | |
1008 | AliVEvent * event = GetReader()->GetInputEvent(); | |
1009 | ||
fad96885 | 1010 | if(GetReader()->IsPileUpFromSPD()) fhPtPhotonPileUp[0]->Fill(pt); |
1011 | if(GetReader()->IsPileUpFromEMCal()) fhPtPhotonPileUp[1]->Fill(pt); | |
1012 | if(GetReader()->IsPileUpFromSPDOrEMCal()) fhPtPhotonPileUp[2]->Fill(pt); | |
1013 | if(GetReader()->IsPileUpFromSPDAndEMCal()) fhPtPhotonPileUp[3]->Fill(pt); | |
1014 | if(GetReader()->IsPileUpFromSPDAndNotEMCal()) fhPtPhotonPileUp[4]->Fill(pt); | |
1015 | if(GetReader()->IsPileUpFromEMCalAndNotSPD()) fhPtPhotonPileUp[5]->Fill(pt); | |
1016 | if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) fhPtPhotonPileUp[6]->Fill(pt); | |
1017 | ||
2ad19c3d | 1018 | fhTimeENoCut->Fill(energy,time); |
1019 | if(GetReader()->IsPileUpFromSPD()) fhTimeESPD ->Fill(energy,time); | |
1020 | if(event->IsPileupFromSPDInMultBins()) fhTimeESPDMulti->Fill(energy,time); | |
1021 | ||
de101942 | 1022 | if(energy < 8) return; // Fill time figures for high energy clusters not too close to trigger threshold |
2ad19c3d | 1023 | |
1024 | AliESDEvent* esdEv = dynamic_cast<AliESDEvent*> (event); | |
1025 | AliAODEvent* aodEv = dynamic_cast<AliAODEvent*> (event); | |
1026 | ||
1027 | // N pile up vertices | |
1028 | Int_t nVerticesSPD = -1; | |
1029 | Int_t nVerticesTracks = -1; | |
1030 | ||
1031 | if (esdEv) | |
1032 | { | |
1033 | nVerticesSPD = esdEv->GetNumberOfPileupVerticesSPD(); | |
1034 | nVerticesTracks = esdEv->GetNumberOfPileupVerticesTracks(); | |
1035 | ||
1036 | }//ESD | |
1037 | else if (aodEv) | |
1038 | { | |
1039 | nVerticesSPD = aodEv->GetNumberOfPileupVerticesSPD(); | |
1040 | nVerticesTracks = aodEv->GetNumberOfPileupVerticesTracks(); | |
1041 | }//AOD | |
1042 | ||
1043 | fhTimeNPileUpVertSPD ->Fill(time,nVerticesSPD); | |
1044 | fhTimeNPileUpVertTrack->Fill(time,nVerticesTracks); | |
1045 | ||
1046 | //printf("Is SPD %d, Is SPD Multi %d, n spd %d, n track %d\n", | |
1047 | // GetReader()->IsPileUpFromSPD(),event->IsPileupFromSPDInMultBins(),nVerticesSPD,nVerticesTracks); | |
1048 | ||
1049 | Int_t ncont = -1; | |
5559f30a | 1050 | Float_t z1 = -1, z2 = -1; |
2ad19c3d | 1051 | Float_t diamZ = -1; |
1052 | for(Int_t iVert=0; iVert<nVerticesSPD;iVert++) | |
1053 | { | |
1054 | if (esdEv) | |
1055 | { | |
1056 | const AliESDVertex* pv=esdEv->GetPileupVertexSPD(iVert); | |
1057 | ncont=pv->GetNContributors(); | |
1058 | z1 = esdEv->GetPrimaryVertexSPD()->GetZ(); | |
1059 | z2 = pv->GetZ(); | |
1060 | diamZ = esdEv->GetDiamondZ(); | |
1061 | }//ESD | |
1062 | else if (aodEv) | |
1063 | { | |
1064 | AliAODVertex *pv=aodEv->GetVertex(iVert); | |
1065 | if(pv->GetType()!=AliAODVertex::kPileupSPD) continue; | |
1066 | ncont=pv->GetNContributors(); | |
1067 | z1=aodEv->GetPrimaryVertexSPD()->GetZ(); | |
1068 | z2=pv->GetZ(); | |
1069 | diamZ = aodEv->GetDiamondZ(); | |
1070 | }// AOD | |
1071 | ||
1072 | Double_t distZ = TMath::Abs(z2-z1); | |
1073 | diamZ = TMath::Abs(z2-diamZ); | |
1074 | ||
1075 | fhTimeNPileUpVertContributors ->Fill(time,ncont); | |
1076 | fhTimePileUpMainVertexZDistance->Fill(time,distZ); | |
1077 | fhTimePileUpMainVertexZDiamond ->Fill(time,diamZ); | |
1078 | ||
1079 | }// loop | |
1080 | } | |
1081 | ||
34c16486 | 1082 | //____________________________________________________________________________________ |
22ad7981 | 1083 | void AliAnaPhoton::FillShowerShapeHistograms(AliVCluster* cluster, Int_t mcTag) |
34c16486 | 1084 | { |
1085 | //Fill cluster Shower Shape histograms | |
521636d2 | 1086 | |
1087 | if(!fFillSSHistograms || GetMixedEvent()) return; | |
8d6b7f60 | 1088 | |
521636d2 | 1089 | Float_t energy = cluster->E(); |
1090 | Int_t ncells = cluster->GetNCells(); | |
521636d2 | 1091 | Float_t lambda0 = cluster->GetM02(); |
1092 | Float_t lambda1 = cluster->GetM20(); | |
1093 | Float_t disp = cluster->GetDispersion()*cluster->GetDispersion(); | |
1094 | ||
1095 | TLorentzVector mom; | |
34c16486 | 1096 | if(GetReader()->GetDataType() != AliCaloTrackReader::kMC) |
1097 | { | |
1098 | cluster->GetMomentum(mom,GetVertex(0)) ; | |
1099 | }//Assume that come from vertex in straight line | |
1100 | else | |
1101 | { | |
521636d2 | 1102 | Double_t vertex[]={0,0,0}; |
1103 | cluster->GetMomentum(mom,vertex) ; | |
1104 | } | |
1105 | ||
1106 | Float_t eta = mom.Eta(); | |
1107 | Float_t phi = mom.Phi(); | |
1108 | if(phi < 0) phi+=TMath::TwoPi(); | |
1109 | ||
1110 | fhLam0E ->Fill(energy,lambda0); | |
1111 | fhLam1E ->Fill(energy,lambda1); | |
1112 | fhDispE ->Fill(energy,disp); | |
b5dbb99b | 1113 | |
34c16486 | 1114 | if(fCalorimeter == "EMCAL" && GetModuleNumber(cluster) > 5) |
1115 | { | |
521636d2 | 1116 | fhLam0ETRD->Fill(energy,lambda0); |
1117 | fhLam1ETRD->Fill(energy,lambda1); | |
1118 | fhDispETRD->Fill(energy,disp); | |
521636d2 | 1119 | } |
1120 | ||
34c16486 | 1121 | Float_t l0 = 0., l1 = 0.; |
1122 | Float_t dispp= 0., dEta = 0., dPhi = 0.; | |
1123 | Float_t sEta = 0., sPhi = 0., sEtaPhi = 0.; | |
764ab1f4 | 1124 | if(fCalorimeter == "EMCAL" && !fFillOnlySimpleSSHisto) |
34c16486 | 1125 | { |
1126 | GetCaloUtils()->GetEMCALRecoUtils()->RecalculateClusterShowerShapeParameters(GetEMCALGeometry(), GetReader()->GetInputEvent()->GetEMCALCells(), cluster, | |
1127 | l0, l1, dispp, dEta, dPhi, sEta, sPhi, sEtaPhi); | |
1128 | //printf("AliAnaPhoton::FillShowerShapeHistogram - l0 %2.6f, l1 %2.6f, disp %2.6f, dEta %2.6f, dPhi %2.6f, sEta %2.6f, sPhi %2.6f, sEtaPhi %2.6f \n", | |
1129 | // l0, l1, dispp, dEta, dPhi, sEta, sPhi, sEtaPhi ); | |
1130 | //printf("AliAnaPhoton::FillShowerShapeHistogram - dispersion %f, dispersion eta+phi %f \n", | |
1131 | // disp, dPhi+dEta ); | |
1132 | fhDispEtaE -> Fill(energy,dEta); | |
1133 | fhDispPhiE -> Fill(energy,dPhi); | |
1134 | fhSumEtaE -> Fill(energy,sEta); | |
1135 | fhSumPhiE -> Fill(energy,sPhi); | |
1136 | fhSumEtaPhiE -> Fill(energy,sEtaPhi); | |
1137 | fhDispEtaPhiDiffE -> Fill(energy,dPhi-dEta); | |
1138 | if(dEta+dPhi>0)fhSphericityE -> Fill(energy,(dPhi-dEta)/(dEta+dPhi)); | |
1139 | if(dEta+sEta>0)fhDispSumEtaDiffE -> Fill(energy,(dEta-sEta)/((dEta+sEta)/2.)); | |
1140 | if(dPhi+sPhi>0)fhDispSumPhiDiffE -> Fill(energy,(dPhi-sPhi)/((dPhi+sPhi)/2.)); | |
1141 | ||
bfdcf7fb | 1142 | Int_t ebin = -1; |
1143 | if (energy < 2 ) ebin = 0; | |
1144 | else if (energy < 4 ) ebin = 1; | |
1145 | else if (energy < 6 ) ebin = 2; | |
1146 | else if (energy < 10) ebin = 3; | |
d2655d46 | 1147 | else if (energy < 15) ebin = 4; |
1148 | else if (energy < 20) ebin = 5; | |
1149 | else ebin = 6; | |
bfdcf7fb | 1150 | |
1151 | fhDispEtaDispPhi[ebin]->Fill(dEta ,dPhi); | |
1152 | fhLambda0DispEta[ebin]->Fill(lambda0,dEta); | |
1153 | fhLambda0DispPhi[ebin]->Fill(lambda0,dPhi); | |
1154 | ||
34c16486 | 1155 | } |
1156 | ||
b5dbb99b | 1157 | // if track-matching was of, check effect of track-matching residual cut |
1158 | ||
1159 | if(!fRejectTrackMatch) | |
1160 | { | |
1161 | Float_t dZ = cluster->GetTrackDz(); | |
1162 | Float_t dR = cluster->GetTrackDx(); | |
34c16486 | 1163 | if(cluster->IsEMCAL() && GetCaloUtils()->IsRecalculationOfClusterTrackMatchingOn()) |
1164 | { | |
b5dbb99b | 1165 | dR = 2000., dZ = 2000.; |
1166 | GetCaloUtils()->GetEMCALRecoUtils()->GetMatchedResiduals(cluster->GetID(),dZ,dR); | |
1167 | } | |
1168 | ||
1169 | if(TMath::Abs(dZ) < 0.05 && TMath::Abs(dR) < 0.05) | |
1170 | { | |
1171 | fhLam0ETM ->Fill(energy,lambda0); | |
1172 | fhLam1ETM ->Fill(energy,lambda1); | |
1173 | fhDispETM ->Fill(energy,disp); | |
1174 | ||
34c16486 | 1175 | if(fCalorimeter == "EMCAL" && GetModuleNumber(cluster) > 5) |
1176 | { | |
b5dbb99b | 1177 | fhLam0ETMTRD->Fill(energy,lambda0); |
1178 | fhLam1ETMTRD->Fill(energy,lambda1); | |
1179 | fhDispETMTRD->Fill(energy,disp); | |
1180 | } | |
1181 | } | |
1182 | }// if track-matching was of, check effect of matching residual cut | |
1183 | ||
764ab1f4 | 1184 | |
1185 | if(!fFillOnlySimpleSSHisto){ | |
1186 | if(energy < 2) | |
1187 | { | |
1188 | fhNCellsLam0LowE ->Fill(ncells,lambda0); | |
1189 | fhNCellsLam1LowE ->Fill(ncells,lambda1); | |
1190 | fhNCellsDispLowE ->Fill(ncells,disp); | |
1191 | ||
1192 | fhLam1Lam0LowE ->Fill(lambda1,lambda0); | |
1193 | fhLam0DispLowE ->Fill(lambda0,disp); | |
1194 | fhDispLam1LowE ->Fill(disp,lambda1); | |
1195 | fhEtaLam0LowE ->Fill(eta,lambda0); | |
1196 | fhPhiLam0LowE ->Fill(phi,lambda0); | |
1197 | } | |
1198 | else | |
1199 | { | |
1200 | fhNCellsLam0HighE ->Fill(ncells,lambda0); | |
1201 | fhNCellsLam1HighE ->Fill(ncells,lambda1); | |
1202 | fhNCellsDispHighE ->Fill(ncells,disp); | |
1203 | ||
1204 | fhLam1Lam0HighE ->Fill(lambda1,lambda0); | |
1205 | fhLam0DispHighE ->Fill(lambda0,disp); | |
1206 | fhDispLam1HighE ->Fill(disp,lambda1); | |
1207 | fhEtaLam0HighE ->Fill(eta, lambda0); | |
1208 | fhPhiLam0HighE ->Fill(phi, lambda0); | |
1209 | } | |
521636d2 | 1210 | } |
34c16486 | 1211 | if(IsDataMC()) |
1212 | { | |
f66d95af | 1213 | AliVCaloCells* cells = 0; |
1214 | if(fCalorimeter == "EMCAL") cells = GetEMCALCells(); | |
1215 | else cells = GetPHOSCells(); | |
3d5d5078 | 1216 | |
1217 | //Fill histograms to check shape of embedded clusters | |
1218 | Float_t fraction = 0; | |
727a309a | 1219 | // printf("check embedding %i\n",GetReader()->IsEmbeddedClusterSelectionOn()); |
1220 | ||
34c16486 | 1221 | if(GetReader()->IsEmbeddedClusterSelectionOn()) |
1222 | {//Only working for EMCAL | |
5445bdea | 1223 | // printf("embedded\n"); |
3d5d5078 | 1224 | Float_t clusterE = 0; // recalculate in case corrections applied. |
1225 | Float_t cellE = 0; | |
34c16486 | 1226 | for(Int_t icell = 0; icell < cluster->GetNCells(); icell++) |
1227 | { | |
3d5d5078 | 1228 | cellE = cells->GetCellAmplitude(cluster->GetCellAbsId(icell)); |
1229 | clusterE+=cellE; | |
1230 | fraction+=cellE*cluster->GetCellAmplitudeFraction(icell); | |
1231 | } | |
1232 | ||
1233 | //Fraction of total energy due to the embedded signal | |
1234 | fraction/=clusterE; | |
1235 | ||
8d6b7f60 | 1236 | if(GetDebug() > 1 ) |
1237 | printf("AliAnaPhoton::FillShowerShapeHistogram() - Energy fraction of embedded signal %2.3f, Energy %2.3f\n",fraction, clusterE); | |
3d5d5078 | 1238 | |
1239 | fhEmbeddedSignalFractionEnergy->Fill(clusterE,fraction); | |
1240 | ||
1241 | } // embedded fraction | |
1242 | ||
f66d95af | 1243 | // Get the fraction of the cluster energy that carries the cell with highest energy |
34c16486 | 1244 | Int_t absID =-1 ; |
f66d95af | 1245 | Float_t maxCellFraction = 0.; |
1246 | ||
1247 | absID = GetCaloUtils()->GetMaxEnergyCell(cells, cluster,maxCellFraction); | |
1248 | ||
1249 | // Check the origin and fill histograms | |
34c16486 | 1250 | |
1251 | Int_t mcIndex = -1; | |
1252 | ||
1253 | if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) && | |
3d5d5078 | 1254 | !GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCConversion) && |
34c16486 | 1255 | !GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0) && |
1256 | !GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta)) | |
1257 | { | |
1258 | mcIndex = kmcssPhoton ; | |
1259 | ||
1260 | if(!GetReader()->IsEmbeddedClusterSelectionOn()) | |
1261 | { | |
3d5d5078 | 1262 | //Check particle overlaps in cluster |
1263 | ||
8d6b7f60 | 1264 | // Compare the primary depositing more energy with the rest, |
1265 | // if no photon/electron as comon ancestor (conversions), count as other particle | |
3d5d5078 | 1266 | Int_t ancPDG = 0, ancStatus = -1; |
1267 | TLorentzVector momentum; TVector3 prodVertex; | |
1268 | Int_t ancLabel = 0; | |
1269 | Int_t noverlaps = 1; | |
34c16486 | 1270 | for (UInt_t ilab = 0; ilab < cluster->GetNLabels(); ilab++ ) |
1271 | { | |
1272 | ancLabel = GetMCAnalysisUtils()->CheckCommonAncestor(cluster->GetLabels()[0],cluster->GetLabels()[ilab], | |
1273 | GetReader(),ancPDG,ancStatus,momentum,prodVertex); | |
3d5d5078 | 1274 | if(ancPDG!=22 && TMath::Abs(ancPDG)!=11) noverlaps++; |
1275 | } | |
8d6b7f60 | 1276 | //printf("N overlaps %d \n",noverlaps); |
3d5d5078 | 1277 | |
34c16486 | 1278 | if(noverlaps == 1) |
1279 | { | |
3d5d5078 | 1280 | fhMCPhotonELambda0NoOverlap ->Fill(energy, lambda0); |
3d5d5078 | 1281 | } |
34c16486 | 1282 | else if(noverlaps == 2) |
1283 | { | |
3d5d5078 | 1284 | fhMCPhotonELambda0TwoOverlap ->Fill(energy, lambda0); |
3d5d5078 | 1285 | } |
34c16486 | 1286 | else if(noverlaps > 2) |
1287 | { | |
3d5d5078 | 1288 | fhMCPhotonELambda0NOverlap ->Fill(energy, lambda0); |
3d5d5078 | 1289 | } |
34c16486 | 1290 | else |
1291 | { | |
3d5d5078 | 1292 | printf("AliAnaPhoton::FillShowerShapeHistogram() - n overlaps = %d!!", noverlaps); |
1293 | } | |
1294 | }//No embedding | |
1295 | ||
1296 | //Fill histograms to check shape of embedded clusters | |
34c16486 | 1297 | if(GetReader()->IsEmbeddedClusterSelectionOn()) |
1298 | { | |
3d5d5078 | 1299 | if (fraction > 0.9) |
1300 | { | |
1301 | fhEmbedPhotonELambda0FullSignal ->Fill(energy, lambda0); | |
3d5d5078 | 1302 | } |
1303 | else if(fraction > 0.5) | |
1304 | { | |
1305 | fhEmbedPhotonELambda0MostlySignal ->Fill(energy, lambda0); | |
3d5d5078 | 1306 | } |
1307 | else if(fraction > 0.1) | |
1308 | { | |
1309 | fhEmbedPhotonELambda0MostlyBkg ->Fill(energy, lambda0); | |
3d5d5078 | 1310 | } |
1311 | else | |
1312 | { | |
1313 | fhEmbedPhotonELambda0FullBkg ->Fill(energy, lambda0); | |
3d5d5078 | 1314 | } |
1315 | } // embedded | |
1316 | ||
521636d2 | 1317 | }//photon no conversion |
34c16486 | 1318 | else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCElectron)) |
1319 | { | |
1320 | mcIndex = kmcssElectron ; | |
521636d2 | 1321 | }//electron |
3d5d5078 | 1322 | else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) && |
34c16486 | 1323 | GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCConversion) ) |
1324 | { | |
1325 | mcIndex = kmcssConversion ; | |
521636d2 | 1326 | }//conversion photon |
34c16486 | 1327 | else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0) ) |
1328 | { | |
1329 | mcIndex = kmcssPi0 ; | |
3d5d5078 | 1330 | |
1331 | //Fill histograms to check shape of embedded clusters | |
34c16486 | 1332 | if(GetReader()->IsEmbeddedClusterSelectionOn()) |
1333 | { | |
3d5d5078 | 1334 | if (fraction > 0.9) |
1335 | { | |
1336 | fhEmbedPi0ELambda0FullSignal ->Fill(energy, lambda0); | |
3d5d5078 | 1337 | } |
1338 | else if(fraction > 0.5) | |
1339 | { | |
1340 | fhEmbedPi0ELambda0MostlySignal ->Fill(energy, lambda0); | |
3d5d5078 | 1341 | } |
1342 | else if(fraction > 0.1) | |
1343 | { | |
1344 | fhEmbedPi0ELambda0MostlyBkg ->Fill(energy, lambda0); | |
3d5d5078 | 1345 | } |
1346 | else | |
1347 | { | |
1348 | fhEmbedPi0ELambda0FullBkg ->Fill(energy, lambda0); | |
3d5d5078 | 1349 | } |
1350 | } // embedded | |
1351 | ||
521636d2 | 1352 | }//pi0 |
34c16486 | 1353 | else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta) ) |
1354 | { | |
1355 | mcIndex = kmcssEta ; | |
3d5d5078 | 1356 | }//eta |
34c16486 | 1357 | else |
1358 | { | |
1359 | mcIndex = kmcssOther ; | |
521636d2 | 1360 | }//other particles |
1361 | ||
34c16486 | 1362 | fhMCELambda0 [mcIndex]->Fill(energy, lambda0); |
1363 | fhMCELambda1 [mcIndex]->Fill(energy, lambda1); | |
1364 | fhMCEDispersion [mcIndex]->Fill(energy, disp); | |
1365 | fhMCNCellsE [mcIndex]->Fill(energy, ncells); | |
1366 | fhMCMaxCellDiffClusterE[mcIndex]->Fill(energy, maxCellFraction); | |
1367 | ||
764ab1f4 | 1368 | if(!fFillOnlySimpleSSHisto) |
34c16486 | 1369 | { |
764ab1f4 | 1370 | if (energy < 2.) |
1371 | { | |
1372 | fhMCLambda0vsClusterMaxCellDiffE0[mcIndex]->Fill(lambda0, maxCellFraction); | |
1373 | fhMCNCellsvsClusterMaxCellDiffE0 [mcIndex]->Fill(ncells, maxCellFraction); | |
1374 | } | |
1375 | else if(energy < 6.) | |
1376 | { | |
1377 | fhMCLambda0vsClusterMaxCellDiffE2[mcIndex]->Fill(lambda0, maxCellFraction); | |
1378 | fhMCNCellsvsClusterMaxCellDiffE2 [mcIndex]->Fill(ncells, maxCellFraction); | |
1379 | } | |
1380 | else | |
1381 | { | |
1382 | fhMCLambda0vsClusterMaxCellDiffE6[mcIndex]->Fill(lambda0, maxCellFraction); | |
1383 | fhMCNCellsvsClusterMaxCellDiffE6 [mcIndex]->Fill(ncells, maxCellFraction); | |
1384 | } | |
1385 | ||
1386 | if(fCalorimeter == "EMCAL") | |
1387 | { | |
1388 | fhMCEDispEta [mcIndex]-> Fill(energy,dEta); | |
1389 | fhMCEDispPhi [mcIndex]-> Fill(energy,dPhi); | |
1390 | fhMCESumEtaPhi [mcIndex]-> Fill(energy,sEtaPhi); | |
1391 | fhMCEDispEtaPhiDiff [mcIndex]-> Fill(energy,dPhi-dEta); | |
1392 | if(dEta+dPhi>0)fhMCESphericity[mcIndex]-> Fill(energy,(dPhi-dEta)/(dEta+dPhi)); | |
1393 | ||
1394 | Int_t ebin = -1; | |
1395 | if (energy < 2 ) ebin = 0; | |
1396 | else if (energy < 4 ) ebin = 1; | |
1397 | else if (energy < 6 ) ebin = 2; | |
1398 | else if (energy < 10) ebin = 3; | |
1399 | else if (energy < 15) ebin = 4; | |
1400 | else if (energy < 20) ebin = 5; | |
1401 | else ebin = 6; | |
1402 | ||
1403 | fhMCDispEtaDispPhi[ebin][mcIndex]->Fill(dEta ,dPhi); | |
1404 | fhMCLambda0DispEta[ebin][mcIndex]->Fill(lambda0,dEta); | |
1405 | fhMCLambda0DispPhi[ebin][mcIndex]->Fill(lambda0,dPhi); | |
1406 | } | |
34c16486 | 1407 | } |
521636d2 | 1408 | }//MC data |
1409 | ||
1410 | } | |
1411 | ||
4bfeae64 | 1412 | //__________________________________________________________________________ |
1413 | void AliAnaPhoton::FillTrackMatchingResidualHistograms(AliVCluster* cluster, | |
22ad7981 | 1414 | Int_t cut) |
4bfeae64 | 1415 | { |
1416 | // If selected, fill histograms with residuals of matched clusters, help to define track matching cut | |
1417 | // Residual filled for different cuts 0 (No cut), after 1 PID cut | |
1418 | ||
1419 | Float_t dZ = cluster->GetTrackDz(); | |
1420 | Float_t dR = cluster->GetTrackDx(); | |
1421 | ||
1422 | if(cluster->IsEMCAL() && GetCaloUtils()->IsRecalculationOfClusterTrackMatchingOn()) | |
1423 | { | |
1424 | dR = 2000., dZ = 2000.; | |
1425 | GetCaloUtils()->GetEMCALRecoUtils()->GetMatchedResiduals(cluster->GetID(),dZ,dR); | |
1426 | } | |
1427 | ||
1428 | if(fhTrackMatchedDEta[cut] && TMath::Abs(dR) < 999) | |
1429 | { | |
1430 | fhTrackMatchedDEta[cut]->Fill(cluster->E(),dZ); | |
1431 | fhTrackMatchedDPhi[cut]->Fill(cluster->E(),dR); | |
1432 | ||
1433 | if(cluster->E() > 0.5) fhTrackMatchedDEtaDPhi[cut]->Fill(dZ,dR); | |
1434 | ||
1435 | Int_t nSMod = GetModuleNumber(cluster); | |
1436 | ||
1437 | if(fCalorimeter=="EMCAL" && nSMod > 5) | |
1438 | { | |
1439 | fhTrackMatchedDEtaTRD[cut]->Fill(cluster->E(),dZ); | |
1440 | fhTrackMatchedDPhiTRD[cut]->Fill(cluster->E(),dR); | |
1441 | } | |
1442 | ||
1443 | // Check dEdx and E/p of matched clusters | |
1444 | ||
1445 | if(TMath::Abs(dZ) < 0.05 && TMath::Abs(dR) < 0.05) | |
1446 | { | |
1447 | ||
1448 | AliVTrack *track = GetCaloUtils()->GetMatchedTrack(cluster, GetReader()->GetInputEvent()); | |
1449 | ||
1450 | if(track) | |
1451 | { | |
1452 | ||
1453 | Float_t dEdx = track->GetTPCsignal(); | |
1454 | Float_t eOverp = cluster->E()/track->P(); | |
1455 | ||
1456 | fhdEdx[cut] ->Fill(cluster->E(), dEdx); | |
1457 | fhEOverP[cut]->Fill(cluster->E(), eOverp); | |
1458 | ||
1459 | if(fCalorimeter=="EMCAL" && nSMod > 5) | |
1460 | fhEOverPTRD[cut]->Fill(cluster->E(), eOverp); | |
1461 | ||
1462 | ||
1463 | } | |
1464 | else | |
1465 | printf("AliAnaPhoton::FillTrackMatchingResidualHistograms() - Residual OK but (dR, dZ)= (%2.4f,%2.4f) no track associated WHAT? \n", dR,dZ); | |
1466 | ||
1467 | ||
1468 | ||
1469 | if(IsDataMC()) | |
1470 | { | |
1471 | ||
2644ead9 | 1472 | Int_t tag = GetMCAnalysisUtils()->CheckOrigin(cluster->GetLabels(),cluster->GetNLabels(),GetReader()); |
4bfeae64 | 1473 | |
1474 | if ( !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCConversion) ) | |
1475 | { | |
1476 | if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) || | |
1477 | GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) ) fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 2.5 ); | |
1478 | else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) ) fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 0.5 ); | |
1479 | else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron) ) fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 1.5 ); | |
1480 | else fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 3.5 ); | |
1481 | ||
1482 | // Check if several particles contributed to cluster and discard overlapped mesons | |
1483 | if(!GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) || | |
34c16486 | 1484 | !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta)) |
1485 | { | |
4bfeae64 | 1486 | if(cluster->GetNLabels()==1) |
1487 | { | |
1488 | fhTrackMatchedDEtaMCNoOverlap[cut]->Fill(cluster->E(),dZ); | |
1489 | fhTrackMatchedDPhiMCNoOverlap[cut]->Fill(cluster->E(),dR); | |
1490 | } | |
1491 | else | |
1492 | { | |
1493 | fhTrackMatchedDEtaMCOverlap[cut]->Fill(cluster->E(),dZ); | |
1494 | fhTrackMatchedDPhiMCOverlap[cut]->Fill(cluster->E(),dR); | |
1495 | } | |
1496 | ||
1497 | }// Check overlaps | |
1498 | ||
1499 | } | |
1500 | else | |
1501 | { | |
1502 | if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) || | |
1503 | GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) ) fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 6.5 ); | |
1504 | else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) ) fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 4.5 ); | |
1505 | else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron) ) fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 5.5 ); | |
1506 | else fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 7.5 ); | |
1507 | ||
1508 | // Check if several particles contributed to cluster | |
1509 | if(!GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) || | |
34c16486 | 1510 | !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta)) |
1511 | { | |
4bfeae64 | 1512 | fhTrackMatchedDEtaMCConversion[cut]->Fill(cluster->E(),dZ); |
1513 | fhTrackMatchedDPhiMCConversion[cut]->Fill(cluster->E(),dR); | |
1514 | ||
1515 | }// Check overlaps | |
1516 | ||
1517 | } | |
1518 | ||
1519 | } // MC | |
1520 | ||
1521 | } // residuals window | |
1522 | ||
1523 | } // Small residual | |
1524 | ||
1525 | } | |
1526 | ||
1527 | //___________________________________________ | |
0c1383b5 | 1528 | TObjString * AliAnaPhoton::GetAnalysisCuts() |
1529 | { | |
1530 | //Save parameters used for analysis | |
1531 | TString parList ; //this will be list of parameters used for this analysis. | |
5ae09196 | 1532 | const Int_t buffersize = 255; |
1533 | char onePar[buffersize] ; | |
0c1383b5 | 1534 | |
5ae09196 | 1535 | snprintf(onePar,buffersize,"--- AliAnaPhoton ---\n") ; |
0c1383b5 | 1536 | parList+=onePar ; |
5ae09196 | 1537 | snprintf(onePar,buffersize,"Calorimeter: %s\n",fCalorimeter.Data()) ; |
0c1383b5 | 1538 | parList+=onePar ; |
5ae09196 | 1539 | snprintf(onePar,buffersize,"fMinDist =%2.2f (Minimal distance to bad channel to accept cluster) \n",fMinDist) ; |
0c1383b5 | 1540 | parList+=onePar ; |
5ae09196 | 1541 | snprintf(onePar,buffersize,"fMinDist2=%2.2f (Cuts on Minimal distance to study acceptance evaluation) \n",fMinDist2) ; |
0c1383b5 | 1542 | parList+=onePar ; |
5ae09196 | 1543 | snprintf(onePar,buffersize,"fMinDist3=%2.2f (One more cut on distance used for acceptance-efficiency study) \n",fMinDist3) ; |
0c1383b5 | 1544 | parList+=onePar ; |
5ae09196 | 1545 | snprintf(onePar,buffersize,"fRejectTrackMatch: %d\n",fRejectTrackMatch) ; |
0c1383b5 | 1546 | parList+=onePar ; |
1547 | ||
1548 | //Get parameters set in base class. | |
1549 | parList += GetBaseParametersList() ; | |
1550 | ||
1551 | //Get parameters set in PID class. | |
1552 | parList += GetCaloPID()->GetPIDParametersList() ; | |
1553 | ||
1554 | //Get parameters set in FiducialCut class (not available yet) | |
1555 | //parlist += GetFidCut()->GetFidCutParametersList() | |
1556 | ||
1557 | return new TObjString(parList) ; | |
1558 | } | |
1559 | ||
1c5acb87 | 1560 | //________________________________________________________________________ |
1561 | TList * AliAnaPhoton::GetCreateOutputObjects() | |
c2a62a94 | 1562 | { |
477d6cee | 1563 | // Create histograms to be saved in output file and |
1564 | // store them in outputContainer | |
1565 | TList * outputContainer = new TList() ; | |
1566 | outputContainer->SetName("PhotonHistos") ; | |
4a745797 | 1567 | |
745913ae | 1568 | Int_t nptbins = GetHistogramRanges()->GetHistoPtBins(); Float_t ptmax = GetHistogramRanges()->GetHistoPtMax(); Float_t ptmin = GetHistogramRanges()->GetHistoPtMin(); |
1569 | Int_t nphibins = GetHistogramRanges()->GetHistoPhiBins(); Float_t phimax = GetHistogramRanges()->GetHistoPhiMax(); Float_t phimin = GetHistogramRanges()->GetHistoPhiMin(); | |
1570 | Int_t netabins = GetHistogramRanges()->GetHistoEtaBins(); Float_t etamax = GetHistogramRanges()->GetHistoEtaMax(); Float_t etamin = GetHistogramRanges()->GetHistoEtaMin(); | |
1571 | Int_t ssbins = GetHistogramRanges()->GetHistoShowerShapeBins(); Float_t ssmax = GetHistogramRanges()->GetHistoShowerShapeMax(); Float_t ssmin = GetHistogramRanges()->GetHistoShowerShapeMin(); | |
1572 | Int_t nbins = GetHistogramRanges()->GetHistoNClusterCellBins(); Int_t nmax = GetHistogramRanges()->GetHistoNClusterCellMax(); Int_t nmin = GetHistogramRanges()->GetHistoNClusterCellMin(); | |
1573 | Int_t ntimebins= GetHistogramRanges()->GetHistoTimeBins(); Float_t timemax = GetHistogramRanges()->GetHistoTimeMax(); Float_t timemin = GetHistogramRanges()->GetHistoTimeMin(); | |
521636d2 | 1574 | |
09273901 | 1575 | Int_t nresetabins = GetHistogramRanges()->GetHistoTrackResidualEtaBins(); |
1576 | Float_t resetamax = GetHistogramRanges()->GetHistoTrackResidualEtaMax(); | |
1577 | Float_t resetamin = GetHistogramRanges()->GetHistoTrackResidualEtaMin(); | |
1578 | Int_t nresphibins = GetHistogramRanges()->GetHistoTrackResidualPhiBins(); | |
1579 | Float_t resphimax = GetHistogramRanges()->GetHistoTrackResidualPhiMax(); | |
1580 | Float_t resphimin = GetHistogramRanges()->GetHistoTrackResidualPhiMin(); | |
1581 | ||
31ae6d59 | 1582 | Int_t ndedxbins = GetHistogramRanges()->GetHistodEdxBins(); |
1583 | Float_t dedxmax = GetHistogramRanges()->GetHistodEdxMax(); | |
1584 | Float_t dedxmin = GetHistogramRanges()->GetHistodEdxMin(); | |
1585 | Int_t nPoverEbins = GetHistogramRanges()->GetHistoPOverEBins(); | |
1586 | Float_t pOverEmax = GetHistogramRanges()->GetHistoPOverEMax(); | |
1587 | Float_t pOverEmin = GetHistogramRanges()->GetHistoPOverEMin(); | |
09273901 | 1588 | |
d2655d46 | 1589 | Int_t bin[] = {0,2,4,6,10,15,20,100}; // energy bins for SS studies |
1590 | ||
9e51e29a | 1591 | TString cut[] = {"Open","Reader","E","Time","NCells","NLM","Fidutial","Matching","Bad","PID"}; |
1592 | for (Int_t i = 0; i < 10 ; i++) | |
fc195fd0 | 1593 | { |
1594 | fhClusterCuts[i] = new TH1F(Form("hCut_%d_%s", i, cut[i].Data()), | |
1595 | Form("Number of clusters that pass cuts <= %d, %s", i, cut[i].Data()), | |
1596 | nptbins,ptmin,ptmax); | |
1597 | fhClusterCuts[i]->SetYTitle("dN/dE "); | |
1598 | fhClusterCuts[i]->SetXTitle("E (GeV)"); | |
1599 | outputContainer->Add(fhClusterCuts[i]) ; | |
1600 | } | |
1601 | ||
e1e62b89 | 1602 | fhNCellsE = new TH2F ("hNCellsE","# of cells in cluster vs E of clusters", nptbins,ptmin,ptmax, nbins,nmin,nmax); |
c4a7d28a | 1603 | fhNCellsE->SetXTitle("E (GeV)"); |
1604 | fhNCellsE->SetYTitle("# of cells in cluster"); | |
f15c25da | 1605 | outputContainer->Add(fhNCellsE); |
1606 | ||
5c46c992 | 1607 | fhCellsE = new TH2F ("hCellsE","energy of cells in cluster vs E of clusters", nptbins,ptmin,ptmax, nptbins*2,ptmin,ptmax); |
1608 | fhCellsE->SetXTitle("E_{cluster} (GeV)"); | |
1609 | fhCellsE->SetYTitle("E_{cell} (GeV)"); | |
1610 | outputContainer->Add(fhCellsE); | |
1611 | ||
f15c25da | 1612 | fhTimeE = new TH2F ("hTimeE","time of cluster vs E of clusters", nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
1613 | fhTimeE->SetXTitle("E (GeV)"); | |
1614 | fhTimeE->SetYTitle("time (ns)"); | |
1615 | outputContainer->Add(fhTimeE); | |
6175da48 | 1616 | |
f66d95af | 1617 | fhMaxCellDiffClusterE = new TH2F ("hMaxCellDiffClusterE","energy vs difference of cluster energy - max cell energy / cluster energy, good clusters", |
1618 | nptbins,ptmin,ptmax, 500,0,1.); | |
1619 | fhMaxCellDiffClusterE->SetXTitle("E_{cluster} (GeV) "); | |
1620 | fhMaxCellDiffClusterE->SetYTitle("(E_{cluster} - E_{cell max})/ E_{cluster}"); | |
1621 | outputContainer->Add(fhMaxCellDiffClusterE); | |
1622 | ||
20218aea | 1623 | fhEPhoton = new TH1F("hEPhoton","Number of #gamma over calorimeter vs energy",nptbins,ptmin,ptmax); |
1624 | fhEPhoton->SetYTitle("N"); | |
1625 | fhEPhoton->SetXTitle("E_{#gamma}(GeV)"); | |
1626 | outputContainer->Add(fhEPhoton) ; | |
1627 | ||
1628 | fhPtPhoton = new TH1F("hPtPhoton","Number of #gamma over calorimeter vs p_{T}",nptbins,ptmin,ptmax); | |
477d6cee | 1629 | fhPtPhoton->SetYTitle("N"); |
1630 | fhPtPhoton->SetXTitle("p_{T #gamma}(GeV/c)"); | |
1631 | outputContainer->Add(fhPtPhoton) ; | |
c8710850 | 1632 | |
1633 | fhPtCentralityPhoton = new TH2F("hPtCentralityPhoton","centrality vs p_{T}",nptbins,ptmin,ptmax, 100,0,100); | |
1634 | fhPtCentralityPhoton->SetYTitle("Centrality"); | |
1635 | fhPtCentralityPhoton->SetXTitle("p_{T}(GeV/c)"); | |
1636 | outputContainer->Add(fhPtCentralityPhoton) ; | |
1637 | ||
1638 | fhPtEventPlanePhoton = new TH2F("hPtEventPlanePhoton","centrality vs p_{T}",nptbins,ptmin,ptmax, 100,0,TMath::Pi()); | |
1639 | fhPtEventPlanePhoton->SetYTitle("Event plane angle (rad)"); | |
1640 | fhPtEventPlanePhoton->SetXTitle("p_{T} (GeV/c)"); | |
1641 | outputContainer->Add(fhPtEventPlanePhoton) ; | |
1642 | ||
c2a62a94 | 1643 | fhEtaPhi = new TH2F |
1644 | ("hEtaPhi","cluster,E > 0.5 GeV, #eta vs #phi",netabins,etamin,etamax,nphibins,phimin,phimax); | |
1645 | fhEtaPhi->SetYTitle("#phi (rad)"); | |
1646 | fhEtaPhi->SetXTitle("#eta"); | |
1647 | outputContainer->Add(fhEtaPhi) ; | |
1648 | ||
1649 | if(fCalorimeter=="EMCAL" && fFillEMCALBCHistograms) | |
1650 | { | |
1651 | fhEtaPhiEMCALBC0 = new TH2F | |
1652 | ("hEtaPhiEMCALBC0","cluster,E > 2 GeV, #eta vs #phi, for clusters with |time| < 25 ns, EMCAL-BC=0",netabins,etamin,etamax,nphibins,phimin,phimax); | |
1653 | fhEtaPhiEMCALBC0->SetYTitle("#phi (rad)"); | |
1654 | fhEtaPhiEMCALBC0->SetXTitle("#eta"); | |
1655 | outputContainer->Add(fhEtaPhiEMCALBC0) ; | |
1656 | ||
1657 | fhEtaPhiEMCALBC1 = new TH2F | |
1658 | ("hEtaPhiEMCALBC1","cluster,E > 2 GeV, #eta vs #phi, for clusters with 25 < |time| < 75 ns, EMCAL-BC=1",netabins,etamin,etamax,nphibins,phimin,phimax); | |
1659 | fhEtaPhiEMCALBC1->SetYTitle("#phi (rad)"); | |
1660 | fhEtaPhiEMCALBC1->SetXTitle("#eta"); | |
1661 | outputContainer->Add(fhEtaPhiEMCALBC1) ; | |
1662 | ||
1663 | fhEtaPhiEMCALBCN = new TH2F | |
1664 | ("hEtaPhiEMCALBCN","cluster,E > 2 GeV, #eta vs #phi, for clusters with |time| > 75 ns, EMCAL-BC>1",netabins,etamin,etamax,nphibins,phimin,phimax); | |
1665 | fhEtaPhiEMCALBCN->SetYTitle("#phi (rad)"); | |
1666 | fhEtaPhiEMCALBCN->SetXTitle("#eta"); | |
1667 | outputContainer->Add(fhEtaPhiEMCALBCN) ; | |
1668 | ||
afb3af8a | 1669 | for(Int_t i = 0; i < 11; i++) |
c2a62a94 | 1670 | { |
1671 | fhEtaPhiTriggerEMCALBC[i] = new TH2F | |
1672 | (Form("hEtaPhiTriggerEMCALBC%d",i-5), | |
afb3af8a | 1673 | Form("cluster E > 2 GeV, #eta vs #phi, Trigger EMCAL-BC=%d",i-5), |
c2a62a94 | 1674 | netabins,etamin,etamax,nphibins,phimin,phimax); |
1675 | fhEtaPhiTriggerEMCALBC[i]->SetYTitle("#phi (rad)"); | |
1676 | fhEtaPhiTriggerEMCALBC[i]->SetXTitle("#eta"); | |
1677 | outputContainer->Add(fhEtaPhiTriggerEMCALBC[i]) ; | |
1678 | ||
1679 | fhTimeTriggerEMCALBC[i] = new TH2F | |
1680 | (Form("hTimeTriggerEMCALBC%d",i-5), | |
afb3af8a | 1681 | Form("cluster time vs E of clusters, Trigger EMCAL-BC=%d",i-5), |
c2a62a94 | 1682 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
1683 | fhTimeTriggerEMCALBC[i]->SetXTitle("E (GeV)"); | |
1684 | fhTimeTriggerEMCALBC[i]->SetYTitle("time (ns)"); | |
1685 | outputContainer->Add(fhTimeTriggerEMCALBC[i]); | |
1686 | ||
1687 | fhTimeTriggerEMCALBCPileUpSPD[i] = new TH2F | |
1688 | (Form("hTimeTriggerEMCALBC%dPileUpSPD",i-5), | |
afb3af8a | 1689 | Form("cluster time vs E of clusters, Trigger EMCAL-BC=%d",i-5), |
c2a62a94 | 1690 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
1691 | fhTimeTriggerEMCALBCPileUpSPD[i]->SetXTitle("E (GeV)"); | |
1692 | fhTimeTriggerEMCALBCPileUpSPD[i]->SetYTitle("time (ns)"); | |
1693 | outputContainer->Add(fhTimeTriggerEMCALBCPileUpSPD[i]); | |
afb3af8a | 1694 | |
1695 | fhEtaPhiTriggerEMCALBCUM[i] = new TH2F | |
1696 | (Form("hEtaPhiTriggerEMCALBC%d_UnMatch",i-5), | |
1697 | Form("cluster E > 2 GeV, #eta vs #phi, unmatched trigger EMCAL-BC=%d",i-5), | |
1698 | netabins,etamin,etamax,nphibins,phimin,phimax); | |
1699 | fhEtaPhiTriggerEMCALBCUM[i]->SetYTitle("#phi (rad)"); | |
1700 | fhEtaPhiTriggerEMCALBCUM[i]->SetXTitle("#eta"); | |
1701 | outputContainer->Add(fhEtaPhiTriggerEMCALBCUM[i]) ; | |
1702 | ||
1703 | fhTimeTriggerEMCALBCUM[i] = new TH2F | |
1704 | (Form("hTimeTriggerEMCALBC%d_UnMatch",i-5), | |
1705 | Form("cluster time vs E of clusters, unmatched trigger EMCAL-BC=%d",i-5), | |
1706 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); | |
1707 | fhTimeTriggerEMCALBCUM[i]->SetXTitle("E (GeV)"); | |
1708 | fhTimeTriggerEMCALBCUM[i]->SetYTitle("time (ns)"); | |
1709 | outputContainer->Add(fhTimeTriggerEMCALBCUM[i]); | |
1710 | ||
1711 | fhEtaPhiTriggerEMCALBCCluster[i] = new TH2F | |
1712 | (Form("hEtaPhiTriggerEMCALBC%d_OnlyTrigger",i-5), | |
1713 | Form("trigger cluster, #eta vs #phi, Trigger EMCAL-BC=%d",i-5), | |
1714 | netabins,etamin,etamax,nphibins,phimin,phimax); | |
1715 | fhEtaPhiTriggerEMCALBCCluster[i]->SetYTitle("#phi (rad)"); | |
1716 | fhEtaPhiTriggerEMCALBCCluster[i]->SetXTitle("#eta"); | |
1717 | outputContainer->Add(fhEtaPhiTriggerEMCALBCCluster[i]) ; | |
1718 | ||
1719 | fhTimeTriggerEMCALBCCluster[i] = new TH2F | |
1720 | (Form("hTimeTriggerEMCALBC%d_OnlyTrigger",i-5), | |
1721 | Form("trigger cluster time vs E of clusters, Trigger EMCAL-BC=%d",i-5), | |
1722 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); | |
1723 | fhTimeTriggerEMCALBCCluster[i]->SetXTitle("E (GeV)"); | |
1724 | fhTimeTriggerEMCALBCCluster[i]->SetYTitle("time (ns)"); | |
1725 | outputContainer->Add(fhTimeTriggerEMCALBCCluster[i]); | |
1726 | ||
1727 | fhEtaPhiTriggerEMCALBCUMCluster[i] = new TH2F | |
1728 | (Form("hEtaPhiTriggerEMCALBC%d_OnlyTrigger_UnMatch",i-5), | |
1729 | Form("trigger cluster, #eta vs #phi, unmatched trigger EMCAL-BC=%d",i-5), | |
1730 | netabins,etamin,etamax,nphibins,phimin,phimax); | |
1731 | fhEtaPhiTriggerEMCALBCUMCluster[i]->SetYTitle("#phi (rad)"); | |
1732 | fhEtaPhiTriggerEMCALBCUMCluster[i]->SetXTitle("#eta"); | |
1733 | outputContainer->Add(fhEtaPhiTriggerEMCALBCUMCluster[i]) ; | |
1734 | ||
1735 | fhTimeTriggerEMCALBCUMCluster[i] = new TH2F | |
1736 | (Form("hTimeTriggerEMCALBC%d_OnlyTrigger_UnMatch",i-5), | |
1737 | Form("trigger cluster time vs E of clusters, unmatched trigger EMCAL-BC=%d",i-5), | |
1738 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); | |
1739 | fhTimeTriggerEMCALBCUMCluster[i]->SetXTitle("E (GeV)"); | |
1740 | fhTimeTriggerEMCALBCUMCluster[i]->SetYTitle("time (ns)"); | |
1741 | outputContainer->Add(fhTimeTriggerEMCALBCUMCluster[i]); | |
c2a62a94 | 1742 | } |
afb3af8a | 1743 | |
1744 | fhEtaPhiTriggerEMCALBCClusterOverTh = new TH2F | |
1745 | ("hEtaPhiTriggerEMCALBC0_OnlyTrigger_OverThreshold", | |
1746 | "trigger cluster E > trigger threshold, #eta vs #phi, Trigger EMCAL-BC=0", | |
1747 | netabins,etamin,etamax,nphibins,phimin,phimax); | |
1748 | fhEtaPhiTriggerEMCALBCClusterOverTh->SetYTitle("#phi (rad)"); | |
1749 | fhEtaPhiTriggerEMCALBCClusterOverTh->SetXTitle("#eta"); | |
1750 | outputContainer->Add(fhEtaPhiTriggerEMCALBCClusterOverTh) ; | |
1751 | ||
1752 | fhEtaPhiTriggerEMCALBCUMClusterOverTh = new TH2F | |
1753 | ("hEtaPhiTriggerEMCALBC0_OnlyTrigger_OverThreshold_UnMatch", | |
1754 | "trigger cluster E > trigger threshold, #eta vs #phi, unmatched trigger EMCAL-BC=0", | |
1755 | netabins,etamin,etamax,nphibins,phimin,phimax); | |
1756 | fhEtaPhiTriggerEMCALBCUMClusterOverTh->SetYTitle("#phi (rad)"); | |
1757 | fhEtaPhiTriggerEMCALBCUMClusterOverTh->SetXTitle("#eta"); | |
1758 | outputContainer->Add(fhEtaPhiTriggerEMCALBCUMClusterOverTh) ; | |
1759 | ||
1760 | fhEtaPhiTriggerEMCALBCClusterBelowTh1 = new TH2F | |
1761 | ("hEtaPhiTriggerEMCALBC0_OnlyTrigger_BelowThreshold1", | |
1762 | "trigger cluster thresh-1 < E < thres, #eta vs #phi, Trigger EMCAL-BC=0", | |
1763 | netabins,etamin,etamax,nphibins,phimin,phimax); | |
1764 | fhEtaPhiTriggerEMCALBCClusterBelowTh1->SetYTitle("#phi (rad)"); | |
1765 | fhEtaPhiTriggerEMCALBCClusterBelowTh1->SetXTitle("#eta"); | |
1766 | outputContainer->Add(fhEtaPhiTriggerEMCALBCClusterBelowTh1) ; | |
1767 | ||
1768 | fhEtaPhiTriggerEMCALBCUMClusterBelowTh1 = new TH2F | |
1769 | ("hEtaPhiTriggerEMCALBC0_OnlyTrigger_BelowThreshold1_UnMatch", | |
1770 | "trigger cluster thresh-1 < E < thres, #eta vs #phi, unmatched trigger EMCAL-BC=0", | |
1771 | netabins,etamin,etamax,nphibins,phimin,phimax); | |
1772 | fhEtaPhiTriggerEMCALBCUMClusterBelowTh1->SetYTitle("#phi (rad)"); | |
1773 | fhEtaPhiTriggerEMCALBCUMClusterBelowTh1->SetXTitle("#eta"); | |
1774 | outputContainer->Add(fhEtaPhiTriggerEMCALBCUMClusterBelowTh1) ; | |
1775 | ||
1776 | fhEtaPhiTriggerEMCALBCClusterBelowTh2 = new TH2F | |
1777 | ("hEtaPhiTriggerEMCALBC0_OnlyTrigger_BelowThreshold2", | |
1778 | "trigger cluster thresh-2 < E < thres, #eta vs #phi, Trigger EMCAL-BC=0", | |
1779 | netabins,etamin,etamax,nphibins,phimin,phimax); | |
1780 | fhEtaPhiTriggerEMCALBCClusterBelowTh2->SetYTitle("#phi (rad)"); | |
1781 | fhEtaPhiTriggerEMCALBCClusterBelowTh2->SetXTitle("#eta"); | |
1782 | outputContainer->Add(fhEtaPhiTriggerEMCALBCClusterBelowTh2) ; | |
1783 | ||
1784 | fhEtaPhiTriggerEMCALBCUMClusterBelowTh2 = new TH2F | |
1785 | ("hEtaPhiTriggerEMCALBC0_OnlyTrigger_BelowThreshold2_UnMatch", | |
1786 | "trigger cluster thresh-2 < E < thres, #eta vs #phi, unmatched trigger EMCAL-BC=0", | |
1787 | netabins,etamin,etamax,nphibins,phimin,phimax); | |
1788 | fhEtaPhiTriggerEMCALBCUMClusterBelowTh2->SetYTitle("#phi (rad)"); | |
1789 | fhEtaPhiTriggerEMCALBCUMClusterBelowTh2->SetXTitle("#eta"); | |
1790 | outputContainer->Add(fhEtaPhiTriggerEMCALBCUMClusterBelowTh2) ; | |
1791 | ||
1792 | fhEtaPhiTriggerEMCALBCExotic = new TH2F | |
1793 | ("hEtaPhiTriggerExotic", | |
1794 | "cluster E > 2 GeV, #eta vs #phi, Trigger Exotic", | |
1795 | netabins,etamin,etamax,nphibins,phimin,phimax); | |
1796 | fhEtaPhiTriggerEMCALBCExotic->SetYTitle("#phi (rad)"); | |
1797 | fhEtaPhiTriggerEMCALBCExotic->SetXTitle("#eta"); | |
1798 | outputContainer->Add(fhEtaPhiTriggerEMCALBCExotic) ; | |
1799 | ||
1800 | fhTimeTriggerEMCALBCExotic = new TH2F | |
1801 | ("hTimeTriggerExotic", | |
1802 | "cluster time vs E of clusters, Trigger Exotic ", | |
1803 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); | |
1804 | fhTimeTriggerEMCALBCExotic->SetXTitle("E (GeV)"); | |
1805 | fhTimeTriggerEMCALBCExotic->SetYTitle("time (ns)"); | |
1806 | outputContainer->Add(fhTimeTriggerEMCALBCExotic); | |
1807 | ||
1808 | fhEtaPhiTriggerEMCALBCUMExotic = new TH2F | |
1809 | ("hEtaPhiTriggerExotic_UnMatch", | |
1810 | "cluster E > 2 GeV, #eta vs #phi, unmatched trigger Exotic", | |
1811 | netabins,etamin,etamax,nphibins,phimin,phimax); | |
1812 | fhEtaPhiTriggerEMCALBCUMExotic->SetYTitle("#phi (rad)"); | |
1813 | fhEtaPhiTriggerEMCALBCUMExotic->SetXTitle("#eta"); | |
1814 | outputContainer->Add(fhEtaPhiTriggerEMCALBCUMExotic) ; | |
1815 | ||
1816 | fhTimeTriggerEMCALBCUMExotic = new TH2F | |
1817 | ("hTimeTriggerExotic_UnMatch", | |
1818 | "cluster time vs E of clusters, unmatched trigger Exotic", | |
1819 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); | |
1820 | fhTimeTriggerEMCALBCUMExotic->SetXTitle("E (GeV)"); | |
1821 | fhTimeTriggerEMCALBCUMExotic->SetYTitle("time (ns)"); | |
1822 | outputContainer->Add(fhTimeTriggerEMCALBCUMExotic); | |
1823 | ||
1824 | fhEtaPhiTriggerEMCALBCExoticCluster = new TH2F | |
1825 | ("hEtaPhiTriggerExotic_OnlyTrigger", | |
1826 | "trigger cluster E > 2 GeV, #eta vs #phi, Trigger Exotic", | |
1827 | netabins,etamin,etamax,nphibins,phimin,phimax); | |
1828 | fhEtaPhiTriggerEMCALBCExoticCluster->SetYTitle("#phi (rad)"); | |
1829 | fhEtaPhiTriggerEMCALBCExoticCluster->SetXTitle("#eta"); | |
1830 | outputContainer->Add(fhEtaPhiTriggerEMCALBCExoticCluster) ; | |
1831 | ||
1832 | fhTimeTriggerEMCALBCExoticCluster = new TH2F | |
1833 | ("hTimeTriggerExotic_OnlyTrigger", | |
1834 | "trigger cluster time vs E of clusters, Trigger Exotic", | |
1835 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); | |
1836 | fhTimeTriggerEMCALBCExoticCluster->SetXTitle("E (GeV)"); | |
1837 | fhTimeTriggerEMCALBCExoticCluster->SetYTitle("time (ns)"); | |
1838 | outputContainer->Add(fhTimeTriggerEMCALBCExoticCluster); | |
1839 | ||
1840 | fhEtaPhiTriggerEMCALBCUMExoticCluster = new TH2F | |
1841 | ("hEtaPhiTriggerExotic_OnlyTrigger_UnMatch", | |
1842 | "trigger cluster E > 2 GeV, #eta vs #phi, unmatched trigger Exotic", | |
1843 | netabins,etamin,etamax,nphibins,phimin,phimax); | |
1844 | fhEtaPhiTriggerEMCALBCUMExoticCluster->SetYTitle("#phi (rad)"); | |
1845 | fhEtaPhiTriggerEMCALBCUMExoticCluster->SetXTitle("#eta"); | |
1846 | outputContainer->Add(fhEtaPhiTriggerEMCALBCUMExoticCluster) ; | |
1847 | ||
1848 | fhTimeTriggerEMCALBCUMExoticCluster = new TH2F | |
1849 | ("hTimeTriggerExotic_OnlyTrigger_UnMatch", | |
1850 | "trigger cluster time vs E of clusters, unmatched trigger Exotic", | |
1851 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); | |
1852 | fhTimeTriggerEMCALBCUMExoticCluster->SetXTitle("E (GeV)"); | |
1853 | fhTimeTriggerEMCALBCUMExoticCluster->SetYTitle("time (ns)"); | |
1854 | outputContainer->Add(fhTimeTriggerEMCALBCUMExoticCluster); | |
1855 | ||
1856 | fhEtaPhiTriggerEMCALBCBad = new TH2F | |
1857 | ("hEtaPhiTriggerBad", | |
1858 | "cluster E > 2 GeV, #eta vs #phi, Trigger Bad", | |
1859 | netabins,etamin,etamax,nphibins,phimin,phimax); | |
1860 | fhEtaPhiTriggerEMCALBCBad->SetYTitle("#phi (rad)"); | |
1861 | fhEtaPhiTriggerEMCALBCBad->SetXTitle("#eta"); | |
1862 | outputContainer->Add(fhEtaPhiTriggerEMCALBCBad) ; | |
1863 | ||
1864 | fhTimeTriggerEMCALBCBad = new TH2F | |
1865 | ("hTimeTriggerBad", | |
1866 | "cluster time vs E of clusters, Trigger Bad ", | |
1867 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); | |
1868 | fhTimeTriggerEMCALBCBad->SetXTitle("E (GeV)"); | |
1869 | fhTimeTriggerEMCALBCBad->SetYTitle("time (ns)"); | |
1870 | outputContainer->Add(fhTimeTriggerEMCALBCBad); | |
1871 | ||
1872 | fhEtaPhiTriggerEMCALBCUMBad = new TH2F | |
1873 | ("hEtaPhiTriggerBad_UnMatch", | |
1874 | "cluster E > 2 GeV, #eta vs #phi, unmatched trigger Bad", | |
1875 | netabins,etamin,etamax,nphibins,phimin,phimax); | |
1876 | fhEtaPhiTriggerEMCALBCUMBad->SetYTitle("#phi (rad)"); | |
1877 | fhEtaPhiTriggerEMCALBCUMBad->SetXTitle("#eta"); | |
1878 | outputContainer->Add(fhEtaPhiTriggerEMCALBCUMBad) ; | |
1879 | ||
1880 | fhTimeTriggerEMCALBCUMBad = new TH2F | |
1881 | ("hTimeTriggerBad_UnMatch", | |
1882 | "cluster time vs E of clusters, unmatched trigger Bad", | |
1883 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); | |
1884 | fhTimeTriggerEMCALBCUMBad->SetXTitle("E (GeV)"); | |
1885 | fhTimeTriggerEMCALBCUMBad->SetYTitle("time (ns)"); | |
1886 | outputContainer->Add(fhTimeTriggerEMCALBCUMBad); | |
1887 | ||
1888 | fhEtaPhiTriggerEMCALBCBadCluster = new TH2F | |
1889 | ("hEtaPhiTriggerBad_OnlyTrigger", | |
1890 | "trigger cluster E > 2 GeV, #eta vs #phi, Trigger Bad", | |
1891 | netabins,etamin,etamax,nphibins,phimin,phimax); | |
1892 | fhEtaPhiTriggerEMCALBCBadCluster->SetYTitle("#phi (rad)"); | |
1893 | fhEtaPhiTriggerEMCALBCBadCluster->SetXTitle("#eta"); | |
1894 | outputContainer->Add(fhEtaPhiTriggerEMCALBCBadCluster) ; | |
1895 | ||
1896 | fhTimeTriggerEMCALBCBadCluster = new TH2F | |
1897 | ("hTimeTriggerBad_OnlyTrigger", | |
1898 | "trigger cluster time vs E of clusters, Trigger Bad", | |
1899 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); | |
1900 | fhTimeTriggerEMCALBCBadCluster->SetXTitle("E (GeV)"); | |
1901 | fhTimeTriggerEMCALBCBadCluster->SetYTitle("time (ns)"); | |
1902 | outputContainer->Add(fhTimeTriggerEMCALBCBadCluster); | |
1903 | ||
1904 | fhEtaPhiTriggerEMCALBCUMBadCluster = new TH2F | |
1905 | ("hEtaPhiTriggerBad_OnlyTrigger_UnMatch", | |
1906 | "trigger cluster E > 2 GeV, #eta vs #phi, unmatched trigger Bad", | |
1907 | netabins,etamin,etamax,nphibins,phimin,phimax); | |
1908 | fhEtaPhiTriggerEMCALBCUMBadCluster->SetYTitle("#phi (rad)"); | |
1909 | fhEtaPhiTriggerEMCALBCUMBadCluster->SetXTitle("#eta"); | |
1910 | outputContainer->Add(fhEtaPhiTriggerEMCALBCUMBadCluster) ; | |
1911 | ||
1912 | fhTimeTriggerEMCALBCUMBadCluster = new TH2F | |
1913 | ("hTimeTriggerBad_OnlyTrigger_UnMatch", | |
1914 | "trigger cluster time vs E of clusters, unmatched trigger Bad", | |
1915 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); | |
1916 | fhTimeTriggerEMCALBCUMBadCluster->SetXTitle("E (GeV)"); | |
1917 | fhTimeTriggerEMCALBCUMBadCluster->SetYTitle("time (ns)"); | |
1918 | outputContainer->Add(fhTimeTriggerEMCALBCUMBadCluster); | |
1919 | ||
6265ad55 | 1920 | fhEtaPhiTriggerEMCALBCBadExotic = new TH2F |
1921 | ("hEtaPhiTriggerBadExotic", | |
1922 | "cluster E > 2 GeV, #eta vs #phi, Trigger Bad&Exotic", | |
1923 | netabins,etamin,etamax,nphibins,phimin,phimax); | |
1924 | fhEtaPhiTriggerEMCALBCBadExotic->SetYTitle("#phi (rad)"); | |
1925 | fhEtaPhiTriggerEMCALBCBadExotic->SetXTitle("#eta"); | |
1926 | outputContainer->Add(fhEtaPhiTriggerEMCALBCBadExotic) ; | |
1927 | ||
1928 | fhTimeTriggerEMCALBCBadExotic = new TH2F | |
1929 | ("hTimeTriggerBadExotic", | |
1930 | "cluster time vs E of clusters, Trigger Bad&Exotic ", | |
1931 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); | |
1932 | fhTimeTriggerEMCALBCBadExotic->SetXTitle("E (GeV)"); | |
1933 | fhTimeTriggerEMCALBCBadExotic->SetYTitle("time (ns)"); | |
1934 | outputContainer->Add(fhTimeTriggerEMCALBCBadExotic); | |
1935 | ||
1936 | fhEtaPhiTriggerEMCALBCUMBadExotic = new TH2F | |
1937 | ("hEtaPhiTriggerBadExotic_UnMatch", | |
1938 | "cluster E > 2 GeV, #eta vs #phi, unmatched trigger Bad&Exotic", | |
1939 | netabins,etamin,etamax,nphibins,phimin,phimax); | |
1940 | fhEtaPhiTriggerEMCALBCUMBadExotic->SetYTitle("#phi (rad)"); | |
1941 | fhEtaPhiTriggerEMCALBCUMBadExotic->SetXTitle("#eta"); | |
1942 | outputContainer->Add(fhEtaPhiTriggerEMCALBCUMBadExotic) ; | |
1943 | ||
1944 | fhTimeTriggerEMCALBCUMBadExotic = new TH2F | |
1945 | ("hTimeTriggerBadExotic_UnMatch", | |
1946 | "cluster time vs E of clusters, unmatched trigger Bad&Exotic", | |
1947 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); | |
1948 | fhTimeTriggerEMCALBCUMBadExotic->SetXTitle("E (GeV)"); | |
1949 | fhTimeTriggerEMCALBCUMBadExotic->SetYTitle("time (ns)"); | |
1950 | outputContainer->Add(fhTimeTriggerEMCALBCUMBadExotic); | |
1951 | ||
1952 | fhEtaPhiTriggerEMCALBCBadExoticCluster = new TH2F | |
1953 | ("hEtaPhiTriggerBadExotic_OnlyTrigger", | |
1954 | "trigger cluster E > 2 GeV, #eta vs #phi, Trigger Bad&Exotic", | |
1955 | netabins,etamin,etamax,nphibins,phimin,phimax); | |
1956 | fhEtaPhiTriggerEMCALBCBadExoticCluster->SetYTitle("#phi (rad)"); | |
1957 | fhEtaPhiTriggerEMCALBCBadExoticCluster->SetXTitle("#eta"); | |
1958 | outputContainer->Add(fhEtaPhiTriggerEMCALBCBadExoticCluster) ; | |
1959 | ||
1960 | fhTimeTriggerEMCALBCBadExoticCluster = new TH2F | |
1961 | ("hTimeTriggerBadExotic_OnlyTrigger", | |
1962 | "trigger cluster time vs E of clusters, Trigger Bad&Exotic", | |
1963 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); | |
1964 | fhTimeTriggerEMCALBCBadExoticCluster->SetXTitle("E (GeV)"); | |
1965 | fhTimeTriggerEMCALBCBadExoticCluster->SetYTitle("time (ns)"); | |
1966 | outputContainer->Add(fhTimeTriggerEMCALBCBadExoticCluster); | |
1967 | ||
1968 | fhEtaPhiTriggerEMCALBCUMBadExoticCluster = new TH2F | |
1969 | ("hEtaPhiTriggerBadExotic_OnlyTrigger_UnMatch", | |
1970 | "trigger cluster E > 2 GeV, #eta vs #phi, unmatched trigger Bad&Exotic", | |
1971 | netabins,etamin,etamax,nphibins,phimin,phimax); | |
1972 | fhEtaPhiTriggerEMCALBCUMBadExoticCluster->SetYTitle("#phi (rad)"); | |
1973 | fhEtaPhiTriggerEMCALBCUMBadExoticCluster->SetXTitle("#eta"); | |
1974 | outputContainer->Add(fhEtaPhiTriggerEMCALBCUMBadExoticCluster) ; | |
1975 | ||
1976 | fhTimeTriggerEMCALBCUMBadExoticCluster = new TH2F | |
1977 | ("hTimeTriggerBadExotic_OnlyTrigger_UnMatch", | |
1978 | "trigger cluster time vs E of clusters, unmatched trigger Bad&Exotic", | |
1979 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); | |
1980 | fhTimeTriggerEMCALBCUMBadExoticCluster->SetXTitle("E (GeV)"); | |
1981 | fhTimeTriggerEMCALBCUMBadExoticCluster->SetYTitle("time (ns)"); | |
1982 | outputContainer->Add(fhTimeTriggerEMCALBCUMBadExoticCluster); | |
1983 | ||
1035a8d9 | 1984 | fhTimeTriggerEMCALBCBadMaxCell = new TH2F |
1985 | ("hTimeTriggerBadMaxCell", | |
1986 | "cluster time vs E of clusters, Trigger BadMaxCell", | |
1987 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); | |
1988 | fhTimeTriggerEMCALBCBadMaxCell->SetXTitle("E (GeV)"); | |
1989 | fhTimeTriggerEMCALBCBadMaxCell->SetYTitle("time (ns)"); | |
1990 | outputContainer->Add(fhTimeTriggerEMCALBCBadMaxCell); | |
1991 | ||
1992 | fhTimeTriggerEMCALBCUMBadMaxCell = new TH2F | |
1993 | ("hTimeTriggerBadMaxCell_UnMatch", | |
1994 | "cluster time vs E of clusters, unmatched trigger BadMaxCell", | |
1995 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); | |
1996 | fhTimeTriggerEMCALBCUMBadMaxCell->SetXTitle("E (GeV)"); | |
1997 | fhTimeTriggerEMCALBCUMBadMaxCell->SetYTitle("time (ns)"); | |
1998 | outputContainer->Add(fhTimeTriggerEMCALBCUMBadMaxCell); | |
1999 | ||
2000 | ||
2001 | fhTimeTriggerEMCALBCBadMaxCellExotic = new TH2F | |
2002 | ("hTimeTriggerBadMaxCellExotic", | |
2003 | "cluster time vs E of clusters, Trigger BadMaxCell&Exotic", | |
2004 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); | |
2005 | fhTimeTriggerEMCALBCBadMaxCellExotic->SetXTitle("E (GeV)"); | |
2006 | fhTimeTriggerEMCALBCBadMaxCellExotic->SetYTitle("time (ns)"); | |
2007 | outputContainer->Add(fhTimeTriggerEMCALBCBadMaxCellExotic); | |
2008 | ||
2009 | fhTimeTriggerEMCALBCUMBadMaxCellExotic = new TH2F | |
2010 | ("hTimeTriggerBadMaxCellExotic_UnMatch", | |
2011 | "cluster time vs E of clusters, unmatched trigger BadMaxCell&Exotic", | |
2012 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); | |
2013 | fhTimeTriggerEMCALBCUMBadMaxCellExotic->SetXTitle("E (GeV)"); | |
2014 | fhTimeTriggerEMCALBCUMBadMaxCellExotic->SetYTitle("time (ns)"); | |
2015 | outputContainer->Add(fhTimeTriggerEMCALBCUMBadMaxCellExotic); | |
2016 | ||
afb3af8a | 2017 | fhTimeNoTrigger = new TH2F |
2018 | ("hTimeNoTrigger", | |
2019 | "events with no foundable trigger, time vs e of clusters", | |
2020 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); | |
2021 | fhTimeNoTrigger->SetXTitle("E (GeV)"); | |
2022 | fhTimeNoTrigger->SetYTitle("time (ns)"); | |
2023 | outputContainer->Add(fhTimeNoTrigger); | |
2024 | ||
2025 | fhEtaPhiNoTrigger = new TH2F | |
2026 | ("hEtaPhiNoTrigger", | |
2027 | "events with no foundable trigger, eta vs phi of clusters", | |
2028 | netabins,etamin,etamax,nphibins,phimin,phimax); | |
2029 | fhEtaPhiNoTrigger->SetYTitle("#phi (rad)"); | |
2030 | fhEtaPhiNoTrigger->SetXTitle("#eta"); | |
2031 | outputContainer->Add(fhEtaPhiNoTrigger) ; | |
2032 | ||
c2a62a94 | 2033 | } |
2034 | ||
477d6cee | 2035 | fhPhiPhoton = new TH2F |
afb3af8a | 2036 | ("hPhiPhoton","#phi_{#gamma} vs p_{T}",nptbins,ptmin,ptmax,nphibins,phimin,phimax); |
6175da48 | 2037 | fhPhiPhoton->SetYTitle("#phi (rad)"); |
477d6cee | 2038 | fhPhiPhoton->SetXTitle("p_{T #gamma} (GeV/c)"); |
2039 | outputContainer->Add(fhPhiPhoton) ; | |
2040 | ||
2041 | fhEtaPhoton = new TH2F | |
20218aea | 2042 | ("hEtaPhoton","#eta_{#gamma} vs p_{T}",nptbins,ptmin,ptmax,netabins,etamin,etamax); |
477d6cee | 2043 | fhEtaPhoton->SetYTitle("#eta"); |
2044 | fhEtaPhoton->SetXTitle("p_{T #gamma} (GeV/c)"); | |
2045 | outputContainer->Add(fhEtaPhoton) ; | |
2046 | ||
6175da48 | 2047 | fhEtaPhiPhoton = new TH2F |
2048 | ("hEtaPhiPhoton","#eta vs #phi",netabins,etamin,etamax,nphibins,phimin,phimax); | |
2049 | fhEtaPhiPhoton->SetYTitle("#phi (rad)"); | |
2050 | fhEtaPhiPhoton->SetXTitle("#eta"); | |
2051 | outputContainer->Add(fhEtaPhiPhoton) ; | |
34c16486 | 2052 | if(GetMinPt() < 0.5) |
2053 | { | |
20218aea | 2054 | fhEtaPhi05Photon = new TH2F |
2055 | ("hEtaPhi05Photon","#eta vs #phi, E > 0.5",netabins,etamin,etamax,nphibins,phimin,phimax); | |
2056 | fhEtaPhi05Photon->SetYTitle("#phi (rad)"); | |
2057 | fhEtaPhi05Photon->SetXTitle("#eta"); | |
2058 | outputContainer->Add(fhEtaPhi05Photon) ; | |
2059 | } | |
fedea415 | 2060 | |
c2a62a94 | 2061 | if(fCalorimeter=="EMCAL" && fFillEMCALBCHistograms) |
2062 | { | |
2063 | fhEtaPhiPhotonEMCALBC0 = new TH2F | |
ba490f85 | 2064 | ("hEtaPhiPhotonEMCALBC0","identified photon, E > 2 GeV, #eta vs #phi, for clusters with |time| < 25 ns, EMCAL-BC=0",netabins,etamin,etamax,nphibins,phimin,phimax); |
c2a62a94 | 2065 | fhEtaPhiPhotonEMCALBC0->SetYTitle("#phi (rad)"); |
2066 | fhEtaPhiPhotonEMCALBC0->SetXTitle("#eta"); | |
2067 | outputContainer->Add(fhEtaPhiPhotonEMCALBC0) ; | |
2068 | ||
2069 | fhEtaPhiPhotonEMCALBC1 = new TH2F | |
ba490f85 | 2070 | ("hEtaPhiPhotonEMCALBC1","identified photon, E > 2 GeV, #eta vs #phi, for clusters with 25 < |time| < 75 ns, EMCAL-BC=1",netabins,etamin,etamax,nphibins,phimin,phimax); |
c2a62a94 | 2071 | fhEtaPhiPhotonEMCALBC1->SetYTitle("#phi (rad)"); |
2072 | fhEtaPhiPhotonEMCALBC1->SetXTitle("#eta"); | |
2073 | outputContainer->Add(fhEtaPhiPhotonEMCALBC1) ; | |
2074 | ||
2075 | fhEtaPhiPhotonEMCALBCN = new TH2F | |
ba490f85 | 2076 | ("hEtaPhiPhotonEMCALBCN","identified photon, E > 2 GeV, #eta vs #phi, for clusters with |time| > 75 ns, EMCAL-BC>1",netabins,etamin,etamax,nphibins,phimin,phimax); |
c2a62a94 | 2077 | fhEtaPhiPhotonEMCALBCN->SetYTitle("#phi (rad)"); |
2078 | fhEtaPhiPhotonEMCALBCN->SetXTitle("#eta"); | |
2079 | outputContainer->Add(fhEtaPhiPhotonEMCALBCN) ; | |
2080 | ||
afb3af8a | 2081 | for(Int_t i = 0; i < 11; i++) |
c2a62a94 | 2082 | { |
2083 | fhEtaPhiPhotonTriggerEMCALBC[i] = new TH2F | |
2084 | (Form("hEtaPhiPhotonTriggerEMCALBC%d",i-5), | |
afb3af8a | 2085 | Form("photon E > 2 GeV, #eta vs #phi, PhotonTrigger EMCAL-BC=%d",i-5), |
c2a62a94 | 2086 | netabins,etamin,etamax,nphibins,phimin,phimax); |
2087 | fhEtaPhiPhotonTriggerEMCALBC[i]->SetYTitle("#phi (rad)"); | |
2088 | fhEtaPhiPhotonTriggerEMCALBC[i]->SetXTitle("#eta"); | |
2089 | outputContainer->Add(fhEtaPhiPhotonTriggerEMCALBC[i]) ; | |
2090 | ||
2091 | fhTimePhotonTriggerEMCALBC[i] = new TH2F | |
2092 | (Form("hTimePhotonTriggerEMCALBC%d",i-5), | |
afb3af8a | 2093 | Form("photon time vs E of clusters, PhotonTrigger EMCAL-BC=%d",i-5), |
c2a62a94 | 2094 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
2095 | fhTimePhotonTriggerEMCALBC[i]->SetXTitle("E (GeV)"); | |
2096 | fhTimePhotonTriggerEMCALBC[i]->SetYTitle("time (ns)"); | |
2097 | outputContainer->Add(fhTimePhotonTriggerEMCALBC[i]); | |
2098 | ||
2099 | fhTimePhotonTriggerEMCALBCPileUpSPD[i] = new TH2F | |
2100 | (Form("hTimePhotonTriggerEMCALBC%dPileUpSPD",i-5), | |
afb3af8a | 2101 | Form("photon time vs E, PhotonTrigger EMCAL-BC=%d",i-5), |
c2a62a94 | 2102 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
2103 | fhTimePhotonTriggerEMCALBCPileUpSPD[i]->SetXTitle("E (GeV)"); | |
2104 | fhTimePhotonTriggerEMCALBCPileUpSPD[i]->SetYTitle("time (ns)"); | |
2105 | outputContainer->Add(fhTimePhotonTriggerEMCALBCPileUpSPD[i]); | |
2106 | ||
afb3af8a | 2107 | fhEtaPhiPhotonTriggerEMCALBCUM[i] = new TH2F |
2108 | (Form("hEtaPhiPhotonTriggerEMCALBC%d_UnMatch",i-5), | |
2109 | Form("photon E > 2 GeV, #eta vs #phi, unmatched trigger EMCAL-BC=%d",i-5), | |
2110 | netabins,etamin,etamax,nphibins,phimin,phimax); | |
2111 | fhEtaPhiPhotonTriggerEMCALBCUM[i]->SetYTitle("#phi (rad)"); | |
2112 | fhEtaPhiPhotonTriggerEMCALBCUM[i]->SetXTitle("#eta"); | |
2113 | outputContainer->Add(fhEtaPhiPhotonTriggerEMCALBCUM[i]) ; | |
2114 | ||
2115 | fhTimePhotonTriggerEMCALBCUM[i] = new TH2F | |
2116 | (Form("hTimePhotonTriggerEMCALBC%d_UnMatch",i-5), | |
2117 | Form("photon time vs E, unmatched trigger EMCAL-BC=%d",i-5), | |
2118 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); | |
2119 | fhTimePhotonTriggerEMCALBCUM[i]->SetXTitle("E (GeV)"); | |
2120 | fhTimePhotonTriggerEMCALBCUM[i]->SetYTitle("time (ns)"); | |
2121 | outputContainer->Add(fhTimePhotonTriggerEMCALBCUM[i]); | |
2122 | ||
c2a62a94 | 2123 | } |
2124 | } | |
6175da48 | 2125 | |
9e51e29a | 2126 | fhNLocMax = new TH2F("hNLocMax","Number of local maxima in cluster", |
2127 | nptbins,ptmin,ptmax,10,0,10); | |
2128 | fhNLocMax ->SetYTitle("N maxima"); | |
2129 | fhNLocMax ->SetXTitle("E (GeV)"); | |
2130 | outputContainer->Add(fhNLocMax) ; | |
2131 | ||
521636d2 | 2132 | //Shower shape |
34c16486 | 2133 | if(fFillSSHistograms) |
2134 | { | |
521636d2 | 2135 | fhLam0E = new TH2F ("hLam0E","#lambda_{0}^{2} vs E", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
2136 | fhLam0E->SetYTitle("#lambda_{0}^{2}"); | |
2137 | fhLam0E->SetXTitle("E (GeV)"); | |
2138 | outputContainer->Add(fhLam0E); | |
2139 | ||
2140 | fhLam1E = new TH2F ("hLam1E","#lambda_{1}^{2} vs E", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
2141 | fhLam1E->SetYTitle("#lambda_{1}^{2}"); | |
2142 | fhLam1E->SetXTitle("E (GeV)"); | |
2143 | outputContainer->Add(fhLam1E); | |
2144 | ||
2145 | fhDispE = new TH2F ("hDispE"," dispersion^{2} vs E", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
2146 | fhDispE->SetYTitle("D^{2}"); | |
2147 | fhDispE->SetXTitle("E (GeV) "); | |
2148 | outputContainer->Add(fhDispE); | |
b5dbb99b | 2149 | |
2150 | if(!fRejectTrackMatch) | |
2151 | { | |
2152 | fhLam0ETM = new TH2F ("hLam0ETM","#lambda_{0}^{2} vs E, cut on track-matching residual |#Delta #eta| < 0.05, |#Delta #phi| < 0.05", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
2153 | fhLam0ETM->SetYTitle("#lambda_{0}^{2}"); | |
2154 | fhLam0ETM->SetXTitle("E (GeV)"); | |
2155 | outputContainer->Add(fhLam0ETM); | |
2156 | ||
2157 | fhLam1ETM = new TH2F ("hLam1ETM","#lambda_{1}^{2} vs E, cut on track-matching residual |#Delta #eta| < 0.05, |#Delta #phi| < 0.05", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
2158 | fhLam1ETM->SetYTitle("#lambda_{1}^{2}"); | |
2159 | fhLam1ETM->SetXTitle("E (GeV)"); | |
2160 | outputContainer->Add(fhLam1ETM); | |
2161 | ||
2162 | fhDispETM = new TH2F ("hDispETM"," dispersion^{2} vs E, cut on track-matching residual |#Delta #eta| < 0.05, |#Delta #phi| < 0.05", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
2163 | fhDispETM->SetYTitle("D^{2}"); | |
2164 | fhDispETM->SetXTitle("E (GeV) "); | |
2165 | outputContainer->Add(fhDispETM); | |
2166 | } | |
521636d2 | 2167 | |
b5dbb99b | 2168 | if(fCalorimeter == "EMCAL") |
2169 | { | |
521636d2 | 2170 | fhLam0ETRD = new TH2F ("hLam0ETRD","#lambda_{0}^{2} vs E, EMCAL SM covered by TRD", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
2171 | fhLam0ETRD->SetYTitle("#lambda_{0}^{2}"); | |
2172 | fhLam0ETRD->SetXTitle("E (GeV)"); | |
2173 | outputContainer->Add(fhLam0ETRD); | |
2174 | ||
2175 | fhLam1ETRD = new TH2F ("hLam1ETRD","#lambda_{1}^{2} vs E, EMCAL SM covered by TRD", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
2176 | fhLam1ETRD->SetYTitle("#lambda_{1}^{2}"); | |
2177 | fhLam1ETRD->SetXTitle("E (GeV)"); | |
2178 | outputContainer->Add(fhLam1ETRD); | |
2179 | ||
2180 | fhDispETRD = new TH2F ("hDispETRD"," dispersion^{2} vs E, EMCAL SM covered by TRD", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
2181 | fhDispETRD->SetYTitle("Dispersion^{2}"); | |
2182 | fhDispETRD->SetXTitle("E (GeV) "); | |
b5dbb99b | 2183 | outputContainer->Add(fhDispETRD); |
2184 | ||
2185 | if(!fRejectTrackMatch) | |
2186 | { | |
2187 | fhLam0ETMTRD = new TH2F ("hLam0ETMTRD","#lambda_{0}^{2} vs E, EMCAL SM covered by TRD, cut on track-matching residual |#Delta #eta| < 0.05, |#Delta #phi| < 0.05", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
2188 | fhLam0ETMTRD->SetYTitle("#lambda_{0}^{2}"); | |
2189 | fhLam0ETMTRD->SetXTitle("E (GeV)"); | |
2190 | outputContainer->Add(fhLam0ETMTRD); | |
2191 | ||
2192 | fhLam1ETMTRD = new TH2F ("hLam1ETMTRD","#lambda_{1}^{2} vs E, EMCAL SM covered by TRD, cut on track-matching residual |#Delta #eta| < 0.05, |#Delta #phi| < 0.05", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
2193 | fhLam1ETMTRD->SetYTitle("#lambda_{1}^{2}"); | |
2194 | fhLam1ETMTRD->SetXTitle("E (GeV)"); | |
2195 | outputContainer->Add(fhLam1ETMTRD); | |
2196 | ||
2197 | fhDispETMTRD = new TH2F ("hDispETMTRD"," dispersion^{2} vs E, EMCAL SM covered by TRD, cut on track-matching residual |#Delta #eta| < 0.05, |#Delta #phi| < 0.05", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
2198 | fhDispETMTRD->SetYTitle("Dispersion^{2}"); | |
2199 | fhDispETMTRD->SetXTitle("E (GeV) "); | |
2200 | outputContainer->Add(fhDispETMTRD); | |
2201 | } | |
521636d2 | 2202 | } |
2203 | ||
764ab1f4 | 2204 | if(!fFillOnlySimpleSSHisto) |
34c16486 | 2205 | { |
764ab1f4 | 2206 | fhNCellsLam0LowE = new TH2F ("hNCellsLam0LowE","N_{cells} in cluster vs #lambda_{0}^{2}, E < 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax); |
2207 | fhNCellsLam0LowE->SetXTitle("N_{cells}"); | |
2208 | fhNCellsLam0LowE->SetYTitle("#lambda_{0}^{2}"); | |
2209 | outputContainer->Add(fhNCellsLam0LowE); | |
2210 | ||
2211 | fhNCellsLam0HighE = new TH2F ("hNCellsLam0HighE","N_{cells} in cluster vs #lambda_{0}^{2}, E > 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax); | |
2212 | fhNCellsLam0HighE->SetXTitle("N_{cells}"); | |
2213 | fhNCellsLam0HighE->SetYTitle("#lambda_{0}^{2}"); | |
2214 | outputContainer->Add(fhNCellsLam0HighE); | |
2215 | ||
2216 | fhNCellsLam1LowE = new TH2F ("hNCellsLam1LowE","N_{cells} in cluster vs #lambda_{1}^{2}, E < 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax); | |
2217 | fhNCellsLam1LowE->SetXTitle("N_{cells}"); | |
2218 | fhNCellsLam1LowE->SetYTitle("#lambda_{0}^{2}"); | |
2219 | outputContainer->Add(fhNCellsLam1LowE); | |
2220 | ||
2221 | fhNCellsLam1HighE = new TH2F ("hNCellsLam1HighE","N_{cells} in cluster vs #lambda_{1}^{2}, E > 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax); | |
2222 | fhNCellsLam1HighE->SetXTitle("N_{cells}"); | |
2223 | fhNCellsLam1HighE->SetYTitle("#lambda_{0}^{2}"); | |
2224 | outputContainer->Add(fhNCellsLam1HighE); | |
2225 | ||
2226 | fhNCellsDispLowE = new TH2F ("hNCellsDispLowE","N_{cells} in cluster vs dispersion^{2}, E < 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax); | |
2227 | fhNCellsDispLowE->SetXTitle("N_{cells}"); | |
2228 | fhNCellsDispLowE->SetYTitle("D^{2}"); | |
2229 | outputContainer->Add(fhNCellsDispLowE); | |
2230 | ||
2231 | fhNCellsDispHighE = new TH2F ("hNCellsDispHighE","N_{cells} in cluster vs dispersion^{2}, E < 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax); | |
2232 | fhNCellsDispHighE->SetXTitle("N_{cells}"); | |
2233 | fhNCellsDispHighE->SetYTitle("D^{2}"); | |
2234 | outputContainer->Add(fhNCellsDispHighE); | |
2235 | ||
2236 | fhEtaLam0LowE = new TH2F ("hEtaLam0LowE","#eta vs #lambda_{0}^{2}, E < 2 GeV", netabins,etamin,etamax, ssbins,ssmin,ssmax); | |
2237 | fhEtaLam0LowE->SetYTitle("#lambda_{0}^{2}"); | |
2238 | fhEtaLam0LowE->SetXTitle("#eta"); | |
2239 | outputContainer->Add(fhEtaLam0LowE); | |
2240 | ||
2241 | fhPhiLam0LowE = new TH2F ("hPhiLam0LowE","#phi vs #lambda_{0}^{2}, E < 2 GeV", nphibins,phimin,phimax, ssbins,ssmin,ssmax); | |
2242 | fhPhiLam0LowE->SetYTitle("#lambda_{0}^{2}"); | |
2243 | fhPhiLam0LowE->SetXTitle("#phi"); | |
2244 | outputContainer->Add(fhPhiLam0LowE); | |
2245 | ||
2246 | fhEtaLam0HighE = new TH2F ("hEtaLam0HighE","#eta vs #lambda_{0}^{2}, E > 2 GeV", netabins,etamin,etamax, ssbins,ssmin,ssmax); | |
2247 | fhEtaLam0HighE->SetYTitle("#lambda_{0}^{2}"); | |
2248 | fhEtaLam0HighE->SetXTitle("#eta"); | |
2249 | outputContainer->Add(fhEtaLam0HighE); | |
2250 | ||
2251 | fhPhiLam0HighE = new TH2F ("hPhiLam0HighE","#phi vs #lambda_{0}^{2}, E > 2 GeV", nphibins,phimin,phimax, ssbins,ssmin,ssmax); | |
2252 | fhPhiLam0HighE->SetYTitle("#lambda_{0}^{2}"); | |
2253 | fhPhiLam0HighE->SetXTitle("#phi"); | |
2254 | outputContainer->Add(fhPhiLam0HighE); | |
2255 | ||
2256 | fhLam1Lam0LowE = new TH2F ("hLam1Lam0LowE","#lambda_{0}^{2} vs #lambda_{1}^{2} in cluster of E < 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax); | |
2257 | fhLam1Lam0LowE->SetYTitle("#lambda_{0}^{2}"); | |
2258 | fhLam1Lam0LowE->SetXTitle("#lambda_{1}^{2}"); | |
2259 | outputContainer->Add(fhLam1Lam0LowE); | |
2260 | ||
2261 | fhLam1Lam0HighE = new TH2F ("hLam1Lam0HighE","#lambda_{0}^{2} vs #lambda_{1}^{2} in cluster of E > 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax); | |
2262 | fhLam1Lam0HighE->SetYTitle("#lambda_{0}^{2}"); | |
2263 | fhLam1Lam0HighE->SetXTitle("#lambda_{1}^{2}"); | |
2264 | outputContainer->Add(fhLam1Lam0HighE); | |
2265 | ||
2266 | fhLam0DispLowE = new TH2F ("hLam0DispLowE","#lambda_{0}^{2} vs dispersion^{2} in cluster of E < 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax); | |
2267 | fhLam0DispLowE->SetXTitle("#lambda_{0}^{2}"); | |
2268 | fhLam0DispLowE->SetYTitle("D^{2}"); | |
2269 | outputContainer->Add(fhLam0DispLowE); | |
2270 | ||
2271 | fhLam0DispHighE = new TH2F ("hLam0DispHighE","#lambda_{0}^{2} vs dispersion^{2} in cluster of E > 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax); | |
2272 | fhLam0DispHighE->SetXTitle("#lambda_{0}^{2}"); | |
2273 | fhLam0DispHighE->SetYTitle("D^{2}"); | |
2274 | outputContainer->Add(fhLam0DispHighE); | |
2275 | ||
2276 | fhDispLam1LowE = new TH2F ("hDispLam1LowE","Dispersion^{2} vs #lambda_{1}^{2} in cluster of E < 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax); | |
2277 | fhDispLam1LowE->SetXTitle("D^{2}"); | |
2278 | fhDispLam1LowE->SetYTitle("#lambda_{1}^{2}"); | |
2279 | outputContainer->Add(fhDispLam1LowE); | |
2280 | ||
2281 | fhDispLam1HighE = new TH2F ("hDispLam1HighE","Dispersion^{2} vs #lambda_{1^{2}} in cluster of E > 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax); | |
2282 | fhDispLam1HighE->SetXTitle("D^{2}"); | |
2283 | fhDispLam1HighE->SetYTitle("#lambda_{1}^{2}"); | |
2284 | outputContainer->Add(fhDispLam1HighE); | |
2285 | ||
2286 | if(fCalorimeter == "EMCAL") | |
34c16486 | 2287 | { |
764ab1f4 | 2288 | fhDispEtaE = new TH2F ("hDispEtaE","#sigma^{2}_{#eta #eta} = #Sigma w_{i}(#eta_{i} - <#eta>)^{2}/ #Sigma w_{i} vs E", nptbins,ptmin,ptmax, ssbins,ssmin,ssmax); |
2289 | fhDispEtaE->SetXTitle("E (GeV)"); | |
2290 | fhDispEtaE->SetYTitle("#sigma^{2}_{#eta #eta}"); | |
2291 | outputContainer->Add(fhDispEtaE); | |
2292 | ||
2293 | fhDispPhiE = new TH2F ("hDispPhiE","#sigma^{2}_{#phi #phi} = #Sigma w_{i}(#phi_{i} - <#phi>)^{2} / #Sigma w_{i} vs E", nptbins,ptmin,ptmax, ssbins,ssmin,ssmax); | |
2294 | fhDispPhiE->SetXTitle("E (GeV)"); | |
2295 | fhDispPhiE->SetYTitle("#sigma^{2}_{#phi #phi}"); | |
2296 | outputContainer->Add(fhDispPhiE); | |
2297 | ||
2298 | fhSumEtaE = new TH2F ("hSumEtaE","#delta^{2}_{#eta #eta} = #Sigma w_{i}(#eta_{i})^{2} / #Sigma w_{i} - <#eta>^{2} vs E", nptbins,ptmin,ptmax, ssbins,ssmin,ssmax); | |
2299 | fhSumEtaE->SetXTitle("E (GeV)"); | |
2300 | fhSumEtaE->SetYTitle("#delta^{2}_{#eta #eta}"); | |
2301 | outputContainer->Add(fhSumEtaE); | |
2302 | ||
2303 | fhSumPhiE = new TH2F ("hSumPhiE","#delta^{2}_{#phi #phi} = #Sigma w_{i}(#phi_{i})^{2}/ #Sigma w_{i} - <#phi>^{2} vs E", | |
2304 | nptbins,ptmin,ptmax, ssbins,ssmin,ssmax); | |
2305 | fhSumPhiE->SetXTitle("E (GeV)"); | |
2306 | fhSumPhiE->SetYTitle("#delta^{2}_{#phi #phi}"); | |
2307 | outputContainer->Add(fhSumPhiE); | |
2308 | ||
2309 | fhSumEtaPhiE = new TH2F ("hSumEtaPhiE","#delta^{2}_{#eta #phi} = #Sigma w_{i}(#phi_{i} #eta_{i} ) / #Sigma w_{i} - <#phi><#eta> vs E", | |
2310 | nptbins,ptmin,ptmax, 2*ssbins,-ssmax,ssmax); | |
2311 | fhSumEtaPhiE->SetXTitle("E (GeV)"); | |
2312 | fhSumEtaPhiE->SetYTitle("#delta^{2}_{#eta #phi}"); | |
2313 | outputContainer->Add(fhSumEtaPhiE); | |
2314 | ||
2315 | fhDispEtaPhiDiffE = new TH2F ("hDispEtaPhiDiffE","#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta} vs E", | |
2316 | nptbins,ptmin,ptmax,200, -10,10); | |
2317 | fhDispEtaPhiDiffE->SetXTitle("E (GeV)"); | |
2318 | fhDispEtaPhiDiffE->SetYTitle("#sigma^{2}_{#phi #phi}-#sigma^{2}_{#eta #eta}"); | |
2319 | outputContainer->Add(fhDispEtaPhiDiffE); | |
bfdcf7fb | 2320 | |
764ab1f4 | 2321 | fhSphericityE = new TH2F ("hSphericityE","(#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi}) vs E", |
2322 | nptbins,ptmin,ptmax, 200, -1,1); | |
2323 | fhSphericityE->SetXTitle("E (GeV)"); | |
2324 | fhSphericityE->SetYTitle("s = (#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi})"); | |
2325 | outputContainer->Add(fhSphericityE); | |
bfdcf7fb | 2326 | |
764ab1f4 | 2327 | fhDispSumEtaDiffE = new TH2F ("hDispSumEtaDiffE","#sigma^{2}_{#eta #eta} - #delta^{2}_{#eta #eta} / average vs E", nptbins,ptmin,ptmax, 200,-0.01,0.01); |
2328 | fhDispSumEtaDiffE->SetXTitle("E (GeV)"); | |
2329 | fhDispSumEtaDiffE->SetYTitle("#sigma^{2}_{#eta #eta} - #delta^{2}_{#eta #eta} / average"); | |
2330 | outputContainer->Add(fhDispSumEtaDiffE); | |
2331 | ||
2332 | fhDispSumPhiDiffE = new TH2F ("hDispSumPhiDiffE","#sigma^{2}_{#phi #phi} - #delta^{2}_{#phi #phi} / average vs E", nptbins,ptmin,ptmax, 200,-0.01,0.01); | |
2333 | fhDispSumPhiDiffE->SetXTitle("E (GeV)"); | |
2334 | fhDispSumPhiDiffE->SetYTitle("#sigma^{2}_{#phi #phi} - #delta^{2}_{#phi #phi} / average"); | |
2335 | outputContainer->Add(fhDispSumPhiDiffE); | |
2336 | ||
2337 | for(Int_t i = 0; i < 7; i++) | |
2338 | { | |
2339 | fhDispEtaDispPhi[i] = new TH2F (Form("hDispEtaDispPhi_EBin%d",i),Form("#sigma^{2}_{#phi #phi} vs #sigma^{2}_{#eta #eta} for %d < E < %d GeV",bin[i],bin[i+1]), | |
2340 | ssbins,ssmin,ssmax , ssbins,ssmin,ssmax); | |
2341 | fhDispEtaDispPhi[i]->SetXTitle("#sigma^{2}_{#eta #eta}"); | |
2342 | fhDispEtaDispPhi[i]->SetYTitle("#sigma^{2}_{#phi #phi}"); | |
2343 | outputContainer->Add(fhDispEtaDispPhi[i]); | |
2344 | ||
2345 | fhLambda0DispEta[i] = new TH2F (Form("hLambda0DispEta_EBin%d",i),Form("#lambda^{2}_{0} vs #sigma^{2}_{#eta #eta} for %d < E < %d GeV",bin[i],bin[i+1]), | |
2346 | ssbins,ssmin,ssmax , ssbins,ssmin,ssmax); | |
2347 | fhLambda0DispEta[i]->SetXTitle("#lambda^{2}_{0}"); | |
2348 | fhLambda0DispEta[i]->SetYTitle("#sigma^{2}_{#eta #eta}"); | |
2349 | outputContainer->Add(fhLambda0DispEta[i]); | |
2350 | ||
2351 | fhLambda0DispPhi[i] = new TH2F (Form("hLambda0DispPhi_EBin%d",i),Form("#lambda^{2}_{0}} vs #sigma^{2}_{#phi #phi} for %d < E < %d GeV",bin[i],bin[i+1]), | |
2352 | ssbins,ssmin,ssmax , ssbins,ssmin,ssmax); | |
2353 | fhLambda0DispPhi[i]->SetXTitle("#lambda^{2}_{0}"); | |
2354 | fhLambda0DispPhi[i]->SetYTitle("#sigma^{2}_{#phi #phi}"); | |
2355 | outputContainer->Add(fhLambda0DispPhi[i]); | |
2356 | } | |
34c16486 | 2357 | } |
2358 | } | |
521636d2 | 2359 | } // Shower shape |
2360 | ||
09273901 | 2361 | // Track Matching |
2362 | ||
b5dbb99b | 2363 | if(fFillTMHisto) |
2364 | { | |
4bfeae64 | 2365 | fhTrackMatchedDEta[0] = new TH2F |
2366 | ("hTrackMatchedDEtaNoCut", | |
2367 | "d#eta of cluster-track vs cluster energy, no photon cuts", | |
09273901 | 2368 | nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax); |
4bfeae64 | 2369 | fhTrackMatchedDEta[0]->SetYTitle("d#eta"); |
2370 | fhTrackMatchedDEta[0]->SetXTitle("E_{cluster} (GeV)"); | |
09273901 | 2371 | |
4bfeae64 | 2372 | fhTrackMatchedDPhi[0] = new TH2F |
2373 | ("hTrackMatchedDPhiNoCut", | |
2374 | "d#phi of cluster-track vs cluster energy, no photon cuts", | |
09273901 | 2375 | nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax); |
4bfeae64 | 2376 | fhTrackMatchedDPhi[0]->SetYTitle("d#phi (rad)"); |
2377 | fhTrackMatchedDPhi[0]->SetXTitle("E_{cluster} (GeV)"); | |
09273901 | 2378 | |
4bfeae64 | 2379 | fhTrackMatchedDEtaDPhi[0] = new TH2F |
2380 | ("hTrackMatchedDEtaDPhiNoCut", | |
2381 | "d#eta vs d#phi of cluster-track vs cluster energy, no photon cuts", | |
09273901 | 2382 | nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax); |
4bfeae64 | 2383 | fhTrackMatchedDEtaDPhi[0]->SetYTitle("d#phi (rad)"); |
2384 | fhTrackMatchedDEtaDPhi[0]->SetXTitle("d#eta"); | |
b5dbb99b | 2385 | |
4bfeae64 | 2386 | fhdEdx[0] = new TH2F ("hdEdxNoCut","matched track <dE/dx> vs cluster E, no photon cuts ", |
2387 | nptbins,ptmin,ptmax,ndedxbins, dedxmin, dedxmax); | |
2388 | fhdEdx[0]->SetXTitle("E (GeV)"); | |
2389 | fhdEdx[0]->SetYTitle("<dE/dx>"); | |
2390 | ||
2391 | fhEOverP[0] = new TH2F ("hEOverPNoCut","matched track E/p vs cluster E, no photon cuts ", | |
2392 | nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax); | |
2393 | fhEOverP[0]->SetXTitle("E (GeV)"); | |
2394 | fhEOverP[0]->SetYTitle("E/p"); | |
2395 | ||
2396 | outputContainer->Add(fhTrackMatchedDEta[0]) ; | |
2397 | outputContainer->Add(fhTrackMatchedDPhi[0]) ; | |
2398 | outputContainer->Add(fhTrackMatchedDEtaDPhi[0]) ; | |
2399 | outputContainer->Add(fhdEdx[0]); | |
2400 | outputContainer->Add(fhEOverP[0]); | |
2401 | ||
2402 | fhTrackMatchedDEta[1] = new TH2F | |
2403 | ("hTrackMatchedDEta", | |
09273901 | 2404 | "d#eta of cluster-track vs cluster energy, no photon cuts", |
2405 | nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax); | |
4bfeae64 | 2406 | fhTrackMatchedDEta[1]->SetYTitle("d#eta"); |
2407 | fhTrackMatchedDEta[1]->SetXTitle("E_{cluster} (GeV)"); | |
09273901 | 2408 | |
4bfeae64 | 2409 | fhTrackMatchedDPhi[1] = new TH2F |
2410 | ("hTrackMatchedDPhi", | |
09273901 | 2411 | "d#phi of cluster-track vs cluster energy, no photon cuts", |
2412 | nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax); | |
4bfeae64 | 2413 | fhTrackMatchedDPhi[1]->SetYTitle("d#phi (rad)"); |
2414 | fhTrackMatchedDPhi[1]->SetXTitle("E_{cluster} (GeV)"); | |
09273901 | 2415 | |
4bfeae64 | 2416 | fhTrackMatchedDEtaDPhi[1] = new TH2F |
2417 | ("hTrackMatchedDEtaDPhi", | |
09273901 | 2418 | "d#eta vs d#phi of cluster-track vs cluster energy, no photon cuts", |
2419 | nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax); | |
4bfeae64 | 2420 | fhTrackMatchedDEtaDPhi[1]->SetYTitle("d#phi (rad)"); |
2421 | fhTrackMatchedDEtaDPhi[1]->SetXTitle("d#eta"); | |
09273901 | 2422 | |
4bfeae64 | 2423 | fhdEdx[1] = new TH2F ("hdEdx","matched track <dE/dx> vs cluster E ", |
2424 | nptbins,ptmin,ptmax,ndedxbins, dedxmin, dedxmax); | |
2425 | fhdEdx[1]->SetXTitle("E (GeV)"); | |
2426 | fhdEdx[1]->SetYTitle("<dE/dx>"); | |
2427 | ||
2428 | fhEOverP[1] = new TH2F ("hEOverP","matched track E/p vs cluster E ", | |
2429 | nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax); | |
2430 | fhEOverP[1]->SetXTitle("E (GeV)"); | |
2431 | fhEOverP[1]->SetYTitle("E/p"); | |
2432 | ||
2433 | outputContainer->Add(fhTrackMatchedDEta[1]) ; | |
2434 | outputContainer->Add(fhTrackMatchedDPhi[1]) ; | |
2435 | outputContainer->Add(fhTrackMatchedDEtaDPhi[1]) ; | |
2436 | outputContainer->Add(fhdEdx[1]); | |
2437 | outputContainer->Add(fhEOverP[1]); | |
31ae6d59 | 2438 | |
b5dbb99b | 2439 | if(fCalorimeter=="EMCAL") |
2440 | { | |
4bfeae64 | 2441 | fhTrackMatchedDEtaTRD[0] = new TH2F |
b5dbb99b | 2442 | ("hTrackMatchedDEtaTRDNoCut", |
2443 | "d#eta of cluster-track vs cluster energy, SM behind TRD, no photon cuts", | |
2444 | nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax); | |
4bfeae64 | 2445 | fhTrackMatchedDEtaTRD[0]->SetYTitle("d#eta"); |
2446 | fhTrackMatchedDEtaTRD[0]->SetXTitle("E_{cluster} (GeV)"); | |
b5dbb99b | 2447 | |
4bfeae64 | 2448 | fhTrackMatchedDPhiTRD[0] = new TH2F |
b5dbb99b | 2449 | ("hTrackMatchedDPhiTRDNoCut", |
2450 | "d#phi of cluster-track vs cluster energy, SM behing TRD, no photon cuts", | |
2451 | nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax); | |
4bfeae64 | 2452 | fhTrackMatchedDPhiTRD[0]->SetYTitle("d#phi (rad)"); |
2453 | fhTrackMatchedDPhiTRD[0]->SetXTitle("E_{cluster} (GeV)"); | |
b5dbb99b | 2454 | |
4bfeae64 | 2455 | fhEOverPTRD[0] = new TH2F ("hEOverPTRDNoCut","matched track E/p vs cluster E, behind TRD, no photon cuts ", |
2456 | nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax); | |
2457 | fhEOverPTRD[0]->SetXTitle("E (GeV)"); | |
2458 | fhEOverPTRD[0]->SetYTitle("E/p"); | |
2459 | ||
2460 | outputContainer->Add(fhTrackMatchedDEtaTRD[0]) ; | |
2461 | outputContainer->Add(fhTrackMatchedDPhiTRD[0]) ; | |
2462 | outputContainer->Add(fhEOverPTRD[0]); | |
b5dbb99b | 2463 | |
4bfeae64 | 2464 | fhTrackMatchedDEtaTRD[1] = new TH2F |
2465 | ("hTrackMatchedDEtaTRD", | |
2466 | "d#eta of cluster-track vs cluster energy, SM behind TRD", | |
2467 | nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax); | |
2468 | fhTrackMatchedDEtaTRD[1]->SetYTitle("d#eta"); | |
2469 | fhTrackMatchedDEtaTRD[1]->SetXTitle("E_{cluster} (GeV)"); | |
2470 | ||
2471 | fhTrackMatchedDPhiTRD[1] = new TH2F | |
2472 | ("hTrackMatchedDPhiTRD", | |
2473 | "d#phi of cluster-track vs cluster energy, SM behing TRD", | |
2474 | nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax); | |
2475 | fhTrackMatchedDPhiTRD[1]->SetYTitle("d#phi (rad)"); | |
2476 | fhTrackMatchedDPhiTRD[1]->SetXTitle("E_{cluster} (GeV)"); | |
2477 | ||
2478 | fhEOverPTRD[1] = new TH2F ("hEOverPTRD","matched track E/p vs cluster E, behind TRD ", | |
2479 | nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax); | |
2480 | fhEOverPTRD[1]->SetXTitle("E (GeV)"); | |
2481 | fhEOverPTRD[1]->SetYTitle("E/p"); | |
2482 | ||
2483 | outputContainer->Add(fhTrackMatchedDEtaTRD[1]) ; | |
2484 | outputContainer->Add(fhTrackMatchedDPhiTRD[1]) ; | |
2485 | outputContainer->Add(fhEOverPTRD[1]); | |
b5dbb99b | 2486 | |
2487 | } | |
2488 | ||
31ae6d59 | 2489 | if(IsDataMC()) |
2490 | { | |
4bfeae64 | 2491 | fhTrackMatchedDEtaMCNoOverlap[0] = new TH2F |
2492 | ("hTrackMatchedDEtaMCNoOverlapNoCut", | |
2493 | "d#eta of cluster-track vs cluster energy, no other MC particles overlap", | |
2494 | nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax); | |
2495 | fhTrackMatchedDEtaMCNoOverlap[0]->SetYTitle("d#eta"); | |
2496 | fhTrackMatchedDEtaMCNoOverlap[0]->SetXTitle("E_{cluster} (GeV)"); | |
2497 | ||
2498 | fhTrackMatchedDPhiMCNoOverlap[0] = new TH2F | |
2499 | ("hTrackMatchedDPhiMCNoOverlapNoCut", | |
2500 | "d#phi of cluster-track vs cluster energy, no other MC particles overlap", | |
2501 | nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax); | |
2502 | fhTrackMatchedDPhiMCNoOverlap[0]->SetYTitle("d#phi (rad)"); | |
2503 | fhTrackMatchedDPhiMCNoOverlap[0]->SetXTitle("E_{cluster} (GeV)"); | |
2504 | ||
2505 | outputContainer->Add(fhTrackMatchedDEtaMCNoOverlap[0]) ; | |
2506 | outputContainer->Add(fhTrackMatchedDPhiMCNoOverlap[0]) ; | |
2507 | ||
2508 | fhTrackMatchedDEtaMCNoOverlap[1] = new TH2F | |
8d6b7f60 | 2509 | ("hTrackMatchedDEtaMCNoOverlap", |
2510 | "d#eta of cluster-track vs cluster energy, no other MC particles overlap", | |
2511 | nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax); | |
4bfeae64 | 2512 | fhTrackMatchedDEtaMCNoOverlap[1]->SetYTitle("d#eta"); |
2513 | fhTrackMatchedDEtaMCNoOverlap[1]->SetXTitle("E_{cluster} (GeV)"); | |
8d6b7f60 | 2514 | |
4bfeae64 | 2515 | fhTrackMatchedDPhiMCNoOverlap[1] = new TH2F |
8d6b7f60 | 2516 | ("hTrackMatchedDPhiMCNoOverlap", |
2517 | "d#phi of cluster-track vs cluster energy, no other MC particles overlap", | |
2518 | nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax); | |
4bfeae64 | 2519 | fhTrackMatchedDPhiMCNoOverlap[1]->SetYTitle("d#phi (rad)"); |
2520 | fhTrackMatchedDPhiMCNoOverlap[1]->SetXTitle("E_{cluster} (GeV)"); | |
2521 | ||
2522 | outputContainer->Add(fhTrackMatchedDEtaMCNoOverlap[1]) ; | |
2523 | outputContainer->Add(fhTrackMatchedDPhiMCNoOverlap[1]) ; | |
2524 | ||
2525 | fhTrackMatchedDEtaMCOverlap[0] = new TH2F | |
2526 | ("hTrackMatchedDEtaMCOverlapNoCut", | |
2527 | "d#eta of cluster-track vs cluster energy, several MC particles overlap", | |
2528 | nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax); | |
2529 | fhTrackMatchedDEtaMCOverlap[0]->SetYTitle("d#eta"); | |
2530 | fhTrackMatchedDEtaMCOverlap[0]->SetXTitle("E_{cluster} (GeV)"); | |
2531 | ||
2532 | fhTrackMatchedDPhiMCOverlap[0] = new TH2F | |
2533 | ("hTrackMatchedDPhiMCOverlapNoCut", | |
2534 | "d#phi of cluster-track vs cluster energy, several MC particles overlap", | |
2535 | nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax); | |
2536 | fhTrackMatchedDPhiMCOverlap[0]->SetYTitle("d#phi (rad)"); | |
2537 | fhTrackMatchedDPhiMCOverlap[0]->SetXTitle("E_{cluster} (GeV)"); | |
8d6b7f60 | 2538 | |
4bfeae64 | 2539 | outputContainer->Add(fhTrackMatchedDEtaMCOverlap[0]) ; |
2540 | outputContainer->Add(fhTrackMatchedDPhiMCOverlap[0]) ; | |
8d6b7f60 | 2541 | |
4bfeae64 | 2542 | fhTrackMatchedDEtaMCOverlap[1] = new TH2F |
8d6b7f60 | 2543 | ("hTrackMatchedDEtaMCOverlap", |
2544 | "d#eta of cluster-track vs cluster energy, several MC particles overlap", | |
2545 | nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax); | |
4bfeae64 | 2546 | fhTrackMatchedDEtaMCOverlap[1]->SetYTitle("d#eta"); |
2547 | fhTrackMatchedDEtaMCOverlap[1]->SetXTitle("E_{cluster} (GeV)"); | |
8d6b7f60 | 2548 | |
4bfeae64 | 2549 | fhTrackMatchedDPhiMCOverlap[1] = new TH2F |
8d6b7f60 | 2550 | ("hTrackMatchedDPhiMCOverlap", |
2551 | "d#phi of cluster-track vs cluster energy, several MC particles overlap", | |
2552 | nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax); | |
4bfeae64 | 2553 | fhTrackMatchedDPhiMCOverlap[1]->SetYTitle("d#phi (rad)"); |
2554 | fhTrackMatchedDPhiMCOverlap[1]->SetXTitle("E_{cluster} (GeV)"); | |
2555 | ||
2556 | outputContainer->Add(fhTrackMatchedDEtaMCOverlap[1]) ; | |
2557 | outputContainer->Add(fhTrackMatchedDPhiMCOverlap[1]) ; | |
2558 | ||
2559 | fhTrackMatchedDEtaMCConversion[0] = new TH2F | |
2560 | ("hTrackMatchedDEtaMCConversionNoCut", | |
2561 | "d#eta of cluster-track vs cluster energy, no other MC particles overlap appart from conversions", | |
2562 | nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax); | |
2563 | fhTrackMatchedDEtaMCConversion[0]->SetYTitle("d#eta"); | |
2564 | fhTrackMatchedDEtaMCConversion[0]->SetXTitle("E_{cluster} (GeV)"); | |
8d6b7f60 | 2565 | |
4bfeae64 | 2566 | fhTrackMatchedDPhiMCConversion[0] = new TH2F |
2567 | ("hTrackMatchedDPhiMCConversionNoCut", | |
2568 | "d#phi of cluster-track vs cluster energy, no other MC particles overlap appart from conversions", | |
2569 | nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax); | |
2570 | fhTrackMatchedDPhiMCConversion[0]->SetYTitle("d#phi (rad)"); | |
2571 | fhTrackMatchedDPhiMCConversion[0]->SetXTitle("E_{cluster} (GeV)"); | |
8d6b7f60 | 2572 | |
4bfeae64 | 2573 | outputContainer->Add(fhTrackMatchedDEtaMCConversion[0]) ; |
2574 | outputContainer->Add(fhTrackMatchedDPhiMCConversion[0]) ; | |
2575 | ||
8d6b7f60 | 2576 | |
4bfeae64 | 2577 | fhTrackMatchedDEtaMCConversion[1] = new TH2F |
b5dbb99b | 2578 | ("hTrackMatchedDEtaMCConversion", |
4bfeae64 | 2579 | "d#eta of cluster-track vs cluster energy, no other MC particles overlap appart from conversions", |
8d6b7f60 | 2580 | nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax); |
4bfeae64 | 2581 | fhTrackMatchedDEtaMCConversion[1]->SetYTitle("d#eta"); |
2582 | fhTrackMatchedDEtaMCConversion[1]->SetXTitle("E_{cluster} (GeV)"); | |
8d6b7f60 | 2583 | |
4bfeae64 | 2584 | fhTrackMatchedDPhiMCConversion[1] = new TH2F |
b5dbb99b | 2585 | ("hTrackMatchedDPhiMCConversion", |
8d6b7f60 | 2586 | "d#phi of cluster-track vs cluster energy, no other MC particles overlap appart from conversions", |
2587 | nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax); | |
4bfeae64 | 2588 | fhTrackMatchedDPhiMCConversion[1]->SetYTitle("d#phi (rad)"); |
2589 | fhTrackMatchedDPhiMCConversion[1]->SetXTitle("E_{cluster} (GeV)"); | |
8d6b7f60 | 2590 | |
4bfeae64 | 2591 | outputContainer->Add(fhTrackMatchedDEtaMCConversion[1]) ; |
2592 | outputContainer->Add(fhTrackMatchedDPhiMCConversion[1]) ; | |
8d6b7f60 | 2593 | |
31ae6d59 | 2594 | |
4bfeae64 | 2595 | fhTrackMatchedMCParticle[0] = new TH2F |
31ae6d59 | 2596 | ("hTrackMatchedMCParticleNoCut", |
2597 | "Origin of particle vs energy", | |
2598 | nptbins,ptmin,ptmax,8,0,8); | |
4bfeae64 | 2599 | fhTrackMatchedMCParticle[0]->SetXTitle("E (GeV)"); |
2600 | //fhTrackMatchedMCParticle[0]->SetYTitle("Particle type"); | |
2601 | ||
2602 | fhTrackMatchedMCParticle[0]->GetYaxis()->SetBinLabel(1 ,"Photon"); | |
2603 | fhTrackMatchedMCParticle[0]->GetYaxis()->SetBinLabel(2 ,"Electron"); | |
2604 | fhTrackMatchedMCParticle[0]->GetYaxis()->SetBinLabel(3 ,"Meson Merged"); | |
2605 | fhTrackMatchedMCParticle[0]->GetYaxis()->SetBinLabel(4 ,"Rest"); | |
2606 | fhTrackMatchedMCParticle[0]->GetYaxis()->SetBinLabel(5 ,"Conv. Photon"); | |
2607 | fhTrackMatchedMCParticle[0]->GetYaxis()->SetBinLabel(6 ,"Conv. Electron"); | |
2608 | fhTrackMatchedMCParticle[0]->GetYaxis()->SetBinLabel(7 ,"Conv. Merged"); | |
2609 | fhTrackMatchedMCParticle[0]->GetYaxis()->SetBinLabel(8 ,"Conv. Rest"); | |
2610 | ||
2611 | fhTrackMatchedMCParticle[1] = new TH2F | |
2612 | ("hTrackMatchedMCParticle", | |
2613 | "Origin of particle vs energy", | |
2614 | nptbins,ptmin,ptmax,8,0,8); | |
2615 | fhTrackMatchedMCParticle[1]->SetXTitle("E (GeV)"); | |
2616 | //fhTrackMatchedMCParticle[1]->SetYTitle("Particle type"); | |
31ae6d59 | 2617 | |
4bfeae64 | 2618 | fhTrackMatchedMCParticle[1]->GetYaxis()->SetBinLabel(1 ,"Photon"); |
2619 | fhTrackMatchedMCParticle[1]->GetYaxis()->SetBinLabel(2 ,"Electron"); | |
2620 | fhTrackMatchedMCParticle[1]->GetYaxis()->SetBinLabel(3 ,"Meson Merged"); | |
2621 | fhTrackMatchedMCParticle[1]->GetYaxis()->SetBinLabel(4 ,"Rest"); | |
2622 | fhTrackMatchedMCParticle[1]->GetYaxis()->SetBinLabel(5 ,"Conv. Photon"); | |
2623 | fhTrackMatchedMCParticle[1]->GetYaxis()->SetBinLabel(6 ,"Conv. Electron"); | |
2624 | fhTrackMatchedMCParticle[1]->GetYaxis()->SetBinLabel(7 ,"Conv. Merged"); | |
2625 | fhTrackMatchedMCParticle[1]->GetYaxis()->SetBinLabel(8 ,"Conv. Rest"); | |
31ae6d59 | 2626 | |
4bfeae64 | 2627 | outputContainer->Add(fhTrackMatchedMCParticle[0]); |
2628 | outputContainer->Add(fhTrackMatchedMCParticle[1]); | |
8d6b7f60 | 2629 | |
31ae6d59 | 2630 | } |
09273901 | 2631 | } |
2632 | ||
2ad19c3d | 2633 | if(fFillPileUpHistograms) |
2634 | { | |
5e5e056f | 2635 | |
2636 | TString pileUpName[] = {"SPD","EMCAL","SPDOrEMCAL","SPDAndEMCAL","SPDAndNotEMCAL","EMCALAndNotSPD","NotSPDAndNotEMCAL"} ; | |
2637 | ||
2638 | for(Int_t i = 0 ; i < 7 ; i++) | |
2639 | { | |
fad96885 | 2640 | fhPtPileUp[i] = new TH1F(Form("hPtPileUp%s",pileUpName[i].Data()), |
2641 | Form("Cluster p_{T} distribution, %s Pile-Up event",pileUpName[i].Data()), nptbins,ptmin,ptmax); | |
2642 | fhPtPileUp[i]->SetXTitle("p_{T} (GeV/c)"); | |
2643 | outputContainer->Add(fhPtPileUp[i]); | |
2644 | ||
2645 | fhPtChargedPileUp[i] = new TH1F(Form("hPtChargedPileUp%s",pileUpName[i].Data()), | |
2646 | Form("Charged clusters p_{T} distribution, %s Pile-Up event",pileUpName[i].Data()), nptbins,ptmin,ptmax); | |
2647 | fhPtChargedPileUp[i]->SetXTitle("p_{T} (GeV/c)"); | |
2648 | outputContainer->Add(fhPtChargedPileUp[i]); | |
2649 | ||
5e5e056f | 2650 | fhPtPhotonPileUp[i] = new TH1F(Form("hPtPhotonPileUp%s",pileUpName[i].Data()), |
fad96885 | 2651 | Form("Selected photon p_{T} distribution, %s Pile-Up event",pileUpName[i].Data()), nptbins,ptmin,ptmax); |
5e5e056f | 2652 | fhPtPhotonPileUp[i]->SetXTitle("p_{T} (GeV/c)"); |
2653 | outputContainer->Add(fhPtPhotonPileUp[i]); | |
fad96885 | 2654 | |
650d1938 | 2655 | |
2656 | fhClusterEFracLongTimePileUp[i] = new TH2F(Form("hClusterEFracLongTimePileUp%s",pileUpName[i].Data()), | |
2657 | Form("Cluster E vs fraction of cluster energy from large T cells, %s Pile-Up event",pileUpName[i].Data()), | |
2658 | nptbins,ptmin,ptmax,200,0,1); | |
2659 | fhClusterEFracLongTimePileUp[i]->SetXTitle("E (GeV)"); | |
2660 | fhClusterEFracLongTimePileUp[i]->SetYTitle("E(large time) / E"); | |
2661 | outputContainer->Add(fhClusterEFracLongTimePileUp[i]); | |
2662 | ||
fad96885 | 2663 | fhClusterTimeDiffPileUp[i] = new TH2F(Form("hClusterTimeDiffPileUp%s",pileUpName[i].Data()), |
2664 | Form("Cluster E vs t_{max}-t_{cell} in cluster, %s Pile-Up event",pileUpName[i].Data()), | |
2665 | nptbins,ptmin,ptmax,200,-100,100); | |
2666 | fhClusterTimeDiffPileUp[i]->SetXTitle("E (GeV)"); | |
2667 | fhClusterTimeDiffPileUp[i]->SetYTitle("t_{max}-t_{cell} (ns)"); | |
2668 | outputContainer->Add(fhClusterTimeDiffPileUp[i]); | |
2669 | ||
2670 | fhClusterTimeDiffChargedPileUp[i] = new TH2F(Form("hClusterTimeDiffChargedPileUp%s",pileUpName[i].Data()), | |
2671 | Form("Charged clusters E vs t_{max}-t_{cell} in cluster, %s Pile-Up event",pileUpName[i].Data()), | |
2672 | nptbins,ptmin,ptmax,200,-100,100); | |
2673 | fhClusterTimeDiffChargedPileUp[i]->SetXTitle("E (GeV)"); | |
2674 | fhClusterTimeDiffChargedPileUp[i]->SetYTitle("t_{max}-t_{cell} (ns)"); | |
2675 | outputContainer->Add(fhClusterTimeDiffChargedPileUp[i]); | |
2676 | ||
2677 | fhClusterTimeDiffPhotonPileUp[i] = new TH2F(Form("hClusterTimeDiffPhotonPileUp%s",pileUpName[i].Data()), | |
2678 | Form("Selected photon E vs t_{max}-t_{cell} in cluster, %s Pile-Up event",pileUpName[i].Data()), | |
2679 | nptbins,ptmin,ptmax,200,-100,100); | |
2680 | fhClusterTimeDiffPhotonPileUp[i]->SetXTitle("E (GeV)"); | |
2681 | fhClusterTimeDiffPhotonPileUp[i]->SetYTitle("t_{max}-t_{cell} (ns)"); | |
2682 | outputContainer->Add(fhClusterTimeDiffPhotonPileUp[i]); | |
2683 | ||
2684 | fhLambda0PileUp[i] = new TH2F(Form("hLambda0PileUp%s",pileUpName[i].Data()), | |
2685 | Form("Cluster E vs #lambda^{2}_{0} in cluster, %s Pile-Up event",pileUpName[i].Data()), | |
2686 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
2687 | fhLambda0PileUp[i]->SetXTitle("E (GeV)"); | |
2688 | fhLambda0PileUp[i]->SetYTitle("#lambda^{2}_{0}"); | |
2689 | outputContainer->Add(fhLambda0PileUp[i]); | |
2690 | ||
2691 | fhLambda0ChargedPileUp[i] = new TH2F(Form("hLambda0ChargedPileUp%s",pileUpName[i].Data()), | |
2692 | Form("Charged clusters E vs #lambda^{2}_{0}in cluster, %s Pile-Up event",pileUpName[i].Data()), nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
2693 | fhLambda0ChargedPileUp[i]->SetXTitle("E (GeV)"); | |
2694 | fhLambda0ChargedPileUp[i]->SetYTitle("#lambda^{2}_{0}"); | |
2695 | outputContainer->Add(fhLambda0ChargedPileUp[i]); | |
2696 | ||
5e5e056f | 2697 | } |
2698 | ||
fedea415 | 2699 | fhEtaPhiBC0 = new TH2F ("hEtaPhiBC0","eta-phi for clusters tof corresponding to BC=0",netabins,etamin,etamax, nphibins,phimin,phimax); |
2700 | fhEtaPhiBC0->SetXTitle("#eta "); | |
2701 | fhEtaPhiBC0->SetYTitle("#phi (rad)"); | |
2702 | outputContainer->Add(fhEtaPhiBC0); | |
2703 | ||
2704 | fhEtaPhiBCPlus = new TH2F ("hEtaPhiBCPlus","eta-phi for clusters tof corresponding to BC>0",netabins,etamin,etamax, nphibins,phimin,phimax); | |
2705 | fhEtaPhiBCPlus->SetXTitle("#eta "); | |
2706 | fhEtaPhiBCPlus->SetYTitle("#phi (rad)"); | |
2707 | outputContainer->Add(fhEtaPhiBCPlus); | |
2708 | ||
2709 | fhEtaPhiBCMinus = new TH2F ("hEtaPhiBCMinus","eta-phi for clusters tof corresponding to BC<0",netabins,etamin,etamax, nphibins,phimin,phimax); | |
2710 | fhEtaPhiBCMinus->SetXTitle("#eta "); | |
2711 | fhEtaPhiBCMinus->SetYTitle("#phi (rad)"); | |
2712 | outputContainer->Add(fhEtaPhiBCMinus); | |
2713 | ||
2714 | fhEtaPhiBC0PileUpSPD = new TH2F ("hEtaPhiBC0PileUpSPD","eta-phi for clusters tof corresponding to BC=0, SPD pile-up",netabins,etamin,etamax, nphibins,phimin,phimax); | |
2715 | fhEtaPhiBC0PileUpSPD->SetXTitle("#eta "); | |
2716 | fhEtaPhiBC0PileUpSPD->SetYTitle("#phi (rad)"); | |
2717 | outputContainer->Add(fhEtaPhiBC0PileUpSPD); | |
2718 | ||
2719 | fhEtaPhiBCPlusPileUpSPD = new TH2F ("hEtaPhiBCPlusPileUpSPD","eta-phi for clusters tof corresponding to BC>0, SPD pile-up",netabins,etamin,etamax, nphibins,phimin,phimax); | |
2720 | fhEtaPhiBCPlusPileUpSPD->SetXTitle("#eta "); | |
2721 | fhEtaPhiBCPlusPileUpSPD->SetYTitle("#phi (rad)"); | |
2722 | outputContainer->Add(fhEtaPhiBCPlusPileUpSPD); | |
2723 | ||
2724 | fhEtaPhiBCMinusPileUpSPD = new TH2F ("hEtaPhiBCMinusPileUpSPD","eta-phi for clusters tof corresponding to BC<0, SPD pile-up",netabins,etamin,etamax, nphibins,phimin,phimax); | |
2725 | fhEtaPhiBCMinusPileUpSPD->SetXTitle("#eta "); | |
2726 | fhEtaPhiBCMinusPileUpSPD->SetYTitle("#phi (rad)"); | |
2727 | outputContainer->Add(fhEtaPhiBCMinusPileUpSPD); | |
2728 | ||
5e5e056f | 2729 | fhTimeENoCut = new TH2F ("hTimeE_NoCut","time of cluster vs E of clusters, no cut", nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
2ad19c3d | 2730 | fhTimeENoCut->SetXTitle("E (GeV)"); |
2731 | fhTimeENoCut->SetYTitle("time (ns)"); | |
2732 | outputContainer->Add(fhTimeENoCut); | |
2733 | ||
2734 | fhTimeESPD = new TH2F ("hTimeE_SPD","time of cluster vs E of clusters, SPD cut", nptbins,ptmin,ptmax, ntimebins,timemin,timemax); | |
2735 | fhTimeESPD->SetXTitle("E (GeV)"); | |
2736 | fhTimeESPD->SetYTitle("time (ns)"); | |
2737 | outputContainer->Add(fhTimeESPD); | |
2738 | ||
2739 | fhTimeESPDMulti = new TH2F ("hTimeE_SPDMulti","time of cluster vs E of clusters, SPD multi cut", nptbins,ptmin,ptmax, ntimebins,timemin,timemax); | |
2740 | fhTimeESPDMulti->SetXTitle("E (GeV)"); | |
2741 | fhTimeESPDMulti->SetYTitle("time (ns)"); | |
2742 | outputContainer->Add(fhTimeESPDMulti); | |
2743 | ||
2744 | fhTimeNPileUpVertSPD = new TH2F ("hTime_NPileUpVertSPD","time of cluster vs N pile-up SPD vertex", ntimebins,timemin,timemax,50,0,50); | |
2745 | fhTimeNPileUpVertSPD->SetYTitle("# vertex "); | |
2746 | fhTimeNPileUpVertSPD->SetXTitle("time (ns)"); | |
fad96885 | 2747 | outputContainer->Add(fhTimeNPileUpVertSPD); |
2ad19c3d | 2748 | |
2749 | fhTimeNPileUpVertTrack = new TH2F ("hTime_NPileUpVertTracks","time of cluster vs N pile-up Tracks vertex", ntimebins,timemin,timemax, 50,0,50 ); | |
2750 | fhTimeNPileUpVertTrack->SetYTitle("# vertex "); | |
2751 | fhTimeNPileUpVertTrack->SetXTitle("time (ns)"); | |
2752 | outputContainer->Add(fhTimeNPileUpVertTrack); | |
2753 | ||
2754 | fhTimeNPileUpVertContributors = new TH2F ("hTime_NPileUpVertContributors","time of cluster vs N constributors to pile-up SPD vertex", ntimebins,timemin,timemax,50,0,50); | |
2755 | fhTimeNPileUpVertContributors->SetYTitle("# vertex "); | |
2756 | fhTimeNPileUpVertContributors->SetXTitle("time (ns)"); | |
2757 | outputContainer->Add(fhTimeNPileUpVertContributors); | |
2758 | ||
2759 | fhTimePileUpMainVertexZDistance = new TH2F ("hTime_PileUpMainVertexZDistance","time of cluster vs distance in Z pile-up SPD vertex - main SPD vertex",ntimebins,timemin,timemax,100,0,50); | |
2760 | fhTimePileUpMainVertexZDistance->SetYTitle("distance Z (cm) "); | |
2761 | fhTimePileUpMainVertexZDistance->SetXTitle("time (ns)"); | |
2762 | outputContainer->Add(fhTimePileUpMainVertexZDistance); | |
2763 | ||
2764 | fhTimePileUpMainVertexZDiamond = new TH2F ("hTime_PileUpMainVertexZDiamond","time of cluster vs distance in Z pile-up SPD vertex - z diamond",ntimebins,timemin,timemax,100,0,50); | |
2765 | fhTimePileUpMainVertexZDiamond->SetYTitle("diamond distance Z (cm) "); | |
2766 | fhTimePileUpMainVertexZDiamond->SetXTitle("time (ns)"); | |
acd56ca4 | 2767 | outputContainer->Add(fhTimePileUpMainVertexZDiamond); |
2768 | ||
2769 | TString title[] = {"no |t diff| cut","|t diff|<20 ns","|t diff|>20 ns","|t diff|>40 ns"}; | |
2770 | TString name [] = {"TDiffNoCut","TDiffSmaller20ns","TDiffLarger20ns","TDiffLarger40ns"}; | |
2771 | for(Int_t i = 0; i < 4; i++) | |
2772 | { | |
2773 | fhClusterMultSPDPileUp[i] = new TH2F(Form("fhClusterMultSPDPileUp_%s", name[i].Data()), | |
2774 | Form("Number of clusters per pile up event with E > 0.5 and %s respect cluster max vs cluster max E ",title[i].Data()), | |
2775 | nptbins,ptmin,ptmax,100,0,100); | |
2776 | fhClusterMultSPDPileUp[i]->SetYTitle("n clusters "); | |
2777 | fhClusterMultSPDPileUp[i]->SetXTitle("E_{cluster max} (GeV)"); | |
2778 | outputContainer->Add(fhClusterMultSPDPileUp[i]) ; | |
2779 | ||
2780 | fhClusterMultNoPileUp[i] = new TH2F(Form("fhClusterMultNoPileUp_%s", name[i].Data()), | |
2781 | Form("Number of clusters per non pile up event with E > 0.5 and %s respect cluster max vs cluster max E ",title[i].Data()), | |
2782 | nptbins,ptmin,ptmax,100,0,100); | |
2783 | fhClusterMultNoPileUp[i]->SetYTitle("n clusters "); | |
2784 | fhClusterMultNoPileUp[i]->SetXTitle("E_{cluster max} (GeV)"); | |
2785 | outputContainer->Add(fhClusterMultNoPileUp[i]) ; | |
2786 | } | |
2ad19c3d | 2787 | |
2788 | } | |
2789 | ||
34c16486 | 2790 | if(IsDataMC()) |
2791 | { | |
f66d95af | 2792 | TString ptype[] = { "#gamma", "#gamma_{#pi decay}","#gamma_{other decay}", "#pi^{0}","#eta", |
2793 | "e^{#pm}","#gamma->e^{#pm}","hadron?","Anti-N","Anti-P", | |
2794 | "#gamma_{prompt}","#gamma_{fragmentation}","#gamma_{ISR}","String" } ; | |
3d5d5078 | 2795 | |
f66d95af | 2796 | TString pname[] = { "Photon","PhotonPi0Decay","PhotonOtherDecay","Pi0","Eta","Electron", |
2797 | "Conversion", "Hadron", "AntiNeutron","AntiProton", | |
2798 | "PhotonPrompt","PhotonFragmentation","PhotonISR","String" } ; | |
521636d2 | 2799 | |
34c16486 | 2800 | for(Int_t i = 0; i < fNOriginHistograms; i++) |
2801 | { | |
3d5d5078 | 2802 | fhMCE[i] = new TH1F(Form("hE_MC%s",pname[i].Data()), |
521636d2 | 2803 | Form("cluster from %s : E ",ptype[i].Data()), |
2804 | nptbins,ptmin,ptmax); | |
3d5d5078 | 2805 | fhMCE[i]->SetXTitle("E (GeV)"); |
2806 | outputContainer->Add(fhMCE[i]) ; | |
521636d2 | 2807 | |
4c8f7c2e | 2808 | fhMCPt[i] = new TH1F(Form("hPt_MC%s",pname[i].Data()), |
521636d2 | 2809 | Form("cluster from %s : p_{T} ",ptype[i].Data()), |
2810 | nptbins,ptmin,ptmax); | |
4c8f7c2e | 2811 | fhMCPt[i]->SetXTitle("p_{T} (GeV/c)"); |
2812 | outputContainer->Add(fhMCPt[i]) ; | |
521636d2 | 2813 | |
4c8f7c2e | 2814 | fhMCEta[i] = new TH2F(Form("hEta_MC%s",pname[i].Data()), |
521636d2 | 2815 | Form("cluster from %s : #eta ",ptype[i].Data()), |
2816 | nptbins,ptmin,ptmax,netabins,etamin,etamax); | |
4c8f7c2e | 2817 | fhMCEta[i]->SetYTitle("#eta"); |
2818 | fhMCEta[i]->SetXTitle("E (GeV)"); | |
2819 | outputContainer->Add(fhMCEta[i]) ; | |
521636d2 | 2820 | |
4c8f7c2e | 2821 | fhMCPhi[i] = new TH2F(Form("hPhi_MC%s",pname[i].Data()), |
521636d2 | 2822 | Form("cluster from %s : #phi ",ptype[i].Data()), |
2823 | nptbins,ptmin,ptmax,nphibins,phimin,phimax); | |
4c8f7c2e | 2824 | fhMCPhi[i]->SetYTitle("#phi (rad)"); |
2825 | fhMCPhi[i]->SetXTitle("E (GeV)"); | |
2826 | outputContainer->Add(fhMCPhi[i]) ; | |
2827 | ||
2828 | ||
d9105d92 | 2829 | fhMCDeltaE[i] = new TH2F (Form("hDeltaE_MC%s",pname[i].Data()), |
2830 | Form("MC - Reco E from %s",pname[i].Data()), | |
2831 | nptbins,ptmin,ptmax, 200,-50,50); | |
4c8f7c2e | 2832 | fhMCDeltaE[i]->SetXTitle("#Delta E (GeV)"); |
2833 | outputContainer->Add(fhMCDeltaE[i]); | |
2834 | ||
d9105d92 | 2835 | fhMCDeltaPt[i] = new TH2F (Form("hDeltaPt_MC%s",pname[i].Data()), |
2836 | Form("MC - Reco p_{T} from %s",pname[i].Data()), | |
2837 | nptbins,ptmin,ptmax, 200,-50,50); | |
4c8f7c2e | 2838 | fhMCDeltaPt[i]->SetXTitle("#Delta p_{T} (GeV/c)"); |
2839 | outputContainer->Add(fhMCDeltaPt[i]); | |
d9105d92 | 2840 | |
4c8f7c2e | 2841 | fhMC2E[i] = new TH2F (Form("h2E_MC%s",pname[i].Data()), |
2842 | Form("E distribution, reconstructed vs generated from %s",pname[i].Data()), | |
2843 | nptbins,ptmin,ptmax,nptbins,ptmin,ptmax); | |
2844 | fhMC2E[i]->SetXTitle("E_{rec} (GeV)"); | |
2845 | fhMC2E[i]->SetYTitle("E_{gen} (GeV)"); | |
2846 | outputContainer->Add(fhMC2E[i]); | |
2847 | ||
2848 | fhMC2Pt[i] = new TH2F (Form("h2Pt_MC%s",pname[i].Data()), | |
2849 | Form("p_T distribution, reconstructed vs generated from %s",pname[i].Data()), | |
2850 | nptbins,ptmin,ptmax,nptbins,ptmin,ptmax); | |
2851 | fhMC2Pt[i]->SetXTitle("p_{T,rec} (GeV/c)"); | |
2852 | fhMC2Pt[i]->SetYTitle("p_{T,gen} (GeV/c)"); | |
2853 | outputContainer->Add(fhMC2Pt[i]); | |
2854 | ||
521636d2 | 2855 | |
2856 | } | |
3d5d5078 | 2857 | |
f66d95af | 2858 | TString pptype[] = { "#gamma", "#gamma_{#pi decay}","#gamma_{other decay}","hadron?", |
2859 | "#gamma_{prompt}","#gamma_{fragmentation}","#gamma_{ISR}"} ; | |
2860 | ||
2861 | TString ppname[] = { "Photon","PhotonPi0Decay","PhotonOtherDecay","Hadron", | |
2862 | "PhotonPrompt","PhotonFragmentation","PhotonISR"} ; | |
2863 | ||
34c16486 | 2864 | for(Int_t i = 0; i < fNPrimaryHistograms; i++) |
2865 | { | |
f66d95af | 2866 | fhEPrimMC[i] = new TH1F(Form("hEPrim_MC%s",ppname[i].Data()), |
2867 | Form("primary photon %s : E ",pptype[i].Data()), | |
3d5d5078 | 2868 | nptbins,ptmin,ptmax); |
2869 | fhEPrimMC[i]->SetXTitle("E (GeV)"); | |
2870 | outputContainer->Add(fhEPrimMC[i]) ; | |
2871 | ||
f66d95af | 2872 | fhPtPrimMC[i] = new TH1F(Form("hPtPrim_MC%s",ppname[i].Data()), |
2873 | Form("primary photon %s : p_{T} ",pptype[i].Data()), | |
3d5d5078 | 2874 | nptbins,ptmin,ptmax); |
2875 | fhPtPrimMC[i]->SetXTitle("p_{T} (GeV/c)"); | |
2876 | outputContainer->Add(fhPtPrimMC[i]) ; | |
2877 | ||
f66d95af | 2878 | fhYPrimMC[i] = new TH2F(Form("hYPrim_MC%s",ppname[i].Data()), |
2879 | Form("primary photon %s : Rapidity ",pptype[i].Data()), | |
3d5d5078 | 2880 | nptbins,ptmin,ptmax,800,-8,8); |
2881 | fhYPrimMC[i]->SetYTitle("Rapidity"); | |
2882 | fhYPrimMC[i]->SetXTitle("E (GeV)"); | |
2883 | outputContainer->Add(fhYPrimMC[i]) ; | |
2884 | ||
f66d95af | 2885 | fhPhiPrimMC[i] = new TH2F(Form("hPhiPrim_MC%s",ppname[i].Data()), |
2886 | Form("primary photon %s : #phi ",pptype[i].Data()), | |
3d5d5078 | 2887 | nptbins,ptmin,ptmax,nphibins,phimin,phimax); |
2888 | fhPhiPrimMC[i]->SetYTitle("#phi (rad)"); | |
2889 | fhPhiPrimMC[i]->SetXTitle("E (GeV)"); | |
2890 | outputContainer->Add(fhPhiPrimMC[i]) ; | |
2891 | ||
2892 | ||
f66d95af | 2893 | fhEPrimMCAcc[i] = new TH1F(Form("hEPrimAcc_MC%s",ppname[i].Data()), |
2894 | Form("primary photon %s in acceptance: E ",pptype[i].Data()), | |
3d5d5078 | 2895 | nptbins,ptmin,ptmax); |
2896 | fhEPrimMCAcc[i]->SetXTitle("E (GeV)"); | |
2897 | outputContainer->Add(fhEPrimMCAcc[i]) ; | |
2898 | ||
f66d95af | 2899 | fhPtPrimMCAcc[i] = new TH1F(Form("hPtPrimAcc_MC%s",ppname[i].Data()), |
2900 | Form("primary photon %s in acceptance: p_{T} ",pptype[i].Data()), | |
3d5d5078 | 2901 | nptbins,ptmin,ptmax); |
2902 | fhPtPrimMCAcc[i]->SetXTitle("p_{T} (GeV/c)"); | |
2903 | outputContainer->Add(fhPtPrimMCAcc[i]) ; | |
2904 | ||
f66d95af | 2905 | fhYPrimMCAcc[i] = new TH2F(Form("hYPrimAcc_MC%s",ppname[i].Data()), |
2906 | Form("primary photon %s in acceptance: Rapidity ",pptype[i].Data()), | |
3d5d5078 | 2907 | nptbins,ptmin,ptmax,100,-1,1); |
2908 | fhYPrimMCAcc[i]->SetYTitle("Rapidity"); | |
2909 | fhYPrimMCAcc[i]->SetXTitle("E (GeV)"); | |
2910 | outputContainer->Add(fhYPrimMCAcc[i]) ; | |
2911 | ||
f66d95af | 2912 | fhPhiPrimMCAcc[i] = new TH2F(Form("hPhiPrimAcc_MC%s",ppname[i].Data()), |
2913 | Form("primary photon %s in acceptance: #phi ",pptype[i].Data()), | |
3d5d5078 | 2914 | nptbins,ptmin,ptmax,nphibins,phimin,phimax); |
2915 | fhPhiPrimMCAcc[i]->SetYTitle("#phi (rad)"); | |
2916 | fhPhiPrimMCAcc[i]->SetXTitle("E (GeV)"); | |
2917 | outputContainer->Add(fhPhiPrimMCAcc[i]) ; | |
2918 | ||
2919 | } | |
2920 | ||
34c16486 | 2921 | if(fFillSSHistograms) |
2922 | { | |
3d5d5078 | 2923 | TString ptypess[] = { "#gamma","hadron?","#pi^{0}","#eta","#gamma->e^{#pm}","e^{#pm}"} ; |
2924 | ||
2925 | TString pnamess[] = { "Photon","Hadron","Pi0","Eta","Conversion","Electron"} ; | |
2926 | ||
34c16486 | 2927 | for(Int_t i = 0; i < 6; i++) |
2928 | { | |
3d5d5078 | 2929 | fhMCELambda0[i] = new TH2F(Form("hELambda0_MC%s",pnamess[i].Data()), |
2930 | Form("cluster from %s : E vs #lambda_{0}^{2}",ptypess[i].Data()), | |
521636d2 | 2931 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
3d5d5078 | 2932 | fhMCELambda0[i]->SetYTitle("#lambda_{0}^{2}"); |
2933 | fhMCELambda0[i]->SetXTitle("E (GeV)"); | |
2934 | outputContainer->Add(fhMCELambda0[i]) ; | |
521636d2 | 2935 | |
3d5d5078 | 2936 | fhMCELambda1[i] = new TH2F(Form("hELambda1_MC%s",pnamess[i].Data()), |
2937 | Form("cluster from %s : E vs #lambda_{1}^{2}",ptypess[i].Data()), | |
521636d2 | 2938 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
3d5d5078 | 2939 | fhMCELambda1[i]->SetYTitle("#lambda_{1}^{2}"); |
2940 | fhMCELambda1[i]->SetXTitle("E (GeV)"); | |
2941 | outputContainer->Add(fhMCELambda1[i]) ; | |
34c16486 | 2942 | |
3d5d5078 | 2943 | fhMCEDispersion[i] = new TH2F(Form("hEDispersion_MC%s",pnamess[i].Data()), |
2944 | Form("cluster from %s : E vs dispersion^{2}",ptypess[i].Data()), | |
521636d2 | 2945 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
3d5d5078 | 2946 | fhMCEDispersion[i]->SetYTitle("D^{2}"); |
2947 | fhMCEDispersion[i]->SetXTitle("E (GeV)"); | |
2948 | outputContainer->Add(fhMCEDispersion[i]) ; | |
34c16486 | 2949 | |
f66d95af | 2950 | fhMCNCellsE[i] = new TH2F (Form("hNCellsE_MC%s",pnamess[i].Data()), |
34c16486 | 2951 | Form("# of cells in cluster from %s vs E of clusters",ptypess[i].Data()), |
f66d95af | 2952 | nptbins,ptmin,ptmax, nbins,nmin,nmax); |
2953 | fhMCNCellsE[i]->SetXTitle("E (GeV)"); | |
2954 | fhMCNCellsE[i]->SetYTitle("# of cells in cluster"); | |
2955 | outputContainer->Add(fhMCNCellsE[i]); | |
2956 | ||
2957 | fhMCMaxCellDiffClusterE[i] = new TH2F (Form("hMaxCellDiffClusterE_MC%s",pnamess[i].Data()), | |
34c16486 | 2958 | Form("energy vs difference of cluster energy from %s - max cell energy / cluster energy, good clusters",ptypess[i].Data()), |
2959 | nptbins,ptmin,ptmax, 500,0,1.); | |
f66d95af | 2960 | fhMCMaxCellDiffClusterE[i]->SetXTitle("E_{cluster} (GeV) "); |
2961 | fhMCMaxCellDiffClusterE[i]->SetYTitle("(E_{cluster} - E_{cell max})/ E_{cluster}"); | |
2962 | outputContainer->Add(fhMCMaxCellDiffClusterE[i]); | |
2963 | ||
764ab1f4 | 2964 | if(!fFillOnlySimpleSSHisto) |
34c16486 | 2965 | { |
764ab1f4 | 2966 | fhMCLambda0vsClusterMaxCellDiffE0[i] = new TH2F(Form("hLambda0vsClusterMaxCellDiffE0_MC%s",pnamess[i].Data()), |
2967 | Form("cluster from %s : #lambda^{2}_{0} vs fraction of energy carried by max cell, E < 2 GeV",ptypess[i].Data()), | |
2968 | ssbins,ssmin,ssmax,500,0,1.); | |
2969 | fhMCLambda0vsClusterMaxCellDiffE0[i]->SetXTitle("#lambda_{0}^{2}"); | |
2970 | fhMCLambda0vsClusterMaxCellDiffE0[i]->SetYTitle("(E_{cluster} - E_{cell max})/ E_{cluster}"); | |
2971 | outputContainer->Add(fhMCLambda0vsClusterMaxCellDiffE0[i]) ; | |
2972 | ||
2973 | fhMCLambda0vsClusterMaxCellDiffE2[i] = new TH2F(Form("hLambda0vsClusterMaxCellDiffE2_MC%s",pnamess[i].Data()), | |
2974 | Form("cluster from %s : #lambda^{2}_{0} vs fraction of energy carried by max cell, 2< E < 6 GeV",ptypess[i].Data()), | |
2975 | ssbins,ssmin,ssmax,500,0,1.); | |
2976 | fhMCLambda0vsClusterMaxCellDiffE2[i]->SetXTitle("#lambda_{0}^{2}"); | |
2977 | fhMCLambda0vsClusterMaxCellDiffE2[i]->SetYTitle("(E_{cluster} - E_{cell max})/ E_{cluster}"); | |
2978 | outputContainer->Add(fhMCLambda0vsClusterMaxCellDiffE2[i]) ; | |
34c16486 | 2979 | |
764ab1f4 | 2980 | fhMCLambda0vsClusterMaxCellDiffE6[i] = new TH2F(Form("hLambda0vsClusterMaxCellDiffE6_MC%s",pnamess[i].Data()), |
2981 | Form("cluster from %s : #lambda^{2}_{0} vs fraction of energy carried by max cell, E > 6 GeV",ptypess[i].Data()), | |
2982 | ssbins,ssmin,ssmax,500,0,1.); | |
2983 | fhMCLambda0vsClusterMaxCellDiffE6[i]->SetXTitle("#lambda_{0}^{2}"); | |
2984 | fhMCLambda0vsClusterMaxCellDiffE6[i]->SetYTitle("(E_{cluster} - E_{cell max})/ E_{cluster}"); | |
2985 | outputContainer->Add(fhMCLambda0vsClusterMaxCellDiffE6[i]) ; | |
34c16486 | 2986 | |
764ab1f4 | 2987 | fhMCNCellsvsClusterMaxCellDiffE0[i] = new TH2F(Form("hNCellsvsClusterMaxCellDiffE0_MC%s",pnamess[i].Data()), |
2988 | Form("cluster from %s : N cells in cluster vs fraction of energy carried by max cell, E < 2 GeV",ptypess[i].Data()), | |
2989 | nbins/5,nmin,nmax/5,500,0,1.); | |
2990 | fhMCNCellsvsClusterMaxCellDiffE0[i]->SetXTitle("N cells in cluster"); | |
2991 | fhMCNCellsvsClusterMaxCellDiffE0[i]->SetYTitle("(E_{cluster} - E_{cell max})/ E_{cluster}"); | |
2992 | outputContainer->Add(fhMCNCellsvsClusterMaxCellDiffE0[i]) ; | |
34c16486 | 2993 | |
764ab1f4 | 2994 | fhMCNCellsvsClusterMaxCellDiffE2[i] = new TH2F(Form("hNCellsvsClusterMaxCellDiffE2_MC%s",pnamess[i].Data()), |
2995 | Form("cluster from %s : N cells in cluster vs fraction of energy carried by max cell, 2< E < 6 GeV",ptypess[i].Data()), | |
2996 | nbins/5,nmin,nmax/5,500,0,1.); | |
2997 | fhMCNCellsvsClusterMaxCellDiffE2[i]->SetXTitle("N cells in cluster"); | |
2998 | fhMCNCellsvsClusterMaxCellDiffE2[i]->SetYTitle("(E_{cluster} - E_{cell max})/ E_{cluster}"); | |
2999 | outputContainer->Add(fhMCNCellsvsClusterMaxCellDiffE2[i]) ; | |
34c16486 | 3000 | |
764ab1f4 | 3001 | fhMCNCellsvsClusterMaxCellDiffE6[i] = new TH2F(Form("hNCellsvsClusterMaxCellDiffE6_MC%s",pnamess[i].Data()), |
3002 | Form("cluster from %s : N cells in cluster vs fraction of energy carried by max cell, E > 6 GeV",ptypess[i].Data()), | |
3003 | nbins/5,nmin,nmax/5,500,0,1.); | |
3004 | fhMCNCellsvsClusterMaxCellDiffE6[i]->SetXTitle("N cells in cluster"); | |
3005 | fhMCNCellsvsClusterMaxCellDiffE6[i]->SetYTitle("E (GeV)"); | |
3006 | outputContainer->Add(fhMCNCellsvsClusterMaxCellDiffE6[i]) ; | |
34c16486 | 3007 | |
764ab1f4 | 3008 | if(fCalorimeter=="EMCAL") |
34c16486 | 3009 | { |
764ab1f4 | 3010 | fhMCEDispEta[i] = new TH2F (Form("hEDispEtaE_MC%s",pnamess[i].Data()), |
3011 | Form("cluster from %s : #sigma^{2}_{#eta #eta} = #Sigma w_{i}(#eta_{i} - <#eta>)^{2}/ #Sigma w_{i} vs E",ptypess[i].Data()), | |
3012 | nptbins,ptmin,ptmax, ssbins,ssmin,ssmax); | |
3013 | fhMCEDispEta[i]->SetXTitle("E (GeV)"); | |
3014 | fhMCEDispEta[i]->SetYTitle("#sigma^{2}_{#eta #eta}"); | |
3015 | outputContainer->Add(fhMCEDispEta[i]); | |
3016 | ||
3017 | fhMCEDispPhi[i] = new TH2F (Form("hEDispPhiE_MC%s",pnamess[i].Data()), | |
3018 | Form("cluster from %s : #sigma^{2}_{#phi #phi} = #Sigma w_{i}(#phi_{i} - <#phi>)^{2} / #Sigma w_{i} vs E",ptypess[i].Data()), | |
3019 | nptbins,ptmin,ptmax, ssbins,ssmin,ssmax); | |
3020 | fhMCEDispPhi[i]->SetXTitle("E (GeV)"); | |
3021 | fhMCEDispPhi[i]->SetYTitle("#sigma^{2}_{#phi #phi}"); | |
3022 | outputContainer->Add(fhMCEDispPhi[i]); | |
3023 | ||
3024 | fhMCESumEtaPhi[i] = new TH2F (Form("hESumEtaPhiE_MC%s",pnamess[i].Data()), | |
3025 | Form("cluster from %s : #delta^{2}_{#eta #phi} = #Sigma w_{i}(#phi_{i} #eta_{i} ) / #Sigma w_{i} - <#phi><#eta> vs E",ptypess[i].Data()), | |
3026 | nptbins,ptmin,ptmax, 2*ssbins,-ssmax,ssmax); | |
3027 | fhMCESumEtaPhi[i]->SetXTitle("E (GeV)"); | |
3028 | fhMCESumEtaPhi[i]->SetYTitle("#delta^{2}_{#eta #phi}"); | |
3029 | outputContainer->Add(fhMCESumEtaPhi[i]); | |
3030 | ||
3031 | fhMCEDispEtaPhiDiff[i] = new TH2F (Form("hEDispEtaPhiDiffE_MC%s",pnamess[i].Data()), | |
3032 | Form("cluster from %s : #sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta} vs E",ptypess[i].Data()), | |
3033 | nptbins,ptmin,ptmax,200,-10,10); | |
3034 | fhMCEDispEtaPhiDiff[i]->SetXTitle("E (GeV)"); | |
3035 | fhMCEDispEtaPhiDiff[i]->SetYTitle("#sigma^{2}_{#phi #phi}-#sigma^{2}_{#eta #eta}"); | |
3036 | outputContainer->Add(fhMCEDispEtaPhiDiff[i]); | |
3037 | ||
3038 | fhMCESphericity[i] = new TH2F (Form("hESphericity_MC%s",pnamess[i].Data()), | |
3039 | Form("cluster from %s : (#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi}) vs E",ptypess[i].Data()), | |
3040 | nptbins,ptmin,ptmax, 200,-1,1); | |
3041 | fhMCESphericity[i]->SetXTitle("E (GeV)"); | |
3042 | fhMCESphericity[i]->SetYTitle("s = (#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi})"); | |
3043 | outputContainer->Add(fhMCESphericity[i]); | |
3044 | ||
3045 | for(Int_t ie = 0; ie < 7; ie++) | |
3046 | { | |
3047 | fhMCDispEtaDispPhi[ie][i] = new TH2F (Form("hMCDispEtaDispPhi_EBin%d_MC%s",ie,pnamess[i].Data()), | |
3048 | Form("cluster from %s : #sigma^{2}_{#phi #phi} vs #sigma^{2}_{#eta #eta} for %d < E < %d GeV",pnamess[i].Data(),bin[ie],bin[ie+1]), | |
3049 | ssbins,ssmin,ssmax , ssbins,ssmin,ssmax); | |
3050 | fhMCDispEtaDispPhi[ie][i]->SetXTitle("#sigma^{2}_{#eta #eta}"); | |
3051 | fhMCDispEtaDispPhi[ie][i]->SetYTitle("#sigma^{2}_{#phi #phi}"); | |
3052 | outputContainer->Add(fhMCDispEtaDispPhi[ie][i]); | |
3053 | ||
3054 | fhMCLambda0DispEta[ie][i] = new TH2F (Form("hMCLambda0DispEta_EBin%d_MC%s",ie,pnamess[i].Data()), | |
3055 | Form("cluster from %s : #lambda^{2}_{0} vs #sigma^{2}_{#eta #eta} for %d < E < %d GeV",pnamess[i].Data(),bin[ie],bin[ie+1]), | |
3056 | ssbins,ssmin,ssmax , ssbins,ssmin,ssmax); | |
3057 | fhMCLambda0DispEta[ie][i]->SetXTitle("#lambda^{2}_{0}"); | |
3058 | fhMCLambda0DispEta[ie][i]->SetYTitle("#sigma^{2}_{#phi #phi}"); | |
3059 | outputContainer->Add(fhMCLambda0DispEta[ie][i]); | |
3060 | ||
3061 | fhMCLambda0DispPhi[ie][i] = new TH2F (Form("hMCLambda0DispPhi_EBin%d_MC%s",ie,pnamess[i].Data()), | |
3062 | Form("cluster from %s :#lambda^{2}_{0} vs #sigma^{2}_{#phi #phi} for %d < E < %d GeV",pnamess[i].Data(),bin[ie],bin[ie+1]), | |
3063 | ssbins,ssmin,ssmax , ssbins,ssmin,ssmax); | |
3064 | fhMCLambda0DispPhi[ie][i]->SetXTitle("#lambda^{2}_{0}"); | |
3065 | fhMCLambda0DispPhi[ie][i]->SetYTitle("#sigma^{2}_{#phi #phi}"); | |
3066 | outputContainer->Add(fhMCLambda0DispPhi[ie][i]); | |
3067 | } | |
34c16486 | 3068 | } |
34c16486 | 3069 | } |
3070 | }// loop | |
3d5d5078 | 3071 | |
3072 | if(!GetReader()->IsEmbeddedClusterSelectionOn()) | |
3073 | { | |
3074 | fhMCPhotonELambda0NoOverlap = new TH2F("hELambda0_MCPhoton_NoOverlap", | |
3075 | "cluster from Photon : E vs #lambda_{0}^{2}", | |
3076 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
3077 | fhMCPhotonELambda0NoOverlap->SetYTitle("#lambda_{0}^{2}"); | |
3078 | fhMCPhotonELambda0NoOverlap->SetXTitle("E (GeV)"); | |
3079 | outputContainer->Add(fhMCPhotonELambda0NoOverlap) ; | |
3080 | ||
3d5d5078 | 3081 | fhMCPhotonELambda0TwoOverlap = new TH2F("hELambda0_MCPhoton_TwoOverlap", |
3082 | "cluster from Photon : E vs #lambda_{0}^{2}", | |
3083 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
3084 | fhMCPhotonELambda0TwoOverlap->SetYTitle("#lambda_{0}^{2}"); | |
3085 | fhMCPhotonELambda0TwoOverlap->SetXTitle("E (GeV)"); | |
3086 | outputContainer->Add(fhMCPhotonELambda0TwoOverlap) ; | |
3087 | ||
3d5d5078 | 3088 | fhMCPhotonELambda0NOverlap = new TH2F("hELambda0_MCPhoton_NOverlap", |
3089 | "cluster from Photon : E vs #lambda_{0}^{2}", | |
3090 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
3091 | fhMCPhotonELambda0NOverlap->SetYTitle("#lambda_{0}^{2}"); | |
3092 | fhMCPhotonELambda0NOverlap->SetXTitle("E (GeV)"); | |
3093 | outputContainer->Add(fhMCPhotonELambda0NOverlap) ; | |
521636d2 | 3094 | |
3d5d5078 | 3095 | } //No embedding |
3096 | ||
3d5d5078 | 3097 | if(GetReader()->IsEmbeddedClusterSelectionOn()) |
3098 | { | |
3099 | ||
3100 | fhEmbeddedSignalFractionEnergy = new TH2F("hEmbeddedSignal_FractionEnergy", | |
34c16486 | 3101 | "Energy Fraction of embedded signal versus cluster energy", |
3102 | nptbins,ptmin,ptmax,100,0.,1.); | |
3d5d5078 | 3103 | fhEmbeddedSignalFractionEnergy->SetYTitle("Fraction"); |
3104 | fhEmbeddedSignalFractionEnergy->SetXTitle("E (GeV)"); | |
3105 | outputContainer->Add(fhEmbeddedSignalFractionEnergy) ; | |
3106 | ||
3107 | fhEmbedPhotonELambda0FullSignal = new TH2F("hELambda0_EmbedPhoton_FullSignal", | |
34c16486 | 3108 | "cluster from Photon embedded with more than 90% energy in cluster : E vs #lambda_{0}^{2}", |
3109 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
3d5d5078 | 3110 | fhEmbedPhotonELambda0FullSignal->SetYTitle("#lambda_{0}^{2}"); |
3111 | fhEmbedPhotonELambda0FullSignal->SetXTitle("E (GeV)"); | |
3112 | outputContainer->Add(fhEmbedPhotonELambda0FullSignal) ; | |
34c16486 | 3113 | |
3d5d5078 | 3114 | fhEmbedPhotonELambda0MostlySignal = new TH2F("hELambda0_EmbedPhoton_MostlySignal", |
34c16486 | 3115 | "cluster from Photon embedded with 50% to 90% energy in cluster : E vs #lambda_{0}^{2}", |
3116 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
3d5d5078 | 3117 | fhEmbedPhotonELambda0MostlySignal->SetYTitle("#lambda_{0}^{2}"); |
3118 | fhEmbedPhotonELambda0MostlySignal->SetXTitle("E (GeV)"); | |
3119 | outputContainer->Add(fhEmbedPhotonELambda0MostlySignal) ; | |
3120 | ||
3d5d5078 | 3121 | fhEmbedPhotonELambda0MostlyBkg = new TH2F("hELambda0_EmbedPhoton_MostlyBkg", |
34c16486 | 3122 | "cluster from Photon embedded with 10% to 50% energy in cluster : E vs #lambda_{0}^{2}", |
3123 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
3d5d5078 | 3124 | fhEmbedPhotonELambda0MostlyBkg->SetYTitle("#lambda_{0}^{2}"); |
3125 | fhEmbedPhotonELambda0MostlyBkg->SetXTitle("E (GeV)"); | |
3126 | outputContainer->Add(fhEmbedPhotonELambda0MostlyBkg) ; | |
34c16486 | 3127 | |
3d5d5078 | 3128 | fhEmbedPhotonELambda0FullBkg = new TH2F("hELambda0_EmbedPhoton_FullBkg", |
34c16486 | 3129 | "cluster from Photonm embedded with 0% to 10% energy in cluster : E vs #lambda_{0}^{2}", |
3130 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
3d5d5078 | 3131 | fhEmbedPhotonELambda0FullBkg->SetYTitle("#lambda_{0}^{2}"); |
3132 | fhEmbedPhotonELambda0FullBkg->SetXTitle("E (GeV)"); | |
3133 | outputContainer->Add(fhEmbedPhotonELambda0FullBkg) ; | |
3134 | ||
3d5d5078 | 3135 | fhEmbedPi0ELambda0FullSignal = new TH2F("hELambda0_EmbedPi0_FullSignal", |
34c16486 | 3136 | "cluster from Pi0 embedded with more than 90% energy in cluster : E vs #lambda_{0}^{2}", |
3137 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
3d5d5078 | 3138 | fhEmbedPi0ELambda0FullSignal->SetYTitle("#lambda_{0}^{2}"); |
3139 | fhEmbedPi0ELambda0FullSignal->SetXTitle("E (GeV)"); | |
3140 | outputContainer->Add(fhEmbedPi0ELambda0FullSignal) ; | |
34c16486 | 3141 | |
3d5d5078 | 3142 | fhEmbedPi0ELambda0MostlySignal = new TH2F("hELambda0_EmbedPi0_MostlySignal", |
34c16486 | 3143 | "cluster from Pi0 embedded with 50% to 90% energy in cluster : E vs #lambda_{0}^{2}", |
3144 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
3d5d5078 | 3145 | fhEmbedPi0ELambda0MostlySignal->SetYTitle("#lambda_{0}^{2}"); |
3146 | fhEmbedPi0ELambda0MostlySignal->SetXTitle("E (GeV)"); | |
3147 | outputContainer->Add(fhEmbedPi0ELambda0MostlySignal) ; | |
3148 | ||
3d5d5078 | 3149 | fhEmbedPi0ELambda0MostlyBkg = new TH2F("hELambda0_EmbedPi0_MostlyBkg", |
34c16486 | 3150 | "cluster from Pi0 embedded with 10% to 50% energy in cluster : E vs #lambda_{0}^{2}", |
3151 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
3d5d5078 | 3152 | fhEmbedPi0ELambda0MostlyBkg->SetYTitle("#lambda_{0}^{2}"); |
3153 | fhEmbedPi0ELambda0MostlyBkg->SetXTitle("E (GeV)"); | |
3154 | outputContainer->Add(fhEmbedPi0ELambda0MostlyBkg) ; | |
3155 | ||
3d5d5078 | 3156 | fhEmbedPi0ELambda0FullBkg = new TH2F("hELambda0_EmbedPi0_FullBkg", |
34c16486 | 3157 | "cluster from Pi0 embedded with 0% to 10% energy in cluster : E vs #lambda_{0}^{2}", |
3158 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
3d5d5078 | 3159 | fhEmbedPi0ELambda0FullBkg->SetYTitle("#lambda_{0}^{2}"); |
3160 | fhEmbedPi0ELambda0FullBkg->SetXTitle("E (GeV)"); | |
3161 | outputContainer->Add(fhEmbedPi0ELambda0FullBkg) ; | |
34c16486 | 3162 | |
3d5d5078 | 3163 | }// embedded histograms |
3164 | ||
521636d2 | 3165 | |
3166 | }// Fill SS MC histograms | |
3167 | ||
477d6cee | 3168 | }//Histos with MC |
1035a8d9 | 3169 | |
477d6cee | 3170 | return outputContainer ; |
3171 | ||
1c5acb87 | 3172 | } |
3173 | ||
34c16486 | 3174 | //_______________________ |
6639984f | 3175 | void AliAnaPhoton::Init() |
3176 | { | |
3177 | ||
3178 | //Init | |
3179 | //Do some checks | |
34c16486 | 3180 | if(fCalorimeter == "PHOS" && !GetReader()->IsPHOSSwitchedOn() && NewOutputAOD()) |
3181 | { | |
591cc579 | 3182 | printf("AliAnaPhoton::Init() - !!STOP: You want to use PHOS in analysis but it is not read!! \n!!Check the configuration file!!\n"); |
6639984f | 3183 | abort(); |
3184 | } | |
34c16486 | 3185 | else if(fCalorimeter == "EMCAL" && !GetReader()->IsEMCALSwitchedOn() && NewOutputAOD()) |
3186 | { | |
591cc579 | 3187 | printf("AliAnaPhoton::Init() - !!STOP: You want to use EMCAL in analysis but it is not read!! \n!!Check the configuration file!!\n"); |
6639984f | 3188 | abort(); |
3189 | } | |
3190 | ||
49b5c49b | 3191 | if(GetReader()->GetDataType() == AliCaloTrackReader::kMC) GetCaloPID()->SwitchOnBayesian(); |
3192 | ||
6639984f | 3193 | } |
3194 | ||
1c5acb87 | 3195 | //____________________________________________________________________________ |
3196 | void AliAnaPhoton::InitParameters() | |
3197 | { | |
3198 | ||
3199 | //Initialize the parameters of the analysis. | |
a3aebfff | 3200 | AddToHistogramsName("AnaPhoton_"); |
521636d2 | 3201 | |
6175da48 | 3202 | fCalorimeter = "EMCAL" ; |
3203 | fMinDist = 2.; | |
3204 | fMinDist2 = 4.; | |
3205 | fMinDist3 = 5.; | |
1e86c71e | 3206 | |
caa8a222 | 3207 | fTimeCutMin =-1000000; |
3208 | fTimeCutMax = 1000000; | |
6175da48 | 3209 | fNCellsCut = 0; |
2ac125bf | 3210 | |
1e86c71e | 3211 | fRejectTrackMatch = kTRUE ; |
1e86c71e | 3212 | |
1c5acb87 | 3213 | } |
3214 | ||
3215 | //__________________________________________________________________ | |
3216 | void AliAnaPhoton::MakeAnalysisFillAOD() | |
3217 | { | |
f8006433 | 3218 | //Do photon analysis and fill aods |
f37fa8d2 | 3219 | |
6175da48 | 3220 | //Get the vertex |
5025c139 | 3221 | Double_t v[3] = {0,0,0}; //vertex ; |
3222 | GetReader()->GetVertex(v); | |
f8006433 | 3223 | |
f37fa8d2 | 3224 | //Select the Calorimeter of the photon |
c8fe2783 | 3225 | TObjArray * pl = 0x0; |
71e3889f | 3226 | AliVCaloCells* cells = 0; |
3227 | if (fCalorimeter == "PHOS" ) | |
3228 | { | |
3229 | pl = GetPHOSClusters(); | |
3230 | cells = GetPHOSCells(); | |
3231 | } | |
477d6cee | 3232 | else if (fCalorimeter == "EMCAL") |
71e3889f | 3233 | { |
3234 | pl = GetEMCALClusters(); | |
3235 | cells = GetEMCALCells(); | |
3236 | } | |
5ae09196 | 3237 | |
34c16486 | 3238 | if(!pl) |
3239 | { | |
5ae09196 | 3240 | Info("MakeAnalysisFillAOD","TObjArray with %s clusters is NULL!\n",fCalorimeter.Data()); |
3241 | return; | |
3242 | } | |
521636d2 | 3243 | |
acd56ca4 | 3244 | FillPileUpHistogramsPerEvent(pl); |
3245 | ||
fc195fd0 | 3246 | // Loop on raw clusters before filtering in the reader and fill control histogram |
34c16486 | 3247 | if((GetReader()->GetEMCALClusterListName()=="" && fCalorimeter=="EMCAL") || fCalorimeter=="PHOS") |
3248 | { | |
3249 | for(Int_t iclus = 0; iclus < GetReader()->GetInputEvent()->GetNumberOfCaloClusters(); iclus++ ) | |
3250 | { | |
fc195fd0 | 3251 | AliVCluster * clus = GetReader()->GetInputEvent()->GetCaloCluster(iclus); |
3252 | if (fCalorimeter == "PHOS" && clus->IsPHOS() && clus->E() > GetReader()->GetPHOSPtMin() ) fhClusterCuts[0]->Fill(clus->E()); | |
3253 | else if(fCalorimeter == "EMCAL" && clus->IsEMCAL() && clus->E() > GetReader()->GetEMCALPtMin()) fhClusterCuts[0]->Fill(clus->E()); | |
3254 | } | |
3255 | } | |
34c16486 | 3256 | else |
3257 | { // reclusterized | |
fc195fd0 | 3258 | TClonesArray * clusterList = 0; |
7d650cb7 | 3259 | |
3260 | if(GetReader()->GetInputEvent()->FindListObject(GetReader()->GetEMCALClusterListName())) | |
3261 | clusterList = dynamic_cast<TClonesArray*> (GetReader()->GetInputEvent()->FindListObject(GetReader()->GetEMCALClusterListName())); | |
3262 | else if(GetReader()->GetOutputEvent()) | |
4a9e1073 | 3263 | clusterList = dynamic_cast<TClonesArray*> (GetReader()->GetOutputEvent()->FindListObject(GetReader()->GetEMCALClusterListName())); |
7d650cb7 | 3264 | |
34c16486 | 3265 | if(clusterList) |
3266 | { | |
fc195fd0 | 3267 | Int_t nclusters = clusterList->GetEntriesFast(); |
34c16486 | 3268 | for (Int_t iclus = 0; iclus < nclusters; iclus++) |
3269 | { | |
fc195fd0 | 3270 | AliVCluster * clus = dynamic_cast<AliVCluster*> (clusterList->At(iclus)); |
3271 | if(clus)fhClusterCuts[0]->Fill(clus->E()); | |
6265ad55 | 3272 | } |
fc195fd0 | 3273 | } |
3274 | } | |
fc195fd0 | 3275 | |
afb3af8a | 3276 | // Fill some trigger related histograms |
1035a8d9 | 3277 | Int_t idTrig = GetReader()->GetTriggerClusterIndex(); |
3278 | Bool_t exotic = GetReader()->IsExoticEvent(); | |
3279 | Bool_t bad = GetReader()->IsBadCellTriggerEvent(); | |
6265ad55 | 3280 | |
afb3af8a | 3281 | if( fFillEMCALBCHistograms && fCalorimeter=="EMCAL" && |
6265ad55 | 3282 | ( bad || exotic ) && idTrig >= 0) |
afb3af8a | 3283 | { |
6265ad55 | 3284 | // printf("Index %d, Id %d, bad %d, exo %d\n", |
3285 | // GetReader()->GetTriggerClusterIndex(), | |
3286 | // GetReader()->GetTriggerClusterId(), | |
3287 | // GetReader()->IsBadCellTriggerEvent(), | |
3288 | // GetReader()->IsExoticEvent() ); | |
3289 | ||
3290 | TClonesArray * clusterList = 0; | |
3291 | TString clusterListName = GetReader()->GetEMCALClusterListName(); | |
3292 | if (GetReader()->GetInputEvent()->FindListObject(clusterListName)) | |
3293 | clusterList = dynamic_cast<TClonesArray*> (GetReader()->GetInputEvent() ->FindListObject(clusterListName)); | |
3294 | else if(GetReader()->GetOutputEvent()) | |
3295 | clusterList = dynamic_cast<TClonesArray*> (GetReader()->GetOutputEvent()->FindListObject(clusterListName)); | |
3296 | ||
3297 | AliVCluster * badClusTrig = 0; | |
3298 | if(clusterList) badClusTrig = (AliVCluster*) clusterList->At(idTrig); | |
3299 | else badClusTrig = GetReader()->GetInputEvent()->GetCaloCluster(idTrig); | |
3300 | ||
3301 | if(!badClusTrig) printf("AliAnaPhoton::MakeAnalysisFillAOD() - No cluster (bad-exotic trigger) found with requested index %d \n",idTrig); | |
3302 | ||
afb3af8a | 3303 | TLorentzVector momBadClus; |
6265ad55 | 3304 | |
afb3af8a | 3305 | badClusTrig->GetMomentum(momBadClus,GetVertex(0)); |
3306 | ||
3307 | Float_t etaclusterBad = momBadClus.Eta(); | |
3308 | Float_t phiclusterBad = momBadClus.Phi(); | |
3309 | if( phiclusterBad < 0 ) phiclusterBad+=TMath::TwoPi(); | |
3310 | Float_t tofclusterBad = badClusTrig->GetTOF()*1.e9; | |
3311 | Float_t eclusterBad = badClusTrig->E(); | |
6265ad55 | 3312 | |
3313 | if( bad && exotic ) | |
3314 | { | |
3315 | if(GetReader()->IsTriggerMatched()) | |
3316 | { | |
3317 | fhEtaPhiTriggerEMCALBCBadExoticCluster->Fill(etaclusterBad, phiclusterBad); | |
3318 | fhTimeTriggerEMCALBCBadExoticCluster ->Fill(eclusterBad, tofclusterBad); | |
3319 | } | |
3320 | else | |
3321 | { | |
3322 | fhEtaPhiTriggerEMCALBCUMBadExoticCluster->Fill(etaclusterBad, phiclusterBad); | |
3323 | fhTimeTriggerEMCALBCUMBadExoticCluster ->Fill(eclusterBad, tofclusterBad); | |
3324 | } | |
3325 | } | |
3326 | else if( bad && !exotic ) | |
afb3af8a | 3327 | { |
3328 | if(GetReader()->IsTriggerMatched()) | |
3329 | { | |
3330 | fhEtaPhiTriggerEMCALBCBadCluster->Fill(etaclusterBad, phiclusterBad); | |
3331 | fhTimeTriggerEMCALBCBadCluster ->Fill(eclusterBad, tofclusterBad); | |
3332 | } | |
3333 | else | |
3334 | { | |
3335 | fhEtaPhiTriggerEMCALBCUMBadCluster->Fill(etaclusterBad, phiclusterBad); | |
3336 | fhTimeTriggerEMCALBCUMBadCluster ->Fill(eclusterBad, tofclusterBad); | |
3337 | } | |
3338 | }// Bad cluster trigger | |
6265ad55 | 3339 | else if( !bad && exotic ) |
afb3af8a | 3340 | { |
3341 | if(GetReader()->IsTriggerMatched()) | |
3342 | { | |
3343 | fhEtaPhiTriggerEMCALBCExoticCluster->Fill(etaclusterBad, phiclusterBad); | |
3344 | fhTimeTriggerEMCALBCExoticCluster ->Fill(eclusterBad, tofclusterBad); | |
3345 | } | |
3346 | else | |
3347 | { | |
3348 | fhEtaPhiTriggerEMCALBCUMExoticCluster->Fill(etaclusterBad, phiclusterBad); | |
3349 | fhTimeTriggerEMCALBCUMExoticCluster ->Fill(eclusterBad, tofclusterBad); | |
3350 | } | |
3351 | } | |
3352 | } | |
3353 | ||
6175da48 | 3354 | //Init arrays, variables, get number of clusters |
1e86c71e | 3355 | TLorentzVector mom, mom2 ; |
3356 | Int_t nCaloClusters = pl->GetEntriesFast(); | |
20218aea | 3357 | |
6175da48 | 3358 | if(GetDebug() > 0) printf("AliAnaPhoton::MakeAnalysisFillAOD() - input %s cluster entries %d\n", fCalorimeter.Data(), nCaloClusters); |
521636d2 | 3359 | |
6175da48 | 3360 | //---------------------------------------------------- |
3361 | // Fill AOD with PHOS/EMCAL AliAODPWG4Particle objects | |
3362 | //---------------------------------------------------- | |
3363 | // Loop on clusters | |
34c16486 | 3364 | for(Int_t icalo = 0; icalo < nCaloClusters; icalo++) |
3365 | { | |
0ae57829 | 3366 | AliVCluster * calo = (AliVCluster*) (pl->At(icalo)); |
3367 | //printf("calo %d, %f\n",icalo,calo->E()); | |
521636d2 | 3368 | |
f8006433 | 3369 | //Get the index where the cluster comes, to retrieve the corresponding vertex |
c8fe2783 | 3370 | Int_t evtIndex = 0 ; |
34c16486 | 3371 | if (GetMixedEvent()) |
3372 | { | |
c8fe2783 | 3373 | evtIndex=GetMixedEvent()->EventIndexForCaloCluster(calo->GetID()) ; |
5025c139 | 3374 | //Get the vertex and check it is not too large in z |
96539743 | 3375 | if(TMath::Abs(GetVertex(evtIndex)[2])> GetZvertexCut()) continue; |
c8fe2783 | 3376 | } |
521636d2 | 3377 | |
3378 | //Cluster selection, not charged, with photon id and in fiducial cut | |
34c16486 | 3379 | if(GetReader()->GetDataType() != AliCaloTrackReader::kMC) |
3380 | { | |
afb3af8a | 3381 | calo->GetMomentum(mom,GetVertex(evtIndex)) ; |
3382 | }//Assume that come from vertex in straight line | |
34c16486 | 3383 | else |
3384 | { | |
f8006433 | 3385 | Double_t vertex[]={0,0,0}; |
3386 | calo->GetMomentum(mom,vertex) ; | |
3387 | } | |
c2a62a94 | 3388 | |
6175da48 | 3389 | //-------------------------------------- |
3390 | // Cluster selection | |
3391 | //-------------------------------------- | |
9e51e29a | 3392 | Int_t nMaxima = GetCaloUtils()->GetNumberOfLocalMaxima(calo, cells); // NLM |
3393 | if(!ClusterSelected(calo,mom,nMaxima)) continue; | |
3394 | ||
6175da48 | 3395 | //---------------------------- |
3396 | //Create AOD for analysis | |
3397 | //---------------------------- | |
3398 | AliAODPWG4Particle aodph = AliAODPWG4Particle(mom); | |
3399 | ||
3400 | //............................................... | |
3401 | //Set the indeces of the original caloclusters (MC, ID), and calorimeter | |
3402 | Int_t label = calo->GetLabel(); | |
3403 | aodph.SetLabel(label); | |
6175da48 | 3404 | aodph.SetCaloLabel(calo->GetID(),-1); |
3405 | aodph.SetDetector(fCalorimeter); | |
c4a7d28a | 3406 | //printf("Index %d, Id %d, iaod %d\n",icalo, calo->GetID(),GetOutputAODBranch()->GetEntriesFast()); |
521636d2 | 3407 | |
6175da48 | 3408 | //............................................... |
3409 | //Set bad channel distance bit | |
c4a7d28a | 3410 | Double_t distBad=calo->GetDistanceToBadChannel() ; //Distance to bad channel |
f37fa8d2 | 3411 | if (distBad > fMinDist3) aodph.SetDistToBad(2) ; |
477d6cee | 3412 | else if(distBad > fMinDist2) aodph.SetDistToBad(1) ; |
f37fa8d2 | 3413 | else aodph.SetDistToBad(0) ; |
af7b3903 | 3414 | //printf("DistBad %f Bit %d\n",distBad, aodph.DistToBad()); |
c8fe2783 | 3415 | |
8d6b7f60 | 3416 | //-------------------------------------------------------------------------------------- |
3417 | // Play with the MC stack if available | |
3418 | //-------------------------------------------------------------------------------------- | |
3419 | ||
3420 | //Check origin of the candidates | |
3421 | Int_t tag = -1; | |
3422 | ||
34c16486 | 3423 | if(IsDataMC()) |
3424 | { | |
2644ead9 | 3425 | tag = GetMCAnalysisUtils()->CheckOrigin(calo->GetLabels(),calo->GetNLabels(),GetReader()); |
8d6b7f60 | 3426 | aodph.SetTag(tag); |
3427 | ||
3428 | if(GetDebug() > 0) | |
3429 | printf("AliAnaPhoton::MakeAnalysisFillAOD() - Origin of candidate, bit map %d\n",aodph.GetTag()); | |
3430 | }//Work with stack also | |
3431 | ||
3432 | ||
521636d2 | 3433 | //-------------------------------------------------------------------------------------- |
3434 | //Fill some shower shape histograms before PID is applied | |
3435 | //-------------------------------------------------------------------------------------- | |
3436 | ||
8d6b7f60 | 3437 | FillShowerShapeHistograms(calo,tag); |
6175da48 | 3438 | |
3439 | //------------------------------------- | |
f37fa8d2 | 3440 | //PID selection or bit setting |
6175da48 | 3441 | //------------------------------------- |
49b5c49b | 3442 | |
6175da48 | 3443 | //............................................... |
3444 | // Data, PID check on | |
3c1d9afb | 3445 | if(IsCaloPIDOn()) |
3446 | { | |
49b5c49b | 3447 | // Get most probable PID, 2 options check bayesian PID weights or redo PID |
3448 | // By default, redo PID | |
09273901 | 3449 | |
3c1d9afb | 3450 | aodph.SetIdentifiedParticleType(GetCaloPID()->GetIdentifiedParticleType(calo)); |
477d6cee | 3451 | |
21a4b1c0 | 3452 | if(GetDebug() > 1) printf("AliAnaPhoton::MakeAnalysisFillAOD() - PDG of identified particle %d\n",aodph.GetIdentifiedParticleType()); |
477d6cee | 3453 | |
f37fa8d2 | 3454 | //If cluster does not pass pid, not photon, skip it. |
21a4b1c0 | 3455 | if(aodph.GetIdentifiedParticleType() != AliCaloPID::kPhoton) continue ; |
477d6cee | 3456 | |
3457 | } | |
fad96885 | 3458 | |
6175da48 | 3459 | //............................................... |
3460 | // Data, PID check off | |
3c1d9afb | 3461 | else |
3462 | { | |
f37fa8d2 | 3463 | //Set PID bits for later selection (AliAnaPi0 for example) |
49b5c49b | 3464 | //GetIdentifiedParticleType already called in SetPIDBits. |
3465 | ||
3c1d9afb | 3466 | GetCaloPID()->SetPIDBits(calo,&aodph, GetCaloUtils(),GetReader()->GetInputEvent()); |
49b5c49b | 3467 | |
a3aebfff | 3468 | if(GetDebug() > 1) printf("AliAnaPhoton::MakeAnalysisFillAOD() - PID Bits set \n"); |
477d6cee | 3469 | } |
3470 | ||
3c1d9afb | 3471 | if(GetDebug() > 1) printf("AliAnaPhoton::MakeAnalysisFillAOD() - Photon selection cuts passed: pT %3.2f, pdg %d\n", |
3472 | aodph.Pt(), aodph.GetIdentifiedParticleType()); | |
09273901 | 3473 | |
9e51e29a | 3474 | fhClusterCuts[9]->Fill(calo->E()); |
3475 | ||
3476 | fhNLocMax->Fill(calo->E(),nMaxima); | |
3477 | ||
09273901 | 3478 | // Matching after cuts |
4bfeae64 | 3479 | if(fFillTMHisto) FillTrackMatchingResidualHistograms(calo,1); |
09273901 | 3480 | |
2ad19c3d | 3481 | // Fill histograms to undertand pile-up before other cuts applied |
3482 | // Remember to relax time cuts in the reader | |
fad96885 | 3483 | FillPileUpHistograms(calo->E(),mom.Pt(),calo->GetTOF()*1e9); |
2ad19c3d | 3484 | |
5c46c992 | 3485 | // Add number of local maxima to AOD, method name in AOD to be FIXED |
9e51e29a | 3486 | aodph.SetFiducialArea(nMaxima); |
5c46c992 | 3487 | |
afb3af8a | 3488 | if(fFillEMCALBCHistograms && fCalorimeter=="EMCAL" && idTrig >= 0) |
c2a62a94 | 3489 | { |
3490 | Double_t calotof = calo->GetTOF()*1e9; | |
3491 | Float_t calotofUS = TMath::Abs(calotof); | |
3492 | Float_t phicluster = aodph.Phi(); | |
3493 | if(phicluster < 0) phicluster+=TMath::TwoPi(); | |
3494 | ||
3495 | if(calo->E() > 2) | |
3496 | { | |
3497 | if (calotofUS < 25) fhEtaPhiPhotonEMCALBC0->Fill(aodph.Eta(), phicluster); | |
3498 | else if (calotofUS < 75) fhEtaPhiPhotonEMCALBC1->Fill(aodph.Eta(), phicluster); | |
3499 | else fhEtaPhiPhotonEMCALBCN->Fill(aodph.Eta(), phicluster); | |
3500 | } | |
3501 | ||
afb3af8a | 3502 | Int_t bc = GetReader()->GetTriggerClusterBC(); |
3503 | if(TMath::Abs(bc) < 6 && !GetReader()->IsBadCellTriggerEvent() && !GetReader()->IsExoticEvent()) | |
c2a62a94 | 3504 | { |
afb3af8a | 3505 | if(GetReader()->IsTriggerMatched()) |
3506 | { | |
3507 | if(calo->E() > 2) fhEtaPhiPhotonTriggerEMCALBC[bc+5]->Fill(aodph.Eta(), phicluster); | |
3508 | fhTimePhotonTriggerEMCALBC[bc+5]->Fill(calo->E(), calotof); | |
3509 | if(GetReader()->IsPileUpFromSPD()) fhTimePhotonTriggerEMCALBCPileUpSPD[bc+5]->Fill(calo->E(), calotof); | |
3510 | } | |
3511 | else | |
3512 | { | |
3513 | if(calo->E() > 2) fhEtaPhiPhotonTriggerEMCALBCUM[bc+5]->Fill(aodph.Eta(), phicluster); | |
3514 | fhTimePhotonTriggerEMCALBCUM[bc+5]->Fill(calo->E(), calotof); | |
3515 | } | |
c2a62a94 | 3516 | } |
afb3af8a | 3517 | else if(TMath::Abs(bc) >= 6) |
3518 | printf("AliAnaPhoton::MakeAnalysisFillAOD() - Trigger BC not expected = %d\n",bc); | |
c2a62a94 | 3519 | } |
3520 | ||
f37fa8d2 | 3521 | //Add AOD with photon object to aod branch |
477d6cee | 3522 | AddAODParticle(aodph); |
3523 | ||
3524 | }//loop | |
5812a064 | 3525 | |
f37fa8d2 | 3526 | if(GetDebug() > 1) printf("AliAnaPhoton::MakeAnalysisFillAOD() End fill AODs, with %d entries \n",GetOutputAODBranch()->GetEntriesFast()); |
477d6cee | 3527 | |
1c5acb87 | 3528 | } |
3529 | ||
3530 | //__________________________________________________________________ | |
3531 | void AliAnaPhoton::MakeAnalysisFillHistograms() | |
3532 | { | |
6175da48 | 3533 | //Fill histograms |
f8006433 | 3534 | |
6175da48 | 3535 | // Get vertex |
2244659d | 3536 | Double_t v[3] = {0,0,0}; //vertex ; |
3537 | GetReader()->GetVertex(v); | |
6175da48 | 3538 | //fhVertex->Fill(v[0],v[1],v[2]); |
3539 | if(TMath::Abs(v[2]) > GetZvertexCut()) return ; // done elsewhere for Single Event analysis, but there for mixed event | |
3540 | ||
3541 | //---------------------------------- | |
577d9801 | 3542 | //Loop on stored AOD photons |
3543 | Int_t naod = GetOutputAODBranch()->GetEntriesFast(); | |
577d9801 | 3544 | if(GetDebug() > 0) printf("AliAnaPhoton::MakeAnalysisFillHistograms() - aod branch entries %d\n", naod); |
521636d2 | 3545 | |
c8710850 | 3546 | Float_t cen = GetEventCentrality(); |
727a309a | 3547 | // printf("++++++++++ GetEventCentrality() %f\n",cen); |
3548 | ||
c8710850 | 3549 | Float_t ep = GetEventPlaneAngle(); |
3550 | ||
3c1d9afb | 3551 | for(Int_t iaod = 0; iaod < naod ; iaod++) |
3552 | { | |
577d9801 | 3553 | AliAODPWG4Particle* ph = (AliAODPWG4Particle*) (GetOutputAODBranch()->At(iaod)); |
3554 | Int_t pdg = ph->GetIdentifiedParticleType(); | |
521636d2 | 3555 | |
577d9801 | 3556 | if(GetDebug() > 3) |
3c1d9afb | 3557 | printf("AliAnaPhoton::MakeAnalysisFillHistograms() - PDG %d, MC TAG %d, Calorimeter %s\n", |
3558 | ph->GetIdentifiedParticleType(),ph->GetTag(), (ph->GetDetector()).Data()) ; | |
521636d2 | 3559 | |
577d9801 | 3560 | //If PID used, fill histos with photons in Calorimeter fCalorimeter |
3561 | if(IsCaloPIDOn() && pdg != AliCaloPID::kPhoton) continue; | |
3562 | if(ph->GetDetector() != fCalorimeter) continue; | |
521636d2 | 3563 | |
577d9801 | 3564 | if(GetDebug() > 2) |
3565 | printf("AliAnaPhoton::MakeAnalysisFillHistograms() - ID Photon: pt %f, phi %f, eta %f\n", ph->Pt(),ph->Phi(),ph->Eta()) ; | |
521636d2 | 3566 | |
6175da48 | 3567 | //................................ |
577d9801 | 3568 | //Fill photon histograms |
3569 | Float_t ptcluster = ph->Pt(); | |
3570 | Float_t phicluster = ph->Phi(); | |
3571 | Float_t etacluster = ph->Eta(); | |
3572 | Float_t ecluster = ph->E(); | |
521636d2 | 3573 | |
20218aea | 3574 | fhEPhoton ->Fill(ecluster); |
577d9801 | 3575 | fhPtPhoton ->Fill(ptcluster); |
3576 | fhPhiPhoton ->Fill(ptcluster,phicluster); | |
3577 | fhEtaPhoton ->Fill(ptcluster,etacluster); | |
fad96885 | 3578 | if (ecluster > 0.5) fhEtaPhiPhoton ->Fill(etacluster, phicluster); |
20218aea | 3579 | else if(GetMinPt() < 0.5) fhEtaPhi05Photon->Fill(etacluster, phicluster); |
5812a064 | 3580 | |
c8710850 | 3581 | fhPtCentralityPhoton ->Fill(ptcluster,cen) ; |
3582 | fhPtEventPlanePhoton ->Fill(ptcluster,ep ) ; | |
3583 | ||
5812a064 | 3584 | //Get original cluster, to recover some information |
3585 | Int_t absID = 0; | |
3586 | Float_t maxCellFraction = 0; | |
3587 | AliVCaloCells* cells = 0; | |
3588 | TObjArray * clusters = 0; | |
34c16486 | 3589 | if(fCalorimeter == "EMCAL") |
3590 | { | |
5812a064 | 3591 | cells = GetEMCALCells(); |
3592 | clusters = GetEMCALClusters(); | |
3593 | } | |
34c16486 | 3594 | else |
3595 | { | |
5812a064 | 3596 | cells = GetPHOSCells(); |
3597 | clusters = GetPHOSClusters(); | |
6175da48 | 3598 | } |
20218aea | 3599 | |
5812a064 | 3600 | Int_t iclus = -1; |
3601 | AliVCluster *cluster = FindCluster(clusters,ph->GetCaloLabel(0),iclus); | |
5c46c992 | 3602 | if(cluster) |
3603 | { | |
06f1b12a | 3604 | absID = GetCaloUtils()->GetMaxEnergyCell(cells, cluster,maxCellFraction); |
3605 | ||
3606 | // Control histograms | |
3607 | fhMaxCellDiffClusterE->Fill(ph->E(),maxCellFraction); | |
3608 | fhNCellsE ->Fill(ph->E(),cluster->GetNCells()); | |
3609 | fhTimeE ->Fill(ph->E(),cluster->GetTOF()*1.e9); | |
5c46c992 | 3610 | if(cells) |
3611 | { | |
3612 | for(Int_t icell = 0; icell < cluster->GetNCells(); icell++) | |
3613 | fhCellsE->Fill(ph->E(),cells->GetCellAmplitude(cluster->GetCellsAbsId()[icell])); | |
3614 | } | |
06f1b12a | 3615 | } |
5812a064 | 3616 | |
6175da48 | 3617 | //....................................... |
577d9801 | 3618 | //Play with the MC data if available |
34c16486 | 3619 | if(IsDataMC()) |
3620 | { | |
51a0ace5 | 3621 | if(GetDebug()>0) |
3622 | { | |
3623 | if(GetReader()->ReadStack() && !GetMCStack()) | |
3624 | { | |
3625 | printf("AliAnaPhoton::MakeAnalysisFillHistograms() - Stack not available, is the MC handler called?\n"); | |
3626 | } | |
2644ead9 | 3627 | else if(GetReader()->ReadAODMCParticles() && !GetReader()->GetAODMCParticles()) |
51a0ace5 | 3628 | { |
3629 | printf("AliAnaPhoton::MakeAnalysisFillHistograms() - Standard MCParticles not available!\n"); | |
3630 | } | |
3631 | } | |
3632 | ||
3d5d5078 | 3633 | FillAcceptanceHistograms(); |
3634 | ||
4c8f7c2e | 3635 | //.................................................................... |
3636 | // Access MC information in stack if requested, check that it exists. | |
3637 | Int_t label =ph->GetLabel(); | |
51a0ace5 | 3638 | |
34c16486 | 3639 | if(label < 0) |
3640 | { | |
4c8f7c2e | 3641 | if(GetDebug() > 1) printf("AliAnaPhoton::MakeAnalysisFillHistograms() *** bad label ***: label %d \n", label); |
3642 | continue; | |
3643 | } | |
3644 | ||
3645 | Float_t eprim = 0; | |
3646 | Float_t ptprim = 0; | |
51a0ace5 | 3647 | Bool_t ok = kFALSE; |
3648 | TLorentzVector primary = GetMCAnalysisUtils()->GetMother(label,GetReader(),ok); | |
3649 | if(ok) | |
34c16486 | 3650 | { |
51a0ace5 | 3651 | eprim = primary.Energy(); |
3652 | ptprim = primary.Pt(); | |
4c8f7c2e | 3653 | } |
3654 | ||
577d9801 | 3655 | Int_t tag =ph->GetTag(); |
51a0ace5 | 3656 | Int_t mcParticleTag = -1; |
c5693f62 | 3657 | if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) && fhMCE[kmcPhoton]) |
3d5d5078 | 3658 | { |
8e81c2cf | 3659 | fhMCE [kmcPhoton] ->Fill(ecluster); |
3660 | fhMCPt [kmcPhoton] ->Fill(ptcluster); | |
3661 | fhMCPhi[kmcPhoton] ->Fill(ecluster,phicluster); | |
3662 | fhMCEta[kmcPhoton] ->Fill(ecluster,etacluster); | |
3663 | ||
3664 | fhMC2E [kmcPhoton] ->Fill(ecluster, eprim); | |
3665 | fhMC2Pt [kmcPhoton] ->Fill(ptcluster, ptprim); | |
3666 | fhMCDeltaE [kmcPhoton] ->Fill(ecluster,eprim-ecluster); | |
3667 | fhMCDeltaPt[kmcPhoton] ->Fill(ptcluster,ptprim-ptcluster); | |
3668 | ||
764ab1f4 | 3669 | if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCConversion) && |
3670 | GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) && | |
3671 | fhMCE[kmcConversion]) | |
3d5d5078 | 3672 | { |
8e81c2cf | 3673 | fhMCE [kmcConversion] ->Fill(ecluster); |
3674 | fhMCPt [kmcConversion] ->Fill(ptcluster); | |
3675 | fhMCPhi[kmcConversion] ->Fill(ecluster,phicluster); | |
3676 | fhMCEta[kmcConversion] ->Fill(ecluster,etacluster); | |
3677 | ||
3678 | fhMC2E [kmcConversion] ->Fill(ecluster, eprim); | |
3679 | fhMC2Pt [kmcConversion] ->Fill(ptcluster, ptprim); | |
3680 | fhMCDeltaE [kmcConversion] ->Fill(ecluster,eprim-ecluster); | |
3681 | fhMCDeltaPt[kmcConversion] ->Fill(ptcluster,ptprim-ptcluster); | |
3d5d5078 | 3682 | } |
3683 | ||
51a0ace5 | 3684 | if (GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt) && fhMCE[kmcPrompt]) |
34c16486 | 3685 | { |
51a0ace5 | 3686 | mcParticleTag = kmcPrompt; |
3d5d5078 | 3687 | } |
c5693f62 | 3688 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCFragmentation)&& fhMCE[kmcFragmentation]) |
3d5d5078 | 3689 | { |
51a0ace5 | 3690 | mcParticleTag = kmcFragmentation; |
3d5d5078 | 3691 | } |
c5693f62 | 3692 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCISR)&& fhMCE[kmcISR]) |
3d5d5078 | 3693 | { |
51a0ace5 | 3694 | mcParticleTag = kmcISR; |
3d5d5078 | 3695 | } |
3696 | else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay) && | |
c5693f62 | 3697 | !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) && fhMCE[kmcPi0Decay]) |
3d5d5078 | 3698 | { |
51a0ace5 | 3699 | mcParticleTag = kmcPi0Decay; |
3d5d5078 | 3700 | } |
764ab1f4 | 3701 | else if((( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay) && |
3702 | !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) ) || | |
51a0ace5 | 3703 | GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOtherDecay) ) && fhMCE[kmcOtherDecay]) |
3d5d5078 | 3704 | { |
51a0ace5 | 3705 | mcParticleTag = kmcOtherDecay; |
3d5d5078 | 3706 | } |
51a0ace5 | 3707 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) && fhMCE[kmcPi0]) |
3d5d5078 | 3708 | { |
51a0ace5 | 3709 | mcParticleTag = kmcPi0; |
f66d95af | 3710 | } |
c5693f62 | 3711 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) && fhMCE[kmcEta]) |
f66d95af | 3712 | { |
51a0ace5 | 3713 | mcParticleTag = kmcEta; |
f66d95af | 3714 | } |
3d5d5078 | 3715 | } |
c5693f62 | 3716 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCAntiNeutron) && fhMCE[kmcAntiNeutron]) |
3d5d5078 | 3717 | { |
51a0ace5 | 3718 | mcParticleTag = kmcAntiNeutron; |
3d5d5078 | 3719 | } |
c5693f62 | 3720 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCAntiProton) && fhMCE[kmcAntiProton]) |
3d5d5078 | 3721 | { |
51a0ace5 | 3722 | mcParticleTag = kmcAntiProton; |
3d5d5078 | 3723 | } |
c5693f62 | 3724 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron) && fhMCE[kmcElectron]) |
3d5d5078 | 3725 | { |
51a0ace5 | 3726 | mcParticleTag = kmcElectron; |
3d5d5078 | 3727 | } |
34c16486 | 3728 | else if( fhMCE[kmcOther]) |
3729 | { | |
51a0ace5 | 3730 | mcParticleTag = kmcOther; |
4c8f7c2e | 3731 | |
f8006433 | 3732 | // printf(" AliAnaPhoton::MakeAnalysisFillHistograms() - Label %d, pT %2.3f Unknown, bits set: ", |
3733 | // ph->GetLabel(),ph->Pt()); | |
3734 | // for(Int_t i = 0; i < 20; i++) { | |
3735 | // if(GetMCAnalysisUtils()->CheckTagBit(tag,i)) printf(" %d, ",i); | |
3736 | // } | |
3737 | // printf("\n"); | |
3738 | ||
577d9801 | 3739 | } |
521636d2 | 3740 | |
51a0ace5 | 3741 | fhMCE [mcParticleTag] ->Fill(ecluster); |
3742 | fhMCPt [mcParticleTag] ->Fill(ptcluster); | |
3743 | fhMCPhi[mcParticleTag] ->Fill(ecluster,phicluster); | |
3744 | fhMCEta[mcParticleTag] ->Fill(ecluster,etacluster); | |
3745 | ||
3746 | fhMC2E[mcParticleTag] ->Fill(ecluster, eprim); | |
3747 | fhMC2Pt[mcParticleTag] ->Fill(ptcluster, ptprim); | |
3748 | fhMCDeltaE[mcParticleTag] ->Fill(ecluster,eprim-ecluster); | |
3749 | fhMCDeltaPt[mcParticleTag]->Fill(ptcluster,ptprim-ptcluster); | |
3750 | ||
577d9801 | 3751 | }//Histograms with MC |
521636d2 | 3752 | |
577d9801 | 3753 | }// aod loop |
521636d2 | 3754 | |
1c5acb87 | 3755 | } |
3756 | ||
3757 | ||
3758 | //__________________________________________________________________ | |
3759 | void AliAnaPhoton::Print(const Option_t * opt) const | |
3760 | { | |
477d6cee | 3761 | //Print some relevant parameters set for the analysis |
3762 | ||
3763 | if(! opt) | |
3764 | return; | |
3765 | ||
3766 | printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ; | |
745913ae | 3767 | AliAnaCaloTrackCorrBaseClass::Print(" "); |
a3aebfff | 3768 | |
477d6cee | 3769 | printf("Calorimeter = %s\n", fCalorimeter.Data()) ; |
3770 | printf("Min Distance to Bad Channel = %2.1f\n",fMinDist); | |
3771 | printf("Min Distance to Bad Channel 2 = %2.1f\n",fMinDist2); | |
3772 | printf("Min Distance to Bad Channel 3 = %2.1f\n",fMinDist3); | |
a3aebfff | 3773 | printf("Reject clusters with a track matched = %d\n",fRejectTrackMatch); |
4cf55759 | 3774 | printf("Time Cut: %3.1f < TOF < %3.1f\n", fTimeCutMin, fTimeCutMax); |
2ac125bf | 3775 | printf("Number of cells in cluster is > %d \n", fNCellsCut); |
477d6cee | 3776 | printf(" \n") ; |
1c5acb87 | 3777 | |
3778 | } |