AliPhysics  vAN-20150630 (513c479)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
AliAnaPhotonConvInCalo.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
15 
16 // --- ROOT system ---
17 #include <TH2F.h>
18 #include <TH3D.h>
19 #include <TClonesArray.h>
20 #include <TObjString.h>
21 #include "TParticle.h"
22 #include "TDatabasePDG.h"
23 
24 // --- Analysis system ---
25 #include "AliAnaPhotonConvInCalo.h"
26 #include "AliCaloTrackReader.h"
27 #include "AliStack.h"
28 #include "AliCaloPID.h"
29 #include "AliMCAnalysisUtils.h"
30 #include "AliFiducialCut.h"
31 #include "AliVCluster.h"
32 #include "AliAODMCParticle.h"
33 
37 
38 //________________________________________________
40 //________________________________________________
43 fRemoveConvertedPair(kFALSE),
44 fAddConvertedPairsToAOD(kFALSE),
45 fMassCut(0),
46 fConvAsymCut(1.), fConvDEtaCut(2.),
47 fConvDPhiMinCut(-1.), fConvDPhiMaxCut(7.),
48 fMomentum(), fProdVertex(),
49 // Histograms
50 fhPtPhotonConv(0), fhEtaPhiPhotonConv(0), fhEtaPhi05PhotonConv(0),
51 fhConvDeltaEta(0), fhConvDeltaPhi(0), fhConvDeltaEtaPhi(0),
52 fhConvAsym(0), fhConvPt(0),
53 fhConvDistEta(0), fhConvDistEn(0), fhConvDistMass(0),
54 fhConvDistEtaCutEta(0), fhConvDistEnCutEta(0), fhConvDistMassCutEta(0),
55 fhConvDistEtaCutMass(0), fhConvDistEnCutMass(0),
56 fhConvDistEtaCutAsy(0), fhConvDistEnCutAsy(0),
57 
58 // MC histograms
59 fhPtConversionTagged(0), fhPtAntiNeutronTagged(0),
60 fhPtAntiProtonTagged(0), fhPtUnknownTagged(0),
61 
62 fhConvDeltaEtaMCConversion(0), fhConvDeltaPhiMCConversion(0), fhConvDeltaEtaPhiMCConversion(0),
63 fhConvAsymMCConversion(0), fhConvPtMCConversion(0),
64 fhConvDispersionMCConversion(0), fhConvM02MCConversion(0),
65 
66 fhConvDeltaEtaMCAntiNeutron(0), fhConvDeltaPhiMCAntiNeutron(0), fhConvDeltaEtaPhiMCAntiNeutron(0),
67 fhConvAsymMCAntiNeutron(0), fhConvPtMCAntiNeutron(0),
68 fhConvDispersionMCAntiNeutron(0), fhConvM02MCAntiNeutron(0),
69 fhConvDeltaEtaMCAntiProton(0), fhConvDeltaPhiMCAntiProton(0), fhConvDeltaEtaPhiMCAntiProton(0),
70 fhConvAsymMCAntiProton(0), fhConvPtMCAntiProton(0),
71 fhConvDispersionMCAntiProton(0), fhConvM02MCAntiProton(0),
72 fhConvDeltaEtaMCString(0), fhConvDeltaPhiMCString(0), fhConvDeltaEtaPhiMCString(0),
73 fhConvAsymMCString(0), fhConvPtMCString(0),
74 fhConvDispersionMCString(0), fhConvM02MCString(0),
75 fhConvDistMCConversion(0), fhConvDistMCConversionCuts(0)
76 {
78 }
79 
80 //_____________________________________________________
82 //_____________________________________________________
84 {
85  TString parList ; //this will be list of parameters used for this analysis.
86  const Int_t buffersize = 255;
87  char onePar[buffersize] ;
88 
89  snprintf(onePar,buffersize,"--- AliAnaPhotonConvInCalo---:") ;
90  parList+=onePar ;
91  snprintf(onePar,buffersize,"Conversion Selection: fConvAsymCut %1.2f, fConvDEtaCut %1.2f fConvDPhiCut (%1.2f,%1.2f)",
93  parList+=onePar ;
94 
95  return new TObjString(parList) ;
96 }
97 
98 //_______________________________________________________
101 //_______________________________________________________
103 {
104  TList * outputContainer = new TList() ;
105  outputContainer->SetName("PhotonConvInCaloHistos") ;
106 
107  Int_t nptbins = GetHistogramRanges()->GetHistoPtBins(); Float_t ptmax = GetHistogramRanges()->GetHistoPtMax(); Float_t ptmin = GetHistogramRanges()->GetHistoPtMin();
108  Int_t nphibins = GetHistogramRanges()->GetHistoPhiBins(); Float_t phimax = GetHistogramRanges()->GetHistoPhiMax(); Float_t phimin = GetHistogramRanges()->GetHistoPhiMin();
109  Int_t netabins = GetHistogramRanges()->GetHistoEtaBins(); Float_t etamax = GetHistogramRanges()->GetHistoEtaMax(); Float_t etamin = GetHistogramRanges()->GetHistoEtaMin();
110 
111  fhPtPhotonConv = new TH1F("hPtPhotonConv","Number of #gamma over calorimeter, conversion",nptbins,ptmin,ptmax);
112  fhPtPhotonConv->SetYTitle("N");
113  fhPtPhotonConv->SetXTitle("p_{T #gamma}(GeV/c)");
114  outputContainer->Add(fhPtPhotonConv) ;
115 
116  fhEtaPhiPhotonConv = new TH2F
117  ("hEtaPhiPhotonConv","#eta vs #phi",netabins,etamin,etamax,nphibins,phimin,phimax);
118  fhEtaPhiPhotonConv->SetYTitle("#phi (rad)");
119  fhEtaPhiPhotonConv->SetXTitle("#eta");
120  outputContainer->Add(fhEtaPhiPhotonConv) ;
121  if(GetMinPt() < 0.5){
122  fhEtaPhi05PhotonConv = new TH2F
123  ("hEtaPhi05PhotonConv","#eta vs #phi, E > 0.5",netabins,etamin,etamax,nphibins,phimin,phimax);
124  fhEtaPhi05PhotonConv->SetYTitle("#phi (rad)");
125  fhEtaPhi05PhotonConv->SetXTitle("#eta");
126  outputContainer->Add(fhEtaPhi05PhotonConv) ;
127  }
128 
129  fhConvDeltaEta = new TH2F
130  ("hConvDeltaEta","#Delta #eta of selected conversion pairs",100,0,fMassCut,netabins*2,-0.5,0.5);
131  fhConvDeltaEta->SetYTitle("#Delta #eta");
132  fhConvDeltaEta->SetXTitle("Pair Mass (GeV/c^2)");
133  outputContainer->Add(fhConvDeltaEta) ;
134 
135  fhConvDeltaPhi = new TH2F
136  ("hConvDeltaPhi","#Delta #phi of selected conversion pairs",100,0,fMassCut,nphibins*2,-0.5,0.5);
137  fhConvDeltaPhi->SetYTitle("#Delta #phi");
138  fhConvDeltaPhi->SetXTitle("Pair Mass (GeV/c^2)");
139  outputContainer->Add(fhConvDeltaPhi) ;
140 
141  fhConvDeltaEtaPhi = new TH2F
142  ("hConvDeltaEtaPhi","#Delta #eta vs #Delta #phi of selected conversion pairs",netabins,-0.5,0.5,nphibins,-0.5,0.5);
143  fhConvDeltaEtaPhi->SetYTitle("#Delta #phi");
144  fhConvDeltaEtaPhi->SetXTitle("#Delta #eta");
145  outputContainer->Add(fhConvDeltaEtaPhi) ;
146 
147  fhConvAsym = new TH2F
148  ("hConvAsym","Asymmetry of selected conversion pairs",100,0,fMassCut,100,0,1);
149  fhConvAsym->SetYTitle("Asymmetry");
150  fhConvAsym->SetXTitle("Pair Mass (GeV/c^2)");
151  outputContainer->Add(fhConvAsym) ;
152 
153  fhConvPt = new TH2F
154  ("hConvPt","p_{T} of selected conversion pairs",100,0,fMassCut,100,0.,10.);
155  fhConvPt->SetYTitle("Pair p_{T} (GeV/c)");
156  fhConvPt->SetXTitle("Pair Mass (GeV/c^2)");
157  outputContainer->Add(fhConvPt) ;
158 
159  fhConvDistEta = new TH2F
160  ("hConvDistEta","distance to conversion vertex",100,-0.7,0.7,100,0.,5.);
161  fhConvDistEta->SetXTitle("#eta");
162  fhConvDistEta->SetYTitle(" distance (m)");
163  outputContainer->Add(fhConvDistEta) ;
164 
165  fhConvDistEn = new TH2F
166  ("hConvDistEn","distance to conversion vertex",nptbins,ptmin,ptmax,100,0.,5.);
167  fhConvDistEn->SetXTitle("E (GeV)");
168  fhConvDistEn->SetYTitle(" distance (m)");
169  outputContainer->Add(fhConvDistEn) ;
170 
171  fhConvDistMass = new TH2F
172  ("hConvDistMass","distance to conversion vertex",100,0,fMassCut,100,0.,5.);
173  fhConvDistMass->SetXTitle("m (GeV/c^2)");
174  fhConvDistMass->SetYTitle(" distance (m)");
175  outputContainer->Add(fhConvDistMass) ;
176 
177  fhConvDistEtaCutEta = new TH2F
178  ("hConvDistEtaCutEta","distance to conversion vertex, dEta < 0.05",100,-0.7,0.7,100,0.,5.);
179  fhConvDistEtaCutEta->SetXTitle("#eta");
180  fhConvDistEtaCutEta->SetYTitle(" distance (m)");
181  outputContainer->Add(fhConvDistEtaCutEta) ;
182 
183  fhConvDistEnCutEta = new TH2F
184  ("hConvDistEnCutEta","distance to conversion vertex, dEta < 0.05",nptbins,ptmin,ptmax,100,0.,5.);
185  fhConvDistEnCutEta->SetXTitle("E (GeV)");
186  fhConvDistEnCutEta->SetYTitle(" distance (m)");
187  outputContainer->Add(fhConvDistEnCutEta) ;
188 
189  fhConvDistMassCutEta = new TH2F
190  ("hConvDistMassCutEta","distance to conversion vertex, dEta < 0.05",100,0,fMassCut,100,0.,5.);
191  fhConvDistMassCutEta->SetXTitle("m (GeV/c^2)");
192  fhConvDistMassCutEta->SetYTitle(" distance (m)");
193  outputContainer->Add(fhConvDistMassCutEta) ;
194 
195  fhConvDistEtaCutMass = new TH2F
196  ("hConvDistEtaCutMass","distance to conversion vertex, dEta < 0.05, m < 10 MeV",100,-0.7,0.7,100,0.,5.);
197  fhConvDistEtaCutMass->SetXTitle("#eta");
198  fhConvDistEtaCutMass->SetYTitle(" distance (m)");
199  outputContainer->Add(fhConvDistEtaCutMass) ;
200 
201  fhConvDistEnCutMass = new TH2F
202  ("hConvDistEnCutMass","distance to conversion vertex, dEta < 0.05, m < 10 MeV",nptbins,ptmin,ptmax,100,0.,5.);
203  fhConvDistEnCutMass->SetXTitle("E (GeV)");
204  fhConvDistEnCutMass->SetYTitle(" distance (m)");
205  outputContainer->Add(fhConvDistEnCutMass) ;
206 
207  fhConvDistEtaCutAsy = new TH2F
208  ("hConvDistEtaCutAsy","distance to conversion vertex, dEta < 0.05, m < 10 MeV, A < 0.1",100,-0.7,0.7,100,0.,5.);
209  fhConvDistEtaCutAsy->SetXTitle("#eta");
210  fhConvDistEtaCutAsy->SetYTitle(" distance (m)");
211  outputContainer->Add(fhConvDistEtaCutAsy) ;
212 
213  fhConvDistEnCutAsy = new TH2F
214  ("hConvDistEnCutAsy","distance to conversion vertex, dEta < 0.05, m < 10 MeV, A < 0.1",nptbins,ptmin,ptmax,100,0.,5.);
215  fhConvDistEnCutAsy->SetXTitle("E (GeV)");
216  fhConvDistEnCutAsy->SetYTitle(" distance (m)");
217  outputContainer->Add(fhConvDistEnCutAsy) ;
218 
219  if(IsDataMC())
220  {
221  fhPtConversionTagged = new TH1F("hPtMCConversionTagged","Number of converted #gamma over calorimeter, tagged as converted",nptbins,ptmin,ptmax);
222  fhPtConversionTagged->SetYTitle("N");
223  fhPtConversionTagged->SetXTitle("p_{T #gamma}(GeV/c)");
224  outputContainer->Add(fhPtConversionTagged) ;
225 
226 
227  fhPtAntiNeutronTagged = new TH1F("hPtMCAntiNeutronTagged","Number of AntiNeutron id as Photon over calorimeter, tagged as converted",nptbins,ptmin,ptmax);
228  fhPtAntiNeutronTagged->SetYTitle("N");
229  fhPtAntiNeutronTagged->SetXTitle("p_{T #gamma}(GeV/c)");
230  outputContainer->Add(fhPtAntiNeutronTagged) ;
231 
232  fhPtAntiProtonTagged = new TH1F("hPtMCAntiProtonTagged","Number of AntiProton id as Photon over calorimeter, tagged as converted",nptbins,ptmin,ptmax);
233  fhPtAntiProtonTagged->SetYTitle("N");
234  fhPtAntiProtonTagged->SetXTitle("p_{T #gamma}(GeV/c)");
235  outputContainer->Add(fhPtAntiProtonTagged) ;
236 
237  fhPtUnknownTagged = new TH1F("hPtMCUnknownTagged","Number of Unknown id as Photon over calorimeter, tagged as converted",nptbins,ptmin,ptmax);
238  fhPtUnknownTagged->SetYTitle("N");
239  fhPtUnknownTagged->SetXTitle("p_{T #gamma}(GeV/c)");
240  outputContainer->Add(fhPtUnknownTagged) ;
241 
242  fhConvDeltaEtaMCConversion = new TH2F
243  ("hConvDeltaEtaMCConversion","#Delta #eta of selected conversion pairs from real conversions",100,0,fMassCut,netabins,-0.5,0.5);
244  fhConvDeltaEtaMCConversion->SetYTitle("#Delta #eta");
245  fhConvDeltaEtaMCConversion->SetXTitle("Pair Mass (GeV/c^2)");
246  outputContainer->Add(fhConvDeltaEtaMCConversion) ;
247 
248  fhConvDeltaPhiMCConversion = new TH2F
249  ("hConvDeltaPhiMCConversion","#Delta #phi of selected conversion pairs from real conversions",100,0,fMassCut,nphibins,-0.5,0.5);
250  fhConvDeltaPhiMCConversion->SetYTitle("#Delta #phi");
251  fhConvDeltaPhiMCConversion->SetXTitle("Pair Mass (GeV/c^2)");
252  outputContainer->Add(fhConvDeltaPhiMCConversion) ;
253 
255  ("hConvDeltaEtaPhiMCConversion","#Delta #eta vs #Delta #phi of selected conversion pairs, from real conversions",netabins,-0.5,0.5,nphibins,-0.5,0.5);
256  fhConvDeltaEtaPhiMCConversion->SetYTitle("#Delta #phi");
257  fhConvDeltaEtaPhiMCConversion->SetXTitle("#Delta #eta");
258  outputContainer->Add(fhConvDeltaEtaPhiMCConversion) ;
259 
260  fhConvAsymMCConversion = new TH2F
261  ("hConvAsymMCConversion","Asymmetry of selected conversion pairs from real conversions",100,0,fMassCut,100,0,1);
262  fhConvAsymMCConversion->SetYTitle("Asymmetry");
263  fhConvAsymMCConversion->SetXTitle("Pair Mass (GeV/c^2)");
264  outputContainer->Add(fhConvAsymMCConversion) ;
265 
266  fhConvPtMCConversion = new TH2F
267  ("hConvPtMCConversion","p_{T} of selected conversion pairs from real conversions",100,0,fMassCut,100,0.,10.);
268  fhConvPtMCConversion->SetYTitle("Pair p_{T} (GeV/c)");
269  fhConvPtMCConversion->SetXTitle("Pair Mass (GeV/c^2)");
270  outputContainer->Add(fhConvPtMCConversion) ;
271 
273  ("hConvDispersionMCConversion","p_{T} of selected conversion pairs from real conversions",100,0.,1.,100,0.,1.);
274  fhConvDispersionMCConversion->SetYTitle("Dispersion cluster 1");
275  fhConvDispersionMCConversion->SetXTitle("Dispersion cluster 2");
276  outputContainer->Add(fhConvDispersionMCConversion) ;
277 
278  fhConvM02MCConversion = new TH2F
279  ("hConvM02MCConversion","p_{T} of selected conversion pairs from string",100,0.,1.,100,0.,1.);
280  fhConvM02MCConversion->SetYTitle("M02 cluster 1");
281  fhConvM02MCConversion->SetXTitle("M02 cluster 2");
282  outputContainer->Add(fhConvM02MCConversion) ;
283 
284  fhConvDeltaEtaMCAntiNeutron = new TH2F
285  ("hConvDeltaEtaMCAntiNeutron","#Delta #eta of selected conversion pairs from anti-neutrons",100,0,fMassCut,netabins,-0.5,0.5);
286  fhConvDeltaEtaMCAntiNeutron->SetYTitle("#Delta #eta");
287  fhConvDeltaEtaMCAntiNeutron->SetXTitle("Pair Mass (GeV/c^2)");
288  outputContainer->Add(fhConvDeltaEtaMCAntiNeutron) ;
289 
290  fhConvDeltaPhiMCAntiNeutron = new TH2F
291  ("hConvDeltaPhiMCAntiNeutron","#Delta #phi of selected conversion pairs from anti-neutrons",100,0,fMassCut,nphibins,-0.5,0.5);
292  fhConvDeltaPhiMCAntiNeutron->SetYTitle("#Delta #phi");
293  fhConvDeltaPhiMCAntiNeutron->SetXTitle("Pair Mass (GeV/c^2)");
294  outputContainer->Add(fhConvDeltaPhiMCAntiNeutron) ;
295 
297  ("hConvDeltaEtaPhiMCAntiNeutron","#Delta #eta vs #Delta #phi of selected conversion pairs from anti-neutrons",netabins,-0.5,0.5,nphibins,-0.5,0.5);
298  fhConvDeltaEtaPhiMCAntiNeutron->SetYTitle("#Delta #phi");
299  fhConvDeltaEtaPhiMCAntiNeutron->SetXTitle("#Delta #eta");
300  outputContainer->Add(fhConvDeltaEtaPhiMCAntiNeutron) ;
301 
302  fhConvAsymMCAntiNeutron = new TH2F
303  ("hConvAsymMCAntiNeutron","Asymmetry of selected conversion pairs from anti-neutrons",100,0,fMassCut,100,0,1);
304  fhConvAsymMCAntiNeutron->SetYTitle("Asymmetry");
305  fhConvAsymMCAntiNeutron->SetXTitle("Pair Mass (GeV/c^2)");
306  outputContainer->Add(fhConvAsymMCAntiNeutron) ;
307 
308  fhConvPtMCAntiNeutron = new TH2F
309  ("hConvPtMCAntiNeutron","p_{T} of selected conversion pairs from anti-neutrons",100,0,fMassCut,100,0.,10.);
310  fhConvPtMCAntiNeutron->SetYTitle("Pair p_{T} (GeV/c)");
311  fhConvPtMCAntiNeutron->SetXTitle("Pair Mass (GeV/c^2)");
312  outputContainer->Add(fhConvPtMCAntiNeutron) ;
313 
315  ("hConvDispersionMCAntiNeutron","p_{T} of selected conversion pairs from anti-neutrons",100,0.,1.,100,0.,1.);
316  fhConvDispersionMCAntiNeutron->SetYTitle("Dispersion cluster 1");
317  fhConvDispersionMCAntiNeutron->SetXTitle("Dispersion cluster 2");
318  outputContainer->Add(fhConvDispersionMCAntiNeutron) ;
319 
320  fhConvM02MCAntiNeutron = new TH2F
321  ("hConvM02MCAntiNeutron","p_{T} of selected conversion pairs from string",100,0.,1.,100,0.,1.);
322  fhConvM02MCAntiNeutron->SetYTitle("M02 cluster 1");
323  fhConvM02MCAntiNeutron->SetXTitle("M02 cluster 2");
324  outputContainer->Add(fhConvM02MCAntiNeutron) ;
325 
326  fhConvDeltaEtaMCAntiProton = new TH2F
327  ("hConvDeltaEtaMCAntiProton","#Delta #eta of selected conversion pairs from anti-protons",100,0,fMassCut,netabins,-0.5,0.5);
328  fhConvDeltaEtaMCAntiProton->SetYTitle("#Delta #eta");
329  fhConvDeltaEtaMCAntiProton->SetXTitle("Pair Mass (GeV/c^2)");
330  outputContainer->Add(fhConvDeltaEtaMCAntiProton) ;
331 
332  fhConvDeltaPhiMCAntiProton = new TH2F
333  ("hConvDeltaPhiMCAntiProton","#Delta #phi of selected conversion pairs from anti-protons",100,0,fMassCut,nphibins,-0.5,0.5);
334  fhConvDeltaPhiMCAntiProton->SetYTitle("#Delta #phi");
335  fhConvDeltaPhiMCAntiProton->SetXTitle("Pair Mass (GeV/c^2)");
336  outputContainer->Add(fhConvDeltaPhiMCAntiProton) ;
337 
339  ("hConvDeltaEtaPhiMCAntiProton","#Delta #eta vs #Delta #phi of selected conversion pairs from anti-protons",netabins,-0.5,0.5,nphibins,-0.5,0.5);
340  fhConvDeltaEtaPhiMCAntiProton->SetYTitle("#Delta #phi");
341  fhConvDeltaEtaPhiMCAntiProton->SetXTitle("#Delta #eta");
342  outputContainer->Add(fhConvDeltaEtaPhiMCAntiProton) ;
343 
344  fhConvAsymMCAntiProton = new TH2F
345  ("hConvAsymMCAntiProton","Asymmetry of selected conversion pairs from anti-protons",100,0,fMassCut,100,0,1);
346  fhConvAsymMCAntiProton->SetYTitle("Asymmetry");
347  fhConvAsymMCAntiProton->SetXTitle("Pair Mass (GeV/c^2)");
348  outputContainer->Add(fhConvAsymMCAntiProton) ;
349 
350  fhConvPtMCAntiProton = new TH2F
351  ("hConvPtMCAntiProton","p_{T} of selected conversion pairs from anti-protons",100,0,fMassCut,100,0.,10.);
352  fhConvPtMCAntiProton->SetYTitle("Pair p_{T} (GeV/c)");
353  fhConvPtMCAntiProton->SetXTitle("Pair Mass (GeV/c^2)");
354  outputContainer->Add(fhConvPtMCAntiProton) ;
355 
357  ("hConvDispersionMCAntiProton","p_{T} of selected conversion pairs from anti-protons",100,0.,1.,100,0.,1.);
358  fhConvDispersionMCAntiProton->SetYTitle("Dispersion cluster 1");
359  fhConvDispersionMCAntiProton->SetXTitle("Dispersion cluster 2");
360  outputContainer->Add(fhConvDispersionMCAntiProton) ;
361 
362  fhConvM02MCAntiProton = new TH2F
363  ("hConvM02MCAntiProton","p_{T} of selected conversion pairs from string",100,0.,1.,100,0.,1.);
364  fhConvM02MCAntiProton->SetYTitle("M02 cluster 1");
365  fhConvM02MCAntiProton->SetXTitle("M02 cluster 2");
366  outputContainer->Add(fhConvM02MCAntiProton) ;
367 
368  fhConvDeltaEtaMCString = new TH2F
369  ("hConvDeltaEtaMCString","#Delta #eta of selected conversion pairs from string",100,0,fMassCut,netabins,-0.5,0.5);
370  fhConvDeltaEtaMCString->SetYTitle("#Delta #eta");
371  fhConvDeltaEtaMCString->SetXTitle("Pair Mass (GeV/c^2)");
372  outputContainer->Add(fhConvDeltaEtaMCString) ;
373 
374  fhConvDeltaPhiMCString = new TH2F
375  ("hConvDeltaPhiMCString","#Delta #phi of selected conversion pairs from string",100,0,fMassCut,nphibins,-0.5,0.5);
376  fhConvDeltaPhiMCString->SetYTitle("#Delta #phi");
377  fhConvDeltaPhiMCString->SetXTitle("Pair Mass (GeV/c^2)");
378  outputContainer->Add(fhConvDeltaPhiMCString) ;
379 
380  fhConvDeltaEtaPhiMCString = new TH2F
381  ("hConvDeltaEtaPhiMCString","#Delta #eta vs #Delta #phi of selected conversion pairs from string",netabins,-0.5,0.5,nphibins,-0.5,0.5);
382  fhConvDeltaEtaPhiMCString->SetYTitle("#Delta #phi");
383  fhConvDeltaEtaPhiMCString->SetXTitle("#Delta #eta");
384  outputContainer->Add(fhConvDeltaEtaPhiMCString) ;
385 
386  fhConvAsymMCString = new TH2F
387  ("hConvAsymMCString","Asymmetry of selected conversion pairs from string",100,0,fMassCut,100,0,1);
388  fhConvAsymMCString->SetYTitle("Asymmetry");
389  fhConvAsymMCString->SetXTitle("Pair Mass (GeV/c^2)");
390  outputContainer->Add(fhConvAsymMCString) ;
391 
392  fhConvPtMCString = new TH2F
393  ("hConvPtMCString","p_{T} of selected conversion pairs from string",100,0,fMassCut,100,0.,10.);
394  fhConvPtMCString->SetYTitle("Pair p_{T} (GeV/c)");
395  fhConvPtMCString->SetXTitle("Pair Mass (GeV/c^2)");
396  outputContainer->Add(fhConvPtMCString) ;
397 
398  fhConvDispersionMCString = new TH2F
399  ("hConvDispersionMCString","p_{T} of selected conversion pairs from string",100,0.,1.,100,0.,1.);
400  fhConvDispersionMCString->SetYTitle("Dispersion cluster 1");
401  fhConvDispersionMCString->SetXTitle("Dispersion cluster 2");
402  outputContainer->Add(fhConvDispersionMCString) ;
403 
404  fhConvM02MCString = new TH2F
405  ("hConvM02MCString","p_{T} of selected conversion pairs from string",100,0.,1.,100,0.,1.);
406  fhConvM02MCString->SetYTitle("M02 cluster 1");
407  fhConvM02MCString->SetXTitle("M02 cluster 2");
408  outputContainer->Add(fhConvM02MCString) ;
409 
410  fhConvDistMCConversion = new TH2F
411  ("hConvDistMCConversion","calculated conversion distance vs real vertes for MC conversion",100,0.,5.,100,0.,5.);
412  fhConvDistMCConversion->SetYTitle("distance");
413  fhConvDistMCConversion->SetXTitle("vertex R");
414  outputContainer->Add(fhConvDistMCConversion) ;
415 
416  fhConvDistMCConversionCuts = new TH2F
417  ("hConvDistMCConversionCuts","calculated conversion distance vs real vertes for MC conversion, deta < 0.05, m < 10 MeV, asym < 0.1",100,0.,5.,100,0.,5.);
418  fhConvDistMCConversionCuts->SetYTitle("distance");
419  fhConvDistMCConversionCuts->SetXTitle("vertex R");
420  outputContainer->Add(fhConvDistMCConversionCuts) ;
421  }
422 
423  return outputContainer ;
424 }
425 
426 //___________________________________________
428 //___________________________________________
430 {
431  AddToHistogramsName("AnaPhotonConvInCalo_");
432 
433  fMassCut = 0.03; //30 MeV
434  fRemoveConvertedPair = kFALSE;
435  fAddConvertedPairsToAOD = kFALSE;
436 }
437 
438 //_________________________________________________
440 //_________________________________________________
442 {
443  // Loop on stored AOD photons
444  Int_t naod = GetOutputAODBranch()->GetEntriesFast();
445  AliDebug(1,Form("AOD branch entries %d", naod));
446 
447  // List to be used in conversion analysis, to tag the cluster as candidate for conversion
448  Bool_t * indexConverted = new Bool_t[naod];
449  for (Int_t i = 0; i < naod; i++) indexConverted[i] = kFALSE;
450 
451  for(Int_t iaod = 0; iaod < naod ; iaod++)
452  {
453  AliAODPWG4Particle* calo = (AliAODPWG4Particle*) (GetOutputAODBranch()->At(iaod));
454 
455  Bool_t bConverted = kFALSE;
456  Int_t id2 = -1;
457 
458  // Check if set previously as converted couple, if so skip its use.
459  if (indexConverted[iaod]) continue;
460 
461  // Second cluster loop
462  AliAODPWG4Particle* calo2 = 0;
463  for(Int_t jaod = iaod + 1 ; jaod < naod ; jaod++)
464  {
465  // Check if set previously as converted couple, if so skip its use.
466  if (indexConverted[jaod]) continue;
467  //printf("Check Conversion indeces %d and %d\n",iaod,jaod);
468  calo2 = (AliAODPWG4Particle*) (GetOutputAODBranch()->At(jaod));
469 
470  //................................................
471  // Get mass of pair, if small, take this pair.
472  Float_t pairM = calo->GetPairMass(calo2);
473  //printf("\t both in calo, mass %f, cut %f\n",pairM,fMassCut);
474  if(pairM < fMassCut)
475  {
476  calo->SetTagged(kFALSE);
477  id2 = calo2->GetCaloLabel(0);
478  Float_t asymmetry = TMath::Abs(calo->E()-calo2->E())/(calo->E()+calo2->E());
479  Float_t dPhi = (calo->Momentum())->Phi()-(calo2->Momentum())->Phi();
480  Float_t dEta = (calo->Momentum())->Eta()-(calo2->Momentum())->Eta();
481 
482  //...............................................
483  // Fill few histograms with kinematics of the pair
484  // FIXME, move all this to MakeAnalysisFillHistograms ...
485 
486  fhConvDeltaEta ->Fill( pairM, dPhi , GetEventWeight());
487  fhConvDeltaPhi ->Fill( pairM, dEta , GetEventWeight());
488  fhConvAsym ->Fill( pairM, asymmetry, GetEventWeight());
489  fhConvDeltaEtaPhi->Fill( dEta , dPhi , GetEventWeight());
490  fhConvPt ->Fill( pairM, (calo->Momentum())->Pt()+(calo2->Momentum())->Pt(), GetEventWeight());
491 
492  // Estimate conversion distance, T. Awes, M. Ivanov
493  // Under the assumption that the pair has zero mass, and that each electron
494  // of the pair has the same momentum, they will each have the same bend radius
495  // given by R=p/(qB) = p / (300 B) with p in [MeV/c], B in [Tesla] and R in [m].
496  // With nominal ALICE magnet current of 30kA B=0.5T, and so with E_cluster=p,
497  // R = E/1.5 [cm]. Under these assumptions, the distance from the conversion
498  // point to the MCEal can be related to the separation distance, L=2y, on the MCEal
499  // as d = sqrt(R^2 -(R-y)^2) = sqrt(2Ry - y^2). And since R>>y we can write as
500  // d = sqrt(E*L/1.5) where E is the cluster energy and L is the distance in cm between
501  // the clusters.
502 
503  TObjArray * clusters = 0;
504  if(calo->GetDetectorTag() == kEMCAL) clusters = GetEMCALClusters();
505  else clusters = GetPHOSClusters();
506 
507 
508  Int_t iclus = -1;
509  AliVCluster *cluster1 = FindCluster(clusters,calo ->GetCaloLabel(0),iclus);
510  AliVCluster *cluster2 = FindCluster(clusters,calo2->GetCaloLabel(0),iclus);
511 
512  Float_t pos1[3];
513  cluster1->GetPosition(pos1);
514  Float_t pos2[3];
515  cluster2->GetPosition(pos2);
516  Float_t clustDist = TMath::Sqrt((pos1[0]-pos2[0])*(pos1[0]-pos2[0])+
517  (pos1[1]-pos2[1])*(pos1[1]-pos2[1])+
518  (pos1[2]-pos2[2])*(pos1[2]-pos2[2]));
519 
520  Float_t convDist = TMath::Sqrt(calo->E() *clustDist*0.01/0.15);
521  Float_t convDist2 = TMath::Sqrt(calo2->E()*clustDist*0.01/0.15);
522  //printf("l = %f, e1 = %f, d1=%f, e2 = %f, d2=%f\n",clustDist,calo->E(),convDist,calo2->E(),convDist2);
523  AliDebug(2,Form("Pair with mass %2.3f < %2.3f, %1.2f < dPhi %2.2f < %2.2f, dEta %f < %2.2f, asymmetry %2.2f< %2.2f; \n cluster1 id %d, e %2.3f SM %d, eta %2.3f, phi %2.3f ; \n cluster2 id %d, e %2.3f, SM %d,eta %2.3f, phi %2.3f",
524  pairM,fMassCut,fConvDPhiMinCut, dPhi, fConvDPhiMaxCut, dEta, fConvDEtaCut, asymmetry, fConvAsymCut,
525  calo->GetCaloLabel(0),calo->E(),GetCaloUtils()->GetModuleNumber(calo,GetReader()->GetInputEvent()), calo->Eta(), calo->Phi(),
526  id2, calo2->E(), GetCaloUtils()->GetModuleNumber(calo2,GetReader()->GetInputEvent()),calo2->Eta(), calo2->Phi()));
527 
528  fhConvDistEta ->Fill(calo ->Eta(),convDist , GetEventWeight());
529  fhConvDistEta ->Fill(calo2->Eta(),convDist2, GetEventWeight());
530  fhConvDistEn ->Fill(calo ->E(), convDist , GetEventWeight());
531  fhConvDistEn ->Fill(calo2->E(), convDist2, GetEventWeight());
532  fhConvDistMass->Fill(pairM, convDist, GetEventWeight());
533  //dEta cut
534  if(dEta<0.05)
535  {
536  fhConvDistEtaCutEta ->Fill(calo->Eta(), convDist , GetEventWeight());
537  fhConvDistEtaCutEta ->Fill(calo2->Eta(),convDist2, GetEventWeight());
538  fhConvDistEnCutEta ->Fill(calo->E(), convDist , GetEventWeight());
539  fhConvDistEnCutEta ->Fill(calo2->E(), convDist2, GetEventWeight());
540  fhConvDistMassCutEta->Fill(pairM, convDist, GetEventWeight());
541  //mass cut
542  if(pairM<0.01)
543  {//10 MeV
544  fhConvDistEtaCutMass ->Fill(calo ->Eta(), convDist , GetEventWeight());
545  fhConvDistEtaCutMass ->Fill(calo2->Eta(), convDist2, GetEventWeight());
546  fhConvDistEnCutMass ->Fill(calo ->E(), convDist , GetEventWeight());
547  fhConvDistEnCutMass ->Fill(calo2->E(), convDist2, GetEventWeight());
548  // asymmetry cut
549  if(asymmetry<0.1)
550  {
551  fhConvDistEtaCutAsy ->Fill(calo ->Eta(), convDist , GetEventWeight());
552  fhConvDistEtaCutAsy ->Fill(calo2->Eta(), convDist2, GetEventWeight());
553  fhConvDistEnCutAsy ->Fill(calo ->E(), convDist , GetEventWeight());
554  fhConvDistEnCutAsy ->Fill(calo2->E(), convDist2, GetEventWeight());
555  }// asymmetry cut
556  }// mass cut
557  }// dEta cut
558 
559  //...............................................
560  // Select pairs in a eta-phi window
561  if(TMath::Abs(dEta) < fConvDEtaCut &&
562  TMath::Abs(dPhi) < fConvDPhiMaxCut &&
563  TMath::Abs(dPhi) > fConvDPhiMinCut &&
564  asymmetry < fConvAsymCut )
565  {
566  indexConverted[iaod] = kTRUE;
567  indexConverted[jaod] = kTRUE;
568  bConverted = kTRUE;
569  }
570  //printf("Accepted? %d\n",bConverted);
571  //...........................................
572  // Fill more histograms, simulated data
573  // FIXME, move all this to MakeAnalysisFillHistograms ...
574  if(IsDataMC())
575  {
576  // Check the origin of the pair, look for conversion, antinucleons or jet correlations (strings)
577  Int_t ancPDG = 0;
578  Int_t ancStatus = 0;
579  Int_t ancLabel = GetMCAnalysisUtils()->CheckCommonAncestor(cluster1->GetLabel(), cluster2->GetLabel(),
580  GetReader(), ancPDG, ancStatus, fMomentum, fProdVertex);
581 
582  // printf("AliAnaPhotonConvInCalo::MakeAnalysisFillHistograms() - Common ancestor label %d, pdg %d, name %s, status %d; \n",
583  // ancLabel,ancPDG,TDatabasePDG::Instance()->GetParticle(ancPDG)->GetName(),ancStatus);
584 
585  Int_t tag1 = calo ->GetTag();
586  Int_t tag2 = calo2->GetTag();
588  {
589  if(GetMCAnalysisUtils()->CheckTagBit(tag2,AliMCAnalysisUtils::kMCConversion) && (ancPDG==22 || TMath::Abs(ancPDG)==11) && ancLabel > -1)
590  {
591  fhConvDeltaEtaMCConversion ->Fill( pairM, dEta , GetEventWeight());
592  fhConvDeltaPhiMCConversion ->Fill( pairM, dPhi , GetEventWeight());
593  fhConvAsymMCConversion ->Fill( pairM, asymmetry, GetEventWeight());
594  fhConvDeltaEtaPhiMCConversion->Fill( dEta , dPhi , GetEventWeight());
595  fhConvPtMCConversion ->Fill( pairM, calo->Pt()+calo2->Pt(), GetEventWeight());
596  fhConvDispersionMCConversion ->Fill( cluster1->GetDispersion(), cluster2->GetDispersion(), GetEventWeight());
597  fhConvM02MCConversion ->Fill( cluster1->GetM02(), cluster2->GetM02(), GetEventWeight());
598  fhConvDistMCConversion ->Fill( convDist , fProdVertex.Mag(), GetEventWeight());
599  fhConvDistMCConversion ->Fill( convDist2, fProdVertex.Mag(), GetEventWeight());
600 
601  if(dEta<0.05 && pairM<0.01 && asymmetry<0.1)
602  {
603  fhConvDistMCConversionCuts->Fill( convDist , fProdVertex.Mag(), GetEventWeight());
604  fhConvDistMCConversionCuts->Fill( convDist2, fProdVertex.Mag(), GetEventWeight());
605  }
606 
607  }
608  }
610  {
611  if(GetMCAnalysisUtils()->CheckTagBit(tag2,AliMCAnalysisUtils::kMCAntiNeutron) && ancPDG==-2112 && ancLabel > -1)
612  {
613  fhConvDeltaEtaMCAntiNeutron ->Fill( pairM, dEta , GetEventWeight());
614  fhConvDeltaPhiMCAntiNeutron ->Fill( pairM, dPhi , GetEventWeight());
615  fhConvAsymMCAntiNeutron ->Fill( pairM, asymmetry, GetEventWeight());
616  fhConvDeltaEtaPhiMCAntiNeutron ->Fill( dEta , dPhi , GetEventWeight());
617  fhConvPtMCAntiNeutron ->Fill( pairM, calo->Pt()+calo2->Pt(), GetEventWeight());
618  fhConvDispersionMCAntiNeutron ->Fill( cluster1->GetDispersion(), cluster2->GetDispersion(), GetEventWeight());
619  fhConvM02MCAntiNeutron ->Fill( cluster1->GetM02(), cluster2->GetM02(), GetEventWeight());
620  }
621  }
623  {
624  if(GetMCAnalysisUtils()->CheckTagBit(tag2,AliMCAnalysisUtils::kMCAntiProton) && ancPDG==-2212 && ancLabel > -1)
625  {
626  fhConvDeltaEtaMCAntiProton ->Fill( pairM, dEta , GetEventWeight());
627  fhConvDeltaPhiMCAntiProton ->Fill( pairM, dPhi , GetEventWeight());
628  fhConvAsymMCAntiProton ->Fill( pairM, asymmetry, GetEventWeight());
629  fhConvDeltaEtaPhiMCAntiProton ->Fill( dEta , dPhi , GetEventWeight());
630  fhConvPtMCAntiProton ->Fill( pairM, calo->Pt()+calo2->Pt(), GetEventWeight());
631  fhConvDispersionMCAntiProton ->Fill( cluster1->GetDispersion(), cluster2->GetDispersion(), GetEventWeight());
632  fhConvM02MCAntiProton ->Fill( cluster1->GetM02(), cluster2->GetM02(), GetEventWeight());
633  }
634  }
635 
636  // Pairs coming from fragmenting pairs.
637  if( ancPDG < 22 && ancLabel > 7 && (ancStatus == 11 || ancStatus == 12) )
638  {
639  fhConvDeltaEtaMCString ->Fill( pairM, dPhi, GetEventWeight());
640  fhConvDeltaPhiMCString ->Fill( pairM, dPhi, GetEventWeight());
641  fhConvAsymMCString ->Fill( pairM, TMath::Abs(calo->E()-calo2->E())/(calo->E()+calo2->E()), GetEventWeight());
642  fhConvDeltaEtaPhiMCString ->Fill( dEta, dPhi, GetEventWeight());
643  fhConvPtMCString ->Fill( pairM, calo->Pt()+calo2->Pt(), GetEventWeight());
644  fhConvDispersionMCString ->Fill( cluster1->GetDispersion(), cluster2->GetDispersion(), GetEventWeight());
645  fhConvM02MCString ->Fill( cluster1->GetM02(), cluster2->GetM02(), GetEventWeight());
646  }
647 
648  }// Data MC
649 
650  break;
651  }
652 
653  } // Mass loop
654 
655  //..........................................................................................................
656  //Pair selected as converted, remove both clusters or recombine them into a photon and put them in the AOD
657  if(bConverted)
658  {
659  // Add to AOD
661  {
662  // Create AOD of pair analysis
663  fMomentum = *(calo->Momentum())+*(calo2->Momentum());
664  AliAODPWG4Particle aodpair = AliAODPWG4Particle(fMomentum);
665  aodpair.SetLabel(calo->GetLabel());
666 
667  //printf("Index %d, Id %d\n",iaod, calo->GetID());
668 
669  // Set the indeces of the original caloclusters
670  aodpair.SetCaloLabel(calo->GetCaloLabel(0),id2);
671  aodpair.SetDetectorTag(calo->GetDetectorTag());
672  aodpair.SetIdentifiedParticleType(calo->GetIdentifiedParticleType());
673  aodpair.SetTag(calo ->GetTag());
674  aodpair.SetTagged(kTRUE);
675 
676  // Add AOD with pair object to aod branch
677  AddAODParticle(aodpair);
678  //printf("\t \t both added pair\n");
679  }
680 
681  // Do not add the current calocluster
683  {
684  //printf("TAGGED\n");
685 
686  // Tag this cluster as likely conversion
687  calo->SetTagged(kTRUE);
688  }
689  } // converted pair
690 
691  }// main loop
692 
693  // Remove entries identified as conversion electrons
694  // Revise if this is OK
696  {
697  for(Int_t iaod = 0; iaod < naod ; iaod++)
698  {
699  if(indexConverted[iaod])GetOutputAODBranch()->RemoveAt(iaod);
700  }
701  GetOutputAODBranch()->Compress();
702  }
703 
704  delete [] indexConverted;
705 
706  AliDebug(1,Form("End fill AODs, with %d entries",GetOutputAODBranch()->GetEntriesFast()));
707 }
708 
709 //________________________________________________________
711 //________________________________________________________
713 {
714  //-------------------------------------------------------------------
715  // Access MC information in stack if requested, check that it exists.
716  AliStack * stack = 0x0;
717  TParticle * primary = 0x0;
718  TClonesArray * mcparticles = 0x0;
719  AliAODMCParticle * aodprimary = 0x0;
720 
721  if(IsDataMC())
722  {
723  if(GetReader()->ReadStack())
724  {
725  stack = GetMCStack() ;
726  if(!stack)
727  {
728  AliFatal("Stack not available, is the MC handler called? STOP");
729  return;
730  }
731  }
732  else if(GetReader()->ReadAODMCParticles())
733  {
734  //Get the list of MC particles
735  mcparticles = GetReader()->GetAODMCParticles();
736  if(!mcparticles)
737  {
738  AliFatal("Standard MCParticles not available!");
739  return;
740  }
741  }
742  }// is data and MC
743 
744  //----------------------------------
745  // Loop on stored AOD photons
746  Int_t naod = GetOutputAODBranch()->GetEntriesFast();
747  AliDebug(1,Form("AOD branch entries %d", naod));
748 
749  for(Int_t iaod = 0; iaod < naod ; iaod++)
750  {
751  AliAODPWG4Particle* ph = (AliAODPWG4Particle*) (GetOutputAODBranch()->At(iaod));
752  //Int_t pdg = ph->GetIdentifiedParticleType();
753 
754  if(ph->IsTagged())
755  {
756  AliDebug(2,Form("ID Photon: pt %f, phi %f, eta %f", ph->Pt(),ph->Phi(),ph->Eta())) ;
757  //................................
758  //Fill photon histograms
759  Float_t ptcluster = ph->Pt();
760  Float_t phicluster = ph->Phi();
761  Float_t etacluster = ph->Eta();
762  Float_t ecluster = ph->E();
763 
764  fhPtPhotonConv->Fill(ptcluster, GetEventWeight());
765  if(ecluster > 0.5) fhEtaPhiPhotonConv ->Fill(etacluster, phicluster, GetEventWeight());
766  else if(GetMinPt() < 0.5) fhEtaPhi05PhotonConv->Fill(etacluster, phicluster, GetEventWeight());
767 
768  //.......................................
769  // Play with the MC data if available
770  if(IsDataMC())
771  {
772  //....................................................................
773  // Access MC information in stack if requested, check that it exists.
774  Int_t label =ph->GetLabel();
775  if(label < 0)
776  {
777  AliDebug(1,Form("*** bad label ***: label %d", label));
778  continue;
779  }
780 
781  //Float_t eprim = 0;
782  //Float_t ptprim = 0;
783  if(GetReader()->ReadStack())
784  {
785  if(label >= stack->GetNtrack())
786  {
787  AliDebug(1,Form("*** large label ***: label %d, n tracks %d", label, stack->GetNtrack()));
788  continue ;
789  }
790 
791  primary = stack->Particle(label);
792  if(!primary)
793  {
794  AliDebug(1,Form("*** no primary ***: label %d", label));
795  continue;
796  }
797  //eprim = primary->Energy();
798  //ptprim = primary->Pt();
799 
800  }
801  else if(GetReader()->ReadAODMCParticles())
802  {
803  if(label >= mcparticles->GetEntriesFast())
804  {
805  AliDebug(2,Form("*** large label ***: label %d, n tracks %d",label, mcparticles->GetEntriesFast()));
806  continue ;
807  }
808 
809  // Get the particle
810  aodprimary = (AliAODMCParticle*) mcparticles->At(label);
811 
812  if(!aodprimary)
813  {
814  AliDebug(2,Form("*** no primary ***: label %d", label));
815  continue;
816  }
817 
818  //eprim = aodprimary->E();
819  //ptprim = aodprimary->Pt();
820 
821  }
822 
823  Int_t tag =ph->GetTag();
824 
825  if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton))
826  {
828  {
829  fhPtConversionTagged ->Fill(ptcluster, GetEventWeight());
830  }
831  }
832  else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCAntiNeutron))
833  {
834  fhPtAntiNeutronTagged ->Fill(ptcluster, GetEventWeight());
835  }
836  else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCAntiProton))
837  {
838  fhPtAntiProtonTagged ->Fill(ptcluster, GetEventWeight());
839  }
840  else
841  {
842  fhPtUnknownTagged ->Fill(ptcluster, GetEventWeight());
843  }
844 
845  } // Histograms with MC
846  } // tagged by conversion
847  } // aod loop
848 }
849 
850 //____________________________________________________________
852 //____________________________________________________________
853 void AliAnaPhotonConvInCalo::Print(const Option_t * opt) const
854 {
855  if(! opt)
856  return;
857 
858  printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;
860 
861  printf("Add conversion pair to AOD = %d\n",fAddConvertedPairsToAOD);
862  printf("Conversion pair mass cut = %f\n",fMassCut);
863  printf("Conversion selection cut : A < %1.2f; %1.3f < Dphi < %1.3f; Deta < %1.3f\n",
865 
866  printf(" \n") ;
867 }
868 
Float_t GetHistoPtMax() const
TH2F * fhConvDeltaEtaPhi
! Small mass photons, correlation in phi and eta
TH2F * fhConvDeltaEtaMCAntiNeutron
! Small mass cluster pairs, correlation in eta, origin of both clusters is anti neutron ...
TH2F * fhConvM02MCAntiProton
! Small mass cluster pairs, m02 of cluster 1 vs cluster 2, origin of both clusters is anti proton ...
ClassImp(AliAnalysisTaskTriggerRates) AliAnalysisTaskTriggerRates
TH2F * fhConvDistMassCutEta
! Approx distance to vertex vs Mass, dEta < 0.05
Float_t GetHistoPtMin() const
Float_t fConvDPhiMaxCut
Select conversion pairs when dphi of pair smaller than cut.
Float_t fConvDPhiMinCut
Select conversion pairs when dphi of pair lager than cut.
virtual void AddToHistogramsName(TString add)
TH2F * fhConvM02MCAntiNeutron
! Small mass cluster pairs, m02 of cluster 1 vs cluster 2, origin of both clusters is anti neutron ...
TH2F * fhConvDistMCConversionCuts
! Calculated conversion distance vs real distance to vertex
Bool_t fRemoveConvertedPair
Remove conversion pairs.
Float_t fConvDEtaCut
Select conversion pairs when deta of pair smaller than cut.
TH2F * fhConvM02MCConversion
! Small mass cluster pairs, m02 of cluster 1 vs cluster 2
TH2F * fhConvDispersionMCAntiProton
! Small mass cluster pairs, dispersion of cluster 1 vs cluster 2, origin of both clusters is anti pro...
TH2F * fhConvDeltaEtaMCConversion
! Small mass cluster pairs, correlation in eta, origin of both clusters is conversion ...
TH2F * fhConvPt
! Small mass photons, pT of pair
TH2F * fhConvDeltaPhiMCConversion
! Small mass cluster pairs, correlation in phi, origin of both clusters is conversion ...
TH2F * fhConvDistEta
! Approx distance to vertex vs cluster Eta
Int_t GetHistoPhiBins() const
TH1F * fhPtAntiNeutronTagged
! Number of identified gamma from AntiNeutrons gamma, tagged as conversion
virtual TClonesArray * GetOutputAODBranch() const
TH2F * fhConvDeltaEta
! Small mass photons, correlation in eta
Float_t GetHistoPhiMin() const
TH2F * fhConvAsymMCString
! Small mass cluster pairs, correlation in energy asymmetry, origin of both clusters is string ...
TH2F * fhConvPtMCConversion
! Small mass cluster pairs, pt of pair, origin of both clusters is conversion
TH2F * fhConvAsym
! Small mass photons, correlation in energy asymmetry
Int_t GetModuleNumber(AliAODPWG4Particle *particle, AliVEvent *inputEvent) const
Get the EMCAL/PHOS module number that corresponds to this particle.
TH2F * fhConvDeltaEtaMCString
! Small mass cluster pairs, correlation in eta, origin of both clusters is string ...
TH2F * fhConvDistEtaCutAsy
! Approx distance to vertex vs cluster Eta, dEta < 0.05, m < 10 MeV, A < 0.1
Base class for CaloTrackCorr analysis algorithms.
TH2F * fhConvDeltaPhi
! Small mass photons, correlation in phi
TH2F * fhConvDeltaPhiMCAntiProton
! Small mass cluster pairs, correlation in phi, origin of both clusters is anti proton ...
TH1F * fhPtUnknownTagged
! Number of identified gamma from unknown, tagged as conversion
TH2F * fhConvDistEtaCutEta
! Approx distance to vertex vs cluster Eta, dEta < 0.05
void InitParameters()
Initialize the parameters of the analysis.
TObjString * GetAnalysisCuts()
Save parameters used for analysis.
TH1F * fhPtPhotonConv
! Number of identified photon vs transerse momentum
TH2F * fhConvDistEnCutAsy
! Approx distance to vertex vs energy, dEta < 0.05, m < 10 MeV, A < 0.1
TH2F * fhConvPtMCAntiNeutron
! Small mass cluster pairs, pt of pair, origin of both clusters is anti neutron
virtual TClonesArray * GetAODMCParticles() const
virtual AliHistogramRanges * GetHistogramRanges()
void MakeAnalysisFillAOD()
Do conversion photon analysis and fill aods.
TH2F * fhConvDistEnCutEta
! Approx distance to vertex vs Energy, dEta < 0.05
TH2F * fhConvDeltaEtaPhiMCAntiProton
! Small mass cluster pairs, correlation in eta-phi, origin of both clusters is anti proton ...
TH2F * fhConvPtMCString
! Small mass cluster pairs, pt of pairs, origin of both clusters is string
Int_t CheckCommonAncestor(Int_t index1, Int_t index2, const AliCaloTrackReader *reader, Int_t &ancPDG, Int_t &ancStatus, TLorentzVector &momentum, TVector3 &v)
TH2F * fhConvDispersionMCAntiNeutron
! Small mass cluster pairs, dispersion of cluster 1 vs cluster 2, origin of both clusters is anti neu...
TH2F * fhConvDistMass
! Approx distance to vertex vs Mass
TH2F * fhConvDeltaPhiMCAntiNeutron
! Small mass cluster pairs, correlation in phi, origin of both clusters is anti neutron ...
TH1F * fhPtConversionTagged
! Number of identified gamma from Conversion , tagged as conversion
virtual AliCalorimeterUtils * GetCaloUtils() const
TH2F * fhConvDeltaEtaPhiMCConversion
! Small mass cluster pairs, correlation in eta-phi, origin of both clusters is conversion ...
void MakeAnalysisFillHistograms()
Fill histograms for selected pairs.
AliAnaPhotonConvInCalo()
Default constructor. Initialize parameters.
TH2F * fhConvDispersionMCString
! Small mass cluster pairs, dispersion of cluster 1 vs cluster 2, origin of both clusters is string ...
TH2F * fhConvDeltaEtaPhiMCString
! Small mass cluster pairs, correlation in eta-phi, origin of both clusters is string ...
TH2F * fhConvDistEn
! Approx distance to vertex vs Energy
TH2F * fhConvDispersionMCConversion
! Small mass cluster pairs, dispersion of cluster 1 vs cluster 2
virtual Double_t GetEventWeight() const
virtual TObjArray * GetPHOSClusters() const
Float_t GetHistoEtaMin() const
TH2F * fhConvDistMCConversion
! Calculated conversion distance vs real distance to vertex
TH2F * fhConvDeltaEtaMCAntiProton
! Small mass cluster pairs, correlation in eta, origin of both clusters is anti proton ...
TH1F * fhPtAntiProtonTagged
! Number of identified gamma from AntiProtons gamma, tagged as conversion
TH2F * fhConvPtMCAntiProton
! Small mass cluster pairs, pt of pairs, origin of both clusters is anti proton
TH2F * fhConvDistEtaCutMass
! Approx distance to vertex vs cluster Eta, dEta < 0.05, m < 10 MeV
TH2F * fhConvAsymMCAntiProton
! Small mass cluster pairs, correlation in energy asymmetry, origin of both clusters is anti proton ...
Float_t GetHistoEtaMax() const
virtual void AddAODParticle(AliAODPWG4Particle part)
Int_t GetHistoPtBins() const
TH2F * fhConvM02MCString
! Small mass cluster pairs, m02 of cluster 1 vs cluster 2, origin of both clusters is string ...
Bool_t fAddConvertedPairsToAOD
Put Converted pairs in AOD.
TLorentzVector fMomentum
! Cluster momentum
TH2F * fhConvAsymMCAntiNeutron
! Small mass cluster pairs, correlation in energy asymmetry, origin of both clusters is anti neutron ...
Conversions pairs clusters analysis.
virtual AliMCAnalysisUtils * GetMCAnalysisUtils()
TVector3 fProdVertex
! Production vertex
Float_t fConvAsymCut
Select conversion pairs when asymmetry is smaller than cut.
virtual void Print(const Option_t *) const
Print some relevant parameters set for the analysis.
TH2F * fhConvAsymMCConversion
! Small mass cluster pairs, correlation in energy asymmetry, origin of both clusters is conversion ...
Float_t fMassCut
Mass cut for the conversion pairs selection.
virtual AliVCluster * FindCluster(TObjArray *clusters, Int_t clId, Int_t &iclus, Int_t first=0)
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
Float_t GetHistoPhiMax() const
virtual AliCaloTrackReader * GetReader() const
Int_t GetHistoEtaBins() const
TH2F * fhConvDistEnCutMass
! Approx distance to vertex vs Energy, dEta < 0.05, m < 10 MeV
virtual TObjArray * GetEMCALClusters() const
TH2F * fhEtaPhi05PhotonConv
! Pseudorapidity vs Phi of identified photon for transerse momentum < 0.5, for converted ...
Bool_t CheckTagBit(Int_t tag, UInt_t test) const
TH2F * fhEtaPhiPhotonConv
! Pseudorapidity vs Phi of identified photon for transerse momentum > 0.5, for converted ...
TH2F * fhConvDeltaEtaPhiMCAntiNeutron
! Small mass cluster pairs, correlation in eta-phi, origin of both clusters is anti neutron ...
TH2F * fhConvDeltaPhiMCString
! Small mass cluster pairs, correlation in phi, origin of both clusters is string ...