34 fOptions.
Add(
"trig",
"TYPE",
"Trigger type",
"INEL");
35 fOptions.
Add(
"trigEff",
"EFFICIENCY",
"Trigger efficiency", 1.);
36 fOptions.
Add(
"filter",
"TYPE",
"Filter type",
"OUTLIER|PILEUP-BIN");
37 fOptions.
Add(
"cent",
"ESTIMATOR",
"Use centrality",
"none");
38 fOptions.
Add(
"cent-bins",
"BINS",
"Centrality bins",
"default");
39 fOptions.
Add(
"abs-min-cent",
"PERCENT",
"Absolute least centrality", -1.);
40 fOptions.
Add(
"ipz-bins",
"BINS",
"IPz bins",
"u15");
41 fOptions.
Add(
"eta-bins",
"BINS",
"Eta bins",
"r16:-2:+2");
43 fOptions.
Add(
"mc",
"Also make dN/deta for MC truth",
false);
45 fOptions.
Add(
"max-delta",
"X",
"Cut on weighted distance",25.);
46 fOptions.
Add(
"tail-delta",
"X",
"Tail cut on distance", 5.);
47 fOptions.
Add(
"tail-max",
"X",
"Tail cut on distance", -1.);
48 fOptions.
Add(
"delta-cut",
"X",
"Cut on weighted distance",1.5);
49 fOptions.
Add(
"dphi-shift",
"RADIANS",
"Bending shift", 0.0045);
50 fOptions.
Add(
"shifted-dphi-cut",
"RADIANS",
"Cut on dPhi-phiBent", -1.);
51 fOptions.
Add(
"reweigh",
"FILE",
"File with weights",
"");
52 fOptions.
Add(
"reweigh-calc",
"MODE",
"prod,square,sum",
"prod");
53 fOptions.
Add(
"reweigh-mask",
"MASK",
"Tracklet mask for weighing", 0xFF);
54 fOptions.
Add(
"reweigh-veto",
"VETO",
"Tracklet veto for weighing", 0x0);
66 AliAnalysisManager::SetCommonFileName(
"tracklet_dndeta.root");
68 if (
fwd.IsNull())
fwd =
"$ALICE_PHYSICS/PWGLF/FORWARD/analysis2";
69 gROOT->SetMacroPath(Form(
"%s:%s/dndeta/tracklets3",
70 gROOT->GetMacroPath(),
fwd.Data()));
71 gSystem->AddIncludePath(Form(
"-I%s/dndeta/tracklets3",
fwd.Data()));
73 Info(
"CreateTasks",
"Loading code");
85 gROOT->ProcessLine(Form(
"AliTrackletAODdNdeta::Create(%d,\"%s\")",mc,
92 UInt_t sel = AliVEvent::kINT7;
93 UInt_t mb = AliVEvent::kINT1;
94 if (trg.EqualTo(
"MB")) sel = mb;
95 else if (trg.EqualTo(
"MBOR")) sel = mb;
96 else if (trg.EqualTo(
"INEL")) sel = mb;
97 else if (trg.EqualTo(
"INELGT0")) sel = mb;
98 else if (trg.EqualTo(
"V0AND")) sel = AliVEvent::kINT7;
99 else if (trg.EqualTo(
"NSD")) sel = AliVEvent::kINT7;
100 else if (trg.EqualTo(
"V0OR")) sel = AliVEvent::kCINT5;
101 else if (trg.EqualTo(
"ANY")) sel = AliVEvent::kAny;
102 else if (trg.EqualTo(
"NONE")) sel = 0;
103 task->SelectCollisionCandidates(sel);
104 Int_t minTrk = trg.EqualTo(
"INELGT0") ? 1 : 0;
109 if (calc.BeginsWith(
"PROD")) mcal = 0;
110 else if (calc.BeginsWith(
"SQ")) mcal = 1;
111 else if (calc.BeginsWith(
"SUM")) mcal = 2;
112 else if (calc.BeginsWith(
"AV")) mcal = 3;
115 const char* defCent =
"0-5-10-20-30-40-50-60-70-80-90";
116 FromOption(task,
"CentralityMethod",
"cent",
"V0M");
117 FromOption(task,
"CentralityAxis",
"cent-bins", defCent);
118 FromOption(task,
"EtaAxis",
"eta-bins",
"r16:2");
119 FromOption(task,
"IPzAxis",
"ipz-bins",
"u15");
120 FromOption(task,
"DeltaCut",
"delta-cut", 1.5);
121 FromOption(task,
"TailDelta",
"tail-delta", 5.);
122 FromOption(task,
"TailMaximum",
"tail-max", -1);
123 FromOption(task,
"MaxDelta",
"max-delta", 25.);
124 FromOption(task,
"DPhiShift",
"dphi-shift", 0.0045);
125 FromOption(task,
"ShiftedDPhiCut",
"shifted-dphi-cut", -1.);
126 FromOption(task,
"AbsMinCent",
"abs-min-cent", -1.);
127 FromOption(task,
"WeightMask",
"reweigh-mask", 0xFF);
128 FromOption(task,
"WeightVeto",
"reweigh-veto", 0x0);
130 FromOption(task,
"WeightInverse",
"reweigh-inv",
false);
131 FromOption(task,
"TriggerEfficiency",
"trigEff", 0.);
158 Printf(
"Print the generated task");
174 gROOT->SetMacroPath(Form(
"%s:$(ALICE_PHYSICS)/PWGLF/FORWARD/analysis2",
175 gROOT->GetMacroPath()));
201 const char*
ClassName()
const {
return "TrackletdNdetaTrain"; }
216 std::ofstream o(
"Collect.C");
218 Error(
"TrackletdNdetaTrain::SavePost",
"Failed to open Collect.C");
221 o <<
"// Created by " <<
ClassName() <<
"\n" 222 <<
"// Will draw dN/deta results from produced files\n" 224 <<
"void Collect(const char* other,\n" 225 <<
" const char* output,\n" 226 <<
" UInt_t proc=0x22,\n" 227 <<
" UInt_t viz=0x32f,\n" 231 <<
" \"$ALICE_PHYSICS/PWGLF/FORWARD/analysis2/dndeta/tracklets3\";\n" 232 <<
" if (gSystem->Getenv(\"ANA_SRC\"))\n" 233 <<
" fwd = \"$ANA_SRC/dndeta/tracklets3\";\n" 234 <<
" gROOT->LoadMacro(Form(\"%s/Post.C\",fwd.Data()));\n" 235 <<
" const char* thisDir = \"" <<
fEscapedName <<
"\";\n";
237 o <<
" Post(thisDir,other,output,proc,viz,n);\n";
239 o <<
" Post(other,thisDir,output,proc,viz,n);\n";
247 f <<
" echo \"=== Summarizing results ...\"\n" 248 <<
" aliroot -l -b -q ${prefix}Summarize.C\n" 249 <<
" echo \"=== Draw results ...\"\n" 250 <<
" aliroot -l -b -q ${prefix}Draw.C\n"
const char * AsString(const TString &name, const TString &def="") const
void CreateTasks(AliAnalysisManager *mgr)
const TString & Get(const TString &name) const
Bool_t Has(const TString &name) const
TrackletdNdetaTrain(const char *name)
AliVEventHandler * CreateMCHandler(UShort_t, bool)
virtual Bool_t IsMC() const
void CoupleTrackletCar(AliAnalysisManager *mgr)
Base classs for train specifications.
Option * Add(const TString &name, const TString &arg, const TString &desc, const TString &val="")
void SaveSetup(Bool_t asShellScript)
virtual void SaveSetup(Bool_t asShellScript)
const char * ClassName() const
void PostShellCode(std::ostream &f)
void FromOption(AliAnalysisTaskSE *task, const char *what, const char *opt, Double_t defval)
virtual Bool_t LoadLibrary(const TString &name, Bool_t slave=true, Bool_t forcePar=false)=0
virtual Bool_t LoadSource(const TString &name, bool copy=false)
void SetOnTask(AliAnalysisTaskSE *task, const char *what, UInt_t val)
AliVEventHandler * CreateOutputHandler(UShort_t)