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" 35 #include "AliMCEvent.h" 37 #include "TObjString.h" 38 #include "AliAODEvent.h" 39 #include "AliESDEvent.h" 40 #include "AliCentrality.h" 43 #include "TDatabasePDG.h" 44 #include "AliAODMCParticle.h" 59 "DegreesForRotationMethod",
77 AliAnalysisCuts(name,title),
79 fDoLightOutput(kFALSE),
81 fCaloPhotonCuts(NULL),
83 fIsMergedClusterCut(0),
87 fEnableMassCut(kFALSE),
89 fSelectionHigh(0.145),
90 fSelectionWindowCut(-1),
94 fUseRotationMethodInBG(kFALSE),
95 fUsePtmaxMethodForBG(kFALSE),
97 fdoBGProbability(kFALSE),
98 fUseTrackMultiplicityForBG(kFALSE),
99 fnDegreeRotationPMForBG(0),
100 fNumberOfBGEvents(0),
101 fOpeningAngle(0.005),
102 fEnableMinOpeningAngleCut(kTRUE),
103 fEnableOneCellDistCut(kFALSE),
104 fDoToCloseV0sCut(kFALSE),
106 fDoSharedElecCut(kFALSE),
107 fUseMCPSmearing(kFALSE),
114 fAlphaPtDepCut(kFALSE),
115 fElectronLabelArraySize(500),
116 fElectronLabelArray(NULL),
117 fDCAGammaGammaCut(1000),
118 fDCAZMesonPrimVtxCut(1000),
119 fDCARMesonPrimVtxCut(1000),
120 fDCAGammaGammaCutOn(kFALSE),
121 fDCAZMesonPrimVtxCutOn(kFALSE),
122 fDCARMesonPrimVtxCutOn(kFALSE),
125 fMinOpanPtDepCut(kFALSE),
126 fMaxOpanCutMeson(TMath::Pi()),
128 fMaxOpanPtDepCut(kFALSE),
129 fBackgroundHandler(0),
130 fBackgroundUseSideband(kFALSE),
131 fBackgroundUseSidebandBothSides(kFALSE),
132 fBackgroundUseLikeSign(kFALSE),
133 fSidebandMixingLow(0.180),
134 fSidebandMixingHigh(0.300),
135 fSidebandMixingLeftLow(0.05),
136 fSidebandMixingLeftHigh(0.100),
137 fSidebandMixingRightLow(0.180),
138 fSidebandMixingRightHigh(0.300),
141 fHistoMesonCuts(NULL),
142 fHistoMesonBGCuts(NULL),
143 fHistoDCAGGMesonBefore(NULL),
144 fHistoDCAZMesonPrimVtxBefore(NULL),
145 fHistoDCARMesonPrimVtxBefore(NULL),
146 fHistoDCAGGMesonAfter(NULL),
147 fHistoDCAZMesonPrimVtxAfter(NULL),
148 fHistoDCARMesonPrimVtxAfter(NULL),
149 fHistoInvMassBefore(NULL),
150 fHistoInvMassAfter(NULL)
156 fBrem =
new TF1(
"fBrem",
"pow(-log(x),[0]/log(2.0)-1.0)/TMath::Gamma([0]/log(2.0))",0.00001,0.999999999);
159 fBrem->SetNpx(100000);
166 AliAnalysisCuts(ref),
288 TH1::AddDirectory(kFALSE);
399 TH1::AddDirectory(kTRUE);
407 if(!mcEvent)
return kFALSE;
409 if(fMCMother->GetPdgCode()==111 || fMCMother->GetPdgCode()==221){
410 if(fMCMother->R()>
fMaxR)
return kFALSE;
413 if(fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0){
414 rapidity=8.-fRapidityShift;
416 rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
426 if(fMCMother->GetNDaughters()!=2)
return kFALSE;
428 for(
Int_t i=0;i<2;i++){
429 if(fMCMother->GetDaughter(i) < 0)
return kFALSE;
430 TParticle *MDaughter=mcEvent->Particle(fMCMother->GetDaughter(i));
432 if(MDaughter->GetPdgCode()!=22)
return kFALSE;
448 if(!AODMCArray)
return kFALSE;
450 if(MCMother->GetPdgCode()==111 || MCMother->GetPdgCode()==221){
451 Double_t rMeson = sqrt( (MCMother->Xv()*MCMother->Xv()) + (MCMother->Yv()*MCMother->Yv()) ) ;
452 if(rMeson>
fMaxR)
return kFALSE;
455 if(MCMother->E() - MCMother->Pz() == 0 || MCMother->E() + MCMother->Pz() == 0){
456 rapidity=8.-fRapidityShift;
458 rapidity = 0.5*(TMath::Log((MCMother->E()+MCMother->Pz()) / (MCMother->E()-MCMother->Pz())))-fRapidityShift;
468 if(MCMother->GetNDaughters()!=2)
return kFALSE;
470 for(
Int_t i=0;i<2;i++){
471 AliAODMCParticle *MDaughter=
static_cast<AliAODMCParticle*
>(AODMCArray->At(MCMother->GetDaughter(i)));
473 if(MDaughter->GetPdgCode()!=22)
return kFALSE;
490 if( !mcEvent )
return kFALSE;
492 if( fMCMother->GetPdgCode() != 111 && fMCMother->GetPdgCode() != 221 )
return kFALSE;
494 if( fMCMother->R()>
fMaxR )
return kFALSE;
498 if( fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0 ){
499 rapidity=8.-fRapidityShift;
502 rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
512 if( fMCMother->GetNDaughters() != 3 )
return kFALSE;
514 TParticle *positron = 0x0;
515 TParticle *electron = 0x0;
516 TParticle *gamma = 0x0;
518 for(
Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
519 if(index < 0)
continue;
520 TParticle* temp = (TParticle*)mcEvent->Particle( index );
522 switch( temp->GetPdgCode() ) {
525 labelpositron = index;
529 labelelectron = index;
538 if( positron && electron && gamma)
return kTRUE;
548 if( !AODMCArray )
return kFALSE;
550 if( fMCMother->GetPdgCode() != 111 && fMCMother->GetPdgCode() != 221 )
return kFALSE;
552 Double_t rMeson = sqrt( (fMCMother->Xv()*fMCMother->Xv()) + (fMCMother->Yv()*fMCMother->Yv()) ) ;
553 if(rMeson>
fMaxR)
return kFALSE;
557 if( fMCMother->E() - fMCMother->Pz() == 0 || fMCMother->E() + fMCMother->Pz() == 0 ){
558 rapidity=8.-fRapidityShift;
561 rapidity = 0.5*(TMath::Log((fMCMother->E()+fMCMother->Pz()) / (fMCMother->E()-fMCMother->Pz())))-fRapidityShift;
571 if( fMCMother->GetNDaughters() != 3 )
return kFALSE;
573 AliAODMCParticle *positron = 0x0;
574 AliAODMCParticle *electron = 0x0;
575 AliAODMCParticle *gamma = 0x0;
577 for(
Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
578 if(index < 0)
continue;
579 AliAODMCParticle* temp =
static_cast<AliAODMCParticle*
>(AODMCArray->At(index));
582 switch( temp->GetPdgCode() ) {
585 labelpositron = index;
589 labelelectron = index;
598 if( positron && electron && gamma)
return kTRUE;
608 if( !mcEvent )
return kFALSE;
610 if( fMCMother->GetPdgCode() != 221 )
return kFALSE;
612 if( fMCMother->R()>
fMaxR )
return kFALSE;
616 if( fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0 ){
617 rapidity=8.-fRapidityShift;
620 rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
630 if( fMCMother->GetNDaughters() != 3 )
return kFALSE;
632 TParticle *posPion = 0x0;
633 TParticle *negPion = 0x0;
634 TParticle *gamma = 0x0;
636 for(
Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
637 if(index < 0)
continue;
638 TParticle* temp = (TParticle*)mcEvent->Particle( index );
640 switch( temp->GetPdgCode() ) {
643 labelPosPion = index;
647 labelNegPion = index;
656 if( posPion && negPion && gamma)
return kTRUE;
666 if( !mcEvent )
return kFALSE;
668 if( !(fMCMother->GetPdgCode() == 221 || fMCMother->GetPdgCode() == 223) )
return kFALSE;
670 if( fMCMother->R()>
fMaxR )
return kFALSE;
674 if( fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0 ){
675 rapidity=8.-fRapidityShift;
678 rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
688 if( fMCMother->GetNDaughters() != 3 )
return kFALSE;
690 TParticle *posPion = 0x0;
691 TParticle *negPion = 0x0;
692 TParticle *neutPion = 0x0;
695 for(
Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
696 if(index < 0)
continue;
697 TParticle* temp = (TParticle*)mcEvent->Particle( index );
699 switch( temp->GetPdgCode() ) {
702 labelPosPion = index;
706 labelNegPion = index;
710 labelNeutPion = index;
715 if( posPion && negPion && neutPion )
return kTRUE;
723 if(!mcEvent)
return kFALSE;
725 if(fMCMother->GetPdgCode()!=223)
return kFALSE;
729 if(fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0){
730 rapidity=8.-fRapidityShift;
733 rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
742 if(fMCMother->GetNDaughters()!=2)
return kFALSE;
744 TParticle *gamma = 0x0;
745 TParticle *pi0 = 0x0;
747 for(
Int_t index = fMCMother->GetFirstDaughter();index <= fMCMother->GetLastDaughter();index++){
748 if(index < 0)
continue;
749 TParticle *temp = (TParticle*)mcEvent->Particle(index);
750 switch(temp->GetPdgCode()){
757 labelNeutPion = index;
762 if(gamma && pi0)
return kTRUE;
770 if(!DoPiZeroAngleCut)
return kTRUE;
772 Double_t PiZeroGammaAngle = pi0->Angle(gamma->Vect());
775 if(PiZeroGammaAngle > lowerFactor * maxfit->Eval(omegaPt) && PiZeroGammaAngle < upperFactor * maxfit->Eval(omegaPt))
return kTRUE;
785 if(!mcEvent)
return kFALSE;
789 if(fMCMother->GetPdgCode()==10441 || fMCMother->GetPdgCode()==10443 || fMCMother->GetPdgCode()==445 ){
790 if(fMCMother->R()>
fMaxR)
return kFALSE;
793 if(fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0){
794 rapidity=8.-fRapidityShift;
797 rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
807 if(fMCMother->GetNDaughters()!=2)
return kFALSE;
809 TParticle *jpsi = 0x0;
810 TParticle *gamma = 0x0;
811 TParticle *positron = 0x0;
812 TParticle *electron = 0x0;
816 for(
Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
817 if(index < 0)
continue;
818 TParticle* temp = (TParticle*)mcEvent->Particle( index );
820 switch( temp->GetPdgCode() ) {
827 labelgammaChiC = index;
832 if ( !jpsi || ! gamma)
return kFALSE;
833 if(jpsi->GetNDaughters()!=2)
return kFALSE;
836 for(
Int_t index= jpsi->GetFirstDaughter();index<= jpsi->GetLastDaughter();index++){
837 if(index < 0)
continue;
838 TParticle* temp = (TParticle*)mcEvent->Particle( index );
839 switch( temp->GetPdgCode() ) {
842 labelelectronChiC = index;
846 labelpositronChiC = index;
850 if( !electron || !positron)
return kFALSE;
851 if( positron && electron && gamma)
return kTRUE;
870 if(hist)hist->Fill(cutIndex, pi0->Pt());
874 if((pi0->E()+pi0->Pz())/(pi0->E()-pi0->Pz())<=0){
875 if(hist)hist->Fill(cutIndex, pi0->Pt());
877 if (!IsSignal)cout <<
"undefined rapidity" << endl;
884 if(hist)hist->Fill(cutIndex, pi0->Pt());
897 if (pi0->M() > massMax || pi0->M() < massMin ){
898 if(hist)hist->Fill(cutIndex, pi0->Pt());
905 if(hist)hist->Fill(cutIndex, pi0->Pt());
914 if(hist)hist->Fill(cutIndex, pi0->Pt());
922 if(hist)hist->Fill(cutIndex, pi0->Pt());
930 if(hist)hist->Fill(cutIndex, pi0->Pt());
940 if(hist)hist->Fill(cutIndex, pi0->Pt());
947 if(hist)hist->Fill(cutIndex, pi0->Pt());
960 if(hist)hist->Fill(cutIndex, pi0->Pt());
968 if(hist)hist->Fill(cutIndex, pi0->Pt());
978 if(hist)hist->Fill(cutIndex, pi0->Pt());
992 if(hist)hist->Fill(cutIndex, pi0->Pt());
998 if(hist)hist->Fill(cutIndex, pi0->Pt());
1022 AliInfo(Form(
"Set Meson Cutnumber: %s",analysisCutSelection.Data()));
1023 if(analysisCutSelection.Length()!=
kNCuts) {
1024 AliError(Form(
"Cut selection has the wrong length! size is %d, number of cuts is %d", analysisCutSelection.Length(),
kNCuts));
1027 if(!analysisCutSelection.IsAlnum()){
1028 AliError(
"Cut selection is not alphanumeric");
1032 TString analysisCutSelectionLowerCase = Form(
"%s",analysisCutSelection.Data());
1033 analysisCutSelectionLowerCase.ToLower();
1034 const char *cutSelection = analysisCutSelectionLowerCase.Data();
1035 #define ASSIGNARRAY(i) fCuts[i] = ((int)cutSelection[i]>=(int)'a') ? cutSelection[i]-'a'+10 : cutSelection[i]-'0' 1059 }
else return kFALSE;
1066 }
else return kFALSE;
1072 }
else return kFALSE;
1080 }
else return kFALSE;
1086 }
else return kFALSE;
1093 }
else return kFALSE;
1100 }
else return kFALSE;
1107 }
else return kFALSE;
1114 }
else return kFALSE;
1121 }
else return kFALSE;
1128 }
else return kFALSE;
1134 }
else return kFALSE;
1140 }
else return kFALSE;
1146 }
else return kFALSE;
1152 }
else return kFALSE;
1158 }
else return kFALSE;
1164 }
else return kFALSE;
1171 }
else return kFALSE;
1174 cout <<
"Error:: Cut id out of range"<< endl;
1178 cout <<
"Error:: Cut id " << cutID <<
" not recognized "<< endl;
1195 printf(
"\nMeson cutnumber \n");
1197 printf(
"%d",
fCuts[ic]);
1201 printf(
"Meson cuts \n");
1206 else printf(
"\t alpha pT-dep cut active\n");
1213 printf(
"\t Meson selection energy dependent\n\n");
1219 else printf(
"\t Min theta_{open} pT-dep cut active\n");
1221 else printf(
"\t Max theta_{open} pT-dep cut active\n");
1222 printf(
"\t Running mode for cutselection (0 std, 2 PCM-Calo): %d\n",
fMode);
1224 printf(
"Meson BG settings \n");
1226 printf(
"\t No BG estimation \n");
1252 cout<<
"Warning: Meson kind not defined"<<mesonKind<<endl;
1291 cout<<
"Warning: pT cut not defined"<<PtCut<<endl;
1300 switch(selectionCut){
1343 cout<<
"Warning: SelectionCut not defined "<<selectionCut<<endl;
1384 cout<<
"Warning: SelectionCut merged not defined "<<selectionCut<<endl;
1421 aSigmaHigh = 0.0012;
1424 mass = aMass + bMass*e;
1426 if (e < switchSigma){
1427 sigma = aSigmaLow + bSigmaLow*e;
1429 sigma = aSigmaHigh + bSigmaHigh*e;
1431 return mass + nSigma*
sigma;
1443 aSigmaHigh = 0.0023;
1444 bSigmaHigh = 6.7e-4;
1447 if (e < switchMass){
1448 mass = aMassLow + bMassLow*e;
1450 mass = aMassHigh + bMassHigh*e;
1453 if (e < switchSigma){
1454 sigma = aSigmaLow + bSigmaLow*e;
1456 sigma = aSigmaHigh + bSigmaHigh*e;
1458 return mass + nSigma*
sigma;
1467 aSigmaHigh = 0.0012;
1470 mass = aMass + bMass*e;
1472 if (e < switchSigma){
1473 sigma = aSigmaLow + bSigmaLow*e;
1475 sigma = aSigmaHigh + bSigmaHigh*e;
1477 return mass + nSigma*
sigma;
1489 aSigmaHigh = 0.0023;
1490 bSigmaHigh = 6.7e-4;
1493 if (e < switchMass){
1494 mass = aMassLow + bMassLow*e;
1496 mass = aMassHigh + bMassHigh*e;
1499 if (e < switchSigma){
1500 sigma = aSigmaLow + bSigmaLow*e;
1502 sigma = aSigmaHigh + bSigmaHigh*e;
1504 return mass + nSigma*
sigma;
1513 aSigmaHigh = 0.0012;
1516 mass = aMass + bMass*e;
1518 if (e < switchSigma){
1519 sigma = aSigmaLow + bSigmaLow*e;
1521 sigma = aSigmaHigh + bSigmaHigh*e;
1523 return mass + nSigma*
sigma;
1535 aSigmaHigh = 0.0023;
1536 bSigmaHigh = 6.7e-4;
1539 if (e < switchMass){
1540 mass = aMassLow + bMassLow*e;
1542 mass = aMassHigh + bMassHigh*e;
1545 if (e < switchSigma){
1546 sigma = aSigmaLow + bSigmaLow*e;
1548 sigma = aSigmaHigh + bSigmaHigh*e;
1550 return mass + nSigma*
sigma;
1598 aSigmaHigh = 0.0012;
1601 mass = aMass + bMass*e;
1603 if (e < switchSigma){
1604 sigma = aSigmaLow + bSigmaLow*e;
1606 sigma = aSigmaHigh + bSigmaHigh*e;
1609 return mass - nSigma*
sigma;
1621 aSigmaHigh = 0.0023;
1622 bSigmaHigh = 6.7e-4;
1625 if (e < switchMass){
1626 mass = aMassLow + bMassLow*e;
1628 mass = aMassHigh + bMassHigh*e;
1631 if (e < switchSigma){
1632 sigma = aSigmaLow + bSigmaLow*e;
1634 sigma = aSigmaHigh + bSigmaHigh*e;
1638 return mass - nSigma*
sigma;
1647 aSigmaHigh = 0.0012;
1650 mass = aMass + bMass*e;
1652 if (e < switchSigma){
1653 sigma = aSigmaLow + bSigmaLow*e;
1655 sigma = aSigmaHigh + bSigmaHigh*e;
1658 return mass - nSigma*
sigma;
1670 aSigmaHigh = 0.0023;
1671 bSigmaHigh = 6.7e-4;
1674 if (e < switchMass){
1675 mass = aMassLow + bMassLow*e;
1677 mass = aMassHigh + bMassHigh*e;
1680 if (e < switchSigma){
1681 sigma = aSigmaLow + bSigmaLow*e;
1683 sigma = aSigmaHigh + bSigmaHigh*e;
1687 return mass - nSigma*
sigma;
1696 aSigmaHigh = 0.0012;
1699 mass = aMass + bMass*e;
1701 if (e < switchSigma){
1702 sigma = aSigmaLow + bSigmaLow*e;
1704 sigma = aSigmaHigh + bSigmaHigh*e;
1707 return mass - nSigma*
sigma;
1719 aSigmaHigh = 0.0023;
1720 bSigmaHigh = 6.7e-4;
1723 if (e < switchMass){
1724 mass = aMassLow + bMassLow*e;
1726 mass = aMassHigh + bMassHigh*e;
1729 if (e < switchSigma){
1730 sigma = aSigmaLow + bSigmaLow*e;
1732 sigma = aSigmaHigh + bSigmaHigh*e;
1735 return mass - nSigma*
sigma;
1739 return 0.005+0.004*e;
1742 return 0.004+0.004*e;
1745 return 0.006+0.004*e;
1758 switch(alphaMesonCut){
1767 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]*tanh([1]*x)",0.,100.);
1782 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]*tanh([1]*x)",0.,100.);
1827 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]*tanh([1]*x)",0.,100.);
1855 cout<<
"Warning: AlphaMesonCut not defined "<<alphaMesonCut<<endl;
1865 switch(alphaMesonCut){
1873 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]+[1]*x+[2]/(x*x*x)",0.,100.);
1883 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]+[1]*x+[2]/(x*x*x)",0.,100.);
1893 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]+[1]*x+[2]/(x*x*x)",0.,100.);
1903 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]+[1]*x+[2]/(x*x*x)",0.,100.);
1913 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]+[1]*x+[2]/(x*x*x)",0.,100.);
1923 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]+[1]*x+[2]/(x*x*x)",0.,100.);
1933 cout<<
"Warning: AlphaMesonCut for merged clusters not defined "<<alphaMesonCut<<endl;
1942 switch(RapidityMesonCut){
1974 cout<<
"Warning: RapidityMesonCut not defined "<<RapidityMesonCut<<endl;
1984 switch(BackgroundScheme){
2004 cout <<
"no BG calculation should be done" << endl;
2075 cout<<
"Warning: BackgroundScheme not defined "<<BackgroundScheme<<endl;
2085 switch(DegreesForRotationMethod){
2099 cout<<
"Warning: DegreesForRotationMethod not defined "<<DegreesForRotationMethod<<endl;
2109 switch(NumberOfBGEvents){
2135 cout<<
"Warning: NumberOfBGEvents not defined "<<NumberOfBGEvents<<endl;
2151 cout<<
"Warning: Shared Electron Cut not defined "<<sharedElec<<endl;
2179 cout<<
"Warning: Shared Electron Cut not defined "<<toClose<<endl;
2189 switch(useMCPSmearing){
2252 AliError(
"Warning: UseMCPSmearing not defined");
2256 switch(useMCPSmearing){
2319 AliError(
"Warning: UseMCPSmearing not defined");
2330 switch(DCAGammaGamma){
2372 cout<<
"Warning: DCAGammaGamma not defined "<<DCAGammaGamma<<endl;
2381 switch(DCAZMesonPrimVtx){
2423 cout<<
"Warning: DCAZMesonPrimVtx not defined "<<DCAZMesonPrimVtx<<endl;
2432 switch(DCARMesonPrimVtx){
2474 cout<<
"Warning: DCARMesonPrimVtx not defined "<<DCARMesonPrimVtx<<endl;
2484 switch(minOpanMesonCut){
2495 fFMinOpanCut =
new TF1(
"fFMinOpanCut",
"[0]*exp(-[1]*x)+[2]",0.,100.);
2596 cout<<
"Warning:minOpanMesonCut not defined "<<minOpanMesonCut<<endl;
2606 switch(maxOpanMesonCut){
2613 fFMaxOpanCut =
new TF1(
"fFMaxOpanCut",
"[0]*exp(-[1]*x)+[2]",0.,100.);
2622 fFMaxOpanCut =
new TF1(
"fFMaxOpanCut",
"[0]*exp(-[1]*x)+[2]",0.,100.);
2630 cout<<
"Warning: maxOpanMesonCut not defined "<< maxOpanMesonCut<<endl;
2658 for(
Int_t i = 0; i<nV0s*2;i++){
2659 if(i==nV0*2)
continue;
2660 if(i==(nV0*2)+1)
continue;
2675 for(
Int_t i = 0;i<photons->GetEntries();i++){
2676 if(nV0 == i)
continue;
2682 Double_t dist = pow((posX - posCompX),2)+pow((posY - posCompY),2)+pow((posZ - posCompZ),2);
2698 if (photon==NULL)
return;
2709 if( photon->P()!=0){
2710 theta=acos( photon->Pz()/ photon->P());
2719 facPBrem =
fBrem->GetRandom();
2723 photon->SetPx(facPBrem* (1+facPSig)* P*sin(theta)*cos(phi)) ;
2724 photon->SetPy(facPBrem* (1+facPSig)* P*sin(theta)*sin(phi)) ;
2725 photon->SetPz(facPBrem* (1+facPSig)* P*cos(theta)) ;
2726 photon->SetE(photon->P());
2732 if (photon==NULL)
return;
2743 if( photon->P()!=0){
2744 theta=acos( photon->Pz()/ photon->P());
2753 facPBrem =
fBrem->GetRandom();
2757 photon->SetPx(facPBrem* (1+facPSig)* P*sin(theta)*cos(phi)) ;
2758 photon->SetPy(facPBrem* (1+facPSig)* P*sin(theta)*sin(phi)) ;
2759 photon->SetPz(facPBrem* (1+facPSig)* P*cos(theta)) ;
2776 if (phi < 0.) phi += 2. * TMath::Pi();
2778 if( particle.P()!=0){
2779 theta=acos( particle.Pz()/ particle.P());
2788 if( fPSigSmearingHalf != 0. || sqrtfPSigSmearingCteHalf!=0. ){
2789 facPSig = TMath::Sqrt(sqrtfPSigSmearingCteHalf*sqrtfPSigSmearingCteHalf+fPSigSmearingHalf*fPSigSmearingHalf*P*P)*
fRandom.Gaus(0.,1.);
2794 facPBrem =
fBrem->GetRandom();
2798 TLorentzVector SmearedParticle;
2800 SmearedParticle.SetXYZM( facPBrem* (1+facPSig)* P*sin(theta)*cos(phi) , facPBrem* (1+facPSig)* P*sin(theta)*sin(phi) ,
2801 facPBrem* (1+facPSig)* P*cos(theta) , TDatabasePDG::Instance()->GetParticle( ::kElectron )->Mass()) ;
2807 return SmearedParticle;
AliCaloPhotonCuts * fCaloPhotonCuts
CaloPhotonCutObject belonging to same main task.
Bool_t SetSelectionWindowMergedCut(Int_t selectionCut)
Int_t fSelectionWindowCut
selection window for merged ana in mass
Double_t fMaxOpanCutMeson
TH1F * fHistoDCARMesonPrimVtxAfter
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 fSidebandMixingLeftHigh
Double_t fRapidityCutMeson
max value for meson rapidity
Bool_t fBackgroundUseSidebandBothSides
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)
Double_t GetConversionZ() const
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
TH1F * fHistoDCAGGMesonBefore
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)
Double_t fSidebandMixingLow
Bool_t MesonIsSelectedMCDalitz(TParticle *fMCMother, AliMCEvent *mcEvent, Int_t &labelelectron, Int_t &labelpositron, Int_t &labelgamma, Double_t fRapidityShift=0.)
TH1F * fHistoInvMassAfter
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)
virtual ~AliConversionMesonCuts()
Bool_t SetSelectionWindowCut(Int_t selectionCut)
TH1F * fHistoDCAZMesonPrimVtxBefore
Bool_t MesonIsSelectedAODMCDalitz(AliAODMCParticle *MCMother, TClonesArray *AODMCArray, Int_t &labelelectron, Int_t &labelpositron, Int_t &labelgamma, Double_t fRapidityShift=0.)
Float_t GetChi2perNDF() const
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)
Bool_t fBackgroundUseLikeSign
Bool_t SetRapidityMesonCut(Int_t RapidityMesonCut)
Bool_t SetAlphaMesonCut(Int_t alphaMesonCut)
Double_t fAlphaCutMeson
max value for meson alpha cut
Int_t GetTrackLabelNegative() const
void SmearParticle(AliAODConversionPhoton *photon)
Int_t GetTrackLabelPositive() const
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
Double_t fSidebandMixingHigh
Double_t fMinPt
min pT cut
Double_t fSidebandMixingRightHigh
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 fSidebandMixingRightLow
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)
Int_t fElectronLabelArraySize
Double_t GetConversionY() const
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
Bool_t fdoBGProbability
flag to use probability method for meson bg estimation
Float_t GetDCARMotherPrimVtx() const
static const char * fgkCutNames[kNCuts]
Bool_t fEnableOneCellDistCut
flag to enable 1 cell dist cut
Int_t fnDegreeRotationPMForBG
Bool_t SetDCAZMesonPrimVtxCut(Int_t DCAZMesonPrimVtx)
AliConversionMesonCuts(const char *name="MesonCuts", const char *title="Meson Cuts")
void PrintCutsWithValues()
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)
Double_t fMinOpanCutMeson
TH2F * fHistoMesonBGCuts
bookkeeping for meson bg cuts
TH1F * fHistoInvMassBefore
Bool_t fBackgroundUseSideband
Double_t GetAlpha() const
Int_t * fElectronLabelArray
Bool_t SetMaxOpanMesonCut(Int_t maxOpanMesonCut)
Double_t fSelectionLow
lower meson inv mass window for further selection
Bool_t fDCARMesonPrimVtxCutOn
cut flag for the maximum distance in R between the production point of the Meson & the primary vertex...
Bool_t SetSharedElectronCut(Int_t sharedElec)
TH2F * fHistoDCAZMesonPrimVtxAfter
TH1F * fHistoDCARMesonPrimVtxBefore
Bool_t SetMinPtCut(Int_t PtCut)
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)
TH1F * fHistoDCAGGMesonAfter
Bool_t SetMinOpanMesonCut(Int_t minOpanMesonCut)
Float_t GetDCAZMotherPrimVtx() const
Double_t fPSigSmearingCte
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.
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 InitializeCutsFromCutString(const TString analysisCutSelection)
Double_t GetConversionX() const
Bool_t SetDCARMesonPrimVtxCut(Int_t DCARMesonPrimVtx)
Double_t fSidebandMixingLeftLow
Bool_t SetMCPSmearing(Int_t useMCPSmearing)
Bool_t SetCut(cutIds cutID, Int_t cut)
Double_t fDCAZMesonPrimVtxCut
cut value for the maximum distance in Z between the production point of the Meson & the primary verte...