]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG/muon/AliAnalysisMuMuNch.h
Merge remote-tracking branch 'origin/master' into flatdev
[u/mrichter/AliRoot.git] / PWG / muon / AliAnalysisMuMuNch.h
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)
8  * \author L. Aphecetche and J. Martin-Bianco (Subatech)
9  */
10
11 #include "AliAnalysisMuMuBase.h"
12
13 class TH2F;
14 class TH2;
15 class AliVEvent;
16 class TAxis;
17 class TF1;
18 class AliAODVertex;
19
20 class AliAnalysisMuMuNch : public AliAnalysisMuMuBase
21 {
22 public:
23   
24   AliAnalysisMuMuNch(TH2* spdCorrection=0x0, Double_t etaMin=-0.5, Double_t etaMax=0.5
25                      , Double_t zmin=-40, Double_t zmax=40,Bool_t disableHistos=kFALSE,
26                      Bool_t computeResolution=kFALSE);
27   virtual ~AliAnalysisMuMuNch();
28   
29   Bool_t HasAtLeastNTrackletsInEtaRange(const AliVEvent& event, Int_t n,
30                                         Double_t& etaMin, Double_t& etaMax) const;
31
32   void NameOfHasAtLeastNTrackletsInEtaRange(TString& name, Int_t n,
33                                             Double_t& etaMin, Double_t& etaMax) const;
34   
35   virtual void SetEvent(AliVEvent* event, AliMCEvent* mcEvent=0x0);
36
37   virtual void Terminate(Option_t* /*opt*/="");
38
39 protected:
40
41   void AddHisto(const char* eventSelection,
42                 const char* triggerClassName,
43                 const char* centrality,
44                 const char* histoname,
45                 Double_t z,
46                 TH1* h,
47                 Bool_t isMC=kFALSE);
48   
49   void AttachSPDAcceptance(UInt_t dataType,
50                            const char* eventSelection,
51                            const char* triggerClassName,
52                            const char* centrality,const char* histoname);
53
54
55   void FillHistosForMCEvent(const char* eventSelection, const char* triggerClassName,
56               const char* centrality);
57   
58
59   void FillHistosForEvent(const char* eventSelection, const char* triggerClassName,
60                           const char* centrality);
61   
62   virtual void DefineHistogramCollection(const char* eventSelection, const char* triggerClassName,
63                                          const char* centrality);
64
65   void DefineSPDAcceptance();
66   
67   void GetEtaRangeSPD(Double_t spdZVertex, Double_t etaRange[]);
68
69   Double_t GetSPDCorrection(Double_t zvert, Double_t eta) const;
70
71 private:
72   
73   // not implemented on purpose
74   AliAnalysisMuMuNch(const AliAnalysisMuMuNch& rhs);
75   AliAnalysisMuMuNch& operator=(const AliAnalysisMuMuNch& rhs);
76   
77 private:
78   TH2F* fSPDCorrection; // Nch/Tracklets_SPD (eta vs z)
79   TAxis* fEtaAxis; // Eta axis used for the histos
80   TAxis* fZAxis;  // Z vertex axis used for the histos
81   AliVEvent* fCurrentEvent; //! cache of the current event
82   Double_t fEtaMin; // Minimum tracklet eta value 
83   Double_t fEtaMax; // Maximum tracklet eta value 
84   Double_t fZMin; // Minimum z vertex value 
85   Double_t fZMax; // Maximum z vertex value 
86   Bool_t fResolution; // Flag to set the resolution computation
87   
88   TF1* fSPD1LR; // SPD acceptance shape
89   TF1* fSPD1LL; // SPD acceptance shape
90   TF1* fSPD2LR; // SPD acceptance shape
91   TF1* fSPD2LL; // SPD acceptance shape
92   
93   ClassDef(AliAnalysisMuMuNch,1) // implementation of AliAnalysisMuMuBase for Nch analysis
94 };
95
96 #endif