32 fOptions.
Add(
"run",
"NUMBER",
"Run number for corrs", 0);
33 fOptions.
Add(
"sys",
"SYSTEM",
"1:pp, 2:PbPb, 3:pPb", 0);
34 fOptions.
Add(
"snn",
"ENERGY",
"Center of mass energy in GeV", 0);
35 fOptions.
Add(
"field",
"STRENGTH",
"L3 field strength in kG", 0);
37 fOptions.
Add(
"dead",
"FILE",
"Additional dead-map script",
"");
38 fOptions.
Add(
"copy",
"LIST",
"',' separated list to copy",
"cent");
40 "Maximum consequtive strips (MC)", 2);
41 fOptions.
Add(
"forward-config",
"FILE",
"Forward configuration",
42 "ForwardAODConfig.C");
43 fOptions.
Add(
"central-config",
"FILE",
"Central configuration",
44 "CentralAODConfig.C");
45 fOptions.
Add(
"no-central",
"Do not at SPD cluster task",
false);
48 fOptions.
Add(
"satelitte",
"Use satelitte interactions");
49 fOptions.
Add(
"secmap",
"Use secondary maps to correct",
false);
50 fOptions.
Add(
"mc-tracks",
"Enable MC track filter",
false);
51 fOptions.
Add(
"hit-threshold",
"CUT",
"Threshold for hits", 0.9);
67 cmd.Form(
"((AliForwardMultiplicityBase*)%p)->%s(%s)",
68 task, call.Data(), arg.Data());
69 gROOT->ProcessLine(cmd);
83 cmd.Form(
"((AliForwardMCMultiplicityTask*)%p)->%s(%s)",
84 task, call.Data(), arg.Data());
85 gROOT->ProcessLine(cmd);
95 AliAnalysisManager::SetCommonFileName(
"forward.root");
101 gROOT->SetMacroPath(Form(
"%s:$(ALICE_PHYSICS)/PWGLF/FORWARD/analysis2",
102 gROOT->GetMacroPath()));
103 gROOT->SetMacroPath(Form(
"%s:$(ALICE_ROOT)/ANALYSIS/macros",
104 gROOT->GetMacroPath()));
107 Bool_t mc = mgr->GetMCtruthEventHandler() != 0;
109 UInt_t mask = AliVEvent::kAny;
115 Info(
"",
"What to copy: %s", cpy.Data());
116 CoupleSECar(
"AddTaskCopyHeader.C", Form(
"\"%s\"", cpy.Data()), mask);
135 Form(
"%d,%ld,%d,%d,%d,\"%s\",\"%s\",\"%s\"",
136 mc, run, sys, sNN, fld,
137 fwdConfig.Data(), corr.Data(),
140 Fatal(
"CoupleCars",
"Failed to add forward task");
141 SetOnFwd(fwd,
"GetCorrections().SetUseSecondaryMap", Form(
"%d",sec));
142 SetOnFwd(fwd,
"GetDensityCalculator()->SetHitThreshold", Form(
"%f", thr));
144 SetOnMCFwd(fwd,
"GetTrackDensity().SetMaxConsequtiveStrips",
147 if (!corr.IsNull()) {
149 const char* names[] = {
158 const char** ptr = names;
174 Form(
"%d,%ld,%d,%d,%d,\"%s\",\"%s\"",
175 mc, run, sys, sNN, fld,
176 cenConfig.Data(), corr.Data()), mask);
180 gROOT->ProcessLine(Form(
"((AliCentralMultiplicityTask*)%p)" 181 "->SetUseSecondary(%d)",
201 const char*
ClassName()
const {
return "MakeAODTrain"; }
218 Warning(
"MakeAODTrain::SaveSetup",
219 "Cannot make dNdeta.C script without helper");
224 Bool_t mc = mgr && (mgr->GetMCtruthEventHandler() != 0);
227 TString cls(
"MakedNdetaTrain");
230 if (name.Contains(
"aod")) name.ReplaceAll(
"aod",
"dndeta");
231 else name.Append(
"_dndeta");
235 opts.Remove(
"field");
236 opts.Remove(
"tpc-ep");
238 opts.Remove(
"max-strips");
239 opts.Remove(
"mc-tracks");
240 opts.Remove(
"secmap");
242 opts.Add(
"abs-min-cent",
"PERCENT",
"Absolute least centrality",-1.);
243 opts.Add(
"cent-bins",
"BINS",
"Centrality bins",
"");
244 opts.Add(
"satellite",
"Restrict analysis to satellite events",
false);
245 opts.Add(
"trig",
"TRIGGER",
"Trigger type",
"INEL");
246 opts.Add(
"filter",
"FILTER",
"Filter type",
"OUTLIER|PILEUP-BIN");
247 opts.Add(
"ipz-bins",
"BINS",
"Lower bound on Ip Z",
"u10");
248 opts.Add(
"scheme",
"FLAGS",
"Normalization scheme",
"TRIGGER,EVENT");
249 opts.Add(
"trigEff",
"EFFICIENCY",
"Trigger efficiency", 1.);
250 opts.Add(
"trigEff0",
"EFFICIENCY",
"0-bin trigger efficiency", 1.);
251 opts.Add(
"mc",
"Also analyse MC truth",
fRailway->
IsMC());
252 opts.Add(
"truth-config",
"FILE",
"MC-Truth configuration",
"");
253 opts.Add(
"mean-ipz",
"MU",
"Mean of IPz dist.", 0);
254 opts.Add(
"var-ipz",
"SIGMA",
"Variance of IPz dist.", -1);
259 TUrl outUrl(outString);
261 if (uopts.Find(
"pattern"))
262 uopts.Set(
"pattern",
"*/AliAOD.root");
264 if (uopts.Find(
"par")) uopts.Set(
"par",
"task");
267 uopts.Store(s,
"",
"&",
false,
true);
268 outUrl.SetOptions(s.str().c_str());
270 const char* defConfig=
"$ALICE_PHYSICS/PWGLF/FORWARD/analysis2/dNdetaConfig.C";
271 opts.Set(
"url", outUrl.GetUrl());
272 opts.Set(
"type",
"AOD");
273 opts.Set(
"forward-config",defConfig);
274 opts.Set(
"central-config",defConfig);
275 opts.Set(
"truth-config",defConfig);
279 opts.Set(
"cent",
"default");
280 opts.Set(
"trig",
"V0AND");
281 opts.Set(
"scheme",
"default");
282 opts.Set(
"centBins",
"default");
288 name.ReplaceAll(
"dndeta",
"dndeta_inel");
293 name.ReplaceAll(
"inel",
"nsd");
294 opts.Set(
"trig",
"V0AND");
299 name.ReplaceAll(
"nsd",
"inelgt0");
300 opts.Set(
"trig",
"INELGT0");
312 std::ofstream f(
"Summarize.C");
314 Error(
"SaveSummarize",
"Failed to open Summarize.C script");
317 f <<
"// Generated by " <<
ClassName() <<
"\n" 318 <<
"// WHAT is a bit mask of\n" 319 <<
"// 0x001 Event inspector\n" 320 <<
"// 0x002 Sharing filter\n" 321 <<
"// 0x004 Density calculator\n" 322 <<
"// 0x008 Corrector\n" 323 <<
"// 0x010 Histogram collector\n" 324 <<
"// 0x020 Analysis step cartoon\n" 325 <<
"// 0x040 Results\n" 326 <<
"// 0x080 Central\n" 327 <<
"// 0x100 Landscape\n" 328 <<
"// 0x200 Pause\n" 330 <<
"void Summarize(const char* filename=\"forward.root\",\n" 331 <<
" UShort_t what=0x1FF)\n" 333 <<
" const char* fwd=\"$ALICE_PHYSICS/PWGLF/FORWARD/analysis2\";\n" 334 <<
" gROOT->LoadMacro(Form(\"%s/DrawAODSummary.C\",fwd));\n" 335 <<
" DrawAODSummary(filename,what);\n" 337 <<
"// EOF" << std::endl;
342 f <<
" echo \"=== Summarizing results ...\"\n" 343 <<
" aliroot -l -b -q ${prefix}Summarize.C\n"
Double_t AsDouble(const TString &name, Double_t def=0) const
virtual void CreateCentralitySelection(Bool_t mc)
void SaveSetup(Bool_t asShellScript)
const char * ClassName() const
Int_t AsInt(const TString &name, Int_t def=0) const
static void SaveSetupShell(const TString &out, const TString &cls, const TString &name, const OptionList &opts, const OptionList *uopts)
void SetOnMCFwd(AliAnalysisTask *task, const TString &call, const TString &arg)
const TString & Get(const TString &name) const
Bool_t Has(const TString &name) const
void CreateTasks(AliAnalysisManager *mgr)
const OptionList & Options() const
MakeAODTrain(const TString &name)
void Set(const TString &name, const TString &value)
virtual Bool_t IsMC() const
Base classs for train specifications.
Option * Add(const TString &name, const TString &arg, const TString &desc, const TString &val="")
virtual TString OutputLocation() const
virtual void SaveSetup(Bool_t asShellScript)
virtual Bool_t LoadAux(const TString &name, Bool_t copy=false)
void SavedNdeta(Bool_t asShellScript)
void PostShellCode(std::ostream &f)
void SetOnFwd(AliAnalysisTask *task, const TString &call, const TString &arg)
virtual AliAnalysisTaskSE * CoupleSECar(const TString ¯o, const TString &args, UInt_t mask=0)
virtual Bool_t LoadLibrary(const TString &name, Bool_t slave=true, Bool_t forcePar=false)=0
void CreateCentralitySelection(Bool_t mc)
static void SaveSetupROOT(const TString &out, const TString &cls, const TString &name, const OptionList &opts, const OptionList *uopts)