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