]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/JET/AliHLTJETReader.h
Fix due to change of method name in CORRFW
[u/mrichter/AliRoot.git] / HLT / JET / AliHLTJETReader.h
1 //-*- Mode: C++ -*-
2
3 // $Id:  $
4
5 #ifndef ALIHLTJETREADER_H
6 #define ALIHLTJETREADER_H
7
8 /* This file is property of and copyright by the ALICE HLT Project        * 
9  * ALICE Experiment at CERN, All rights reserved.                         *
10  * See cxx source for full Copyright notice                               */
11
12 /** @file   AliHLTJETReader.h
13     @author Jochen Thaeder
14     @date   
15     @brief  Reader for jet finder
16 */
17
18 #ifdef HAVE_FASTJET
19 #include "fastjet/PseudoJet.hh"
20 #endif
21
22 #include "AliJetReader.h"
23 #include "AliJetReaderHeader.h"
24
25 #include "AliESDEvent.h"
26 #include "AliAODEvent.h"
27
28
29 #include "AliHLTLogging.h"
30 #include "AliHLTMCEvent.h"
31
32 #include "AliHLTJETBase.h"
33 #include "AliHLTJETTrackCuts.h"
34 #include "AliHLTJETReaderHeader.h"
35
36 #include "AliHLTJETConeSeedCuts.h"
37 #include "AliHLTJETConeGrid.h"
38
39 /**
40  * @class  AliHLTJETReader
41  * Reader for jet finder
42  *
43  * @ingroup alihlt_jet
44  */
45
46 class AliHLTJETReader : public AliJetReader, public AliHLTLogging {
47   
48 public:
49
50   /*
51    * ---------------------------------------------------------------------------------
52    *                            Constructor / Destructor
53    * ---------------------------------------------------------------------------------
54    */
55
56   /** standard constructor */
57   AliHLTJETReader();
58
59   /** destructor */
60   virtual ~AliHLTJETReader();
61
62   /*
63    * ---------------------------------------------------------------------------------
64    *                                Initialize / Reset
65    * ---------------------------------------------------------------------------------
66    */
67
68
69   void SetTrackCuts( AliHLTJETTrackCuts * cuts) {fTrackCuts = cuts; }
70
71   /** Initialize reader for cone jet finder
72    *  Calls AliHLTJETReaderHeader::Initialize
73    *  @return 0 on success, otherwise <0
74    */
75   Int_t Initialize();
76  
77   /** Reset the event */
78   void ResetEvent();
79
80   /*
81    * ---------------------------------------------------------------------------------
82    *                            Fastjet Reader functionality
83    * ---------------------------------------------------------------------------------
84    */
85
86 #ifdef HAVE_FASTJET
87   /** Fill tracks in fastjet momemtum vector
88    *  @return kTRUE on success, otherwise kFALSE
89    */
90   Bool_t FillMomentumArrayFast();
91
92   /** Fill MC tracks in fastjet momemtum vector
93    *  @return kTRUE on success, otherwise kFALSE
94    */
95   Bool_t FillMomentumArrayFastMC();
96
97   /** Fill ESD tracks in fastjet momemtum vector
98    *  @return kTRUE on success, otherwise kFALSE
99    */
100   Bool_t FillMomentumArrayFastESD();
101
102   /** Fill AOD tracks in fastjet momemtum vector
103    *  @return kTRUE on success, otherwise kFALSE
104    */
105   Bool_t FillMomentumArrayFastAOD();
106 #endif
107
108   /*
109    * ---------------------------------------------------------------------------------
110    *                               Grid functionality
111    * ---------------------------------------------------------------------------------
112    */
113   
114   /** Fill tracks in momentum array 
115    *  @return kTRUE on success, otherwise kFALSE
116    */
117   Bool_t FillGrid();
118
119   /** Fill MC tracks in momentum array 
120    *  @return kTRUE on success, otherwise kFALSE
121    */
122   Bool_t FillGridMC();
123
124   /** Fill ESD tracks in momentum array 
125    *  @return kTRUE on success, otherwise kFALSE
126    */
127   Bool_t FillGridESD();
128
129   /** Fill AOD tracks in momentum array 
130    *  @return kTRUE on success, otherwise kFALSE
131    */
132   Bool_t FillGridAOD();
133
134   /*
135    * ---------------------------------------------------------------------------------
136    *                                     Setter
137    * ---------------------------------------------------------------------------------
138    */
139   
140   /** Set pointer to input event
141    *  @param esd an AliESDEvent
142    *  @param aod an AliAODEvent
143    *  @param mc an AliHLTMCEvent
144    */
145   void SetInputEvent(TObject* esd, TObject* aod, TObject* mc);
146
147   /** Set number of jet candates = seeds */
148   void SetNJetCandidates( Int_t i ) { fNJetCandidates = i; }
149
150   /*
151    * ---------------------------------------------------------------------------------
152    *                                     Getter
153    * ---------------------------------------------------------------------------------
154    */
155
156   /** Get Ptr to AliHLTJETReaderHeader
157    *  @return ptr to AliHLTJETReaderHeader
158    */
159   AliHLTJETReaderHeader* GetReaderHeader() { return dynamic_cast<AliHLTJETReaderHeader*>(fReaderHeader);}
160
161 #ifdef HAVE_FASTJET
162   /** Get Ptr to input vector of Fastjet
163    *  @return ptr to input vector of Fastjet
164    */
165   vector<fastjet::PseudoJet>* GetMomentumVectorFast() { return fMomentumVector; }
166 #endif
167
168   /** Get Ptr to grid of cone finder
169    *  @return ptr to grid of cone finder
170    */
171   AliHLTJETConeGrid* GetGrid() { return fGrid; }
172   
173   /** Get number of jet candates = seeds */
174   Int_t         GetNJetCandidates() { return fNJetCandidates; }
175
176   /** Get ptr to jet candiates = seeds for cone finder */
177   TClonesArray* GetJetCandidates()  { return fJetCandidates; }
178
179   /*
180    * ---------------------------------------------------------------------------------
181    *                                     Seeds
182    * ---------------------------------------------------------------------------------
183    */
184
185   /** Add new seed
186    *  @param aEtaPhi     eta and phi of the seed
187    *  @param aGridIdx    indeces in the grid
188    *  @param coneRadius  coneRadius
189    */
190   void AddSeed( const Float_t* aEtaPhi, const Int_t* aGridIdx, 
191                 const Float_t coneRadius );
192
193   ///////////////////////////////////////////////////////////////////////////////////
194
195 private:
196
197   /** copy constructor prohibited */
198   AliHLTJETReader (const AliHLTJETReader&);
199
200   /** assignment operator prohibited */
201   AliHLTJETReader& operator= (const AliHLTJETReader&);
202
203   /*
204    * ---------------------------------------------------------------------------------
205    *                             Members - private
206    * ---------------------------------------------------------------------------------
207    */
208
209   /** ESD event */
210   AliESDEvent                 *fESD;            //! transient
211
212   /** MC event */
213   AliHLTMCEvent               *fMC;             //! transient
214
215   /** AOD event */
216   AliAODEvent                 *fAOD;            //! transient
217
218 #ifdef HAVE_FASTJET
219   /** Vector of fastjet momemtum entries */
220   vector<fastjet::PseudoJet>  *fMomentumVector; //! transient
221 #endif
222
223   /** Grid for cone finder */
224   AliHLTJETConeGrid           *fGrid;           //! transient
225
226   /** Number of jet candates = seeds */
227   Int_t                        fNJetCandidates; // see above
228
229   /** Jet candiates = seeds for cone finder */
230   TClonesArray                *fJetCandidates;  //! transient
231
232   /** Ptr to seed cuts */
233   AliHLTJETConeSeedCuts       *fSeedCuts;       //! transient
234
235   /** Ptr to track cuts */
236   AliHLTJETTrackCuts          *fTrackCuts;      //! transient
237
238   ClassDef(AliHLTJETReader, 1)
239
240 };
241 #endif
242