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),
85 fEnableMassCut(kFALSE),
87 fSelectionHigh(0.145),
88 fSelectionWindowCut(-1),
92 fUseRotationMethodInBG(kFALSE),
93 fUsePtmaxMethodForBG(kFALSE),
95 fdoBGProbability(kFALSE),
96 fUseTrackMultiplicityForBG(kFALSE),
97 fnDegreeRotationPMForBG(0),
100 fEnableMinOpeningAngleCut(kTRUE),
101 fEnableOneCellDistCut(kFALSE),
102 fDoToCloseV0sCut(kFALSE),
104 fDoSharedElecCut(kFALSE),
105 fUseMCPSmearing(kFALSE),
112 fAlphaPtDepCut(kFALSE),
113 fElectronLabelArraySize(500),
114 fElectronLabelArray(NULL),
115 fDCAGammaGammaCut(1000),
116 fDCAZMesonPrimVtxCut(1000),
117 fDCARMesonPrimVtxCut(1000),
118 fDCAGammaGammaCutOn(kFALSE),
119 fDCAZMesonPrimVtxCutOn(kFALSE),
120 fDCARMesonPrimVtxCutOn(kFALSE),
123 fMinOpanPtDepCut(kFALSE),
124 fMaxOpanCutMeson(TMath::Pi()),
126 fMaxOpanPtDepCut(kFALSE),
127 fBackgroundHandler(0),
128 fBackgroundUseSideband(kFALSE),
129 fBackgroundUseSidebandBothSides(kFALSE),
130 fBackgroundUseLikeSign(kFALSE),
131 fSidebandMixingLow(0.180),
132 fSidebandMixingHigh(0.300),
133 fSidebandMixingLeftLow(0.05),
134 fSidebandMixingLeftHigh(0.100),
135 fSidebandMixingRightLow(0.180),
136 fSidebandMixingRightHigh(0.300),
139 fHistoMesonCuts(NULL),
140 fHistoMesonBGCuts(NULL),
141 fHistoDCAGGMesonBefore(NULL),
142 fHistoDCAZMesonPrimVtxBefore(NULL),
143 fHistoDCARMesonPrimVtxBefore(NULL),
144 fHistoDCAGGMesonAfter(NULL),
145 fHistoDCAZMesonPrimVtxAfter(NULL),
146 fHistoDCARMesonPrimVtxAfter(NULL),
147 fHistoInvMassBefore(NULL),
148 fHistoInvMassAfter(NULL)
154 fBrem =
new TF1(
"fBrem",
"pow(-log(x),[0]/log(2.0)-1.0)/TMath::Gamma([0]/log(2.0))",0.00001,0.999999999);
157 fBrem->SetNpx(100000);
164 AliAnalysisCuts(ref),
284 TH1::AddDirectory(kFALSE);
390 TH1::AddDirectory(kTRUE);
398 if(!mcEvent)
return kFALSE;
400 if(fMCMother->GetPdgCode()==111 || fMCMother->GetPdgCode()==221){
401 if(fMCMother->R()>
fMaxR)
return kFALSE;
404 if(fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0){
405 rapidity=8.-fRapidityShift;
407 rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
414 if(fMCMother->GetNDaughters()!=2)
return kFALSE;
416 for(
Int_t i=0;i<2;i++){
417 if(fMCMother->GetDaughter(i) < 0)
return kFALSE;
418 TParticle *MDaughter=mcEvent->Particle(fMCMother->GetDaughter(i));
420 if(MDaughter->GetPdgCode()!=22)
return kFALSE;
436 if(!AODMCArray)
return kFALSE;
438 if(MCMother->GetPdgCode()==111 || MCMother->GetPdgCode()==221){
439 Double_t rMeson = sqrt( (MCMother->Xv()*MCMother->Xv()) + (MCMother->Yv()*MCMother->Yv()) ) ;
440 if(rMeson>
fMaxR)
return kFALSE;
443 if(MCMother->E() - MCMother->Pz() == 0 || MCMother->E() + MCMother->Pz() == 0){
444 rapidity=8.-fRapidityShift;
446 rapidity = 0.5*(TMath::Log((MCMother->E()+MCMother->Pz()) / (MCMother->E()-MCMother->Pz())))-fRapidityShift;
453 if(MCMother->GetNDaughters()!=2)
return kFALSE;
455 for(
Int_t i=0;i<2;i++){
456 AliAODMCParticle *MDaughter=
static_cast<AliAODMCParticle*
>(AODMCArray->At(MCMother->GetDaughter(i)));
458 if(MDaughter->GetPdgCode()!=22)
return kFALSE;
475 if( !mcEvent )
return kFALSE;
477 if( fMCMother->GetPdgCode() != 111 && fMCMother->GetPdgCode() != 221 )
return kFALSE;
479 if( fMCMother->R()>
fMaxR )
return kFALSE;
483 if( fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0 ){
484 rapidity=8.-fRapidityShift;
487 rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
494 if( fMCMother->GetNDaughters() != 3 )
return kFALSE;
496 TParticle *positron = 0x0;
497 TParticle *electron = 0x0;
498 TParticle *gamma = 0x0;
500 for(
Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
501 if(index < 0)
continue;
502 TParticle* temp = (TParticle*)mcEvent->Particle( index );
504 switch( temp->GetPdgCode() ) {
507 labelpositron = index;
511 labelelectron = index;
520 if( positron && electron && gamma)
return kTRUE;
530 if( !AODMCArray )
return kFALSE;
532 if( fMCMother->GetPdgCode() != 111 && fMCMother->GetPdgCode() != 221 )
return kFALSE;
534 Double_t rMeson = sqrt( (fMCMother->Xv()*fMCMother->Xv()) + (fMCMother->Yv()*fMCMother->Yv()) ) ;
535 if(rMeson>
fMaxR)
return kFALSE;
539 if( fMCMother->E() - fMCMother->Pz() == 0 || fMCMother->E() + fMCMother->Pz() == 0 ){
540 rapidity=8.-fRapidityShift;
543 rapidity = 0.5*(TMath::Log((fMCMother->E()+fMCMother->Pz()) / (fMCMother->E()-fMCMother->Pz())))-fRapidityShift;
550 if( fMCMother->GetNDaughters() != 3 )
return kFALSE;
552 AliAODMCParticle *positron = 0x0;
553 AliAODMCParticle *electron = 0x0;
554 AliAODMCParticle *gamma = 0x0;
556 for(
Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
557 if(index < 0)
continue;
558 AliAODMCParticle* temp =
static_cast<AliAODMCParticle*
>(AODMCArray->At(index));
561 switch( temp->GetPdgCode() ) {
564 labelpositron = index;
568 labelelectron = index;
577 if( positron && electron && gamma)
return kTRUE;
587 if( !mcEvent )
return kFALSE;
589 if( fMCMother->GetPdgCode() != 221 )
return kFALSE;
591 if( fMCMother->R()>
fMaxR )
return kFALSE;
595 if( fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0 ){
596 rapidity=8.-fRapidityShift;
599 rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
606 if( fMCMother->GetNDaughters() != 3 )
return kFALSE;
608 TParticle *posPion = 0x0;
609 TParticle *negPion = 0x0;
610 TParticle *gamma = 0x0;
612 for(
Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
613 if(index < 0)
continue;
614 TParticle* temp = (TParticle*)mcEvent->Particle( index );
616 switch( temp->GetPdgCode() ) {
619 labelPosPion = index;
623 labelNegPion = index;
632 if( posPion && negPion && gamma)
return kTRUE;
642 if( !mcEvent )
return kFALSE;
644 if( !(fMCMother->GetPdgCode() == 221 || fMCMother->GetPdgCode() == 223) )
return kFALSE;
646 if( fMCMother->R()>
fMaxR )
return kFALSE;
650 if( fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0 ){
651 rapidity=8.-fRapidityShift;
654 rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
661 if( fMCMother->GetNDaughters() != 3 )
return kFALSE;
663 TParticle *posPion = 0x0;
664 TParticle *negPion = 0x0;
665 TParticle *neutPion = 0x0;
668 for(
Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
669 if(index < 0)
continue;
670 TParticle* temp = (TParticle*)mcEvent->Particle( index );
672 switch( temp->GetPdgCode() ) {
675 labelPosPion = index;
679 labelNegPion = index;
683 labelNeutPion = index;
688 if( posPion && negPion && neutPion )
return kTRUE;
696 if(!mcEvent)
return kFALSE;
698 if(fMCMother->GetPdgCode()!=223)
return kFALSE;
702 if(fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0){
703 rapidity=8.-fRapidityShift;
706 rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
712 if(fMCMother->GetNDaughters()!=2)
return kFALSE;
714 TParticle *gamma = 0x0;
715 TParticle *pi0 = 0x0;
717 for(
Int_t index = fMCMother->GetFirstDaughter();index <= fMCMother->GetLastDaughter();index++){
718 if(index < 0)
continue;
719 TParticle *temp = (TParticle*)mcEvent->Particle(index);
720 switch(temp->GetPdgCode()){
727 labelNeutPion = index;
732 if(gamma && pi0)
return kTRUE;
740 if(!DoPiZeroAngleCut)
return kTRUE;
742 Double_t PiZeroGammaAngle = pi0->Angle(gamma->Vect());
745 if(PiZeroGammaAngle > lowerFactor * maxfit->Eval(omegaPt) && PiZeroGammaAngle < upperFactor * maxfit->Eval(omegaPt))
return kTRUE;
755 if(!mcEvent)
return kFALSE;
759 if(fMCMother->GetPdgCode()==10441 || fMCMother->GetPdgCode()==10443 || fMCMother->GetPdgCode()==445 ){
760 if(fMCMother->R()>
fMaxR)
return kFALSE;
763 if(fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0){
764 rapidity=8.-fRapidityShift;
767 rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
774 if(fMCMother->GetNDaughters()!=2)
return kFALSE;
776 TParticle *jpsi = 0x0;
777 TParticle *gamma = 0x0;
778 TParticle *positron = 0x0;
779 TParticle *electron = 0x0;
783 for(
Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
784 if(index < 0)
continue;
785 TParticle* temp = (TParticle*)mcEvent->Particle( index );
787 switch( temp->GetPdgCode() ) {
794 labelgammaChiC = index;
799 if ( !jpsi || ! gamma)
return kFALSE;
800 if(jpsi->GetNDaughters()!=2)
return kFALSE;
803 for(
Int_t index= jpsi->GetFirstDaughter();index<= jpsi->GetLastDaughter();index++){
804 if(index < 0)
continue;
805 TParticle* temp = (TParticle*)mcEvent->Particle( index );
806 switch( temp->GetPdgCode() ) {
809 labelelectronChiC = index;
813 labelpositronChiC = index;
817 if( !electron || !positron)
return kFALSE;
818 if( positron && electron && gamma)
return kTRUE;
837 if(hist)hist->Fill(cutIndex, pi0->Pt());
841 if((pi0->E()+pi0->Pz())/(pi0->E()-pi0->Pz())<=0){
842 if(hist)hist->Fill(cutIndex, pi0->Pt());
844 if (!IsSignal)cout <<
"undefined rapidity" << endl;
851 if(hist)hist->Fill(cutIndex, pi0->Pt());
864 if (pi0->M() > massMax || pi0->M() < massMin ){
865 if(hist)hist->Fill(cutIndex, pi0->Pt());
872 if(hist)hist->Fill(cutIndex, pi0->Pt());
881 if(hist)hist->Fill(cutIndex, pi0->Pt());
889 if(hist)hist->Fill(cutIndex, pi0->Pt());
897 if(hist)hist->Fill(cutIndex, pi0->Pt());
907 if(hist)hist->Fill(cutIndex, pi0->Pt());
914 if(hist)hist->Fill(cutIndex, pi0->Pt());
927 if(hist)hist->Fill(cutIndex, pi0->Pt());
935 if(hist)hist->Fill(cutIndex, pi0->Pt());
945 if(hist)hist->Fill(cutIndex, pi0->Pt());
956 if(hist)hist->Fill(cutIndex, pi0->Pt());
980 AliInfo(Form(
"Set Meson Cutnumber: %s",analysisCutSelection.Data()));
981 if(analysisCutSelection.Length()!=
kNCuts) {
982 AliError(Form(
"Cut selection has the wrong length! size is %d, number of cuts is %d", analysisCutSelection.Length(),
kNCuts));
985 if(!analysisCutSelection.IsAlnum()){
986 AliError(
"Cut selection is not alphanumeric");
990 TString analysisCutSelectionLowerCase = Form(
"%s",analysisCutSelection.Data());
991 analysisCutSelectionLowerCase.ToLower();
992 const char *cutSelection = analysisCutSelectionLowerCase.Data();
993 #define ASSIGNARRAY(i) fCuts[i] = ((int)cutSelection[i]>=(int)'a') ? cutSelection[i]-'a'+10 : cutSelection[i]-'0' 1017 }
else return kFALSE;
1024 }
else return kFALSE;
1030 }
else return kFALSE;
1038 }
else return kFALSE;
1044 }
else return kFALSE;
1051 }
else return kFALSE;
1058 }
else return kFALSE;
1065 }
else return kFALSE;
1072 }
else return kFALSE;
1079 }
else return kFALSE;
1086 }
else return kFALSE;
1092 }
else return kFALSE;
1098 }
else return kFALSE;
1104 }
else return kFALSE;
1110 }
else return kFALSE;
1116 }
else return kFALSE;
1122 }
else return kFALSE;
1129 }
else return kFALSE;
1132 cout <<
"Error:: Cut id out of range"<< endl;
1136 cout <<
"Error:: Cut id " << cutID <<
" not recognized "<< endl;
1153 printf(
"\nMeson cutnumber \n");
1155 printf(
"%d",
fCuts[ic]);
1159 printf(
"Meson cuts \n");
1164 else printf(
"\t alpha pT-dep cut active\n");
1171 printf(
"\t Meson selection energy dependent\n\n");
1176 else printf(
"\t Min theta_{open} pT-dep cut active\n");
1178 else printf(
"\t Max theta_{open} pT-dep cut active\n");
1179 printf(
"\t Running mode for cutselection (0 std, 2 PCM-Calo): %d\n",
fMode);
1181 printf(
"Meson BG settings \n");
1183 printf(
"\t No BG estimation \n");
1209 cout<<
"Warning: Meson kind not defined"<<mesonKind<<endl;
1242 cout<<
"Warning: rCut not defined"<<rCut<<endl;
1251 switch(selectionCut){
1294 cout<<
"Warning: SelectionCut not defined "<<selectionCut<<endl;
1335 cout<<
"Warning: SelectionCut merged not defined "<<selectionCut<<endl;
1372 aSigmaHigh = 0.0012;
1375 mass = aMass + bMass*e;
1377 if (e < switchSigma){
1378 sigma = aSigmaLow + bSigmaLow*e;
1380 sigma = aSigmaHigh + bSigmaHigh*e;
1382 return mass + nSigma*
sigma;
1394 aSigmaHigh = 0.0023;
1395 bSigmaHigh = 6.7e-4;
1398 if (e < switchMass){
1399 mass = aMassLow + bMassLow*e;
1401 mass = aMassHigh + bMassHigh*e;
1404 if (e < switchSigma){
1405 sigma = aSigmaLow + bSigmaLow*e;
1407 sigma = aSigmaHigh + bSigmaHigh*e;
1409 return mass + nSigma*
sigma;
1418 aSigmaHigh = 0.0012;
1421 mass = aMass + bMass*e;
1423 if (e < switchSigma){
1424 sigma = aSigmaLow + bSigmaLow*e;
1426 sigma = aSigmaHigh + bSigmaHigh*e;
1428 return mass + nSigma*
sigma;
1440 aSigmaHigh = 0.0023;
1441 bSigmaHigh = 6.7e-4;
1444 if (e < switchMass){
1445 mass = aMassLow + bMassLow*e;
1447 mass = aMassHigh + bMassHigh*e;
1450 if (e < switchSigma){
1451 sigma = aSigmaLow + bSigmaLow*e;
1453 sigma = aSigmaHigh + bSigmaHigh*e;
1455 return mass + nSigma*
sigma;
1464 aSigmaHigh = 0.0012;
1467 mass = aMass + bMass*e;
1469 if (e < switchSigma){
1470 sigma = aSigmaLow + bSigmaLow*e;
1472 sigma = aSigmaHigh + bSigmaHigh*e;
1474 return mass + nSigma*
sigma;
1486 aSigmaHigh = 0.0023;
1487 bSigmaHigh = 6.7e-4;
1490 if (e < switchMass){
1491 mass = aMassLow + bMassLow*e;
1493 mass = aMassHigh + bMassHigh*e;
1496 if (e < switchSigma){
1497 sigma = aSigmaLow + bSigmaLow*e;
1499 sigma = aSigmaHigh + bSigmaHigh*e;
1501 return mass + nSigma*
sigma;
1549 aSigmaHigh = 0.0012;
1552 mass = aMass + bMass*e;
1554 if (e < switchSigma){
1555 sigma = aSigmaLow + bSigmaLow*e;
1557 sigma = aSigmaHigh + bSigmaHigh*e;
1560 return mass - nSigma*
sigma;
1572 aSigmaHigh = 0.0023;
1573 bSigmaHigh = 6.7e-4;
1576 if (e < switchMass){
1577 mass = aMassLow + bMassLow*e;
1579 mass = aMassHigh + bMassHigh*e;
1582 if (e < switchSigma){
1583 sigma = aSigmaLow + bSigmaLow*e;
1585 sigma = aSigmaHigh + bSigmaHigh*e;
1589 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;
1686 return mass - nSigma*
sigma;
1690 return 0.005+0.004*e;
1693 return 0.004+0.004*e;
1696 return 0.006+0.004*e;
1709 switch(alphaMesonCut){
1718 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]*tanh([1]*x)",0.,100.);
1733 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]*tanh([1]*x)",0.,100.);
1778 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]*tanh([1]*x)",0.,100.);
1806 cout<<
"Warning: AlphaMesonCut not defined "<<alphaMesonCut<<endl;
1816 switch(alphaMesonCut){
1824 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]+[1]*x+[2]/(x*x*x)",0.,100.);
1834 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]+[1]*x+[2]/(x*x*x)",0.,100.);
1844 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]+[1]*x+[2]/(x*x*x)",0.,100.);
1854 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]+[1]*x+[2]/(x*x*x)",0.,100.);
1864 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]+[1]*x+[2]/(x*x*x)",0.,100.);
1874 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]+[1]*x+[2]/(x*x*x)",0.,100.);
1884 cout<<
"Warning: AlphaMesonCut for merged clusters not defined "<<alphaMesonCut<<endl;
1893 switch(RapidityMesonCut){
1925 cout<<
"Warning: RapidityMesonCut not defined "<<RapidityMesonCut<<endl;
1935 switch(BackgroundScheme){
1955 cout <<
"no BG calculation should be done" << endl;
2026 cout<<
"Warning: BackgroundScheme not defined "<<BackgroundScheme<<endl;
2036 switch(DegreesForRotationMethod){
2050 cout<<
"Warning: DegreesForRotationMethod not defined "<<DegreesForRotationMethod<<endl;
2060 switch(NumberOfBGEvents){
2086 cout<<
"Warning: NumberOfBGEvents not defined "<<NumberOfBGEvents<<endl;
2102 cout<<
"Warning: Shared Electron Cut not defined "<<sharedElec<<endl;
2130 cout<<
"Warning: Shared Electron Cut not defined "<<toClose<<endl;
2140 switch(useMCPSmearing){
2203 AliError(
"Warning: UseMCPSmearing not defined");
2207 switch(useMCPSmearing){
2270 AliError(
"Warning: UseMCPSmearing not defined");
2281 switch(DCAGammaGamma){
2323 cout<<
"Warning: DCAGammaGamma not defined "<<DCAGammaGamma<<endl;
2332 switch(DCAZMesonPrimVtx){
2374 cout<<
"Warning: DCAZMesonPrimVtx not defined "<<DCAZMesonPrimVtx<<endl;
2383 switch(DCARMesonPrimVtx){
2425 cout<<
"Warning: DCARMesonPrimVtx not defined "<<DCARMesonPrimVtx<<endl;
2435 switch(minOpanMesonCut){
2446 fFMinOpanCut =
new TF1(
"fFMinOpanCut",
"[0]*exp(-[1]*x)+[2]",0.,100.);
2547 cout<<
"Warning:minOpanMesonCut not defined "<<minOpanMesonCut<<endl;
2557 switch(maxOpanMesonCut){
2564 fFMaxOpanCut =
new TF1(
"fFMaxOpanCut",
"[0]*exp(-[1]*x)+[2]",0.,100.);
2573 fFMaxOpanCut =
new TF1(
"fFMaxOpanCut",
"[0]*exp(-[1]*x)+[2]",0.,100.);
2581 cout<<
"Warning: maxOpanMesonCut not defined "<< maxOpanMesonCut<<endl;
2609 for(
Int_t i = 0; i<nV0s*2;i++){
2610 if(i==nV0*2)
continue;
2611 if(i==(nV0*2)+1)
continue;
2626 for(
Int_t i = 0;i<photons->GetEntries();i++){
2627 if(nV0 == i)
continue;
2633 Double_t dist = pow((posX - posCompX),2)+pow((posY - posCompY),2)+pow((posZ - posCompZ),2);
2649 if (photon==NULL)
return;
2660 if( photon->P()!=0){
2661 theta=acos( photon->Pz()/ photon->P());
2670 facPBrem =
fBrem->GetRandom();
2674 photon->SetPx(facPBrem* (1+facPSig)* P*sin(theta)*cos(phi)) ;
2675 photon->SetPy(facPBrem* (1+facPSig)* P*sin(theta)*sin(phi)) ;
2676 photon->SetPz(facPBrem* (1+facPSig)* P*cos(theta)) ;
2677 photon->SetE(photon->P());
2683 if (photon==NULL)
return;
2694 if( photon->P()!=0){
2695 theta=acos( photon->Pz()/ photon->P());
2704 facPBrem =
fBrem->GetRandom();
2708 photon->SetPx(facPBrem* (1+facPSig)* P*sin(theta)*cos(phi)) ;
2709 photon->SetPy(facPBrem* (1+facPSig)* P*sin(theta)*sin(phi)) ;
2710 photon->SetPz(facPBrem* (1+facPSig)* P*cos(theta)) ;
2727 if (phi < 0.) phi += 2. * TMath::Pi();
2729 if( particle.P()!=0){
2730 theta=acos( particle.Pz()/ particle.P());
2739 if( fPSigSmearingHalf != 0. || sqrtfPSigSmearingCteHalf!=0. ){
2740 facPSig = TMath::Sqrt(sqrtfPSigSmearingCteHalf*sqrtfPSigSmearingCteHalf+fPSigSmearingHalf*fPSigSmearingHalf*P*P)*
fRandom.Gaus(0.,1.);
2745 facPBrem =
fBrem->GetRandom();
2749 TLorentzVector SmearedParticle;
2751 SmearedParticle.SetXYZM( facPBrem* (1+facPSig)* P*sin(theta)*cos(phi) , facPBrem* (1+facPSig)* P*sin(theta)*sin(phi) ,
2752 facPBrem* (1+facPSig)* P*cos(theta) , TDatabasePDG::Instance()->GetParticle( ::kElectron )->Mass()) ;
2758 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)
Bool_t SetRCut(Int_t RCut)
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 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
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 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...