]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/FORWARD/analysis2/Pass2.C
Fixed up sNN recognision for Heavy Ion
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis2 / Pass2.C
CommitLineData
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 */
15void
16Pass2(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,
22 const char* title="")
23{
24 gROOT->LoadMacro("$ALICE_ROOT/PWG2/FORWARD/analysis2/Compile.C");
25 Compile("$ALICE_ROOT/PWG2/FORWARD/analysis2/DrawRes.C","g");
26
27 Int_t trgMask;
28 TString trgs(triggers);
29 trgs.ToUpper();
30 TObjString* trg;
31 TIter next(trgs.Tokenize(" ,|"));
32 while ((trg = static_cast<TObjString*>(next()))) {
33 TString s(trg->GetString());
34 if (s.IsNull()) continue;
35 if (s.CompareTo("INEL") == 0) trgMask = AliAODForwardMult::kInel;
36 else if (s.CompareTo("INEL>0")== 0) trgMask = AliAODForwardMult::kInelGt0;
37 else if (s.CompareTo("NSD") == 0) trgMask = AliAODForwardMult::kNSD;
38 else
39 Warning("Pass2", "Unknown trigger %s", s.Data());
40 }
41 if (trgMask == 0) {
42 trgMask = 1;
43 trgs.Append("INEL");
44 }
45
46 printf("--------------------------------------\n"
47 "Settings for this:\n"
48 " Input AOD: %s\n"
49 " Vertex range: %+4.1f -> %+4.1f cm\n"
50 " Rebinning: %d\n"
51 " Trigger mask: 0x%02x (%s)\n"
52 " Energy: %dGeV\n"
53 " Title: %s\n"
54 "--------------------------------------\n",
55 file, vzMin, vzMax, rebin, trgMask, trgs.Data(), energy, title);
56
57 DrawRes dr;
65a1e0cd 58 TStopwatch t;
59 t.Start();
7e4038b5 60 dr.Run(file, vzMin, vzMax, rebin, trgMask, energy, title);
65a1e0cd 61 t.Stop();
62 t.Print();
7e4038b5 63}
64//
65// EOF
66//
67
68