AliPhysics  vAN-20150827 (3e81cbb)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
AddD2HTrain.C
Go to the documentation of this file.
1 Int_t AddD2HTrain(Bool_t readMC=kTRUE,
2  Int_t addQA=1,
3  Int_t addD0Mass=1,
4  Int_t addD0MassLS=1,
5  Int_t addDplus=1,
6  Int_t addLSD0=0,
7  Int_t addCFD0=0,
8  Int_t addPromptD0=1,
9  Int_t addDs=0,
10  Int_t addDStar=1,
11  Int_t addDStarJets=0,
12  Int_t addCFDStar=0) {
13  //
14  // Tasks of the D2H subgroup of PWGHF that can run in the Official Train
15  //
16  // They all use AOD+AOD.VertexingHF as input.
17  // They need to read the cuts from the macro
18  // $ALICE_PHYSICS/PWGHF/vertexingHF/ConfigVertexingHF.C (trunk version).
19  // This macro is loaded in the Init(), so it should be enough to have it
20  // in the local dir when the train is launched with the alien plugin.
21  // They all produce only histos in the output.
22  //
23  // andrea.dainese@pd.infn.it
24  //
25 
26  TString taskName="",loadMacroPath="$ALICE_PHYSICS/PWGHF/vertexingHF/macros/";
27  Int_t ntasks=0;
28 
29  //taskName="AddTaskCompareHF.C"; taskName.Prepend(loadMacroPath.Data());
30  //gROOT->LoadMacro(taskName.Data());
31  //AliAnalysisTaskSECompareHF *cmpTask = AddTaskCompareHF();
32 
33  if(addQA) {
34  taskName="AddTaskHFQA.C"; taskName.Prepend(loadMacroPath.Data());
35  gROOT->LoadMacro(taskName.Data());
37  ntasks++;
38  }
39 
40 
41  if(addD0Mass || addD0MassLS) {
42  taskName="AddTaskD0Mass.C"; taskName.Prepend(loadMacroPath.Data());
43  gROOT->LoadMacro(taskName.Data());
44  if(addD0Mass) {
45  AliAnalysisTaskSED0Mass *d0massTask = AddTaskD0Mass(0,readMC);
46  ntasks++;
47  }
48  if(addD0MassLS) {
49  AliAnalysisTaskSED0Mass *d0massLikeSignTask = AddTaskD0Mass(1,readMC);
50  ntasks++;
51  }
52  }
53 
54  if(addDplus) {
55  taskName="AddTaskDplus.C"; taskName.Prepend(loadMacroPath.Data());
56  gROOT->LoadMacro(taskName.Data());
57  AliAnalysisTaskSEDplus *dplusTask = AddTaskDplus(kFALSE,readMC);
58  ntasks++;
59  }
60 
61  //taskName="AddTaskSelectHF.C"; taskName.Prepend(loadMacroPath.Data());
62  //gROOT->LoadMacro(taskName.Data());
63  //AliAnalysisTaskSESelectHF *seleTask = AddTaskSelectHF();
64 
65  if(addLSD0 && readMC) {
66  taskName="AddTaskBkgLikeSignD0.C"; taskName.Prepend(loadMacroPath.Data());
67  gROOT->LoadMacro(taskName.Data());
69  ntasks++;
70  }
71 
72  if(addCFD0 && readMC) {
73  taskName="AddTaskCFMultiVarMultiStep.C"; taskName.Prepend(loadMacroPath.Data());
74  gROOT->LoadMacro(taskName.Data());
75  AliCFHeavyFlavourTaskMultiVarMultiStep *cfmvmsTask = AddTaskCFMultiVarMultiStep();
76  ntasks++;
77  }
78 
79  if(addPromptD0) {
80  taskName="AddTaskSECharmFraction.C";
81  taskName.Prepend(loadMacroPath.Data());
82  gROOT->LoadMacro(taskName.Data());
83  Int_t switchMC[5]={0,0,0,0,0};
84  Int_t ppPbPb=1;// 0 for pp, 1 for PbPb, used to siwtch on/off the removal of daughters from the primary vertex
85  AliAnalysisTaskSECharmFraction *cFractTask = AddTaskSECharmFraction("standard",switchMC,readMC,kTRUE,kFALSE,"D0toKpiCharmFractCuts.root","c",ppPbPb);
86  // arguments: filename,switchMC,readmc,usepid,likesign,cutfilename,containerprefix
87  ntasks++;
88  }
89 
90  if(addDs) {
91  taskName="AddTaskDs.C"; taskName.Prepend(loadMacroPath.Data());
92  gROOT->LoadMacro(taskName.Data());
93  AliAnalysisTaskSEDs *dsTask = AddTaskDs(readMC);
94  ntasks++;
95  }
96 
97  if(addDStar) {
98  taskName="AddTaskDStarSpectra.C"; taskName.Prepend(loadMacroPath.Data());
99  gROOT->LoadMacro(taskName.Data());
101  ntasks++;
102  }
103 
104  if(addDStarJets) {
105  taskName="AddTaskDStarJets.C"; taskName.Prepend(loadMacroPath.Data());
106  gROOT->LoadMacro(taskName.Data());
107  AliAnalysisTaskSEDStarJets *dstarjetsTask = AddTaskDStarJets(readMC);
108  ntasks++;
109  }
110 
111  if(addCFDStar && readMC) {
112  taskName="AddTaskCFDStar.C"; taskName.Prepend(loadMacroPath.Data());
113  gROOT->LoadMacro(taskName.Data());
114  AliCFTaskForDStarAnalysis *cfDstarTask = AddTaskCFDStar();
115  ntasks++;
116  }
117 
118 
119  return ntasks;
120 }
AliAnalysisTaskSED0Mass * AddTaskD0Mass(Int_t flag=0, Bool_t readMC=kFALSE, Bool_t filldistr=kFALSE, Bool_t cutOnDistr=kFALSE, Int_t system=0, Int_t flagD0D0bar=0, Float_t minC=0, Float_t maxC=0, TString finDirname="Loose", TString finname="", TString finObjname="D0toKpiCuts", Bool_t flagAOD049=kFALSE, Bool_t FillMassPt=false, Bool_t FillImpPar=false, Bool_t DrawDetSignal=false, Bool_t PIDCheck=false, Bool_t FillMassY=false)
Definition: AddTaskD0Mass.C:1
AliAnalysisTaskSEDs * AddTaskDs(Int_t system=0, Int_t storeNtuple=0, Bool_t readMC=kFALSE, TString filename="", TString postname="")
Definition: AddTaskDs.C:1
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
AliAnalysisTaskSEDStarJets * AddTaskDStarJets(Bool_t theMCon=kTRUE)
AliAnalysisTaskSECharmFraction * AddTaskSECharmFraction(TString fileout="d0D0.root", Int_t *switchMC=0x0, Int_t readmc=0, Bool_t usepid=kTRUE, Bool_t likesign=kFALSE, TString cutfile="D0toKpiCharmFractCuts.root", TString containerprefix="c", Int_t ppPbPb=0, Int_t analysLevel=2, Float_t minC=0., Float_t maxC=7.5, Float_t minCloose=20., Float_t maxCloose=50., Bool_t useWeight=kFALSE, Bool_t checkBitD0=kTRUE)
AliCFHeavyFlavourTaskMultiVarMultiStep * AddTaskCFMultiVarMultiStep(const char *cutFile="./D0toKpiCuts.root", Bool_t isKeepD0fromB=kFALSE, Bool_t isKeepD0fromBOnly=kFALSE, Int_t pdgCode=421, Char_t isSign=2)
AliAnalysisTaskSEBkgLikeSignD0 * AddTaskBkgLikeSignD0()
AliAnalysisTaskSEHFQA * AddTaskHFQA(AliAnalysisTaskSEHFQA::DecChannel ch, TString filecutsname="", Bool_t readMC=kFALSE, Bool_t simplemode=kFALSE, Int_t system=1, TString finDirname="", Bool_t trackon=kTRUE, Bool_t pidon=kTRUE, Bool_t centralityon=kTRUE, Bool_t eventselon=kTRUE, Bool_t flowobson=kFALSE, Bool_t filldistribforeffcheckson=kFALSE)
Definition: AddTaskHFQA.C:1
AliAnalysisTaskSEDplus * AddTaskDplus(Int_t system=0, Float_t minC=0, Float_t maxC=100, Bool_t storeNtuple=kFALSE, Bool_t doSparse=kFALSE, Bool_t readMC=kFALSE, TString finDirname="Loose", TString filename="", TString finAnObjname="AnalysisCuts", Int_t etaRange=0, Bool_t cutsDistr=kFALSE)
Definition: AddTaskDplus.C:1
AliAnalysisTaskSEDStarSpectra * AddTaskDStarSpectra(Int_t system=0, Float_t minC=0, Float_t maxC=100, TString cutsfile="", TString usercomment="username", Bool_t theMCon=kFALSE, Bool_t doDStarVsY=kFALSE)
AliCFTaskForDStarAnalysis * AddTaskCFDStar()