AliPhysics  41af4b0 (41af4b0)
AddTaskVertexingHFFilter.C
Go to the documentation of this file.
1 AliAnalysisTaskSEVertexingHF *AddTaskVertexingHFFilter(Int_t collisionSystem, TString configPWGHFd2h="$ALICE_PHYSICS/PWGHF/vertexingHF/ConfigVertexingHF_pPbRHF.C", TString localdir="", Int_t runnumber=-1, TString strPeriod="", const char* fname="AliAOD.VertexingHF.root", Bool_t registerFile=kTRUE, Int_t addD2Htrain=0)
2 {
3 
4  // Get the pointer to the existing analysis manager via the static access method.
5  //==============================================================================
6  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
7  if (!mgr) {
8  ::Error("AddTaskVertexingHFFilter", "No analysis manager to connect to.");
9  return NULL;
10  }
11 
12 
13  gROOT->LoadMacro("$ALICE_PHYSICS/PWGHF/vertexingHF/macros/AddTaskVertexingHF.C");
14  // TFile::Cp(gSystem->ExpandPathName(configPWGHFd2h.Data()), Form("%s/ConfigVertexingHF.C", train_name.Data()));
15  // TFile::Cp(gSystem->ExpandPathName(configPWGHFd2h.Data()), Form("ConfigVertexingHF.C"));
16  // TFile::Cp(gSystem->ExpandPathName(configPWGHFd2h.Data()), Form("%s/ConfigVertexingHF.C", localdir.Data()));
17 
18  AliAnalysisTaskSEVertexingHF *taskvertexingHF = AddTaskVertexingHF(collisionSystem,localdir,configPWGHFd2h,runnumber,strPeriod,fname);
19  // Now we need to keep in sync with the ESD filter
20  if (!taskvertexingHF) ::Warning("AddTaskVertexingHFFilter", "AliAnalysisTaskSEVertexingHF cannot run for this train conditions - EXCLUDED");
21 
22  if(registerFile) mgr->RegisterExtraFile("AliAOD.VertexingHF.root");
23  taskvertexingHF->SelectCollisionCandidates(0);
24 
25  mgr->AddTask(taskvertexingHF);
26 
27 
28  if(addD2Htrain>0){
29  gROOT->LoadMacro("$ALICE_PHYSICS/PWGHF/vertexingHF/AddD2HTrain.C");
30  Int_t nwagons=0;
31 
32  if(addD2Htrain==1){
33  ::Warning("AddD2HTrain.C","Runing without MC flag");
34  nwagons = AddD2HTrain(kFALSE,1,1,0,1,0,0,0,0,1,0,0);
35  }
36  else if(addD2Htrain==2){
37  ::Warning("AddD2HTrain.C","Runing with MC flag");
38  nwagons = AddD2HTrain(kTRUE,1,1,0,1,0,0,0,0,1,0,0);
39  }
40  }
41 
42  return taskvertexingHF;
43 }
AliAnalysisTaskSEVertexingHF * AddTaskVertexingHF(Int_t collisionSystem, TString localdir="", TString configfilename="", Int_t runnumber=-1, TString strPeriod="", const char *fname="AliAOD.VertexingHF.root")
Int_t AddD2HTrain(Bool_t readMC=kTRUE, Int_t addQA=1, Int_t addD0Mass=1, Int_t addD0MassLS=1, Int_t addDplus=1, Int_t addLSD0=0, Int_t addCFD0=0, Int_t addPromptD0=1, Int_t addDs=0, Int_t addDStar=1, Int_t addDStarJets=0, Int_t addCFDStar=0)
Definition: AddD2HTrain.C:1
int Int_t
Definition: External.C:63
AliAnalysisTaskSEVertexingHF * AddTaskVertexingHFFilter(Int_t collisionSystem, TString configPWGHFd2h="$ALICE_PHYSICS/PWGHF/vertexingHF/ConfigVertexingHF_pPbRHF.C", TString localdir="", Int_t runnumber=-1, TString strPeriod="", const char *fname="AliAOD.VertexingHF.root", Bool_t registerFile=kTRUE, Int_t addD2Htrain=0)
bool Bool_t
Definition: External.C:53