fOutputList->Add(fTPCsignalPmc);
}
- fTOFtime=new TH2F("fTOFtime",";p[GeV/c];#time",kPBins,binsPDummy,1000, 0.4, 1.1);//
+ fTOFtime=new TH2F("fTOFtime",";p[GeV/c];#time",kPBins,binsPDummy,1000, 12000, 80000);//
fOutputList->Add(fTOFtime);
- fTOFtimeE=new TH2F("fTOFtimeE",";p [GeV/c];#time-#time_{#pi}",kPBins,binsPDummy,500, -0.25, 0.25);//
- fTOFtimePi=new TH2F("fTOFtimePi",";p [GeV/c];#time-#time_{#pi}",kPBins,binsPDummy,500, -0.25, 0.25);//
- fTOFtimeK=new TH2F("fTOFtimeK",";p [GeV/c];#time-#time_{K}",kPBins,binsPDummy,500, -0.25, 0.25);//
- fTOFtimeP=new TH2F("fTOFtimeP",";p [GeV/c];#time-#time_{p}",kPBins,binsPDummy,500, -0.25, 0.25);//
+ fTOFtime=new TH2F("fTOFtime",";p[GeV/c];#time",kPBins,binsPDummy,1000, 12000, 80000);//
+ fOutputList->Add(fTOFtime);
+ fTOFtimeE=new TH2F("fTOFtimeE",";p [GeV/c];#time-#time_{#pi}",kPBins,binsPDummy,500, -8000, 8000);//
+ fTOFtimePi=new TH2F("fTOFtimePi",";p [GeV/c];#time-#time_{#pi}",kPBins,binsPDummy,500, -8000, 8000);//
+ fTOFtimeK=new TH2F("fTOFtimeK",";p [GeV/c];#time-#time_{K}",kPBins,binsPDummy,500, -8000, 8000);//
+ fTOFtimeP=new TH2F("fTOFtimeP",";p [GeV/c];#time-#time_{p}",kPBins,binsPDummy,500, -8000, 8000);//
//fOutputList->Add(fTOFtimeE);
//fOutputList->Add(fTOFtimePi);
//fOutputList->Add(fTOFtimeK);
fCutsTOFProtons->SetPID(AliPID::kProton, AliFlowTrackCuts::kTOFbeta);
fCutsTOFProtons->SetQA();
fCutsTPCElectrons = new AliFlowTrackCuts("tpc electron cuts");
- fCutsTPCElectrons->SetPID(AliPID::kElectron, AliFlowTrackCuts::kTPCdedx);
+ fCutsTPCElectrons->SetPID(AliPID::kElectron, AliFlowTrackCuts::kTPCpid);
fCutsTPCElectrons->SetQA();
fCutsTPCPions = new AliFlowTrackCuts("tpc pion cuts");
- fCutsTPCPions->SetPID(AliPID::kPion, AliFlowTrackCuts::kTPCdedx);
+ fCutsTPCPions->SetPID(AliPID::kPion, AliFlowTrackCuts::kTPCpid);
fCutsTPCPions->SetQA();
fCutsTPCKaons = new AliFlowTrackCuts("tpc kaon cuts");
- fCutsTPCKaons->SetPID(AliPID::kKaon, AliFlowTrackCuts::kTPCdedx);
+ fCutsTPCKaons->SetPID(AliPID::kKaon, AliFlowTrackCuts::kTPCpid);
fCutsTPCKaons->SetQA();
fCutsTPCProtons = new AliFlowTrackCuts("tpc proton cuts");
- fCutsTPCProtons->SetPID(AliPID::kProton, AliFlowTrackCuts::kTPCdedx);
+ fCutsTPCProtons->SetPID(AliPID::kProton, AliFlowTrackCuts::kTPCpid);
fCutsTPCProtons->SetQA();
//fOutputList->Add(fESDpid);
- fOutputList->Add(fCutsTPCElectrons);
- fOutputList->Add(fCutsTPCPions);
- fOutputList->Add(fCutsTPCKaons);
- fOutputList->Add(fCutsTPCProtons);
- fOutputList->Add(fCutsTOFElectrons);
- fOutputList->Add(fCutsTOFPions);
- fOutputList->Add(fCutsTOFKaons);
- fOutputList->Add(fCutsTOFProtons);
+ fOutputList->Add(fCutsTPCElectrons->GetQA());
+ fOutputList->Add(fCutsTPCPions->GetQA());
+ fOutputList->Add(fCutsTPCKaons->GetQA());
+ fOutputList->Add(fCutsTPCProtons->GetQA());
+ fOutputList->Add(fCutsTOFElectrons->GetQA());
+ fOutputList->Add(fCutsTOFPions->GetQA());
+ fOutputList->Add(fCutsTOFKaons->GetQA());
+ fOutputList->Add(fCutsTOFProtons->GetQA());
if (fUseDebugFile) fFile = fopen("debug.txt","w");
(track->GetStatus() & AliESDtrack::kTOFpid) &&
(track->GetTOFsignal() > 12000) &&
(track->GetTOFsignal() < 100000) &&
- (track->GetIntegratedLength() > 365) &&
- !(track->GetStatus() & AliESDtrack::kTOFmismatch);
-
+ (track->GetIntegratedLength() > 365);
+
if (!goodtrack) return;
const AliExternalTrackParam* innerParam = track->GetInnerParam();
Double_t integratedTimes[5] = {-1.0,-1.0,-1.0,-1.0,-1.0};
track->GetIntegratedTimes(integratedTimes);
+ Double_t tpcpid[AliPID::kSPECIES];
+ track->GetTPCpid(tpcpid);
+
+ if (track->GetStatus() & AliESDtrack::kTOFmismatch) return;
+
+
//beta
Float_t beta = l/timeTOF/c;
Float_t betaHypothesis[5] = {0.0,0.0,0.0,0.0,0.0};
}
//responses
+ fTOFtime->Fill(p,timeTOF);
+
fTOFbeta->Fill(p,beta);
fTOFbetaE->Fill(p,betadiff[0]);
fTOFbetaPi->Fill(p,betadiff[2]);
fTOFyieldSelEmcP->Fill(pt);
}
}
+ printf("electron: pt: %.1f | %.1f, %.1f, %.1f, %.1f, %.1f\n",pt,tpcpid[0],tpcpid[1],tpcpid[2],tpcpid[3],tpcpid[4]);
}
if (fCutsTOFPions->IsSelected(track))
{
fTOFyieldSelPimcP->Fill(pt);
}
}
+ printf("pion : pt: %.1f | %.1f, %.1f, %.1f, %.1f, %.1f\n",pt,tpcpid[0],tpcpid[1],tpcpid[2],tpcpid[3],tpcpid[4]);
}
if (fCutsTOFKaons->IsSelected(track))
{
fTOFyieldSelKmcP->Fill(pt);
}
}
+ printf("kaon : pt: %.1f | %.1f, %.1f, %.1f, %.1f, %.1f\n",pt,tpcpid[0],tpcpid[1],tpcpid[2],tpcpid[3],tpcpid[4]);
}
if (fCutsTOFProtons->IsSelected(track))
{
fTOFyieldSelPmcP->Fill(pt);
}
}
+ printf("proton : pt: %.1f | %.1f, %.1f, %.1f, %.1f, %.1f\n",pt,tpcpid[0],tpcpid[1],tpcpid[2],tpcpid[3],tpcpid[4]);
}
}
fAliESDtrackCuts(NULL),
fQA(NULL),
fCutMC(kFALSE),
+ fCutMChasTrackReferences(kFALSE),
fCutMCprocessType(kFALSE),
fMCprocessType(kPNoProcess),
fCutMCPID(kFALSE),
fAliESDtrackCuts(NULL),
fQA(NULL),
fCutMC(kFALSE),
+ fCutMChasTrackReferences(kFALSE),
fCutMCprocessType(kFALSE),
fMCprocessType(kPNoProcess),
fCutMCPID(kFALSE),
fAliESDtrackCuts(NULL),
fQA(NULL),
fCutMC(that.fCutMC),
+ fCutMChasTrackReferences(that.fCutMChasTrackReferences),
fCutMCprocessType(that.fCutMCprocessType),
fMCprocessType(that.fMCprocessType),
fCutMCPID(that.fCutMCPID),
//these guys we don't need to copy, just reinit
if (that.fQA) {fQA->Delete(); delete fQA; fQA=NULL; DefineHistograms();}
fCutMC=that.fCutMC;
+ fCutMChasTrackReferences=that.fCutMChasTrackReferences;
fCutMCprocessType=that.fCutMCprocessType;
fMCprocessType=that.fMCprocessType;
fCutMCPID=that.fCutMCPID;
Int_t processID = particle->GetUniqueID();
if (processID != fMCprocessType ) return kFALSE;
}
+ if (fCutMChasTrackReferences)
+ {
+ if (mcparticle->GetNumberOfTrackReferences()<1) return kFALSE;
+ }
return kTRUE;
}
Bool_t pass=kTRUE;
//check the common cuts for the current particle fTrack (MC,AOD,ESD)
Double_t pt = fTrack->Pt();
+ Double_t p = fTrack->P();
if (!fFakesAreOK) {if (fTrackLabel<0) pass=kFALSE;}
if (fCutPt) {if (pt < fPtMin || pt >= fPtMax ) pass=kFALSE;}
if (fCutEta) {if (fTrack->Eta() < fEtaMin || fTrack->Eta() >= fEtaMax ) pass=kFALSE;}
if (esdTrack) { if (!PassesESDcuts(esdTrack)) { pass=kFALSE; } }
if (aodTrack) { if (!PassesAODcuts(aodTrack)) { pass=kFALSE; } }
+ if (fQA)
+ {
+ Float_t pdg = 0;
+ Int_t pdgcode = fMCparticle->PdgCode();
+ switch (TMath::Abs(pdgcode))
+ {
+ case 11:
+ pdg = AliPID::kElectron + 0.5; break;
+ case 13:
+ pdg = AliPID::kMuon + 0.5; break;
+ case 211:
+ pdg = AliPID::kPion + 0.5; break;
+ case 321:
+ pdg = AliPID::kKaon + 0.5; break;
+ case 2212:
+ pdg = AliPID::kProton + 0.5; break;
+ default:
+ pdg = AliPID::kUnknown + 0.5; break;
+ }
+ pdg = TMath::Sign(pdg,static_cast<Float_t>(pdgcode));
+ if (fMCparticle) QAbefore(2)->Fill(p,pdg);
+ if (fMCparticle) QAbefore(3)->Fill(p,IsPhysicalPrimary()?0.5:-0.5);
+ if (fMCparticle && pass) QAafter(2)->Fill(p,pdg);
+ if (fMCparticle && pass) QAafter(3)->Fill(p,IsPhysicalPrimary()?0.5:-0.5);
+ }
+
//true by default, if we didn't set any cuts
return pass;
}
after->SetName("after");
fQA->Add(before);
fQA->Add(after);
- before->Add(new TH2F("TOFbeta",";p [GeV/c];#beta",kNbinsP,binsP,1000,0.4,1.1));
- after->Add(new TH2F("TOFbeta",";p [GeV/c];#beta",kNbinsP,binsP,1000,0.4,1.1));
- before->Add(new TH2F("TPCdedx",";p [GeV/c];dEdx",kNbinsP,binsP,500,0,500));
- after->Add(new TH2F("TPCdedx",";p [GeV/c];dEdx",kNbinsP,binsP,500,0,500));
+ before->Add(new TH2F("TOFbeta",";p [GeV/c];#beta",kNbinsP,binsP,1000,0.4,1.1)); //0
+ after->Add(new TH2F("TOFbeta",";p [GeV/c];#beta",kNbinsP,binsP,1000,0.4,1.1)); //0
+ before->Add(new TH2F("TPCdedx",";p [GeV/c];dEdx",kNbinsP,binsP,500,0,500)); //1
+ after->Add(new TH2F("TPCdedx",";p [GeV/c];dEdx",kNbinsP,binsP,500,0,500)); //1
+ before->Add(new TH2F("MC pid",";p[GeV/c];species",kNbinsP,binsP,10,-5, 5)); //2
+ after->Add(new TH2F("MC pid",";p[GeV/c];species",kNbinsP,binsP,10,-5, 5)); //2
+ before->Add(new TH2F("MC primary",";p[GeV/c];primary",kNbinsP,binsP,2,-1,1)); //3
+ after->Add(new TH2F("MC primary",";p[GeV/c];primary",kNbinsP,binsP,2,-1,1)); //3
TH1::AddDirectory(adddirstatus);
}
}
return number;
}
+
//MC stuff
void SetIgnoreSignInMCPID( Bool_t b ) {fIgnoreSignInMCPID=b;}
void SetCutMC( Bool_t b=kTRUE );
+ void SetCutMChasTrackReferences(Bool_t b=kTRUE) {fCutMChasTrackReferences=b;}
void SetMCprocessType( TMCProcess t ) { fMCprocessType = t; fCutMCprocessType=kTRUE; SetCutMC();}
void SetMCisPrimary( Bool_t b ) { fMCisPrimary=b; fCutMCisPrimary=kTRUE; SetCutMC();}
void SetMCPID( Int_t pid ) { fMCPID=pid; fCutMCPID=kTRUE; SetCutMC(); }
AliESDtrackCuts* fAliESDtrackCuts; //alianalysis cuts
TList* fQA; //qa histograms go here
Bool_t fCutMC; //do we cut on MC?
+ Bool_t fCutMChasTrackReferences; //did we leave a trace in the detector?
Bool_t fCutMCprocessType; //do we cut on mc process type?
TMCProcess fMCprocessType; //mc process type
Bool_t fCutMCPID; //cut on MC pid?
static const Int_t fgkNumberOfV0tracks=64; //number of V0 channels
- ClassDef(AliFlowTrackCuts,7)
+ ClassDef(AliFlowTrackCuts,8)
};
#endif
AliFlowTrackCuts::PIDsource sourcePID = AliFlowTrackCuts::kTOFpid,
Int_t charge=0,
Int_t harmonic=2,
- Bool_t doQA=kFALSE )
+ Bool_t doQA=kFALSE,
+ TString uniqueStr="" )
{
// Define the range for eta subevents (for SP method)
Double_t minA = -0.9;
cutsPOI->SetQA(doQA);
TString outputSlotName("");
+ outputSlotName+=uniqueStr;
outputSlotName+=Form("V%i ",harmonic);
outputSlotName+=cutsRP->GetName();
outputSlotName+=" ";
if (taskFE->GetQAOn())
{
+ TString outputQA = fileName;
+ outputQA += ":QA";
AliAnalysisDataContainer* coutputFEQA =
- mgr->CreateContainer(Form("QA %s",outputSlotName.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,Form("%s:QA",fileName));
+ mgr->CreateContainer(Form("QA %s",outputSlotName.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,outputQA);
mgr->ConnectOutput(taskFE,2,coutputFEQA);
}
Bool_t useFlowParFiles = kTRUE,
Bool_t DATA = kTRUE,
//const Char_t* dataDir="/data/alice2/ab/grid/21-16/TEST/data/",
- const Char_t* dataDir="/data/alice2/mikolaj/flowPaper/data/137161/",
+ const Char_t* dataDir="fileList",
Int_t nEvents = 1e4,
Int_t offset=0 )
{
//Add the centrality determination task
gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskCentrality.C");
- AddTaskCentrality();
+ AliCentralitySelectionTask* centSelTask = AddTaskCentrality();
+ if (!DATA) centSelTask->SetMCInput();
+
//Add the TOF tender
gROOT->LoadMacro("$ALICE_ROOT/PWG2/FLOW/macros/AddTaskTenderTOF.C");
//Add the centrality determination task
gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskCentrality.C");
- AddTaskCentrality();
+ AliCentralitySelectionTask* centSelTask = AddTaskCentrality();
+ if (!DATA) centSelTask->SetMCInput();
+
if (useTender)
{