]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/muon/AliAnalysisTaskSEMuonsHF.h
The description of changes:
[u/mrichter/AliRoot.git] / PWG3 / muon / AliAnalysisTaskSEMuonsHF.h
1 #ifndef ALIANALYSISTASKSEMUONSHF_H
2 #define ALIANALYSISTASKSEMUONSHF_H
3
4 #include <TString.h>
5 #include <TList.h>
6 #include <TClonesArray.h>
7
8 #include "AliMuonsHFHeader.h"
9 #include "AliAODMuonTrack.h"
10 #include "AliAODMuonPair.h"
11 #include "AliAnalysisTaskSE.h"
12
13 class AliAnalysisTaskSEMuonsHF : public AliAnalysisTaskSE {
14  public:
15
16   AliAnalysisTaskSEMuonsHF();
17   AliAnalysisTaskSEMuonsHF(const char *name);
18   virtual ~AliAnalysisTaskSEMuonsHF();
19
20   virtual void UserCreateOutputObjects();
21   virtual void UserExec(Option_t *opt);
22   virtual void Terminate(Option_t *opt);
23
24   void SetAnaMode(Int_t mode) { fAnaMode = (mode<3 ? mode: 0); }
25   void SetIsOutputTree(Bool_t ist) { fIsOutputTree = ist; }
26   void SetIsUseMC(Bool_t isMC) { fIsUseMC = isMC; }
27
28   void SetSingleMuonCuts(Double_t cuts[10]) {
29     for (Int_t i=0; i<10; i++) fSingleMuonCuts[i]=cuts[i];
30   }
31
32  private:
33
34   void CreateOutoutHistosAtEvnetLevel();
35   void CreateOutputHistosSingleMuon();
36   void CreateOutputHistosDimuon();
37   void CreateOutputHistosSingleMuonMC(Int_t *nbins, Double_t *xlow, Double_t *xup,
38                                       TString *name, TString *axis, TString *unit);
39   void CreateOutputHistosDimuonMC(Int_t *nbins, Double_t *xlow, Double_t *xup,
40                                   TString *name, TString *axis, TString *unit,
41                                   TString *dimuName, TString *dimuTitle);
42
43   void FillDistributionsAtEventLeavel();
44   void FillDistributionsSingleMuon(AliAODMuonTrack *track, Int_t src=-1);
45   void FillDistributionsDimuon(AliAODMuonPair *pair, Int_t src=-1);
46   void FillDistributionsSingleMuonMC(Double_t *disMu, Int_t src);
47   void FillDistributionsDimuonMC(Double_t *disDimu, Int_t dimuK, Int_t src);
48
49   enum {  // histos at event level
50     kHistVx,    // x position of vtx
51     kHistVy,    // y position of vtx
52     kHistVz,    // z position of vtx
53     kHistMult,  // multiplicity of single muon track
54     kNHistEv    // number of histos at event level
55   };
56   enum {  // distributions of single mu
57     kHistP,    // histo of single mu p
58     kHistPt,   // histo of single mu pt
59     kHistEta,  // histo of single mu eta
60     kHistDca,  // histo of single mu DCA
61     kHistTrg,  // histo of single mu pass trigger
62     kNHistMu   // number of histos of single mu
63   };
64   enum {  // distribution of dimuon
65     kInvM,      // invariance mass if dimuon
66     kPtPair,    // pt of dimu pair
67     kNHistDimu  // number of histos of dimuon
68   };
69
70   enum {  // MC sources of single muon
71     kBeautyMu,      // mu<-b
72     kCharmMu,       // mu<-c
73     kPrimaryMu,     // primary muon
74     kSecondaryMu,   // mu<-secondary paritcle
75     kNotMu,         // not muon
76     kNSingleMuSrcs  // number of single muon sources
77   };
78   enum {  // MC soureces of dimuon
79     kBBdiff,     // dimuon<-BB_diff
80     kBchain,     // dimuon<-B-chain
81     kDDdiff,     // dimuon<-DD_diff
82     kDchain,     // dimuon<-D-chain
83     kResonance,  // dimuon<-resonances
84     kUncorr,     // uncorr dimuon
85     kNDimuSrcs   // number of dimuon sources
86   };
87   enum {  // different kinds of correlated dimu
88     kMuNMuP,  // mu-mu+
89     kMuNMuN,  // mu-mu-
90     kMuPMuP,  // mu+mu+
91     kNMuMus   // number of corr dimu kinds
92   };
93
94   Int_t fAnaMode;  // = 0, ana both single muon and dimuon
95                    // = 1, ana single muon
96                    // = 2, ana dimuon
97   Bool_t fIsOutputTree;  // flag used to switch on/off tree output
98   Bool_t fIsUseMC;       // flag used to switch on/off MC ana
99
100   Double_t fSingleMuonCuts[10];  // 0, max of 3-momentum
101                                  // 1, min of 3-momentum
102                                  // 2, pt_Min
103                                  // 3, pt_Max
104                                  // 4, eta_Min
105                                  // 5, eta_Max
106                                  // 6, dca_Min
107                                  // 7, dca_Max
108                                  // 8, about trigger
109                                  // 9, about trigger
110
111   AliMuonsHFHeader *fHeader;   // output clones array for info at ev level
112   TClonesArray *fMuTrkClArr;   // output clones array for single mu
113   TClonesArray *fMuPairClArr;  // output clones array for dimu
114
115   TList *fListHisAtEvLevel;   // output list of histos at event level
116   TList *fListHisSingleMuon;  // output list of histos for single mu
117   TList *fListHisDimuon;      // output list of histos for dimuon
118
119   ClassDef(AliAnalysisTaskSEMuonsHF, 5);
120 };
121
122 #endif