1 #ifndef ALIANALYSISTASKSEMUONSHF_H
2 #define ALIANALYSISTASKSEMUONSHF_H
6 #include <TClonesArray.h>
8 #include "AliMuonsHFHeader.h"
9 #include "AliAODMuonTrack.h"
10 #include "AliAODMuonPair.h"
11 #include "AliAnalysisTaskSE.h"
13 class AliAnalysisTaskSEMuonsHF : public AliAnalysisTaskSE {
16 AliAnalysisTaskSEMuonsHF();
17 AliAnalysisTaskSEMuonsHF(const char *name);
18 virtual ~AliAnalysisTaskSEMuonsHF();
20 virtual void UserCreateOutputObjects();
21 virtual void UserExec(Option_t *opt);
22 virtual void Terminate(Option_t *opt);
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; }
28 void SetSingleMuonCuts(Double_t cuts[10]) {
29 for (Int_t i=0; i<10; i++) fSingleMuonCuts[i]=cuts[i];
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);
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);
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
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
64 enum { // distribution of dimuon
65 kInvM, // invariance mass if dimuon
66 kPtPair, // pt of dimu pair
67 kNHistDimu // number of histos of dimuon
70 enum { // MC sources of single muon
73 kPrimaryMu, // primary muon
74 kSecondaryMu, // mu<-secondary paritcle
76 kNSingleMuSrcs // number of single muon sources
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
87 enum { // different kinds of correlated dimu
91 kNMuMus // number of corr dimu kinds
94 Int_t fAnaMode; // = 0, ana both single muon and dimuon
95 // = 1, ana single muon
97 Bool_t fIsOutputTree; // flag used to switch on/off tree output
98 Bool_t fIsUseMC; // flag used to switch on/off MC ana
100 Double_t fSingleMuonCuts[10]; // 0, max of 3-momentum
101 // 1, min of 3-momentum
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
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
119 ClassDef(AliAnalysisTaskSEMuonsHF, 5);