]>
Commit | Line | Data |
---|---|---|
2f331ac9 | 1 | #ifndef ALIANALYSISMUMU_H |
2 | #define ALIANALYSISMUMU_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | // $Id$ | |
8 | ||
a58729a5 | 9 | /// |
10 | /// AliAnalysisMuMu : helper class to digest/plot/massage results from | |
11 | /// AliAnalysisTaskMuMu | |
2f331ac9 | 12 | /// |
13 | /// author : Laurent Aphecetche (Subatech) | |
14 | ||
a58729a5 | 15 | #include "AliAnalysisMuMuBinning.h" |
2f331ac9 | 16 | #include "TNamed.h" |
a58729a5 | 17 | #include <map> |
18 | #include <set> | |
2f331ac9 | 19 | #include <string> |
20 | #include <TString.h> | |
a58729a5 | 21 | #include <vector> |
1afce1ce | 22 | #include "RQ_OBJECT.h" |
2f331ac9 | 23 | |
a58729a5 | 24 | class AliAnalysisMuMuResult; |
81190958 | 25 | class AliAnalysisMuMuJpsiResult; |
a58729a5 | 26 | class AliAnalysisMuMuSpectra; |
2f331ac9 | 27 | class AliCounterCollection; |
a58729a5 | 28 | class AliMergeableCollection; |
2f331ac9 | 29 | class TF1; |
a58729a5 | 30 | class TFile; |
2f331ac9 | 31 | class TGraph; |
81190958 | 32 | class TGraphErrors; |
a58729a5 | 33 | class TH1; |
2f331ac9 | 34 | class TMap; |
2f331ac9 | 35 | |
81dfe194 | 36 | class AliAnalysisMuMu : public TObject, public TQObject |
2f331ac9 | 37 | { |
1afce1ce | 38 | |
2f331ac9 | 39 | public: |
40 | ||
1afce1ce | 41 | enum EColor |
42 | { | |
2f331ac9 | 43 | kBlue=1500, |
44 | kOrange=1501, | |
45 | kGreen=1502 | |
46 | }; | |
47 | ||
1afce1ce | 48 | AliAnalysisMuMu(const char* filename="LHC12c_muons_AOD000_000179687.saf.root", |
49 | const char* associatedSimFileName=""); | |
50 | ||
2f331ac9 | 51 | virtual ~AliAnalysisMuMu(); |
52 | ||
2754fd07 | 53 | /* Basic checks */ |
54 | void BasicCounts(Bool_t detailTrigger=kFALSE, | |
55 | ULong64_t* totalNmb=0x0, | |
56 | ULong64_t* totalNmsl=0x0, | |
57 | ULong64_t* totalNmul=0x0); | |
a58729a5 | 58 | |
2754fd07 | 59 | static void BasicCountsEvolution(const char* filelist, Bool_t detailTrigger=kFALSE); |
60 | ||
a58729a5 | 61 | void TriggerCountCoverage(const char* triggerList, Bool_t compact=kTRUE, |
62 | Bool_t orderByTriggerCount=kTRUE); | |
63 | ||
64 | ||
2754fd07 | 65 | /** Background evolution functions */ |
66 | static TObjArray* ComputeBackgroundEvolution(const char* filelist, const char* triggerList, | |
a58729a5 | 67 | Double_t ptmin=0.0, |
2754fd07 | 68 | const char* outputfile="background-evolution.root", const char* outputMode="UPDATE"); |
2754fd07 | 69 | |
a58729a5 | 70 | static void PlotBackgroundEvolution(const char* gfile, const char* triggerList, Double_t ymax=100.0, Bool_t fillBoundaries=kFALSE); |
71 | ||
72 | ||
2754fd07 | 73 | /** Fitting */ |
74 | static TMap* ComputeJpsiEvolution(const char* filelist, const char* triggerList, | |
a58729a5 | 75 | const char* outputFile="jpsi-evolution.root"); |
2f331ac9 | 76 | |
2754fd07 | 77 | static void PlotJpsiEvolution(const char* resultFile, const char* triggerList, Bool_t fillBoundaries=kFALSE, |
a58729a5 | 78 | const char* efficiencyFile=0x0, Bool_t simulation=kFALSE); |
79 | ||
80 | ||
81 | AliAnalysisMuMuSpectra* FitParticle(const char* particle, | |
82 | const char* trigger, | |
83 | const char* eventType, | |
84 | const char* pairCut, | |
85 | const char* centrality, | |
86 | const AliAnalysisMuMuBinning& binning); | |
2f331ac9 | 87 | |
1afce1ce | 88 | AliAnalysisMuMuSpectra* CorrectSpectra(const char* type, const char* flavour=""); |
89 | ||
81190958 | 90 | void ComputeFnorm(); |
91 | ||
92 | void TwikiOutputFnorm(const char* series="FnormOffline2PUPS,FnormScalersPUPS,FnormBest2,RelDifFnormScalersPUPSvsFnormOffline2PUPS") const; | |
93 | ||
94 | static void FigureOutputFnorm(const char* filelist); | |
1afce1ce | 95 | |
81190958 | 96 | static void LatexOutputFnorm(const char* filelist, const char* subresultnames="FnormOffline2PUPS,FnormScalersPUPS,FnormBest2,RelDifFnormScalersPUPSvsFnormOffline2PUPS", Bool_t rms=kFALSE); |
97 | ||
98 | AliAnalysisMuMuSpectra* ComputeYield(const char* type, const char* flavour=""); | |
99 | ||
1afce1ce | 100 | void CleanAllSpectra(); |
101 | ||
2754fd07 | 102 | ///------ |
103 | ||
1afce1ce | 104 | // static AliAnalysisMuMuSpectra* ComputeYield(const char* realFile="ds.list.saf.root", |
105 | // const char* simFile="ds.sim.list.saf.root", | |
106 | // const char* type="PSI-Y VS PT"); | |
2f331ac9 | 107 | |
a58729a5 | 108 | static AliAnalysisMuMuSpectra* RABy(const char* realFile="ds.list.saf.root", const char* simFile="ds.sim.list.saf.root", const char* type="", const char* direction="pPb"); |
109 | ||
81190958 | 110 | static TGraph* ResultEvolution(const char* runlist, |
111 | const char* realPrefix="LHC13f_muon_calo_AODMUON127", | |
112 | const char* simPrefix="SIM_JPSI_LHC13f_CynthiaTuneWithRejectList", | |
113 | const char* what="Y", | |
a58729a5 | 114 | Bool_t forceRecomputation=kFALSE); |
115 | ||
81190958 | 116 | static void ComputeJpsi(const char* runlist, const char* prefix="SIM_JPSI_LHC13f_CynthiaTuneWithRejectList", const char* what="integrated", const char* binningFlavour=""); |
117 | ||
118 | static AliAnalysisMuMuSpectra* CombineSpectra(const char* runlist, | |
119 | const char* realPrefix="LHC13f_muon_calo_AODMUON127", | |
120 | const char* simPrefix="SIM_JPSI_LHC13f_CynthiaTuneWithRejectList", | |
121 | const char* quantity="AccEff", | |
122 | const char* variable="INTEGRATED", | |
123 | const char* binningFlavour=""); | |
a58729a5 | 124 | ///------- |
125 | ||
126 | TGraph* PlotEventSelectionEvolution(const char* trigger1="CINT7-B-NOPF-MUON", const char* event1="PSALL", | |
127 | const char* trigger2="CINT7-B-NOPF-MUON", const char* event2="PSALL", | |
128 | Bool_t drawFills=kFALSE, | |
129 | Bool_t asRejection=kTRUE) const; | |
130 | ||
131 | Bool_t Upgrade(); | |
132 | ||
133 | static Bool_t Upgrade(const char* filename); | |
134 | ||
135 | static void CentralityCheck(const char* filelist); | |
136 | ||
2f331ac9 | 137 | static TObjArray* CompareJpsiPerCMUUWithBackground(const char* jpsiresults="results.root", |
138 | const char* backgroundresults="background.lhc11d.root"); | |
a58729a5 | 139 | |
2f331ac9 | 140 | static TGraph* CompareJpsiPerCMUUWithSimu(const char* realjpsiresults="results.root", |
141 | const char* simjpsiresults="results.sim.root"); | |
a58729a5 | 142 | |
2f331ac9 | 143 | static Bool_t DecodeFileName(const char* filename, TString& period, int& esdpass, int& aodtrain, int& runnumber); |
144 | ||
a58729a5 | 145 | |
2f331ac9 | 146 | static TFile* FileOpen(const char* file); |
147 | ||
a58729a5 | 148 | |
2f331ac9 | 149 | static Bool_t GetCollections(const char* rootfile, |
a58729a5 | 150 | AliMergeableCollection*& mc, |
151 | AliCounterCollection*& cc, | |
152 | AliAnalysisMuMuBinning*& bin, | |
153 | std::set<int>& runnumbers); | |
2f331ac9 | 154 | |
1afce1ce | 155 | AliAnalysisMuMuSpectra* GetSpectra(const char* what, const char* flavour="") const; |
156 | ||
2f331ac9 | 157 | static UInt_t GetSum(AliCounterCollection& cc, const char* triggerList, const char* eventSelection, Int_t runNumber=-1); |
158 | ||
159 | static ULong64_t GetTriggerScalerCount(const char* triggerList, Int_t runNumber); | |
a58729a5 | 160 | |
1afce1ce | 161 | Int_t Jpsi(const char* what="integrated", const char* binningFlavour=""); |
a58729a5 | 162 | |
163 | Bool_t IsSimulation() const; | |
164 | ||
2f331ac9 | 165 | static TObjArray* ReadFileList(const char* filelist); |
166 | ||
167 | static Int_t RunNumberFromFileName(const char* filename); | |
168 | ||
a58729a5 | 169 | TString DimuonTriggerList() const { return fDimuonTriggers; } |
2f331ac9 | 170 | void SetDimuonTriggerList(const char* dimuonTriggerList) { fDimuonTriggers = dimuonTriggerList; } |
2754fd07 | 171 | |
2754fd07 | 172 | TString MuonTriggerList() const { return fMuonTriggers; } |
a58729a5 | 173 | void SetMuonTriggerList(const char* muonTriggerList) { fMuonTriggers = muonTriggerList; } |
174 | ||
2754fd07 | 175 | TString MinbiasTriggerList() const { return fMinbiasTriggers; } |
a58729a5 | 176 | void SetMinbiasTriggerList(const char* minbiasTriggerList) { fMinbiasTriggers = minbiasTriggerList; } |
2754fd07 | 177 | |
a58729a5 | 178 | TString EventSelectionList() const { return fEventSelectionList; } |
2754fd07 | 179 | void SetEventSelectionList(const char* eventSelectionList) { fEventSelectionList = eventSelectionList; } |
2754fd07 | 180 | |
a58729a5 | 181 | TString PairSelectionList() const { return fPairSelectionList; } |
182 | void SetPairSelectionList(const char* pairSelectionList) { fPairSelectionList = pairSelectionList; } | |
183 | ||
184 | TString CentralitySelectionList() const { return fCentralitySelectionList; } | |
185 | void SetCentralitySelectionList(const char* centralitySelectionList) { fCentralitySelectionList = centralitySelectionList; } | |
186 | ||
1afce1ce | 187 | TString FitTypeList() const { return fFitTypeList; } |
188 | void SetFitTypeList(const char* fitTypelist) { fFitTypeList = fitTypelist; } | |
189 | ||
2754fd07 | 190 | static void SetDefaultDimuonTriggerList(const char* dimuonTriggerList) { fgDefaultDimuonTriggers = dimuonTriggerList; } |
191 | static void SetDefaultMuonTriggerList(const char* muonTriggerList) { fgDefaultMuonTriggers = muonTriggerList; } | |
192 | static void SetDefaultMinbiasTriggerList(const char* minbiasTriggerList) { fgDefaultMinbiasTriggers = minbiasTriggerList; } | |
193 | static void SetDefaultEventSelectionList(const char* eventSelectionList) { fgDefaultEventSelectionList = eventSelectionList; } | |
194 | static void SetDefaultPairSelectionList(const char* pairSelectionList) { fgDefaultPairSelectionList = pairSelectionList; } | |
a58729a5 | 195 | static void SetDefaultCentralitySelectionList(const char* centralitySelectionList) { fgDefaultCentralitySelectionList = centralitySelectionList; } |
1afce1ce | 196 | static void SetDefaultFitTypes(const char* fitTypes) { fgDefaultFitTypeList = fitTypes; } |
2f331ac9 | 197 | |
1afce1ce | 198 | static void SetDefaultEventSelectionForSimulations(const char* value) { fgDefaultEventSelectionForSimulations = value; } |
199 | static void SetDefaultDimuonTriggerForSimulations(const char* value) { fgDefaultDimuonTriggerForSimulations = value; } | |
200 | ||
a58729a5 | 201 | AliMergeableCollection* MC() const { return fMergeableCollection; } |
2f331ac9 | 202 | AliCounterCollection* CC() const { return fCounterCollection; } |
a58729a5 | 203 | AliAnalysisMuMuBinning* BIN() const { return fBinning; } |
2f331ac9 | 204 | |
205 | static void SetOCDBPath(const char* ocdbPath) { fgOCDBPath = ocdbPath; } | |
206 | ||
207 | static void SetColorScheme(); | |
a58729a5 | 208 | |
209 | static void SetCompactGraphs(Bool_t value=kTRUE) { fgIsCompactGraphs = value; } | |
210 | ||
211 | static Bool_t CompactGraphs() { return fgIsCompactGraphs; } | |
212 | ||
a58729a5 | 213 | void Print(Option_t* opt="") const; |
214 | ||
a58729a5 | 215 | const std::set<int>& RunNumbers() const { return fRunNumbers; } |
216 | ||
217 | void DrawMinv(const char* type, | |
218 | const char* particle, | |
219 | const char* trigger, | |
220 | const char* eventType, | |
221 | const char* pairCut, | |
1afce1ce | 222 | const char* centrality, |
223 | const char* subresultname="", | |
224 | const char* flavour="") const; | |
a58729a5 | 225 | |
1afce1ce | 226 | void DrawMinv(const char* type="PT", const char* particle="PSI", const char* flavour="", const char* subresultname="") const; |
a58729a5 | 227 | |
1afce1ce | 228 | Bool_t SetCorrectionPerRun(const TGraph& corr, const char* formula=""); |
a58729a5 | 229 | |
230 | void UnsetCorrectionPerRun(); | |
231 | ||
1afce1ce | 232 | void ExecuteCanvasEvent(Int_t event, Int_t px, Int_t py, TObject *sel); |
233 | ||
234 | std::vector<Double_t> GetMCCB2Tails(const AliAnalysisMuMuBinning::Range& bin) const; | |
235 | ||
236 | AliAnalysisMuMu* SIM() const { return fAssociatedSimulation; } | |
237 | ||
238 | AliAnalysisMuMuSpectra* SPECTRA(const char* fullpath) const; | |
239 | ||
240 | void Update(); | |
241 | ||
5597c928 | 242 | private: |
243 | AliAnalysisMuMu(const AliAnalysisMuMu& rhs); // not implemented on purpose | |
244 | AliAnalysisMuMu& operator=(const AliAnalysisMuMu& rhs); // not implemented on purpose | |
245 | ||
a58729a5 | 246 | TFile* ReOpen(const char* filename, const char* mode) const; |
247 | ||
248 | TString First(const TString& list) const; | |
249 | ||
2f331ac9 | 250 | private: |
251 | ||
81190958 | 252 | void SetNofInputParticles(AliAnalysisMuMuJpsiResult& r); |
2f331ac9 | 253 | |
a58729a5 | 254 | static TString ExpandPathName(const char* file); |
255 | ||
1afce1ce | 256 | |
a58729a5 | 257 | TString fFilename; // file containing the result collections (of objects and counters) from AliAnalysisTaskMuMu |
2f331ac9 | 258 | AliCounterCollection* fCounterCollection; // collection of counters in file |
259 | TString fDimuonTriggers; // list of dimuon triggers to consider | |
260 | TString fMuonTriggers; // list of single muon triggers to consider | |
261 | TString fMinbiasTriggers; // list of minbias triggers to consider | |
2754fd07 | 262 | TString fEventSelectionList; // list of event types to consider |
263 | TString fPairSelectionList; // list of pair cuts to consider | |
a58729a5 | 264 | TString fCentralitySelectionList; // list of centrality cuts to consider |
1afce1ce | 265 | TString fFitTypeList; // list of fit types to perform |
266 | ||
a58729a5 | 267 | AliAnalysisMuMuBinning* fBinning; // binning |
268 | ||
2f331ac9 | 269 | static TString fgOCDBPath; // OCDB to be used (raw:// by default) |
270 | ||
2754fd07 | 271 | static TString fgDefaultMuonTriggers; // default list of single muon triggers |
272 | static TString fgDefaultMinbiasTriggers; // default list of MB triggers | |
273 | static TString fgDefaultDimuonTriggers; // default list of dimuon triggers | |
274 | static TString fgDefaultEventSelectionList; // default list of event selections | |
275 | static TString fgDefaultPairSelectionList; // default list of pair selections | |
a58729a5 | 276 | static TString fgDefaultCentralitySelectionList; // default list of centrality selections |
1afce1ce | 277 | static TString fgDefaultFitTypeList; // default list of fit types |
278 | static TString fgDefaultEventSelectionForSimulations; // default event selection (simulations) | |
279 | static TString fgDefaultDimuonTriggerForSimulations; // default dimuon trigger (simulations) | |
a58729a5 | 280 | |
281 | static Bool_t fgIsCompactGraphs; // whether the graph produced should be compact | |
282 | ||
283 | AliMergeableCollection* fMergeableCollection; // collection of objects in file | |
2754fd07 | 284 | |
a58729a5 | 285 | std::set<int> fRunNumbers; // run numbers |
286 | ||
287 | TGraph* fCorrectionPerRun; // correction factor per run | |
288 | ||
1afce1ce | 289 | AliAnalysisMuMu* fAssociatedSimulation; // associated simulations (if any) |
290 | ||
291 | ClassDef(AliAnalysisMuMu,11) // class to analysis results from AliAnalysisTaskMuMuXXX tasks | |
2f331ac9 | 292 | }; |
293 | ||
294 | #endif |