AliPhysics  9b6b435 (9b6b435)
AliConversionMesonCuts.cxx
Go to the documentation of this file.
1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Authors: Svein Lindal, Daniel Lohner *
5 * Version 1.0 *
6 * *
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 **************************************************************************/
15 
17 //---------------------------------------------
18 // Class handling all kinds of selection cuts for
19 // Gamma Conversion analysis
20 //---------------------------------------------
22 
23 #include "AliConversionMesonCuts.h"
24 
25 #include "AliKFVertex.h"
26 #include "AliAODTrack.h"
27 #include "AliESDtrack.h"
28 #include "AliAnalysisManager.h"
29 #include "AliInputEventHandler.h"
30 #include "AliMCEventHandler.h"
31 #include "AliAODHandler.h"
32 #include "AliPIDResponse.h"
33 #include "TH1.h"
34 #include "TH2.h"
35 #include "AliMCEvent.h"
36 #include "AliAODConversionMother.h"
37 #include "TObjString.h"
38 #include "AliAODEvent.h"
39 #include "AliESDEvent.h"
40 #include "AliCentrality.h"
41 #include "TList.h"
42 #include "TPDGCode.h"
43 #include "TDatabasePDG.h"
44 #include "AliAODMCParticle.h"
45 
46 class iostream;
47 
48 using namespace std;
49 
51 ClassImp(AliConversionMesonCuts)
53 
54 
55 const char* AliConversionMesonCuts::fgkCutNames[AliConversionMesonCuts::kNCuts] = {
56  "MesonKind", //0
57  "BackgroundScheme", //1
58  "NumberOfBGEvents", //2
59  "DegreesForRotationMethod", //3
60  "RapidityMesonCut", //4
61  "PtCut", //5
62  "AlphaMesonCut", //6
63  "SelectionWindow", //7
64  "SharedElectronCuts", //8
65  "RejectToCloseV0s", //9
66  "UseMCPSmearing", //10
67  "DcaGammaGamma", //11
68  "DcaRPrimVtx", //12
69  "DcaZPrimVtx", //13
70  "MinOpanMesonCut", //14
71  "MaxOpanMesonCut" //15
72 };
73 
74 
75 //________________________________________________________________________
77  AliAnalysisCuts(name,title),
78  fRandom(0),
79  fCaloPhotonCuts(NULL),
80  fHistograms(NULL),
81  fCutString(NULL),
82  fCutStringRead(""),
83  fHistoMesonCuts(NULL),
84  fHistoMesonBGCuts(NULL),
85  fHistoDCAGGMesonBefore(NULL),
86  fHistoDCAZMesonPrimVtxBefore(NULL),
87  fHistoDCARMesonPrimVtxBefore(NULL),
88  fHistoDCAGGMesonAfter(NULL),
89  fHistoDCAZMesonPrimVtxAfter(NULL),
90  fHistoDCARMesonPrimVtxAfter(NULL),
91  fHistoInvMassBefore(NULL),
92  fHistoInvMassAfter(NULL),
93  fBrem(NULL),
94  fFAlphaCut(NULL),
95  fFMinOpanCut(NULL),
96  fFMaxOpanCut(NULL),
97  fMaxR(180),
98  fMinPt(0.),
99  fSelectionLow(0.0),
100  fSelectionHigh(4),
101  fAlphaMinCutMeson(0),
102  fAlphaCutMeson(1),
103  fRapidityCutMeson(1),
104  fMinV0Dist(200.),
105  fPBremSmearing(0),
106  fPSigSmearing(0),
107  fPSigSmearingCte(0),
108  fDCAGammaGammaCut(1000),
109  fDCAZMesonPrimVtxCut(1000),
110  fDCARMesonPrimVtxCut(1000),
111  fMinOpanCutMeson(0),
112  fMaxOpanCutMeson(TMath::Pi()),
113  fSidebandMixingLow(0.180),
114  fSidebandMixingHigh(0.300),
115  fSidebandMixingLeftLow(0.05),
116  fSidebandMixingLeftHigh(0.100),
117  fSidebandMixingRightLow(0.180),
118  fSidebandMixingRightHigh(0.300),
119  fOpeningAngle(0.005),
120  fMode(0),
121  fMesonKind(0),
122  fIsMergedClusterCut(0),
123  fSelectionWindowCut(-1),
124  fNDegreeRotationPMForBG(0),
125  fNumberOfBGEvents(0),
126  fElectronLabelArraySize(500),
127  fElectronLabelArray(NULL),
128  fBackgroundHandler(0),
129  fDoLightOutput(kFALSE),
130  fDoMinPtCut(kFALSE),
131  fEnableMassCut(kFALSE),
132  fAcceptMesonMass(kTRUE),
133  fUseRotationMethodInBG(kFALSE),
134  fUsePtmaxMethodForBG(kFALSE),
135  fDoBG(kTRUE),
136  fDoBGProbability(kFALSE),
137  fDoConvCaloMixing(kFALSE),
138  fDoSectorMixing(kFALSE),
139  fDoSectorJetMixing(kFALSE),
140  fDoJetMixing(kFALSE),
141  fDoJetRotateMixing(kFALSE),
142  fDoJetPtMixing(kFALSE),
143  fDoSphericityMixing(kFALSE),
144  fUseTrackMultiplicityForBG(kFALSE),
145  fEnableMinOpeningAngleCut(kTRUE),
146  fEnableOneCellDistCut(kFALSE),
147  fDoToCloseV0sCut(kFALSE),
148  fDoSharedElecCut(kFALSE),
149  fUseMCPSmearing(kFALSE),
150  fAlphaPtDepCut(kFALSE),
151  fDCAGammaGammaCutOn(kFALSE),
152  fDCAZMesonPrimVtxCutOn(kFALSE),
153  fDCARMesonPrimVtxCutOn(kFALSE),
154  fMinOpanPtDepCut(kFALSE),
155  fMaxOpanPtDepCut(kFALSE),
156  fBackgroundUseSideband(kFALSE),
157  fBackgroundUseSidebandBothSides(kFALSE),
158  fBackgroundUseLikeSign(kFALSE),
159  fDoJetAnalysis(kFALSE),
160  fDoJetQA(kFALSE)
161 {
162  for(Int_t jj=0;jj<kNCuts;jj++){fCuts[jj]=0;}
163  fCutString=new TObjString((GetCutNumber()).Data());
165  if (fBrem == NULL){
166  fBrem = new TF1("fBrem","pow(-log(x),[0]/log(2.0)-1.0)/TMath::Gamma([0]/log(2.0))",0.00001,0.999999999);
167  // tests done with 1.0e-14
168  fBrem->SetParameter(0,fPBremSmearing);
169  fBrem->SetNpx(100000);
170  }
171 }
172 
173 //________________________________________________________________________
175  AliAnalysisCuts(ref),
176  fRandom(ref.fRandom),
178  fHistograms(NULL),
179  fCutString(NULL),
180  fCutStringRead(""),
181  fHistoMesonCuts(NULL),
182  fHistoMesonBGCuts(NULL),
186  fHistoDCAGGMesonAfter(NULL),
189  fHistoInvMassBefore(NULL),
190  fHistoInvMassAfter(NULL),
191  fBrem(NULL),
192  fFAlphaCut(NULL),
193  fFMinOpanCut(NULL),
194  fFMaxOpanCut(NULL),
195  fMaxR(ref.fMaxR),
196  fMinPt(ref.fMinPt),
202  fMinV0Dist(ref.fMinV0Dist),
218  fMode(ref.fMode),
219  fMesonKind(ref.fMesonKind),
225  fElectronLabelArray(NULL),
233  fDoBG(ref.fDoBG),
258  fDoJetQA(ref.fDoJetQA)
259 
260 {
261  // Copy Constructor
262  for(Int_t jj=0;jj<kNCuts;jj++){fCuts[jj]=ref.fCuts[jj];}
263  fCutString=new TObjString((GetCutNumber()).Data());
265  if (fBrem == NULL)fBrem = (TF1*)ref.fBrem->Clone("fBrem");
266  // Histograms are not copied, if you need them, call InitCutHistograms
267 }
268 
269 
270 //________________________________________________________________________
272  // Destructor
273  //Deleting fHistograms leads to seg fault it it's added to output collection of a task
274  // if(fHistograms)
275  // delete fHistograms;
276  // fHistograms = NULL;
277  if(fCutString != NULL){
278  delete fCutString;
279  fCutString = NULL;
280  }
282  delete fElectronLabelArray;
283  fElectronLabelArray = NULL;
284  }
285 
286  if(fFAlphaCut != NULL){
287  delete fFAlphaCut;
288  fFAlphaCut = NULL;
289  }
290  if(fBrem != NULL){
291  delete fBrem;
292  fBrem = NULL;
293  }
294  if(fFMinOpanCut != NULL){
295  delete fFMinOpanCut;
296  fFMinOpanCut = NULL;
297  }
298  if(fFMaxOpanCut != NULL){
299  delete fFMaxOpanCut;
300  fFMaxOpanCut = NULL;
301  }
302 }
303 
304 //________________________________________________________________________
306 
307  // Initialize Cut Histograms for QA (only initialized and filled if function is called)
308  TH1::AddDirectory(kFALSE);
309 
310  if(fHistograms != NULL){
311  delete fHistograms;
312  fHistograms=NULL;
313  }
314  if(fHistograms==NULL){
315  fHistograms=new TList();
316  fHistograms->SetOwner(kTRUE);
317  if(name=="")fHistograms->SetName(Form("ConvMesonCuts_%s",GetCutNumber().Data()));
318  else fHistograms->SetName(Form("%s_%s",name.Data(),GetCutNumber().Data()));
319  }
320 
321  // Meson Cuts
322  if (fIsMergedClusterCut == 1){
323  fHistoMesonCuts=new TH2F(Form("MesonCuts %s",GetCutNumber().Data()),"MesonCuts vs Pt",9,-0.5,8.5, 500, 0, 100);
324  fHistoMesonCuts->GetXaxis()->SetBinLabel(1,"in");
325  fHistoMesonCuts->GetXaxis()->SetBinLabel(2,"undef rapidity");
326  fHistoMesonCuts->GetXaxis()->SetBinLabel(3,"rapidity cut");
327  fHistoMesonCuts->GetXaxis()->SetBinLabel(4,"mass cut");
328  fHistoMesonCuts->GetXaxis()->SetBinLabel(5,"opening angle");
329  fHistoMesonCuts->GetXaxis()->SetBinLabel(6,"alpha max");
330  fHistoMesonCuts->GetXaxis()->SetBinLabel(7,"alpha min");
331  fHistoMesonCuts->GetXaxis()->SetBinLabel(8,"pT min");
332  fHistoMesonCuts->GetXaxis()->SetBinLabel(9,"out");
334  } else if (fIsMergedClusterCut == 2){
335  fHistoMesonCuts=new TH2F(Form("MesonCuts %s",GetCutNumber().Data()),"MesonCuts vs Pt",9,-0.5,8.5, 250, 0, 50);
336  fHistoMesonCuts->GetXaxis()->SetBinLabel(1,"in");
337  fHistoMesonCuts->GetXaxis()->SetBinLabel(2,"undef rapidity");
338  fHistoMesonCuts->GetXaxis()->SetBinLabel(3,"rapidity cut");
339  fHistoMesonCuts->GetXaxis()->SetBinLabel(4,"1 cell distance");
340  fHistoMesonCuts->GetXaxis()->SetBinLabel(5,"opening angle");
341  fHistoMesonCuts->GetXaxis()->SetBinLabel(6,"alpha max");
342  fHistoMesonCuts->GetXaxis()->SetBinLabel(7,"alpha min");
343  fHistoMesonCuts->GetXaxis()->SetBinLabel(8,"pT min");
344  fHistoMesonCuts->GetXaxis()->SetBinLabel(9,"out");
346 
347  fHistoMesonBGCuts=new TH2F(Form("MesonBGCuts %s",GetCutNumber().Data()),"MesonBGCuts vs Pt",9,-0.5,8.5, 250, 0, 50);
348  fHistoMesonBGCuts->GetXaxis()->SetBinLabel(1,"in");
349  fHistoMesonBGCuts->GetXaxis()->SetBinLabel(2,"undef rapidity");
350  fHistoMesonBGCuts->GetXaxis()->SetBinLabel(3,"rapidity cut");
351  fHistoMesonBGCuts->GetXaxis()->SetBinLabel(4,"1 cell distance");
352  fHistoMesonBGCuts->GetXaxis()->SetBinLabel(5,"opening angle");
353  fHistoMesonBGCuts->GetXaxis()->SetBinLabel(6,"alpha max");
354  fHistoMesonBGCuts->GetXaxis()->SetBinLabel(7,"alpha min");
355  fHistoMesonBGCuts->GetXaxis()->SetBinLabel(8,"pT min");
356  fHistoMesonBGCuts->GetXaxis()->SetBinLabel(9,"out");
358  } else {
359  fHistoMesonCuts=new TH2F(Form("MesonCuts %s",GetCutNumber().Data()),"MesonCuts vs Pt",11,-0.5,10.5, 250, 0, 50);
360  fHistoMesonCuts->GetXaxis()->SetBinLabel(1,"in");
361  fHistoMesonCuts->GetXaxis()->SetBinLabel(2,"undef rapidity");
362  fHistoMesonCuts->GetXaxis()->SetBinLabel(3,"rapidity cut");
363  fHistoMesonCuts->GetXaxis()->SetBinLabel(4,"opening angle");
364  fHistoMesonCuts->GetXaxis()->SetBinLabel(5,"alpha max");
365  fHistoMesonCuts->GetXaxis()->SetBinLabel(6,"alpha min");
366  fHistoMesonCuts->GetXaxis()->SetBinLabel(7,"dca gamma gamma");
367  fHistoMesonCuts->GetXaxis()->SetBinLabel(8,"dca R prim Vtx");
368  fHistoMesonCuts->GetXaxis()->SetBinLabel(9,"dca Z prim Vtx");
369  fHistoMesonCuts->GetXaxis()->SetBinLabel(10,"pT min");
370  fHistoMesonCuts->GetXaxis()->SetBinLabel(11,"out");
372 
373  fHistoMesonBGCuts=new TH2F(Form("MesonBGCuts %s",GetCutNumber().Data()),"MesonBGCuts vs Pt",11,-0.5,10.5, 250, 0, 50);
374  fHistoMesonBGCuts->GetXaxis()->SetBinLabel(1,"in");
375  fHistoMesonBGCuts->GetXaxis()->SetBinLabel(2,"undef rapidity");
376  fHistoMesonBGCuts->GetXaxis()->SetBinLabel(3,"rapidity cut");
377  fHistoMesonBGCuts->GetXaxis()->SetBinLabel(4,"opening angle");
378  fHistoMesonBGCuts->GetXaxis()->SetBinLabel(5,"alpha max");
379  fHistoMesonBGCuts->GetXaxis()->SetBinLabel(6,"alpha min");
380  fHistoMesonBGCuts->GetXaxis()->SetBinLabel(7,"dca gamma gamma");
381  fHistoMesonBGCuts->GetXaxis()->SetBinLabel(8,"dca R prim Vtx");
382  fHistoMesonBGCuts->GetXaxis()->SetBinLabel(9,"dca Z prim Vtx");
383  fHistoMesonBGCuts->GetXaxis()->SetBinLabel(10,"pT min");
384  fHistoMesonBGCuts->GetXaxis()->SetBinLabel(11,"out");
386  }
387 
388  if(!fDoLightOutput){
389  if (fIsMergedClusterCut == 1){
390  fHistoInvMassBefore=new TH1F(Form("InvMassMeson Before %s",GetCutNumber().Data()),"InvMassMeson Before",1000,0,1);
392  fHistoInvMassAfter=new TH1F(Form("InvMassMeson After %s",GetCutNumber().Data()),"InvMassMeson After",1000,0,1);
394  }
395 
396  if (additionalHists && fIsMergedClusterCut== 0){
397  fHistoDCAGGMesonBefore=new TH1F(Form("DCAGammaGammaMeson Before %s",GetCutNumber().Data()),"DCAGammaGammaMeson Before",200,0,10);
399 
400  fHistoDCARMesonPrimVtxBefore=new TH1F(Form("DCARMesonPrimVtx Before %s",GetCutNumber().Data()),"DCARMesonPrimVtx Before",200,0,10);
402 
403  fHistoDCAZMesonPrimVtxBefore=new TH1F(Form("DCAZMesonPrimVtx Before %s",GetCutNumber().Data()),"DCAZMesonPrimVtx Before",401,-10,10);
405  }
406 
407  if (fIsMergedClusterCut == 0){
408  fHistoDCAGGMesonAfter=new TH1F(Form("DCAGammaGammaMeson After %s",GetCutNumber().Data()),"DCAGammaGammaMeson After",200,0,10);
410 
411  fHistoDCAZMesonPrimVtxAfter=new TH2F(Form("InvMassDCAZMesonPrimVtx After %s",GetCutNumber().Data()),"InvMassDCAZMesonPrimVtx After",800,0,0.8,401,-10,10);
413 
414  fHistoDCARMesonPrimVtxAfter=new TH1F(Form("DCARMesonPrimVtx After %s",GetCutNumber().Data()),"DCARMesonPrimVtx After",200,0,10);
416  }
417  }
418 
419  TH1::AddDirectory(kTRUE);
420 }
421 
422 //________________________________________________________________________
423 Bool_t AliConversionMesonCuts::MesonIsSelectedMC(TParticle *fMCMother,AliMCEvent *mcEvent, Double_t fRapidityShift){
424  // Returns true for all pions within acceptance cuts for decay into 2 photons
425  // If bMCDaughtersInAcceptance is selected, it requires in addition that both daughter photons are within acceptance cuts
426 
427  if(!mcEvent)return kFALSE;
428 
429  if(fMCMother->GetPdgCode()==111 || fMCMother->GetPdgCode()==221 || fMCMother->GetPdgCode()==331 ){
430  if(fMCMother->R()>fMaxR) return kFALSE; // cuts on distance from collision point
431 
432  Double_t rapidity = 10.;
433  if(fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0){
434  rapidity=8.-fRapidityShift;
435  } else{
436  rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
437  }
438 
439  // Rapidity Cut
440  if(TMath::Abs(rapidity)>fRapidityCutMeson)return kFALSE;
441 
442  // min Pt Cut
443  if(fDoMinPtCut && (fMCMother->Pt() < fMinPt)) return kFALSE;
444 
445  // Select only -> 2y decay channel
446  if(fMCMother->GetNDaughters()!=2)return kFALSE;
447 
448  for(Int_t i=0;i<2;i++){
449  if(fMCMother->GetDaughter(i) < 0) return kFALSE;
450  TParticle *MDaughter=mcEvent->Particle(fMCMother->GetDaughter(i));
451  // Is Daughter a Photon?
452  if(MDaughter->GetPdgCode()!=22)return kFALSE;
453  // Is Photon in Acceptance?
454  // if(bMCDaughtersInAcceptance){
455  // if(!PhotonIsSelectedMC(MDaughter,mcEvent)){return kFALSE;}
456  // }
457  }
458  return kTRUE;
459  }
460  return kFALSE;
461 }
462 
463 //________________________________________________________________________
464 Bool_t AliConversionMesonCuts::MesonIsSelectedAODMC(AliAODMCParticle *MCMother,TClonesArray *AODMCArray, Double_t fRapidityShift){
465  // Returns true for all pions within acceptance cuts for decay into 2 photons
466  // If bMCDaughtersInAcceptance is selected, it requires in addition that both daughter photons are within acceptance cuts
467 
468  if(!AODMCArray)return kFALSE;
469 
470  if(MCMother->GetPdgCode()==111 || MCMother->GetPdgCode()==221 || MCMother->GetPdgCode()==331 ){
471  Double_t rMeson = sqrt( (MCMother->Xv()*MCMother->Xv()) + (MCMother->Yv()*MCMother->Yv()) ) ;
472  if(rMeson>fMaxR) return kFALSE; // cuts on distance from collision point
473 
474  Double_t rapidity = 10.;
475  if(MCMother->E() - MCMother->Pz() == 0 || MCMother->E() + MCMother->Pz() == 0){
476  rapidity=8.-fRapidityShift;
477  } else{
478  rapidity = 0.5*(TMath::Log((MCMother->E()+MCMother->Pz()) / (MCMother->E()-MCMother->Pz())))-fRapidityShift;
479  }
480 
481  // Rapidity Cut
482  if(TMath::Abs(rapidity)>fRapidityCutMeson)return kFALSE;
483 
484  // min Pt Cut
485  if(fDoMinPtCut && (MCMother->Pt() < fMinPt)) return kFALSE;
486 
487  // Select only -> 2y decay channel
488  if(MCMother->GetNDaughters()!=2)return kFALSE;
489 
490  for(Int_t i=0;i<2;i++){
491  AliAODMCParticle *MDaughter=static_cast<AliAODMCParticle*>(AODMCArray->At(MCMother->GetDaughter(i)));
492  // Is Daughter a Photon?
493  if(MDaughter->GetPdgCode()!=22)return kFALSE;
494  // Is Photon in Acceptance?
495  // if(bMCDaughtersInAcceptance){
496  // if(!PhotonIsSelectedMC(MDaughter,mcEvent)){return kFALSE;}
497  // }
498  }
499  return kTRUE;
500  }
501  return kFALSE;
502 }
503 
504 //________________________________________________________________________
505 Bool_t AliConversionMesonCuts::MesonIsSelectedMCDalitz(TParticle *fMCMother,AliMCEvent *mcEvent, Int_t &labelelectron, Int_t &labelpositron, Int_t &labelgamma, Double_t fRapidityShift){
506 
507  // Returns true for all pions within acceptance cuts for decay into 2 photons
508  // If bMCDaughtersInAcceptance is selected, it requires in addition that both daughter photons are within acceptance cuts
509 
510  if( !mcEvent )return kFALSE;
511 
512  if( fMCMother->GetPdgCode() != 111 && fMCMother->GetPdgCode() != 221 && fMCMother->GetPdgCode() != 331) return kFALSE;
513 
514  if( fMCMother->R()>fMaxR ) return kFALSE; // cuts on distance from collision point
515 
516  Double_t rapidity = 10.;
517 
518  if( fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0 ){
519  rapidity=8.-fRapidityShift;
520  }
521  else{
522  rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
523  }
524 
525  // Rapidity Cut
526  if( TMath::Abs(rapidity) > fRapidityCutMeson )return kFALSE;
527 
528  // min Pt Cut
529  if(fDoMinPtCut && (fMCMother->Pt() < fMinPt)) return kFALSE;
530 
531  // Select only -> Dalitz decay channel
532  if( fMCMother->GetNDaughters() != 3 )return kFALSE;
533 
534  TParticle *positron = 0x0;
535  TParticle *electron = 0x0;
536  TParticle *gamma = 0x0;
537 
538  for(Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
539  if(index < 0) continue;
540  TParticle* temp = (TParticle*)mcEvent->Particle( index );
541 
542  switch( temp->GetPdgCode() ) {
543  case ::kPositron:
544  positron = temp;
545  labelpositron = index;
546  break;
548  electron = temp;
549  labelelectron = index;
550  break;
551  case ::kGamma:
552  gamma = temp;
553  labelgamma = index;
554  break;
555  }
556  }
557 
558  if( positron && electron && gamma) return kTRUE;
559  return kFALSE;
560 }
561 
562 //________________________________________________________________________
563 Bool_t AliConversionMesonCuts::MesonIsSelectedAODMCDalitz(AliAODMCParticle *fMCMother,TClonesArray *AODMCArray, Int_t &labelelectron, Int_t &labelpositron, Int_t &labelgamma, Double_t fRapidityShift){
564 
565  // Returns true for all pions within acceptance cuts for decay into 2 photons
566  // If bMCDaughtersInAcceptance is selected, it requires in addition that both daughter photons are within acceptance cuts
567 
568  if( !AODMCArray )return kFALSE;
569 
570  if( fMCMother->GetPdgCode() != 111 && fMCMother->GetPdgCode() != 221 && fMCMother->GetPdgCode() != 331 ) return kFALSE;
571 
572  Double_t rMeson = sqrt( (fMCMother->Xv()*fMCMother->Xv()) + (fMCMother->Yv()*fMCMother->Yv()) ) ;
573  if(rMeson>fMaxR) return kFALSE; // cuts on distance from collision point
574 
575  Double_t rapidity = 10.;
576 
577  if( fMCMother->E() - fMCMother->Pz() == 0 || fMCMother->E() + fMCMother->Pz() == 0 ){
578  rapidity=8.-fRapidityShift;
579  }
580  else{
581  rapidity = 0.5*(TMath::Log((fMCMother->E()+fMCMother->Pz()) / (fMCMother->E()-fMCMother->Pz())))-fRapidityShift;
582  }
583 
584  // Rapidity Cut
585  if( TMath::Abs(rapidity) > fRapidityCutMeson )return kFALSE;
586 
587  // min Pt Cut
588  if(fDoMinPtCut && (fMCMother->Pt() < fMinPt)) return kFALSE;
589 
590  // Select only -> Dalitz decay channel
591  if( fMCMother->GetNDaughters() != 3 )return kFALSE;
592 
593  AliAODMCParticle *positron = 0x0;
594  AliAODMCParticle *electron = 0x0;
595  AliAODMCParticle *gamma = 0x0;
596 
597  for(Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
598  if(index < 0) continue;
599  AliAODMCParticle* temp = static_cast<AliAODMCParticle*>(AODMCArray->At(index));
600  if (!temp) continue;
601 
602  switch( temp->GetPdgCode() ) {
603  case ::kPositron:
604  positron = temp;
605  labelpositron = index;
606  break;
608  electron = temp;
609  labelelectron = index;
610  break;
611  case ::kGamma:
612  gamma = temp;
613  labelgamma = index;
614  break;
615  }
616  }
617 
618  if( positron && electron && gamma) return kTRUE;
619  return kFALSE;
620 }
621 
622 //________________________________________________________________________
623 Bool_t AliConversionMesonCuts::MesonIsSelectedMCEtaPiPlPiMiGamma(TParticle *fMCMother,AliMCEvent *mcEvent, Int_t &labelNegPion, Int_t &labelPosPion, Int_t &labelGamma, Double_t fRapidityShift){
624 
625  // Returns true for all pions within acceptance cuts for decay into 2 photons
626  // If bMCDaughtersInAcceptance is selected, it requires in addition that both daughter photons are within acceptance cuts
627 
628  if( !mcEvent )return kFALSE;
629 
630  if( fMCMother->GetPdgCode() != 221 ) return kFALSE;
631 
632  if( fMCMother->R()>fMaxR ) return kFALSE; // cuts on distance from collision point
633 
634  Double_t rapidity = 10.;
635 
636  if( fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0 ){
637  rapidity=8.-fRapidityShift;
638  }
639  else{
640  rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
641  }
642 
643  // Rapidity Cut
644  if( TMath::Abs(rapidity) > fRapidityCutMeson )return kFALSE;
645 
646  // min Pt Cut
647  if(fDoMinPtCut && (fMCMother->Pt() < fMinPt)) return kFALSE;
648 
649  // Select only -> Dalitz decay channel
650  if( fMCMother->GetNDaughters() != 3 )return kFALSE;
651 
652  TParticle *posPion = 0x0;
653  TParticle *negPion = 0x0;
654  TParticle *gamma = 0x0;
655 
656  for(Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
657  if(index < 0) continue;
658  TParticle* temp = (TParticle*)mcEvent->Particle( index );
659 
660  switch( temp->GetPdgCode() ) {
661  case 211:
662  posPion = temp;
663  labelPosPion = index;
664  break;
665  case -211:
666  negPion = temp;
667  labelNegPion = index;
668  break;
669  case ::kGamma:
670  gamma = temp;
671  labelGamma = index;
672  break;
673  }
674  }
675 
676  if( posPion && negPion && gamma) return kTRUE;
677  return kFALSE;
678 }
679 
680 //________________________________________________________________________
681 Bool_t AliConversionMesonCuts::MesonIsSelectedAODMCEtaPiPlPiMiGamma(AliAODMCParticle *fMCMother,TClonesArray *AODMCArray, Int_t &labelNegPion, Int_t &labelPosPion, Int_t &labelGamma, Double_t fRapidityShift){
682 
683  // Returns true for all pions within acceptance cuts for decay into 2 photons
684  // If bMCDaughtersInAcceptance is selected, it requires in addition that both daughter photons are within acceptance cuts
685 
686  if( !AODMCArray )return kFALSE;
687 
688  if( fMCMother->GetPdgCode() != 221 ) return kFALSE;
689 
690  Double_t rMeson = sqrt( (fMCMother->Xv()*fMCMother->Xv()) + (fMCMother->Yv()*fMCMother->Yv()) ) ;
691  if(rMeson>fMaxR) return kFALSE; // cuts on distance from collision point
692 
693  Double_t rapidity = 10.;
694 
695  if( fMCMother->E() - fMCMother->Pz() == 0 || fMCMother->E() + fMCMother->Pz() == 0 ){
696  rapidity=8.-fRapidityShift;
697  }
698  else{
699  rapidity = 0.5*(TMath::Log((fMCMother->E()+fMCMother->Pz()) / (fMCMother->E()-fMCMother->Pz())))-fRapidityShift;
700  }
701 
702  // Rapidity Cut
703  if( TMath::Abs(rapidity) > fRapidityCutMeson )return kFALSE;
704 
705  // min Pt Cut
706  if(fDoMinPtCut && (fMCMother->Pt() < fMinPt)) return kFALSE;
707 
708  // Select only -> Dalitz decay channel
709  if( fMCMother->GetNDaughters() != 3 )return kFALSE;
710 
711  AliAODMCParticle *posPion = 0x0;
712  AliAODMCParticle *negPion = 0x0;
713  AliAODMCParticle *gamma = 0x0;
714 
715  for(Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
716  if(index < 0) continue;
717  AliAODMCParticle* temp = static_cast<AliAODMCParticle*>(AODMCArray->At(index));
718 
719  switch( temp->GetPdgCode() ) {
720  case 211:
721  posPion = temp;
722  labelPosPion = index;
723  break;
724  case -211:
725  negPion = temp;
726  labelNegPion = index;
727  break;
728  case ::kGamma:
729  gamma = temp;
730  labelGamma = index;
731  break;
732  }
733  }
734 
735  if( posPion && negPion && gamma) return kTRUE;
736  return kFALSE;
737 }
738 
739 //________________________________________________________________________
740 Bool_t AliConversionMesonCuts::MesonIsSelectedMCPiPlPiMiEta(TParticle *fMCMother,AliMCEvent *mcEvent, Int_t &labelNegPion, Int_t &labelPosPion, Int_t &labelEtaMeson, Double_t fRapidityShift){
741 
742  // Returns true for all pions within acceptance cuts for decay into 2 photons
743  // If bMCDaughtersInAcceptance is selected, it requires in addition that both daughter photons are within acceptance cuts
744 
745  if( !mcEvent )return kFALSE;
746 
747  if( !(fMCMother->GetPdgCode() == 331 ) ) return kFALSE;
748 
749  if( fMCMother->R()>fMaxR ) return kFALSE; // cuts on distance from collision point
750 
751  Double_t rapidity = 10.;
752 
753  if( fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0 ){
754  rapidity=8.-fRapidityShift;
755  }
756  else{
757  rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
758  }
759 
760  // Rapidity Cut
761  if( TMath::Abs(rapidity) > fRapidityCutMeson )return kFALSE;
762 
763  // min Pt Cut
764  if(fDoMinPtCut && (fMCMother->Pt() < fMinPt)) return kFALSE;
765 
766  // Select only -> pi+ pi- pi0
767  if( fMCMother->GetNDaughters() != 3 )return kFALSE;
768 
769  TParticle *posPion = 0x0;
770  TParticle *negPion = 0x0;
771  TParticle *etaMeson = 0x0;
772 
773 // cout << "\n"<< fMCMother->GetPdgCode() << "\n" << endl;
774  for(Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
775  if(index < 0) continue;
776  TParticle* temp = (TParticle*)mcEvent->Particle( index );
777 // cout << temp->GetPdgCode() << endl;
778  switch( temp->GetPdgCode() ) {
779  case 211:
780  posPion = temp;
781  labelPosPion = index;
782  break;
783  case -211:
784  negPion = temp;
785  labelNegPion = index;
786  break;
787  case 221:
788  etaMeson = temp;
789  labelEtaMeson = index;
790  break;
791  }
792  }
793 
794  if( posPion && negPion && etaMeson ) return kTRUE;
795  return kFALSE;
796 }
797 //________________________________________________________________________
798 Bool_t AliConversionMesonCuts::MesonIsSelectedAODMCPiPlPiMiEta(AliAODMCParticle *fMCMother,TClonesArray *AODMCArray, Int_t &labelNegPion, Int_t &labelPosPion, Int_t &labelEtaMeson, Double_t fRapidityShift){
799 
800  // Returns true for all pions within acceptance cuts for decay into 2 photons
801  // If bMCDaughtersInAcceptance is selected, it requires in addition that both daughter photons are within acceptance cuts
802 
803  if( !AODMCArray )return kFALSE;
804 
805  if( !(fMCMother->GetPdgCode() == 331 ) ) return kFALSE;
806 
807  Double_t rMeson = sqrt( (fMCMother->Xv()*fMCMother->Xv()) + (fMCMother->Yv()*fMCMother->Yv()) ) ;
808  if( rMeson >fMaxR ) return kFALSE; // cuts on distance from collision point
809 
810  Double_t rapidity = 10.;
811 
812  if( fMCMother->E() - fMCMother->Pz() == 0 || fMCMother->E() + fMCMother->Pz() == 0 ){
813  rapidity=8.-fRapidityShift;
814  }
815  else{
816  rapidity = 0.5*(TMath::Log((fMCMother->E()+fMCMother->Pz()) / (fMCMother->E()-fMCMother->Pz())))-fRapidityShift;
817  }
818 
819  // Rapidity Cut
820  if( TMath::Abs(rapidity) > fRapidityCutMeson )return kFALSE;
821 
822  // min Pt Cut
823  if(fDoMinPtCut && (fMCMother->Pt() < fMinPt)) return kFALSE;
824 
825  // Select only -> pi+ pi- pi0
826  if( fMCMother->GetNDaughters() != 3 )return kFALSE;
827 
828  AliAODMCParticle *posPion = 0x0;
829  AliAODMCParticle *negPion = 0x0;
830  AliAODMCParticle *etaMeson = 0x0;
831 
832 // cout << "\n"<< fMCMother->GetPdgCode() << "\n" << endl;
833  for(Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
834  if(index < 0) continue;
835  AliAODMCParticle* temp = static_cast<AliAODMCParticle*>(AODMCArray->At(index));
836 // cout << temp->GetPdgCode() << endl;
837  switch( temp->GetPdgCode() ) {
838  case 211:
839  posPion = temp;
840  labelPosPion = index;
841  break;
842  case -211:
843  negPion = temp;
844  labelNegPion = index;
845  break;
846  case 221:
847  etaMeson = temp;
848  labelEtaMeson = index;
849  break;
850  }
851  }
852 
853  if( posPion && negPion && etaMeson ) return kTRUE;
854  return kFALSE;
855 }
856 //________________________________________________________________________
857 Bool_t AliConversionMesonCuts::MesonIsSelectedMCPiPlPiMiPiZero(TParticle *fMCMother,AliMCEvent *mcEvent, Int_t &labelNegPion, Int_t &labelPosPion, Int_t &labelNeutPion, Double_t fRapidityShift){
858 
859  // Returns true for all pions within acceptance cuts for decay into 2 photons
860  // If bMCDaughtersInAcceptance is selected, it requires in addition that both daughter photons are within acceptance cuts
861 
862  if( !mcEvent )return kFALSE;
863 
864  if( !(fMCMother->GetPdgCode() == 221 || fMCMother->GetPdgCode() == 223 || fMCMother->GetPdgCode() == 421) ) return kFALSE;
865 
866  if( fMCMother->R()>fMaxR ) return kFALSE; // cuts on distance from collision point
867 
868  Double_t rapidity = 10.;
869 
870  if( fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0 ){
871  rapidity=8.-fRapidityShift;
872  }
873  else{
874  rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
875  }
876 
877  // Rapidity Cut
878  if( TMath::Abs(rapidity) > fRapidityCutMeson )return kFALSE;
879 
880  // min Pt Cut
881  if(fDoMinPtCut && (fMCMother->Pt() < fMinPt)) return kFALSE;
882 
883  // Select only -> pi+ pi- pi0
884  if( fMCMother->GetNDaughters() != 3 )return kFALSE;
885 
886  TParticle *posPion = 0x0;
887  TParticle *negPion = 0x0;
888  TParticle *neutPion = 0x0;
889 
890 // cout << "\n"<< fMCMother->GetPdgCode() << "\n" << endl;
891  for(Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
892  if(index < 0) continue;
893  TParticle* temp = (TParticle*)mcEvent->Particle( index );
894 // cout << temp->GetPdgCode() << endl;
895  switch( temp->GetPdgCode() ) {
896  case 211:
897  posPion = temp;
898  labelPosPion = index;
899  break;
900  case -211:
901  negPion = temp;
902  labelNegPion = index;
903  break;
904  case 111:
905  neutPion = temp;
906  labelNeutPion = index;
907  break;
908  }
909  }
910 
911  if( posPion && negPion && neutPion ) return kTRUE;
912  return kFALSE;
913 }
914 
915 //________________________________________________________________________
916 Bool_t AliConversionMesonCuts::MesonIsSelectedAODMCPiPlPiMiPiZero(AliAODMCParticle *fMCMother,TClonesArray *AODMCArray, Int_t &labelNegPion, Int_t &labelPosPion, Int_t &labelNeutPion, Double_t fRapidityShift){
917 
918  // Returns true for all pions within acceptance cuts for decay into 2 photons
919  // If bMCDaughtersInAcceptance is selected, it requires in addition that both daughter photons are within acceptance cuts
920 
921  if( !AODMCArray )return kFALSE;
922 
923  if( !(fMCMother->GetPdgCode() == 221 || fMCMother->GetPdgCode() == 223 || fMCMother->GetPdgCode() == 421) ) return kFALSE;
924 
925  Double_t rMeson = sqrt( (fMCMother->Xv()*fMCMother->Xv()) + (fMCMother->Yv()*fMCMother->Yv()) ) ;
926  if( rMeson >fMaxR ) return kFALSE; // cuts on distance from collision point
927 
928  Double_t rapidity = 10.;
929 
930  if( fMCMother->E() - fMCMother->Pz() == 0 || fMCMother->E() + fMCMother->Pz() == 0 ){
931  rapidity=8.-fRapidityShift;
932  }
933  else{
934  rapidity = 0.5*(TMath::Log((fMCMother->E()+fMCMother->Pz()) / (fMCMother->E()-fMCMother->Pz())))-fRapidityShift;
935  }
936 
937  // Rapidity Cut
938  if( TMath::Abs(rapidity) > fRapidityCutMeson )return kFALSE;
939 
940  // min Pt Cut
941  if(fDoMinPtCut && (fMCMother->Pt() < fMinPt)) return kFALSE;
942 
943  // Select only -> pi+ pi- pi0
944  if( fMCMother->GetNDaughters() != 3 )return kFALSE;
945 
946  AliAODMCParticle *posPion = 0x0;
947  AliAODMCParticle *negPion = 0x0;
948  AliAODMCParticle *neutPion = 0x0;
949 
950 // cout << "\n"<< fMCMother->GetPdgCode() << "\n" << endl;
951  for(Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
952  if(index < 0) continue;
953  AliAODMCParticle* temp = static_cast<AliAODMCParticle*>(AODMCArray->At(index));
954 // cout << temp->GetPdgCode() << endl;
955  switch( temp->GetPdgCode() ) {
956  case 211:
957  posPion = temp;
958  labelPosPion = index;
959  break;
960  case -211:
961  negPion = temp;
962  labelNegPion = index;
963  break;
964  case 111:
965  neutPion = temp;
966  labelNeutPion = index;
967  break;
968  }
969  }
970 
971  if( posPion && negPion && neutPion ) return kTRUE;
972  return kFALSE;
973 }
974 
975 //________________________________________________________________________
976 Bool_t AliConversionMesonCuts::MesonIsSelectedMCPiZeroGamma(TParticle *fMCMother, AliMCEvent *mcEvent, Int_t &labelNeutPion, Int_t &labelGamma, Double_t fRapidityShift){
977  // returns true for omegas decaying into pi0 + gamma within the rapidity window
978 
979  if(!mcEvent) return kFALSE;
980 
981  if(fMCMother->GetPdgCode()!=223) return kFALSE; // we only want omegas
982 
983  Double_t rapidity = 10.;
984 
985  if(fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0){
986  rapidity=8.-fRapidityShift;
987  }
988  else{
989  rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
990  }
991 
992  // Rapidity Cut
993  if(TMath::Abs(rapidity) > fRapidityCutMeson)return kFALSE;
994 
995  // min Pt Cut
996  if(fDoMinPtCut && (fMCMother->Pt() < fMinPt)) return kFALSE;
997 
998  if(fMCMother->GetNDaughters()!=2) return kFALSE;
999 
1000  TParticle *gamma = 0x0;
1001  TParticle *pi0 = 0x0;
1002 
1003  for(Int_t index = fMCMother->GetFirstDaughter();index <= fMCMother->GetLastDaughter();index++){
1004  if(index < 0) continue;
1005  TParticle *temp = (TParticle*)mcEvent->Particle(index);
1006  switch(temp->GetPdgCode()){
1007  case 22:
1008  gamma = temp;
1009  labelGamma = index;
1010  break;
1011  case 111:
1012  pi0 = temp;
1013  labelNeutPion = index;
1014  break;
1015  }
1016  }
1017 
1018  if(gamma && pi0) return kTRUE;
1019  return kFALSE;
1020 
1021 }
1022 
1023 //________________________________________________________________________
1024 Bool_t AliConversionMesonCuts::MesonIsSelectedAODMCPiZeroGamma(AliAODMCParticle *fMCMother, TClonesArray *AODMCArray, Int_t &labelNeutPion, Int_t &labelGamma, Double_t fRapidityShift){
1025  // returns true for omegas decaying into pi0 + gamma within the rapidity window
1026 
1027  if(!AODMCArray) return kFALSE;
1028 
1029  if(fMCMother->GetPdgCode()!=223) return kFALSE; // we only want omegas
1030 
1031  Double_t rapidity = 10.;
1032 
1033  if(fMCMother->E() - fMCMother->Pz() == 0 || fMCMother->E() + fMCMother->Pz() == 0){
1034  rapidity=8.-fRapidityShift;
1035  }
1036  else{
1037  rapidity = 0.5*(TMath::Log((fMCMother->E()+fMCMother->Pz()) / (fMCMother->E()-fMCMother->Pz())))-fRapidityShift;
1038  }
1039 
1040  // Rapidity Cut
1041  if(TMath::Abs(rapidity) > fRapidityCutMeson)return kFALSE;
1042 
1043  // min Pt Cut
1044  if(fDoMinPtCut && (fMCMother->Pt() < fMinPt)) return kFALSE;
1045 
1046  if(fMCMother->GetNDaughters()!=2) return kFALSE;
1047 
1048  AliAODMCParticle *gamma = 0x0;
1049  AliAODMCParticle *pi0 = 0x0;
1050 
1051  for(Int_t index = fMCMother->GetFirstDaughter();index <= fMCMother->GetLastDaughter();index++){
1052  if(index < 0) continue;
1053  AliAODMCParticle* temp = static_cast<AliAODMCParticle*>(AODMCArray->At(index));
1054  switch(temp->GetPdgCode()){
1055  case 22:
1056  gamma = temp;
1057  labelGamma = index;
1058  break;
1059  case 111:
1060  pi0 = temp;
1061  labelNeutPion = index;
1062  break;
1063  }
1064  }
1065 
1066  if(gamma && pi0) return kTRUE;
1067  return kFALSE;
1068 
1069 }
1070 
1071 //________________________________________________________________________
1073 
1074  if(!DoPiZeroAngleCut) return kTRUE;
1075 
1076  Double_t PiZeroGammaAngle = pi0->Angle(gamma->Vect());
1077  Double_t omegaPt = omega->Pt();
1078 
1079  if(PiZeroGammaAngle > lowerFactor * maxfit->Eval(omegaPt) && PiZeroGammaAngle < upperFactor * maxfit->Eval(omegaPt)) return kTRUE;
1080  return kFALSE;
1081 
1082 }
1083 
1084 //________________________________________________________________________
1085 Bool_t AliConversionMesonCuts::MesonIsSelectedMCChiC(TParticle *fMCMother,AliMCEvent *mcEvent,Int_t & labelelectronChiC, Int_t & labelpositronChiC, Int_t & labelgammaChiC, Double_t fRapidityShift){
1086  // Returns true for all ChiC within acceptance cuts for decay into JPsi + gamma -> e+ + e- + gamma
1087  // If bMCDaughtersInAcceptance is selected, it requires in addition that both daughter photons are within acceptance cuts
1088 
1089  if(!mcEvent)return kFALSE;
1090  // if(fMCMother->GetPdgCode()==20443 ){
1091  // return kFALSE;
1092  // }
1093  if(fMCMother->GetPdgCode()==10441 || fMCMother->GetPdgCode()==10443 || fMCMother->GetPdgCode()==445 ){
1094  if(fMCMother->R()>fMaxR) return kFALSE; // cuts on distance from collision point
1095 
1096  Double_t rapidity = 10.;
1097  if(fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0){
1098  rapidity=8.-fRapidityShift;
1099  }
1100  else{
1101  rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
1102  }
1103 
1104  // Rapidity Cut
1105  if(TMath::Abs(rapidity)>fRapidityCutMeson)return kFALSE;
1106 
1107  // min Pt Cut
1108  if(fDoMinPtCut && (fMCMother->Pt() < fMinPt)) return kFALSE;
1109 
1110  // Select only -> ChiC radiative (JPsi+gamma) decay channel
1111  if(fMCMother->GetNDaughters()!=2)return kFALSE;
1112 
1113  TParticle *jpsi = 0x0;
1114  TParticle *gamma = 0x0;
1115  TParticle *positron = 0x0;
1116  TParticle *electron = 0x0;
1117 
1118  //Int_t labeljpsiChiC = -1;
1119 
1120  for(Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
1121  if(index < 0) continue;
1122  TParticle* temp = (TParticle*)mcEvent->Particle( index );
1123 
1124  switch( temp->GetPdgCode() ) {
1125  case 443:
1126  jpsi = temp;
1127  //labeljpsiChiC = index;
1128  break;
1129  case 22:
1130  gamma = temp;
1131  labelgammaChiC = index;
1132  break;
1133  }
1134  }
1135 
1136  if ( !jpsi || ! gamma) return kFALSE;
1137  if(jpsi->GetNDaughters()!=2)return kFALSE;
1138 
1139 
1140  for(Int_t index= jpsi->GetFirstDaughter();index<= jpsi->GetLastDaughter();index++){
1141  if(index < 0) continue;
1142  TParticle* temp = (TParticle*)mcEvent->Particle( index );
1143  switch( temp->GetPdgCode() ) {
1144  case -11:
1145  electron = temp;
1146  labelelectronChiC = index;
1147  break;
1148  case 11:
1149  positron = temp;
1150  labelpositronChiC = index;
1151  break;
1152  }
1153  }
1154  if( !electron || !positron) return kFALSE;
1155  if( positron && electron && gamma) return kTRUE;
1156  }
1157  return kFALSE;
1158 }
1159 
1160 //________________________________________________________________________
1161 Bool_t AliConversionMesonCuts::MesonIsSelectedAODMCChiC(AliAODMCParticle *fMCMother,TClonesArray *AODMCArray,Int_t & labelelectronChiC, Int_t & labelpositronChiC, Int_t & labelgammaChiC, Double_t fRapidityShift){
1162  // Returns true for all ChiC within acceptance cuts for decay into JPsi + gamma -> e+ + e- + gamma
1163  // If bMCDaughtersInAcceptance is selected, it requires in addition that both daughter photons are within acceptance cuts
1164 
1165  if(!AODMCArray)return kFALSE;
1166  // if(fMCMother->GetPdgCode()==20443 ){
1167  // return kFALSE;
1168  // }
1169  if(fMCMother->GetPdgCode()==10441 || fMCMother->GetPdgCode()==10443 || fMCMother->GetPdgCode()==445 ){
1170  Double_t rMeson = sqrt( (fMCMother->Xv()*fMCMother->Xv()) + (fMCMother->Yv()*fMCMother->Yv()) ) ;
1171  if( rMeson >fMaxR ) return kFALSE; // cuts on distance from collision point
1172 
1173  Double_t rapidity = 10.;
1174  if(fMCMother->E() - fMCMother->Pz() == 0 || fMCMother->E() + fMCMother->Pz() == 0){
1175  rapidity=8.-fRapidityShift;
1176  }
1177  else{
1178  rapidity = 0.5*(TMath::Log((fMCMother->E()+fMCMother->Pz()) / (fMCMother->E()-fMCMother->Pz())))-fRapidityShift;
1179  }
1180 
1181  // Rapidity Cut
1182  if(TMath::Abs(rapidity)>fRapidityCutMeson)return kFALSE;
1183 
1184  // min Pt Cut
1185  if(fDoMinPtCut && (fMCMother->Pt() < fMinPt)) return kFALSE;
1186 
1187  // Select only -> ChiC radiative (JPsi+gamma) decay channel
1188  if(fMCMother->GetNDaughters()!=2)return kFALSE;
1189 
1190  AliAODMCParticle *jpsi = 0x0;
1191  AliAODMCParticle *gamma = 0x0;
1192  AliAODMCParticle *positron = 0x0;
1193  AliAODMCParticle *electron = 0x0;
1194 
1195  //Int_t labeljpsiChiC = -1;
1196 
1197  for(Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
1198  if(index < 0) continue;
1199  AliAODMCParticle* temp = static_cast<AliAODMCParticle*>(AODMCArray->At(index));
1200 
1201  switch( temp->GetPdgCode() ) {
1202  case 443:
1203  jpsi = temp;
1204  //labeljpsiChiC = index;
1205  break;
1206  case 22:
1207  gamma = temp;
1208  labelgammaChiC = index;
1209  break;
1210  }
1211  }
1212 
1213  if ( !jpsi || ! gamma) return kFALSE;
1214  if(jpsi->GetNDaughters()!=2)return kFALSE;
1215 
1216 
1217  for(Int_t index= jpsi->GetFirstDaughter();index<= jpsi->GetLastDaughter();index++){
1218  if(index < 0) continue;
1219  AliAODMCParticle* temp = static_cast<AliAODMCParticle*>(AODMCArray->At(index));
1220  switch( temp->GetPdgCode() ) {
1221  case -11:
1222  electron = temp;
1223  labelelectronChiC = index;
1224  break;
1225  case 11:
1226  positron = temp;
1227  labelpositronChiC = index;
1228  break;
1229  }
1230  }
1231  if( !electron || !positron) return kFALSE;
1232  if( positron && electron && gamma) return kTRUE;
1233  }
1234  return kFALSE;
1235 }
1236 
1237 //________________________________________________________________________
1238 Bool_t AliConversionMesonCuts::MesonIsSelected(AliAODConversionMother *pi0,Bool_t IsSignal, Double_t fRapidityShift, Int_t leadingCellID1, Int_t leadingCellID2)
1239 {
1240 
1241  // Selection of reconstructed Meson candidates
1242  // Use flag IsSignal in order to fill Fill different
1243  // histograms for Signal and Background
1244  TH2 *hist=0x0;
1245 
1246  if(IsSignal){hist=fHistoMesonCuts;}
1247  else{hist=fHistoMesonBGCuts;}
1248 
1249  Int_t cutIndex=0;
1250 
1251  if(hist)hist->Fill(cutIndex, pi0->Pt());
1252  cutIndex++;
1253 
1254  // Undefined Rapidity -> Floating Point exception
1255  if((pi0->E()+pi0->Pz())/(pi0->E()-pi0->Pz())<=0){
1256  if(hist)hist->Fill(cutIndex, pi0->Pt());
1257  cutIndex++;
1258  if (!IsSignal)cout << "undefined rapidity" << endl;
1259  return kFALSE;
1260  }
1261  else{
1262  // PseudoRapidity Cut --> But we cut on Rapidity !!!
1263  cutIndex++;
1264  if(TMath::Abs(pi0->Rapidity()-fRapidityShift)>fRapidityCutMeson){
1265  if(hist)hist->Fill(cutIndex, pi0->Pt());
1266  return kFALSE;
1267  }
1268  }
1269  cutIndex++;
1270 
1271  if (fHistoInvMassBefore) fHistoInvMassBefore->Fill(pi0->M());
1272  // Mass cut
1273  if (fIsMergedClusterCut == 1 ){
1274  if (fEnableMassCut){
1275  Double_t massMin = FunctionMinMassCut(pi0->E());
1276  Double_t massMax = FunctionMaxMassCut(pi0->E());
1277  // cout << "Min mass: " << massMin << "\t max Mass: " << massMax << "\t mass current: " << pi0->M()<< "\t E current: " << pi0->E() << endl;
1278  if (pi0->M() > massMax || pi0->M() < massMin ){
1279  if(hist)hist->Fill(cutIndex, pi0->Pt());
1280  return kFALSE;
1281  }
1282  }
1283  cutIndex++;
1284  }else if(fIsMergedClusterCut == 2){
1285  if(fEnableOneCellDistCut && ((leadingCellID1 == leadingCellID2) || fCaloPhotonCuts->AreNeighbours(leadingCellID1,leadingCellID2)) ){
1286  if(hist)hist->Fill(cutIndex, pi0->Pt());
1287  return kFALSE;
1288  }
1289  cutIndex++;
1290  }
1291 
1292  // Opening Angle Cut
1293  //fOpeningAngle=2*TMath::ATan(0.134/pi0->P());// physical minimum opening angle
1295  if(hist)hist->Fill(cutIndex, pi0->Pt());
1296  return kFALSE;
1297  }
1298 
1299  // Min Opening Angle
1300  if (fMinOpanPtDepCut == kTRUE) fMinOpanCutMeson = fFMinOpanCut->Eval(pi0->Pt());
1301 
1302  if (pi0->GetOpeningAngle() < fMinOpanCutMeson){
1303  if(hist)hist->Fill(cutIndex, pi0->Pt());
1304  return kFALSE;
1305  }
1306 
1307  // Max Opening Angle
1308  if (fMaxOpanPtDepCut == kTRUE) fMaxOpanCutMeson = fFMaxOpanCut->Eval(pi0->Pt());
1309 
1310  if( pi0->GetOpeningAngle() > fMaxOpanCutMeson){
1311  if(hist)hist->Fill(cutIndex, pi0->Pt());
1312  return kFALSE;
1313  }
1314  cutIndex++;
1315 
1316  // Alpha Max Cut
1317  if (fIsMergedClusterCut == 1 && fAlphaPtDepCut) fAlphaCutMeson = fFAlphaCut->Eval(pi0->E());
1318  else if (fAlphaPtDepCut == kTRUE) fAlphaCutMeson = fFAlphaCut->Eval(pi0->Pt());
1319 
1320  if(TMath::Abs(pi0->GetAlpha())>fAlphaCutMeson){
1321  if(hist)hist->Fill(cutIndex, pi0->Pt());
1322  return kFALSE;
1323  }
1324  cutIndex++;
1325 
1326  // Alpha Min Cut
1327  if(TMath::Abs(pi0->GetAlpha())<fAlphaMinCutMeson){
1328  if(hist)hist->Fill(cutIndex, pi0->Pt());
1329  return kFALSE;
1330  }
1331  cutIndex++;
1332 
1333  if (fHistoInvMassAfter) fHistoInvMassAfter->Fill(pi0->M());
1334 
1335  if (fIsMergedClusterCut == 0){
1338 
1339  if (fDCAGammaGammaCutOn){
1341  if(hist)hist->Fill(cutIndex, pi0->Pt());
1342  return kFALSE;
1343  }
1344  }
1345  cutIndex++;
1346 
1349  if(hist)hist->Fill(cutIndex, pi0->Pt());
1350  return kFALSE;
1351  }
1352  }
1353  cutIndex++;
1354 
1356 
1358  if (TMath::Abs(pi0->GetDCAZMotherPrimVtx()) > fDCAZMesonPrimVtxCut){
1359  if(hist)hist->Fill(cutIndex, pi0->Pt());
1360  return kFALSE;
1361  }
1362  }
1363  cutIndex++;
1364 
1368  }
1369 
1370  //PtCut
1371  if(fDoMinPtCut){
1372  if(pi0->Pt()< fMinPt){
1373  if(hist)hist->Fill(cutIndex, pi0->Pt());
1374  return kFALSE;
1375  }
1376  }
1377  cutIndex++;
1378 
1379  if(hist)hist->Fill(cutIndex, pi0->Pt());
1380  return kTRUE;
1381 }
1382 
1383 
1384 
1385 //________________________________________________________________________
1386 //________________________________________________________________________
1389 
1390  if(fCutString && fCutString->GetString().Length() == kNCuts) {
1391  fCutString->SetString(GetCutNumber());
1392  } else {
1393  return kFALSE;
1394  }
1395  return kTRUE;
1396 }
1397 
1398 //________________________________________________________________________
1400  fCutStringRead = Form("%s",analysisCutSelection.Data());
1401 
1402  // Initialize Cuts from a given Cut string
1403  // AliInfo(Form("Set Meson Cutnumber: %s",analysisCutSelection.Data()));
1404  if(analysisCutSelection.Length()!=kNCuts) {
1405  AliError(Form("Cut selection has the wrong length! size is %d, number of cuts is %d", analysisCutSelection.Length(), kNCuts));
1406  return kFALSE;
1407  }
1408  if(!analysisCutSelection.IsAlnum()){
1409  AliError("Cut selection is not alphanumeric");
1410  return kFALSE;
1411  }
1412 
1413  TString analysisCutSelectionLowerCase = Form("%s",analysisCutSelection.Data());
1414  analysisCutSelectionLowerCase.ToLower();
1415  const char *cutSelection = analysisCutSelectionLowerCase.Data();
1416  #define ASSIGNARRAY(i) fCuts[i] = ((int)cutSelection[i]>=(int)'a') ? cutSelection[i]-'a'+10 : cutSelection[i]-'0'
1417  for(Int_t ii=0;ii<kNCuts;ii++){
1418  ASSIGNARRAY(ii);
1419  }
1420 
1421  // Set Individual Cuts
1422  for(Int_t ii=0;ii<kNCuts;ii++){
1423  if(!SetCut(cutIds(ii),fCuts[ii]))return kFALSE;
1424  }
1425 
1427  return kTRUE;
1428 }
1429 //________________________________________________________________________
1432 
1433  //cout << "Updating cut " << fgkCutNames[cutID] << " (" << cutID << ") to " << value << endl;
1434  switch (cutID) {
1435  case kMesonKind:
1436  if( SetMesonKind(value)) {
1437  fCuts[kMesonKind] = value;
1438  UpdateCutString();
1439  return kTRUE;
1440  } else return kFALSE;
1441  case kSelectionCut:
1442  if (fIsMergedClusterCut == 1){
1443  if( SetSelectionWindowMergedCut(value)) {
1444  fCuts[kSelectionCut] = value;
1445  UpdateCutString();
1446  return kTRUE;
1447  } else return kFALSE;
1448  } else {
1449  if( SetSelectionWindowCut(value)) {
1450  fCuts[kSelectionCut] = value;
1451  UpdateCutString();
1452  return kTRUE;
1453  } else return kFALSE;
1454  }
1455  case kalphaMesonCut:
1456  if (fIsMergedClusterCut == 1){
1457  if( SetAlphaMesonMergedCut(value)) {
1458  fCuts[kalphaMesonCut] = value;
1459  UpdateCutString();
1460  return kTRUE;
1461  } else return kFALSE;
1462  } else {
1463  if( SetAlphaMesonCut(value)) {
1464  fCuts[kalphaMesonCut] = value;
1465  UpdateCutString();
1466  return kTRUE;
1467  } else return kFALSE;
1468  }
1469  case kPtCut:
1470  if( SetMinPtCut(value)) {
1471  fCuts[kPtCut] = value;
1472  UpdateCutString();
1473  return kTRUE;
1474  } else return kFALSE;
1475 
1476  case kRapidityMesonCut:
1477  if( SetRapidityMesonCut(value)) {
1478  fCuts[kRapidityMesonCut] = value;
1479  UpdateCutString();
1480  return kTRUE;
1481  } else return kFALSE;
1482 
1483  case kBackgroundScheme:
1484  if( SetBackgroundScheme(value)) {
1485  fCuts[kBackgroundScheme] = value;
1486  UpdateCutString();
1487  return kTRUE;
1488  } else return kFALSE;
1489 
1491  if( SetNDegreesForRotationMethod(value)) {
1493  UpdateCutString();
1494  return kTRUE;
1495  } else return kFALSE;
1496 
1497  case kNumberOfBGEvents:
1498  if( SetNumberOfBGEvents(value)) {
1499  fCuts[kNumberOfBGEvents] = value;
1500  UpdateCutString();
1501  return kTRUE;
1502  } else return kFALSE;
1503 
1504  case kuseMCPSmearing:
1505  if( SetMCPSmearing(value)) {
1506  fCuts[kuseMCPSmearing] = value;
1507  UpdateCutString();
1508  return kTRUE;
1509  } else return kFALSE;
1510  case kElecShare:
1511  if( SetSharedElectronCut(value)) {
1512  fCuts[kElecShare] = value;
1513  UpdateCutString();
1514  return kTRUE;
1515  } else return kFALSE;
1516  case kToCloseV0s:
1517  if( SetToCloseV0sCut(value)) {
1518  fCuts[kToCloseV0s] = value;
1519  UpdateCutString();
1520  return kTRUE;
1521  } else return kFALSE;
1522  case kDcaGammaGamma:
1523  if( SetDCAGammaGammaCut(value)) {
1524  fCuts[kDcaGammaGamma] = value;
1525  UpdateCutString();
1526  return kTRUE;
1527  } else return kFALSE;
1528  case kDcaZPrimVtx:
1529  if( SetDCAZMesonPrimVtxCut(value)) {
1530  fCuts[kDcaZPrimVtx] = value;
1531  UpdateCutString();
1532  return kTRUE;
1533  } else return kFALSE;
1534  case kDcaRPrimVtx:
1535  if( SetDCARMesonPrimVtxCut(value)) {
1536  fCuts[kDcaRPrimVtx] = value;
1537  UpdateCutString();
1538  return kTRUE;
1539  } else return kFALSE;
1540  case kMinOpanMesonCut:
1541  if( SetMinOpanMesonCut(value)) {
1542  fCuts[kMinOpanMesonCut] = value;
1543  UpdateCutString();
1544  return kTRUE;
1545  } else return kFALSE;
1546 
1547  case kMaxOpanMesonCut:
1548  if( SetMaxOpanMesonCut(value)) {
1549  fCuts[kMaxOpanMesonCut] = value;
1550  UpdateCutString();
1551  return kTRUE;
1552  } else return kFALSE;
1553 
1554  case kNCuts:
1555  cout << "Error:: Cut id out of range"<< endl;
1556  return kFALSE;
1557  }
1558 
1559  cout << "Error:: Cut id " << cutID << " not recognized "<< endl;
1560  return kFALSE;
1561 
1562 }
1563 
1564 
1565 //________________________________________________________________________
1567  // Print out current Cut Selection
1568  for(Int_t ic = 0; ic < kNCuts; ic++) {
1569  printf("%-30s : %d \n", fgkCutNames[ic], fCuts[ic]);
1570  }
1571 }
1572 
1573 //________________________________________________________________________
1575  // Print out current Cut Selection with values
1576  printf("\nMeson cutnumber \n");
1577  for(Int_t ic = 0; ic < kNCuts; ic++) {
1578  printf("%d",fCuts[ic]);
1579  }
1580  printf("\n\n");
1581 
1582  printf("Meson cuts \n");
1583  printf("\t |y| < %3.2f \n", fRapidityCutMeson);
1584  if (fEnableOneCellDistCut) printf("\t Only valid for GammaCalo: one cell distance cut enabled");
1585  if (fEnableMinOpeningAngleCut) printf("\t theta_{open} > %3.4f\n", fOpeningAngle);
1586  if (!fAlphaPtDepCut) printf("\t %3.2f < alpha < %3.2f\n", fAlphaMinCutMeson, fAlphaCutMeson);
1587  else printf("\t alpha pT-dep cut active\n");
1588  if (!fIsMergedClusterCut){
1589  if (fDCAGammaGammaCutOn)printf("\t dca_{gamma,gamma} < %3.2f\n", fDCAGammaGammaCut);
1590  if (fDCARMesonPrimVtxCutOn)printf("\t dca_{R, prim Vtx} < %3.2f\n", fDCARMesonPrimVtxCut);
1591  if (fDCAZMesonPrimVtxCutOn)printf("\t dca_{Z, prim Vtx} < %3.2f\n\n", fDCAZMesonPrimVtxCut);
1592  }
1593  if (fIsMergedClusterCut == 1 && fEnableMassCut){
1594  printf("\t Meson selection energy dependent\n\n");
1595  } else {
1596  if (fAcceptMesonMass)
1597  printf("\t Meson selection window for further analysis %3.3f > M_{gamma,gamma} > %3.3f\n\n", fSelectionLow, fSelectionHigh);
1598  else
1599  printf("\t Meson rejection window has been applied %3.3f > M_{gamma,gamma} > %3.3f\n\n", fSelectionLow, fSelectionHigh);
1600  }
1601  if(fDoMinPtCut) printf("\t pT_{min} > %3.4f\n", fMinPt);
1602  if (!fMinOpanPtDepCut) printf("\t theta_{open} > %3.4f\n", fMinOpanCutMeson);
1603  else printf("\t Min theta_{open} pT-dep cut active\n");
1604  if (!fMaxOpanPtDepCut) printf("\t %3.4f < theta_{open}\n", fMaxOpanCutMeson);
1605  else printf("\t Max theta_{open} pT-dep cut active\n");
1606  printf("\t Running mode for cutselection (0 std, 2 PCM-Calo): %d\n", fMode);
1607 
1608  printf("Meson BG settings \n");
1609  if (!fDoBG){
1610  printf("\t No BG estimation \n");
1611  } else {
1612  if (!fUseRotationMethodInBG & !fUseTrackMultiplicityForBG & !fBackgroundHandler) printf("\t BG scheme: mixing V0 mult \n");
1613  if (!fUseRotationMethodInBG & fUseTrackMultiplicityForBG & !fBackgroundHandler) printf("\t BG scheme: mixing track mult \n");
1614  if (fUseRotationMethodInBG )printf("\t BG scheme: rotation \n");
1615  if (fUsePtmaxMethodForBG )printf("\t BG scheme: Ptmax \n");
1616  if (fDoBGProbability) printf("\t -> use BG probability \n");
1617  if (fBackgroundHandler) printf("\t -> use new BG handler \n");
1618  printf("\t depth of pool: %d\n", fNumberOfBGEvents);
1619  if (fUseRotationMethodInBG )printf("\t degree's for BG rotation: %d\n", fNDegreeRotationPMForBG);
1620  if (!fUseRotationMethodInBG & !fUseTrackMultiplicityForBG & fBackgroundHandler) printf("\t BG scheme: event plane angle with V0 mult \n");
1621  }
1622 }
1623 
1624 
1625 //________________________________________________________________________
1627  // Set Cut
1628  switch(mesonKind){
1629  case 0:
1630  fMesonKind = 0;
1631  break;
1632  case 1:
1633  fMesonKind = 1;
1634  case 2:
1635  fMesonKind = 0;
1636  fDoJetAnalysis = kTRUE;
1637  break;
1638  case 3:
1639  fMesonKind = 0;
1640  fDoJetAnalysis = kTRUE;
1641  fDoJetQA = kTRUE;
1642  break;
1643  default:
1644  cout<<"Warning: Meson kind not defined"<<mesonKind<<endl;
1645  return kFALSE;
1646  }
1647  return kTRUE;
1648 }
1649 
1650 //________________________________________________________________________
1652  // Set Cut on min pT of meson
1653  switch(PtCut){
1654  case 0: // no cut on pT
1655  fMinPt = 0.;
1656  fDoMinPtCut = kFALSE;
1657  break;
1658  case 1:
1659  fMinPt = 0.4;
1660  fDoMinPtCut = kTRUE;
1661  break;
1662  case 2:
1663  fMinPt = 0.7;
1664  fDoMinPtCut = kTRUE;
1665  break;
1666  case 3:
1667  fMinPt = 0.9;
1668  fDoMinPtCut = kTRUE;
1669  break;
1670  case 4:
1671  fMinPt = 1.0;
1672  fDoMinPtCut = kTRUE;
1673  break;
1674  case 5:
1675  fMinPt = 1.2;
1676  fDoMinPtCut = kTRUE;
1677  break;
1678  case 6:
1679  fMinPt = 1.5;
1680  fDoMinPtCut = kTRUE;
1681  break;
1682  case 7:
1683  fMinPt = 0.5;
1684  fDoMinPtCut = kTRUE;
1685  break;
1686  default:
1687  cout<<"Warning: pT cut not defined"<<PtCut<<endl;
1688  return kFALSE;
1689  }
1690  return kTRUE;
1691 }
1692 
1693 //________________________________________________________________________
1695  // Set Cut
1696  switch(selectionCut){
1697  case 0:
1698  fSelectionLow = 0.0;
1699  fSelectionHigh = 4.;
1700  fAcceptMesonMass = kTRUE;
1701  break;
1702  case 1:
1703  fSelectionLow = 0.1;
1704  fSelectionHigh = 0.145;
1705  fAcceptMesonMass = kTRUE;
1706  break;
1707  case 2:
1708  fSelectionLow = 0.11;
1709  fSelectionHigh = 0.145;
1710  fAcceptMesonMass = kTRUE;
1711  break;
1712  case 3:
1713  fSelectionLow = 0.12;
1714  fSelectionHigh = 0.145;
1715  fAcceptMesonMass = kTRUE;
1716  break;
1717  case 4:
1718  fSelectionLow = 0.1;
1719  fSelectionHigh = 0.15;
1720  fAcceptMesonMass = kTRUE;
1721  break;
1722  case 5:
1723  fSelectionLow = 0.11;
1724  fSelectionHigh = 0.15;
1725  fAcceptMesonMass = kTRUE;
1726  break;
1727  case 6:
1728  fSelectionLow = 0.12;
1729  fSelectionHigh = 0.15;
1730  fAcceptMesonMass = kTRUE;
1731  break;
1732  case 7:
1733  fSelectionLow = 0.1;
1734  fSelectionHigh = 0.155;
1735  fAcceptMesonMass = kTRUE;
1736  break;
1737  case 8:
1738  fSelectionLow = 0.125;
1739  fSelectionHigh = 0.145;
1740  fAcceptMesonMass = kTRUE;
1741  break;
1742  case 9:
1743  fSelectionLow = 0.11;
1744  fSelectionHigh = 0.155;
1745  fAcceptMesonMass = kTRUE;
1746  break;
1747  case 10:
1748  fSelectionLow = 0.08;
1749  fSelectionHigh = 0.145;
1750  fAcceptMesonMass = kTRUE;
1751  break;
1752  case 11:
1753  fSelectionLow = 0.08;
1754  fSelectionHigh = 0.145;
1755  fAcceptMesonMass = kFALSE;
1756  break;
1757  case 12:
1758  fSelectionLow = 0.1;
1759  fSelectionHigh = 0.145;
1760  fAcceptMesonMass = kFALSE;
1761  break;
1762  case 13:
1763  fSelectionLow = 0.11;
1764  fSelectionHigh = 0.145;
1765  fAcceptMesonMass = kFALSE;
1766  break;
1767  case 14:
1768  fSelectionLow = 0.12;
1769  fSelectionHigh = 0.145;
1770  fAcceptMesonMass = kFALSE;
1771  break;
1772  case 15:
1773  fSelectionLow = 0.1;
1774  fSelectionHigh = 0.15;
1775  fAcceptMesonMass = kFALSE;
1776  break;
1777  case 16:
1778  fSelectionLow = 0.11;
1779  fSelectionHigh = 0.15;
1780  fAcceptMesonMass = kFALSE;
1781  break;
1782  case 17:
1783  fSelectionLow = 0.12;
1784  fSelectionHigh = 0.15;
1785  fAcceptMesonMass = kFALSE;
1786  break;
1787  case 18:
1788  fSelectionLow = 0.1;
1789  fSelectionHigh = 0.155;
1790  fAcceptMesonMass = kFALSE;
1791  break;
1792  case 19:
1793  fSelectionLow = 0.125;
1794  fSelectionHigh = 0.145;
1795  fAcceptMesonMass = kFALSE;
1796  break;
1797  case 20:
1798  fSelectionLow = 0.11;
1799  fSelectionHigh = 0.155;
1800  fAcceptMesonMass = kFALSE;
1801  break;
1802  case 21: //l
1803  fSelectionLow = 0.500;
1804  fSelectionHigh = 0.600;
1805  fAcceptMesonMass = kTRUE;
1806  break;
1807  case 22: //m
1808  fSelectionLow = 0.400;
1809  fSelectionHigh = 0.700;
1810  fAcceptMesonMass = kTRUE;
1811  break;
1812  case 23: //n
1813  fSelectionLow = 0.120;
1814  fSelectionHigh = 0.160;
1815  fAcceptMesonMass = kTRUE;
1816  break;
1817  default:
1818  cout<<"Warning: SelectionCut not defined "<<selectionCut<<endl;
1819  return kFALSE;
1820  }
1821  return kTRUE;
1822 }
1823 
1825  // Set Cut
1826  fSelectionWindowCut = selectionCut;
1827  switch(fSelectionWindowCut){
1828  case 0:
1829  fEnableMassCut = kFALSE;
1830  break;
1831  case 1: //NLM 1
1832  fEnableMassCut = kTRUE;
1833  break;
1834  case 2: //NLM 2
1835  fEnableMassCut = kTRUE;
1836  break;
1837  case 3: //NLM 1
1838  fEnableMassCut = kTRUE;
1839  break;
1840  case 4: //NLM 2
1841  fEnableMassCut = kTRUE;
1842  break;
1843  case 5: //NLM 1
1844  fEnableMassCut = kTRUE;
1845  break;
1846  case 6: //NLM 2
1847  fEnableMassCut = kTRUE;
1848  break;
1849  case 7: //min mass cut around 0
1850  fEnableMassCut = kTRUE;
1851  break;
1852  case 8: //min mass cut around 0
1853  fEnableMassCut = kTRUE;
1854  break;
1855  case 9: //min mass cut around 0
1856  fEnableMassCut = kTRUE;
1857  break;
1858  default:
1859  cout<<"Warning: SelectionCut merged not defined "<<selectionCut<<endl;
1860  return kFALSE;
1861  }
1862 
1863  return kTRUE;
1864 
1865 }
1866 
1868 
1869  Float_t switchMass = 0;
1870  Float_t aMassLow = 0;
1871  Float_t bMassLow = 0;
1872  Float_t aMassHigh = 0;
1873  Float_t bMassHigh = 0;
1874  Float_t aMass = 0;
1875  Float_t bMass = 0;
1876  Float_t switchSigma = 0.;
1877  Float_t nSigma = 0;
1878  Float_t aSigmaLow = 0.;
1879  Float_t bSigmaLow = 0;
1880  Float_t aSigmaHigh = 0.;
1881  Float_t bSigmaHigh = 0;
1882  Float_t mass = 0;
1883  Float_t sigma = 0;
1884 
1885  switch(fSelectionWindowCut){
1886  case 0:
1887  fEnableMassCut = kFALSE;
1888  break;
1889  case 1: //NLM 1
1890  aMass = 0.044;
1891  bMass = 0.0049;
1892  switchSigma = 19.;
1893  nSigma = 3;
1894  aSigmaLow = 0.012;
1895  bSigmaLow = 0;
1896  aSigmaHigh = 0.0012;
1897  bSigmaHigh = 6e-4;
1898 
1899  mass = aMass + bMass*e;
1900  sigma = 0;
1901  if (e < switchSigma){
1902  sigma = aSigmaLow + bSigmaLow*e;
1903  } else {
1904  sigma = aSigmaHigh + bSigmaHigh*e;
1905  }
1906  return mass + nSigma*sigma;
1907  break;
1908  case 2: //NLM 2
1909  switchMass = 21;
1910  aMassLow = 0.115;
1911  bMassLow = 9.6e-4;
1912  aMassHigh = 0.1;
1913  bMassHigh = 0.0017;
1914  switchSigma = 10.;
1915  nSigma = 3;
1916  aSigmaLow = 0.009;
1917  bSigmaLow = 0;
1918  aSigmaHigh = 0.0023;
1919  bSigmaHigh = 6.7e-4;
1920 
1921  mass = 0;
1922  if (e < switchMass){
1923  mass = aMassLow + bMassLow*e;
1924  } else {
1925  mass = aMassHigh + bMassHigh*e;
1926  }
1927  sigma = 0;
1928  if (e < switchSigma){
1929  sigma = aSigmaLow + bSigmaLow*e;
1930  } else {
1931  sigma = aSigmaHigh + bSigmaHigh*e;
1932  }
1933  return mass + nSigma*sigma;
1934  break;
1935  case 3: //NLM 1
1936  aMass = 0.044;
1937  bMass = 0.0049;
1938  switchSigma = 19.;
1939  nSigma = 2;
1940  aSigmaLow = 0.012;
1941  bSigmaLow = 0;
1942  aSigmaHigh = 0.0012;
1943  bSigmaHigh = 6e-4;
1944 
1945  mass = aMass + bMass*e;
1946  sigma = 0;
1947  if (e < switchSigma){
1948  sigma = aSigmaLow + bSigmaLow*e;
1949  } else {
1950  sigma = aSigmaHigh + bSigmaHigh*e;
1951  }
1952  return mass + nSigma*sigma;
1953  break;
1954  case 4: //NLM 2
1955  switchMass = 21;
1956  aMassLow = 0.115;
1957  bMassLow = 9.6e-4;
1958  aMassHigh = 0.1;
1959  bMassHigh = 0.0017;
1960  switchSigma = 10.;
1961  nSigma = 2;
1962  aSigmaLow = 0.009;
1963  bSigmaLow = 0;
1964  aSigmaHigh = 0.0023;
1965  bSigmaHigh = 6.7e-4;
1966 
1967  mass = 0;
1968  if (e < switchMass){
1969  mass = aMassLow + bMassLow*e;
1970  } else {
1971  mass = aMassHigh + bMassHigh*e;
1972  }
1973  sigma = 0;
1974  if (e < switchSigma){
1975  sigma = aSigmaLow + bSigmaLow*e;
1976  } else {
1977  sigma = aSigmaHigh + bSigmaHigh*e;
1978  }
1979  return mass + nSigma*sigma;
1980  break;
1981  case 5: //NLM 1
1982  aMass = 0.044;
1983  bMass = 0.0049;
1984  switchSigma = 19.;
1985  nSigma = 4;
1986  aSigmaLow = 0.012;
1987  bSigmaLow = 0;
1988  aSigmaHigh = 0.0012;
1989  bSigmaHigh = 6e-4;
1990 
1991  mass = aMass + bMass*e;
1992  sigma = 0;
1993  if (e < switchSigma){
1994  sigma = aSigmaLow + bSigmaLow*e;
1995  } else {
1996  sigma = aSigmaHigh + bSigmaHigh*e;
1997  }
1998  return mass + nSigma*sigma;
1999  break;
2000  case 6: //NLM 2
2001  switchMass = 21;
2002  aMassLow = 0.115;
2003  bMassLow = 9.6e-4;
2004  aMassHigh = 0.1;
2005  bMassHigh = 0.0017;
2006  switchSigma = 10.;
2007  nSigma = 4;
2008  aSigmaLow = 0.009;
2009  bSigmaLow = 0;
2010  aSigmaHigh = 0.0023;
2011  bSigmaHigh = 6.7e-4;
2012 
2013  mass = 0;
2014  if (e < switchMass){
2015  mass = aMassLow + bMassLow*e;
2016  } else {
2017  mass = aMassHigh + bMassHigh*e;
2018  }
2019  sigma = 0;
2020  if (e < switchSigma){
2021  sigma = aSigmaLow + bSigmaLow*e;
2022  } else {
2023  sigma = aSigmaHigh + bSigmaHigh*e;
2024  }
2025  return mass + nSigma*sigma;
2026  break;
2027  case 7: // maximum mass
2028  return 10000.;
2029  break;
2030  case 8: // maximum mass
2031  return 10000.;
2032  break;
2033  case 9: // maximum mass
2034  return 10000.;
2035  break;
2036  default:
2037  cout<<"Warning: SelectionCut merged not defined "<<fSelectionWindowCut<<endl;
2038  return -1;
2039  }
2040  return -1;
2041 
2042 }
2043 
2045 
2046  Float_t switchMass = 0;
2047  Float_t aMassLow = 0;
2048  Float_t bMassLow = 0;
2049  Float_t aMassHigh = 0;
2050  Float_t bMassHigh = 0;
2051  Float_t aMass = 0;
2052  Float_t bMass = 0;
2053  Float_t switchSigma = 0.;
2054  Float_t nSigma = 0;
2055  Float_t aSigmaLow = 0.;
2056  Float_t bSigmaLow = 0;
2057  Float_t aSigmaHigh = 0.;
2058  Float_t bSigmaHigh = 0;
2059  Float_t mass = 0;
2060  Float_t sigma = 0;
2061 
2062  switch(fSelectionWindowCut){
2063  case 0:
2064  fEnableMassCut = kFALSE;
2065  break;
2066  case 1: //NLM 1
2067  aMass = 0.044;
2068  bMass = 0.0049;
2069  switchSigma = 19.;
2070  nSigma = 3;
2071  aSigmaLow = 0.012;
2072  bSigmaLow = 0;
2073  aSigmaHigh = 0.0012;
2074  bSigmaHigh = 6e-4;
2075 
2076  mass = aMass + bMass*e;
2077  sigma = 0;
2078  if (e < switchSigma){
2079  sigma = aSigmaLow + bSigmaLow*e;
2080  } else {
2081  sigma = aSigmaHigh + bSigmaHigh*e;
2082  }
2083  // cout << "E: "<< e << "\t mass: " << mass << "\t sigma: " << sigma<< endl;
2084  return mass - nSigma*sigma;
2085  break;
2086  case 2: //NLM 2
2087  switchMass = 21;
2088  aMassLow = 0.115;
2089  bMassLow = 9.6e-4;
2090  aMassHigh = 0.1;
2091  bMassHigh = 0.0017;
2092  switchSigma = 10.;
2093  nSigma = 3;
2094  aSigmaLow = 0.009;
2095  bSigmaLow = 0;
2096  aSigmaHigh = 0.0023;
2097  bSigmaHigh = 6.7e-4;
2098 
2099  mass = 0;
2100  if (e < switchMass){
2101  mass = aMassLow + bMassLow*e;
2102  } else {
2103  mass = aMassHigh + bMassHigh*e;
2104  }
2105  sigma = 0;
2106  if (e < switchSigma){
2107  sigma = aSigmaLow + bSigmaLow*e;
2108  } else {
2109  sigma = aSigmaHigh + bSigmaHigh*e;
2110  }
2111  // cout << "E: "<< e << "\t mass: " << mass << "\t sigma: "<< sigma << endl;
2112 
2113  return mass - nSigma*sigma;
2114  break;
2115  case 3: //NLM 1
2116  aMass = 0.044;
2117  bMass = 0.0049;
2118  switchSigma = 19.;
2119  nSigma = 2;
2120  aSigmaLow = 0.012;
2121  bSigmaLow = 0;
2122  aSigmaHigh = 0.0012;
2123  bSigmaHigh = 6e-4;
2124 
2125  mass = aMass + bMass*e;
2126  sigma = 0;
2127  if (e < switchSigma){
2128  sigma = aSigmaLow + bSigmaLow*e;
2129  } else {
2130  sigma = aSigmaHigh + bSigmaHigh*e;
2131  }
2132  // cout << "E: "<< e << "\t mass: " << mass << "\t sigma: " << sigma<< endl;
2133  return mass - nSigma*sigma;
2134  break;
2135  case 4: //NLM 2
2136  switchMass = 21;
2137  aMassLow = 0.115;
2138  bMassLow = 9.6e-4;
2139  aMassHigh = 0.1;
2140  bMassHigh = 0.0017;
2141  switchSigma = 10.;
2142  nSigma = 2;
2143  aSigmaLow = 0.009;
2144  bSigmaLow = 0;
2145  aSigmaHigh = 0.0023;
2146  bSigmaHigh = 6.7e-4;
2147 
2148  mass = 0;
2149  if (e < switchMass){
2150  mass = aMassLow + bMassLow*e;
2151  } else {
2152  mass = aMassHigh + bMassHigh*e;
2153  }
2154  sigma = 0;
2155  if (e < switchSigma){
2156  sigma = aSigmaLow + bSigmaLow*e;
2157  } else {
2158  sigma = aSigmaHigh + bSigmaHigh*e;
2159  }
2160  // cout << "E: "<< e << "\t mass: " << mass << "\t sigma: "<< sigma << endl;
2161 
2162  return mass - nSigma*sigma;
2163  break;
2164  case 5: //NLM 1
2165  aMass = 0.044;
2166  bMass = 0.0049;
2167  switchSigma = 19.;
2168  nSigma = 4;
2169  aSigmaLow = 0.012;
2170  bSigmaLow = 0;
2171  aSigmaHigh = 0.0012;
2172  bSigmaHigh = 6e-4;
2173 
2174  mass = aMass + bMass*e;
2175  sigma = 0;
2176  if (e < switchSigma){
2177  sigma = aSigmaLow + bSigmaLow*e;
2178  } else {
2179  sigma = aSigmaHigh + bSigmaHigh*e;
2180  }
2181  // cout << "E: "<< e << "\t mass: " << mass << "\t sigma: " << sigma<< endl;
2182  return mass - nSigma*sigma;
2183  break;
2184  case 6: //NLM 2
2185  switchMass = 21;
2186  aMassLow = 0.115;
2187  bMassLow = 9.6e-4;
2188  aMassHigh = 0.1;
2189  bMassHigh = 0.0017;
2190  switchSigma = 10.;
2191  nSigma = 4;
2192  aSigmaLow = 0.009;
2193  bSigmaLow = 0;
2194  aSigmaHigh = 0.0023;
2195  bSigmaHigh = 6.7e-4;
2196 
2197  mass = 0;
2198  if (e < switchMass){
2199  mass = aMassLow + bMassLow*e;
2200  } else {
2201  mass = aMassHigh + bMassHigh*e;
2202  }
2203  sigma = 0;
2204  if (e < switchSigma){
2205  sigma = aSigmaLow + bSigmaLow*e;
2206  } else {
2207  sigma = aSigmaHigh + bSigmaHigh*e;
2208  }
2209  // cout << "E: "<< e << "\t mass: " << mass << "\t sigma: "<< sigma << endl;
2210  return mass - nSigma*sigma;
2211  break;
2212 
2213  case 7: // just exclude band at 0
2214  return 0.005+0.004*e;
2215  break;
2216  case 8: // just exclude band at 0 looser
2217  return 0.004+0.004*e;
2218  break;
2219  case 9: // just exclude band at 0 tighter
2220  return 0.006+0.004*e;
2221  break;
2222 
2223  default:
2224  cout<<"Warning: SelectionCut merged not defined "<<fSelectionWindowCut<<endl;
2225  return -1;
2226  }
2227  return -1;
2228 }
2229 
2230 //________________________________________________________________________
2232 { // Set Cut
2233  switch(alphaMesonCut){
2234  case 0: // 0- 0.7
2235  fAlphaMinCutMeson = 0.0;
2236  fAlphaCutMeson = 0.7;
2237  fAlphaPtDepCut = kFALSE;
2238  break;
2239  case 1: // Updated 15 May 2015
2240  if (fIsMergedClusterCut == 0){
2241  if( fFAlphaCut ) delete fFAlphaCut;
2242  fFAlphaCut = new TF1("fFAlphaCut","[0]*tanh([1]*x)",0.,100.);
2243  fFAlphaCut->SetParameter(0,0.65);
2244  fFAlphaCut->SetParameter(1,1.8);
2245  fAlphaMinCutMeson = 0.0;
2246  fAlphaCutMeson = -1.0;
2247  fAlphaPtDepCut = kTRUE;
2248  } else {
2249  fAlphaPtDepCut = kFALSE;
2250  fAlphaMinCutMeson = 0.5;
2251  fAlphaCutMeson = 1;
2252  }
2253  break;
2254  case 2: // Updated 31 October 2013 before 0.5-1
2255  if (fIsMergedClusterCut == 0){
2256  if( fFAlphaCut ) delete fFAlphaCut;
2257  fFAlphaCut = new TF1("fFAlphaCut","[0]*tanh([1]*x)",0.,100.);
2258  fFAlphaCut->SetParameter(0,0.8);
2259  fFAlphaCut->SetParameter(1,1.2);
2260  fAlphaMinCutMeson = 0.0;
2261  fAlphaCutMeson = -1.0;
2262  fAlphaPtDepCut = kTRUE;
2263  } else {
2264  fAlphaPtDepCut = kFALSE;
2265  fAlphaMinCutMeson = 0.6;
2266  fAlphaCutMeson = 1;
2267  }
2268  break;
2269  case 3: // 0.0-1
2270  fAlphaMinCutMeson = 0.0;
2271  fAlphaCutMeson = 1.;
2272  fAlphaPtDepCut = kFALSE;
2273  break;
2274  case 4: // 0-0.65
2275  fAlphaMinCutMeson = 0.0;
2276  fAlphaCutMeson = 0.65;
2277  fAlphaPtDepCut = kFALSE;
2278  break;
2279  case 5: // 0-0.75
2280  fAlphaMinCutMeson = 0.0;
2281  fAlphaCutMeson = 0.75;
2282  fAlphaPtDepCut = kFALSE;
2283  break;
2284  case 6: // 0-0.8
2285  fAlphaMinCutMeson = 0.0;
2286  fAlphaCutMeson = 0.8;
2287  fAlphaPtDepCut = kFALSE;
2288  break;
2289  case 7: // 0.0-0.85
2290  fAlphaMinCutMeson = 0.0;
2291  fAlphaCutMeson = 0.85;
2292  fAlphaPtDepCut = kFALSE;
2293  break;
2294  case 8: // 0.0-0.6
2295  fAlphaMinCutMeson = 0.0;
2296  fAlphaCutMeson = 0.6;
2297  fAlphaPtDepCut = kFALSE;
2298  break;
2299  case 9: // Updated 11 November 2013 before 0.0 - 0.3
2300  if (fIsMergedClusterCut == 0){
2301  if( fFAlphaCut ) delete fFAlphaCut;
2302  fFAlphaCut = new TF1("fFAlphaCut","[0]*tanh([1]*x)",0.,100.);
2303  fFAlphaCut->SetParameter(0,0.65);
2304  fFAlphaCut->SetParameter(1,1.2);
2305  fAlphaMinCutMeson = 0.0;
2306  fAlphaCutMeson = -1.0;
2307  fAlphaPtDepCut = kTRUE;
2308  } else {
2309  fAlphaPtDepCut = kFALSE;
2310  fAlphaMinCutMeson = 0.4;
2311  fAlphaCutMeson = 1;
2312  }
2313  break;
2314  case 10: //a 0-0.2
2315  fAlphaMinCutMeson = 0.0;
2316  fAlphaCutMeson = 0.2;
2317  fAlphaPtDepCut = kFALSE;
2318  break;
2319  case 11: //b 0.2-0.6
2320  fAlphaMinCutMeson = 0.2;
2321  fAlphaCutMeson = 0.6;
2322  fAlphaPtDepCut = kFALSE;
2323  break;
2324  case 12: //c 0.6-1.0
2325  fAlphaMinCutMeson = 0.6;
2326  fAlphaCutMeson = 1.0;
2327  fAlphaPtDepCut = kFALSE;
2328  break;
2329  case 13: //d 0-0.1
2330  fAlphaMinCutMeson = 0.0;
2331  fAlphaCutMeson = 0.1;
2332  fAlphaPtDepCut = kFALSE;
2333  break;
2334  default:
2335  cout<<"Warning: AlphaMesonCut not defined "<<alphaMesonCut<<endl;
2336  return kFALSE;
2337  }
2338  return kTRUE;
2339 }
2340 
2341 
2342 //________________________________________________________________________
2344 { // Set Cut
2345  switch(alphaMesonCut){
2346  case 0: // 0- 1
2347  fAlphaMinCutMeson = 0.0;
2348  fAlphaCutMeson = 1;
2349  fAlphaPtDepCut = kFALSE;
2350  break;
2351  case 1: // cut for NLM 1
2352  if( fFAlphaCut ) delete fFAlphaCut;
2353  fFAlphaCut = new TF1("fFAlphaCut","[0]+[1]*x+[2]/(x*x*x)",0.,100.);
2354  fFAlphaCut->SetParameter(0,0.96);
2355  fFAlphaCut->SetParameter(1,0);
2356  fFAlphaCut->SetParameter(2,-879);
2357  fAlphaMinCutMeson = 0.0;
2358  fAlphaCutMeson = -1.0;
2359  fAlphaPtDepCut = kTRUE;
2360  break;
2361  case 2: // cut for NLM 2
2362  if( fFAlphaCut ) delete fFAlphaCut;
2363  fFAlphaCut = new TF1("fFAlphaCut","[0]+[1]*x+[2]/(x*x*x)",0.,100.);
2364  fFAlphaCut->SetParameter(0,0.95);
2365  fFAlphaCut->SetParameter(1,0.0015);
2366  fFAlphaCut->SetParameter(2,-233);
2367  fAlphaMinCutMeson = 0.0;
2368  fAlphaCutMeson = -1.0;
2369  fAlphaPtDepCut = kTRUE;
2370  break;
2371  case 3: // cut for NLM 1 larger
2372  if( fFAlphaCut ) delete fFAlphaCut;
2373  fFAlphaCut = new TF1("fFAlphaCut","[0]+[1]*x+[2]/(x*x*x)",0.,100.);
2374  fFAlphaCut->SetParameter(0,0.975);
2375  fFAlphaCut->SetParameter(1,0);
2376  fFAlphaCut->SetParameter(2,-800);
2377  fAlphaMinCutMeson = 0.0;
2378  fAlphaCutMeson = -1.0;
2379  fAlphaPtDepCut = kTRUE;
2380  break;
2381  case 4: // cut for NLM 2 larger
2382  if( fFAlphaCut ) delete fFAlphaCut;
2383  fFAlphaCut = new TF1("fFAlphaCut","[0]+[1]*x+[2]/(x*x*x)",0.,100.);
2384  fFAlphaCut->SetParameter(0,0.97);
2385  fFAlphaCut->SetParameter(1,0.0015);
2386  fFAlphaCut->SetParameter(2,-200);
2387  fAlphaMinCutMeson = 0.0;
2388  fAlphaCutMeson = -1.0;
2389  fAlphaPtDepCut = kTRUE;
2390  break;
2391  case 5: // cut for NLM 1 smaller
2392  if( fFAlphaCut ) delete fFAlphaCut;
2393  fFAlphaCut = new TF1("fFAlphaCut","[0]+[1]*x+[2]/(x*x*x)",0.,100.);
2394  fFAlphaCut->SetParameter(0,0.94);
2395  fFAlphaCut->SetParameter(1,0);
2396  fFAlphaCut->SetParameter(2,-970);
2397  fAlphaMinCutMeson = 0.0;
2398  fAlphaCutMeson = -1.0;
2399  fAlphaPtDepCut = kTRUE;
2400  break;
2401  case 6: // cut for NLM 2 smaller
2402  if( fFAlphaCut ) delete fFAlphaCut;
2403  fFAlphaCut = new TF1("fFAlphaCut","[0]+[1]*x+[2]/(x*x*x)",0.,100.);
2404  fFAlphaCut->SetParameter(0,0.935);
2405  fFAlphaCut->SetParameter(1,0.0015);
2406  fFAlphaCut->SetParameter(2,-273);
2407  fAlphaMinCutMeson = 0.0;
2408  fAlphaCutMeson = -1.0;
2409  fAlphaPtDepCut = kTRUE;
2410  break;
2411 
2412  default:
2413  cout<<"Warning: AlphaMesonCut for merged clusters not defined "<<alphaMesonCut<<endl;
2414  return kFALSE;
2415  }
2416  return kTRUE;
2417 }
2418 
2419 //________________________________________________________________________
2421  // Set Cut
2422  switch(RapidityMesonCut){
2423  case 0: // changed from 0.9 to 1.35
2424  fRapidityCutMeson = 1.35;
2425  break;
2426  case 1: //
2427  fRapidityCutMeson = 0.8;
2428  break;
2429  case 2: //
2430  fRapidityCutMeson = 0.7;
2431  break;
2432  case 3: //
2433  fRapidityCutMeson = 0.6;
2434  break;
2435  case 4: //
2436  fRapidityCutMeson = 0.5;
2437  break;
2438  case 5: //
2439  fRapidityCutMeson = 0.85;
2440  break;
2441  case 6: //
2442  fRapidityCutMeson = 0.75;
2443  break;
2444  case 7: //
2445  fRapidityCutMeson = 0.3;
2446  break;
2447  case 8: //changed, before 0.35
2448  fRapidityCutMeson = 0.25;
2449  break;
2450  case 9: //
2451  fRapidityCutMeson = 0.4;
2452  break;
2453  default:
2454  cout<<"Warning: RapidityMesonCut not defined "<<RapidityMesonCut<<endl;
2455  return kFALSE;
2456  }
2457  return kTRUE;
2458 }
2459 
2460 
2461 //________________________________________________________________________
2463  // Set Cut
2464  switch(BackgroundScheme){
2465  case 0: //Rotation
2466  fUseRotationMethodInBG = kTRUE;
2467  fDoBGProbability = kFALSE;
2468  break;
2469  case 1: // mixed event with V0 multiplicity
2470  fUseRotationMethodInBG = kFALSE;
2471  fUseTrackMultiplicityForBG = kFALSE;
2472  fDoBGProbability = kFALSE;
2473  break;
2474  case 2: // mixed event with track multiplicity
2475  fUseRotationMethodInBG = kFALSE;
2477  fDoBGProbability = kFALSE;
2478  break;
2479  case 3: //Rotation
2480  fUseRotationMethodInBG = kTRUE;
2481  fDoBGProbability = kTRUE;
2482  break;
2483  case 4: //No BG calculation
2484  cout << "no BG calculation should be done" << endl;
2485  fUseRotationMethodInBG = kFALSE;
2486  fDoBGProbability = kFALSE;
2487  fDoBG = kFALSE;
2488  break;
2489  case 5: //Rotation
2490  fUseRotationMethodInBG = kTRUE;
2491  fDoBGProbability = kFALSE;
2492  fBackgroundHandler = 1;
2493  break;
2494  case 6: // mixed event with V0 multiplicity
2495  fUseRotationMethodInBG = kFALSE;
2496  fUseTrackMultiplicityForBG = kFALSE;
2497  fDoBGProbability = kFALSE;
2498  fBackgroundHandler = 1;
2499  break;
2500  case 7: // mixed event with track multiplicity
2501  fUseRotationMethodInBG = kFALSE;
2503  fDoBGProbability = kFALSE;
2504  fBackgroundHandler = 1;
2505  break;
2506  case 8: //Rotation
2507  fUseRotationMethodInBG = kTRUE;
2508  fDoBGProbability = kTRUE;
2509  fBackgroundHandler = 1;
2510  break;
2511  case 9: // mixed event with Ptmax method
2512  fUseRotationMethodInBG = kFALSE;
2513  fUseTrackMultiplicityForBG = kFALSE;
2514  fDoBGProbability = kFALSE;
2515  fUsePtmaxMethodForBG = kTRUE;
2516  break;
2517  case 10: // a mixed event with likesign mixing
2518  fUseRotationMethodInBG = kFALSE;
2519  fUseTrackMultiplicityForBG = kFALSE;
2520  fDoBGProbability = kFALSE;
2521  fBackgroundUseLikeSign = kTRUE;
2522  fBackgroundUseSideband = kFALSE;
2523  break;
2524  case 11: // b mixed event with pi0 sideband candidates (right side of pi0 peak)
2525  fUseRotationMethodInBG = kFALSE;
2526  fUseTrackMultiplicityForBG = kFALSE;
2527  fDoBGProbability = kFALSE;
2528  fBackgroundUseLikeSign = kFALSE;
2529  fBackgroundUseSideband = kTRUE;
2530  fSidebandMixingLow = 0.180;
2531  fSidebandMixingHigh = 0.220;
2532  break;
2533  case 12: // c mixed event with pi0 sideband candidates (left side of pi0 peak)
2534  fUseRotationMethodInBG = kFALSE;
2535  fUseTrackMultiplicityForBG = kFALSE;
2536  fDoBGProbability = kFALSE;
2537  fBackgroundUseLikeSign = kFALSE;
2538  fBackgroundUseSideband = kTRUE;
2539  fSidebandMixingLow = 0.01;
2540  fSidebandMixingHigh = 0.05;
2541  break;
2542  case 13: // d mixing event with pi0 sideband candidates (both sides of pi0 peak)
2543  fUseRotationMethodInBG = kFALSE;
2544  fUseTrackMultiplicityForBG = kFALSE;
2545  fDoBGProbability = kFALSE;
2546  fBackgroundUseLikeSign = kFALSE;
2547  fBackgroundUseSideband = kFALSE;
2549  fSidebandMixingLeftLow = 0.01;
2550  fSidebandMixingLeftHigh = 0.05;
2551  fSidebandMixingRightLow = 0.180;
2552  fSidebandMixingRightHigh = 0.220;
2553  break;
2554  case 14: //e mixed event with pi0 sideband candidates (right side of pi0 peak)
2555  fUseRotationMethodInBG = kFALSE;
2556  fUseTrackMultiplicityForBG = kFALSE;
2557  fDoBGProbability = kFALSE;
2558  fBackgroundUseLikeSign = kFALSE;
2559  fBackgroundUseSideband = kTRUE;
2560  fSidebandMixingLow = 0.600;
2561  fSidebandMixingHigh = 0.650;
2562  break;
2563  case 15: //f mixed event with pi0 sideband candidates (left side of pi0 peak)
2564  fUseRotationMethodInBG = kFALSE;
2565  fUseTrackMultiplicityForBG = kFALSE;
2566  fDoBGProbability = kFALSE;
2567  fBackgroundUseLikeSign = kFALSE;
2568  fBackgroundUseSideband = kTRUE;
2569  fSidebandMixingLow = 0.42;
2570  fSidebandMixingHigh = 0.47;
2571  break;
2572  case 16: //g mixing event with pi0 sideband candidates (both sides of pi0 peak)
2573  fUseRotationMethodInBG = kFALSE;
2574  fUseTrackMultiplicityForBG = kFALSE;
2575  fDoBGProbability = kFALSE;
2576  fBackgroundUseLikeSign = kFALSE;
2577  fBackgroundUseSideband = kFALSE;
2579  fSidebandMixingLeftLow = 0.42;
2580  fSidebandMixingLeftHigh = 0.47;
2581  fSidebandMixingRightLow = 0.600;
2582  fSidebandMixingRightHigh = 0.650;
2583  break;
2584  case 17: //h mixed event with V0 multiplicity
2585  fUseRotationMethodInBG = kFALSE;
2586  fUseTrackMultiplicityForBG = kFALSE;
2587  fDoBGProbability = kFALSE;
2588  fDoConvCaloMixing = kTRUE;
2589  break;
2590  case 18: //i mixed event with V0 multiplicity
2591  fUseRotationMethodInBG = kFALSE;
2592  fUseTrackMultiplicityForBG = kFALSE;
2593  fDoBGProbability = kFALSE;
2594  fDoSectorMixing = kTRUE;
2595  break;
2596  case 19: //j mixed event with V0 multiplicity
2597  fUseRotationMethodInBG = kFALSE;
2598  fUseTrackMultiplicityForBG = kFALSE;
2599  fDoBGProbability = kFALSE;
2600  fDoSectorJetMixing = kTRUE;
2601  break;
2602  case 20: //k mixed by jet distance
2603  fUseRotationMethodInBG = kFALSE;
2604  fUseTrackMultiplicityForBG = kFALSE;
2605  fDoBGProbability = kFALSE;
2606  fDoJetMixing = kTRUE;
2607  break;
2608  case 21: //l mixed by jet distance and rotation
2609  fUseRotationMethodInBG = kFALSE;
2610  fUseTrackMultiplicityForBG = kFALSE;
2611  fDoBGProbability = kFALSE;
2612  fDoJetMixing = kTRUE;
2613  fDoJetRotateMixing = kTRUE;
2614  break;
2615  case 22: //m mixed by jet distance and jet pt
2616  fUseRotationMethodInBG = kFALSE;
2617  fUseTrackMultiplicityForBG = kFALSE;
2618  fDoBGProbability = kFALSE;
2619  fDoJetMixing = kTRUE;
2620  fDoJetPtMixing = kTRUE;
2621  break;
2622  case 23: //n mixed by jet distance, rotation and jet pt
2623  fUseRotationMethodInBG = kFALSE;
2624  fUseTrackMultiplicityForBG = kFALSE;
2625  fDoBGProbability = kFALSE;
2626  fDoJetMixing = kTRUE;
2627  fDoJetRotateMixing = kTRUE;
2628  fDoJetPtMixing = kTRUE;
2629  break;
2630  default:
2631  cout<<"Warning: BackgroundScheme not defined "<<BackgroundScheme<<endl;
2632  return kFALSE;
2633  }
2634  return kTRUE;
2635 }
2636 
2637 
2638 //________________________________________________________________________
2640  // Set Cut
2641  switch(DegreesForRotationMethod){
2642  case 0:
2644  break;
2645  case 1:
2647  break;
2648  case 2:
2650  break;
2651  case 3:
2653  break;
2654  default:
2655  cout<<"Warning: DegreesForRotationMethod not defined "<<DegreesForRotationMethod<<endl;
2656  return kFALSE;
2657  }
2658  fCuts[kDegreesForRotationMethod]=DegreesForRotationMethod;
2659  return kTRUE;
2660 }
2661 
2662 //________________________________________________________________________
2664  // Set Cut
2665  switch(NumberOfBGEvents){
2666  case 0:
2667  fNumberOfBGEvents = 5;
2668  break;
2669  case 1:
2670  fNumberOfBGEvents = 10;
2671  break;
2672  case 2:
2673  fNumberOfBGEvents = 15;
2674  break;
2675  case 3:
2676  fNumberOfBGEvents = 20;
2677  break;
2678  case 4:
2679  fNumberOfBGEvents = 2;
2680  break;
2681  case 5:
2682  fNumberOfBGEvents = 50;
2683  break;
2684  case 6:
2685  fNumberOfBGEvents = 80;
2686  break;
2687  case 7:
2688  fNumberOfBGEvents = 100;
2689  break;
2690  default:
2691  cout<<"Warning: NumberOfBGEvents not defined "<<NumberOfBGEvents<<endl;
2692  return kFALSE;
2693  }
2694  return kTRUE;
2695 }
2696 //________________________________________________________________________
2698 
2699  switch(sharedElec){
2700  case 0:
2701  fDoSharedElecCut = kFALSE;
2702  break;
2703  case 1:
2704  fDoSharedElecCut = kTRUE;
2705  break;
2706  default:
2707  cout<<"Warning: Shared Electron Cut not defined "<<sharedElec<<endl;
2708  return kFALSE;
2709  }
2710 
2711  return kTRUE;
2712 }
2713 
2714 //________________________________________________________________________
2716 
2717  switch(toClose){
2718  case 0:
2719  fDoToCloseV0sCut = kFALSE;
2720  fMinV0Dist = 250;
2721  break;
2722  case 1:
2723  fDoToCloseV0sCut = kTRUE;
2724  fMinV0Dist = 1;
2725  break;
2726  case 2:
2727  fDoToCloseV0sCut = kTRUE;
2728  fMinV0Dist = 2;
2729  break;
2730  case 3:
2731  fDoToCloseV0sCut = kTRUE;
2732  fMinV0Dist = 3;
2733  break;
2734  default:
2735  cout<<"Warning: Shared Electron Cut not defined "<<toClose<<endl;
2736  return kFALSE;
2737  }
2738  return kTRUE;
2739 }
2740 
2741 //________________________________________________________________________
2743 {// Set Cut
2744  if(fMode == 2){ //PCM-EMCal running
2745  switch(useMCPSmearing){
2746  case 0:
2747  fUseMCPSmearing = 0;
2748  fPBremSmearing = 1.;
2749  fPSigSmearing = 0.;
2750  fPSigSmearingCte = 0.;
2751  break;
2752  case 1:
2753  fUseMCPSmearing = 1;
2754  fPBremSmearing = 1;
2755  fPSigSmearing = 0.010;
2756  fPSigSmearingCte = 0.010;
2757  break;
2758  case 2:
2759  fUseMCPSmearing = 1;
2760  fPBremSmearing = 1;
2761  fPSigSmearing = 0.015;
2762  fPSigSmearingCte = 0.010;
2763  break;
2764  case 3:
2765  fUseMCPSmearing = 1;
2766  fPBremSmearing = 1.;
2767  fPSigSmearing = 0.020;
2768  fPSigSmearingCte = 0.010;
2769  break;
2770  case 4:
2771  fUseMCPSmearing = 1;
2772  fPBremSmearing = 1.;
2773  fPSigSmearing = 0.020;
2774  fPSigSmearingCte = 0.020;
2775  break;
2776  case 5:
2777  fUseMCPSmearing = 1;
2778  fPBremSmearing = 1.;
2779  fPSigSmearing = 0.030;
2780  fPSigSmearingCte = 0.020;
2781  break;
2782  case 6:
2783  fUseMCPSmearing = 1;
2784  fPBremSmearing = 1.;
2785  fPSigSmearing = 0.030;
2786  fPSigSmearingCte = 0.030;
2787  break;
2788  case 7:
2789  fUseMCPSmearing = 1;
2790  fPBremSmearing = 1;
2791  fPSigSmearing = 0.030;
2792  fPSigSmearingCte = 0.050;
2793  break;
2794  case 8:
2795  fUseMCPSmearing = 1;
2796  fPBremSmearing = 1.;
2797  fPSigSmearing = 0.030;
2798  fPSigSmearingCte = 0.060;
2799  break;
2800  case 9:
2801  fUseMCPSmearing = 1;
2802  fPBremSmearing = 1.;
2803  fPSigSmearing = 0.075;
2804  fPSigSmearingCte = 0.050;
2805  break;
2806 
2807  default:
2808  AliError("Warning: UseMCPSmearing not defined");
2809  return kFALSE;
2810  }
2811  }else{
2812  switch(useMCPSmearing){
2813  case 0:
2814  fUseMCPSmearing = 0;
2815  fPBremSmearing = 1.;
2816  fPSigSmearing = 0.;
2817  fPSigSmearingCte = 0.;
2818  break;
2819  case 1:
2820  fUseMCPSmearing = 1;
2821  fPBremSmearing = 1.0e-14;
2822  fPSigSmearing = 0.;
2823  fPSigSmearingCte = 0.;
2824  break;
2825  case 2:
2826  fUseMCPSmearing = 1;
2827  fPBremSmearing = 1.0e-15;
2828  fPSigSmearing = 0.0;
2829  fPSigSmearingCte = 0.;
2830  break;
2831  case 3:
2832  fUseMCPSmearing = 1;
2833  fPBremSmearing = 1.;
2834  fPSigSmearing = 0.003;
2835  fPSigSmearingCte = 0.002;
2836  break;
2837  case 4:
2838  fUseMCPSmearing = 1;
2839  fPBremSmearing = 1.;
2840  fPSigSmearing = 0.003;
2841  fPSigSmearingCte = 0.007;
2842  break;
2843  case 5:
2844  fUseMCPSmearing = 1;
2845  fPBremSmearing = 1.;
2846  fPSigSmearing = 0.003;
2847  fPSigSmearingCte = 0.016;
2848  break;
2849  case 6:
2850  fUseMCPSmearing = 1;
2851  fPBremSmearing = 1.;
2852  fPSigSmearing = 0.007;
2853  fPSigSmearingCte = 0.016;
2854  break;
2855  case 7:
2856  fUseMCPSmearing = 1;
2857  fPBremSmearing = 1.0e-16;
2858  fPSigSmearing = 0.0;
2859  fPSigSmearingCte = 0.;
2860  break;
2861  case 8:
2862  fUseMCPSmearing = 1;
2863  fPBremSmearing = 1.;
2864  fPSigSmearing = 0.007;
2865  fPSigSmearingCte = 0.014;
2866  break;
2867  case 9:
2868  fUseMCPSmearing = 1;
2869  fPBremSmearing = 1.;
2870  fPSigSmearing = 0.007;
2871  fPSigSmearingCte = 0.011;
2872  break;
2873 
2874  default:
2875  AliError("Warning: UseMCPSmearing not defined");
2876  return kFALSE;
2877  }
2878  }
2879  return kTRUE;
2880 }
2881 
2882 
2883 //________________________________________________________________________
2885  // Set Cut
2886  switch(DCAGammaGamma){
2887  case 0: //
2888  fDCAGammaGammaCutOn = kFALSE;
2889  fDCAGammaGammaCut = 1000;
2890  break;
2891  case 1: //
2892  fDCAGammaGammaCutOn = kTRUE;
2893  fDCAGammaGammaCut = 10;
2894  break;
2895  case 2: //
2896  fDCAGammaGammaCutOn = kTRUE;
2897  fDCAGammaGammaCut = 5;
2898  break;
2899  case 3: //
2900  fDCAGammaGammaCutOn = kTRUE;
2901  fDCAGammaGammaCut = 4;
2902  break;
2903  case 4: //
2904  fDCAGammaGammaCutOn = kTRUE;
2905  fDCAGammaGammaCut = 3;
2906  break;
2907  case 5: //
2908  fDCAGammaGammaCutOn = kTRUE;
2909  fDCAGammaGammaCut = 2.5;
2910  break;
2911  case 6: //
2912  fDCAGammaGammaCutOn = kTRUE;
2913  fDCAGammaGammaCut = 2;
2914  break;
2915  case 7: //
2916  fDCAGammaGammaCutOn = kTRUE;
2917  fDCAGammaGammaCut = 1.5;
2918  break;
2919  case 8: //
2920  fDCAGammaGammaCutOn = kTRUE;
2921  fDCAGammaGammaCut = 1;
2922  break;
2923  case 9: //
2924  fDCAGammaGammaCutOn = kTRUE;
2925  fDCAGammaGammaCut = 0.5;
2926  break;
2927  default:
2928  cout<<"Warning: DCAGammaGamma not defined "<<DCAGammaGamma<<endl;
2929  return kFALSE;
2930  }
2931  return kTRUE;
2932 }
2933 
2934 //________________________________________________________________________
2936  // Set Cut
2937  switch(DCAZMesonPrimVtx){
2938  case 0: //
2939  fDCAZMesonPrimVtxCutOn = kFALSE;
2940  fDCAZMesonPrimVtxCut = 1000;
2941  break;
2942  case 1: //
2943  fDCAZMesonPrimVtxCutOn = kTRUE;
2944  fDCAZMesonPrimVtxCut = 10;
2945  break;
2946  case 2: //
2947  fDCAZMesonPrimVtxCutOn = kTRUE;
2949  break;
2950  case 3: //
2951  fDCAZMesonPrimVtxCutOn = kTRUE;
2953  break;
2954  case 4: //
2955  fDCAZMesonPrimVtxCutOn = kTRUE;
2957  break;
2958  case 5: //
2959  fDCAZMesonPrimVtxCutOn = kTRUE;
2960  fDCAZMesonPrimVtxCut = 2.5;
2961  break;
2962  case 6: //
2963  fDCAZMesonPrimVtxCutOn = kTRUE;
2965  break;
2966  case 7: //
2967  fDCAZMesonPrimVtxCutOn = kTRUE;
2968  fDCAZMesonPrimVtxCut = 1.5;
2969  break;
2970  case 8: //
2971  fDCAZMesonPrimVtxCutOn = kTRUE;
2973  break;
2974  case 9: //
2975  fDCAZMesonPrimVtxCutOn = kTRUE;
2976  fDCAZMesonPrimVtxCut = 0.5;
2977  break;
2978  default:
2979  cout<<"Warning: DCAZMesonPrimVtx not defined "<<DCAZMesonPrimVtx<<endl;
2980  return kFALSE;
2981  }
2982  return kTRUE;
2983 }
2984 
2985 //________________________________________________________________________
2987  // Set Cut
2988  switch(DCARMesonPrimVtx){
2989  case 0: //
2990  fDCARMesonPrimVtxCutOn = kFALSE;
2991  fDCARMesonPrimVtxCut = 1000;
2992  break;
2993  case 1: //
2994  fDCARMesonPrimVtxCutOn = kTRUE;
2995  fDCARMesonPrimVtxCut = 10;
2996  break;
2997  case 2: //
2998  fDCARMesonPrimVtxCutOn = kTRUE;
3000  break;
3001  case 3: //
3002  fDCARMesonPrimVtxCutOn = kTRUE;
3004  break;
3005  case 4: //
3006  fDCARMesonPrimVtxCutOn = kTRUE;
3008  break;
3009  case 5: //
3010  fDCARMesonPrimVtxCutOn = kTRUE;
3011  fDCARMesonPrimVtxCut = 2.5;
3012  break;
3013  case 6: //
3014  fDCARMesonPrimVtxCutOn = kTRUE;
3016  break;
3017  case 7: //
3018  fDCARMesonPrimVtxCutOn = kTRUE;
3019  fDCARMesonPrimVtxCut = 1.5;
3020  break;
3021  case 8: //
3022  fDCARMesonPrimVtxCutOn = kTRUE;
3024  break;
3025  case 9: //
3026  fDCARMesonPrimVtxCutOn = kTRUE;
3027  fDCARMesonPrimVtxCut = 0.5;
3028  break;
3029  default:
3030  cout<<"Warning: DCARMesonPrimVtx not defined "<<DCARMesonPrimVtx<<endl;
3031  return kFALSE;
3032  }
3033  return kTRUE;
3034 }
3035 
3036 //________________________________________________________________________
3038  // Set Cut
3039 
3040  switch(minOpanMesonCut){
3041  case 0: //
3042  fMinOpanCutMeson = 0;
3043  fMinOpanPtDepCut = kFALSE;
3044  break;
3045  case 1: //
3046  fMinOpanCutMeson = 0.005;
3047  fMinOpanPtDepCut = kFALSE;
3048  break;
3049  case 2:
3050  if( fFMinOpanCut ) delete fFMinOpanCut;
3051  fFMinOpanCut = new TF1("fFMinOpanCut","[0]*exp(-[1]*x)+[2]",0.,100.);
3052  fFMinOpanCut->SetParameter(0,1.5);
3053  fFMinOpanCut->SetParameter(1,1.35);
3054  fFMinOpanCut->SetParameter(2,0.02);
3055  fMinOpanCutMeson = 0;
3056  fMinOpanPtDepCut = kTRUE;
3057  break;
3058  case 3: //
3059  fMinOpanCutMeson = 0.01;
3060  fMinOpanPtDepCut = kFALSE;
3061  break;
3062  case 4: //
3063  fMinOpanCutMeson = 0.0152; // minimum 0.75 EMCal cell diagonals
3064  fMinOpanPtDepCut = kFALSE;
3065  break;
3066  case 5: //
3067  fMinOpanCutMeson = 0.0202; // minimum 1 EMCal cell diagonal
3068  fMinOpanPtDepCut = kFALSE;
3069  break;
3070  case 6: //
3071  fMinOpanCutMeson = 0.017; // new standard cut for EMCal analyses as of 17.05.2017
3072  fMinOpanPtDepCut = kFALSE;
3073  break;
3074  case 7: //
3075  fMinOpanCutMeson = 0.016;
3076  fMinOpanPtDepCut = kFALSE;
3077  break;
3078  case 8: //
3079  fMinOpanCutMeson = 0.018;
3080  fMinOpanPtDepCut = kFALSE;
3081  break;
3082  case 9: //
3083  fMinOpanCutMeson = 0.019;
3084  fMinOpanPtDepCut = kFALSE;
3085  break;
3086 
3087  //cuts with one cell dist for GammaCalo only
3088  case 10: //a
3089  fMinOpanCutMeson = 0.;
3090  fEnableMinOpeningAngleCut = kFALSE;
3091  fMinOpanPtDepCut = kFALSE;
3092  fEnableOneCellDistCut = kTRUE;
3093  break;
3094  case 11: //b
3095  fMinOpanCutMeson = 0.0152;
3096  fEnableMinOpeningAngleCut = kFALSE;
3097  fMinOpanPtDepCut = kFALSE;
3098  fEnableOneCellDistCut = kTRUE;
3099  break;
3100  case 12: //c
3101  fMinOpanCutMeson = 0.016;
3102  fEnableMinOpeningAngleCut = kFALSE;
3103  fMinOpanPtDepCut = kFALSE;
3104  fEnableOneCellDistCut = kTRUE;
3105  break;
3106  case 13: //d
3107  fMinOpanCutMeson = 0.017;
3108  fEnableMinOpeningAngleCut = kFALSE;
3109  fMinOpanPtDepCut = kFALSE;
3110  fEnableOneCellDistCut = kTRUE;
3111  break;
3112  case 14: //e
3113  fMinOpanCutMeson = 0.018;
3114  fEnableMinOpeningAngleCut = kFALSE;
3115  fMinOpanPtDepCut = kFALSE;
3116  fEnableOneCellDistCut = kTRUE;
3117  break;
3118  case 15: //f
3119  fMinOpanCutMeson = 0.019;
3120  fEnableMinOpeningAngleCut = kFALSE;
3121  fMinOpanPtDepCut = kFALSE;
3122  fEnableOneCellDistCut = kTRUE;
3123  break;
3124  case 16: //g
3125  fMinOpanCutMeson = 0.0202;
3126  fEnableMinOpeningAngleCut = kFALSE;
3127  fMinOpanPtDepCut = kFALSE;
3128  fEnableOneCellDistCut = kTRUE;
3129  break;
3130  case 17: //h - Min opening angle cut for eta reconstruction - EMCEMC
3131  if( fFMinOpanCut ) delete fFMinOpanCut;
3132  fFMinOpanCut = new TF1("fFMinOpanCut","(exp([0]*(x+1))+[1]*(x-1)+[2]-0.05)*(x<[3])+0.017*(x>[3])",0.,100.);
3133  fFMinOpanCut->SetParameter(0,-0.530209);
3134  fFMinOpanCut->SetParameter(1,-0.00536687);
3135  fFMinOpanCut->SetParameter(2,0.168845);
3136  fFMinOpanCut->SetParameter(3,20);
3137  fMinOpanCutMeson = 0;
3138  fMinOpanPtDepCut = kTRUE;
3139  break;
3140  // opening angle cut variations for EMCal related analyses up to 17. May 2017
3141 // case 5: //
3142 // fMinOpanCutMeson = 0.0202; // minimum 1 EMCal cell diagonal
3143 // fMinOpanPtDepCut = kFALSE;
3144 // break;
3145 // case 6: //
3146 // fMinOpanCutMeson = 0.0404; // minimum 2 EMCal cell diagonals
3147 // fMinOpanPtDepCut = kFALSE;
3148 // break;
3149 // case 7: //
3150 // fMinOpanCutMeson = 0.0303; // minimum 1.5 EMCal cell diagonal
3151 // fMinOpanPtDepCut = kFALSE;
3152 // break;
3153 // case 8: //
3154 // fMinOpanCutMeson = 0.02525; // minimum 1.25 EMCal cell diagonal
3155 // fMinOpanPtDepCut = kFALSE;
3156 // break;
3157 // case 9: //
3158 // fMinOpanCutMeson = 0.03535; // minimum 1.75 EMCal cell diagonal
3159 // fMinOpanPtDepCut = kFALSE;
3160 // break;
3161  default:
3162  cout<<"Warning:minOpanMesonCut not defined "<<minOpanMesonCut<<endl;
3163  return kFALSE;
3164  }
3165 
3166  return kTRUE;
3167 }
3168 
3169 //________________________________________________________________________
3171  // Set Cut
3172  switch(maxOpanMesonCut){
3173  case 0: //
3174  fMaxOpanCutMeson = TMath::Pi();
3175  fMaxOpanPtDepCut = kFALSE;
3176  break;
3177  case 1:
3178  if( fFMaxOpanCut ) delete fFMaxOpanCut;
3179  fFMaxOpanCut = new TF1("fFMaxOpanCut","[0]*exp(-[1]*x)+[2]",0.,100.);
3180  fFMaxOpanCut->SetParameter(0,2.5);
3181  fFMaxOpanCut->SetParameter(1,0.85);
3182  fFMaxOpanCut->SetParameter(2,0.35);
3183  fMaxOpanPtDepCut = kTRUE;
3184  fMaxOpanCutMeson = TMath::Pi();
3185  break;
3186  case 2:
3187  if( fFMaxOpanCut ) delete fFMaxOpanCut;
3188  fFMaxOpanCut = new TF1("fFMaxOpanCut","[0]*exp(-[1]*x)+[2]",0.,100.);
3189  fFMaxOpanCut->SetParameter(0,2.3);
3190  fFMaxOpanCut->SetParameter(1,0.85);
3191  fFMaxOpanCut->SetParameter(2,0.35);
3192  fMaxOpanPtDepCut = kTRUE;
3193  fMaxOpanCutMeson = TMath::Pi();
3194  break;
3195  case 3: // - Max opening angle cut for pi0 & eta reconstruction - EMCEMC
3196  if( fFMaxOpanCut ) delete fFMaxOpanCut;
3197  fFMaxOpanCut = new TF1("fFMaxOpanCut","exp([0]*(x-0.5))+[1]*(x-0.5)+[2]+0.15",0.,100.);
3198  fFMaxOpanCut->SetParameter(0,-0.530209);
3199  fFMaxOpanCut->SetParameter(1,-0.00536687);
3200  fFMaxOpanCut->SetParameter(2,0.168845);
3201  fMaxOpanPtDepCut = kTRUE;
3202  fMaxOpanCutMeson = TMath::Pi();
3203  break;
3204  default:
3205  cout<<"Warning: maxOpanMesonCut not defined "<< maxOpanMesonCut<<endl;
3206  return kFALSE;
3207  }
3208  return kTRUE;
3209 }
3210 
3211 //________________________________________________________________________
3213  // returns TString with current cut number
3214  return fCutStringRead;
3215 }
3216 
3217 //________________________________________________________________________
3219 
3220  Int_t posLabel = photon->GetTrackLabelPositive();
3221  Int_t negLabel = photon->GetTrackLabelNegative();
3222 
3223  fElectronLabelArray[nV0*2] = posLabel;
3224  fElectronLabelArray[(nV0*2)+1] = negLabel;
3225 }
3226 
3227 //________________________________________________________________________
3229 
3230  Int_t posLabel = photon->GetTrackLabelPositive();
3231  Int_t negLabel = photon->GetTrackLabelNegative();
3232 
3233  for(Int_t i = 0; i<nV0s*2;i++){
3234  if(i==nV0*2) continue;
3235  if(i==(nV0*2)+1) continue;
3236  if(fElectronLabelArray[i] == posLabel){
3237  return kFALSE;}
3238  if(fElectronLabelArray[i] == negLabel){
3239  return kFALSE;}
3240  }
3241 
3242  return kTRUE;
3243 }
3244 //________________________________________________________________________
3246  Double_t posX = photon->GetConversionX();
3247  Double_t posY = photon->GetConversionY();
3248  Double_t posZ = photon->GetConversionZ();
3249 
3250  for(Int_t i = 0;i<photons->GetEntries();i++){
3251  if(nV0 == i) continue;
3252  AliAODConversionPhoton *photonComp = (AliAODConversionPhoton*) photons->At(i);
3253  Double_t posCompX = photonComp->GetConversionX();
3254  Double_t posCompY = photonComp->GetConversionY();
3255  Double_t posCompZ = photonComp->GetConversionZ();
3256 
3257  Double_t dist = pow((posX - posCompX),2)+pow((posY - posCompY),2)+pow((posZ - posCompZ),2);
3258 
3259  if(dist < fMinV0Dist*fMinV0Dist){
3260  if(photon->GetChi2perNDF() < photonComp->GetChi2perNDF()) return kTRUE;
3261  else {
3262  return kFALSE;}
3263  }
3264 
3265  }
3266  return kTRUE;
3267 }
3268 
3269 //________________________________________________________________________
3271 {
3272 
3273  if (photon==NULL) return;
3274  Double_t facPBrem = 1.;
3275  Double_t facPSig = 0.;
3276 
3277  Double_t phi=0.;
3278  Double_t theta=0.;
3279  Double_t P=0.;
3280 
3281 
3282  P=photon->P();
3283  phi=photon->Phi();
3284  if( photon->P()!=0){
3285  theta=acos( photon->Pz()/ photon->P());
3286  }
3287 
3288  if( fPSigSmearing != 0. || fPSigSmearingCte!=0. ){
3289  facPSig = TMath::Sqrt(fPSigSmearingCte*fPSigSmearingCte+fPSigSmearing*fPSigSmearing*P*P)*fRandom.Gaus(0.,1.);
3290  }
3291 
3292  if( fPBremSmearing != 1.){
3293  if(fBrem!=NULL){
3294  facPBrem = fBrem->GetRandom();
3295  }
3296  }
3297 
3298  photon->SetPx(facPBrem* (1+facPSig)* P*sin(theta)*cos(phi)) ;
3299  photon->SetPy(facPBrem* (1+facPSig)* P*sin(theta)*sin(phi)) ;
3300  photon->SetPz(facPBrem* (1+facPSig)* P*cos(theta)) ;
3301  photon->SetE(photon->P());
3302 }
3303 //________________________________________________________________________
3305 {
3306 
3307  if (photon==NULL) return;
3308  Double_t facPBrem = 1.;
3309  Double_t facPSig = 0.;
3310 
3311  Double_t phi=0.;
3312  Double_t theta=0.;
3313  Double_t P=0.;
3314 
3315 
3316  P=photon->P();
3317  phi=photon->Phi();
3318  if( photon->P()!=0){
3319  theta=acos( photon->Pz()/ photon->P());
3320  }
3321 
3322  if( fPSigSmearing != 0. || fPSigSmearingCte!=0. ){
3323  facPSig = TMath::Sqrt(fPSigSmearingCte*fPSigSmearingCte+fPSigSmearing*fPSigSmearing*P*P)*fRandom.Gaus(0.,1.);
3324  }
3325 
3326  if( fPBremSmearing != 1.){
3327  if(fBrem!=NULL){
3328  facPBrem = fBrem->GetRandom();
3329  }
3330  }
3331 
3332  photon->SetPx(facPBrem* (1+facPSig)* P*sin(theta)*cos(phi)) ;
3333  photon->SetPy(facPBrem* (1+facPSig)* P*sin(theta)*sin(phi)) ;
3334  photon->SetPz(facPBrem* (1+facPSig)* P*cos(theta)) ;
3335 
3336 }
3337 //________________________________________________________________________
3338 TLorentzVector AliConversionMesonCuts::SmearElectron(TLorentzVector particle)
3339 {
3340 
3341  //if (particle==0) return;
3342  Double_t facPBrem = 1.;
3343  Double_t facPSig = 0.;
3344 
3345  Double_t phi=0.;
3346  Double_t theta=0.;
3347  Double_t P=0.;
3348 
3349  P=particle.P();
3350  phi=particle.Phi();
3351  if (phi < 0.) phi += 2. * TMath::Pi();
3352 
3353  if( particle.P()!=0){
3354  theta=acos( particle.Pz()/ particle.P());
3355  }
3356 
3357 
3358  Double_t fPSigSmearingHalf = fPSigSmearing / 2.0; //The parameter was set for gammas with 2 particles and here we have just one electron
3359  Double_t sqrtfPSigSmearingCteHalf = fPSigSmearingCte / 2.0 ; //The parameter was set for gammas with 2 particles and here we have just one electron
3360 
3361 
3362 
3363  if( fPSigSmearingHalf != 0. || sqrtfPSigSmearingCteHalf!=0. ){
3364  facPSig = TMath::Sqrt(sqrtfPSigSmearingCteHalf*sqrtfPSigSmearingCteHalf+fPSigSmearingHalf*fPSigSmearingHalf*P*P)*fRandom.Gaus(0.,1.);
3365  }
3366 
3367  if( fPBremSmearing != 1.){
3368  if(fBrem!=NULL){
3369  facPBrem = fBrem->GetRandom();
3370  }
3371  }
3372 
3373  TLorentzVector SmearedParticle;
3374 
3375  SmearedParticle.SetXYZM( facPBrem* (1+facPSig)* P*sin(theta)*cos(phi) , facPBrem* (1+facPSig)* P*sin(theta)*sin(phi) ,
3376  facPBrem* (1+facPSig)* P*cos(theta) , TDatabasePDG::Instance()->GetParticle( ::kElectron )->Mass()) ;
3377 
3378  //particle.SetPx(facPBrem* (1+facPSig)* P*sin(theta)*cos(phi)) ;
3379  //particle.SetPy(facPBrem* (1+facPSig)* P*sin(theta)*sin(phi)) ;
3380  //particle.SetPz(facPBrem* (1+facPSig)* P*cos(theta)) ;
3381 
3382  return SmearedParticle;
3383 
3384 }
3385 
3386 //________________________________________________________________________
3387 // function to determine whether meson was selected by mass range
3389  if (fAcceptMesonMass){
3390  if (nominalRange == 0){
3391  if (meson->M() > fSelectionLow && meson->M() < fSelectionHigh)
3392  return kTRUE;
3393  else
3394  return kFALSE;
3395  } else if (nominalRange == 1){
3396  if (meson->M() > fSidebandMixingLow && meson->M() < fSidebandMixingHigh)
3397  return kTRUE;
3398  else
3399  return kFALSE;
3400  } else if (nominalRange == 2){
3401  if (meson->M() > fSidebandMixingLeftLow && meson->M() < fSidebandMixingLeftHigh)
3402  return kTRUE;
3403  else
3404  return kFALSE;
3405  } else if (nominalRange == 3){
3406  if (meson->M() > fSidebandMixingRightLow && meson->M() < fSidebandMixingRightHigh)
3407  return kTRUE;
3408  else
3409  return kFALSE;
3410  }
3411  } else {
3412  if (!(meson->M() > fSelectionLow && meson->M() < fSelectionHigh))
3413  return kTRUE;
3414  else
3415  return kFALSE;
3416  }
3417  return kTRUE;
3418 }
Bool_t MesonIsSelectedAODMCPiPlPiMiPiZero(AliAODMCParticle *fMCMother, TClonesArray *AODMCArray, Int_t &labelNegPion, Int_t &labelPosPion, Int_t &labelNeutPion, Double_t fRapidityShift=0)
Bool_t fAcceptMesonMass
flag to distinguish rejecting and accepting meson mass window for further analysis ...
AliCaloPhotonCuts * fCaloPhotonCuts
CaloPhotonCutObject belonging to same main task.
Bool_t SetSelectionWindowMergedCut(Int_t selectionCut)
#define P(T, U, S)
double Double_t
Definition: External.C:58
Int_t fSelectionWindowCut
selection window for merged ana in mass
Definition: External.C:236
const char * title
Definition: MakeQAPdf.C:27
void FillElectonLabelArray(AliAODConversionPhoton *photon, Int_t nV0)
Bool_t SetBackgroundScheme(Int_t BackgroundScheme)
Bool_t MesonIsSelectedMCPiZeroGamma(TParticle *fMCMother, AliMCEvent *mcEvent, Int_t &labelNeutPion, Int_t &labelGamma, Double_t fRapidityShift=0)
Float_t FunctionMaxMassCut(Float_t e)
Double_t fDCARMesonPrimVtxCut
cut value for the maximum distance in R between the production point of the Meson & the primary verte...
Double_t fRapidityCutMeson
max value for meson rapidity
Double_t mass
Bool_t SetNumberOfBGEvents(Int_t NumberOfBGEvents)
Int_t fMode
running mode of ConversionMesonCuts to select different sets of cut parameters for different running ...
Bool_t MesonIsSelectedMCChiC(TParticle *fMCMother, AliMCEvent *mcEvent, Int_t &, Int_t &, Int_t &, Double_t fRapidityShift=0.)
Bool_t MesonIsSelectedAODMC(AliAODMCParticle *MCMother, TClonesArray *AODMCArray, Double_t fRapidityShift=0.)
Bool_t RejectSharedElectronV0s(AliAODConversionPhoton *photon, Int_t nV0, Int_t nV0s)
void InitCutHistograms(TString name="", Bool_t additionalHists=kFALSE)
Bool_t SetAlphaMesonMergedCut(Int_t alphaMesonCut)
Double_t fSelectionHigh
higher meson inv mass window for further selection
Bool_t MesonIsSelectedMCEtaPiPlPiMiGamma(TParticle *fMCMother, AliMCEvent *mcEvent, Int_t &labelNegPion, Int_t &labelPosPion, Int_t &labelGamma, Double_t fRapidityShift=0)
Bool_t SetToCloseV0sCut(Int_t toClose)
Bool_t MesonIsSelectedAODMCPiZeroGamma(AliAODMCParticle *fMCMother, TClonesArray *AODMCArray, Int_t &labelNeutPion, Int_t &labelGamma, Double_t fRapidityShift=0)
Bool_t MesonIsSelectedMCDalitz(TParticle *fMCMother, AliMCEvent *mcEvent, Int_t &labelelectron, Int_t &labelpositron, Int_t &labelgamma, Double_t fRapidityShift=0.)
Float_t fOpeningAngle
min opening angle for meson
Bool_t fDoBG
flag to intialize BG
Bool_t MesonIsSelectedMCPiPlPiMiPiZero(TParticle *fMCMother, AliMCEvent *mcEvent, Int_t &labelNegPion, Int_t &labelPosPion, Int_t &labelNeutPion, Double_t fRapidityShift=0)
Bool_t SetSelectionWindowCut(Int_t selectionCut)
Double_t * sigma
Bool_t MesonIsSelectedAODMCDalitz(AliAODMCParticle *MCMother, TClonesArray *AODMCArray, Int_t &labelelectron, Int_t &labelpositron, Int_t &labelgamma, Double_t fRapidityShift=0.)
Bool_t fDoJetAnalysis
switch to run a jet analysis
Bool_t SetDCAGammaGammaCut(Int_t DCAGammaGamma)
Float_t FunctionMinMassCut(Float_t e)
Bool_t fUseTrackMultiplicityForBG
flag to use track multiplicity for meson bg estimation (else V0 mult)
int Int_t
Definition: External.C:63
Bool_t SetRapidityMesonCut(Int_t RapidityMesonCut)
Bool_t fDoSectorMixing
flag to enable Sectormixing for meson bg estimation
Bool_t SetAlphaMesonCut(Int_t alphaMesonCut)
Double_t fAlphaCutMeson
max value for meson alpha cut
float Float_t
Definition: External.C:68
Bool_t MesonIsSelectedAODMCPiPlPiMiEta(AliAODMCParticle *fMCMother, TClonesArray *AODMCArray, Int_t &labelNegPion, Int_t &labelPosPion, Int_t &labelNeutPion, Double_t fRapidityShift=0)
Bool_t MesonIsSelectedMCPiPlPiMiEta(TParticle *fMCMother, AliMCEvent *mcEvent, Int_t &labelNegPion, Int_t &labelPosPion, Int_t &labelNeutPion, Double_t fRapidityShift=0)
void SmearParticle(AliAODConversionPhoton *photon)
Bool_t RejectToCloseV0s(AliAODConversionPhoton *photon, TList *photons, Int_t nV0)
TH2F * fHistoMesonCuts
bookkeeping for meson cuts
Bool_t fUsePtmaxMethodForBG
flag to apply Ptmax method
TObjString * fCutString
cut number used for analysis
rapidity
Definition: HFPtSpectrum.C:47
Bool_t fDoJetMixing
flag to enable mixing by cluster distance to jet axis
void SmearVirtualPhoton(AliAODConversionPhoton *photon)
Bool_t fEnableMinOpeningAngleCut
flag to enable min opening angle cut
Int_t fIsMergedClusterCut
flag for merged cluster and di cluster analysis
Bool_t fDoMinPtCut
do min pT cut
Double_t GetOpeningAngle() const
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
Bool_t MesonIsSelectedPiZeroGammaAngle(AliAODConversionMother *omega, AliAODConversionMother *pi0, AliAODConversionPhoton *gamma, Bool_t DoPiZeroAngleCut, TF1 *maxfit, Double_t lowerFactor, Double_t upperFactor)
Float_t GetDCABetweenPhotons() const
Bool_t fEnableMassCut
flag to enable mass cut
Bool_t MesonIsSelectedMC(TParticle *fMCMother, AliMCEvent *mcEvent, Double_t fRapidityShift=0.)
Bool_t fDoLightOutput
switch for running light output, kFALSE -> normal mode, kTRUE -> light mode
Float_t GetDCARMotherPrimVtx() const
static const char * fgkCutNames[kNCuts]
Bool_t fEnableOneCellDistCut
flag to enable 1 cell dist cut
Bool_t SetDCAZMesonPrimVtxCut(Int_t DCAZMesonPrimVtx)
AliConversionMesonCuts(const char *name="MesonCuts", const char *title="Meson Cuts")
Definition: External.C:220
Class handling all kinds of selection cuts for Gamma Conversion analysis.
Bool_t MesonIsSelected(AliAODConversionMother *pi0, Bool_t IsSignal=kTRUE, Double_t fRapidityShift=0., Int_t leadingCellID1=0, Int_t leadingCellID2=0)
TH2F * fHistoMesonBGCuts
bookkeeping for meson bg cuts
Bool_t MesonIsSelectedAODMCChiC(AliAODMCParticle *fMCMother, TClonesArray *AODMCArray, Int_t &, Int_t &, Int_t &, Double_t fRapidityShift=0.)
Bool_t SetMaxOpanMesonCut(Int_t maxOpanMesonCut)
Bool_t fDoJetPtMixing
flag to enbale mixing by jet pt bins
Double_t fSelectionLow
lower meson inv mass window for further selection
Bool_t fDoJetQA
switch to run a jet QA analysis
Bool_t fDCARMesonPrimVtxCutOn
cut flag for the maximum distance in R between the production point of the Meson & the primary vertex...
Bool_t fDoSectorJetMixing
flag to enable Sectormixing with jets for meson bg estimation
Bool_t SetSharedElectronCut(Int_t sharedElec)
#define ASSIGNARRAY(i)
bool Bool_t
Definition: External.C:53
Bool_t fDCAZMesonPrimVtxCutOn
cut flag for the maximum distance in Z between the production point of the Meson & the primary vertex...
Bool_t SetNDegreesForRotationMethod(Int_t DegreesForRotationMethod)
Bool_t fDoBGProbability
flag to use probability method for meson bg estimation
Bool_t SetMinOpanMesonCut(Int_t minOpanMesonCut)
Float_t GetDCAZMotherPrimVtx() const
Bool_t MesonIsSelectedAODMCEtaPiPlPiMiGamma(AliAODMCParticle *fMCMother, TClonesArray *AODMCArray, Int_t &labelNegPion, Int_t &labelPosPion, Int_t &labelGamma, Double_t fRapidityShift=0)
Bool_t fDoJetRotateMixing
flag to enable mixing by rotating calorimeter
Bool_t MesonIsSelectedByMassCut(AliAODConversionMother *meson, Int_t nominalRange)
Bool_t fUseRotationMethodInBG
flag to apply rotation method for meson bg estimation
Double_t fAlphaMinCutMeson
min value for meson alpha cut
TLorentzVector SmearElectron(TLorentzVector particle)
TList * fHistograms
List of QA histograms.
TString meson
Bool_t AreNeighbours(Int_t absCellId1, Int_t absCellId2)
Bool_t SetMesonKind(Int_t mesonKind)
Double_t fDCAGammaGammaCut
cut value for the maximum distance between the two photons [cm]
Bool_t fDCAGammaGammaCutOn
cut flag for the maximum distance between the two photons
Bool_t fDoConvCaloMixing
flag to use enable convcalo mixing in addition to caloconv mixing
Bool_t InitializeCutsFromCutString(const TString analysisCutSelection)
Bool_t SetDCARMesonPrimVtxCut(Int_t DCARMesonPrimVtx)
Bool_t SetMCPSmearing(Int_t useMCPSmearing)
Bool_t SetCut(cutIds cutID, Int_t cut)
Bool_t fDoSphericityMixing
flag to enable Sphericitymixing for meson bg estimation
Double_t fDCAZMesonPrimVtxCut
cut value for the maximum distance in Z between the production point of the Meson & the primary verte...