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
577 NtrMatched = cluster->GetNTracksMatched();
578 fHistNMatchedTracks->Fill(NtrMatched);
580 //loop over tracks for QA
581 TList *l = event->GetList();
582 TClonesArray *tracks = dynamic_cast<TClonesArray*>(l->FindObject("Tracks"));
584 Double_t dphi = 999.0;
585 Double_t deta = 999.0;
586 Double_t dr2 = 999.0;
588 for(int itrack = 0; itrack < NtrMatched; itrack++){
589 AliVTrack *trackcluster = NULL;
590 trackcluster = static_cast<AliVTrack*>(tracks->At(itrack));
591 if (! trackcluster) {
592 AliError(Form("Couldn't get ESD track %d\n", itrack));
595 AliPicoTrack::GetEtaPhiDiff(trackcluster, cluster, dphi, deta);
596 dr2 = dphi*dphi + deta+deta;
597 //cout << dr << endl;
598 if(dr2 < fMinDistTrackToCluster*fMinDistTrackToCluster){
599 // if(dphi < fMinDistTrackToCluster || deta < fMinDistTrackToCluster){
600 if(fHistClusterIdentificationCuts)fHistClusterIdentificationCuts->Fill(cutIndex); //2
606 // if(cluster->GetEmcCpvDistance() < fMinDistTrackToCluster){
607 // if(fHistClusterIdentificationCuts)fHistClusterIdentificationCuts->Fill(cutIndex); //2
611 cutIndex++;//3, next cut
613 // exotic cell cut --IMPLEMENT LATER---
614 // if(!AcceptanceCuts(photon)){
615 // if(fHistClusterIdentificationCuts)fHistClusterIdentificationCuts->Fill(cutIndex); //3
618 cutIndex++; //4, next cut
620 // minimum cell energy cut
622 if(cluster->E() < fMinEnergy){
623 if(fHistClusterIdentificationCuts)fHistClusterIdentificationCuts->Fill(cutIndex); //4
627 cutIndex++; //5, next cut
629 // minimum number of cells
631 if(cluster->GetNCells() < fMinNCells) {
632 if(fHistClusterIdentificationCuts)fHistClusterIdentificationCuts->Fill(cutIndex); //5
636 cutIndex++; //6, next cut
640 if( cluster->GetM02()< fMinM02 || cluster->GetM02() > fMaxM02 ) {
641 if(fHistClusterIdentificationCuts)fHistClusterIdentificationCuts->Fill(cutIndex); //6
645 cutIndex++; //7, next cut
649 if( cluster->GetM20()< fMinM20 || cluster->GetM20() > fMaxM20 ) {
650 if(fHistClusterIdentificationCuts)fHistClusterIdentificationCuts->Fill(cutIndex); //7
654 cutIndex++; //8, next cut
658 if( cluster->GetDispersion()> fMaxDispersion) {
659 if(fHistClusterIdentificationCuts)fHistClusterIdentificationCuts->Fill(cutIndex); //8
663 cutIndex++; //9, next cut
665 // NLM cut --IMPLEMENT LATER---
667 // if( cluster->GetDispersion()> fMaxDispersion) {
668 // if(fHistClusterIdentificationCuts)fHistClusterIdentificationCuts->Fill(cutIndex); //9
672 cutIndex++; //9, next cut
674 // DONE with selecting photons
675 if(fHistClusterIdentificationCuts)fHistClusterIdentificationCuts->Fill(cutIndex); //10
678 Double_t vertex[3] = {0};
679 event->GetPrimaryVertex()->GetXYZ(vertex);
680 // TLorentzvector with cluster
681 TLorentzVector clusterVector;
682 cluster->GetMomentum(clusterVector,vertex);
683 Double_t etaCluster = clusterVector.Eta();
684 Double_t phiCluster = clusterVector.Phi();
686 if(fHistClusterEtavsPhiAfterQA) fHistClusterEtavsPhiAfterQA->Fill(phiCluster,etaCluster);
687 if(fHistClusterTimevsEAfterQA) fHistClusterTimevsEAfterQA->Fill(cluster->GetTOF(), cluster->E());
688 // if(fHistExoticCellAfterQA) fHistExoticCellAfterQA->Fill(cluster->E(), );
689 if(fHistDistanceTrackToClusterAfterQA) fHistDistanceTrackToClusterAfterQA->Fill(minR);
690 if(fHistDistanceTrackToClusterAfterQA) fHistDistanceTrackToClusterAfterQA->Fill(cluster->GetEmcCpvDistance());
691 if(fHistEnergyOfClusterAfterQA) fHistEnergyOfClusterAfterQA->Fill(cluster->E());
692 if(fHistNCellsAfterQA) fHistNCellsAfterQA->Fill(cluster->GetNCells());
693 if(fHistM02AfterQA) fHistM02AfterQA->Fill(cluster->GetM02());
694 if(fHistM20AfterQA) fHistM20AfterQA->Fill(cluster->GetM20());
695 if(fHistDispersionAfterQA) fHistDispersionAfterQA->Fill(cluster->GetDispersion());
696 // if(fHistNLMBeforeQA) fHistNLMAfterQA->Fill(cluster->GetNExMax());
703 ///________________________________________________________________________
704 Bool_t AliCaloPhotonCuts::ClusterIsSelected(AliVCluster *cluster, AliVEvent * event, Bool_t isMC)
706 //Selection of Reconstructed photon clusters with Calorimeters
708 FillClusterCutIndex(kPhotonIn);
710 Double_t vertex[3] = {0};
711 event->GetPrimaryVertex()->GetXYZ(vertex);
712 // TLorentzvector with cluster
713 TLorentzVector clusterVector;
714 cluster->GetMomentum(clusterVector,vertex);
715 Double_t etaCluster = clusterVector.Eta();
716 Double_t phiCluster = clusterVector.Phi();
718 // Histos before cuts
719 if(fHistClusterEtavsPhiBeforeAcc) fHistClusterEtavsPhiBeforeAcc->Fill(phiCluster,etaCluster);
721 // Cluster Selection - 0= accept any calo cluster
722 if (fClusterType > 0){
723 //Select EMCAL cluster
724 if (fClusterType == 1 && !cluster->IsEMCAL()){
725 FillClusterCutIndex(kDetector);
728 //Select PHOS cluster
729 if (fClusterType == 2 && !cluster->IsPHOS()){
730 FillClusterCutIndex(kDetector);
736 if(!AcceptanceCuts(cluster,event)){
737 FillClusterCutIndex(kAcceptance);
740 // Cluster Quality Cuts
741 if(!ClusterQualityCuts(cluster,event,isMC)){
742 FillClusterCutIndex(kClusterQuality);
746 // Photon passed cuts
747 FillClusterCutIndex(kPhotonOut);
752 ///________________________________________________________________________
753 Bool_t AliCaloPhotonCuts::AcceptanceCuts(AliVCluster *cluster, AliVEvent* event)
755 // Exclude certain areas for photon reconstruction
758 if(fHistAcceptanceCuts)fHistAcceptanceCuts->Fill(cutIndex);
762 Double_t vertex[3] = {0};
763 event->GetPrimaryVertex()->GetXYZ(vertex);
764 // TLorentzvector with cluster
765 TLorentzVector clusterVector;
766 cluster->GetMomentum(clusterVector,vertex);
767 Double_t etaCluster = clusterVector.Eta();
768 Double_t phiCluster = clusterVector.Phi();
772 if (etaCluster < fMinEtaCut || etaCluster > fMaxEtaCut){
773 if(fHistAcceptanceCuts)fHistAcceptanceCuts->Fill(cutIndex);
781 if (phiCluster < fMinPhiCut || phiCluster > fMaxEtaCut){
782 if(fHistAcceptanceCuts)fHistAcceptanceCuts->Fill(cutIndex);
788 // check distance to bad channel
789 if (fUseDistanceToBadChannel){
790 if (cluster->GetDistanceToBadChannel() < fMinDistanceToBadChannel){
791 if(fHistAcceptanceCuts)fHistAcceptanceCuts->Fill(cutIndex);
796 if(fHistAcceptanceCuts)fHistAcceptanceCuts->Fill(cutIndex);
799 if(fHistClusterEtavsPhiAfterAcc) fHistClusterEtavsPhiAfterAcc->Fill(phiCluster,etaCluster);
804 ///________________________________________________________________________
805 Bool_t AliCaloPhotonCuts::UpdateCutString() {
806 ///Update the cut string (if it has been created yet)
808 if(fCutString && fCutString->GetString().Length() == kNCuts) {
809 fCutString->SetString(GetCutNumber());
816 ///________________________________________________________________________
817 Bool_t AliCaloPhotonCuts::InitializeCutsFromCutString(const TString analysisCutSelection ) {
818 // Initialize Cuts from a given Cut string
819 AliInfo(Form("Set CaloCut Number: %s",analysisCutSelection.Data()));
820 if(analysisCutSelection.Length()!=kNCuts) {
821 AliError(Form("Cut selection has the wrong length! size is %d, number of cuts is %d", analysisCutSelection.Length(), kNCuts));
824 if(!analysisCutSelection.IsDigit()){
825 AliError("Cut selection contains characters");
829 const char *cutSelection = analysisCutSelection.Data();
830 #define ASSIGNARRAY(i) fCuts[i] = cutSelection[i] - '0'
831 for(Int_t ii=0;ii<kNCuts;ii++){
835 // Set Individual Cuts
836 for(Int_t ii=0;ii<kNCuts;ii++){
837 if(!SetCut(cutIds(ii),fCuts[ii]))return kFALSE;
839 PrintCutsWithValues();
843 ///________________________________________________________________________
844 Bool_t AliCaloPhotonCuts::SetCut(cutIds cutID, const Int_t value) {
845 ///Set individual cut ID
850 if( SetClusterTypeCut(value)) {
851 fCuts[kClusterType] = value;
854 } else return kFALSE;
857 if( SetMinEtaCut(value)) {
858 fCuts[kEtaMin] = value;
861 } else return kFALSE;
864 if( SetMaxEtaCut(value)) {
865 fCuts[kEtaMax] = value;
868 } else return kFALSE;
871 if( SetMinPhiCut(value)) {
872 fCuts[kPhiMin] = value;
875 } else return kFALSE;
878 if( SetMaxPhiCut(value)) {
879 fCuts[kPhiMax] = value;
882 } else return kFALSE;
884 case kDistanceToBadChannel:
885 if( SetDistanceToBadChannelCut(value)) {
886 fCuts[kDistanceToBadChannel] = value;
889 } else return kFALSE;
892 if( SetTimingCut(value)) {
893 fCuts[kTiming] = value;
896 } else return kFALSE;
899 if( SetTrackMatchingCut(value)) {
900 fCuts[kTrackMatching] = value;
903 } else return kFALSE;
906 if( SetExoticCellCut(value)) {
907 fCuts[kExoticCell] = value;
910 } else return kFALSE;
913 if( SetMinEnergyCut(value)) {
914 fCuts[kMinEnery] = value;
917 } else return kFALSE;
920 if( SetMinNCellsCut(value)) {
921 fCuts[kNMinCells] = value;
924 } else return kFALSE;
927 if( SetMinM02(value)) {
928 fCuts[kMinM02] = value;
931 } else return kFALSE;
934 if( SetMaxM02(value)) {
935 fCuts[kMaxM02] = value;
938 } else return kFALSE;
941 if( SetMinM20(value)) {
942 fCuts[kMinM20] = value;
945 } else return kFALSE;
948 if( SetMaxM20(value)) {
949 fCuts[kMaxM20] = value;
952 } else return kFALSE;
955 if( SetDispersion(value)) {
956 fCuts[kDispersion] = value;
959 } else return kFALSE;
966 } else return kFALSE;
969 AliError("Cut id out of range");
973 AliError("Cut id %d not recognized");
978 ///________________________________________________________________________
979 void AliCaloPhotonCuts::PrintCuts() {
980 // Print out current Cut Selection
981 for(Int_t ic = 0; ic < kNCuts; ic++) {
982 printf("%-30s : %d \n", fgkCutNames[ic], fCuts[ic]);
986 void AliCaloPhotonCuts::PrintCutsWithValues() {
987 // Print out current Cut Selection with value
988 printf("\nCluster cutnumber \n");
989 for(Int_t ic = 0; ic < kNCuts; ic++) {
990 printf("%d",fCuts[ic]);
994 printf("Acceptance cuts: \n");
995 if (fClusterType == 0) printf("\tall calorimeter clusters are used\n");
996 if (fClusterType == 1) printf("\tEMCAL calorimeter clusters are used\n");
997 if (fClusterType == 2) printf("\tPHOS calorimeter clusters are used\n");
998 if (fUseEtaCut) printf("\t%3.2f < eta_{cluster} < %3.2f\n", fMinEtaCut, fMaxEtaCut );
999 if (fUsePhiCut) printf("\t%3.2f < phi_{cluster} < %3.2f\n", fMinPhiCut, fMaxPhiCut );
1000 if (fUseDistanceToBadChannel) printf("\tcut on exotics applied \n");
1002 printf("Cluster Quality cuts: \n");
1003 if (fUseTimeDiff) printf("\t time difference < %3.2f\n", fMaxTimeDiff );
1004 if (fUseDistTrackToCluster) printf("\tmin distance to track > %3.2f\n", fMinDistTrackToCluster );
1005 if (fUseExoticCell)printf("\t min distance to track > %3.2f\n", fMinDistTrackToCluster );
1006 if (fUseMinEnergy)printf("\t E_{cluster} > %3.2f\n", fMinEnergy );
1007 if (fUseNCells) printf("\t number of cells per cluster > %d\n", fMinNCells );
1008 if (fUseM02) printf("\t %3.2f < M02 < %3.2f\n", fMinM02, fMaxM02 );
1009 if (fUseM20) printf("\t %3.2f < M20 < %3.2f\n", fMinM20, fMaxM20 );
1010 if (fUseDispersion) printf("\t dispersion < %3.2f\n", fMaxDispersion );
1011 if (fUseNLM) printf("\t %d < NLM < %d\n", fMinNLM, fMaxNLM );
1015 // EMCAL acceptance 2011
1016 // 1.39626, 3.125 (phi)
1017 // -0.66687,,0.66465
1020 ///________________________________________________________________________
1021 Bool_t AliCaloPhotonCuts::SetClusterTypeCut(Int_t clusterType)
1023 switch(clusterType){
1024 case 0: // all clusters
1027 case 1: // EMCAL clusters
1030 case 2: // PHOS clusters
1034 AliError(Form("ClusterTypeCut not defined %d",clusterType));
1040 //___________________________________________________________________
1041 Bool_t AliCaloPhotonCuts::SetMinEtaCut(Int_t minEta)
1045 if (!fUseEtaCut) fUseEtaCut=0;
1049 if (!fUseEtaCut) fUseEtaCut=1;
1053 if (!fUseEtaCut) fUseEtaCut=1;
1057 if (!fUseEtaCut) fUseEtaCut=1;
1061 AliError(Form("MinEta Cut not defined %d",minEta));
1068 //___________________________________________________________________
1069 Bool_t AliCaloPhotonCuts::SetMaxEtaCut(Int_t maxEta)
1073 if (!fUseEtaCut) fUseEtaCut=0;
1077 if (!fUseEtaCut) fUseEtaCut=1;
1081 if (!fUseEtaCut) fUseEtaCut=1;
1085 if (!fUseEtaCut) fUseEtaCut=1;
1089 AliError(Form("MaxEta Cut not defined %d",maxEta));
1095 //___________________________________________________________________
1096 Bool_t AliCaloPhotonCuts::SetMinPhiCut(Int_t minPhi)
1100 if (!fUsePhiCut) fUsePhiCut=0;
1104 if (!fUsePhiCut) fUsePhiCut=1;
1108 AliError(Form("MinPhi Cut not defined %d",minPhi));
1114 //___________________________________________________________________
1115 Bool_t AliCaloPhotonCuts::SetMaxPhiCut(Int_t maxPhi)
1119 if (!fUsePhiCut) fUsePhiCut=0;
1123 if (!fUsePhiCut) fUsePhiCut=1;
1127 AliError(Form("Max Phi Cut not defined %d",maxPhi));
1133 //___________________________________________________________________
1134 Bool_t AliCaloPhotonCuts::SetDistanceToBadChannelCut(Int_t distanceToBadChannel)
1136 switch(distanceToBadChannel){
1138 fUseDistanceToBadChannel=0;
1139 fMinDistanceToBadChannel=0;
1142 if (!fUseDistanceToBadChannel) fUseDistanceToBadChannel=1;
1143 fMinDistanceToBadChannel=5;
1146 AliError(Form("minimum distance to bad channel Cut not defined %d",distanceToBadChannel));
1152 //___________________________________________________________________
1153 Bool_t AliCaloPhotonCuts::SetTimingCut(Int_t timing)
1161 if (!fUseTimeDiff) fUseTimeDiff=1;
1162 fMaxTimeDiff=10e-7; //1000ns
1165 if (!fUseTimeDiff) fUseTimeDiff=1;
1166 fMaxTimeDiff=50e-8; //500ns
1169 if (!fUseTimeDiff) fUseTimeDiff=1;
1170 fMaxTimeDiff=20e-8; //200ns
1173 if (!fUseTimeDiff) fUseTimeDiff=1;
1174 fMaxTimeDiff=10e-8; //100ns
1177 if (!fUseTimeDiff) fUseTimeDiff=1;
1178 fMaxTimeDiff=50e-9; //50ns
1182 AliError(Form("Timing Cut not defined %d",timing));
1188 //___________________________________________________________________
1189 Bool_t AliCaloPhotonCuts::SetTrackMatchingCut(Int_t trackMatching)
1191 switch(trackMatching){
1193 fUseDistTrackToCluster=0;
1194 fMinDistTrackToCluster=0;
1197 if (!fUseDistTrackToCluster) fUseDistTrackToCluster=1;
1198 fMinDistTrackToCluster=5;
1201 AliError(Form("Track Matching Cut not defined %d",trackMatching));
1207 //___________________________________________________________________
1208 Bool_t AliCaloPhotonCuts::SetExoticCellCut(Int_t exoticCell)
1216 if (!fUseExoticCell) fUseExoticCell=1;
1220 AliError(Form("Exotic cell Cut not defined %d",exoticCell));
1226 //___________________________________________________________________
1227 Bool_t AliCaloPhotonCuts::SetMinEnergyCut(Int_t minEnergy)
1231 if (!fUseMinEnergy) fUseMinEnergy=0;
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 if (!fUseMinEnergy) fUseMinEnergy=1;
1271 AliError(Form("Minimum Energy Cut not defined %d",minEnergy));
1277 //___________________________________________________________________
1278 Bool_t AliCaloPhotonCuts::SetMinNCellsCut(Int_t minNCells)
1282 if (!fUseNCells) fUseNCells=0;
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;
1306 if (!fUseNCells) fUseNCells=1;
1311 AliError(Form("Min N cells Cut not defined %d",minNCells));
1317 //___________________________________________________________________
1318 Bool_t AliCaloPhotonCuts::SetMaxM02(Int_t maxM02)
1322 if (!fUseM02) fUseM02=0;
1326 if (!fUseM02) fUseM02=1;
1330 if (!fUseM02) fUseM02=1;
1334 if (!fUseM02) fUseM02=1;
1338 if (!fUseM02) fUseM02=1;
1342 AliError(Form("Max M02 Cut not defined %d",maxM02));
1348 //___________________________________________________________________
1349 Bool_t AliCaloPhotonCuts::SetMinM02(Int_t minM02)
1353 if (!fUseM02) fUseM02=0;
1357 if (!fUseM02) fUseM02=1;
1361 AliError(Form("Min M02 not defined %d",minM02));
1367 //___________________________________________________________________
1368 Bool_t AliCaloPhotonCuts::SetMaxM20(Int_t maxM20)
1372 if (!fUseM20) fUseM20=0;
1376 if (!fUseM20) fUseM20=1;
1380 AliError(Form("Max M20 Cut not defined %d",maxM20));
1386 //___________________________________________________________________
1387 Bool_t AliCaloPhotonCuts::SetMinM20(Int_t minM20)
1391 if (!fUseM20) fUseM20=0;
1395 if (!fUseM20) fUseM20=1;
1399 AliError(Form("Min M20 Cut not defined %d",minM20));
1405 //___________________________________________________________________
1406 Bool_t AliCaloPhotonCuts::SetDispersion(Int_t dispersion)
1410 if (!fUseDispersion) fUseDispersion=0;
1411 fMaxDispersion =100;
1414 if (!fUseDispersion) fUseDispersion=1;
1418 AliError(Form("Maximum Dispersion Cut not defined %d",dispersion));
1424 //___________________________________________________________________
1425 Bool_t AliCaloPhotonCuts::SetNLM(Int_t nlm)
1429 if (!fUseNLM) fUseNLM=0;
1434 if (!fUseNLM) fUseNLM=1;
1439 AliError(Form("NLM Cut not defined %d",nlm));
1445 ///________________________________________________________________________
1446 TString AliCaloPhotonCuts::GetCutNumber(){
1447 // returns TString with current cut number
1449 for(Int_t ii=0;ii<kNCuts;ii++){
1450 a.Append(Form("%d",fCuts[ii]));