kgeantflukaKaon=0x2,
kgeantflukaProton=0x4,
knormalizationtoeventspassingPhySel=0x8,
- kveretxcorrectionandbadchunkscorr=0x10
+ kveretxcorrectionandbadchunkscorr=0x10,
+ kmcisusedasdata=0x20
};
-Bool_t OpenFile(TString dirname, TString outputname, Bool_t mcflag);
+Bool_t OpenFile(TString dirname, TString outputname, Bool_t mcflag,Bool_t mcasdata=false);
void AnalysisBoth (UInt_t options=0xF,TString outdate, TString outnamedata, TString outnamemc="" )
{
TH1::AddDirectory(kFALSE);
OpenFile(indirname,outnamemc,true);
- OpenFile(indirname,outnamedata,false);
+ OpenFile(indirname,outnamedata,false,((Bool_t)(options&kmcisusedasdata)));
if(!managermc||!managerdata)
{
cout<<managermc<<" "<<managerdata<<endl;
}
-Bool_t OpenFile(TString dirname,TString outputname, Bool_t mcflag)
+Bool_t OpenFile(TString dirname,TString outputname, Bool_t mcflag, Bool_t mcasdata)
{
+
TString nameFile = Form("./%s/AnalysisResults%s.root",dirname.Data(),(mcflag?"MC":"DATA"));
TFile *file = TFile::Open(nameFile.Data());
return false;
}
TString sname=Form("OutputBothSpectraTask_%s_%s",(mcflag?"MC":"Data"),outputname.Data());
+ if(mcasdata)
+ {
+ cout<<"using MC as data "<<endl;
+ sname=Form("OutputBothSpectraTask_%s_%s","MC",outputname.Data());
+ }
file->ls();
TDirectoryFile *dir=(TDirectoryFile*)file->Get(sname.Data());
if(!dir)
{
- // cout<<"no dir "<<sname.Data()<<endl;
- sname=Form("OutputAODSpectraTask_%s_%s",(mcflag?"MC":"Data"),outputname.Data());
+ // cout<<"no dir "<<sname.Data()<<endl; if(mcasdata)
+ {
+ cout<<"using MC as data "<<endl;
+ sname=Form("OutputAODSpectraTask_%s_%s","MC",outputname.Data());
+ }
+ else
+ sname=Form("OutputAODSpectraTask_%s_%s",(mcflag?"MC":"Data"),outputname.Data());
// cout<<"trying "<<sname.Data()<<endl;
dir=(TDirectoryFile*)file->Get(sname.Data());
if(!dir)
gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPIDResponse.C");
AliAnalysisTaskPIDResponse *taskPID=AddTaskPIDResponse(mcfactor,kTRUE,kFALSE,2,kFALSE,"",kTRUE);
-
-
+taskPID->SetUseTPCEtaCorrection(kTRUE);
if(!aod)
{
gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPhysicsSelection.C");
AliAnalysisTaskSpectraBoth* task2=0x0;
AliAnalysisTaskSpectraBoth* task3=0x0;
AliAnalysisTaskSpectraBoth* task4=0x0;
- AliAnalysisTaskSpectraBoth* task5=0x0;
- AliAnalysisTaskSpectraBoth* task6=0x0;
task1=AddTaskSpectraBoth(mcfactor,-1,-1,-1,-1,-0.8,0.8,Nsigmapid,pt,p,-0.5,0.5,ptTofMatch,trkbit,trkbitQVector,UseCentPatchAOD049,DCA,minNclsTPC,rebinfactor,"V0M",2);
- task2=AddTaskSpectraBoth(mcfactor,-1,-1,-1,-1,-0.8,0.8,Nsigmapid,pt,p,0.465,0.965,ptTofMatch,trkbit,trkbitQVector,UseCentPatchAOD049,DCA,minNclsTPC,rebinfactor,"V0M",2);
+ task2=AddTaskSpectraBoth(mcfactor,-1,-1,-1,-1,-0.8,0.8,Nsigmapid,pt,p,-0.465,0.035,ptTofMatch,trkbit,trkbitQVector,UseCentPatchAOD049,DCA,minNclsTPC,rebinfactor,"V0M",2);
- task3=AddTaskSpectraBoth(mcfactor,-1,-1,-1,-1,-0.8,0.8,Nsigmapid,pt,p,0.265,0.665,ptTofMatch,trkbit,trkbitQVector,UseCentPatchAOD049,DCA,minNclsTPC,rebinfactor,"V0M",2);
+ task3=AddTaskSpectraBoth(mcfactor,-1,-1,-1,-1,-0.8,0.8,2.0,pt,p,-0.465,0.035,ptTofMatch,trkbit,trkbitQVector,UseCentPatchAOD049,DCA,minNclsTPC,rebinfactor,"V0M",2);
- task4=AddTaskSpectraBoth(mcfactor,-1,-1,-1,-1,-0.8,0.8,Nsigmapid,pt,p,-0.5,0.5,ptTofMatch,trkbit2,trkbitQVector,UseCentPatchAOD049,DCA,minNclsTPC2,rebinfactor,"V0M",2);
+ task4=AddTaskSpectraBoth(mcfactor,-1,-1,-1,-1,-0.8,0.8,Nsigmapid,pt,p,-0.465,0.035,ptTofMatch,trkbit2,trkbitQVector,UseCentPatchAOD049,DCA,minNclsTPC2,rebinfactor,"V0M",2);
- task5=AddTaskSpectraBoth(mcfactor,-1,-1,-1,-1,-0.8,0.8,Nsigmapid,pt,p,0.465,0.965,ptTofMatch,trkbit2,trkbitQVector,UseCentPatchAOD049,DCA,minNclsTPC2,rebinfactor,"V0M",2);
- task6=AddTaskSpectraBoth(mcfactor,-1,-1,-1,-1,-0.8,0.8,Nsigmapid,pt,p,0.265,0.665,ptTofMatch,trkbit2,trkbitQVector,UseCentPatchAOD049,DCA,minNclsTPC2,rebinfactor,"V0M",2);
if(mc)
task2->SetdotheMCLoopAfterEventCuts(kTRUE);
task3->SetdotheMCLoopAfterEventCuts(kTRUE);
task4->SetdotheMCLoopAfterEventCuts(kTRUE);
- task5->SetdotheMCLoopAfterEventCuts(kTRUE);
- task6->SetdotheMCLoopAfterEventCuts(kTRUE);
}
task2->GetEventCuts()->SetTriggerSettings(AliVEvent::kINT7);
task3->GetEventCuts()->SetTriggerSettings(AliVEvent::kINT7);
task4->GetEventCuts()->SetTriggerSettings(AliVEvent::kINT7);
- task5->GetEventCuts()->SetTriggerSettings(AliVEvent::kINT7);
- task6->GetEventCuts()->SetTriggerSettings(AliVEvent::kINT7);
}