4 #include <AliAnalysisManager.h> 27 fOptions.
Add(
"map",
"FILE",
"File containg map",
"map.root");
36 Fatal(
"CreateTasks",
"Failed to load PWGLFforward2");
43 "STEERBase,CDB,ESD,AOD,ANALYSIS,OADB," 46 Fatal(
"",
"Failed to make support PAR");
48 Fatal(
"CreateTasks",
"Failed to load EventTimeTask");
52 "Gui,STEERBase,CDB,ESD,AOD,ANALYSIS,OADB," 53 "ANALYSISalice,PWGLFforward2," 56 Fatal(
"",
"Failed to make PAR");
58 Fatal(
"CreateTasks",
"Failed to load ELossTimeTask");
61 gROOT->ProcessLine(Form(
"ELossTimeTask::Create(\"%s\")", mapfile.Data()));
82 const char*
ClassName()
const {
return "ELossTimeTrain"; }
97 std::ofstream o(
"Draw.C");
98 o <<
"// Written by " <<
ClassName() <<
"\n" 99 <<
"void Draw(const char* fileName=\"AnalysisResults.root\")\n" 101 <<
" gSystem->AddIncludePath(\"-DNO_TRAIN -DSUMMARY\");\n" 102 <<
" const char* fwd = \"$ALICE_PHYSICS/PWGLF/FORWARD/analysis2\";\n" 103 <<
" gSystem->AddIncludePath(Form(\"-I%s/scripts\", fwd));\n" 104 <<
" gROOT->SetMacroPath(Form(\"%s/trains:%s\", fwd,\n" 105 <<
" gROOT->GetMacroPath()));\n" 106 <<
" gROOT->LoadMacro(\"ELossTimeTrain.C+\");\n" 107 <<
" ELossTimeSummary s;\n" 108 <<
" s.Run(fileName);\n" 115 f <<
" echo \"=== Draw results ...\"\n" 116 <<
" aliroot -l -b -q ${prefix}Draw.C\\(\\\"AnalysisResults.root\\\"\\)\n" 133 kEventInspector = 0x001,
145 TFile*
file = TFile::Open(filename.Data(),
"READ");
147 Error(
"Run",
"Failed to open \"%s\"", filename.Data());
150 fPause = flags & kPause;
154 pdfName.ReplaceAll(
".root",
".pdf");
155 CreateCanvas(pdfName, flags & kLandscape);
161 if (flags & kEventInspector) DrawEventInspector(c);
164 DrawInPad(fBody, 0, dt,
"", kLogy);
165 PrintCanvas(
"#Deltat");
167 const char* rings[] = {
"FMD1i",
"FMD2i",
"FMD2o",
"FMD3o",
"FMD3i", 0 };
168 const char** pring = rings;
171 DrawRing(c, *pring, dt);
187 TLatex* ltx =
new TLatex(.5, y,
"#Deltat vs #Delta/#Delta_{mip}");
188 ltx->SetTextSize(0.07);
189 ltx->SetTextFont(62);
190 ltx->SetTextAlign(22);
194 Double_t save = fParName->GetTextSize();
195 fParName->SetTextSize(0.03);
196 fParVal->SetTextSize(0.03);
203 GetParameter(fc,
"sys", sys);
204 GetParameter(fc,
"sNN", sNN);
205 GetParameter(fc,
"runNo", runNo);
207 DrawParameter(y,
"Run #", Form(
"%lu", runNo));
208 TString tS; SysString(sys, tS); DrawParameter(y,
"System", tS);
209 TString tE; SNNString(sNN, tE); DrawParameter(y,
"#sqrt{s_{NN}}", tE);
211 PrintCanvas(
"Title page");
212 fParName->SetTextSize(save);
213 fParVal->SetTextSize(save);
227 TH2* h2 =
GetH2(lring,
"dtVsELoss");
230 THStack*
stack =
new THStack(ring, ring);
233 THStack* ratios =
new THStack(Form(
"Ratios for %s",ring), ring);
242 for (
Int_t i = 1; i <= h2->GetNbinsY(); i++) {
243 TH1* h = h2->ProjectionX(Form(
"%s_%03d", ring, i), i,i);
244 Double_t logDt = h2->GetYaxis()->GetBinCenter(i);
246 Int_t nFill = h->GetEntries();
247 if (nFill <= 1000)
continue;
248 Double_t norm = dt->GetBinContent(i);
250 Warning(
"",
"Normalization=%f<1e-6 but got " 251 "%d>1000 entries for log10(dt)=%5.3f", norm, nFill, logDt);
254 if (!first && logDt > TMath::Log10(25.)) {
261 h->SetTitle(Form(
"log_{10}(#Deltat)=%5.3f", logDt));
264 TColor::HSV2RGB((j-1)*45, 1, .8, r, g, b);
265 Int_t col = TColor::GetColor(r, g, b);
267 h->SetLineColor(col);
268 h->SetLineStyle(j % 3+1);
274 if (h == first)
continue;
275 TH1* rh =
static_cast<TH1*
>(h->Clone(Form(
"ratio%s", h->GetName())));
278 for (
Int_t k = 1; k <= rh->GetNbinsX(); k++) {
279 if (rh->GetXaxis()->GetBinCenter(k) > max)
break;
280 rmax = TMath::Max(rmax, rh->GetBinContent(k));
289 fBody->Divide(1,2,0,0);
290 DrawInPad(fBody,1,stack,
"nostack hist", kLogy|kLegend);
291 stack->GetXaxis()->SetRangeUser(-.1,max);
292 stack->GetYaxis()->SetTitle(
"1/N_{ev} dN/d(#Delta/#Delta_{mip})");
296 DrawInPad(fBody,2,ratios,
"nostack hist", kLegend);
297 ratios->GetXaxis()->SetRangeUser(-.1, max);
298 ratios->GetXaxis()->SetTitle(
"#Delta/#Delta_{mip}");
300 ->SetTitle(Form(
"X/(1/N_{ev}dN/d(#Delta/#Delta_{mip}))|_{%5.3f}",lfirst));
301 Printf(
"Max: %f (%f)", ratios->GetMaximum(), rmax);
302 ratios->SetMaximum(rmax*1.2);
TH1 * GetH1(TDirectory *dir, const char *name, Bool_t verbose=true)
Base class for classes to draw summaries.
AliVEventHandler * CreateOutputHandler(UShort_t)
static Bool_t MakeScriptPAR(Bool_t isLocal, const TString &script, const TString &deps, Railway *helper)
void CreateTasks(AliAnalysisManager *)
const TString & Get(const TString &name) const
virtual UShort_t Mode() const =0
void CreateCentralitySelection(Bool_t)
void Set(const TString &name, const TString &value)
void PostShellCode(std::ostream &f)
Base classs for train specifications.
Option * Add(const TString &name, const TString &arg, const TString &desc, const TString &val="")
TH2 * GetH2(TCollection *c, const char *name)
virtual void SaveSetup(Bool_t asShellScript)
virtual Bool_t LoadAux(const TString &name, Bool_t copy=false)
void SaveSetup(Bool_t asShellScript)
TFile * file
TList with histograms for a given trigger.
ELossTimeTrain(const char *name="eventTime")
const char * ClassName() const
TCollection * GetCollection(TDirectory *dir, const TString &name, Bool_t verbose=true)
virtual Bool_t LoadLibrary(const TString &name, Bool_t slave=true, Bool_t forcePar=false)=0