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