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 fCaloPhotonCuts(NULL),
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),
101 fAlphaMinCutMeson(0),
103 fRapidityCutMeson(1),
108 fDCAGammaGammaCut(1000),
109 fDCAZMesonPrimVtxCut(1000),
110 fDCARMesonPrimVtxCut(1000),
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),
122 fIsMergedClusterCut(0),
123 fSelectionWindowCut(-1),
124 fNDegreeRotationPMForBG(0),
125 fNumberOfBGEvents(0),
126 fElectronLabelArraySize(500),
127 fElectronLabelArray(NULL),
128 fBackgroundHandler(0),
129 fDoLightOutput(kFALSE),
131 fEnableMassCut(kFALSE),
132 fAcceptMesonMass(kTRUE),
133 fUseRotationMethodInBG(kFALSE),
134 fUsePtmaxMethodForBG(kFALSE),
136 fDoBGProbability(kFALSE),
137 fUseTrackMultiplicityForBG(kFALSE),
138 fEnableMinOpeningAngleCut(kTRUE),
139 fEnableOneCellDistCut(kFALSE),
140 fDoToCloseV0sCut(kFALSE),
141 fDoSharedElecCut(kFALSE),
142 fUseMCPSmearing(kFALSE),
143 fAlphaPtDepCut(kFALSE),
144 fDCAGammaGammaCutOn(kFALSE),
145 fDCAZMesonPrimVtxCutOn(kFALSE),
146 fDCARMesonPrimVtxCutOn(kFALSE),
147 fMinOpanPtDepCut(kFALSE),
148 fMaxOpanPtDepCut(kFALSE),
149 fBackgroundUseSideband(kFALSE),
150 fBackgroundUseSidebandBothSides(kFALSE),
151 fBackgroundUseLikeSign(kFALSE)
157 fBrem =
new TF1(
"fBrem",
"pow(-log(x),[0]/log(2.0)-1.0)/TMath::Gamma([0]/log(2.0))",0.00001,0.999999999);
160 fBrem->SetNpx(100000);
166 AliAnalysisCuts(ref),
290 TH1::AddDirectory(kFALSE);
401 TH1::AddDirectory(kTRUE);
409 if(!mcEvent)
return kFALSE;
411 if(fMCMother->GetPdgCode()==111 || fMCMother->GetPdgCode()==221 || fMCMother->GetPdgCode()==331 ){
412 if(fMCMother->R()>
fMaxR)
return kFALSE;
415 if(fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0){
416 rapidity=8.-fRapidityShift;
418 rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
428 if(fMCMother->GetNDaughters()!=2)
return kFALSE;
430 for(
Int_t i=0;i<2;i++){
431 if(fMCMother->GetDaughter(i) < 0)
return kFALSE;
432 TParticle *MDaughter=mcEvent->Particle(fMCMother->GetDaughter(i));
434 if(MDaughter->GetPdgCode()!=22)
return kFALSE;
450 if(!AODMCArray)
return kFALSE;
452 if(MCMother->GetPdgCode()==111 || MCMother->GetPdgCode()==221 || MCMother->GetPdgCode()==331 ){
453 Double_t rMeson = sqrt( (MCMother->Xv()*MCMother->Xv()) + (MCMother->Yv()*MCMother->Yv()) ) ;
454 if(rMeson>
fMaxR)
return kFALSE;
457 if(MCMother->E() - MCMother->Pz() == 0 || MCMother->E() + MCMother->Pz() == 0){
458 rapidity=8.-fRapidityShift;
460 rapidity = 0.5*(TMath::Log((MCMother->E()+MCMother->Pz()) / (MCMother->E()-MCMother->Pz())))-fRapidityShift;
470 if(MCMother->GetNDaughters()!=2)
return kFALSE;
472 for(
Int_t i=0;i<2;i++){
473 AliAODMCParticle *MDaughter=
static_cast<AliAODMCParticle*
>(AODMCArray->At(MCMother->GetDaughter(i)));
475 if(MDaughter->GetPdgCode()!=22)
return kFALSE;
492 if( !mcEvent )
return kFALSE;
494 if( fMCMother->GetPdgCode() != 111 && fMCMother->GetPdgCode() != 221 && fMCMother->GetPdgCode() != 331)
return kFALSE;
496 if( fMCMother->R()>
fMaxR )
return kFALSE;
500 if( fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0 ){
501 rapidity=8.-fRapidityShift;
504 rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
514 if( fMCMother->GetNDaughters() != 3 )
return kFALSE;
516 TParticle *positron = 0x0;
517 TParticle *electron = 0x0;
518 TParticle *gamma = 0x0;
520 for(
Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
521 if(index < 0)
continue;
522 TParticle* temp = (TParticle*)mcEvent->Particle( index );
524 switch( temp->GetPdgCode() ) {
527 labelpositron = index;
531 labelelectron = index;
540 if( positron && electron && gamma)
return kTRUE;
550 if( !AODMCArray )
return kFALSE;
552 if( fMCMother->GetPdgCode() != 111 && fMCMother->GetPdgCode() != 221 && fMCMother->GetPdgCode() != 331 )
return kFALSE;
554 Double_t rMeson = sqrt( (fMCMother->Xv()*fMCMother->Xv()) + (fMCMother->Yv()*fMCMother->Yv()) ) ;
555 if(rMeson>
fMaxR)
return kFALSE;
559 if( fMCMother->E() - fMCMother->Pz() == 0 || fMCMother->E() + fMCMother->Pz() == 0 ){
560 rapidity=8.-fRapidityShift;
563 rapidity = 0.5*(TMath::Log((fMCMother->E()+fMCMother->Pz()) / (fMCMother->E()-fMCMother->Pz())))-fRapidityShift;
573 if( fMCMother->GetNDaughters() != 3 )
return kFALSE;
575 AliAODMCParticle *positron = 0x0;
576 AliAODMCParticle *electron = 0x0;
577 AliAODMCParticle *gamma = 0x0;
579 for(
Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
580 if(index < 0)
continue;
581 AliAODMCParticle* temp =
static_cast<AliAODMCParticle*
>(AODMCArray->At(index));
584 switch( temp->GetPdgCode() ) {
587 labelpositron = index;
591 labelelectron = index;
600 if( positron && electron && gamma)
return kTRUE;
610 if( !mcEvent )
return kFALSE;
612 if( fMCMother->GetPdgCode() != 221 )
return kFALSE;
614 if( fMCMother->R()>
fMaxR )
return kFALSE;
618 if( fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0 ){
619 rapidity=8.-fRapidityShift;
622 rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
632 if( fMCMother->GetNDaughters() != 3 )
return kFALSE;
634 TParticle *posPion = 0x0;
635 TParticle *negPion = 0x0;
636 TParticle *gamma = 0x0;
638 for(
Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
639 if(index < 0)
continue;
640 TParticle* temp = (TParticle*)mcEvent->Particle( index );
642 switch( temp->GetPdgCode() ) {
645 labelPosPion = index;
649 labelNegPion = index;
658 if( posPion && negPion && gamma)
return kTRUE;
668 if( !mcEvent )
return kFALSE;
670 if( !(fMCMother->GetPdgCode() == 331 ) )
return kFALSE;
672 if( fMCMother->R()>
fMaxR )
return kFALSE;
676 if( fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0 ){
677 rapidity=8.-fRapidityShift;
680 rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
690 if( fMCMother->GetNDaughters() != 3 )
return kFALSE;
692 TParticle *posPion = 0x0;
693 TParticle *negPion = 0x0;
694 TParticle *etaMeson = 0x0;
697 for(
Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
698 if(index < 0)
continue;
699 TParticle* temp = (TParticle*)mcEvent->Particle( index );
701 switch( temp->GetPdgCode() ) {
704 labelPosPion = index;
708 labelNegPion = index;
712 labelEtaMeson = index;
717 if( posPion && negPion && etaMeson )
return kTRUE;
726 if( !mcEvent )
return kFALSE;
728 if( !(fMCMother->GetPdgCode() == 221 || fMCMother->GetPdgCode() == 223) )
return kFALSE;
730 if( fMCMother->R()>
fMaxR )
return kFALSE;
734 if( fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0 ){
735 rapidity=8.-fRapidityShift;
738 rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
748 if( fMCMother->GetNDaughters() != 3 )
return kFALSE;
750 TParticle *posPion = 0x0;
751 TParticle *negPion = 0x0;
752 TParticle *neutPion = 0x0;
755 for(
Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
756 if(index < 0)
continue;
757 TParticle* temp = (TParticle*)mcEvent->Particle( index );
759 switch( temp->GetPdgCode() ) {
762 labelPosPion = index;
766 labelNegPion = index;
770 labelNeutPion = index;
775 if( posPion && negPion && neutPion )
return kTRUE;
783 if(!mcEvent)
return kFALSE;
785 if(fMCMother->GetPdgCode()!=223)
return kFALSE;
789 if(fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0){
790 rapidity=8.-fRapidityShift;
793 rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
802 if(fMCMother->GetNDaughters()!=2)
return kFALSE;
804 TParticle *gamma = 0x0;
805 TParticle *pi0 = 0x0;
807 for(
Int_t index = fMCMother->GetFirstDaughter();index <= fMCMother->GetLastDaughter();index++){
808 if(index < 0)
continue;
809 TParticle *temp = (TParticle*)mcEvent->Particle(index);
810 switch(temp->GetPdgCode()){
817 labelNeutPion = index;
822 if(gamma && pi0)
return kTRUE;
830 if(!DoPiZeroAngleCut)
return kTRUE;
832 Double_t PiZeroGammaAngle = pi0->Angle(gamma->Vect());
835 if(PiZeroGammaAngle > lowerFactor * maxfit->Eval(omegaPt) && PiZeroGammaAngle < upperFactor * maxfit->Eval(omegaPt))
return kTRUE;
845 if(!mcEvent)
return kFALSE;
849 if(fMCMother->GetPdgCode()==10441 || fMCMother->GetPdgCode()==10443 || fMCMother->GetPdgCode()==445 ){
850 if(fMCMother->R()>
fMaxR)
return kFALSE;
853 if(fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0){
854 rapidity=8.-fRapidityShift;
857 rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
867 if(fMCMother->GetNDaughters()!=2)
return kFALSE;
869 TParticle *jpsi = 0x0;
870 TParticle *gamma = 0x0;
871 TParticle *positron = 0x0;
872 TParticle *electron = 0x0;
876 for(
Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
877 if(index < 0)
continue;
878 TParticle* temp = (TParticle*)mcEvent->Particle( index );
880 switch( temp->GetPdgCode() ) {
887 labelgammaChiC = index;
892 if ( !jpsi || ! gamma)
return kFALSE;
893 if(jpsi->GetNDaughters()!=2)
return kFALSE;
896 for(
Int_t index= jpsi->GetFirstDaughter();index<= jpsi->GetLastDaughter();index++){
897 if(index < 0)
continue;
898 TParticle* temp = (TParticle*)mcEvent->Particle( index );
899 switch( temp->GetPdgCode() ) {
902 labelelectronChiC = index;
906 labelpositronChiC = index;
910 if( !electron || !positron)
return kFALSE;
911 if( positron && electron && gamma)
return kTRUE;
930 if(hist)hist->Fill(cutIndex, pi0->Pt());
934 if((pi0->E()+pi0->Pz())/(pi0->E()-pi0->Pz())<=0){
935 if(hist)hist->Fill(cutIndex, pi0->Pt());
937 if (!IsSignal)cout <<
"undefined rapidity" << endl;
944 if(hist)hist->Fill(cutIndex, pi0->Pt());
957 if (pi0->M() > massMax || pi0->M() < massMin ){
958 if(hist)hist->Fill(cutIndex, pi0->Pt());
965 if(hist)hist->Fill(cutIndex, pi0->Pt());
974 if(hist)hist->Fill(cutIndex, pi0->Pt());
982 if(hist)hist->Fill(cutIndex, pi0->Pt());
990 if(hist)hist->Fill(cutIndex, pi0->Pt());
1000 if(hist)hist->Fill(cutIndex, pi0->Pt());
1007 if(hist)hist->Fill(cutIndex, pi0->Pt());
1020 if(hist)hist->Fill(cutIndex, pi0->Pt());
1028 if(hist)hist->Fill(cutIndex, pi0->Pt());
1038 if(hist)hist->Fill(cutIndex, pi0->Pt());
1052 if(hist)hist->Fill(cutIndex, pi0->Pt());
1058 if(hist)hist->Fill(cutIndex, pi0->Pt());
1082 AliInfo(Form(
"Set Meson Cutnumber: %s",analysisCutSelection.Data()));
1083 if(analysisCutSelection.Length()!=
kNCuts) {
1084 AliError(Form(
"Cut selection has the wrong length! size is %d, number of cuts is %d", analysisCutSelection.Length(),
kNCuts));
1087 if(!analysisCutSelection.IsAlnum()){
1088 AliError(
"Cut selection is not alphanumeric");
1092 TString analysisCutSelectionLowerCase = Form(
"%s",analysisCutSelection.Data());
1093 analysisCutSelectionLowerCase.ToLower();
1094 const char *cutSelection = analysisCutSelectionLowerCase.Data();
1095 #define ASSIGNARRAY(i) fCuts[i] = ((int)cutSelection[i]>=(int)'a') ? cutSelection[i]-'a'+10 : cutSelection[i]-'0' 1119 }
else return kFALSE;
1126 }
else return kFALSE;
1132 }
else return kFALSE;
1140 }
else return kFALSE;
1146 }
else return kFALSE;
1153 }
else return kFALSE;
1160 }
else return kFALSE;
1167 }
else return kFALSE;
1174 }
else return kFALSE;
1181 }
else return kFALSE;
1188 }
else return kFALSE;
1194 }
else return kFALSE;
1200 }
else return kFALSE;
1206 }
else return kFALSE;
1212 }
else return kFALSE;
1218 }
else return kFALSE;
1224 }
else return kFALSE;
1231 }
else return kFALSE;
1234 cout <<
"Error:: Cut id out of range"<< endl;
1238 cout <<
"Error:: Cut id " << cutID <<
" not recognized "<< endl;
1255 printf(
"\nMeson cutnumber \n");
1257 printf(
"%d",
fCuts[ic]);
1261 printf(
"Meson cuts \n");
1266 else printf(
"\t alpha pT-dep cut active\n");
1273 printf(
"\t Meson selection energy dependent\n\n");
1282 else printf(
"\t Min theta_{open} pT-dep cut active\n");
1284 else printf(
"\t Max theta_{open} pT-dep cut active\n");
1285 printf(
"\t Running mode for cutselection (0 std, 2 PCM-Calo): %d\n",
fMode);
1287 printf(
"Meson BG settings \n");
1289 printf(
"\t No BG estimation \n");
1315 cout<<
"Warning: Meson kind not defined"<<mesonKind<<endl;
1358 cout<<
"Warning: pT cut not defined"<<PtCut<<endl;
1367 switch(selectionCut){
1485 cout<<
"Warning: SelectionCut not defined "<<selectionCut<<endl;
1526 cout<<
"Warning: SelectionCut merged not defined "<<selectionCut<<endl;
1563 aSigmaHigh = 0.0012;
1566 mass = aMass + bMass*e;
1568 if (e < switchSigma){
1569 sigma = aSigmaLow + bSigmaLow*e;
1571 sigma = aSigmaHigh + bSigmaHigh*e;
1573 return mass + nSigma*
sigma;
1585 aSigmaHigh = 0.0023;
1586 bSigmaHigh = 6.7e-4;
1589 if (e < switchMass){
1590 mass = aMassLow + bMassLow*e;
1592 mass = aMassHigh + bMassHigh*e;
1595 if (e < switchSigma){
1596 sigma = aSigmaLow + bSigmaLow*e;
1598 sigma = aSigmaHigh + bSigmaHigh*e;
1600 return mass + nSigma*
sigma;
1609 aSigmaHigh = 0.0012;
1612 mass = aMass + bMass*e;
1614 if (e < switchSigma){
1615 sigma = aSigmaLow + bSigmaLow*e;
1617 sigma = aSigmaHigh + bSigmaHigh*e;
1619 return mass + nSigma*
sigma;
1631 aSigmaHigh = 0.0023;
1632 bSigmaHigh = 6.7e-4;
1635 if (e < switchMass){
1636 mass = aMassLow + bMassLow*e;
1638 mass = aMassHigh + bMassHigh*e;
1641 if (e < switchSigma){
1642 sigma = aSigmaLow + bSigmaLow*e;
1644 sigma = aSigmaHigh + bSigmaHigh*e;
1646 return mass + nSigma*
sigma;
1655 aSigmaHigh = 0.0012;
1658 mass = aMass + bMass*e;
1660 if (e < switchSigma){
1661 sigma = aSigmaLow + bSigmaLow*e;
1663 sigma = aSigmaHigh + bSigmaHigh*e;
1665 return mass + nSigma*
sigma;
1677 aSigmaHigh = 0.0023;
1678 bSigmaHigh = 6.7e-4;
1681 if (e < switchMass){
1682 mass = aMassLow + bMassLow*e;
1684 mass = aMassHigh + bMassHigh*e;
1687 if (e < switchSigma){
1688 sigma = aSigmaLow + bSigmaLow*e;
1690 sigma = aSigmaHigh + bSigmaHigh*e;
1692 return mass + nSigma*
sigma;
1740 aSigmaHigh = 0.0012;
1743 mass = aMass + bMass*e;
1745 if (e < switchSigma){
1746 sigma = aSigmaLow + bSigmaLow*e;
1748 sigma = aSigmaHigh + bSigmaHigh*e;
1751 return mass - nSigma*
sigma;
1763 aSigmaHigh = 0.0023;
1764 bSigmaHigh = 6.7e-4;
1767 if (e < switchMass){
1768 mass = aMassLow + bMassLow*e;
1770 mass = aMassHigh + bMassHigh*e;
1773 if (e < switchSigma){
1774 sigma = aSigmaLow + bSigmaLow*e;
1776 sigma = aSigmaHigh + bSigmaHigh*e;
1780 return mass - nSigma*
sigma;
1789 aSigmaHigh = 0.0012;
1792 mass = aMass + bMass*e;
1794 if (e < switchSigma){
1795 sigma = aSigmaLow + bSigmaLow*e;
1797 sigma = aSigmaHigh + bSigmaHigh*e;
1800 return mass - nSigma*
sigma;
1812 aSigmaHigh = 0.0023;
1813 bSigmaHigh = 6.7e-4;
1816 if (e < switchMass){
1817 mass = aMassLow + bMassLow*e;
1819 mass = aMassHigh + bMassHigh*e;
1822 if (e < switchSigma){
1823 sigma = aSigmaLow + bSigmaLow*e;
1825 sigma = aSigmaHigh + bSigmaHigh*e;
1829 return mass - nSigma*
sigma;
1838 aSigmaHigh = 0.0012;
1841 mass = aMass + bMass*e;
1843 if (e < switchSigma){
1844 sigma = aSigmaLow + bSigmaLow*e;
1846 sigma = aSigmaHigh + bSigmaHigh*e;
1849 return mass - nSigma*
sigma;
1861 aSigmaHigh = 0.0023;
1862 bSigmaHigh = 6.7e-4;
1865 if (e < switchMass){
1866 mass = aMassLow + bMassLow*e;
1868 mass = aMassHigh + bMassHigh*e;
1871 if (e < switchSigma){
1872 sigma = aSigmaLow + bSigmaLow*e;
1874 sigma = aSigmaHigh + bSigmaHigh*e;
1877 return mass - nSigma*
sigma;
1881 return 0.005+0.004*e;
1884 return 0.004+0.004*e;
1887 return 0.006+0.004*e;
1900 switch(alphaMesonCut){
1909 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]*tanh([1]*x)",0.,100.);
1924 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]*tanh([1]*x)",0.,100.);
1969 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]*tanh([1]*x)",0.,100.);
1997 cout<<
"Warning: AlphaMesonCut not defined "<<alphaMesonCut<<endl;
2007 switch(alphaMesonCut){
2015 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]+[1]*x+[2]/(x*x*x)",0.,100.);
2025 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]+[1]*x+[2]/(x*x*x)",0.,100.);
2035 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]+[1]*x+[2]/(x*x*x)",0.,100.);
2045 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]+[1]*x+[2]/(x*x*x)",0.,100.);
2055 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]+[1]*x+[2]/(x*x*x)",0.,100.);
2065 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]+[1]*x+[2]/(x*x*x)",0.,100.);
2075 cout<<
"Warning: AlphaMesonCut for merged clusters not defined "<<alphaMesonCut<<endl;
2084 switch(RapidityMesonCut){
2116 cout<<
"Warning: RapidityMesonCut not defined "<<RapidityMesonCut<<endl;
2126 switch(BackgroundScheme){
2146 cout <<
"no BG calculation should be done" << endl;
2247 cout<<
"Warning: BackgroundScheme not defined "<<BackgroundScheme<<endl;
2257 switch(DegreesForRotationMethod){
2271 cout<<
"Warning: DegreesForRotationMethod not defined "<<DegreesForRotationMethod<<endl;
2281 switch(NumberOfBGEvents){
2307 cout<<
"Warning: NumberOfBGEvents not defined "<<NumberOfBGEvents<<endl;
2323 cout<<
"Warning: Shared Electron Cut not defined "<<sharedElec<<endl;
2351 cout<<
"Warning: Shared Electron Cut not defined "<<toClose<<endl;
2361 switch(useMCPSmearing){
2424 AliError(
"Warning: UseMCPSmearing not defined");
2428 switch(useMCPSmearing){
2491 AliError(
"Warning: UseMCPSmearing not defined");
2502 switch(DCAGammaGamma){
2544 cout<<
"Warning: DCAGammaGamma not defined "<<DCAGammaGamma<<endl;
2553 switch(DCAZMesonPrimVtx){
2595 cout<<
"Warning: DCAZMesonPrimVtx not defined "<<DCAZMesonPrimVtx<<endl;
2604 switch(DCARMesonPrimVtx){
2646 cout<<
"Warning: DCARMesonPrimVtx not defined "<<DCARMesonPrimVtx<<endl;
2656 switch(minOpanMesonCut){
2667 fFMinOpanCut =
new TF1(
"fFMinOpanCut",
"[0]*exp(-[1]*x)+[2]",0.,100.);
2768 cout<<
"Warning:minOpanMesonCut not defined "<<minOpanMesonCut<<endl;
2778 switch(maxOpanMesonCut){
2785 fFMaxOpanCut =
new TF1(
"fFMaxOpanCut",
"[0]*exp(-[1]*x)+[2]",0.,100.);
2794 fFMaxOpanCut =
new TF1(
"fFMaxOpanCut",
"[0]*exp(-[1]*x)+[2]",0.,100.);
2802 cout<<
"Warning: maxOpanMesonCut not defined "<< maxOpanMesonCut<<endl;
2830 for(
Int_t i = 0; i<nV0s*2;i++){
2831 if(i==nV0*2)
continue;
2832 if(i==(nV0*2)+1)
continue;
2847 for(
Int_t i = 0;i<photons->GetEntries();i++){
2848 if(nV0 == i)
continue;
2854 Double_t dist = pow((posX - posCompX),2)+pow((posY - posCompY),2)+pow((posZ - posCompZ),2);
2870 if (photon==NULL)
return;
2881 if( photon->P()!=0){
2882 theta=acos( photon->Pz()/ photon->P());
2891 facPBrem =
fBrem->GetRandom();
2895 photon->SetPx(facPBrem* (1+facPSig)* P*sin(theta)*cos(phi)) ;
2896 photon->SetPy(facPBrem* (1+facPSig)* P*sin(theta)*sin(phi)) ;
2897 photon->SetPz(facPBrem* (1+facPSig)* P*cos(theta)) ;
2898 photon->SetE(photon->P());
2904 if (photon==NULL)
return;
2915 if( photon->P()!=0){
2916 theta=acos( photon->Pz()/ photon->P());
2925 facPBrem =
fBrem->GetRandom();
2929 photon->SetPx(facPBrem* (1+facPSig)* P*sin(theta)*cos(phi)) ;
2930 photon->SetPy(facPBrem* (1+facPSig)* P*sin(theta)*sin(phi)) ;
2931 photon->SetPz(facPBrem* (1+facPSig)* P*cos(theta)) ;
2948 if (phi < 0.) phi += 2. * TMath::Pi();
2950 if( particle.P()!=0){
2951 theta=acos( particle.Pz()/ particle.P());
2960 if( fPSigSmearingHalf != 0. || sqrtfPSigSmearingCteHalf!=0. ){
2961 facPSig = TMath::Sqrt(sqrtfPSigSmearingCteHalf*sqrtfPSigSmearingCteHalf+fPSigSmearingHalf*fPSigSmearingHalf*P*P)*
fRandom.Gaus(0.,1.);
2966 facPBrem =
fBrem->GetRandom();
2970 TLorentzVector SmearedParticle;
2972 SmearedParticle.SetXYZM( facPBrem* (1+facPSig)* P*sin(theta)*cos(phi) , facPBrem* (1+facPSig)* P*sin(theta)*sin(phi) ,
2973 facPBrem* (1+facPSig)* P*cos(theta) , TDatabasePDG::Instance()->GetParticle( ::kElectron )->Mass()) ;
2979 return SmearedParticle;
2987 if (nominalRange == 0){
2992 }
else if (nominalRange == 1){
2997 }
else if (nominalRange == 2){
3002 }
else if (nominalRange == 3){
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)
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.)
Int_t fNDegreeRotationPMForBG
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
Bool_t MesonIsSelectedMCPiPlPiMiEta(TParticle *fMCMother, AliMCEvent *mcEvent, Int_t &labelNegPion, Int_t &labelPosPion, Int_t &labelNeutPion, Double_t fRapidityShift=0)
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 fUseMCPSmearing
flag
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")
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 fDoBGProbability
flag to use probability method for meson bg estimation
Bool_t SetMinOpanMesonCut(Int_t minOpanMesonCut)
Float_t GetDCAZMotherPrimVtx() const
Double_t fPSigSmearingCte
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.
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...