]>
Commit | Line | Data |
---|---|---|
70da6c5a | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | // | |
16 | // Analysis task: | |
17 | // study displaced electrons from beauty and charm | |
18 | // with cut on impact parameters in various pT bins | |
19 | // | |
faee3b18 | 20 | // |
21 | // Authors: | |
22 | // Hongyan Yang <hongyan@physi.uni-heidelberg.de> | |
23 | // Carlo Bombonati <Carlo.Bombonati@cern.ch> | |
24 | // | |
25 | ||
70da6c5a | 26 | |
27 | ||
c2690925 | 28 | #ifndef ALIANALYSISTASKDISPLACEDELECTRONS_H |
29 | #define ALIANALYSISTASKDISPLACEDELECTRONS_H | |
30 | ||
70da6c5a | 31 | #ifndef ALIANALYSISTASKSE_H |
32 | #include "AliAnalysisTaskSE.h" | |
33 | #endif | |
34 | ||
35 | #ifndef ROOT_THnSparse | |
36 | #include <THnSparse.h> | |
37 | #endif | |
38 | ||
39 | class TH1I; | |
40 | class TH1F; | |
41 | class TList; | |
42 | class AliLog; | |
43 | ||
44 | class AliCFManager; | |
45 | class AliESDEvent; | |
46 | class AliESDtrackCuts; | |
47 | class AliMCEvent; | |
48 | class AliVParticle; | |
49 | ||
50 | class AliStack; | |
51 | ||
52 | class AliHFEpid; | |
53 | class AliHFEcuts; | |
54 | class AliHFEdisplacedElectrons; | |
55 | ||
56 | class AliAnalysisTaskDisplacedElectrons : public AliAnalysisTaskSE{ | |
57 | public: | |
58 | ||
59 | typedef enum{ | |
60 | kPostProcess = 0, | |
61 | kDisplacedElectrons = 1, | |
faee3b18 | 62 | kCorrection = 2, |
63 | kDePidQA = 3 | |
70da6c5a | 64 | }Switches_t; |
65 | ||
66 | enum{ | |
67 | kHasMCdata = BIT(19), | |
68 | kAODanalysis = BIT(20) | |
69 | }; | |
70 | ||
71 | AliAnalysisTaskDisplacedElectrons(); | |
72 | AliAnalysisTaskDisplacedElectrons(const char * name); | |
73 | AliAnalysisTaskDisplacedElectrons(const AliAnalysisTaskDisplacedElectrons &ref); | |
74 | AliAnalysisTaskDisplacedElectrons& operator=(const AliAnalysisTaskDisplacedElectrons &ref); | |
75 | virtual ~AliAnalysisTaskDisplacedElectrons(); | |
76 | ||
77 | virtual void UserCreateOutputObjects(); | |
78 | virtual void UserExec(Option_t *); | |
79 | // virtual void ConnectInputData(Option_t *); | |
80 | virtual void Terminate(Option_t *); | |
81 | ||
82 | void PrintStatus() const; | |
83 | ||
faee3b18 | 84 | Bool_t GetPlugin(Int_t plug) const { return TESTBIT(fDePlugins, plug); }; |
70da6c5a | 85 | void SwitchOnPlugin(Int_t plug); |
86 | ||
faee3b18 | 87 | void SetHFECuts(AliHFEcuts * const cuts) { fDeCuts = cuts; }; |
88 | void SetNclustersITS(Int_t nITSclusters){fNminITSCluster = nITSclusters;}; | |
89 | void SetMinPrimVtxContrib(Int_t nPrimVtxContrib){fNminPrimVtxContrib = nPrimVtxContrib;}; | |
90 | void SetPIDdetectors(Char_t * const detectors){ fDePIDdetectors = detectors; }; | |
91 | void SetPIDStrategy(UInt_t strategy) { fDePIDstrategy = strategy; }; | |
92 | void SetDBLevel(UInt_t debugLevel) { fDeDebugLevel = debugLevel; }; | |
70da6c5a | 93 | void AddPIDdetector(TString detector); |
94 | ||
faee3b18 | 95 | Bool_t IsAODanalysis() const { return TestBit(kAODanalysis); }; |
96 | Bool_t IsESDanalysis() const { return !TestBit(kAODanalysis); }; | |
97 | Bool_t HasMCData() const { return TestBit(kHasMCdata); } | |
70da6c5a | 98 | void SetHasMCData(Bool_t hasMC = kTRUE) { SetBit(kHasMCdata, hasMC); }; |
99 | ||
faee3b18 | 100 | void SetAODAnalysis() { SetBit(kAODanalysis, kTRUE); }; |
101 | void SetESDAnalysis() { SetBit(kAODanalysis, kFALSE); }; | |
102 | ||
103 | void ProcessMC(); | |
104 | void ProcessESD(); | |
105 | void ProcessData(); | |
106 | ||
107 | ||
70da6c5a | 108 | |
109 | private: | |
110 | ||
6555e2ad | 111 | class AliLabelContainer{ |
70da6c5a | 112 | public: |
6555e2ad | 113 | AliLabelContainer(Int_t capacity); |
114 | ~AliLabelContainer() {delete[] fContainer; }; | |
70da6c5a | 115 | |
116 | Bool_t Append(Int_t label); | |
117 | Bool_t Find(Int_t Label) const; | |
118 | Int_t Next(); | |
119 | void ResetIterator(){ fCurrent = fBegin; } | |
120 | ||
121 | private: | |
6555e2ad | 122 | AliLabelContainer(const AliLabelContainer &); |
123 | AliLabelContainer &operator=(const AliLabelContainer &); | |
70da6c5a | 124 | Int_t *fContainer; // the Container for the labels |
125 | Int_t *fBegin; // Pointer to the first entry | |
126 | Int_t *fEnd; // Pointer to the end of the container | |
127 | Int_t *fLast; // Pointer to the last entry | |
128 | Int_t *fCurrent; // Current entry to mimic an iterator | |
129 | }; | |
130 | ||
131 | void MakeParticleContainer(); | |
132 | void MakeEventContainer(); | |
133 | ||
faee3b18 | 134 | UInt_t fDeDebugLevel; // debug level |
135 | Int_t fNminITSCluster; // number of clusters in ITS | |
136 | Int_t fNminPrimVtxContrib; // number of ncontributor in ITS for prim vtx | |
137 | TString fDePIDdetectors; // Detectors for Particle Identification | |
138 | UInt_t fDePIDstrategy; // PID Strategy | |
70da6c5a | 139 | |
faee3b18 | 140 | UShort_t fDePlugins; // Enabled Plugins |
70da6c5a | 141 | |
faee3b18 | 142 | AliHFEcuts *fDeCuts; // Cut Collection |
143 | AliESDpid *fDeDefaultPID; //! ESD PID method | |
144 | AliHFEpid *fDePID; //! PID method | |
145 | AliCFManager *fDeCFM; //! Correction Framework Manager | |
70da6c5a | 146 | AliHFEdisplacedElectrons *fDisplacedElectrons; //! HFE displaced Electrons pointer |
6555e2ad | 147 | |
faee3b18 | 148 | TH1I *fDeNEvents; //! counter for the number of Events |
149 | TH1F *fElectronsMcPt; //! pt distribution of MC electrons (mcpid) | |
150 | TH1F *fElectronsEsdPt; //! pt distribution of ESD electrons (hfepid) | |
6555e2ad | 151 | TH1F *fElectronsDataPt; //! pt distribution of DATA electrons (hfepid) |
faee3b18 | 152 | TList *fDeCorrection; //! Container for correction Outpu |
153 | TList *fDeQA; //! container for the PID qa | |
70da6c5a | 154 | TList *fHistDisplacedElectrons; //! list of outputs |
155 | ||
156 | ClassDef(AliAnalysisTaskDisplacedElectrons, 1); // The DisplacedElectrons Analysis Task | |
157 | }; | |
158 | #endif | |
159 |