]>
Commit | Line | Data |
---|---|---|
5376e016 CP |
1 | #ifndef ALIANALYSISMUMUNCH_H |
2 | #define ALIANALYSISMUMUNCH_H | |
3 | ||
4 | /** | |
5 | * | |
6 | * \class AliAnalysisMuMuNch | |
7 | * \brief Charged particle multiplicity analysis (for plotting muon variables against it) | |
16560e8e | 8 | * \author L. Aphecetche and J. Martin Blanco (Subatech) |
5376e016 CP |
9 | */ |
10 | ||
11 | #include "AliAnalysisMuMuBase.h" | |
16560e8e | 12 | #include "TRandom3.h" |
13 | #include "TMap.h" | |
5376e016 CP |
14 | |
15 | class TH2F; | |
16 | class TH2; | |
17 | class AliVEvent; | |
16560e8e | 18 | class AliAODTracklets; |
5376e016 CP |
19 | class TAxis; |
20 | class TF1; | |
21 | class AliAODVertex; | |
22 | ||
23 | class AliAnalysisMuMuNch : public AliAnalysisMuMuBase | |
24 | { | |
25 | public: | |
26 | ||
16560e8e | 27 | AliAnalysisMuMuNch(TH2F* spdCorrection=0x0, TProfile* spdMeanCorrection = 0x0, Double_t meanTrRef=-1., Double_t etaMin=-0.5, Double_t etaMax=0.5 |
28 | , Double_t zmin=-10., Double_t zmax=10., Bool_t disableHistos=kFALSE ,Bool_t computeResolution=kFALSE); | |
29 | ||
30 | AliAnalysisMuMuNch(TProfile* spdMeanCorrection, TProfile* spdMeanCorrectionToCompare, Double_t meanTrRef=-1., Double_t etaMin=-1.0, | |
31 | Double_t etaMax=1.0, Double_t zMin=-10., Double_t zMax=10., Double_t etaMinToCompare=-0.5, Double_t etaMaxToCompare=0.5,Bool_t disableHistos=kFALSE, Bool_t computeResolution=kFALSE); | |
32 | ||
33 | AliAnalysisMuMuNch(TObjArray* spdCorrectionList, Double_t meanTrRef=-1., Double_t etaMin=-0.5, Double_t etaMax=0.5 | |
34 | , Double_t zmin=-10, Double_t zmax=10, Bool_t disableHistos=kFALSE ,Bool_t computeResolution=kFALSE); | |
35 | ||
5376e016 CP |
36 | virtual ~AliAnalysisMuMuNch(); |
37 | ||
16560e8e | 38 | void DefineGeneratorName(const char* genName); |
39 | ||
5376e016 CP |
40 | Bool_t HasAtLeastNTrackletsInEtaRange(const AliVEvent& event, Int_t n, |
41 | Double_t& etaMin, Double_t& etaMax) const; | |
42 | ||
43 | void NameOfHasAtLeastNTrackletsInEtaRange(TString& name, Int_t n, | |
44 | Double_t& etaMin, Double_t& etaMax) const; | |
45 | ||
46 | virtual void SetEvent(AliVEvent* event, AliMCEvent* mcEvent=0x0); | |
16560e8e | 47 | |
48 | void SetRun(const AliInputEventHandler* eventHandler); | |
49 | ||
50 | virtual void Terminate(Option_t *); | |
5376e016 CP |
51 | |
52 | protected: | |
53 | ||
54 | void AddHisto(const char* eventSelection, | |
55 | const char* triggerClassName, | |
56 | const char* centrality, | |
57 | const char* histoname, | |
58 | Double_t z, | |
59 | TH1* h, | |
60 | Bool_t isMC=kFALSE); | |
61 | ||
62 | void AttachSPDAcceptance(UInt_t dataType, | |
63 | const char* eventSelection, | |
64 | const char* triggerClassName, | |
65 | const char* centrality,const char* histoname); | |
66 | ||
67 | ||
68 | void FillHistosForMCEvent(const char* eventSelection, const char* triggerClassName, | |
69 | const char* centrality); | |
70 | ||
71 | ||
72 | void FillHistosForEvent(const char* eventSelection, const char* triggerClassName, | |
73 | const char* centrality); | |
74 | ||
75 | virtual void DefineHistogramCollection(const char* eventSelection, const char* triggerClassName, | |
76 | const char* centrality); | |
77 | ||
78 | void DefineSPDAcceptance(); | |
79 | ||
16560e8e | 80 | Bool_t GetEtaRangeSPD(Double_t spdZVertex, Double_t etaRange[]); |
5376e016 CP |
81 | |
82 | Double_t GetSPDCorrection(Double_t zvert, Double_t eta) const; | |
16560e8e | 83 | |
84 | Double_t GetTrackletsMeanCorrection(Double_t zvert, Int_t nTracklets,Bool_t corrToCompare=kFALSE) const; | |
85 | ||
86 | AliAODTracklets* GetTracklets(AliVEvent* event); | |
87 | ||
88 | Bool_t IsMCtrackFromGenerator(Int_t indexMC) const; | |
89 | ||
d8571762 | 90 | private: |
91 | ||
16560e8e | 92 | Double_t NumberOfTrackletsInEtaRange(const AliVEvent& event, Double_t& etamin, |
93 | Double_t& etamax, Bool_t corrected=kFALSE) const; | |
94 | ||
95 | void DefineSPDCorrectionMap(TObjArray* spdCorrectionList); | |
d8571762 | 96 | |
5376e016 | 97 | private: |
16560e8e | 98 | TH2F* fSPDOneOverAccxEff; // Nch/Tracklets_SPD (eta vs z). SPD AccxEffCorrection for tracklets |
99 | TMap* fSPDCorrectionMap; // Map for the SPD AccxEffCorrections or Mean Tracklets corrections for different subperiods | |
100 | TObjArray* fSPDCorrectionList; // List of SPD AccxEffCorrections or Mean Tracklets corrections for different subperiods | |
101 | TProfile* fSPDMeanTracklets; // <Tracklets_SPD> vs zvtx. 'mean' correction for tracklets | |
102 | TProfile* fSPDMeanTrackletsCorrToCompare; // <Tracklets_SPD> vs zvtx. 'mean' correction for tracklets in the range for comparison with the main range | |
5376e016 CP |
103 | TAxis* fEtaAxis; // Eta axis used for the histos |
104 | TAxis* fZAxis; // Z vertex axis used for the histos | |
105 | AliVEvent* fCurrentEvent; //! cache of the current event | |
16560e8e | 106 | Double_t fMeanTrRef; // Mean reference number of tracklets for mean tracklets correction |
5376e016 | 107 | Double_t fEtaMin; // Minimum tracklet eta value |
16560e8e | 108 | Double_t fEtaMax; // Maximum tracklet eta value |
109 | Double_t fEtaMinToCompare; // Minimum tracklet eta value for the comparison | |
110 | Double_t fEtaMaxToCompare; // Maximum tracklet eta value for the comparison | |
111 | Double_t fetaRange[2]; | |
5376e016 CP |
112 | Double_t fZMin; // Minimum z vertex value |
113 | Double_t fZMax; // Maximum z vertex value | |
114 | Bool_t fResolution; // Flag to set the resolution computation | |
16560e8e | 115 | TRandom3* frand; |
116 | TString* fGeneratorHeaderClass; // Class of the header MC generator | |
5376e016 CP |
117 | |
118 | TF1* fSPD1LR; // SPD acceptance shape | |
119 | TF1* fSPD1LL; // SPD acceptance shape | |
120 | TF1* fSPD2LR; // SPD acceptance shape | |
121 | TF1* fSPD2LL; // SPD acceptance shape | |
122 | ||
16560e8e | 123 | ClassDef(AliAnalysisMuMuNch,4) // implementation of AliAnalysisMuMuBase for Nch analysis |
5376e016 CP |
124 | }; |
125 | ||
126 | #endif |