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