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),
129 fBackgroundHandler(0),
130 fHistoMesonCuts(NULL),
131 fHistoMesonBGCuts(NULL),
132 fHistoDCAGGMesonBefore(NULL),
133 fHistoDCAZMesonPrimVtxBefore(NULL),
134 fHistoDCARMesonPrimVtxBefore(NULL),
135 fHistoDCAGGMesonAfter(NULL),
136 fHistoDCAZMesonPrimVtxAfter(NULL),
137 fHistoDCARMesonPrimVtxAfter(NULL),
138 fHistoInvMassBefore(NULL),
139 fHistoInvMassAfter(NULL)
145 fBrem =
new TF1(
"fBrem",
"pow(-log(x),[0]/log(2.0)-1.0)/TMath::Gamma([0]/log(2.0))",0.00001,0.999999999);
148 fBrem->SetNpx(100000);
155 AliAnalysisCuts(ref),
157 fDoLightOutput(ref.fDoLightOutput),
159 fCaloPhotonCuts(ref.fCaloPhotonCuts),
160 fMesonKind(ref.fMesonKind),
161 fIsMergedClusterCut(ref.fIsMergedClusterCut),
163 fEnableMassCut(ref.fEnableMassCut),
164 fSelectionLow(ref.fSelectionLow),
165 fSelectionHigh(ref.fSelectionHigh),
166 fSelectionWindowCut(-1),
167 fAlphaMinCutMeson(ref.fAlphaMinCutMeson),
168 fAlphaCutMeson(ref.fAlphaCutMeson),
169 fRapidityCutMeson(ref.fRapidityCutMeson),
170 fUseRotationMethodInBG(ref.fUseRotationMethodInBG),
171 fUsePtmaxMethodForBG(ref.fUsePtmaxMethodForBG),
173 fdoBGProbability(ref.fdoBGProbability),
174 fUseTrackMultiplicityForBG(ref.fUseTrackMultiplicityForBG),
175 fnDegreeRotationPMForBG(ref.fnDegreeRotationPMForBG),
176 fNumberOfBGEvents(ref. fNumberOfBGEvents),
177 fOpeningAngle(ref.fOpeningAngle),
178 fEnableMinOpeningAngleCut(ref.fEnableMinOpeningAngleCut),
179 fEnableOneCellDistCut(ref.fEnableOneCellDistCut),
180 fDoToCloseV0sCut(ref.fDoToCloseV0sCut),
181 fminV0Dist(ref.fminV0Dist),
182 fDoSharedElecCut(ref.fDoSharedElecCut),
183 fUseMCPSmearing(ref.fUseMCPSmearing),
184 fPBremSmearing(ref.fPBremSmearing),
185 fPSigSmearing(ref.fPSigSmearing),
186 fPSigSmearingCte(ref.fPSigSmearingCte),
188 fRandom(ref.fRandom),
190 fAlphaPtDepCut(ref.fAlphaPtDepCut),
191 fElectronLabelArraySize(ref.fElectronLabelArraySize),
192 fElectronLabelArray(NULL),
193 fDCAGammaGammaCut(ref.fDCAGammaGammaCut),
194 fDCAZMesonPrimVtxCut(ref.fDCAZMesonPrimVtxCut),
195 fDCARMesonPrimVtxCut(ref.fDCARMesonPrimVtxCut),
196 fDCAGammaGammaCutOn(ref.fDCAGammaGammaCutOn),
197 fDCAZMesonPrimVtxCutOn(ref.fDCAZMesonPrimVtxCutOn),
198 fDCARMesonPrimVtxCutOn(ref.fDCARMesonPrimVtxCutOn),
199 fBackgroundHandler(ref.fBackgroundHandler),
201 fMinOpanPtDepCut(kFALSE),
202 fMaxOpanCutMeson(TMath::Pi()),
204 fMaxOpanPtDepCut(kFALSE),
208 fHistoMesonCuts(NULL),
209 fHistoMesonBGCuts(NULL),
210 fHistoDCAGGMesonBefore(NULL),
211 fHistoDCAZMesonPrimVtxBefore(NULL),
212 fHistoDCARMesonPrimVtxBefore(NULL),
213 fHistoDCAGGMesonAfter(NULL),
214 fHistoDCAZMesonPrimVtxAfter(NULL),
215 fHistoDCARMesonPrimVtxAfter(NULL),
216 fHistoInvMassBefore(NULL),
217 fHistoInvMassAfter(NULL)
266 TH1::AddDirectory(kFALSE);
372 TH1::AddDirectory(kTRUE);
380 if(!mcEvent)
return kFALSE;
382 if(fMCMother->GetPdgCode()==111 || fMCMother->GetPdgCode()==221){
383 if(fMCMother->R()>
fMaxR)
return kFALSE;
386 if(fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0){
387 rapidity=8.-fRapidityShift;
389 rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
396 if(fMCMother->GetNDaughters()!=2)
return kFALSE;
398 for(
Int_t i=0;i<2;i++){
399 if(fMCMother->GetDaughter(i) < 0)
return kFALSE;
400 TParticle *MDaughter=mcEvent->Particle(fMCMother->GetDaughter(i));
402 if(MDaughter->GetPdgCode()!=22)
return kFALSE;
418 if(!AODMCArray)
return kFALSE;
420 if(MCMother->GetPdgCode()==111 || MCMother->GetPdgCode()==221){
421 Double_t rMeson = sqrt( (MCMother->Xv()*MCMother->Xv()) + (MCMother->Yv()*MCMother->Yv()) ) ;
422 if(rMeson>
fMaxR)
return kFALSE;
425 if(MCMother->E() - MCMother->Pz() == 0 || MCMother->E() + MCMother->Pz() == 0){
426 rapidity=8.-fRapidityShift;
428 rapidity = 0.5*(TMath::Log((MCMother->E()+MCMother->Pz()) / (MCMother->E()-MCMother->Pz())))-fRapidityShift;
435 if(MCMother->GetNDaughters()!=2)
return kFALSE;
437 for(
Int_t i=0;i<2;i++){
438 AliAODMCParticle *MDaughter=
static_cast<AliAODMCParticle*
>(AODMCArray->At(MCMother->GetDaughter(i)));
440 if(MDaughter->GetPdgCode()!=22)
return kFALSE;
457 if( !mcEvent )
return kFALSE;
459 if( fMCMother->GetPdgCode() != 111 && fMCMother->GetPdgCode() != 221 )
return kFALSE;
461 if( fMCMother->R()>
fMaxR )
return kFALSE;
465 if( fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0 ){
466 rapidity=8.-fRapidityShift;
469 rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
476 if( fMCMother->GetNDaughters() != 3 )
return kFALSE;
478 TParticle *positron = 0x0;
479 TParticle *electron = 0x0;
480 TParticle *gamma = 0x0;
482 for(
Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
483 if(index < 0)
continue;
484 TParticle* temp = (TParticle*)mcEvent->Particle( index );
486 switch( temp->GetPdgCode() ) {
489 labelpositron = index;
493 labelelectron = index;
502 if( positron && electron && gamma)
return kTRUE;
512 if( !AODMCArray )
return kFALSE;
514 if( fMCMother->GetPdgCode() != 111 && fMCMother->GetPdgCode() != 221 )
return kFALSE;
516 Double_t rMeson = sqrt( (fMCMother->Xv()*fMCMother->Xv()) + (fMCMother->Yv()*fMCMother->Yv()) ) ;
517 if(rMeson>
fMaxR)
return kFALSE;
521 if( fMCMother->E() - fMCMother->Pz() == 0 || fMCMother->E() + fMCMother->Pz() == 0 ){
522 rapidity=8.-fRapidityShift;
525 rapidity = 0.5*(TMath::Log((fMCMother->E()+fMCMother->Pz()) / (fMCMother->E()-fMCMother->Pz())))-fRapidityShift;
532 if( fMCMother->GetNDaughters() != 3 )
return kFALSE;
534 AliAODMCParticle *positron = 0x0;
535 AliAODMCParticle *electron = 0x0;
536 AliAODMCParticle *gamma = 0x0;
538 for(
Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
539 if(index < 0)
continue;
540 AliAODMCParticle* temp =
static_cast<AliAODMCParticle*
>(AODMCArray->At(index));
543 switch( temp->GetPdgCode() ) {
546 labelpositron = index;
550 labelelectron = index;
559 if( positron && electron && gamma)
return kTRUE;
569 if( !mcEvent )
return kFALSE;
571 if( fMCMother->GetPdgCode() != 221 )
return kFALSE;
573 if( fMCMother->R()>
fMaxR )
return kFALSE;
577 if( fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0 ){
578 rapidity=8.-fRapidityShift;
581 rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
588 if( fMCMother->GetNDaughters() != 3 )
return kFALSE;
590 TParticle *posPion = 0x0;
591 TParticle *negPion = 0x0;
592 TParticle *gamma = 0x0;
594 for(
Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
595 if(index < 0)
continue;
596 TParticle* temp = (TParticle*)mcEvent->Particle( index );
598 switch( temp->GetPdgCode() ) {
601 labelPosPion = index;
605 labelNegPion = index;
614 if( posPion && negPion && gamma)
return kTRUE;
624 if( !mcEvent )
return kFALSE;
626 if( !(fMCMother->GetPdgCode() == 221 || fMCMother->GetPdgCode() == 223) )
return kFALSE;
628 if( fMCMother->R()>
fMaxR )
return kFALSE;
632 if( fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0 ){
633 rapidity=8.-fRapidityShift;
636 rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
643 if( fMCMother->GetNDaughters() != 3 )
return kFALSE;
645 TParticle *posPion = 0x0;
646 TParticle *negPion = 0x0;
647 TParticle *neutPion = 0x0;
650 for(
Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
651 if(index < 0)
continue;
652 TParticle* temp = (TParticle*)mcEvent->Particle( index );
654 switch( temp->GetPdgCode() ) {
657 labelPosPion = index;
661 labelNegPion = index;
665 labelNeutPion = index;
670 if( posPion && negPion && neutPion )
return kTRUE;
678 if(!mcEvent)
return kFALSE;
680 if(fMCMother->GetPdgCode()!=223)
return kFALSE;
684 if(fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0){
685 rapidity=8.-fRapidityShift;
688 rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
694 if(fMCMother->GetNDaughters()!=2)
return kFALSE;
696 TParticle *gamma = 0x0;
697 TParticle *pi0 = 0x0;
699 for(
Int_t index = fMCMother->GetFirstDaughter();index <= fMCMother->GetLastDaughter();index++){
700 if(index < 0)
continue;
701 TParticle *temp = (TParticle*)mcEvent->Particle(index);
702 switch(temp->GetPdgCode()){
709 labelNeutPion = index;
714 if(gamma && pi0)
return kTRUE;
722 if(!DoPiZeroAngleCut)
return kTRUE;
724 Double_t PiZeroGammaAngle = pi0->Angle(gamma->Vect());
727 if(PiZeroGammaAngle > lowerFactor * maxfit->Eval(omegaPt) && PiZeroGammaAngle < upperFactor * maxfit->Eval(omegaPt))
return kTRUE;
737 if(!mcEvent)
return kFALSE;
741 if(fMCMother->GetPdgCode()==10441 || fMCMother->GetPdgCode()==10443 || fMCMother->GetPdgCode()==445 ){
742 if(fMCMother->R()>
fMaxR)
return kFALSE;
745 if(fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0){
746 rapidity=8.-fRapidityShift;
749 rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
756 if(fMCMother->GetNDaughters()!=2)
return kFALSE;
758 TParticle *jpsi = 0x0;
759 TParticle *gamma = 0x0;
760 TParticle *positron = 0x0;
761 TParticle *electron = 0x0;
763 Int_t labeljpsiChiC = -1;
765 for(
Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
766 if(index < 0)
continue;
767 TParticle* temp = (TParticle*)mcEvent->Particle( index );
769 switch( temp->GetPdgCode() ) {
772 labeljpsiChiC = index;
776 labelgammaChiC = index;
781 if ( !jpsi || ! gamma)
return kFALSE;
782 if(jpsi->GetNDaughters()!=2)
return kFALSE;
785 for(
Int_t index= jpsi->GetFirstDaughter();index<= jpsi->GetLastDaughter();index++){
786 if(index < 0)
continue;
787 TParticle* temp = (TParticle*)mcEvent->Particle( index );
788 switch( temp->GetPdgCode() ) {
791 labelelectronChiC = index;
795 labelpositronChiC = index;
799 if( !electron || !positron)
return kFALSE;
800 if( positron && electron && gamma)
return kTRUE;
819 if(hist)hist->Fill(cutIndex, pi0->Pt());
823 if((pi0->E()+pi0->Pz())/(pi0->E()-pi0->Pz())<=0){
824 if(hist)hist->Fill(cutIndex, pi0->Pt());
826 if (!IsSignal)cout <<
"undefined rapidity" << endl;
833 if(hist)hist->Fill(cutIndex, pi0->Pt());
846 if (pi0->M() > massMax || pi0->M() < massMin ){
847 if(hist)hist->Fill(cutIndex, pi0->Pt());
854 if(hist)hist->Fill(cutIndex, pi0->Pt());
863 if(hist)hist->Fill(cutIndex, pi0->Pt());
871 if(hist)hist->Fill(cutIndex, pi0->Pt());
879 if(hist)hist->Fill(cutIndex, pi0->Pt());
889 if(hist)hist->Fill(cutIndex, pi0->Pt());
896 if(hist)hist->Fill(cutIndex, pi0->Pt());
909 if(hist)hist->Fill(cutIndex, pi0->Pt());
917 if(hist)hist->Fill(cutIndex, pi0->Pt());
927 if(hist)hist->Fill(cutIndex, pi0->Pt());
938 if(hist)hist->Fill(cutIndex, pi0->Pt());
962 AliInfo(Form(
"Set Meson Cutnumber: %s",analysisCutSelection.Data()));
963 if(analysisCutSelection.Length()!=
kNCuts) {
964 AliError(Form(
"Cut selection has the wrong length! size is %d, number of cuts is %d", analysisCutSelection.Length(),
kNCuts));
967 if(!analysisCutSelection.IsAlnum()){
968 AliError(
"Cut selection is not alphanumeric");
972 TString analysisCutSelectionLowerCase = Form(
"%s",analysisCutSelection.Data());
973 analysisCutSelectionLowerCase.ToLower();
974 const char *cutSelection = analysisCutSelectionLowerCase.Data();
975 #define ASSIGNARRAY(i) fCuts[i] = ((int)cutSelection[i]>=(int)'a') ? cutSelection[i]-'a'+10 : cutSelection[i]-'0'
999 }
else return kFALSE;
1006 }
else return kFALSE;
1012 }
else return kFALSE;
1020 }
else return kFALSE;
1026 }
else return kFALSE;
1033 }
else return kFALSE;
1040 }
else return kFALSE;
1047 }
else return kFALSE;
1054 }
else return kFALSE;
1061 }
else return kFALSE;
1068 }
else return kFALSE;
1074 }
else return kFALSE;
1080 }
else return kFALSE;
1086 }
else return kFALSE;
1092 }
else return kFALSE;
1098 }
else return kFALSE;
1104 }
else return kFALSE;
1111 }
else return kFALSE;
1114 cout <<
"Error:: Cut id out of range"<< endl;
1118 cout <<
"Error:: Cut id " << cutID <<
" not recognized "<< endl;
1135 printf(
"\nMeson cutnumber \n");
1137 printf(
"%d",
fCuts[ic]);
1141 printf(
"Meson cuts \n");
1146 else printf(
"\t alpha pT-dep cut active\n");
1153 printf(
"\t Meson selection energy dependent\n\n");
1158 else printf(
"\t Min theta_{open} pT-dep cut active\n");
1160 else printf(
"\t Max theta_{open} pT-dep cut active\n");
1161 printf(
"\t Running mode for cutselection (0 std, 2 PCM-Calo): %d\n",
fMode);
1163 printf(
"Meson BG settings \n");
1165 printf(
"\t No BG estimation \n");
1191 cout<<
"Warning: Meson kind not defined"<<mesonKind<<endl;
1224 cout<<
"Warning: rCut not defined"<<rCut<<endl;
1233 switch(selectionCut){
1269 cout<<
"Warning: SelectionCut not defined "<<selectionCut<<endl;
1310 cout<<
"Warning: SelectionCut merged not defined "<<selectionCut<<endl;
1347 aSigmaHigh = 0.0012;
1350 mass = aMass + bMass*e;
1352 if (e < switchSigma){
1353 sigma = aSigmaLow + bSigmaLow*e;
1355 sigma = aSigmaHigh + bSigmaHigh*e;
1357 return mass + nSigma*
sigma;
1369 aSigmaHigh = 0.0023;
1370 bSigmaHigh = 6.7e-4;
1373 if (e < switchMass){
1374 mass = aMassLow + bMassLow*e;
1376 mass = aMassHigh + bMassHigh*e;
1379 if (e < switchSigma){
1380 sigma = aSigmaLow + bSigmaLow*e;
1382 sigma = aSigmaHigh + bSigmaHigh*e;
1384 return mass + nSigma*
sigma;
1393 aSigmaHigh = 0.0012;
1396 mass = aMass + bMass*e;
1398 if (e < switchSigma){
1399 sigma = aSigmaLow + bSigmaLow*e;
1401 sigma = aSigmaHigh + bSigmaHigh*e;
1403 return mass + nSigma*
sigma;
1415 aSigmaHigh = 0.0023;
1416 bSigmaHigh = 6.7e-4;
1419 if (e < switchMass){
1420 mass = aMassLow + bMassLow*e;
1422 mass = aMassHigh + bMassHigh*e;
1425 if (e < switchSigma){
1426 sigma = aSigmaLow + bSigmaLow*e;
1428 sigma = aSigmaHigh + bSigmaHigh*e;
1430 return mass + nSigma*
sigma;
1439 aSigmaHigh = 0.0012;
1442 mass = aMass + bMass*e;
1444 if (e < switchSigma){
1445 sigma = aSigmaLow + bSigmaLow*e;
1447 sigma = aSigmaHigh + bSigmaHigh*e;
1449 return mass + nSigma*
sigma;
1461 aSigmaHigh = 0.0023;
1462 bSigmaHigh = 6.7e-4;
1465 if (e < switchMass){
1466 mass = aMassLow + bMassLow*e;
1468 mass = aMassHigh + bMassHigh*e;
1471 if (e < switchSigma){
1472 sigma = aSigmaLow + bSigmaLow*e;
1474 sigma = aSigmaHigh + bSigmaHigh*e;
1476 return mass + nSigma*
sigma;
1524 aSigmaHigh = 0.0012;
1527 mass = aMass + bMass*e;
1529 if (e < switchSigma){
1530 sigma = aSigmaLow + bSigmaLow*e;
1532 sigma = aSigmaHigh + bSigmaHigh*e;
1535 return mass - nSigma*
sigma;
1547 aSigmaHigh = 0.0023;
1548 bSigmaHigh = 6.7e-4;
1551 if (e < switchMass){
1552 mass = aMassLow + bMassLow*e;
1554 mass = aMassHigh + bMassHigh*e;
1557 if (e < switchSigma){
1558 sigma = aSigmaLow + bSigmaLow*e;
1560 sigma = aSigmaHigh + bSigmaHigh*e;
1564 return mass - nSigma*
sigma;
1573 aSigmaHigh = 0.0012;
1576 mass = aMass + bMass*e;
1578 if (e < switchSigma){
1579 sigma = aSigmaLow + bSigmaLow*e;
1581 sigma = aSigmaHigh + bSigmaHigh*e;
1584 return mass - nSigma*
sigma;
1596 aSigmaHigh = 0.0023;
1597 bSigmaHigh = 6.7e-4;
1600 if (e < switchMass){
1601 mass = aMassLow + bMassLow*e;
1603 mass = aMassHigh + bMassHigh*e;
1606 if (e < switchSigma){
1607 sigma = aSigmaLow + bSigmaLow*e;
1609 sigma = aSigmaHigh + bSigmaHigh*e;
1613 return mass - nSigma*
sigma;
1622 aSigmaHigh = 0.0012;
1625 mass = aMass + bMass*e;
1627 if (e < switchSigma){
1628 sigma = aSigmaLow + bSigmaLow*e;
1630 sigma = aSigmaHigh + bSigmaHigh*e;
1633 return mass - nSigma*
sigma;
1645 aSigmaHigh = 0.0023;
1646 bSigmaHigh = 6.7e-4;
1649 if (e < switchMass){
1650 mass = aMassLow + bMassLow*e;
1652 mass = aMassHigh + bMassHigh*e;
1655 if (e < switchSigma){
1656 sigma = aSigmaLow + bSigmaLow*e;
1658 sigma = aSigmaHigh + bSigmaHigh*e;
1661 return mass - nSigma*
sigma;
1665 return 0.005+0.004*e;
1668 return 0.004+0.004*e;
1671 return 0.006+0.004*e;
1684 switch(alphaMesonCut){
1693 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]*tanh([1]*x)",0.,100.);
1708 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]*tanh([1]*x)",0.,100.);
1753 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]*tanh([1]*x)",0.,100.);
1781 cout<<
"Warning: AlphaMesonCut not defined "<<alphaMesonCut<<endl;
1791 switch(alphaMesonCut){
1799 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]+[1]*x+[2]/(x*x*x)",0.,100.);
1809 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]+[1]*x+[2]/(x*x*x)",0.,100.);
1819 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]+[1]*x+[2]/(x*x*x)",0.,100.);
1829 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]+[1]*x+[2]/(x*x*x)",0.,100.);
1839 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]+[1]*x+[2]/(x*x*x)",0.,100.);
1849 fFAlphaCut =
new TF1(
"fFAlphaCut",
"[0]+[1]*x+[2]/(x*x*x)",0.,100.);
1859 cout<<
"Warning: AlphaMesonCut for merged clusters not defined "<<alphaMesonCut<<endl;
1868 switch(RapidityMesonCut){
1900 cout<<
"Warning: RapidityMesonCut not defined "<<RapidityMesonCut<<endl;
1910 switch(BackgroundScheme){
1930 cout <<
"no BG calculation should be done" << endl;
1964 cout<<
"Warning: BackgroundScheme not defined "<<BackgroundScheme<<endl;
1974 switch(DegreesForRotationMethod){
1988 cout<<
"Warning: DegreesForRotationMethod not defined "<<DegreesForRotationMethod<<endl;
1998 switch(NumberOfBGEvents){
2024 cout<<
"Warning: NumberOfBGEvents not defined "<<NumberOfBGEvents<<endl;
2040 cout<<
"Warning: Shared Electron Cut not defined "<<sharedElec<<endl;
2068 cout<<
"Warning: Shared Electron Cut not defined "<<toClose<<endl;
2078 switch(useMCPSmearing){
2141 AliError(
"Warning: UseMCPSmearing not defined");
2145 switch(useMCPSmearing){
2208 AliError(
"Warning: UseMCPSmearing not defined");
2219 switch(DCAGammaGamma){
2261 cout<<
"Warning: DCAGammaGamma not defined "<<DCAGammaGamma<<endl;
2270 switch(DCAZMesonPrimVtx){
2312 cout<<
"Warning: DCAZMesonPrimVtx not defined "<<DCAZMesonPrimVtx<<endl;
2321 switch(DCARMesonPrimVtx){
2363 cout<<
"Warning: DCARMesonPrimVtx not defined "<<DCARMesonPrimVtx<<endl;
2373 switch(minOpanMesonCut){
2384 fFMinOpanCut =
new TF1(
"fFMinOpanCut",
"[0]*exp(-[1]*x)+[2]",0.,100.);
2485 cout<<
"Warning:minOpanMesonCut not defined "<<minOpanMesonCut<<endl;
2495 switch(maxOpanMesonCut){
2502 fFMaxOpanCut =
new TF1(
"fFMaxOpanCut",
"[0]*exp(-[1]*x)+[2]",0.,100.);
2511 fFMaxOpanCut =
new TF1(
"fFMaxOpanCut",
"[0]*exp(-[1]*x)+[2]",0.,100.);
2519 cout<<
"Warning: maxOpanMesonCut not defined "<< maxOpanMesonCut<<endl;
2547 for(
Int_t i = 0; i<nV0s*2;i++){
2548 if(i==nV0*2)
continue;
2549 if(i==(nV0*2)+1)
continue;
2564 for(
Int_t i = 0;i<photons->GetEntries();i++){
2565 if(nV0 == i)
continue;
2571 Double_t dist = pow((posX - posCompX),2)+pow((posY - posCompY),2)+pow((posZ - posCompZ),2);
2587 if (photon==NULL)
return;
2598 if( photon->P()!=0){
2599 theta=acos( photon->Pz()/ photon->P());
2608 facPBrem =
fBrem->GetRandom();
2612 photon->SetPx(facPBrem* (1+facPSig)* P*sin(theta)*cos(phi)) ;
2613 photon->SetPy(facPBrem* (1+facPSig)* P*sin(theta)*sin(phi)) ;
2614 photon->SetPz(facPBrem* (1+facPSig)* P*cos(theta)) ;
2615 photon->SetE(photon->P());
2621 if (photon==NULL)
return;
2632 if( photon->P()!=0){
2633 theta=acos( photon->Pz()/ photon->P());
2642 facPBrem =
fBrem->GetRandom();
2646 photon->SetPx(facPBrem* (1+facPSig)* P*sin(theta)*cos(phi)) ;
2647 photon->SetPy(facPBrem* (1+facPSig)* P*sin(theta)*sin(phi)) ;
2648 photon->SetPz(facPBrem* (1+facPSig)* P*cos(theta)) ;
2665 if (phi < 0.) phi += 2. * TMath::Pi();
2667 if( particle.P()!=0){
2668 theta=acos( particle.Pz()/ particle.P());
2677 if( fPSigSmearingHalf != 0. || sqrtfPSigSmearingCteHalf!=0. ){
2678 facPSig = TMath::Sqrt(sqrtfPSigSmearingCteHalf*sqrtfPSigSmearingCteHalf+fPSigSmearingHalf*fPSigSmearingHalf*P*P)*
fRandom.Gaus(0.,1.);
2683 facPBrem =
fBrem->GetRandom();
2687 TLorentzVector SmearedParticle;
2689 SmearedParticle.SetXYZM( facPBrem* (1+facPSig)* P*sin(theta)*cos(phi) , facPBrem* (1+facPSig)* P*sin(theta)*sin(phi) ,
2690 facPBrem* (1+facPSig)* P*cos(theta) , TDatabasePDG::Instance()->GetParticle( ::kElectron )->Mass()) ;
2696 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 fRapidityCutMeson
max value for meson rapidity
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)
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 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
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 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
ClassImp(AliAnalysisTaskDeltaPt) AliAnalysisTaskDeltaPt
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
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)
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...