1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Authors: Friederike Bock, Baldo Sahlmueller *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 ////////////////////////////////////////////////
17 //---------------------------------------------
18 // Class handling all kinds of selection cuts for
19 // Photon from EMCAL clusters
20 //---------------------------------------------
21 ////////////////////////////////////////////////
23 #include "AliCaloPhotonCuts.h"
24 #include "AliAnalysisManager.h"
25 #include "AliInputEventHandler.h"
26 #include "AliMCEventHandler.h"
27 #include "AliAODHandler.h"
32 #include "AliAODConversionMother.h"
33 #include "TObjString.h"
34 #include "AliAODEvent.h"
35 #include "AliESDEvent.h"
36 #include "AliCentrality.h"
40 #include "AliV0ReaderV1.h"
41 #include "AliAODMCParticle.h"
42 #include "AliAODMCHeader.h"
43 #include "AliPicoTrack.h"
49 ClassImp(AliCaloPhotonCuts)
52 const char* AliCaloPhotonCuts::fgkCutNames[AliCaloPhotonCuts::kNCuts] = {
53 "ClusterType", //0 0: all, 1: EMCAL, 2: PHOS
54 "EtaMin", //1 0: -10, 1: -0.6687, 2: -0,5, 3: -2
55 "EtaMax", //2 0: 10, 1: 0.66465, 2: 0.5, 3: 2
56 "PhiMin", //3 0: -10000, 1: 1.39626
57 "PhiMax", //4 0: 10000, 1: 3.125
58 "DistanceToBadChannel", //5 0: 0, 1: 5
59 "Timing", //6 0: no cut
60 "TrackMatching", //7 0: 0, 1: 5
61 "ExoticCell", //8 0: no cut
62 "MinEnergy", //9 0: no cut, 1: 0.05, 2: 0.1, 3: 0.15, 4: 0.2, 5: 0.3, 6: 0.5, 7: 0.75, 8: 1, 9: 1.25 (all GeV)
63 "MinNCells", //10 0: no cut, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6
68 "MaximumDispersion", //15
73 //________________________________________________________________________
74 AliCaloPhotonCuts::AliCaloPhotonCuts(const char *name,const char *title) :
75 AliAnalysisCuts(name,title),
84 fMinDistanceToBadChannel(0),
85 fUseDistanceToBadChannel(0),
88 fMinDistTrackToCluster(0),
89 fUseDistTrackToCluster(0),
102 fMaxDispersion(1000),
109 fHistAcceptanceCuts(NULL),
110 fHistClusterIdentificationCuts(NULL),
111 fHistClusterEtavsPhiBeforeAcc(NULL),
112 fHistClusterEtavsPhiAfterAcc(NULL),
113 fHistClusterEtavsPhiAfterQA(NULL),
114 fHistDistanceToBadChannelBeforeAcc(NULL),
115 fHistDistanceToBadChannelAfterAcc(NULL),
116 fHistClusterTimevsEBeforeQA(NULL),
117 fHistClusterTimevsEAfterQA(NULL),
118 fHistExoticCellBeforeQA(NULL),
119 fHistExoticCellAfterQA(NULL),
120 fHistNMatchedTracks(NULL),
121 fHistDistanceTrackToClusterBeforeQA(NULL),
122 fHistDistanceTrackToClusterAfterQA(NULL),
123 fHistEnergyOfClusterBeforeQA(NULL),
124 fHistEnergyOfClusterAfterQA(NULL),
125 fHistNCellsBeforeQA(NULL),
126 fHistNCellsAfterQA(NULL),
127 fHistM02BeforeQA(NULL),
128 fHistM02AfterQA(NULL),
129 fHistM20BeforeQA(NULL),
130 fHistM20AfterQA(NULL),
131 fHistDispersionBeforeQA(NULL),
132 fHistDispersionAfterQA(NULL),
133 fHistNLMBeforeQA(NULL),
134 fHistNLMAfterQA(NULL)
136 for(Int_t jj=0;jj<kNCuts;jj++){fCuts[jj]=0;}
137 fCutString=new TObjString((GetCutNumber()).Data());
140 //________________________________________________________________________
141 AliCaloPhotonCuts::AliCaloPhotonCuts(const AliCaloPhotonCuts &ref) :
142 AliAnalysisCuts(ref),
144 fClusterType(ref.fClusterType),
145 fMinEtaCut(ref.fMinEtaCut),
146 fMaxEtaCut(ref.fMaxEtaCut),
147 fUseEtaCut(ref.fUseEtaCut),
148 fMinPhiCut(ref.fMinPhiCut),
149 fMaxPhiCut(ref.fMaxPhiCut),
150 fUsePhiCut(ref.fUsePhiCut),
151 fMinDistanceToBadChannel(ref.fMinDistanceToBadChannel),
152 fUseDistanceToBadChannel(ref.fUseDistanceToBadChannel),
153 fMaxTimeDiff(ref.fMaxTimeDiff),
154 fUseTimeDiff(ref.fUseTimeDiff),
155 fMinDistTrackToCluster(ref.fMinDistTrackToCluster),
156 fUseDistTrackToCluster(ref.fUseDistTrackToCluster),
157 fExoticCell(ref.fExoticCell),
158 fUseExoticCell(ref.fUseExoticCell),
159 fMinEnergy(ref.fMinEnergy),
160 fUseMinEnergy(ref.fUseMinEnergy),
161 fMinNCells(ref.fMinNCells),
162 fUseNCells(ref.fUseNCells),
163 fMaxM02(ref.fMaxM02),
164 fMinM02(ref.fMinM02),
165 fUseM02(ref.fUseM02),
166 fMaxM20(ref.fMaxM20),
167 fMinM20(ref.fMinM20),
168 fUseM20(ref.fUseDispersion),
169 fMaxDispersion(ref.fMaxDispersion),
170 fUseDispersion(ref.fUseDispersion),
171 fMinNLM(ref.fMinNLM),
172 fMaxNLM(ref.fMaxNLM),
173 fUseNLM(ref.fUseNLM),
176 fHistAcceptanceCuts(NULL),
177 fHistClusterIdentificationCuts(NULL),
178 fHistClusterEtavsPhiBeforeAcc(NULL),
179 fHistClusterEtavsPhiAfterAcc(NULL),
180 fHistClusterEtavsPhiAfterQA(NULL),
181 fHistDistanceToBadChannelBeforeAcc(NULL),
182 fHistDistanceToBadChannelAfterAcc(NULL),
183 fHistClusterTimevsEBeforeQA(NULL),
184 fHistClusterTimevsEAfterQA(NULL),
185 fHistExoticCellBeforeQA(NULL),
186 fHistExoticCellAfterQA(NULL),
187 fHistNMatchedTracks(NULL),
188 fHistDistanceTrackToClusterBeforeQA(NULL),
189 fHistDistanceTrackToClusterAfterQA(NULL),
190 fHistEnergyOfClusterBeforeQA(NULL),
191 fHistEnergyOfClusterAfterQA(NULL),
192 fHistNCellsBeforeQA(NULL),
193 fHistNCellsAfterQA(NULL),
194 fHistM02BeforeQA(NULL),
195 fHistM02AfterQA(NULL),
196 fHistM20BeforeQA(NULL),
197 fHistM20AfterQA(NULL),
198 fHistDispersionBeforeQA(NULL),
199 fHistDispersionAfterQA(NULL),
200 fHistNLMBeforeQA(NULL),
201 fHistNLMAfterQA(NULL)
204 for(Int_t jj=0;jj<kNCuts;jj++){fCuts[jj]=ref.fCuts[jj];}
205 fCutString=new TObjString((GetCutNumber()).Data());
210 //________________________________________________________________________
211 AliCaloPhotonCuts::~AliCaloPhotonCuts() {
213 //Deleting fHistograms leads to seg fault it it's added to output collection of a task
215 // delete fHistograms;
216 // fHistograms = NULL;
217 if(fCutString != NULL){
223 //________________________________________________________________________
224 void AliCaloPhotonCuts::InitCutHistograms(TString name){
226 // Initialize Cut Histograms for QA (only initialized and filled if function is called)
227 TH1::AddDirectory(kFALSE);
229 if(fHistograms != NULL){
233 if(fHistograms==NULL){
234 fHistograms=new TList();
235 fHistograms->SetOwner(kTRUE);
236 if(name=="")fHistograms->SetName(Form("CaloCuts_%s",GetCutNumber().Data()));
237 else fHistograms->SetName(Form("%s_%s",name.Data(),GetCutNumber().Data()));
241 fHistCutIndex=new TH1F(Form("IsPhotonSelected %s",GetCutNumber().Data()),"IsPhotonSelected",5,-0.5,4.5);
242 fHistCutIndex->GetXaxis()->SetBinLabel(kPhotonIn+1,"in");
243 fHistCutIndex->GetXaxis()->SetBinLabel(kDetector+1,"detector");
244 fHistCutIndex->GetXaxis()->SetBinLabel(kAcceptance+1,"acceptance");
245 fHistCutIndex->GetXaxis()->SetBinLabel(kClusterQuality+1,"cluster QA");
246 fHistCutIndex->GetXaxis()->SetBinLabel(kPhotonOut+1,"out");
247 fHistograms->Add(fHistCutIndex);
250 fHistAcceptanceCuts=new TH1F(Form("AcceptanceCuts %s",GetCutNumber().Data()),"AcceptanceCuts",5,-0.5,4.5);
251 fHistAcceptanceCuts->GetXaxis()->SetBinLabel(1,"in");
252 fHistAcceptanceCuts->GetXaxis()->SetBinLabel(2,"eta");
253 fHistAcceptanceCuts->GetXaxis()->SetBinLabel(3,"phi");
254 fHistAcceptanceCuts->GetXaxis()->SetBinLabel(4,"distance to bad channel");
255 fHistAcceptanceCuts->GetXaxis()->SetBinLabel(5,"out");
256 fHistograms->Add(fHistAcceptanceCuts);
259 fHistClusterIdentificationCuts =new TH1F(Form("ClusterQualityCuts %s",GetCutNumber().Data()),"ClusterQualityCuts",11,-0.5,10.5);
260 fHistClusterIdentificationCuts->GetXaxis()->SetBinLabel(1,"in");
261 fHistClusterIdentificationCuts->GetXaxis()->SetBinLabel(2,"timing");
262 fHistClusterIdentificationCuts->GetXaxis()->SetBinLabel(3,"track matching");
263 fHistClusterIdentificationCuts->GetXaxis()->SetBinLabel(4,"Exotics");
264 fHistClusterIdentificationCuts->GetXaxis()->SetBinLabel(5,"minimum energy");
265 fHistClusterIdentificationCuts->GetXaxis()->SetBinLabel(6,"minimum NCells");
266 fHistClusterIdentificationCuts->GetXaxis()->SetBinLabel(7,"M02");
267 fHistClusterIdentificationCuts->GetXaxis()->SetBinLabel(8,"M20");
268 fHistClusterIdentificationCuts->GetXaxis()->SetBinLabel(9,"dispersion");
269 fHistClusterIdentificationCuts->GetXaxis()->SetBinLabel(10,"NLM");
270 fHistClusterIdentificationCuts->GetXaxis()->SetBinLabel(11,"out");
271 fHistograms->Add(fHistClusterIdentificationCuts);
273 // Acceptance related histogramms
274 fHistClusterEtavsPhiBeforeAcc=new TH2F(Form("EtaPhi_beforeAcceptance %s",GetCutNumber().Data()),"EtaPhi_beforeAcceptance",462,-TMath::Pi(),TMath::Pi(),110,-0.7,0.7);
275 fHistograms->Add(fHistClusterEtavsPhiBeforeAcc);
276 fHistClusterEtavsPhiAfterAcc=new TH2F(Form("EtaPhi_afterAcceptance %s",GetCutNumber().Data()),"EtaPhi_afterAcceptance",462,-TMath::Pi(),TMath::Pi(),110,-0.7,0.7);
277 fHistograms->Add(fHistClusterEtavsPhiAfterAcc);
278 fHistClusterEtavsPhiAfterQA=new TH2F(Form("EtaPhi_afterClusterQA %s",GetCutNumber().Data()),"EtaPhi_afterClusterQA",462,-TMath::Pi(),TMath::Pi(),110,-0.7,0.7);
279 fHistograms->Add(fHistClusterEtavsPhiAfterQA);
280 fHistDistanceToBadChannelBeforeAcc = new TH1F(Form("DistanceToBadChannel_beforeAcceptance %s",GetCutNumber().Data()),"DistanceToBadChannel_beforeAcceptance",200,0,40);
281 fHistograms->Add(fHistDistanceToBadChannelBeforeAcc);
282 fHistDistanceToBadChannelAfterAcc = new TH1F(Form("DistanceToBadChannel_afterAcceptance %s",GetCutNumber().Data()),"DistanceToBadChannel_afterAcceptance",200,0,40);
283 fHistograms->Add(fHistDistanceToBadChannelAfterAcc);
285 // Cluster quality related histograms
286 fHistClusterTimevsEBeforeQA=new TH2F(Form("ClusterTimeVsE_beforeClusterQA %s",GetCutNumber().Data()),"ClusterTimeVsE_beforeClusterQA",400,-10e-6,10e-6,100,0.,40);
287 fHistograms->Add(fHistClusterTimevsEBeforeQA);
288 fHistClusterTimevsEAfterQA=new TH2F(Form("ClusterTimeVsE_afterClusterQA %s",GetCutNumber().Data()),"ClusterTimeVsE_afterClusterQA",400,-10e-6,10e-6,100,0.,40);
289 fHistograms->Add(fHistClusterTimevsEAfterQA);
290 fHistExoticCellBeforeQA=new TH2F(Form("ExoticCell_beforeClusterQA %s",GetCutNumber().Data()),"ExoticCell_beforeClusterQA",400,0,40,50,0.75,1);
291 fHistograms->Add(fHistExoticCellBeforeQA);
292 fHistExoticCellAfterQA=new TH2F(Form("ExoticCell_afterClusterQA %s",GetCutNumber().Data()),"ExoticCell_afterClusterQA",400,0,40,50,0.75,1);
293 fHistograms->Add(fHistExoticCellAfterQA);
294 fHistNMatchedTracks = new TH1F(Form("NMatchedTracks_%s",GetCutNumber().Data()),"NMatchedTracks",22,-1.5,20.5);
295 fHistograms->Add(fHistNMatchedTracks);
296 fHistDistanceTrackToClusterBeforeQA = new TH1F(Form("DistanceToTrack_beforeClusterQA %s",GetCutNumber().Data()),"DistanceToTrack_beforeClusterQA",200,0,2);
297 fHistograms->Add(fHistDistanceTrackToClusterBeforeQA);
298 fHistDistanceTrackToClusterAfterQA = new TH1F(Form("DistanceToTrack_afterClusterQA %s",GetCutNumber().Data()),"DistanceToTrack_afterClusterQA",200,0,2);
299 fHistograms->Add(fHistDistanceTrackToClusterAfterQA);
300 fHistEnergyOfClusterBeforeQA = new TH1F(Form("EnergyOfCluster_beforeClusterQA %s",GetCutNumber().Data()),"EnergyOfCluster_beforeClusterQA",300,0,30);
301 fHistograms->Add(fHistEnergyOfClusterBeforeQA);
302 fHistEnergyOfClusterAfterQA = new TH1F(Form("EnergyOfCluster_afterClusterQA %s",GetCutNumber().Data()),"EnergyOfCluster_afterClusterQA",300,0,30);
303 fHistograms->Add(fHistEnergyOfClusterAfterQA);
304 fHistNCellsBeforeQA = new TH1F(Form("NCellPerCluster_beforeClusterQA %s",GetCutNumber().Data()),"NCellPerCluster_beforeClusterQA",50,0,50);
305 fHistograms->Add(fHistNCellsBeforeQA);
306 fHistNCellsAfterQA = new TH1F(Form("NCellPerCluster_afterClusterQA %s",GetCutNumber().Data()),"NCellPerCluster_afterClusterQA",50,0,50);
307 fHistograms->Add(fHistNCellsAfterQA);
308 fHistM02BeforeQA = new TH1F(Form("M02_beforeClusterQA %s",GetCutNumber().Data()),"M02_beforeClusterQA",100,0,5);
309 fHistograms->Add(fHistM02BeforeQA);
310 fHistM02AfterQA = new TH1F(Form("M02_afterClusterQA %s",GetCutNumber().Data()),"M02_afterClusterQA",100,0,5);
311 fHistograms->Add(fHistM02AfterQA);
312 fHistM20BeforeQA = new TH1F(Form("M20_beforeClusterQA %s",GetCutNumber().Data()),"M20_beforeClusterQA",100,0,2.5);
313 fHistograms->Add(fHistM20BeforeQA);
314 fHistM20AfterQA = new TH1F(Form("M20_afterClusterQA %s",GetCutNumber().Data()),"M20_afterClusterQA",100,0,2.5);
315 fHistograms->Add(fHistM20AfterQA);
316 fHistDispersionBeforeQA = new TH1F(Form("Dispersion_beforeClusterQA %s",GetCutNumber().Data()),"Dispersion_beforeClusterQA",100,0,4);
317 fHistograms->Add(fHistDispersionBeforeQA);
318 fHistDispersionAfterQA = new TH1F(Form("Dispersion_afterClusterQA %s",GetCutNumber().Data()),"Dispersion_afterClusterQA",100,0,4);
319 fHistograms->Add(fHistDispersionAfterQA);
320 fHistNLMBeforeQA = new TH1F(Form("NLM_beforeClusterQA %s",GetCutNumber().Data()),"NLM_beforeClusterQA",10,0,10);
321 fHistograms->Add(fHistNLMBeforeQA);
322 fHistNLMAfterQA = new TH1F(Form("NLM_afterClusterQA %s",GetCutNumber().Data()),"NLM_afterClusterQA",10,0,10);
323 fHistograms->Add(fHistNLMAfterQA);
325 TH1::AddDirectory(kTRUE);
329 ///________________________________________________________________________
330 Bool_t AliCaloPhotonCuts::ClusterIsSelectedMC(TParticle *particle,AliStack *fMCStack,Bool_t checkForConvertedGamma){
331 // MonteCarlo Photon Selection
333 if(!fMCStack)return kFALSE;
335 if (particle->GetPdgCode() == 22){
338 if( particle->Eta() > (fEtaCut) || particle->Eta() < (-fEtaCut) )
341 if( particle->Eta() < (fEtaCutMin) && particle->Eta() > (-fEtaCutMin) )
345 if(particle->GetMother(0) >-1 && fMCStack->Particle(particle->GetMother(0))->GetPdgCode() == 22){
346 return kFALSE; // no photon as mothers!
349 if(particle->GetMother(0) >= fMCStack->GetNprimary()){
350 return kFALSE; // the gamma has a mother, and it is not a primary particle
353 if(!checkForConvertedGamma) return kTRUE; // return in case of accepted gamma
355 // looking for conversion gammas (electron + positron from pairbuilding (= 5) )
356 TParticle* ePos = NULL;
357 TParticle* eNeg = NULL;
359 if(particle->GetNDaughters() >= 2){
360 for(Int_t daughterIndex=particle->GetFirstDaughter();daughterIndex<=particle->GetLastDaughter();daughterIndex++){
361 TParticle *tmpDaughter = fMCStack->Particle(daughterIndex);
362 if(tmpDaughter->GetUniqueID() == 5){
363 if(tmpDaughter->GetPdgCode() == 11){
365 } else if(tmpDaughter->GetPdgCode() == -11){
372 if(ePos == NULL || eNeg == NULL){ // means we do not have two daughters from pair production
376 if(ePos->Pt()<fSinglePtCut || eNeg->Pt()<fSinglePtCut){
377 return kFALSE; // no reconstruction below the Pt cut
380 if( ePos->Eta() > (fEtaCut) || ePos->Eta() < (-fEtaCut) ||
381 eNeg->Eta() > (fEtaCut) || eNeg->Eta() < (-fEtaCut) )
384 if(fEtaCutMin > -0.1){
385 if( (ePos->Eta() < (fEtaCutMin) && ePos->Eta() > (-fEtaCutMin)) ||
386 (eNeg->Eta() < (fEtaCutMin) && eNeg->Eta() > (-fEtaCutMin)) )
391 return kFALSE; // cuts on distance from collision point
394 if(abs(ePos->Vz()) > fMaxZ){
395 return kFALSE; // outside material
397 if(abs(eNeg->Vz()) > fMaxZ){
398 return kFALSE; // outside material
401 if( ePos->R() <= ((abs(ePos->Vz()) * fLineCutZRSlope) - fLineCutZValue)){
402 return kFALSE; // line cut to exclude regions where we do not reconstruct
403 } else if ( fEtaCutMin != -0.1 && ePos->R() >= ((abs(ePos->Vz()) * fLineCutZRSlopeMin) - fLineCutZValueMin)){
407 if( eNeg->R() <= ((abs(eNeg->Vz()) * fLineCutZRSlope) - fLineCutZValue)){
408 return kFALSE; // line cut to exclude regions where we do not reconstruct
409 } else if ( fEtaCutMin != -0.1 && eNeg->R() >= ((abs(eNeg->Vz()) * fLineCutZRSlopeMin) - fLineCutZValueMin)){
414 //if(AcceptanceCut(particle,ePos,eNeg))return kTRUE;
418 ///________________________________________________________________________
419 Bool_t AliCaloPhotonCuts::ClusterIsSelectedAODMC(AliAODMCParticle *particle,TClonesArray *aodmcArray,Bool_t checkForConvertedGamma){
420 // MonteCarlo Photon Selection
422 if(!aodmcArray)return kFALSE;
424 if (particle->GetPdgCode() == 22){
425 if( particle->Eta() > (fEtaCut) || particle->Eta() < (-fEtaCut) )
428 if( particle->Eta() < (fEtaCutMin) && particle->Eta() > (-fEtaCutMin) )
432 if(particle->GetMother() > -1){
433 if((static_cast<AliAODMCParticle*>(aodmcArray->At(particle->GetMother())))->GetPdgCode() == 22){
434 return kFALSE; // no photon as mothers!
436 if(!(static_cast<AliAODMCParticle*>(aodmcArray->At(particle->GetMother()))->IsPrimary())){
437 return kFALSE; // the gamma has a mother, and it is not a primary particle
441 if(!checkForConvertedGamma) return kTRUE; // return in case of accepted gamma
443 // looking for conversion gammas (electron + positron from pairbuilding (= 5) )
444 AliAODMCParticle* ePos = NULL;
445 AliAODMCParticle* eNeg = NULL;
447 if(particle->GetNDaughters() >= 2){
448 for(Int_t daughterIndex=particle->GetDaughter(0);daughterIndex<=particle->GetDaughter(1);daughterIndex++){
449 AliAODMCParticle *tmpDaughter = static_cast<AliAODMCParticle*>(aodmcArray->At(daughterIndex));
450 if(!tmpDaughter) continue;
451 if(((tmpDaughter->GetMCProcessCode())) == 5){ // STILL A BUG IN ALIROOT >>8 HAS TPO BE REMOVED AFTER FIX
452 if(tmpDaughter->GetPdgCode() == 11){
454 } else if(tmpDaughter->GetPdgCode() == -11){
461 if(ePos == NULL || eNeg == NULL){ // means we do not have two daughters from pair production
465 if(ePos->Pt()<fSinglePtCut || eNeg->Pt()<fSinglePtCut){
466 return kFALSE; // no reconstruction below the Pt cut
469 if( ePos->Eta() > (fEtaCut) || ePos->Eta() < (-fEtaCut) ||
470 eNeg->Eta() > (fEtaCut) || eNeg->Eta() < (-fEtaCut) )
473 if(fEtaCutMin > -0.1){
474 if( (ePos->Eta() < (fEtaCutMin) && ePos->Eta() > (-fEtaCutMin)) ||
475 (eNeg->Eta() < (fEtaCutMin) && eNeg->Eta() > (-fEtaCutMin)) )
479 Double_t rPos = sqrt( (ePos->Xv()*ePos->Xv()) + (ePos->Yv()*ePos->Yv()) );
480 Double_t rNeg = sqrt( (eNeg->Xv()*eNeg->Xv()) + (eNeg->Yv()*eNeg->Yv()) );
483 return kFALSE; // cuts on distance from collision point
485 if(abs(ePos->Zv()) > fMaxZ){
486 return kFALSE; // outside material
488 if(abs(eNeg->Zv()) > fMaxZ){
489 return kFALSE; // outside material
492 if( rPos <= ((abs(ePos->Zv()) * fLineCutZRSlope) - fLineCutZValue)){
493 return kFALSE; // line cut to exclude regions where we do not reconstruct
494 } else if ( fEtaCutMin != -0.1 && rPos >= ((abs(ePos->Zv()) * fLineCutZRSlopeMin) - fLineCutZValueMin)){
498 if( rNeg <= ((abs(eNeg->Zv()) * fLineCutZRSlope) - fLineCutZValue)){
499 return kFALSE; // line cut to exclude regions where we do not reconstruct
500 } else if ( fEtaCutMin != -0.1 && rNeg >= ((abs(eNeg->Zv()) * fLineCutZRSlopeMin) - fLineCutZValueMin)){
505 //if(AcceptanceCut(particle,ePos,eNeg))return kTRUE;
512 ///________________________________________________________________________
513 // This function selects the clusters based on their quality criteria
514 ///________________________________________________________________________
515 Bool_t AliCaloPhotonCuts::ClusterQualityCuts(AliVCluster* cluster, AliVEvent *event, Bool_t isMC)
516 { // Specific Photon Cuts
519 if(fHistClusterIdentificationCuts)fHistClusterIdentificationCuts->Fill(cutIndex);
522 Double_t minR = 999.0;
523 // get the minimum radius of tracks to cluster
524 if(fHistDistanceTrackToClusterBeforeQA || fHistDistanceTrackToClusterAfterQA){
526 // cluster->GetPosition(pos); // Get cluster position
529 // int NtrMatched = 0;
530 // NtrMatched = cluster->GetNTracksMatched();
531 // fHistNMatchedTracks->Fill(NtrMatched);
532 // //loop over tracks for Jet QA
533 // TList *l = event->GetList();
534 // TClonesArray *tracks = dynamic_cast<TClonesArray*>(l->FindObject("Tracks"));
535 // for(int itrack = 0; itrack < NtrMatched; itrack++){
536 // AliVTrack *trackcluster = static_cast<AliVTrack*>(tracks->At(itrack));
537 // if (! trackcluster) {
538 // AliError(Form("Couldn't get ESD track %d\n", itrack));
541 // Double_t dphi = -999.0;
542 // Double_t deta = -999.0;
543 // AliPicoTrack::GetEtaPhiDiff(trackcluster, cluster, dphi, deta);
544 // cout << "here" << endl;
545 // Double_t dr = sqrt(dphi*dphi + deta+deta);
548 // }//loop over tracks
551 // Fill Histos before Cuts
552 if(fHistClusterTimevsEBeforeQA) fHistClusterTimevsEBeforeQA->Fill(cluster->GetTOF(), cluster->E());
553 // if(fHistExoticCellBeforeQA) fHistExoticCellBeforeQA->Fill(cluster->E(), );
554 if(fHistDistanceTrackToClusterBeforeQA) fHistDistanceTrackToClusterBeforeQA->Fill(minR);
555 if(fHistEnergyOfClusterBeforeQA) fHistEnergyOfClusterBeforeQA->Fill(cluster->E());
556 if(fHistNCellsBeforeQA) fHistNCellsBeforeQA->Fill(cluster->GetNCells());
557 if(fHistM02BeforeQA) fHistM02BeforeQA->Fill(cluster->GetM02());
558 if(fHistM20BeforeQA) fHistM20BeforeQA->Fill(cluster->GetM20());
559 if(fHistDispersionBeforeQA) fHistDispersionBeforeQA->Fill(cluster->GetDispersion());
560 // if(fHistNLMBeforeQA) fHistNLMBeforeQA->Fill(cluster->GetNExMax());
562 // Check wether timing is ok
564 if(abs(cluster->GetTOF()) > fMaxTimeDiff && !isMC){
565 if(fHistClusterIdentificationCuts)fHistClusterIdentificationCuts->Fill(cutIndex); //1
569 cutIndex++; //2, next cut
571 // Minimum distance to track
572 if (fUseDistTrackToCluster){
574 // cluster->GetPosition(pos); // Get cluster position
576 // int NtrMatched = 0;
577 // NtrMatched = cluster->GetNTracksMatched();
579 // //loop over tracks for Jet QA
580 // TList *l = event->GetList();
581 // TClonesArray *tracks = dynamic_cast<TClonesArray*>(l->FindObject("Tracks"));
583 // for(int itrack = 0; itrack < NtrMatched; itrack++){
584 // AliVTrack *trackcluster = static_cast<AliVTrack*>(tracks->At(itrack));
585 // if (! trackcluster) {
586 // AliError(Form("Couldn't get ESD track %d\n", itrack));
589 // Double_t dphi = -999.0;
590 // Double_t deta = -999.0;
591 // AliPicoTrack::GetEtaPhiDiff(trackcluster, cluster, dphi, deta);
592 // cout << "here 2" << endl;
593 // Double_t dr = sqrt(dphi*dphi + deta+deta);
594 // if(dr < fMinDistTrackToCluster){
595 // if(fHistClusterIdentificationCuts)fHistClusterIdentificationCuts->Fill(cutIndex); //2
599 // }//loop over tracks
602 if(cluster->GetEmcCpvDistance() < fMinDistTrackToCluster){
603 if(fHistClusterIdentificationCuts)fHistClusterIdentificationCuts->Fill(cutIndex); //2
607 cutIndex++;//3, next cut
609 // exotic cell cut --IMPLEMENT LATER---
610 // if(!AcceptanceCuts(photon)){
611 // if(fHistClusterIdentificationCuts)fHistClusterIdentificationCuts->Fill(cutIndex); //3
614 cutIndex++; //4, next cut
616 // minimum cell energy cut
618 if(cluster->E() < fMinEnergy){
619 if(fHistClusterIdentificationCuts)fHistClusterIdentificationCuts->Fill(cutIndex); //4
623 cutIndex++; //5, next cut
625 // minimum number of cells
627 if(cluster->GetNCells() < fMinNCells) {
628 if(fHistClusterIdentificationCuts)fHistClusterIdentificationCuts->Fill(cutIndex); //5
632 cutIndex++; //6, next cut
636 if( cluster->GetM02()< fMinM02 || cluster->GetM02() > fMaxM02 ) {
637 if(fHistClusterIdentificationCuts)fHistClusterIdentificationCuts->Fill(cutIndex); //6
641 cutIndex++; //7, next cut
645 if( cluster->GetM20()< fMinM20 || cluster->GetM20() > fMaxM20 ) {
646 if(fHistClusterIdentificationCuts)fHistClusterIdentificationCuts->Fill(cutIndex); //7
650 cutIndex++; //8, next cut
654 if( cluster->GetDispersion()> fMaxDispersion) {
655 if(fHistClusterIdentificationCuts)fHistClusterIdentificationCuts->Fill(cutIndex); //8
659 cutIndex++; //9, next cut
661 // NLM cut --IMPLEMENT LATER---
663 // if( cluster->GetDispersion()> fMaxDispersion) {
664 // if(fHistClusterIdentificationCuts)fHistClusterIdentificationCuts->Fill(cutIndex); //9
668 cutIndex++; //9, next cut
670 // DONE with selecting photons
671 if(fHistClusterIdentificationCuts)fHistClusterIdentificationCuts->Fill(cutIndex); //10
674 Double_t vertex[3] = {0};
675 event->GetPrimaryVertex()->GetXYZ(vertex);
676 // TLorentzvector with cluster
677 TLorentzVector clusterVector;
678 cluster->GetMomentum(clusterVector,vertex);
679 Double_t etaCluster = clusterVector.Eta();
680 Double_t phiCluster = clusterVector.Phi();
682 if(fHistClusterEtavsPhiAfterQA) fHistClusterEtavsPhiAfterQA->Fill(phiCluster,etaCluster);
683 if(fHistClusterTimevsEAfterQA) fHistClusterTimevsEAfterQA->Fill(cluster->GetTOF(), cluster->E());
684 // if(fHistExoticCellAfterQA) fHistExoticCellAfterQA->Fill(cluster->E(), );
685 if(fHistDistanceTrackToClusterAfterQA) fHistDistanceTrackToClusterAfterQA->Fill(minR);
686 if(fHistDistanceTrackToClusterAfterQA) fHistDistanceTrackToClusterAfterQA->Fill(cluster->GetEmcCpvDistance());
687 if(fHistEnergyOfClusterAfterQA) fHistEnergyOfClusterAfterQA->Fill(cluster->E());
688 if(fHistNCellsAfterQA) fHistNCellsAfterQA->Fill(cluster->GetNCells());
689 if(fHistM02AfterQA) fHistM02AfterQA->Fill(cluster->GetM02());
690 if(fHistM20AfterQA) fHistM20AfterQA->Fill(cluster->GetM20());
691 if(fHistDispersionAfterQA) fHistDispersionAfterQA->Fill(cluster->GetDispersion());
692 // if(fHistNLMBeforeQA) fHistNLMAfterQA->Fill(cluster->GetNExMax());
699 ///________________________________________________________________________
700 Bool_t AliCaloPhotonCuts::ClusterIsSelected(AliVCluster *cluster, AliVEvent * event, Bool_t isMC)
702 //Selection of Reconstructed photon clusters with Calorimeters
704 FillClusterCutIndex(kPhotonIn);
706 Double_t vertex[3] = {0};
707 event->GetPrimaryVertex()->GetXYZ(vertex);
708 // TLorentzvector with cluster
709 TLorentzVector clusterVector;
710 cluster->GetMomentum(clusterVector,vertex);
711 Double_t etaCluster = clusterVector.Eta();
712 Double_t phiCluster = clusterVector.Phi();
714 // Histos before cuts
715 if(fHistClusterEtavsPhiBeforeAcc) fHistClusterEtavsPhiBeforeAcc->Fill(phiCluster,etaCluster);
717 // Cluster Selection - 0= accept any calo cluster
718 if (fClusterType > 0){
719 //Select EMCAL cluster
720 if (fClusterType == 1 && !cluster->IsEMCAL()){
721 FillClusterCutIndex(kDetector);
724 //Select PHOS cluster
725 if (fClusterType == 2 && !cluster->IsPHOS()){
726 FillClusterCutIndex(kDetector);
732 if(!AcceptanceCuts(cluster,event)){
733 FillClusterCutIndex(kAcceptance);
736 // Cluster Quality Cuts
737 if(!ClusterQualityCuts(cluster,event,isMC)){
738 FillClusterCutIndex(kClusterQuality);
742 // Photon passed cuts
743 FillClusterCutIndex(kPhotonOut);
748 ///________________________________________________________________________
749 Bool_t AliCaloPhotonCuts::AcceptanceCuts(AliVCluster *cluster, AliVEvent* event)
751 // Exclude certain areas for photon reconstruction
754 if(fHistAcceptanceCuts)fHistAcceptanceCuts->Fill(cutIndex);
758 Double_t vertex[3] = {0};
759 event->GetPrimaryVertex()->GetXYZ(vertex);
760 // TLorentzvector with cluster
761 TLorentzVector clusterVector;
762 cluster->GetMomentum(clusterVector,vertex);
763 Double_t etaCluster = clusterVector.Eta();
764 Double_t phiCluster = clusterVector.Phi();
768 if (etaCluster < fMinEtaCut || etaCluster > fMaxEtaCut){
769 if(fHistAcceptanceCuts)fHistAcceptanceCuts->Fill(cutIndex);
777 if (phiCluster < fMinPhiCut || phiCluster > fMaxEtaCut){
778 if(fHistAcceptanceCuts)fHistAcceptanceCuts->Fill(cutIndex);
784 // check distance to bad channel
785 if (fUseDistanceToBadChannel){
786 if (cluster->GetDistanceToBadChannel() < fMinDistanceToBadChannel){
787 if(fHistAcceptanceCuts)fHistAcceptanceCuts->Fill(cutIndex);
792 if(fHistAcceptanceCuts)fHistAcceptanceCuts->Fill(cutIndex);
795 if(fHistClusterEtavsPhiAfterAcc) fHistClusterEtavsPhiAfterAcc->Fill(phiCluster,etaCluster);
800 ///________________________________________________________________________
801 Bool_t AliCaloPhotonCuts::UpdateCutString() {
802 ///Update the cut string (if it has been created yet)
804 if(fCutString && fCutString->GetString().Length() == kNCuts) {
805 fCutString->SetString(GetCutNumber());
812 ///________________________________________________________________________
813 Bool_t AliCaloPhotonCuts::InitializeCutsFromCutString(const TString analysisCutSelection ) {
814 // Initialize Cuts from a given Cut string
815 AliInfo(Form("Set CaloCut Number: %s",analysisCutSelection.Data()));
816 if(analysisCutSelection.Length()!=kNCuts) {
817 AliError(Form("Cut selection has the wrong length! size is %d, number of cuts is %d", analysisCutSelection.Length(), kNCuts));
820 if(!analysisCutSelection.IsDigit()){
821 AliError("Cut selection contains characters");
825 const char *cutSelection = analysisCutSelection.Data();
826 #define ASSIGNARRAY(i) fCuts[i] = cutSelection[i] - '0'
827 for(Int_t ii=0;ii<kNCuts;ii++){
831 // Set Individual Cuts
832 for(Int_t ii=0;ii<kNCuts;ii++){
833 if(!SetCut(cutIds(ii),fCuts[ii]))return kFALSE;
835 PrintCutsWithValues();
839 ///________________________________________________________________________
840 Bool_t AliCaloPhotonCuts::SetCut(cutIds cutID, const Int_t value) {
841 ///Set individual cut ID
846 if( SetClusterTypeCut(value)) {
847 fCuts[kClusterType] = value;
850 } else return kFALSE;
853 if( SetMinEtaCut(value)) {
854 fCuts[kEtaMin] = value;
857 } else return kFALSE;
860 if( SetMaxEtaCut(value)) {
861 fCuts[kEtaMax] = value;
864 } else return kFALSE;
867 if( SetMinPhiCut(value)) {
868 fCuts[kPhiMin] = value;
871 } else return kFALSE;
874 if( SetMaxPhiCut(value)) {
875 fCuts[kPhiMax] = value;
878 } else return kFALSE;
880 case kDistanceToBadChannel:
881 if( SetDistanceToBadChannelCut(value)) {
882 fCuts[kDistanceToBadChannel] = value;
885 } else return kFALSE;
888 if( SetTimingCut(value)) {
889 fCuts[kTiming] = value;
892 } else return kFALSE;
895 if( SetTrackMatchingCut(value)) {
896 fCuts[kTrackMatching] = value;
899 } else return kFALSE;
902 if( SetExoticCellCut(value)) {
903 fCuts[kExoticCell] = value;
906 } else return kFALSE;
909 if( SetMinEnergyCut(value)) {
910 fCuts[kMinEnery] = value;
913 } else return kFALSE;
916 if( SetMinNCellsCut(value)) {
917 fCuts[kNMinCells] = value;
920 } else return kFALSE;
923 if( SetMinM02(value)) {
924 fCuts[kMinM02] = value;
927 } else return kFALSE;
930 if( SetMaxM02(value)) {
931 fCuts[kMaxM02] = value;
934 } else return kFALSE;
937 if( SetMinM20(value)) {
938 fCuts[kMinM20] = value;
941 } else return kFALSE;
944 if( SetMaxM20(value)) {
945 fCuts[kMaxM20] = value;
948 } else return kFALSE;
951 if( SetDispersion(value)) {
952 fCuts[kDispersion] = value;
955 } else return kFALSE;
962 } else return kFALSE;
965 AliError("Cut id out of range");
969 AliError("Cut id %d not recognized");
974 ///________________________________________________________________________
975 void AliCaloPhotonCuts::PrintCuts() {
976 // Print out current Cut Selection
977 for(Int_t ic = 0; ic < kNCuts; ic++) {
978 printf("%-30s : %d \n", fgkCutNames[ic], fCuts[ic]);
982 void AliCaloPhotonCuts::PrintCutsWithValues() {
983 // Print out current Cut Selection with value
984 printf("\nCluster cutnumber \n");
985 for(Int_t ic = 0; ic < kNCuts; ic++) {
986 printf("%d",fCuts[ic]);
990 printf("Acceptance cuts: \n");
991 if (fClusterType == 0) printf("\tall calorimeter clusters are used\n");
992 if (fClusterType == 1) printf("\tEMCAL calorimeter clusters are used\n");
993 if (fClusterType == 2) printf("\tPHOS calorimeter clusters are used\n");
994 if (fUseEtaCut) printf("\t%3.2f < eta_{cluster} < %3.2f\n", fMinEtaCut, fMaxEtaCut );
995 if (fUsePhiCut) printf("\t%3.2f < phi_{cluster} < %3.2f\n", fMinPhiCut, fMaxPhiCut );
996 if (fUseDistanceToBadChannel) printf("\tcut on exotics applied \n");
998 printf("Cluster Quality cuts: \n");
999 if (fUseTimeDiff) printf("\t time difference < %3.2f\n", fMaxTimeDiff );
1000 if (fUseDistTrackToCluster) printf("\tmin distance to track > %3.2f\n", fMinDistTrackToCluster );
1001 if (fUseExoticCell)printf("\t min distance to track > %3.2f\n", fMinDistTrackToCluster );
1002 if (fUseMinEnergy)printf("\t E_{cluster} > %3.2f\n", fMinEnergy );
1003 if (fUseNCells) printf("\t number of cells per cluster > %d\n", fMinNCells );
1004 if (fUseM02) printf("\t %3.2f < M02 < %3.2f\n", fMinM02, fMaxM02 );
1005 if (fUseM20) printf("\t %3.2f < M20 < %3.2f\n", fMinM20, fMaxM20 );
1006 if (fUseDispersion) printf("\t dispersion < %3.2f\n", fMaxDispersion );
1007 if (fUseNLM) printf("\t %d < NLM < %d\n", fMinNLM, fMaxNLM );
1011 // EMCAL acceptance 2011
1012 // 1.39626, 3.125 (phi)
1013 // -0.66687,,0.66465
1016 ///________________________________________________________________________
1017 Bool_t AliCaloPhotonCuts::SetClusterTypeCut(Int_t clusterType)
1019 switch(clusterType){
1020 case 0: // all clusters
1023 case 1: // EMCAL clusters
1026 case 2: // PHOS clusters
1030 AliError(Form("ClusterTypeCut not defined %d",clusterType));
1036 //___________________________________________________________________
1037 Bool_t AliCaloPhotonCuts::SetMinEtaCut(Int_t minEta)
1041 if (!fUseEtaCut) fUseEtaCut=0;
1045 if (!fUseEtaCut) fUseEtaCut=1;
1049 if (!fUseEtaCut) fUseEtaCut=1;
1053 if (!fUseEtaCut) fUseEtaCut=1;
1057 AliError(Form("MinEta Cut not defined %d",minEta));
1064 //___________________________________________________________________
1065 Bool_t AliCaloPhotonCuts::SetMaxEtaCut(Int_t maxEta)
1069 if (!fUseEtaCut) fUseEtaCut=0;
1073 if (!fUseEtaCut) fUseEtaCut=1;
1077 if (!fUseEtaCut) fUseEtaCut=1;
1081 if (!fUseEtaCut) fUseEtaCut=1;
1085 AliError(Form("MaxEta Cut not defined %d",maxEta));
1091 //___________________________________________________________________
1092 Bool_t AliCaloPhotonCuts::SetMinPhiCut(Int_t minPhi)
1096 if (!fUsePhiCut) fUsePhiCut=0;
1100 if (!fUsePhiCut) fUsePhiCut=1;
1104 AliError(Form("MinPhi Cut not defined %d",minPhi));
1110 //___________________________________________________________________
1111 Bool_t AliCaloPhotonCuts::SetMaxPhiCut(Int_t maxPhi)
1115 if (!fUsePhiCut) fUsePhiCut=0;
1119 if (!fUsePhiCut) fUsePhiCut=1;
1123 AliError(Form("Max Phi Cut not defined %d",maxPhi));
1129 //___________________________________________________________________
1130 Bool_t AliCaloPhotonCuts::SetDistanceToBadChannelCut(Int_t distanceToBadChannel)
1132 switch(distanceToBadChannel){
1134 fUseDistanceToBadChannel=0;
1135 fMinDistanceToBadChannel=0;
1138 if (!fUseDistanceToBadChannel) fUseDistanceToBadChannel=1;
1139 fMinDistanceToBadChannel=5;
1142 AliError(Form("minimum distance to bad channel Cut not defined %d",distanceToBadChannel));
1148 //___________________________________________________________________
1149 Bool_t AliCaloPhotonCuts::SetTimingCut(Int_t timing)
1157 if (!fUseTimeDiff) fUseTimeDiff=1;
1158 fMaxTimeDiff=10e-7; //1000ns
1161 if (!fUseTimeDiff) fUseTimeDiff=1;
1162 fMaxTimeDiff=50e-8; //500ns
1165 if (!fUseTimeDiff) fUseTimeDiff=1;
1166 fMaxTimeDiff=20e-8; //200ns
1169 if (!fUseTimeDiff) fUseTimeDiff=1;
1170 fMaxTimeDiff=10e-8; //100ns
1173 if (!fUseTimeDiff) fUseTimeDiff=1;
1174 fMaxTimeDiff=50e-9; //50ns
1178 AliError(Form("Timing Cut not defined %d",timing));
1184 //___________________________________________________________________
1185 Bool_t AliCaloPhotonCuts::SetTrackMatchingCut(Int_t trackMatching)
1187 switch(trackMatching){
1189 fUseDistTrackToCluster=0;
1190 fMinDistTrackToCluster=0;
1193 if (!fUseDistTrackToCluster) fUseDistTrackToCluster=1;
1194 fMinDistTrackToCluster=5;
1197 AliError(Form("Track Matching Cut not defined %d",trackMatching));
1203 //___________________________________________________________________
1204 Bool_t AliCaloPhotonCuts::SetExoticCellCut(Int_t exoticCell)
1212 if (!fUseExoticCell) fUseExoticCell=1;
1216 AliError(Form("Exotic cell Cut not defined %d",exoticCell));
1222 //___________________________________________________________________
1223 Bool_t AliCaloPhotonCuts::SetMinEnergyCut(Int_t minEnergy)
1227 if (!fUseMinEnergy) fUseMinEnergy=0;
1231 if (!fUseMinEnergy) fUseMinEnergy=1;
1235 if (!fUseMinEnergy) fUseMinEnergy=1;
1239 if (!fUseMinEnergy) fUseMinEnergy=1;
1243 if (!fUseMinEnergy) fUseMinEnergy=1;
1247 if (!fUseMinEnergy) fUseMinEnergy=1;
1251 if (!fUseMinEnergy) fUseMinEnergy=1;
1255 if (!fUseMinEnergy) fUseMinEnergy=1;
1259 if (!fUseMinEnergy) fUseMinEnergy=1;
1263 if (!fUseMinEnergy) fUseMinEnergy=1;
1267 AliError(Form("Minimum Energy Cut not defined %d",minEnergy));
1273 //___________________________________________________________________
1274 Bool_t AliCaloPhotonCuts::SetMinNCellsCut(Int_t minNCells)
1278 if (!fUseNCells) fUseNCells=0;
1282 if (!fUseNCells) fUseNCells=1;
1286 if (!fUseNCells) fUseNCells=1;
1290 if (!fUseNCells) fUseNCells=1;
1294 if (!fUseNCells) fUseNCells=1;
1298 if (!fUseNCells) fUseNCells=1;
1302 if (!fUseNCells) fUseNCells=1;
1307 AliError(Form("Min N cells Cut not defined %d",minNCells));
1313 //___________________________________________________________________
1314 Bool_t AliCaloPhotonCuts::SetMaxM02(Int_t maxM02)
1318 if (!fUseM02) fUseM02=0;
1322 if (!fUseM02) fUseM02=1;
1326 if (!fUseM02) fUseM02=1;
1330 if (!fUseM02) fUseM02=1;
1334 if (!fUseM02) fUseM02=1;
1338 AliError(Form("Max M02 Cut not defined %d",maxM02));
1344 //___________________________________________________________________
1345 Bool_t AliCaloPhotonCuts::SetMinM02(Int_t minM02)
1349 if (!fUseM02) fUseM02=0;
1353 if (!fUseM02) fUseM02=1;
1357 AliError(Form("Min M02 not defined %d",minM02));
1363 //___________________________________________________________________
1364 Bool_t AliCaloPhotonCuts::SetMaxM20(Int_t maxM20)
1368 if (!fUseM20) fUseM20=0;
1372 if (!fUseM20) fUseM20=1;
1376 AliError(Form("Max M20 Cut not defined %d",maxM20));
1382 //___________________________________________________________________
1383 Bool_t AliCaloPhotonCuts::SetMinM20(Int_t minM20)
1387 if (!fUseM20) fUseM20=0;
1391 if (!fUseM20) fUseM20=1;
1395 AliError(Form("Min M20 Cut not defined %d",minM20));
1401 //___________________________________________________________________
1402 Bool_t AliCaloPhotonCuts::SetDispersion(Int_t dispersion)
1406 if (!fUseDispersion) fUseDispersion=0;
1407 fMaxDispersion =100;
1410 if (!fUseDispersion) fUseDispersion=1;
1414 AliError(Form("Maximum Dispersion Cut not defined %d",dispersion));
1420 //___________________________________________________________________
1421 Bool_t AliCaloPhotonCuts::SetNLM(Int_t nlm)
1425 if (!fUseNLM) fUseNLM=0;
1430 if (!fUseNLM) fUseNLM=1;
1435 AliError(Form("NLM Cut not defined %d",nlm));
1441 ///________________________________________________________________________
1442 TString AliCaloPhotonCuts::GetCutNumber(){
1443 // returns TString with current cut number
1445 for(Int_t ii=0;ii<kNCuts;ii++){
1446 a.Append(Form("%d",fCuts[ii]));