]>
Commit | Line | Data |
---|---|---|
7e4038b5 | 1 | /** |
2 | * Read in AOD and generate @f$ dN/d\eta@f$ for the selected | |
3 | * trigger classes and vertex ranges | |
4 | * | |
5 | * @param file Input file (AOD) | |
6 | * @param triggers Triggers to investigate | |
7 | * @param energy Energy (only used for comparisons) | |
8 | * @param vzMin Minimum interaction point z coordinate | |
9 | * @param vzMax Maximum interaction point z coordinate | |
10 | * @param rebin How many bins to group | |
11 | * @param title Title to put on the plot | |
12 | * | |
13 | * @ingroup pwg2_forward_analysis_scripts | |
14 | */ | |
15 | void | |
16 | Pass2(const char* file="AliAODs.root", | |
17 | const char* triggers="INEL", | |
18 | Int_t energy=900, | |
19 | Double_t vzMin=-10, | |
20 | Double_t vzMax=10, | |
21 | Int_t rebin=5, | |
f4494b7a | 22 | const char* title="", |
23 | bool hhd=false, | |
24 | bool comp=true) | |
7e4038b5 | 25 | { |
26 | gROOT->LoadMacro("$ALICE_ROOT/PWG2/FORWARD/analysis2/Compile.C"); | |
27 | Compile("$ALICE_ROOT/PWG2/FORWARD/analysis2/DrawRes.C","g"); | |
28 | ||
29 | Int_t trgMask; | |
30 | TString trgs(triggers); | |
31 | trgs.ToUpper(); | |
32 | TObjString* trg; | |
33 | TIter next(trgs.Tokenize(" ,|")); | |
34 | while ((trg = static_cast<TObjString*>(next()))) { | |
35 | TString s(trg->GetString()); | |
36 | if (s.IsNull()) continue; | |
37 | if (s.CompareTo("INEL") == 0) trgMask = AliAODForwardMult::kInel; | |
38 | else if (s.CompareTo("INEL>0")== 0) trgMask = AliAODForwardMult::kInelGt0; | |
39 | else if (s.CompareTo("NSD") == 0) trgMask = AliAODForwardMult::kNSD; | |
40 | else | |
41 | Warning("Pass2", "Unknown trigger %s", s.Data()); | |
42 | } | |
43 | if (trgMask == 0) { | |
44 | trgMask = 1; | |
45 | trgs.Append("INEL"); | |
46 | } | |
47 | ||
48 | printf("--------------------------------------\n" | |
49 | "Settings for this:\n" | |
50 | " Input AOD: %s\n" | |
51 | " Vertex range: %+4.1f -> %+4.1f cm\n" | |
52 | " Rebinning: %d\n" | |
53 | " Trigger mask: 0x%02x (%s)\n" | |
54 | " Energy: %dGeV\n" | |
55 | " Title: %s\n" | |
f4494b7a | 56 | " HHD comp.: %s\n" |
57 | " Other comp.: %s\n" | |
7e4038b5 | 58 | "--------------------------------------\n", |
f4494b7a | 59 | file, vzMin, vzMax, rebin, trgMask, trgs.Data(), energy, title, |
60 | hhd ? "yes" : "no", comp ? "yes" : "no"); | |
7e4038b5 | 61 | |
62 | DrawRes dr; | |
65a1e0cd | 63 | TStopwatch t; |
64 | t.Start(); | |
f4494b7a | 65 | dr.Run(file, vzMin, vzMax, rebin, trgMask, energy, title, hhd, comp); |
65a1e0cd | 66 | t.Stop(); |
67 | t.Print(); | |
7e4038b5 | 68 | } |
69 | // | |
70 | // EOF | |
71 | // | |
72 | ||
73 |