#include "AliGenEventHeader.h"
#include "AliEventPoolManager.h"
-//#include "AliAnalysisUtils.h"
+#include "AliAnalysisUtils.h"
using namespace AliPIDNameSpace;
using namespace std;
fzvtxcut(10.0),
ffilltrigassoUNID(kFALSE),
ffilltrigUNIDassoID(kFALSE),
- ffilltrigIDassoUNID(kFALSE),
- ffilltrigIDassoID(kTRUE),
+ ffilltrigIDassoUNID(kTRUE),
+ ffilltrigIDassoID(kFALSE),
ffilltrigIDassoIDMCTRUTH(kFALSE),
fPtOrderMCTruth(kFALSE),
- fTriggerSpeciesSelection(kFALSE),
- fAssociatedSpeciesSelection(kTRUE),
+ fTriggerSpeciesSelection(kFALSE),
+ fAssociatedSpeciesSelection(kFALSE),
fTriggerSpecies(SpPion),
fAssociatedSpecies(SpPion),
fCustomBinning(""),
fBinningString(""),
fcontainPIDtrig(kTRUE),
fcontainPIDasso(kFALSE),
+ frejectPileUp(kFALSE),
fminPt(0.2),
fmaxPt(10.0),
fmineta(-0.8),
fminpionsigmacut(0.0),
fmaxpionsigmacut(4.0),
fselectprimaryTruth(kTRUE),
+ fonlyprimarydatareco(kFALSE),
fdcacut(kFALSE),
fdcacutvalue(3.0),
+ kTrackVariablesPair(0),
+ fminPtTrig(0),
+ fmaxPtTrig(0),
+ fminPtComboeff(2.0),
+ fmaxPtComboeff(4.0),
+ fminPtAsso(0),
+ fmaxPtAsso(0),
fhistcentrality(0),
fEventCounter(0),
fEtaSpectrasso(0),
fCentralityCorrelation(0x0),
fHistoTPCdEdx(0x0),
fHistoTOFbeta(0x0),
+ fTPCTOFPion3d(0),
+ fTPCTOFKaon3d(0),
+ fTPCTOFProton3d(0),
+ fPionPt(0),
+ fPionEta(0),
+ fPionPhi(0),
+ fKaonPt(0),
+ fKaonEta(0),
+ fKaonPhi(0),
+ fProtonPt(0),
+ fProtonEta(0),
+ fProtonPhi(0),
fCorrelatonTruthPrimary(0),
fCorrelatonTruthPrimarymix(0),
fTHnCorrUNID(0),
fInjectedSignals(kFALSE),
fRemoveWeakDecays(kFALSE),
fRemoveDuplicates(kFALSE),
-fapplyefficiency(kFALSE),
+ fapplyTrigefficiency(kFALSE),
+ fapplyAssoefficiency(kFALSE),
ffillefficiency(kFALSE),
- fSkipAssoEff(kFALSE),
- fSkipTrigEff(kFALSE),
+ fmesoneffrequired(kFALSE),
+ fkaonprotoneffrequired(kFALSE),
fAnalysisUtils(0x0),
fDCAXYCut(0)
fHistQA[i] = NULL;
}
- for ( Int_t i = 0; i < 5; i++ ){
+ for ( Int_t i = 0; i < 6; i++ ){
fTHnrecomatchedallPid[i] = NULL;
fTHngenprimPidTruth[i] = NULL;
effcorection[i]=NULL;
}
+ for(Int_t ipart=0;ipart<NSpecies;ipart++)
+ for(Int_t ipid=0;ipid<=NSigmaPIDType;ipid++)
+ fnsigmas[ipart][ipid]=999.;
+
+ for(Int_t ipart=0;ipart<NSpecies;ipart++) {fHasDoubleCounting[ipart]=kFALSE;}
}
//________________________________________________________________________
fzvtxcut(10.0),
ffilltrigassoUNID(kFALSE),
ffilltrigUNIDassoID(kFALSE),
- ffilltrigIDassoUNID(kFALSE),
- ffilltrigIDassoID(kTRUE),
+ ffilltrigIDassoUNID(kTRUE),
+ ffilltrigIDassoID(kFALSE),
ffilltrigIDassoIDMCTRUTH(kFALSE),
fPtOrderMCTruth(kFALSE),
fTriggerSpeciesSelection(kFALSE),
- fAssociatedSpeciesSelection(kTRUE),
+ fAssociatedSpeciesSelection(kFALSE),
fTriggerSpecies(SpPion),
fAssociatedSpecies(SpPion),
fCustomBinning(""),
fBinningString(""),
fcontainPIDtrig(kTRUE),
fcontainPIDasso(kFALSE),
+ frejectPileUp(kFALSE),
fminPt(0.2),
fmaxPt(10.0),
fmineta(-0.8),
fminpionsigmacut(0.0),
fmaxpionsigmacut(4.0),
fselectprimaryTruth(kTRUE),
+ fonlyprimarydatareco(kFALSE),
fdcacut(kFALSE),
fdcacutvalue(3.0),
+ kTrackVariablesPair(0),
+ fminPtTrig(0),
+ fmaxPtTrig(0),
+ fminPtComboeff(2.0),
+ fmaxPtComboeff(4.0),
+ fminPtAsso(0),
+ fmaxPtAsso(0),
fhistcentrality(0),
fEventCounter(0),
fEtaSpectrasso(0),
fphiSpectraasso(0),
-MCtruthpt(0),
+ MCtruthpt(0),
MCtrutheta(0),
MCtruthphi(0),
MCtruthpionpt(0),
fCentralityCorrelation(0x0),
fHistoTPCdEdx(0x0),
fHistoTOFbeta(0x0),
+ fTPCTOFPion3d(0),
+ fTPCTOFKaon3d(0),
+ fTPCTOFProton3d(0),
+ fPionPt(0),
+ fPionEta(0),
+ fPionPhi(0),
+ fKaonPt(0),
+ fKaonEta(0),
+ fKaonPhi(0),
+ fProtonPt(0),
+ fProtonEta(0),
+ fProtonPhi(0),
fCorrelatonTruthPrimary(0),
-fCorrelatonTruthPrimarymix(0),
+ fCorrelatonTruthPrimarymix(0),
fTHnCorrUNID(0),
fTHnCorrUNIDmix(0),
fTHnCorrID(0),
fInjectedSignals(kFALSE),
fRemoveWeakDecays(kFALSE),
fRemoveDuplicates(kFALSE),
-fapplyefficiency(kFALSE),
+ fapplyTrigefficiency(kFALSE),
+ fapplyAssoefficiency(kFALSE),
ffillefficiency(kFALSE),
- fSkipAssoEff(kFALSE),
- fSkipTrigEff(kFALSE),
+ fmesoneffrequired(kFALSE),
+ fkaonprotoneffrequired(kFALSE),
fAnalysisUtils(0x0),
fDCAXYCut(0)
{
fHistQA[i] = NULL;
}
-for ( Int_t i = 0; i < 5; i++ ){
+for ( Int_t i = 0; i < 6; i++ ){
fTHnrecomatchedallPid[i] = NULL;
fTHngenprimPidTruth[i] = NULL;
effcorection[i]=NULL;
}
-
+ for(Int_t ipart=0;ipart<NSpecies;ipart++)
+ for(Int_t ipid=0;ipid<=NSigmaPIDType;ipid++)
+ fnsigmas[ipart][ipid]=999.;
+
+ for(Int_t ipart=0;ipart<NSpecies;ipart++) {fHasDoubleCounting[ipart]=kFALSE;}
+
// The last in the above list should not have a comma after it
// Constructor
fOutput = new TList();
fOutput->SetOwner(); // IMPORTANT!
+ Int_t centmultbins=10;
+ Int_t centmultmin=0.0;
+ Int_t centmultmax=100.0;
if(fSampleType=="pPb" || fSampleType=="PbPb")
{
centmultbins=10;
- //Int_t centmultbinseff=10;
- centmultmin=0.0;
+ centmultmin=0.0;
centmultmax=100.0;
}
-else if(fSampleType=="pp")
+ if(fSampleType=="pp")
{
centmultbins=10;
- //Int_t centmultbinseff=1;//integrated over multiplicity as efficiency has negligible dependence on multiplicity
centmultmin=0.0;
centmultmax=200.0;
}
- else//default value
- {
- centmultbins=10;
- centmultmin=0.0;
- centmultmax=100.0;
- }
fhistcentrality=new TH1F("fhistcentrality","fhistcentrality",centmultbins*4,centmultmin,centmultmax);
fOutput->Add(fhistcentrality);
fHistoTOFbeta = new TH2F(Form("hHistoTOFbeta"), ";p_{T} (GeV/c);v/c",70, 0., 7., 500, 0.1, 1.1);
fOutput->Add(fHistoTOFbeta);
+ fTPCTOFPion3d=new TH3F ("fTPCTOFpion3d", "fTPCTOFpion3d",100,0., 10., 120,-60.,60.,120,-60.,60);
+ fOutput->Add(fTPCTOFPion3d);
+ fTPCTOFKaon3d=new TH3F ("fTPCTOFKaon3d", "fTPCTOFKaon3d",100,0., 10., 120,-60.,60.,120,-60.,60);
+ fOutput->Add(fTPCTOFKaon3d);
+
+ fTPCTOFProton3d=new TH3F ("fTPCTOFProton3d", "fTPCTOFProton3d",100,0., 10., 120,-60.,60.,120,-60.,60);
+ fOutput->Add(fTPCTOFProton3d);
+
+ fPionPt = new TH1F("fHistQAPionPt","p_{T} distribution",200,0.,10.);
+ fOutput->Add(fPionPt);
+ fPionEta= new TH1F("fHistQAPionEta","#eta distribution",360,-1.8,1.8);
+ fOutput->Add(fPionEta);
+ fPionPhi = new TH1F("fHistQAPionPhi","#phi distribution",340,0,6.8);
+ fOutput->Add(fPionPhi);
+
+ fKaonPt = new TH1F("fHistQAKaonPt","p_{T} distribution",200,0.,10.);
+ fOutput->Add(fKaonPt);
+ fKaonEta= new TH1F("fHistQAKaonEta","#eta distribution",360,-1.8,1.8);
+ fOutput->Add(fKaonEta);
+ fKaonPhi = new TH1F("fHistQAKaonPhi","#phi distribution",340,0,6.8);
+ fOutput->Add(fKaonPhi);
+
+ fProtonPt = new TH1F("fHistQAProtonPt","p_{T} distribution",200,0.,10.);
+ fOutput->Add(fProtonPt);
+ fProtonEta= new TH1F("fHistQAProtonEta","#eta distribution",360,-1.8,1.8);
+ fOutput->Add(fProtonEta);
+ fProtonPhi= new TH1F("fHistQAProtonPhi","#phi distribution",340,0,6.8);
+ fOutput->Add(fProtonPhi);
+
fHistQA[0] = new TH1F("fHistQAvx", "Histo Vx All ", 50, -5., 5.);
fHistQA[1] = new TH1F("fHistQAvy", "Histo Vy All", 50, -5., 5.);
fHistQA[5] = new TH1F("fHistQAvzA", "Histo Vz After Cut", 50, -25., 25.);
fHistQA[6] = new TH1F("fHistQADcaXyC", "Histo DCAxy after cut", 50, -5., 5.);
fHistQA[7] = new TH1F("fHistQADcaZC", "Histo DCAz after cut", 50, -5., 5.);
- fHistQA[8] = new TH1F("fHistQAPt","p_{T} distribution",900,0.,9.);
+ fHistQA[8] = new TH1F("fHistQAPt","p_{T} distribution",200,0.,10.);
fHistQA[9] = new TH1F("fHistQAEta","#eta distribution",360,-1.8,1.8);
fHistQA[10] = new TH1F("fHistQAPhi","#phi distribution",340,0,6.8);
fHistQA[11] = new TH1F("fHistQANCls","Number of TPC cluster",200,0,200);
fHistQA[14] = new TH1F("nCrossedRowsTPC","Number of TPC ccrossed rows",200,0,200);
fHistQA[15] = new TH1F("ratioCrossedRowsOverFindableClustersTPC","Number of TPC ccrossed rows find clusters",200,0,2);
-
-
for(Int_t i = 0; i < 16; i++)
{
fOutput->Add(fHistQA[i]);
}
+
kTrackVariablesPair=6 ;
if(fcontainPIDtrig && !fcontainPIDasso) kTrackVariablesPair=7;
fminPtAsso=dBinsPair[3][0];
fmaxPtAsso=dBinsPair[3][iBinPair[3]];
+ //fminPtComboeff=fminPtTrig;***then this value will be fixed ,even Setter can't change it's value
+ //fmaxPtComboeff=fmaxPtTrig;
//THnSparses for calculation of efficiency
if(fAnalysisType == "MCAOD" && ffillefficiency) {
Double_t fMaxCh[nDim] = { dBinsPair[0][iBinPair[0]], dBinsPair[1][iBinPair[1]], Pteff[nPteffbin], EtaBin[nEtaBin]};
TString Histrename;
-for(Int_t jj=0;jj<5;jj++)//centrality binning
+for(Int_t jj=0;jj<6;jj++)//centrality binning
{
Histrename="fTHnrecomatchedallPid";Histrename+=jj;
fTHnrecomatchedallPid[jj] = new THnSparseF(Histrename.Data(),"cent:zvtx::Pt:eta", nDim, fBinsCh, fMinCh, fMaxCh);
MCtruthprotonphi=new TH1F ("MCtruthprotonphi","MCtruthprotonphi",340,0,6.8);
fOutput->Add(MCtruthprotonphi);
- fPioncont=new TH2F("fPioncont", "fPioncont",4,-0.5,3.5,100,0.,10.);
+ fPioncont=new TH2F("fPioncont", "fPioncont",10,-0.5,9.5,100,0.,10.);
fOutput->Add(fPioncont);
- fKaoncont=new TH2F("fKaoncont","fKaoncont",4,-0.5,3.5,100,0.,10.);
+ fKaoncont=new TH2F("fKaoncont","fKaoncont",10,-0.5,9.5,100,0.,10.);
fOutput->Add(fKaoncont);
- fProtoncont=new TH2F("fProtoncont","fProtoncont",4,-0.5,3.5,100,0.,10.);
+ fProtoncont=new TH2F("fProtoncont","fProtoncont",10,-0.5,9.5,100,0.,10.);
fOutput->Add(fProtoncont);
}
//Mixing
DefineEventPool();
- if(fapplyefficiency)
+ if(fapplyTrigefficiency || fapplyAssoefficiency)
{
const Int_t nDimt = 4;// cent zvtx pt eta
Int_t fBinsCht[nDimt] = {iBinPair[0], iBinPair[1], nPteffbin ,nEtaBin};//*************change it
Double_t fMaxCht[nDimt] = {dBinsPair[0][iBinPair[0]], dBinsPair[1][iBinPair[1]], Pteff[nPteffbin], EtaBin[nEtaBin]};
TString Histrexname;
-for(Int_t jj=0;jj<5;jj++)// PID type binning
+for(Int_t jj=0;jj<6;jj++)// PID type binning
{
Histrexname="effcorection";Histrexname+=jj;
effcorection[jj] = new THnSparseF(Histrexname.Data(),"cent:zvtx::Pt:eta", nDimt, fBinsCht, fMinCht, fMaxCht);
// TFile *fsifile = new TFile(fefffilename,"READ");
TFile *fileT=TFile::Open(fefffilename);
TString Nameg;
-for(Int_t jj=0;jj<5;jj++)//type binning
+for(Int_t jj=0;jj<6;jj++)//type binning
{
Nameg="effmap";Nameg+=jj;
//effcorection[jj] = (THnSparseF*)fsifile->Get(Nameg.Data());
if(!aod) return; //for safety
+if (fSampleType=="pPb" || fSampleType=="PbPb") if (cent_v0 < 0) return;//for pp case it is the multiplicity
+
Double_t nooftrackstruth=0.0;//in case of pp this will give the multiplicity(for truth case) after the track loop(only for unidentified particles that pass kinematic cuts)
Double_t cent_v0_truth=0.0;
-if (fSampleType=="pPb" || fSampleType=="PbPb") if (cent_v0 < 0) return;//for pp case it is the multiplicity
-
- TObjArray* tracksMCtruth=0;
- tracksMCtruth=new TObjArray;//for truth MC particles with PID,here unidentified means any particle other than pion, kaon or proton(Basicaly Spundefined of AliHelperPID)******WARNING::different from data and reco MC
+ //TObjArray* tracksMCtruth=0;
+TObjArray* tracksMCtruth=new TObjArray;//for truth MC particles with PID,here unidentified means any particle other than pion, kaon or proton(Basicaly Spundefined of AliHelperPID)******WARNING::different from data and reco MC
tracksMCtruth->SetOwner(kTRUE); //***********************************IMPORTANT!
eventno++;
-
+ //There is a small difference between zvtx and zVtxmc??????
+ //cout<<"***********************************************zVtxmc="<<zVtxmc<<endl;
+ //cout<<"***********************************************zvtx="<<zvtx<<endl;
+
//now process the truth particles(for both efficiency & correlation function)
Int_t nMCTrack = fArrayMC->GetEntriesFast();
//To determine multiplicity in case of PP
nooftrackstruth++;
-
+ //cout<<"**************************************"<<TMath::Abs(partMC->GetLabel())<<endl;
//only physical primary(all/unidentified)
MCtruthpt->Fill(partMC->Pt());
MCtrutheta->Fill(partMC->Eta());
MCtruthprotoneta->Fill(partMC->Eta());
MCtruthprotonphi->Fill(partMC->Phi());
}
- if(TMath::Abs(pdgtruth)!=211 && TMath::Abs(pdgtruth)!=321 && TMath::Abs(pdgtruth)!=2212) particletypeTruth=unidentified;//*********************WARNING:: situation is different from reco MC and data case(here we don't have SpUndefined particles)
+ if(TMath::Abs(pdgtruth)!=211 && TMath::Abs(pdgtruth)!=321 && TMath::Abs(pdgtruth)!=2212) particletypeTruth=unidentified;//*********************WARNING:: situation is different from reco MC and data case(here we don't have SpUndefined particles,because here unidentified=SpUndefined)
// -- Fill THnSparse for efficiency and contamination calculation
- if (fSampleType=="pp") cent_v0=15.0;//integrated over multiplicity(so put any fixed value for each track so that practically means there is only one bin in multiplicityi.e multiplicity intregated out )**************Important
+ if (fSampleType=="pp") cent_v0=15.0;//integrated over multiplicity(so put any fixed value for each track so that practically means there is only one bin in multiplicity i.e. multiplicity intregated out )**************Important
Double_t primmctruth[4] = {cent_v0, zVtxmc,partMC->Pt(), partMC->Eta()};
if(ffillefficiency)
{
- fTHngenprimPidTruth[4]->Fill(primmctruth);//for all primary truth particles(4)
-
-if (TMath::Abs(pdgtruth)==211 || TMath::Abs(pdgtruth)==321)
- {
- fTHngenprimPidTruth[3]->Fill(primmctruth);//for primary truth mesons(3)
+ fTHngenprimPidTruth[5]->Fill(primmctruth);//for all primary truth particles(4)
+if (TMath::Abs(pdgtruth)==211 || TMath::Abs(pdgtruth)==321) fTHngenprimPidTruth[3]->Fill(primmctruth);//for primary truth mesons(3)
+if (TMath::Abs(pdgtruth)==2212 || TMath::Abs(pdgtruth)==321) fTHngenprimPidTruth[4]->Fill(primmctruth);//for primary truth kaons+protons(4)
if (TMath::Abs(pdgtruth)==211) fTHngenprimPidTruth[0]->Fill(primmctruth);//for pions
if (TMath::Abs(pdgtruth)==321) fTHngenprimPidTruth[1]->Fill(primmctruth);//for kaons
- }
if(TMath::Abs(pdgtruth)==2212) fTHngenprimPidTruth[2]->Fill(primmctruth);//for protons
}
- Float_t effmatrix=1.;//here no case of efficiency correction so it should be always 1.0
+ Float_t effmatrixtruth=1.0;//In Truth MC, no case of efficiency correction so it should be always 1.0
if(partMC->Pt()>=fminPtAsso || partMC->Pt()<=fmaxPtTrig)//to reduce memory consumption in pool
{
-LRCParticlePID* copy6 = new LRCParticlePID(particletypeTruth,partMC->Charge(),partMC->Pt(),partMC->Eta(), partMC->Phi(),effmatrix);
- copy6->SetUniqueID(eventno * 100000 + TMath::Abs(partMC->GetLabel()));
+LRCParticlePID* copy6 = new LRCParticlePID(particletypeTruth,partMC->Charge(),partMC->Pt(),partMC->Eta(), partMC->Phi(),effmatrixtruth);
+//copy6->SetUniqueID(eventno * 100000 + TMath::Abs(partMC->GetLabel()));
+ copy6->SetUniqueID(eventno * 100000 + (Int_t)nooftrackstruth);
tracksMCtruth->Add(copy6);//************** TObjArray used for truth correlation function calculation
}
}//MC truth track loop ends
+//*********************still in event loop
+
if (fSampleType=="pp") cent_v0_truth=nooftrackstruth;
- else cent_v0_truth=cent_v0;//the notation cent_v0 is reserved for reco case
+ else cent_v0_truth=cent_v0;//the notation cent_v0 is reserved for reco/data case
+
+ //now cent_v0_truth should be used for all correlation function calculation
if(nooftrackstruth>0.0 && ffilltrigIDassoIDMCTRUTH)
{
Fillcorrelation(tracksMCtruth,0,cent_v0_truth,zVtxmc,bSign,fPtOrderMCTruth,kFALSE,kFALSE,"trigIDassoIDMCTRUTH");//mixcase=kFALSE for same event case
//start mixing
-AliEventPool* pool2 = fPoolMgr->GetEventPool(cent_v0, zVtxmc+200);
+AliEventPool* pool2 = fPoolMgr->GetEventPool(cent_v0_truth, zVtxmc+200);
if (pool2 && pool2->IsReady())
{//start mixing only when pool->IsReady
if(tracksMCtruth && tracksMCtruth->GetEntriesFast()>0)
if(tracksMCtruth) delete tracksMCtruth;
//now deal with reco tracks
- TObjArray* tracksUNID=0;
- tracksUNID = new TObjArray;
+//TObjArray* tracksUNID=0;
+ TObjArray* tracksUNID = new TObjArray;
tracksUNID->SetOwner(kTRUE);
- TObjArray* tracksID=0;
- tracksID = new TObjArray;
+ // TObjArray* tracksID=0;
+ TObjArray* tracksID = new TObjArray;
tracksID->SetOwner(kTRUE);
if (!track) continue;
//get the corresponding MC track at the truth level (doing reco matching)
AliAODMCParticle* recomatched = static_cast<AliAODMCParticle*>(fArrayMC->At(TMath::Abs(track->GetLabel())));
- if(!recomatched) continue;//if a reco track doesn't have corresponding truth track at generated level is a fake track, ignore it
+ if(!recomatched) continue;//if a reco track doesn't have corresponding truth track at generated level is a fake track(label==0), ignore it
//remove injected signals
if(fInjectedSignals)
if(fRemoveDuplicates && isduplicate2) continue;//remove duplicates
fHistQA[11]->Fill(track->GetTPCNcls());
- Int_t tracktype=ClassifyTrack(track,kFALSE,trkVtx,bSign1);//dcacut=kFALSE,onlyprimary=kFALSE
+ Int_t tracktype=ClassifyTrack(track,trkVtx,bSign1);//dcacut=kFALSE,onlyprimary=kFALSE
if(tracktype==0) continue;
if(tracktype==1)//tracks "not" passed AliAODTrack::kPrimary at reconstructed level & have proper TPC PID response(?)
//Clone & Reduce track list(TObjArray) for unidentified particles
if(track->Pt()>=fminPtAsso || track->Pt()<=fmaxPtTrig)//to reduce memory consumption in pool
{
- if (fapplyefficiency)//get the trackingefficiency x contamination factor for unidentified particles
- effmatrix=GetTrackbyTrackeffvalue(track,cent_v0,zvtx,particletypeMC,kFALSE);
+ if (fapplyTrigefficiency || fapplyAssoefficiency)//get the trackingefficiency x contamination factor for unidentified particles
+ effmatrix=GetTrackbyTrackeffvalue(track,cent_v0,zvtx,particletypeMC);
LRCParticlePID* copy = new LRCParticlePID(particletypeMC,track->Charge(),track->Pt(),track->Eta(), track->Phi(),effmatrix);
copy->SetUniqueID(eventno * 100000 +(Int_t)trackscount);
tracksUNID->Add(copy);//track information Storage for UNID correlation function(tracks that pass the filterbit & kinematic cuts only)
}
Double_t allrecomatchedpid[4] = {cent_v0, zVtxmc,recomatched->Pt(), recomatched->Eta()};
-if(ffillefficiency) fTHnrecomatchedallPid[4]->Fill(allrecomatchedpid);//for all
+if(ffillefficiency) fTHnrecomatchedallPid[5]->Fill(allrecomatchedpid);//for all
//now start the particle identification process:)
//do track identification(nsigma method)
particletypeMC=GetParticle(track);//******************************problem is here
+//2-d TPCTOF map(for each Pt interval)
+ if(HasTOFPID(track)){
+ fTPCTOFPion3d->Fill(track->Pt(),fnsigmas[SpPion][NSigmaTOF],fnsigmas[SpPion][NSigmaTPC]);
+ fTPCTOFKaon3d->Fill(track->Pt(),fnsigmas[SpKaon][NSigmaTOF],fnsigmas[SpKaon][NSigmaTPC]);
+ fTPCTOFProton3d->Fill(track->Pt(),fnsigmas[SpProton][NSigmaTOF],fnsigmas[SpProton][NSigmaTPC]);
+ }
if(particletypeMC==SpUndefined) continue;
+ //Pt, Eta , Phi distribution of the reconstructed identified particles
+if (particletypeMC==SpPion)
+ {
+ fPionPt->Fill(track->Pt());
+ fPionEta->Fill(track->Eta());
+ fPionPhi->Fill(track->Phi());
+ }
+if (particletypeMC==SpKaon)
+ {
+ fKaonPt->Fill(track->Pt());
+ fKaonEta->Fill(track->Eta());
+ fKaonPhi->Fill(track->Phi());
+ }
+if (particletypeMC==SpProton)
+ {
+ fProtonPt->Fill(track->Pt());
+ fProtonEta->Fill(track->Eta());
+ fProtonPhi->Fill(track->Phi());
+ }
+
//for misidentification fraction calculation(do it with tuneonPID)
if(particletypeMC==SpPion )
{
- if(TMath::Abs(pdgCode)==211) fPioncont->Fill(0.,track->Pt());
- if(TMath::Abs(pdgCode)==321) fPioncont->Fill(1.,track->Pt());
- if(TMath::Abs(pdgCode)==2212) fPioncont->Fill(2.,track->Pt());
- if(TMath::Abs(pdgCode)!=211 && TMath::Abs(pdgCode)!=321 && TMath::Abs(pdgCode)!=2212) fPioncont->Fill(3.,track->Pt());
+ if(TMath::Abs(pdgCode)==211) fPioncont->Fill(1.,track->Pt());
+ if(TMath::Abs(pdgCode)==321) fPioncont->Fill(3.,track->Pt());
+ if(TMath::Abs(pdgCode)==2212) fPioncont->Fill(5.,track->Pt());
+ if(TMath::Abs(pdgCode)!=211 && TMath::Abs(pdgCode)!=321 && TMath::Abs(pdgCode)!=2212) fPioncont->Fill(7.,track->Pt());
}
if(particletypeMC==SpKaon )
{
- if(TMath::Abs(pdgCode)==211) fKaoncont->Fill(0.,track->Pt());
- if(TMath::Abs(pdgCode)==321) fKaoncont->Fill(1.,track->Pt());
- if(TMath::Abs(pdgCode)==2212) fKaoncont->Fill(2.,track->Pt());
- if(TMath::Abs(pdgCode)!=211 && TMath::Abs(pdgCode)!=321 && TMath::Abs(pdgCode)!=2212) fKaoncont->Fill(3.,track->Pt());
+ if(TMath::Abs(pdgCode)==211) fKaoncont->Fill(1.,track->Pt());
+ if(TMath::Abs(pdgCode)==321) fKaoncont->Fill(3.,track->Pt());
+ if(TMath::Abs(pdgCode)==2212) fKaoncont->Fill(5.,track->Pt());
+ if(TMath::Abs(pdgCode)!=211 && TMath::Abs(pdgCode)!=321 && TMath::Abs(pdgCode)!=2212) fKaoncont->Fill(7.,track->Pt());
}
if(particletypeMC==SpProton )
{
- if(TMath::Abs(pdgCode)==211) fProtoncont->Fill(0.,track->Pt());
- if(TMath::Abs(pdgCode)==321) fProtoncont->Fill(1.,track->Pt());
- if(TMath::Abs(pdgCode)==2212) fProtoncont->Fill(2.,track->Pt());
- if(TMath::Abs(pdgCode)!=211 && TMath::Abs(pdgCode)!=321 && TMath::Abs(pdgCode)!=2212) fProtoncont->Fill(3.,track->Pt());
+ if(TMath::Abs(pdgCode)==211) fProtoncont->Fill(1.,track->Pt());
+ if(TMath::Abs(pdgCode)==321) fProtoncont->Fill(3.,track->Pt());
+ if(TMath::Abs(pdgCode)==2212) fProtoncont->Fill(5.,track->Pt());
+ if(TMath::Abs(pdgCode)!=211 && TMath::Abs(pdgCode)!=321 && TMath::Abs(pdgCode)!=2212) fProtoncont->Fill(7.,track->Pt());
}
//fill tracking efficiency
{
if(TMath::Abs(pdgCode)==211 || TMath::Abs(pdgCode)==321) fTHnrecomatchedallPid[3]->Fill(allrecomatchedpid);//for mesons
}
+ if(particletypeMC==SpKaon || particletypeMC==SpProton)
+ {
+if(TMath::Abs(pdgCode)==321 || TMath::Abs(pdgCode)==2212) fTHnrecomatchedallPid[4]->Fill(allrecomatchedpid);//for kaons+protons
+ }
if(particletypeMC==SpPion && TMath::Abs(pdgCode)==211) fTHnrecomatchedallPid[0]->Fill(allrecomatchedpid);//for pions
if(particletypeMC==SpKaon && TMath::Abs(pdgCode)==321) fTHnrecomatchedallPid[1]->Fill(allrecomatchedpid);//for kaons
- if(particletypeMC==SpProton && TMath::Abs(pdgCode)==2212) fTHnrecomatchedallPid[2]->Fill(allrecomatchedpid);//for protons
-
+ if(particletypeMC==SpProton && TMath::Abs(pdgCode)==2212) fTHnrecomatchedallPid[2]->Fill(allrecomatchedpid);//for protons
}
if(track->Pt()>=fminPtAsso || track->Pt()<=fmaxPtTrig)//to reduce memory consumption in pool
{
-if (fapplyefficiency)
- effmatrix=GetTrackbyTrackeffvalue(track,cent_v0,zvtx,particletypeMC,kFALSE);//get the tracking eff x TOF matching eff x PID eff x contamination factor for identified particles
+if (fapplyTrigefficiency || fapplyAssoefficiency)
+ effmatrix=GetTrackbyTrackeffvalue(track,cent_v0,zvtx,particletypeMC);//get the tracking eff x TOF matching eff x PID eff x contamination factor for identified particles
LRCParticlePID* copy1 = new LRCParticlePID(particletypeMC,track->Charge(),track->Pt(),track->Eta(), track->Phi(),effmatrix);
copy1->SetUniqueID(eventno * 100000 + (Int_t)trackscount);
tracksID->Add(copy1);
Float_t bSign1=aod->GetHeader()->GetMagneticField() ;//for dca cut in ClassifyTrack(), i.e in track loop
// Pileup selection ************************************************
- //if (fAnalysisUtils && fAnalysisUtils->IsPileUpEvent(aod)) return; //applicable only for TPC only tracks,not for hybrid tracks?.
+ if(frejectPileUp) //applicable only for TPC only tracks,not for hybrid tracks?.
+ {
+ if (fAnalysisUtils && fAnalysisUtils->IsPileUpEvent(aod)) return;
+ }
if (!fPID) return;//this should be available with each event even if we don't do PID selection
if(fSampleType=="pPb" || fSampleType=="PbPb") if (cent_v0 < 0) return;//for pp case it is the multiplicity
- TObjArray* tracksUNID=0;
- tracksUNID= new TObjArray;//track info before doing PID
+//TObjArray* tracksUNID=0;
+ TObjArray* tracksUNID= new TObjArray;//track info before doing PID
tracksUNID->SetOwner(kTRUE); // IMPORTANT!
- TObjArray* tracksID=0;
- tracksID= new TObjArray;//only pions, kaons,protonsi.e. after doing the PID selection
+//TObjArray* tracksID=0;
+ TObjArray* tracksID= new TObjArray;//only pions, kaons,protonsi.e. after doing the PID selection
tracksID->SetOwner(kTRUE); // IMPORTANT!
Double_t trackscount=0.0;//in case of pp this will give the multiplicity after the track loop(only for unidentified particles that pass the filterbit and kinematic cuts)
eventno++;
-
for (Int_t itrk = 0; itrk < aod->GetNumberOfTracks(); itrk++)
{ //track loop starts for TObjArray(containing track and event information) filling; used for correlation function calculation
AliAODTrack* track = dynamic_cast<AliAODTrack*>(aod->GetTrack(itrk));
if (!track) continue;
fHistQA[11]->Fill(track->GetTPCNcls());
Int_t particletype=-9999;//required for PID filling
- Int_t tracktype=ClassifyTrack(track,kFALSE,trkVtx,bSign1);//dcacut=kFALSE,onlyprimary=kFALSE
+ Int_t tracktype=ClassifyTrack(track,trkVtx,bSign1);//dcacut=kFALSE,onlyprimary=kFALSE
if(tracktype!=1) continue;
if(!track) continue;//for safety
//tag all particles as unidentified that passed filterbit & kinematic cuts
particletype=unidentified;
+
+ if (fSampleType=="pp") cent_v0=15.0;//integrated over multiplicity [i.e each track has multiplicity 15.0](so put any fixed value for each track so that practically means there is only one bin in multiplicityi.e multiplicity intregated out )**************Important for efficiency related issues
+
+
+ //to reduce memory consumption in pool
+ if(track->Pt()>=fminPtAsso || track->Pt()<=fmaxPtTrig)
+ {
+ //Clone & Reduce track list(TObjArray) for unidentified particles
+ if (fapplyTrigefficiency || fapplyAssoefficiency)//get the trackingefficiency x contamination factor for unidentified particles
+ effmatrix=GetTrackbyTrackeffvalue(track,cent_v0,zvtx,particletype);
+ LRCParticlePID* copy = new LRCParticlePID(particletype,track->Charge(),track->Pt(),track->Eta(), track->Phi(),effmatrix);
+ copy->SetUniqueID(eventno * 100000 + (Int_t)trackscount);
+ tracksUNID->Add(copy);//track information Storage for UNID correlation function(tracks that pass the filterbit & kinematic cuts only)
+ }
+
+//now start the particle identificaion process:)
+
//track passing filterbit 768 have proper TPC response,or need to be checked explicitly before doing PID????
Float_t dEdx = track->GetTPCsignal();
fHistoTOFbeta->Fill(track->Pt(), beta);
}
- if (fSampleType=="pp") cent_v0=15.0;//integrated over multiplicity [i.e each track has multiplicity 15.0](so put any fixed value for each track so that practically means there is only one bin in multiplicityi.e multiplicity intregated out )**************Important
-
- //to reduce memory consumption in pool
- if(track->Pt()<fminPtAsso || track->Pt()>fmaxPtTrig) continue;
+//track identification(using nsigma method)
+ particletype=GetParticle(track);//*******************************change may be required(It should return only pion,kaon, proton and Spundefined; NOT unidentifed***************be careful)
- //Clone & Reduce track list(TObjArray) for unidentified particles
- if (fapplyefficiency)//get the trackingefficiency x contamination factor for unidentified particles
- effmatrix=GetTrackbyTrackeffvalue(track,cent_v0,zvtx,particletype,kFALSE);
- LRCParticlePID* copy = new LRCParticlePID(particletype,track->Charge(),track->Pt(),track->Eta(), track->Phi(),effmatrix);
- copy->SetUniqueID(eventno * 100000 + (Int_t)trackscount);
- tracksUNID->Add(copy);//track information Storage for UNID correlation function(tracks that pass the filterbit & kinematic cuts only)
+//2-d TPCTOF map(for each Pt interval)
+ if(HasTOFPID(track)){
+ fTPCTOFPion3d->Fill(track->Pt(),fnsigmas[SpPion][NSigmaTOF],fnsigmas[SpPion][NSigmaTPC]);
+ fTPCTOFKaon3d->Fill(track->Pt(),fnsigmas[SpKaon][NSigmaTOF],fnsigmas[SpKaon][NSigmaTPC]);
+ fTPCTOFProton3d->Fill(track->Pt(),fnsigmas[SpProton][NSigmaTOF],fnsigmas[SpProton][NSigmaTPC]);
+ }
-//now start the particle identificaion process:)
+//ignore the Spundefined particles as they also contain pion, kaon, proton outside the nsigma cut(also if tracks don't have proper TOF PID in a certain Pt interval) & these tracks are actually counted when we do the the efficiency correction, so considering them as unidentified particles & doing the efficiency correction(i.e defining unidentified=pion+Kaon+proton+SpUndefined is right only without efficiency correction) for them will be two times wrong!!!!!
+ if (particletype==SpUndefined) continue;//this condition creating a modulated structure in delphi projection in mixed event case(only when we are dealing with identified particles i.e. tracksID)!!!!!!!!!!!
-//track identification(using nsigma method)
- particletype=GetParticle(track);//*******************************change may be required(It should return only pion,kaon, proton and Spundefined; NOT unidentifed***************be careful)
+ //Pt, Eta , Phi distribution of the reconstructed identified particles
+if (particletype==SpPion)
+ {
+ fPionPt->Fill(track->Pt());
+ fPionEta->Fill(track->Eta());
+ fPionPhi->Fill(track->Phi());
+ }
+if (particletype==SpKaon)
+ {
+ fKaonPt->Fill(track->Pt());
+ fKaonEta->Fill(track->Eta());
+ fKaonPhi->Fill(track->Phi());
+ }
+if (particletype==SpProton)
+ {
+ fProtonPt->Fill(track->Pt());
+ fProtonEta->Fill(track->Eta());
+ fProtonPhi->Fill(track->Phi());
+ }
-//ignore the Spundefined particles as they also contain pion, kaon, proton outside the nsigma cut(also if tracks don't have proper TOF PID in a certain Pt interval) & these tracks are actually counted when we do the the efficiency correction, so considering them as unidentified particles & doing the efficiency correction(i.e defining unidentified=pion+Kaon+proton+SpUndefined is right only without efficiency correction) for them will be two times wrong!!!!!
- if (particletype==SpUndefined) continue;
-if (fapplyefficiency)
- effmatrix=GetTrackbyTrackeffvalue(track,cent_v0,zvtx,particletype,kFALSE);//get the tracking eff x TOF matching eff x PID eff x contamination factor for identified particles; Bool_t mesoneffrequired=kFALSE
+if(track->Pt()>=fminPtAsso || track->Pt()<=fmaxPtTrig)
+ {
+if (fapplyTrigefficiency || fapplyAssoefficiency)
+ effmatrix=GetTrackbyTrackeffvalue(track,cent_v0,zvtx,particletype);//get the tracking eff x TOF matching eff x PID eff x contamination factor for identified particles; Bool_t mesoneffrequired=kFALSE
LRCParticlePID* copy1 = new LRCParticlePID(particletype,track->Charge(),track->Pt(),track->Eta(), track->Phi(),effmatrix);
copy1->SetUniqueID(eventno * 100000 + (Int_t)trackscount);
tracksID->Add(copy1);
-
+ }
} //track loop ends but still in event loop
if(trackscount<1.0){
return;
}
-
+// cout<<fminPtAsso<<"***"<<fmaxPtAsso<<"*********************"<<fminPtTrig<<"***"<<fmaxPtTrig<<"*****************"<<kTrackVariablesPair<<endl;
if(fSampleType=="pp") cent_v0=trackscount;//multiplicity
//fill the centrality/multiplicity distribution of the selected events
void AliTwoParticlePIDCorr::Fillcorrelation(TObjArray *trackstrig,TObjArray *tracksasso,Double_t cent,Float_t vtx,Float_t bSign,Bool_t fPtOrder,Bool_t twoTrackEfficiencyCut,Bool_t mixcase,TString fillup)
{
- //before calling this function check that both trackstrig & tracksasso are available
+ //before calling this function check that either trackstrig & tracksasso are available
// Eta() is extremely time consuming, therefore cache it for the inner loop here:
TObjArray* input = (tracksasso) ? tracksasso : trackstrig;
if (trig->TestBit(kResonanceDaughterFlag)) continue;
Float_t trigphi=trig->Phi();
- Float_t trackefftrig=trig->geteffcorrectionval();
- if(fSkipTrigEff) trackefftrig=1.0;
+ Float_t trackefftrig=1.0;
+ if(fapplyTrigefficiency) trackefftrig=trig->geteffcorrectionval();
+ // cout<<"*******************trackefftrig="<<trackefftrig<<endl;
Double_t* trigval;
Int_t dim=3;
if(fcontainPIDtrig) dim=4;
}
//ensure that trigIDassoID , trigassoUNID, trigIDassoUNID & trigUNIDassoID case FillCorrelation called only once in the event loop for same event correlation function calculation, otherwise there will be multiple counting of pion, kaon,proton,unidentified
if(ffilltrigIDassoUNID==kTRUE && ffilltrigIDassoID==kTRUE){
- if(fillup=="trigIDassoID" ) fTHnTrigcount->Fill(trigval,1.0/trackefftrig);
+ if(fillup=="trigIDassoID") fTHnTrigcount->Fill(trigval,1.0/trackefftrig);
}
if(ffilltrigIDassoUNID==kTRUE && ffilltrigIDassoID==kFALSE){
if(fillup=="trigIDassoUNID" ) fTHnTrigcount->Fill(trigval,1.0/trackefftrig);
if(fillup=="trigIDassoID") fTHnTrigcount->Fill(trigval,1.0/trackefftrig);
}
-
- if(fillup=="trigIDassoIDMCTRUTH") fTHnTrigcountMCTruthPrim->Fill(trigval,1.0/trackefftrig); //In truth MC case "Unidentified" means any particle other than pion,kaon or proton and no efficiency correction************************be careful!!!!
+ if(fAnalysisType == "MCAOD" && fillup=="trigIDassoIDMCTRUTH") fTHnTrigcountMCTruthPrim->Fill(trigval,1.0/trackefftrig); //In truth MC case "Unidentified" means any particle other than pion,kaon or proton and no efficiency correction************************be careful!!!!
}
//asso loop starts within trigger loop
for(Int_t j=0;j<jmax;j++)
{
- if(!tracksasso && i==j) continue;
LRCParticlePID *asso=0;
if(!tracksasso)
asso=(LRCParticlePID*)(trackstrig->UncheckedAt(j));
asso=(LRCParticlePID*)(tracksasso->UncheckedAt(j));
if(!asso) continue;
- // check if both particles point to the same element (does not occur for mixed events, but if subsets are mixed within the same event)
//to avoid overflow qnd underflow
- if(asso->Pt()<fminPtAsso || asso->Pt()>fmaxPtAsso) continue;
+ if(asso->Pt()<fminPtAsso || asso->Pt()>fmaxPtAsso) continue;//***********************Important
- if (tracksasso && trig->IsEqual(asso)) continue;
-
+ if(fmaxPtAsso==fminPtTrig) {if(asso->Pt()==fminPtTrig) continue;}//******************Think about it!
+
+ if(!tracksasso && i==j) continue;
+
+ // check if both particles point to the same element (does not occur for mixed events, but if subsets are mixed within the same event)
+ // if (tracksasso && trig->IsEqual(asso)) continue;
+
+ if (tracksasso && (trig->GetUniqueID()==asso->GetUniqueID())) continue;
+
if (fPtOrder)
if (asso->Pt() >= trig->Pt()) continue;
}
}
- Float_t trackeffasso=asso->geteffcorrectionval();
- if(fSkipAssoEff) trackeffasso=1.0;
+ Float_t trackeffasso=1.0;
+ if(fapplyAssoefficiency) trackeffasso=asso->geteffcorrectionval();
+ //cout<<"*******************trackeffasso="<<trackeffasso<<endl;
Float_t deleta=trigeta-eta[j];
Float_t delphi=PhiRange(trigphi-asso->Phi());
//here get the two particle efficiency correction factor
Float_t effweight=trackefftrig*trackeffasso;
- //cout<<effweight<<endl;
+ //cout<<"*******************effweight="<<effweight<<endl;
Double_t* vars;
vars= new Double_t[kTrackVariablesPair];
vars[0]=cent;
if(mixcase==kFALSE) fTHnCorrID->Fill(vars,1.0/effweight);
if(mixcase==kTRUE) fTHnCorrIDmix->Fill(vars,1.0/effweight);
}
- if(fillup=="trigIDassoIDMCTRUTH")//******************************************for TRUTH MC particles
+ if(fAnalysisType == "MCAOD" && fillup=="trigIDassoIDMCTRUTH")//******************************************for TRUTH MC particles
{//in this case effweight should be 1 always
if(mixcase==kFALSE) fCorrelatonTruthPrimary->Fill(vars,1.0/effweight);
if(mixcase==kTRUE) fCorrelatonTruthPrimarymix->Fill(vars,1.0/effweight);
}
//--------------------------------------------------------------------------------
-Float_t AliTwoParticlePIDCorr::GetTrackbyTrackeffvalue(AliAODTrack* track,Double_t cent,Float_t evzvtx, Int_t parpid,Bool_t mesoneffrequired)
+Float_t AliTwoParticlePIDCorr::GetTrackbyTrackeffvalue(AliAODTrack* track,Double_t cent,Float_t evzvtx, Int_t parpid)
{
//This function is called only when applyefficiency=kTRUE; also ensure that "track" is present before calling that function
Int_t effVars[4];
if(parpid==unidentified)
{
- effVars[0] = effcorection[4]->GetAxis(0)->FindBin(cent);
- effVars[1] = effcorection[4]->GetAxis(1)->FindBin(evzvtx);
- effVars[2] = effcorection[4]->GetAxis(2)->FindBin(track->Pt());
- effVars[3] = effcorection[4]->GetAxis(3)->FindBin(track->Eta());
- effvalue=effcorection[4]->GetBinContent(effVars);
+ effVars[0] = effcorection[5]->GetAxis(0)->FindBin(cent);
+ effVars[1] = effcorection[5]->GetAxis(1)->FindBin(evzvtx);
+ effVars[2] = effcorection[5]->GetAxis(2)->FindBin(track->Pt());
+ effVars[3] = effcorection[5]->GetAxis(3)->FindBin(track->Eta());
+ effvalue=effcorection[5]->GetBinContent(effVars);
}
if(parpid==SpPion || parpid==SpKaon)
{
- if(mesoneffrequired)
+ if(fmesoneffrequired && !fkaonprotoneffrequired && track->Pt()>=fminPtComboeff && track->Pt()<=fmaxPtComboeff)
{
effVars[0] = effcorection[3]->GetAxis(0)->FindBin(cent);
effVars[1] = effcorection[3]->GetAxis(1)->FindBin(evzvtx);
effVars[2] = effcorection[2]->GetAxis(2)->FindBin(track->Pt());
effVars[3] = effcorection[2]->GetAxis(3)->FindBin(track->Eta());
effvalue=effcorection[2]->GetBinContent(effVars);
- }
+ }
+
+ if(fkaonprotoneffrequired && !fmesoneffrequired && track->Pt()>=fminPtComboeff && track->Pt()<=fmaxPtComboeff)
+ {
+ if(parpid==SpProton || parpid==SpKaon)
+ {
+ effVars[0] = effcorection[4]->GetAxis(0)->FindBin(cent);
+ effVars[1] = effcorection[4]->GetAxis(1)->FindBin(evzvtx);
+ effVars[2] = effcorection[4]->GetAxis(2)->FindBin(track->Pt());
+ effVars[3] = effcorection[4]->GetAxis(3)->FindBin(track->Eta());
+ effvalue=effcorection[4]->GetBinContent(effVars);
+ }
+ }
// Printf("%d %d %d %d %f", effVars[0], effVars[1], effVars[2], effVars[3], fEfficiencyCorrectionAssociated->GetBinContent(effVars));
if(effvalue==0.) effvalue=1.;
}
//-----------------------------------------------------------------------
-Int_t AliTwoParticlePIDCorr::ClassifyTrack(AliAODTrack* track,Bool_t onlyprimary,AliAODVertex* vertex,Float_t magfield)
+Int_t AliTwoParticlePIDCorr::ClassifyTrack(AliAODTrack* track,AliAODVertex* vertex,Float_t magfield)
{
if(!track) return 0;
Bool_t trackOK = track->TestFilterBit(fFilterBit);
if(!trackOK) return 0;
//select only primary traks(for data & reco MC tracks)
- if(onlyprimary && track->GetType()!=AliAODTrack::kPrimary) return 0;
+ if(fonlyprimarydatareco && track->GetType()!=AliAODTrack::kPrimary) return 0;
if(track->Charge()==0) return 0;
fHistQA[12]->Fill(track->GetTPCNcls());
Float_t dxy, dz;
return 0;
Double_t pos[2];
- Double_t covar[2];
+ Double_t covar[3];
AliAODTrack* clone =(AliAODTrack*) track->Clone();
Bool_t success = clone->PropagateToDCA(vertex, magfield, fdcacutvalue, pos, covar);
delete clone;
// else, return undefined
return SpUndefined;
}
- else {//asymmetric nsigma cut around pion's mean position for racks having Pt>4.0 Gev
- if(fminprotonsigmacut<fnsigmas[SpPion][NSigmaTPC]<fmaxprotonsigmacut) return SpProton;
- if(fminpionsigmacut<fnsigmas[SpPion][NSigmaTPC]<fmaxpionsigmacut) return SpPion;
+ else {//asymmetric nsigma cut around pion's mean position for tracks having Pt>4.0 Gev
+ if(fminprotonsigmacut<fnsigmas[SpPion][NSigmaTPC] && fnsigmas[SpPion][NSigmaTPC]<fmaxprotonsigmacut) return SpProton;
+ if(fminpionsigmacut<fnsigmas[SpPion][NSigmaTPC] && fnsigmas[SpPion][NSigmaTPC]<fmaxpionsigmacut) return SpPion;
// else, return undefined(here we don't detect kaons)
return SpUndefined;
}