/** * Read in AOD and generate @f$ dN/d\eta@f$ for the selected * trigger classes and vertex ranges * * @param file Input file (AOD) * @param triggers Triggers to investigate * @param energy Energy (only used for comparisons) * @param vzMin Minimum interaction point z coordinate * @param vzMax Maximum interaction point z coordinate * @param rebin How many bins to group * @param title Title to put on the plot * * @ingroup pwg2_forward_analysis_scripts */ void Pass2(const char* file="AliAODs.root", const char* triggers="INEL", Int_t energy=900, Double_t vzMin=-10, Double_t vzMax=10, Int_t rebin=5, const char* title="") { gROOT->LoadMacro("$ALICE_ROOT/PWG2/FORWARD/analysis2/Compile.C"); Compile("$ALICE_ROOT/PWG2/FORWARD/analysis2/DrawRes.C","g"); Int_t trgMask; TString trgs(triggers); trgs.ToUpper(); TObjString* trg; TIter next(trgs.Tokenize(" ,|")); while ((trg = static_cast(next()))) { TString s(trg->GetString()); if (s.IsNull()) continue; if (s.CompareTo("INEL") == 0) trgMask = AliAODForwardMult::kInel; else if (s.CompareTo("INEL>0")== 0) trgMask = AliAODForwardMult::kInelGt0; else if (s.CompareTo("NSD") == 0) trgMask = AliAODForwardMult::kNSD; else Warning("Pass2", "Unknown trigger %s", s.Data()); } if (trgMask == 0) { trgMask = 1; trgs.Append("INEL"); } printf("--------------------------------------\n" "Settings for this:\n" " Input AOD: %s\n" " Vertex range: %+4.1f -> %+4.1f cm\n" " Rebinning: %d\n" " Trigger mask: 0x%02x (%s)\n" " Energy: %dGeV\n" " Title: %s\n" "--------------------------------------\n", file, vzMin, vzMax, rebin, trgMask, trgs.Data(), energy, title); DrawRes dr; TStopwatch t; t.Start(); dr.Run(file, vzMin, vzMax, rebin, trgMask, energy, title); t.Stop(); t.Print(); } // // EOF //