Added flags for each task
[u/mrichter/AliRoot.git] / PWG3 / vertexingHF / AddD2HTrain.C
CommitLineData
a13d770c 1Int_t AddD2HTrain(Int_t addD0Mass=1,
2 Int_t addD0MassLS=1,
3 Int_t addDplus=1,
4 Int_t addLSD0=1,
5 Int_t addLSJpsi=1,
6 Int_t addCFD0=1,
7 Int_t addPromptD0=1) {
f614449f 8 //
9 // Task of the D2H subgroup of PWG3 that can run in the Official Train
10 //
11 // They all use AOD+AOD.VertexingHF as input.
12 // They need to read the cuts from the macro
13 // $ALICE_ROOT/PWG3/vertexingHF/ConfigVertexingHF.C (trunk version).
14 // This macro is loaded in the Init(), so it should be enough to have it
15 // in the local dir when the train is launched with the alien plugin.
16 // They all produce only histos in the output.
17 //
18 // andrea.dainese@pd.infn.it
19 //
20
21 TString taskName="",loadMacroPath="$ALICE_ROOT/PWG3/vertexingHF/";
a13d770c 22 Int_t ntasks=0;
23
f614449f 24 //taskName="AddTaskCompareHF.C"; taskName.Prepend(loadMacroPath.Data());
25 //gROOT->LoadMacro(taskName.Data());
26 //AliAnalysisTaskSECompareHF *cmpTask = AddTaskCompareHF();
27
a13d770c 28 if(addD0Mass || addD0MassLS) {
29 taskName="AddTaskD0Mass.C"; taskName.Prepend(loadMacroPath.Data());
30 gROOT->LoadMacro(taskName.Data());
31 if(addD0Mass) {
32 AliAnalysisTaskSED0Mass *d0massTask = AddTaskD0Mass();
33 ntasks++;
34 }
35 if(addD0MassLS) {
36 AliAnalysisTaskSED0Mass *d0massLikeSignTask = AddTaskD0Mass(1);
37 ntasks++;
38 }
39 }
40
41 if(addDplus) {
42 taskName="AddTaskDplus.C"; taskName.Prepend(loadMacroPath.Data());
43 gROOT->LoadMacro(taskName.Data());
44 AliAnalysisTaskSEDplus *dplusTask = AddTaskDplus();
45 ntasks++;
46 }
47
f614449f 48 //taskName="AddTaskSelectHF.C"; taskName.Prepend(loadMacroPath.Data());
49 //gROOT->LoadMacro(taskName.Data());
50 //AliAnalysisTaskSESelectHF *seleTask = AddTaskSelectHF();
51
a13d770c 52 if(addLSD0) {
53 taskName="AddTaskBkgLikeSignD0.C"; taskName.Prepend(loadMacroPath.Data());
54 gROOT->LoadMacro(taskName.Data());
55 AliAnalysisTaskSEBkgLikeSignD0 *lsD0Task = AddTaskBkgLikeSignD0();
56 ntasks++;
57 }
58
59 if(addLSJpsi) {
60 taskName="AddTaskBkgLikeSignJPSI.C"; taskName.Prepend(loadMacroPath.Data());
61 gROOT->LoadMacro(taskName.Data());
62 AliAnalysisTaskSEBkgLikeSignJPSI *lsJPSITask = AddTaskBkgLikeSignJPSI();
63 ntasks++;
64 }
65
f614449f 66 //taskName="AddTaskBtoJPSItoEle.C"; taskName.Prepend(loadMacroPath.Data());
67 //gROOT->LoadMacro(taskName.Data());
68 //AliAnalysisTaskSEBtoJPSItoEle *jpsiTask = AddTaskBtoJPSItoEle();
69
a13d770c 70 if(addCFD0) {
71 taskName="AddTaskCFMultiVarMultiStep.C"; taskName.Prepend(loadMacroPath.Data());
72 gROOT->LoadMacro(taskName.Data());
73 AliCFHeavyFlavourTaskMultiVarMultiStep *cfmvmsTask = AddTaskCFMultiVarMultiStep();
74 ntasks++;
75 }
76
77 if(addPromptD0) {
78 taskName="AddTaskCharmFraction.C"; taskName.Prepend(loadMacroPath.Data());
79 gROOT->LoadMacro(taskName.Data());
80 Int_t switchMC[5]={1,1,1,1,1};
81 AliAnalysisTaskSECharmFraction *cFractTask = AddTaskCharmFraction("d0D0.root",switchMC);
82 ntasks++;
83 }
f614449f 84
a13d770c 85 return ntasks;
f614449f 86}