1 #ifndef ALIANALYSISTASKDISPLACEDELECTRONS_H
2 #define ALIANALYSISTASKDISPLACEDELECTRONS_H
4 /**************************************************************************
5 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
7 * Author: The ALICE Off-line Project. *
8 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
23 // study displaced electrons from beauty and charm
24 // with cut on impact parameters in various pT bins
28 // Hongyan Yang <hongyan@physi.uni-heidelberg.de>
29 // Carlo Bombonati <Carlo.Bombonati@cern.ch>
34 #ifndef ALIANALYSISTASKSE_H
35 #include "AliAnalysisTaskSE.h"
38 #ifndef ROOT_THnSparse
39 #include <THnSparse.h>
49 class AliESDtrackCuts;
57 class AliHFEdisplacedElectrons;
59 class AliAnalysisTaskDisplacedElectrons : public AliAnalysisTaskSE{
64 kDisplacedElectrons = 1,
71 kAODanalysis = BIT(20)
74 AliAnalysisTaskDisplacedElectrons();
75 AliAnalysisTaskDisplacedElectrons(const char * name);
76 AliAnalysisTaskDisplacedElectrons(const AliAnalysisTaskDisplacedElectrons &ref);
77 AliAnalysisTaskDisplacedElectrons& operator=(const AliAnalysisTaskDisplacedElectrons &ref);
78 virtual ~AliAnalysisTaskDisplacedElectrons();
80 virtual void UserCreateOutputObjects();
81 virtual void UserExec(Option_t *);
82 // virtual void ConnectInputData(Option_t *);
83 virtual void Terminate(Option_t *);
85 void PrintStatus() const;
87 Bool_t GetPlugin(Int_t plug) const { return TESTBIT(fDePlugins, plug); };
88 void SwitchOnPlugin(Int_t plug);
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; };
96 void AddPIDdetector(TString detector);
98 Bool_t IsAODanalysis() const { return TestBit(kAODanalysis); };
99 Bool_t IsESDanalysis() const { return !TestBit(kAODanalysis); };
100 Bool_t HasMCData() const { return TestBit(kHasMCdata); }
101 void SetHasMCData(Bool_t hasMC = kTRUE) { SetBit(kHasMCdata, hasMC); };
103 void SetAODAnalysis() { SetBit(kAODanalysis, kTRUE); };
104 void SetESDAnalysis() { SetBit(kAODanalysis, kFALSE); };
114 class AliLabelContainer{
116 AliLabelContainer(Int_t capacity);
117 ~AliLabelContainer() {delete[] fContainer; };
119 Bool_t Append(Int_t label);
120 Bool_t Find(Int_t Label) const;
122 void ResetIterator(){ fCurrent = fBegin; }
125 AliLabelContainer(const AliLabelContainer &);
126 AliLabelContainer &operator=(const AliLabelContainer &);
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
134 void MakeParticleContainer();
135 void MakeEventContainer();
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
143 UShort_t fDePlugins; // Enabled Plugins
145 AliHFEcuts *fDeCuts; // Cut Collection
146 AliESDpid *fDeDefaultPID; //! ESD PID method
147 AliHFEpid *fDePID; //! PID method
148 AliCFManager *fDeCFM; //! Correction Framework Manager
149 AliHFEdisplacedElectrons *fDisplacedElectrons; //! HFE displaced Electrons pointer
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)
154 TH1F *fElectronsDataPt; //! pt distribution of DATA electrons (hfepid)
155 TList *fDeCorrection; //! Container for correction Outpu
156 TList *fDeQA; //! container for the PID qa
157 TList *fHistDisplacedElectrons; //! list of outputs
159 ClassDef(AliAnalysisTaskDisplacedElectrons, 1); // The DisplacedElectrons Analysis Task