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 fHistoAsymmetryafter(NULL),
217 fHistoAcceptanceCuts(NULL),
218 fHistoCutIndex(NULL),
219 fHistoEventPlanePhi(NULL),
221 fProcessAODCheck(kFALSE),
222 fMaterialBudgetWeightsInitialized(kFALSE),
223 fProfileContainingMaterialBudgetWeights(NULL)
235 AliAnalysisCuts(ref),
401 TH1::AddDirectory(kFALSE);
511 TAxis *AxisBeforedEdx = NULL;
512 TAxis *AxisBeforedEdxSig = NULL;
513 TAxis *AxisBeforeTOF = NULL;
514 TAxis *AxisBeforeTOFSig = NULL;
515 TAxis *AxisBeforeITSSig = NULL;
558 Int_t bins = AxisAfter->GetNbins();
559 Double_t from = AxisAfter->GetXmin();
563 Double_t factor = TMath::Power(to/from, 1./bins);
564 for(
Int_t i=1; i<=bins; ++i) newBins[i] = factor * newBins[i-1];
565 AxisAfter->Set(bins, newBins);
567 AxisAfter->Set(bins, newBins);
569 AxisAfter->Set(bins, newBins);
571 AxisAfter->Set(bins, newBins);
573 AxisAfter->Set(bins, newBins);
576 AxisAfter->Set(bins, newBins);
579 AxisBeforedEdx->Set(bins, newBins);
580 AxisBeforeTOF->Set(bins, newBins);
581 AxisBeforedEdxSig->Set(bins, newBins);
582 AxisBeforeTOFSig->Set(bins, newBins);
583 AxisBeforeITSSig->Set(bins, newBins);
594 TH1::AddDirectory(kTRUE);
603 AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler());
604 fPIDResponse = (AliPIDResponse*)inputHandler->GetPIDResponse();
617 if(!mcEvent)
return kFALSE;
619 if (particle->GetPdgCode() == 22){
629 if(particle->GetMother(0) >-1 && mcEvent->Particle(particle->GetMother(0))->GetPdgCode() == 22){
638 if(!checkForConvertedGamma)
return kTRUE;
641 TParticle* ePos = NULL;
642 TParticle* eNeg = NULL;
644 if(particle->GetNDaughters() >= 2){
645 for(
Int_t daughterIndex=particle->GetFirstDaughter();daughterIndex<=particle->GetLastDaughter();daughterIndex++){
646 if(daughterIndex<0)
continue;
647 TParticle *tmpDaughter = mcEvent->Particle(daughterIndex);
648 if(tmpDaughter->GetUniqueID() == 5){
649 if(tmpDaughter->GetPdgCode() == 11){
651 }
else if(tmpDaughter->GetPdgCode() == -11){
658 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){
733 if(!checkForConvertedGamma)
return kTRUE;
736 AliAODMCParticle* ePos = NULL;
737 AliAODMCParticle* eNeg = NULL;
739 if(particle->GetNDaughters() >= 2){
740 for(
Int_t daughterIndex=particle->GetDaughter(0);daughterIndex<=particle->GetDaughter(1);daughterIndex++){
741 AliAODMCParticle *tmpDaughter =
static_cast<AliAODMCParticle*
>(aodmcArray->At(daughterIndex));
742 if(!tmpDaughter)
continue;
743 if(((tmpDaughter->GetMCProcessCode())) == 5){
744 if(tmpDaughter->GetPdgCode() == 11){
746 }
else if(tmpDaughter->GetPdgCode() == -11){
753 if(ePos == NULL || eNeg == NULL){
777 Double_t rPos = sqrt( (ePos->Xv()*ePos->Xv()) + (ePos->Yv()*ePos->Yv()) );
778 Double_t rNeg = sqrt( (eNeg->Xv()*eNeg->Xv()) + (eNeg->Yv()*eNeg->Yv()) );
783 if(TMath::Abs(ePos->Zv()) >
fMaxZ){
786 if(TMath::Abs(eNeg->Zv()) >
fMaxZ){
865 Double_t magField =
event->GetMagneticField();
866 if( magField < 0.0 ){
874 Double_t deltaPhi = magField * TVector2::Phi_mpi_pi( electronCandidate->Phi()-positronCandidate->Phi());
910 UChar_t photonQuality = 0;
943 if(!negTrack||!posTrack)
return kFALSE;
948 if(negTrack->GetTPCNclsF()!=0){
949 negclsToF = (
Double_t)negTrack->GetNcls(1)/(
Double_t)negTrack->GetTPCNclsF();}
957 if(posTrack->GetTPCNclsF()!=0){
958 posclsToF = (
Double_t)posTrack->GetNcls(1)/(
Double_t)posTrack->GetTPCNclsF();
977 if(event->IsA()==AliESDEvent::Class()) {
988 if(!negTrack || !posTrack) {
998 Int_t v0PosID = posTrack->GetID();
999 Int_t v0NegID = negTrack->GetID();
1000 AliAODv0* v0 = NULL;
1001 for(
Int_t iV=0; iV<aodEvent->GetNumberOfV0s(); iV++){
1002 v0 = aodEvent->GetV0(iV);
1004 if( (v0PosID == v0->GetPosID() && v0NegID == v0->GetNegID()) || (v0PosID == v0->GetNegID() && v0NegID == v0->GetPosID()) ){
1142 if( !negTrack->IsOn(AliESDtrack::kTPCrefit) || !posTrack->IsOn(AliESDtrack::kTPCrefit) ) {
1148 AliAODVertex * NegVtxType=negTrack->GetProdVertex();
1149 AliAODVertex * PosVtxType=posTrack->GetProdVertex();
1150 if( (NegVtxType->GetType())==AliAODVertex::kKink || (PosVtxType->GetType())==AliAODVertex::kKink) {
1163 if( !negTrack->IsOn(AliESDtrack::kTPCrefit) || !posTrack->IsOn(AliESDtrack::kTPCrefit) ) {
1169 if(negTrack->GetKinkIndex(0) > 0 || posTrack->GetKinkIndex(0) > 0 ) {
1188 if(negTrack->Charge() == posTrack->Charge()) {
1193 if(negTrack->Charge() != posTrack->Charge()) {
1210 if( posTrack->Eta() > (
fEtaCut) || posTrack->Eta() < (-
fEtaCut) ||
1241 if(negTrack->IsA()==AliAODTrack::Class()) {
1242 passCuts = passCuts *
SpecificTrackCuts(static_cast<AliAODTrack*>(negTrack), static_cast<AliAODTrack*>(posTrack),cutIndex);
1244 passCuts = passCuts *
SpecificTrackCuts(static_cast<AliESDtrack*>(negTrack), static_cast<AliESDtrack*>(posTrack),cutIndex);
1262 if(!
fPIDResponse){AliError(
"No PID Response");
return kTRUE;}
1267 Float_t KappaPlus, KappaMinus, Kappa;
1268 KappaMinus =
fPIDResponse->NumberOfSigmasTPC(negTrack, AliPID::kElectron);
1269 KappaPlus =
fPIDResponse->NumberOfSigmasTPC(posTrack, AliPID::kElectron);
1270 Kappa = ( TMath::Abs(KappaMinus) + TMath::Abs(KappaPlus) ) / 2.0 + 2.0*(KappaMinus+KappaPlus);
1279 if(!
fPIDResponse){AliError(
"No PID Response");
return kTRUE;}
1368 if((fCurrentTrack->GetStatus() & AliESDtrack::kTOFpid ) && !(fCurrentTrack->GetStatus() & AliESDtrack::kTOFmismatch)){
1372 fCurrentTrack->GetIntegratedTimes(times,AliPID::kSPECIESC);
1373 Double_t TOFsignal = fCurrentTrack->GetTOFsignal();
1374 Double_t dT = TOFsignal - t0 - times[0];
1389 if((fCurrentTrack->GetStatus() & AliESDtrack::kITSpid)){
1434 for(
Int_t ii=0;ii<2;ii++){
1441 trackNegAsy= track->P()/photon->
GetPhotonP();
1452 trackNegAsy= track->P()/photon->
GetPhotonP();
1473 if(label > event->GetNumberOfTracks() )
return NULL;
1474 AliESDtrack * track = esdEvent->GetTrack(label);
1478 if(label == -999999)
return NULL;
1479 AliVTrack * track = 0x0;
1481 if(event->GetTrack(label)) track = dynamic_cast<AliVTrack*>(event->GetTrack(label));
1485 for(
Int_t ii=0; ii<
event->GetNumberOfTracks(); ii++) {
1486 if(event->GetTrack(ii)) track = dynamic_cast<AliVTrack*>(event->GetTrack(ii));
1488 if(track->GetID() == label) {
1506 if(label > event->GetNumberOfTracks() )
return NULL;
1507 AliESDtrack * track =
event->GetTrack(label);
1532 if(negProbArray && posProbArray){
1534 negTrack->GetTPCpid(negProbArray);
1535 posTrack->GetTPCpid(posProbArray);
1542 delete [] posProbArray;
1543 delete [] negProbArray;
1558 if(particle->R()>
fMaxR){
1561 if(ePos->R()>
fMaxR){
1565 if(ePos->R()<
fMinR){
1576 if(TMath::Abs(eNeg->Vz()) >
fMaxZ ){
1580 if(eNeg->Vz()!=ePos->Vz()||eNeg->R()!=ePos->R()){
1584 if(TMath::Abs(ePos->Vz()) >
fMaxZ ){
1589 if( particle->Eta() > (
fEtaCut) || particle->Eta() < (-
fEtaCut) ){
1620 if(particle->Pt()<
fPtCut){
1644 AliInfo(Form(
"Set Photoncut Number: %s",analysisCutSelection.Data()));
1645 if(analysisCutSelection.Length()!=
kNCuts) {
1646 AliError(Form(
"Cut selection has the wrong length! size is %d, number of cuts is %d", analysisCutSelection.Length(),
kNCuts));
1649 if(!analysisCutSelection.IsAlnum()){
1650 AliError(
"Cut selection is not alphanumeric");
1654 TString analysisCutSelectionLowerCase = Form(
"%s",analysisCutSelection.Data());
1655 analysisCutSelectionLowerCase.ToLower();
1656 const char *cutSelection = analysisCutSelectionLowerCase.Data();
1657 #define ASSIGNARRAY(i) fCuts[i] = ((int)cutSelection[i]>=(int)'a') ? cutSelection[i]-'a'+10 : cutSelection[i]-'0' 1682 }
else return kFALSE;
1689 }
else return kFALSE;
1696 }
else return kFALSE;
1703 }
else return kFALSE;
1709 }
else return kFALSE;
1715 }
else return kFALSE;
1722 }
else return kFALSE;
1729 }
else return kFALSE;
1737 }
else return kFALSE;
1743 }
else return kFALSE;
1751 }
else return kFALSE;
1762 }
else return kFALSE;
1773 }
else return kFALSE;
1784 }
else return kFALSE;
1794 }
else return kFALSE;
1801 }
else return kFALSE;
1809 }
else return kFALSE;
1816 }
else return kFALSE;
1823 }
else return kFALSE;
1830 }
else return kFALSE;
1837 }
else return kFALSE;
1844 }
else return kFALSE;
1851 }
else return kFALSE;
1858 }
else return kFALSE;
1865 }
else return kFALSE;
1872 }
else return kFALSE;
1879 }
else return kFALSE;
1882 AliError(
"Cut id out of range");
1886 AliError(
"Cut id %d not recognized");
1899 printf(
"\nConversion cutnumber \n");
1901 printf(
"%d",
fCuts[ic]);
1904 printf(
"Electron cuts & Secondary Track Cuts - only track from secondaries enter analysis: \n");
1905 printf(
"\t no like sign pairs from V0s \n");
1908 else printf(
"\t eta_{e} < %3.2f\n",
fEtaCut );
1914 printf(
"\t TPC refit \n");
1915 printf(
"\t no kinks \n");
1929 printf(
"Photon cuts: \n");
1931 else printf(
"\t using Offline V0 finder \n");
1933 printf(
"\t 2 dimensional q_{T} cut applied with maximum of %3.2f \n",
fQtMax );
1935 printf(
"\t 1 dimensional q_{T} cut applied with maximum of %3.2f \n",
fQtMax );
1938 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 );
1941 printf(
"\t psi_{pair} max cut |psi_{pair}| < %3.2f \n",
fPsiPairCut );
1943 printf(
"\t %3.2f < R_{conv} < %3.2f\n",
fMinR,
fMaxR );
1944 printf(
"\t Z_{conv} < %3.2f\n",
fMaxZ );
1946 else printf(
"\t eta_{conv} < %3.2f\n",
fEtaCut );
1950 printf(
"\t p_{T,gamma} > %3.2f\n",
fPtCut );
1961 switch (v0FinderType){
1963 cout <<
"have chosen onfly V0" << endl;
1968 cout <<
"have chosen offline V0" << endl;
1973 cout <<
"have chosen onfly V0 same sign pairing" << endl;
1978 cout <<
"have chosen onfly V0 unlike sign and same signs pairing" << endl;
1983 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));
3150 AliError(Form(
"Cosine Pointing Angle cut not defined %d",cosCut));
3187 AliError(Form(
"Shared Electron Cut not defined %d",sharedElec));
3237 AliError(Form(
"Shared Electron Cut not defined %d",toClose));
3245 switch(TRDElectronCut){
3262 AliError(Form(
"TRDElectronCut not defined %d",TRDElectronCut));
3272 switch(DCAZPhotonPrimVtx){
3304 cout<<
"Warning: DCAZPhotonPrimVtx not defined "<<DCAZPhotonPrimVtx<<endl;
3313 switch(DCARPhotonPrimVtx){
3345 cout<<
"Warning: DCARPhotonPrimVtx not defined "<<DCARPhotonPrimVtx<<endl;
3365 cout<<
"Warning: In-Plane or Out-Of-Plane not defined "<<inOutPlane<<endl;
3375 Int_t firstTPCRow = 0;
3385 if(radius <= radiusI){
3388 if(radius>radiusI && radius<=radiusO){
3389 firstTPCRow = (
Int_t)((radius-radiusI)/rSizeI);
3391 if(radius>radiusO && radius<=radiusOB){
3392 firstTPCRow = (
Int_t)(nClsI+(radius-radiusO)/rSizeO);
3395 if(radius>radiusOB){
3396 firstTPCRow =(
Int_t)(nClsIO+(radius-radiusOB)/rSizeOB);
3416 if(event->IsA()==AliESDEvent::Class()){
3418 if(!esdEvent)
return -999;
3419 AliESDv0 *v0 = esdEvent->GetV0(photon->
GetV0Index());
3420 if(!v0)
return -999;
3421 v0->GetPxPyPz(momV0[0],momV0[1],momV0[2]);
3423 if(event->IsA()==AliAODEvent::Class()){
3424 momV0[0] = photon->
GetPx();
3425 momV0[1] = photon->
GetPy();
3426 momV0[2] = photon->
GetPz();
3434 Double_t momV02 = momV0[0]*momV0[0] + momV0[1]*momV0[1] + momV0[2]*momV0[2];
3435 Double_t PosV02 = PosV0[0]*PosV0[0] + PosV0[1]*PosV0[1] + PosV0[2]*PosV0[2];
3438 Double_t cosinePointingAngle = -999;
3439 if(momV02*PosV02 > 0.0)
3440 cosinePointingAngle = (PosV0[0]*momV0[0] + PosV0[1]*momV0[1] + PosV0[2]*momV0[2] ) / TMath::Sqrt(momV02 * PosV02);
3442 return cosinePointingAngle;
3502 for(
Int_t i = 0; i<nV0s*2;i++){
3503 if(i==nV0*2)
continue;
3504 if(i==(nV0*2)+1)
continue;
3523 for(
Int_t i = 0;i<photons->GetEntries();i++){
3524 if(nV0 == i)
continue;
3531 Double_t dist = pow((posX - posCompX),2)+pow((posY - posCompY),2)+pow((posZ - posCompZ),2);
3537 TVector3 v1(photon->Px(),photon->Py(),photon->Pz());
3538 TVector3 v2(photonComp->Px(),photonComp->Py(),photonComp->Pz());
3539 Double_t OpeningAngle=v1.Angle(v2);
3555 cout<<
"Warning: Initialization of Standardcuts2010PbPb failed"<<endl;}
3564 cout<<
"Warning: Initialization of Standardcuts2010pp failed"<<endl;}
3572 eventPlaneAngle=eventPlaneAngle+TMath::Pi();
3573 Double_t gammaToEPAngle = eventPlaneAngle-photonPhi;
3574 if(gammaToEPAngle < 0) gammaToEPAngle=gammaToEPAngle+2*TMath::Pi();
3575 gammaToEPAngle = gammaToEPAngle-TMath::Pi();
3582 if(TMath::Abs(gammaToEPAngle)<=0.25*TMath::Pi() || TMath::Abs(gammaToEPAngle)>=0.75*TMath::Pi()){
3589 if(TMath::Abs(gammaToEPAngle)>0.25*TMath::Pi() && TMath::Abs(gammaToEPAngle)<0.75*TMath::Pi()){
3604 if(!negTrack || !posTrack) {
3607 if(negTrack->Charge() == posTrack->Charge()){
3610 Int_t nClusterITSneg = negTrack->GetITSNcls();
3611 Int_t nClusterITSpos = posTrack->GetITSNcls();
3614 if (nClusterITSneg > 1 && nClusterITSpos > 1){
3616 }
else if (nClusterITSneg > 1 || nClusterITSpos > 1){
3629 nameProfile =
"profileContainingMaterialBudgetWeights_fewRadialBins";}
3631 nameProfile =
"profileContainingMaterialBudgetWeights_manyRadialBins";}
3633 AliError(Form(
"%d not a valid flag for InitMaterialBudgetWeightingOfPi0Candidates()",flag));
3636 TFile*
file = TFile::Open(filename.Data());
3638 AliError(Form(
"File %s for materialbudgetweights not found",filename.Data()));
3643 AliError(Form(
"Histogram %s not found in file",nameProfile.Data()));
3651 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()));
3661 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)