25 #include "AliKFVertex.h" 26 #include "AliAODTrack.h" 28 #include "AliAODEvent.h" 29 #include "AliESDtrack.h" 30 #include "AliAnalysisManager.h" 31 #include "AliInputEventHandler.h" 32 #include "AliMCEventHandler.h" 33 #include "AliAODHandler.h" 34 #include "AliPIDResponse.h" 39 #include "AliMCEvent.h" 41 #include "TObjString.h" 42 #include "AliAODEvent.h" 43 #include "AliESDEvent.h" 44 #include "AliCentrality.h" 48 #include "AliGenCocktailEventHeader.h" 49 #include "AliGenDPMjetEventHeader.h" 50 #include "AliGenPythiaEventHeader.h" 51 #include "AliGenHijingEventHeader.h" 52 #include "AliTriggerAnalysis.h" 54 #include "AliAODMCParticle.h" 55 #include "AliAODMCHeader.h" 56 #include "AliTRDTriggerAnalysis.h" 78 "piMaxMomdedxSigmaCut",
79 "LowPRejectionSigmaCut",
86 "DoPhotonAsymmetryCut",
87 "CosinePointingAngle",
98 AliAnalysisCuts(name,title),
101 fDoLightOutput(kFALSE),
102 fV0ReaderName(
"V0ReaderV1"),
107 fEtaForPhiCutMin(-10.),
108 fEtaForPhiCutMax(10.),
111 fDoShrinkTPCAcceptance(kFALSE),
115 fDoAsymPtCut(kFALSE),
121 fLineCutZRSlopeMin(0.),
122 fLineCutZValueMin(0),
123 fChi2CutConversion(1000),
124 fPIDProbabilityCutNegativeParticle(0),
125 fPIDProbabilityCutPositiveParticle(0),
126 fDodEdxSigmaCut(kTRUE),
127 fDoTOFsigmaCut(kFALSE),
128 fPIDTRDEfficiency(1),
130 fPIDnSigmaAboveElectronLine(100),
131 fPIDnSigmaBelowElectronLine(-100),
132 fTofPIDnSigmaAboveElectronLine(100),
133 fTofPIDnSigmaBelowElectronLine(-100),
134 fPIDnSigmaAbovePionLine(0),
135 fPIDnSigmaAbovePionLineHighPt(-100),
136 fPIDMinPnSigmaAbovePionLine(0),
137 fPIDMaxPnSigmaAbovePionLine(0),
138 fDoKaonRejectionLowP(kFALSE),
139 fDoProtonRejectionLowP(kFALSE),
140 fDoPionRejectionLowP(kFALSE),
141 fPIDnSigmaAtLowPAroundKaonLine(0),
142 fPIDnSigmaAtLowPAroundProtonLine(0),
143 fPIDnSigmaAtLowPAroundPionLine(0),
144 fPIDMinPKaonRejectionLowP(1.5),
145 fPIDMinPProtonRejectionLowP(2),
146 fPIDMinPPionRejectionLowP(0),
147 fDoQtGammaSelection(kTRUE),
151 fUseEtaMinCut(kFALSE),
152 fUseOnFlyV0Finder(kTRUE),
153 fUseOnFlyV0FinderSameSign(0),
154 fDoPhotonAsymmetryCut(kTRUE),
155 fDoPhotonPDependentAsymCut(kFALSE),
157 fMinPPhotonAsymmetryCut(100.),
158 fMinPhotonAsymmetry(0.),
159 fUseCorrectedTPCClsInfo(kFALSE),
161 fOpeningAngle(0.005),
163 fDo2DPsiPairChi2(kFALSE),
164 fIncludeRejectedPsiPair(kFALSE),
165 fCosPAngleCut(10000),
166 fDoToCloseV0sCut(kFALSE),
168 fDoSharedElecCut(kFALSE),
169 fDoPhotonQualitySelectionCut(kFALSE),
170 fPhotonQualityCut(0),
172 fElectronArraySize(500),
173 fElectronLabelArray(NULL),
174 fDCAZPrimVtxCut(1000),
175 fDCARPrimVtxCut(1000),
176 fInPlaneOutOfPlane(0),
177 fConversionPointXArray(0.0),
178 fConversionPointYArray(0.0),
179 fConversionPointZArray(0.0),
184 fITSPIDnSigmaAboveElectronLine(100),
185 fITSPIDnSigmaBelowElectronLine(-100),
187 fTRDPIDAboveCut(100),
188 fTRDPIDBelowCut(-100),
189 fDoDoubleCountingCut(kFALSE),
193 fSwitchToKappa(kFALSE),
196 fHistoEtaDistV0s(NULL),
197 fHistoEtaDistV0sAfterdEdxCuts(NULL),
198 fHistodEdxCuts(NULL),
199 fHistoTPCdEdxbefore(NULL),
200 fHistoTPCdEdxafter(NULL),
201 fHistoTPCdEdxSigbefore(NULL),
202 fHistoTPCdEdxSigafter(NULL),
203 fHistoKappaafter(NULL),
204 fHistoTOFbefore(NULL),
205 fHistoTOFSigbefore(NULL),
206 fHistoTOFSigafter(NULL),
207 fHistoITSSigbefore(NULL),
208 fHistoITSSigafter(NULL),
209 fHistoPsiPairDeltaPhiafter(NULL),
210 fHistoTrackCuts(NULL),
211 fHistoPhotonCuts(NULL),
212 fHistoInvMassbefore(NULL),
213 fHistoArmenterosbefore(NULL),
214 fHistoInvMassafter(NULL),
215 fHistoArmenterosafter(NULL),
216 fHistoAsymmetrybefore(NULL),
217 fHistoAsymmetryafter(NULL),
218 fHistoAcceptanceCuts(NULL),
219 fHistoCutIndex(NULL),
220 fHistoEventPlanePhi(NULL),
222 fProcessAODCheck(kFALSE),
223 fMaterialBudgetWeightsInitialized(kFALSE),
224 fProfileContainingMaterialBudgetWeights(NULL)
236 AliAnalysisCuts(ref),
403 TH1::AddDirectory(kFALSE);
516 TAxis *AxisBeforedEdx = NULL;
517 TAxis *AxisBeforedEdxSig = NULL;
518 TAxis *AxisBeforeTOF = NULL;
519 TAxis *AxisBeforeTOFSig = NULL;
520 TAxis *AxisBeforeITSSig = NULL;
521 TAxis *AxisBeforeAsymmetry = NULL;
567 Int_t bins = AxisAfter->GetNbins();
568 Double_t from = AxisAfter->GetXmin();
572 Double_t factor = TMath::Power(to/from, 1./bins);
573 for(
Int_t i=1; i<=bins; ++i) newBins[i] = factor * newBins[i-1];
574 AxisAfter->Set(bins, newBins);
576 AxisAfter->Set(bins, newBins);
578 AxisAfter->Set(bins, newBins);
580 AxisAfter->Set(bins, newBins);
582 AxisAfter->Set(bins, newBins);
585 AxisAfter->Set(bins, newBins);
588 AxisBeforedEdx->Set(bins, newBins);
589 AxisBeforeTOF->Set(bins, newBins);
590 AxisBeforedEdxSig->Set(bins, newBins);
591 AxisBeforeTOFSig->Set(bins, newBins);
592 AxisBeforeITSSig->Set(bins, newBins);
593 AxisBeforeAsymmetry->Set(bins, newBins);
604 TH1::AddDirectory(kTRUE);
613 AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler());
614 fPIDResponse = (AliPIDResponse*)inputHandler->GetPIDResponse();
627 if(!mcEvent)
return kFALSE;
629 if (particle->GetPdgCode() == 22){
639 if(particle->GetMother(0) >-1 && mcEvent->Particle(particle->GetMother(0))->GetPdgCode() == 22){
648 if(!checkForConvertedGamma)
return kTRUE;
651 TParticle* ePos = NULL;
652 TParticle* eNeg = NULL;
654 if(particle->GetNDaughters() >= 2){
655 for(
Int_t daughterIndex=particle->GetFirstDaughter();daughterIndex<=particle->GetLastDaughter();daughterIndex++){
656 if(daughterIndex<0)
continue;
657 TParticle *tmpDaughter = mcEvent->Particle(daughterIndex);
658 if(tmpDaughter->GetUniqueID() == 5){
659 if(tmpDaughter->GetPdgCode() == 11){
661 }
else if(tmpDaughter->GetPdgCode() == -11){
668 if(ePos == NULL || eNeg == NULL){
686 if(TMath::Abs(ePos->Vz()) >
fMaxZ){
689 if(TMath::Abs(eNeg->Vz()) >
fMaxZ){
714 if(!aodmcArray)
return kFALSE;
716 if (particle->GetPdgCode() == 22){
724 if(particle->GetMother() > -1 && (
static_cast<AliAODMCParticle*
>(aodmcArray->At(particle->GetMother())))->GetPdgCode() == 22){
728 if(!checkForConvertedGamma)
return kTRUE;
731 AliAODMCParticle* ePos = NULL;
732 AliAODMCParticle* eNeg = NULL;
734 if(particle->GetNDaughters() >= 2){
735 for(
Int_t daughterIndex=particle->GetDaughter(0);daughterIndex<=particle->GetDaughter(1);daughterIndex++){
736 AliAODMCParticle *tmpDaughter =
static_cast<AliAODMCParticle*
>(aodmcArray->At(daughterIndex));
737 if(!tmpDaughter)
continue;
738 if(((tmpDaughter->GetMCProcessCode())) == 5){
739 if(tmpDaughter->GetPdgCode() == 11){
741 }
else if(tmpDaughter->GetPdgCode() == -11){
748 if(ePos == NULL || eNeg == NULL){
762 Double_t rPos = sqrt( (ePos->Xv()*ePos->Xv()) + (ePos->Yv()*ePos->Yv()) );
763 Double_t rNeg = sqrt( (eNeg->Xv()*eNeg->Xv()) + (eNeg->Yv()*eNeg->Yv()) );
768 if(TMath::Abs(ePos->Zv()) >
fMaxZ){
771 if(TMath::Abs(eNeg->Zv()) >
fMaxZ){
855 Double_t magField =
event->GetMagneticField();
856 if( magField < 0.0 ){
862 Double_t deltaPhi = magField * TVector2::Phi_mpi_pi( electronCandidate->Phi()-positronCandidate->Phi());
898 UChar_t photonQuality = 0;
931 if(!negTrack||!posTrack)
return kFALSE;
936 if(negTrack->GetTPCNclsF()!=0){
937 negclsToF = (
Double_t)negTrack->GetNcls(1)/(
Double_t)negTrack->GetTPCNclsF();}
945 if(posTrack->GetTPCNclsF()!=0){
946 posclsToF = (
Double_t)posTrack->GetNcls(1)/(
Double_t)posTrack->GetTPCNclsF();
965 if(event->IsA()==AliESDEvent::Class()) {
976 if(!negTrack || !posTrack) {
986 Int_t v0PosID = posTrack->GetID();
987 Int_t v0NegID = negTrack->GetID();
989 for(
Int_t iV=0; iV<aodEvent->GetNumberOfV0s(); iV++){
990 v0 = aodEvent->GetV0(iV);
992 if( (v0PosID == v0->GetPosID() && v0NegID == v0->GetNegID()) || (v0PosID == v0->GetNegID() && v0NegID == v0->GetPosID()) ){
1130 if( !negTrack->IsOn(AliESDtrack::kTPCrefit) || !posTrack->IsOn(AliESDtrack::kTPCrefit) ) {
1136 AliAODVertex * NegVtxType=negTrack->GetProdVertex();
1137 AliAODVertex * PosVtxType=posTrack->GetProdVertex();
1138 if( (NegVtxType->GetType())==AliAODVertex::kKink || (PosVtxType->GetType())==AliAODVertex::kKink) {
1151 if( !negTrack->IsOn(AliESDtrack::kTPCrefit) || !posTrack->IsOn(AliESDtrack::kTPCrefit) ) {
1157 if(negTrack->GetKinkIndex(0) > 0 || posTrack->GetKinkIndex(0) > 0 ) {
1176 if(negTrack->Charge() == posTrack->Charge()) {
1181 if(negTrack->Charge() != posTrack->Charge()) {
1198 if( posTrack->Eta() > (
fEtaCut) || posTrack->Eta() < (-
fEtaCut) ||
1229 if(negTrack->IsA()==AliAODTrack::Class()) {
1230 passCuts = passCuts *
SpecificTrackCuts(static_cast<AliAODTrack*>(negTrack), static_cast<AliAODTrack*>(posTrack),cutIndex);
1232 passCuts = passCuts *
SpecificTrackCuts(static_cast<AliESDtrack*>(negTrack), static_cast<AliESDtrack*>(posTrack),cutIndex);
1250 if(!
fPIDResponse){AliError(
"No PID Response");
return kTRUE;}
1255 Float_t KappaPlus, KappaMinus, Kappa;
1256 KappaMinus =
fPIDResponse->NumberOfSigmasTPC(negTrack, AliPID::kElectron);
1257 KappaPlus =
fPIDResponse->NumberOfSigmasTPC(posTrack, AliPID::kElectron);
1258 Kappa = ( TMath::Abs(KappaMinus) + TMath::Abs(KappaPlus) ) / 2.0 + 2.0*(KappaMinus+KappaPlus);
1267 if(!
fPIDResponse){AliError(
"No PID Response");
return kTRUE;}
1356 if((fCurrentTrack->GetStatus() & AliESDtrack::kTOFpid ) && !(fCurrentTrack->GetStatus() & AliESDtrack::kTOFmismatch)){
1360 fCurrentTrack->GetIntegratedTimes(times,AliPID::kSPECIESC);
1361 Double_t TOFsignal = fCurrentTrack->GetTOFsignal();
1362 Double_t dT = TOFsignal - t0 - times[0];
1377 if((fCurrentTrack->GetStatus() & AliESDtrack::kITSpid)){
1422 for(
Int_t ii=0;ii<2;ii++){
1429 trackNegAsy= track->P()/photon->
GetPhotonP();
1440 trackNegAsy= track->P()/photon->
GetPhotonP();
1461 if(label > event->GetNumberOfTracks() )
return NULL;
1462 AliESDtrack * track = esdEvent->GetTrack(label);
1466 if(label == -999999)
return NULL;
1467 AliVTrack * track = 0x0;
1469 if(event->GetTrack(label)) track = dynamic_cast<AliVTrack*>(event->GetTrack(label));
1473 for(
Int_t ii=0; ii<
event->GetNumberOfTracks(); ii++) {
1474 if(event->GetTrack(ii)) track = dynamic_cast<AliVTrack*>(event->GetTrack(ii));
1476 if(track->GetID() == label) {
1494 if(label > event->GetNumberOfTracks() )
return NULL;
1495 AliESDtrack * track =
event->GetTrack(label);
1520 if(negProbArray && posProbArray){
1522 negTrack->GetTPCpid(negProbArray);
1523 posTrack->GetTPCpid(posProbArray);
1530 delete [] posProbArray;
1531 delete [] negProbArray;
1546 if(particle->R()>
fMaxR){
1549 if(ePos->R()>
fMaxR){
1553 if(ePos->R()<
fMinR){
1564 if(TMath::Abs(eNeg->Vz()) >
fMaxZ ){
1568 if(eNeg->Vz()!=ePos->Vz()||eNeg->R()!=ePos->R()){
1572 if(TMath::Abs(ePos->Vz()) >
fMaxZ ){
1577 if( particle->Eta() > (
fEtaCut) || particle->Eta() < (-
fEtaCut) ){
1608 if(particle->Pt()<
fPtCut){
1632 AliInfo(Form(
"Set Photoncut Number: %s",analysisCutSelection.Data()));
1633 if(analysisCutSelection.Length()!=
kNCuts) {
1634 AliError(Form(
"Cut selection has the wrong length! size is %d, number of cuts is %d", analysisCutSelection.Length(),
kNCuts));
1637 if(!analysisCutSelection.IsAlnum()){
1638 AliError(
"Cut selection is not alphanumeric");
1642 TString analysisCutSelectionLowerCase = Form(
"%s",analysisCutSelection.Data());
1643 analysisCutSelectionLowerCase.ToLower();
1644 const char *cutSelection = analysisCutSelectionLowerCase.Data();
1645 #define ASSIGNARRAY(i) fCuts[i] = ((int)cutSelection[i]>=(int)'a') ? cutSelection[i]-'a'+10 : cutSelection[i]-'0' 1670 }
else return kFALSE;
1677 }
else return kFALSE;
1684 }
else return kFALSE;
1691 }
else return kFALSE;
1697 }
else return kFALSE;
1703 }
else return kFALSE;
1710 }
else return kFALSE;
1717 }
else return kFALSE;
1725 }
else return kFALSE;
1731 }
else return kFALSE;
1739 }
else return kFALSE;
1750 }
else return kFALSE;
1761 }
else return kFALSE;
1772 }
else return kFALSE;
1782 }
else return kFALSE;
1789 }
else return kFALSE;
1797 }
else return kFALSE;
1804 }
else return kFALSE;
1811 }
else return kFALSE;
1818 }
else return kFALSE;
1825 }
else return kFALSE;
1832 }
else return kFALSE;
1839 }
else return kFALSE;
1846 }
else return kFALSE;
1853 }
else return kFALSE;
1860 }
else return kFALSE;
1867 }
else return kFALSE;
1870 AliError(
"Cut id out of range");
1874 AliError(
"Cut id %d not recognized");
1887 printf(
"\nConversion cutnumber \n");
1889 printf(
"%d",
fCuts[ic]);
1892 printf(
"Electron cuts & Secondary Track Cuts - only track from secondaries enter analysis: \n");
1893 printf(
"\t no like sign pairs from V0s \n");
1896 else printf(
"\t eta_{e} < %3.2f\n",
fEtaCut );
1902 printf(
"\t TPC refit \n");
1903 printf(
"\t no kinks \n");
1917 printf(
"Photon cuts: \n");
1919 else printf(
"\t using Offline V0 finder \n");
1921 printf(
"\t 2 dimensional q_{T} cut applied with maximum of %3.2f \n",
fQtMax );
1923 printf(
"\t 1 dimensional q_{T} cut applied with maximum of %3.2f \n",
fQtMax );
1926 printf(
"\t 2 dimensional triangle chi^{2} and psi_{pair} cut applied with maximum of chi^{2} = %3.2f and |psi_{pair}| = %3.2f \n",
fChi2CutConversion,
fPsiPairCut );
1929 printf(
"\t psi_{pair} max cut |psi_{pair}| < %3.2f \n",
fPsiPairCut );
1931 printf(
"\t %3.2f < R_{conv} < %3.2f\n",
fMinR,
fMaxR );
1932 printf(
"\t Z_{conv} < %3.2f\n",
fMaxZ );
1934 else printf(
"\t eta_{conv} < %3.2f\n",
fEtaCut );
1938 printf(
"\t p_{T,gamma} > %3.2f\n",
fPtCut );
1949 switch (v0FinderType){
1951 cout <<
"have chosen onfly V0" << endl;
1956 cout <<
"have chosen offline V0" << endl;
1961 cout <<
"have chosen onfly V0 same sign pairing" << endl;
1966 cout <<
"have chosen onfly V0 unlike sign and same signs pairing" << endl;
1971 AliError(Form(
" v0FinderType not defined %d",v0FinderType));
2084 AliError(Form(
" EtaCut not defined %d",etaCut));
2164 AliError(
"RCut not defined");
2189 AliError(Form(
"EtaForPhiCut not defined %d",etaPhiCut));
2238 AliError(Form(
"MinPhiCut not defined %d",minPhiCut));
2287 AliError(Form(
"MaxPhiCut not defined %d",maxPhiCut));
2297 switch(singlePtCut){
2418 AliError(Form(
"singlePtCut not defined %d",singlePtCut));
2464 AliError(Form(
"Warning: clsTPCCut not defined %d",clsTPCCut));
2472 switch(ededxSigmaCut){
2514 AliError(
"TPCdEdxCutElectronLine not defined");
2524 switch(pidedxSigmaCut){
2566 AliError(Form(
"Warning: pidedxSigmaCut not defined %d",pidedxSigmaCut));
2574 switch(piMomdedxSigmaCut){
2603 AliError(Form(
"piMomdedxSigmaCut not defined %d",piMomdedxSigmaCut));
2611 switch(piMaxMomdedxSigmaCut){
2634 AliError(Form(
"piMaxMomdedxSigmaCut not defined %d",piMaxMomdedxSigmaCut));
2642 switch(LowPRejectionSigmaCut){
2725 AliError(Form(
"LowPRejectionSigmaCut not defined %d",LowPRejectionSigmaCut));
2767 AliError(
"KappaTPCCut not defined");
2778 switch(TOFelectronPID){
2810 AliError(Form(
"TOFElectronCut not defined %d",TOFelectronPID));
2819 switch(ITSelectronPID){
2881 AliError(Form(
"ITSelectronPID not defined %d",ITSelectronPID));
2890 switch(TRDelectronPID){
2897 AliError(Form(
"TRDelectronPID not defined %d",TRDelectronPID));
2949 AliError(Form(
"Warning: QtMaxCut not defined %d",QtMaxCut));
2958 switch(chi2GammaCut){
2997 AliError(Form(
"Warning: Chi2GammaCut not defined %d",chi2GammaCut));
3052 AliError(Form(
"PsiPairCut not defined %d",psiCut));
3062 switch(doPhotonAsymmetryCut){
3086 fFAsymmetryCut =
new TF1(
"fFAsymmetryCut",
"[0] + [1]*tanh(2*TMath::Power(x,[2]))",0.,100.);
3096 fFAsymmetryCut =
new TF1(
"fFAsymmetryCut",
"[0] + [1]*tanh(2*TMath::Power(x,[2]))",0.,100.);
3114 AliError(Form(
"PhotonAsymmetryCut not defined %d",doPhotonAsymmetryCut));
3159 AliError(Form(
"Cosine Pointing Angle cut not defined %d",cosCut));
3196 AliError(Form(
"Shared Electron Cut not defined %d",sharedElec));
3246 AliError(Form(
"Shared Electron Cut not defined %d",toClose));
3254 switch(TRDElectronCut){
3271 AliError(Form(
"TRDElectronCut not defined %d",TRDElectronCut));
3281 switch(DCAZPhotonPrimVtx){
3313 cout<<
"Warning: DCAZPhotonPrimVtx not defined "<<DCAZPhotonPrimVtx<<endl;
3322 switch(DCARPhotonPrimVtx){
3354 cout<<
"Warning: DCARPhotonPrimVtx not defined "<<DCARPhotonPrimVtx<<endl;
3374 cout<<
"Warning: In-Plane or Out-Of-Plane not defined "<<inOutPlane<<endl;
3384 Int_t firstTPCRow = 0;
3394 if(radius <= radiusI){
3397 if(radius>radiusI && radius<=radiusO){
3398 firstTPCRow = (
Int_t)((radius-radiusI)/rSizeI);
3400 if(radius>radiusO && radius<=radiusOB){
3401 firstTPCRow = (
Int_t)(nClsI+(radius-radiusO)/rSizeO);
3404 if(radius>radiusOB){
3405 firstTPCRow =(
Int_t)(nClsIO+(radius-radiusOB)/rSizeOB);
3425 if(event->IsA()==AliESDEvent::Class()){
3427 if(!esdEvent)
return -999;
3428 AliESDv0 *v0 = esdEvent->GetV0(photon->
GetV0Index());
3429 if(!v0)
return -999;
3430 v0->GetPxPyPz(momV0[0],momV0[1],momV0[2]);
3432 if(event->IsA()==AliAODEvent::Class()){
3433 momV0[0] = photon->
GetPx();
3434 momV0[1] = photon->
GetPy();
3435 momV0[2] = photon->
GetPz();
3443 Double_t momV02 = momV0[0]*momV0[0] + momV0[1]*momV0[1] + momV0[2]*momV0[2];
3444 Double_t PosV02 = PosV0[0]*PosV0[0] + PosV0[1]*PosV0[1] + PosV0[2]*PosV0[2];
3447 Double_t cosinePointingAngle = -999;
3448 if(momV02*PosV02 > 0.0)
3449 cosinePointingAngle = (PosV0[0]*momV0[0] + PosV0[1]*momV0[1] + PosV0[2]*momV0[2] ) / TMath::Sqrt(momV02 * PosV02);
3451 return cosinePointingAngle;
3511 for(
Int_t i = 0; i<nV0s*2;i++){
3512 if(i==nV0*2)
continue;
3513 if(i==(nV0*2)+1)
continue;
3532 for(
Int_t i = 0;i<photons->GetEntries();i++){
3533 if(nV0 == i)
continue;
3540 Double_t dist = pow((posX - posCompX),2)+pow((posY - posCompY),2)+pow((posZ - posCompZ),2);
3546 TVector3 v1(photon->Px(),photon->Py(),photon->Pz());
3547 TVector3 v2(photonComp->Px(),photonComp->Py(),photonComp->Pz());
3548 Double_t OpeningAngle=v1.Angle(v2);
3564 cout<<
"Warning: Initialization of Standardcuts2010PbPb failed"<<endl;}
3573 cout<<
"Warning: Initialization of Standardcuts2010pp failed"<<endl;}
3581 eventPlaneAngle=eventPlaneAngle+TMath::Pi();
3582 Double_t gammaToEPAngle = eventPlaneAngle-photonPhi;
3583 if(gammaToEPAngle < 0) gammaToEPAngle=gammaToEPAngle+2*TMath::Pi();
3584 gammaToEPAngle = gammaToEPAngle-TMath::Pi();
3591 if(TMath::Abs(gammaToEPAngle)<=0.25*TMath::Pi() || TMath::Abs(gammaToEPAngle)>=0.75*TMath::Pi()){
3598 if(TMath::Abs(gammaToEPAngle)>0.25*TMath::Pi() && TMath::Abs(gammaToEPAngle)<0.75*TMath::Pi()){
3613 if(!negTrack || !posTrack) {
3616 if(negTrack->Charge() == posTrack->Charge()){
3619 Int_t nClusterITSneg = negTrack->GetITSNcls();
3620 Int_t nClusterITSpos = posTrack->GetITSNcls();
3623 if (nClusterITSneg > 1 && nClusterITSpos > 1){
3625 }
else if (nClusterITSneg > 1 || nClusterITSpos > 1){
3638 nameProfile =
"profileContainingMaterialBudgetWeights_fewRadialBins";}
3640 nameProfile =
"profileContainingMaterialBudgetWeights_manyRadialBins";}
3642 AliError(Form(
"%d not a valid flag for InitMaterialBudgetWeightingOfPi0Candidates()",flag));
3645 TFile*
file = TFile::Open(filename.Data());
3647 AliError(Form(
"File %s for materialbudgetweights not found",filename.Data()));
3652 AliError(Form(
"Histogram %s not found in file",nameProfile.Data()));
3660 AliInfo(Form(
"MaterialBudgetWeightingOfPi0Candidates initialized with flag %d. This means %d radial bins will be used for the weighting. File used: %s.",flag,
fProfileContainingMaterialBudgetWeights->GetNbinsX(), filename.Data()));
3670 if (bin > 0 && bin <= fProfileContainingMaterialBudgetWeights->GetNbinsX()){
Double_t fTofPIDnSigmaAboveElectronLine
sigma cut RRnewTOF
Double_t fMinRDC
Min R for Double Counting Cut.
Bool_t SetDCARPhotonPrimVtxCut(Int_t DCARPhotonPrimVtx)
TH2F * fHistoTOFSigafter
TOF Sigma after cuts.
Bool_t SetQtMaxCut(Int_t QtMaxCut)
Float_t fMaxPhiCut
phi sector cut
Bool_t fPreSelCut
Flag for preselection cut used in V0Reader.
Double_t fMinPPhotonAsymmetryCut
Min Momentum for Asymmetry Cut.
TH2F * fHistoAcceptanceCuts
bookkeeping for acceptance cuts
Double_t fPIDTRDEfficiency
required electron efficiency for TRD PID
Double_t GetArmenterosAlpha() const
TH2F * fHistodEdxCuts
bookkeeping for dEdx cuts
Bool_t RejectSharedElectronV0s(AliAODConversionPhoton *photon, Int_t nV0, Int_t nV0s)
Double_t fOpenAngle
Opening Angle for Double Counting Cut.
TH2F * fHistoPhotonCuts
bookkeeping for photon specific cuts
Double_t fPIDnSigmaAbovePionLine
sigma cut
virtual Double_t GetPz() const =0
Bool_t fDodEdxSigmaCut
flag to use the dEdxCut based on sigmas
TObjString * fCutString
cut number used for analysis
Double_t fMinClsTPC
minimum clusters in the TPC
Int_t GetFirstTPCRow(Double_t radius)
static const char * fgkCutNames[kNCuts]
Double_t fDCAZPrimVtxCut
cut value for the maximum distance in Z between the photon & the primary vertex [cm] ...
Bool_t fSwitchToKappa
switches from standard dEdx nSigma TPC cuts to Kappa TPC
TH1F * fHistoCutIndex
bookkeeping for cuts
Bool_t PIDProbabilityCut(AliConversionPhotonBase *photon, AliVEvent *event)
Bool_t SetLowPRejectionCuts(Int_t LowPRejectionSigmaCut)
TH2F * fHistoTPCdEdxSigafter
TPC Sigm dEdx after cuts.
Double_t fMinPhotonAsymmetry
Asymmetry Cut.
Double_t fTRDPIDAboveCut
TRD cut range.
Float_t fEtaForPhiCutMin
eta cut for phi sector selection
Bool_t SetSinglePtCut(Int_t singlePtCut)
Float_t GetPsiPair() const
Bool_t fMaterialBudgetWeightsInitialized
weights for conversions photons due due deviating material budget in MC compared to data ...
TH2F * fHistoTPCdEdxafter
TPC dEdx after cuts.
Double_t GetConversionZ() const
Double_t fDeltaR
Delta R for Double Counting Cut.
Bool_t fUseOnFlyV0Finder
flag
Int_t fInPlaneOutOfPlane
In-Plane Out-Of Plane Analysis.
Float_t GetDCAzToPrimVtx() const
TH2F * fHistoArmenterosafter
armenteros podolanski plot after cuts
AliPIDResponse * fPIDResponse
PID response.
Bool_t AsymmetryCut(AliConversionPhotonBase *photon, AliVEvent *event)
virtual Double_t GetPx() const =0
Double_t fPIDMinPPionRejectionLowP
Momentum limit to apply proton rejection.
TH2F * fHistoPsiPairDeltaPhiafter
TOF Sigma after cuts.
Bool_t dEdxCuts(AliVTrack *track)
TH2F * fHistoArmenterosbefore
armenteros podolanski plot before cuts
Bool_t SetToCloseV0sCut(Int_t toClose)
void InitCutHistograms(TString name="", Bool_t preCut=kTRUE)
Double_t fLineCutZValue
linecut
Double_t fNSigmaMass
nsigma cut
TH2F * fHistoTOFbefore
TOF before cuts.
Bool_t SetTOFElectronPIDCut(Int_t TOFelectronPID)
Bool_t fDoShrinkTPCAcceptance
Flag for shrinking the TPC acceptance due to different reasons.
Bool_t PhotonIsSelectedAODMC(AliAODMCParticle *particle, TClonesArray *aodmcArray, Bool_t checkForConvertedGamma=kTRUE)
AliConversionPhotonCuts(const char *name="V0Cuts", const char *title="V0 Cuts")
Float_t fMinPhiCut
phi sector cut
Bool_t fIncludeRejectedPsiPair
TH1F * fHistoInvMassafter
e+e- inv mass distribution after cuts
Bool_t SetMinPhiSectorCut(Int_t minPhiCut)
void FillElectonLabelArray(AliAODConversionPhoton *photon, Int_t nV0)
Double_t fSinglePtCut2
second pt cut for electron/positron if asymmetric cut is chosen
AliESDtrack * GetESDTrack(AliESDEvent *event, Int_t label)
TH2F * fHistoITSSigafter
ITS Sigma after cuts.
static AliConversionPhotonCuts * GetStandardCuts2010PbPb()
Double_t fDoKaonRejectionLowP
Kaon rejection at low p.
Int_t fElectronArraySize
Size of electron array.
TH2F * fHistoTOFSigbefore
TOF Sigma before cuts.
Int_t fIsHeavyIon
flag for pp (0), PbPb (1), pPb (2)
Float_t GetChi2perNDF() const
Bool_t RejectToCloseV0s(AliAODConversionPhoton *photon, TList *photons, Int_t nV0)
virtual Double_t GetPhotonP() const =0
Double_t GetArmenterosQt() const
Double_t fLineCutZRSlope
linecut
virtual Double_t GetPhotonPhi() const =0
Bool_t InPlaneOutOfPlaneCut(Double_t photonPhi, Double_t eventPlaneAngle=-100, Bool_t fill=kTRUE)
Bool_t PhotonCuts(AliConversionPhotonBase *photon, AliVEvent *event)
Bool_t SetChi2GammaCut(Int_t chi2GammaCut)
Bool_t SetCut(cutIds cutID, Int_t cut)
Double_t fLineCutZRSlopeMin
linecut
Double_t fDoPionRejectionLowP
Pion rejection at low p.
TH1F * fHistoInvMassbefore
e+e- inv mass distribution before cuts
TH1F * fHistoEventPlanePhi
EventPlaneAngle Minus Photon Angle.
Bool_t fUseITSpid
flag to use tof pid
Int_t GetTrackLabelNegative() const
TH1F * fHistoEtaDistV0sAfterdEdxCuts
eta-distribution of all V0s after Finder selection after dEdx cuts
Float_t fConversionPointYArray
Array with conversion Point y.
Double_t fTRDPIDBelowCut
TRD cut range.
Double_t fPIDMaxPnSigmaAbovePionLine
sigma cut
Double_t fITSPIDnSigmaAboveElectronLine
sigma cut RRnewTOF
Double_t fDCARPrimVtxCut
cut value for the maximum distance in R between the photon & the primary vertex [cm] ...
void DeterminePhotonQuality(AliVTrack *negTrack, AliVTrack *posTrack)
Bool_t SetITSElectronPIDCut(Int_t ITSelectronPID)
Bool_t SetPhotonAsymmetryCut(Int_t doPhotonAsymmetryCut)
TH2F * fHistoITSSigbefore
ITS Sigma before cuts.
Int_t GetTrackLabelPositive() const
Double_t fPIDnSigmaAtLowPAroundKaonLine
sigma cut
Bool_t SetKappaTPCCut(Int_t kappaCut)
Double_t fPIDnSigmaAtLowPAroundPionLine
sigma cut
Bool_t fDoTOFsigmaCut
flag to use TOF pid cut RRnewTOF
Bool_t SetDCAZPhotonPrimVtxCut(Int_t DCAZPhotonPrimVtx)
Int_t GetTrackLabel(Int_t i) const
Bool_t SetMinMomPiondEdxCut(Int_t piMinMomdedxSigmaCut)
Double_t fPIDMinPnSigmaAbovePionLine
sigma cut
virtual ~AliConversionPhotonCuts()
Double_t fPIDnSigmaBelowElectronLine
sigma cut
Bool_t SetEtaCut(Int_t etaCut)
Int_t * fElectronLabelArray
Double_t fPIDProbabilityCutPositiveParticle
Bool_t PhotonIsSelectedMC(TParticle *particle, AliMCEvent *mcEvent, Bool_t checkForConvertedGamma=kTRUE)
Class handling all kinds of selection cuts for Gamma Conversion analysis.
Bool_t fDoPhotonAsymmetryCut
flag to use the PhotonAsymetryCut
TString fV0ReaderName
Name of the V0 reader.
Float_t GetDCArToPrimVtx() const
TH2F * fHistoAsymmetryafter
asymmetry plot after cuts
Bool_t fDoPhotonPDependentAsymCut
flag to use the PhotonAsymetryCut with P dependent cut
virtual Double_t GetPhotonPt() const =0
TProfile * fProfileContainingMaterialBudgetWeights
Bool_t InitializeCutsFromCutString(const TString analysisCutSelection)
Bool_t SetCosPAngleCut(Int_t cosCut)
Bool_t SetEtaForPhiCut(Int_t etaPhiCut)
Bool_t SetTPCClusterCut(Int_t clsTPCCut)
Bool_t InitializeMaterialBudgetWeights(Int_t flag, TString filename)
Bool_t fDoPhotonQualitySelectionCut
Bool_t fUseTOFpid
flag to use tof pid
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)
Float_t GetMaterialBudgetCorrectingWeightForTrueGamma(AliAODConversionPhoton *gamma)
Bool_t SetRCut(Int_t RCut)
TList * fHistograms
List of QA histograms.
Bool_t fDoQtGammaSelection
Select gammas using qtMax.
Double_t GetConversionY() const
Float_t fKappaMinCut
maximum Kappa cut
TH2F * fHistoTPCdEdxbefore
TPC dEdx before cuts.
Bool_t fProcessAODCheck
Flag for processing check for AOD to be contained in AliAODs.root and AliAODGammaConversion.root.
TH2F * fHistoKappaafter
Kappa vs photon pt after cuts.
Float_t fKappaMaxCut
maximum Kappa cut
virtual Double_t GetPy() const =0
Bool_t SetTRDElectronCut(Int_t TRDElectronCut)
void FillPhotonCutIndex(Int_t photoncut)
Double_t fSinglePtCut
pt cut for electron/positron
Bool_t SetPsiPairCut(Int_t psiCut)
UChar_t GetPhotonQuality() const
TH2F * fHistoTPCdEdxSigbefore
TPC Sigma dEdx before cuts.
Bool_t SpecificTrackCuts(AliAODTrack *negTrack, AliAODTrack *posTrack, Int_t &cutIndex)
Cut functions.
Double_t fQtMax
Maximum Qt from Armenteros to select Gammas.
Double_t fTofPIDnSigmaBelowElectronLine
sigma cut RRnewTOF
Float_t fOpeningAngle
min opening angle for meson
UChar_t DeterminePhotonQualityAOD(AliAODConversionPhoton *, AliVEvent *)
Double_t fChi2CutConversion
chi2cut
Bool_t SelectV0Finder(Bool_t onfly)
TH1F * fHistoEtaDistV0s
eta-distribution of all V0s after Finder selection
Bool_t fDo2DQt
Select gammas using ellipse cut.
Bool_t AcceptanceCuts(AliConversionPhotonBase *photon)
Bool_t fDoDoubleCountingCut
Flag to reject double counting.
Double_t fMinClsTPCToF
minimum clusters to findable clusters
void PrintCutsWithValues()
TFile * file
TList with histograms for a given trigger.
Float_t GetKappaTPC(AliConversionPhotonBase *gamma, AliVEvent *event)
Double_t fLineCutZValueMin
linecut
AliVTrack * GetTrack(AliVEvent *event, Int_t label)
Bool_t CosinePAngleCut(const AliConversionPhotonBase *photon, AliVEvent *event) const
Int_t fUseOnFlyV0FinderSameSign
int to set same sign pairing
Double_t fPIDnSigmaAbovePionLineHighPt
sigma cut
Double_t fPIDMinPProtonRejectionLowP
Momentum limit to apply proton rejection.
Float_t fConversionPointXArray
Array with conversion Point x.
Double_t fEtaCutMin
eta cut
static AliConversionPhotonCuts * GetStandardCuts2010pp()
Bool_t SetMaxMomPiondEdxCut(Int_t piMaxMomdedxSigmaCut)
Double_t fPIDnSigmaAtLowPAroundProtonLine
sigma cut
Bool_t PsiPairCut(const AliConversionPhotonBase *photon) const
Double_t fMaxPtPIDITS
max pt for ITS PID
Bool_t SetTPCdEdxCutElectronLine(Int_t ededxSigmaCut)
void CalculateDistanceOfClossetApproachToPrimVtx(const AliVVertex *primVertex)
Bool_t fUseCorrectedTPCClsInfo
flag to use corrected tpc cl info
Double_t fPIDnSigmaAboveElectronLine
sigma cut
Bool_t TracksAreSelected(AliVTrack *negTrack, AliVTrack *posTrack)
Double_t fPIDProbabilityCutNegativeParticle
Bool_t KappaCuts(AliConversionPhotonBase *photon, AliVEvent *event)
Bool_t SetInPlaneOutOfPlane(Int_t inOutPlane)
Bool_t SetMaxPhiSectorCut(Int_t maxPhiCut)
Bool_t fDoTRDPID
flag to use TRD pid
Bool_t SetSharedElectronCut(Int_t sharedElec)
Double_t fITSPIDnSigmaBelowElectronLine
sigma cut RRnewTOF
Bool_t SetV0Finder(Int_t v0FinderType)
Bool_t AcceptanceCut(TParticle *particle, TParticle *ePos, TParticle *eNeg)
Bool_t SetTRDElectronPIDCut(Int_t TRDelectronPID)
Bool_t fDoLightOutput
switch for running light output, kFALSE -> normal mode, kTRUE -> light mode
Bool_t fDoAsymPtCut
Flag for setting asymmetric pT cut on electron/positron.
TH1F * fHistoTrackCuts
bookkeeping for track cuts
Double_t GetCosineOfPointingAngle(const AliConversionPhotonBase *photon, AliVEvent *event) const
Double_t GetConversionRadius() const
Bool_t ArmenterosQtCut(AliConversionPhotonBase *photon)
Bool_t CorrectedTPCClusterCut(AliConversionPhotonBase *photon, AliVEvent *event)
Float_t fEtaForPhiCutMax
eta cut for phi sector selection
Double_t fDoProtonRejectionLowP
Proton rejection at low p.
Double_t GetConversionX() const
virtual Double_t GetPhotonEta() const =0
Double_t fPIDMinPKaonRejectionLowP
Momentum limit to apply kaon rejection.
Bool_t PhotonIsSelected(AliConversionPhotonBase *photon, AliVEvent *event)
Float_t fConversionPointZArray
Array with conversion Point z.
Bool_t SetTPCdEdxCutPionLine(Int_t pidedxSigmaCut)
TH2F * fHistoAsymmetrybefore
asymmetry plot after cuts