]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/hfe/AliAnalysisTaskDisplacedElectrons.h
Commented call to AliDebug
[u/mrichter/AliRoot.git] / PWG3 / hfe / AliAnalysisTaskDisplacedElectrons.h
1 #ifndef ALIANALYSISTASKDISPLACEDELECTRONS_H
2 #define ALIANALYSISTASKDISPLACEDELECTRONS_H
3
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 **************************************************************************/
18
19 /* $Id$ */ 
20
21 //
22 // Analysis task: 
23 // study displaced electrons from beauty and charm 
24 // with cut on impact parameters in various pT bins
25 // 
26 //
27 // Authors:
28 //  Hongyan Yang <hongyan@physi.uni-heidelberg.de>
29 //  Carlo Bombonati <Carlo.Bombonati@cern.ch>
30 // 
31
32
33
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, 
65     kCorrection = 2,
66     kDePidQA = 3
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   
87   Bool_t GetPlugin(Int_t plug) const { return TESTBIT(fDePlugins, plug); };
88   void SwitchOnPlugin(Int_t plug);
89
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); 
97  
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); };
102   
103   void SetAODAnalysis() { SetBit(kAODanalysis, kTRUE); };
104   void SetESDAnalysis() { SetBit(kAODanalysis, kFALSE); };
105
106   void ProcessMC();
107   void ProcessESD();
108   void ProcessData();
109   
110
111   
112  private:
113   
114   class AliLabelContainer{
115   public:
116     AliLabelContainer(Int_t capacity);
117     ~AliLabelContainer() {delete[] fContainer; };
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:
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
132   };
133     
134   void MakeParticleContainer();
135   void MakeEventContainer();
136
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
142
143   UShort_t fDePlugins;                    // Enabled Plugins    
144
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 
150                                 
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
158  
159   ClassDef(AliAnalysisTaskDisplacedElectrons, 1);      // The DisplacedElectrons Analysis Task
160 };
161 #endif
162