]>
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" |
cb690a12 | 23 | #include "TH1.h" |
24 | #include "TH2.h" | |
2f331ac9 | 25 | |
cb690a12 | 26 | class AliAnalysisMuMuConfig; |
a58729a5 | 27 | class AliAnalysisMuMuResult; |
81190958 | 28 | class AliAnalysisMuMuJpsiResult; |
a58729a5 | 29 | class AliAnalysisMuMuSpectra; |
2f331ac9 | 30 | class AliCounterCollection; |
a58729a5 | 31 | class AliMergeableCollection; |
2f331ac9 | 32 | class TF1; |
a58729a5 | 33 | class TFile; |
2f331ac9 | 34 | class TGraph; |
81190958 | 35 | class TGraphErrors; |
a58729a5 | 36 | class TH1; |
2f331ac9 | 37 | class TMap; |
2f331ac9 | 38 | |
81dfe194 | 39 | class AliAnalysisMuMu : public TObject, public TQObject |
2f331ac9 | 40 | { |
1afce1ce | 41 | |
2f331ac9 | 42 | public: |
43 | ||
1afce1ce | 44 | AliAnalysisMuMu(const char* filename="LHC12c_muons_AOD000_000179687.saf.root", |
cb690a12 | 45 | const char* associatedSimFileName="", |
46 | const char* associatedSimFileName2="", | |
47 | const char* beamYear="pPb2013"); | |
1afce1ce | 48 | |
2f331ac9 | 49 | virtual ~AliAnalysisMuMu(); |
50 | ||
2754fd07 | 51 | /* Basic checks */ |
52 | void BasicCounts(Bool_t detailTrigger=kFALSE, | |
53 | ULong64_t* totalNmb=0x0, | |
54 | ULong64_t* totalNmsl=0x0, | |
55 | ULong64_t* totalNmul=0x0); | |
a58729a5 | 56 | |
a58729a5 | 57 | void TriggerCountCoverage(const char* triggerList, Bool_t compact=kTRUE, |
58 | Bool_t orderByTriggerCount=kTRUE); | |
59 | ||
cb690a12 | 60 | void SelectRunByTrigger(const char* triggerList); |
a58729a5 | 61 | |
62 | AliAnalysisMuMuSpectra* FitParticle(const char* particle, | |
63 | const char* trigger, | |
64 | const char* eventType, | |
65 | const char* pairCut, | |
66 | const char* centrality, | |
cb690a12 | 67 | const AliAnalysisMuMuBinning& binning, |
68 | const char* spectraType="minv", | |
69 | Bool_t corrected=kFALSE); | |
2f331ac9 | 70 | |
1afce1ce | 71 | AliAnalysisMuMuSpectra* CorrectSpectra(const char* type, const char* flavour=""); |
cb690a12 | 72 | |
73 | TH2* ComputeSPDCorrection(const char* type="oneOverAccEff", const char* eventSel="PSALL", const char* triggerSel="ANY", Bool_t bkgReject=kTRUE); | |
74 | ||
81190958 | 75 | void ComputeFnorm(); |
1afce1ce | 76 | |
cb690a12 | 77 | TH1* ComputeDiffFnormFromHistos(const char* what="psi",const char* quantity="ntrcorr",const char* flavour="JAVI",Bool_t printout=kFALSE); |
78 | ||
79 | void ComputeDiffFnormFromInt(const char* triggerCluster="MUON", const char* eventSelection="PSALLHASSPDSPDZQA_RES0.25_ZDIF0.50SPDABSZLT10.00", AliMergeableCollection* mc=0x0, const char* what="psi",const char* quantity="ntrcorr",const char* flavour="JAVI",Bool_t printout=kTRUE); | |
80 | ||
81 | void ComputeDiffFnormFromCounters(const char* triggerCluster="MUON",const char* eventSelection="PSALLHASSPDSPDZQA_RES0.25_ZDIF0.50SPDABSZLT10.00", const char* filePileUpCorr="", const char* what="psi",const char* quantity="ntrcorr",const char* flavour="JAVI",Bool_t printout=kTRUE); | |
81190958 | 82 | |
cb690a12 | 83 | void ComputeDiffFnormFromGlobal(const char* triggerCluster="MUON",const char* eventSelection="PSALLHASSPDSPDZQA_RES0.25_ZDIF0.50SPDABSZLT10.00", const char* what="psi",const char* quantity="ntrcorr",const char* flavour="JAVI",Bool_t printout=kTRUE); |
84 | ||
85 | void ComputeMeanFnorm(const char* triggerCluster="MUON", const char* eventSelection="PSALL", const char* what="psi",const char* quantity="ntrcorr",const char* flavour="JAVI", Bool_t printout=kTRUE); | |
86 | ||
87 | void ComputeIntFnormFromCounters(const char* triggerCluster="MUON", const char* eventSelection="PSALLHASSPDSPDZQA_RES0.25_ZDIF0.50SPDABSZLT10.00", const char* filePileUpCorr="", Bool_t printout=kTRUE); | |
88 | ||
89 | void PlotYiedWSyst(const char* triggerCluster="MUON"); | |
90 | ||
91 | void ComputeJpsiYield(AliMergeableCollection* oc=0x0, Bool_t relative=kFALSE, const char* fNormType="mean",const char* triggerCluster="MUON",const char* whatever="PSI-DNCHDETA-AccEffCorr",const char* sResName="",AliMergeableCollection* ocMBTrigger=0x0, Double_t mNTrCorrection=0.); | |
92 | ||
93 | void ComputeJpsiMPt(Bool_t relative=kFALSE, const char* whatever="PSI-DNCHDETA-AccEffCorr-MeanPtVsMinvUS",const char* sResName="",AliMergeableCollection* ocMBTrigger=0x0, Double_t mNTrCorrection=0.); | |
94 | ||
95 | Double_t ErrorPropagationAxBoverCxD(Double_t a,Double_t b,Double_t c,Double_t d); | |
96 | ||
97 | TH1* ComputeEquNofMB(const char* what="psi",const char* quantity="dnchdeta",const char* flavour="JAVI",Bool_t printout=kFALSE); | |
98 | ||
99 | void TwikiOutputFnorm(const char* series="FnormOffline2PUPS,FnormScalersPUPS,FnormBest2,RelDifFnormScalersPUPSvsFnormOffline2PUPS,FnormScalersPUVDM,RelDifFnormScalersPUPSvsFnormScalersPUVDM") const; | |
100 | ||
81190958 | 101 | AliAnalysisMuMuSpectra* ComputeYield(const char* type, const char* flavour=""); |
102 | ||
1afce1ce | 103 | void CleanAllSpectra(); |
104 | ||
2754fd07 | 105 | ///------ |
106 | ||
1afce1ce | 107 | // static AliAnalysisMuMuSpectra* ComputeYield(const char* realFile="ds.list.saf.root", |
108 | // const char* simFile="ds.sim.list.saf.root", | |
109 | // const char* type="PSI-Y VS PT"); | |
2f331ac9 | 110 | |
cb690a12 | 111 | AliAnalysisMuMuSpectra* RABy(const char* type="", const char* direction="pPb"); |
a58729a5 | 112 | |
a58729a5 | 113 | ///------- |
114 | ||
115 | TGraph* PlotEventSelectionEvolution(const char* trigger1="CINT7-B-NOPF-MUON", const char* event1="PSALL", | |
116 | const char* trigger2="CINT7-B-NOPF-MUON", const char* event2="PSALL", | |
117 | Bool_t drawFills=kFALSE, | |
118 | Bool_t asRejection=kTRUE) const; | |
119 | ||
120 | Bool_t Upgrade(); | |
121 | ||
cb690a12 | 122 | Bool_t Upgrade(const char* filename); |
a58729a5 | 123 | |
cb690a12 | 124 | TObjArray* CompareJpsiPerCMUUWithBackground(const char* jpsiresults="results.root", |
2f331ac9 | 125 | const char* backgroundresults="background.lhc11d.root"); |
a58729a5 | 126 | |
cb690a12 | 127 | TGraph* CompareJpsiPerCMUUWithSimu(const char* realjpsiresults="results.root", |
128 | const char* simjpsiresults="results.sim.root"); | |
2f331ac9 | 129 | |
a58729a5 | 130 | |
2f331ac9 | 131 | static TFile* FileOpen(const char* file); |
132 | ||
cb690a12 | 133 | static TString ExpandPathName(const char* file); |
134 | ||
a58729a5 | 135 | |
cb690a12 | 136 | Bool_t GetCollections(const char* rootfile, |
137 | AliMergeableCollection*& oc, | |
138 | AliCounterCollection*& cc, | |
139 | AliAnalysisMuMuBinning*& bin, | |
140 | std::set<int>& runnumbers); | |
2f331ac9 | 141 | |
1afce1ce | 142 | AliAnalysisMuMuSpectra* GetSpectra(const char* what, const char* flavour="") const; |
2f331ac9 | 143 | |
cb690a12 | 144 | TH1* PlotAccEfficiency(const char* whatever="PSI-INTEGRATED"); |
a58729a5 | 145 | |
cb690a12 | 146 | TH1* PlotJpsiYield(const char* whatever="PSI-DNCHDETA-AccEffCorr"); |
a58729a5 | 147 | |
cb690a12 | 148 | TH1* PlotSystematicsTestsRelative(const char* quantity,const char* flavour,const char* value2Test); |
a58729a5 | 149 | |
cb690a12 | 150 | UInt_t GetSum(AliCounterCollection& cc, const char* triggerList, const char* eventSelection, Int_t runNumber=-1); |
2f331ac9 | 151 | |
cb690a12 | 152 | ULong64_t GetTriggerScalerCount(const char* triggerList, Int_t runNumber); |
2f331ac9 | 153 | |
cb690a12 | 154 | Int_t Jpsi(const char* what="integrated", const char* binningFlavour="", Bool_t fitmPt=kFALSE); |
2754fd07 | 155 | |
cb690a12 | 156 | Bool_t IsSimulation() const; |
2754fd07 | 157 | |
cb690a12 | 158 | AliMergeableCollection* OC() const { return fMergeableCollection; } |
2f331ac9 | 159 | AliCounterCollection* CC() const { return fCounterCollection; } |
a58729a5 | 160 | AliAnalysisMuMuBinning* BIN() const { return fBinning; } |
cb690a12 | 161 | |
a58729a5 | 162 | void Print(Option_t* opt="") const; |
163 | ||
a58729a5 | 164 | const std::set<int>& RunNumbers() const { return fRunNumbers; } |
165 | ||
166 | void DrawMinv(const char* type, | |
167 | const char* particle, | |
168 | const char* trigger, | |
169 | const char* eventType, | |
170 | const char* pairCut, | |
1afce1ce | 171 | const char* centrality, |
172 | const char* subresultname="", | |
173 | const char* flavour="") const; | |
a58729a5 | 174 | |
1afce1ce | 175 | void DrawMinv(const char* type="PT", const char* particle="PSI", const char* flavour="", const char* subresultname="") const; |
a58729a5 | 176 | |
1afce1ce | 177 | Bool_t SetCorrectionPerRun(const TGraph& corr, const char* formula=""); |
a58729a5 | 178 | |
179 | void UnsetCorrectionPerRun(); | |
180 | ||
1afce1ce | 181 | void ExecuteCanvasEvent(Int_t event, Int_t px, Int_t py, TObject *sel); |
182 | ||
339d4b81 | 183 | // std::vector<Double_t> GetMCCB2Tails(const AliAnalysisMuMuBinning::Range& bin) const; // Not implemented |
1afce1ce | 184 | |
185 | AliAnalysisMuMu* SIM() const { return fAssociatedSimulation; } | |
186 | ||
cb690a12 | 187 | AliAnalysisMuMu* SIM2() const { return fAssociatedSimulation2; } |
188 | ||
1afce1ce | 189 | AliAnalysisMuMuSpectra* SPECTRA(const char* fullpath) const; |
190 | ||
cb690a12 | 191 | void SetParticleName(const char* particleName) { fParticleName = particleName; } |
192 | ||
193 | const char* GetParticleName() { return fParticleName; } | |
194 | ||
1afce1ce | 195 | void Update(); |
196 | ||
cb690a12 | 197 | AliAnalysisMuMuConfig* Config(); |
198 | ||
199 | AliAnalysisMuMuConfig* Config() const { return fConfig; } | |
200 | ||
201 | void SetConfig(const AliAnalysisMuMuConfig& config); | |
202 | ||
203 | void SetCentralitySelectionList(const char* centralitySelectionList); | |
204 | ||
5597c928 | 205 | private: |
206 | AliAnalysisMuMu(const AliAnalysisMuMu& rhs); // not implemented on purpose | |
207 | AliAnalysisMuMu& operator=(const AliAnalysisMuMu& rhs); // not implemented on purpose | |
208 | ||
cb690a12 | 209 | void ShowList(const char* title, const TString& list, const char separator=',') const; |
210 | ||
a58729a5 | 211 | TFile* ReOpen(const char* filename, const char* mode) const; |
212 | ||
213 | TString First(const TString& list) const; | |
214 | ||
cb690a12 | 215 | void GetParametersFromMC(TString& fitType, const char* pathCentrPairCut, const char* spectraName, AliAnalysisMuMuBinning::Range* bin) const; |
216 | void GetParametersFromResult(TString& fitType, AliAnalysisMuMuJpsiResult* minvResult) const; | |
217 | ||
2f331ac9 | 218 | private: |
219 | ||
81190958 | 220 | void SetNofInputParticles(AliAnalysisMuMuJpsiResult& r); |
2f331ac9 | 221 | |
1afce1ce | 222 | |
a58729a5 | 223 | TString fFilename; // file containing the result collections (of objects and counters) from AliAnalysisTaskMuMu |
2f331ac9 | 224 | AliCounterCollection* fCounterCollection; // collection of counters in file |
1afce1ce | 225 | |
a58729a5 | 226 | AliAnalysisMuMuBinning* fBinning; // binning |
227 | ||
a58729a5 | 228 | AliMergeableCollection* fMergeableCollection; // collection of objects in file |
2754fd07 | 229 | |
a58729a5 | 230 | std::set<int> fRunNumbers; // run numbers |
231 | ||
232 | TGraph* fCorrectionPerRun; // correction factor per run | |
233 | ||
1afce1ce | 234 | AliAnalysisMuMu* fAssociatedSimulation; // associated simulations (if any) |
cb690a12 | 235 | AliAnalysisMuMu* fAssociatedSimulation2; // second associated simulations (if any) |
236 | ||
237 | TString fParticleName; // Name of the simulated particle in the associated simulations | |
1afce1ce | 238 | |
cb690a12 | 239 | AliAnalysisMuMuConfig* fConfig; // configuration |
240 | ||
241 | ClassDef(AliAnalysisMuMu,12) // class to analysis results from AliAnalysisTaskMuMuXXX tasks | |
2f331ac9 | 242 | }; |
243 | ||
244 | #endif |