5 #ifndef ALIHLTJETREADER_H
6 #define ALIHLTJETREADER_H
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 */
12 /** @file AliHLTJETReader.h
13 @author Jochen Thaeder
15 @brief Reader for jet finder
19 #include "fastjet/PseudoJet.hh"
22 #include "AliJetReader.h"
23 #include "AliJetReaderHeader.h"
25 #include "AliESDEvent.h"
26 #include "AliAODEvent.h"
28 #include "AliHLTLogging.h"
29 #include "AliHLTMCEvent.h"
31 #include "AliHLTJETBase.h"
32 #include "AliHLTJETTrackCuts.h"
33 #include "AliHLTJETReaderHeader.h"
35 #include "AliHLTJETConeSeedCuts.h"
36 #include "AliHLTJETConeGrid.h"
39 * @class AliHLTJETReader
40 * This class is the reader class for the JetFinder in the HLT
41 * It implements the reading of ESDs and MCs. AOD reading is
45 * - Initilize() // Initializes the reader dependent of the algorithm
50 class AliHLTJETReader : public AliJetReader, public AliHLTLogging {
55 * ---------------------------------------------------------------------------------
56 * Constructor / Destructor
57 * ---------------------------------------------------------------------------------
60 /** standard constructor */
64 virtual ~AliHLTJETReader();
67 * ---------------------------------------------------------------------------------
69 * ---------------------------------------------------------------------------------
73 * Calls AliHLTJETReaderHeader::Initialize
74 * and the private Initialize methods
75 * @return 0 on success, otherwise <0
79 /** Reset the event */
83 * ---------------------------------------------------------------------------------
85 * ---------------------------------------------------------------------------------
88 /** Set pointer to input event
89 * Needs "useMC" flag for running in analysis task only
90 * @param esd an AliESDEvent
91 * @param aod an AliAODEvent
92 * @param mc an AliHLTMCEvent
94 void SetInputEvent(const TObject* esd, const TObject* aod, const TObject* mc);
96 /** Set number of jet candates = seeds */
97 void SetNJetCandidates( Int_t i ) { fNJetCandidates = i; }
100 * ---------------------------------------------------------------------------------
101 * Fastjet Reader functionality
102 * ---------------------------------------------------------------------------------
106 /** Fill tracks in fastjet momemtum vector
107 * @return kTRUE on success, otherwise kFALSE
111 /** Fill MC tracks in fastjet momemtum vector
112 * @return kTRUE on success, otherwise kFALSE
114 Bool_t FillVectorMC();
116 /** Fill HLT MC tracks in fastjet momemtum vector
117 * @return kTRUE on success, otherwise kFALSE
119 Bool_t FillVectorHLTMC();
121 /** Fill ESD tracks in fastjet momemtum vector
122 * @return kTRUE on success, otherwise kFALSE
124 Bool_t FillVectorESD();
126 /** Fill AOD tracks in fastjet momemtum vector
127 * @return kTRUE on success, otherwise kFALSE
129 Bool_t FillVectorAOD();
133 * ---------------------------------------------------------------------------------
135 * ---------------------------------------------------------------------------------
138 /** Fill tracks in momentum array
139 * @return kTRUE on success, otherwise kFALSE
143 /** Fill MC tracks in momentum array
144 * @return kTRUE on success, otherwise kFALSE
148 /** Fill HLT MC tracks in momentum array
149 * @return kTRUE on success, otherwise kFALSE
151 Bool_t FillGridHLTMC();
153 /** Fill ESD tracks in momentum array
154 * @return kTRUE on success, otherwise kFALSE
156 Bool_t FillGridESD();
158 /** Fill AOD tracks in momentum array
159 * @return kTRUE on success, otherwise kFALSE
161 Bool_t FillGridAOD();
164 * ---------------------------------------------------------------------------------
166 * ---------------------------------------------------------------------------------
169 /** Get Ptr to AliHLTJETReaderHeader
170 * @return ptr to AliHLTJETReaderHeader
172 AliHLTJETReaderHeader* GetReaderHeader() const { return dynamic_cast<AliHLTJETReaderHeader*>(fReaderHeader);}
175 /** Get Ptr to input vector of Fastjet
176 * @return ptr to input vector of Fastjet
178 vector<fastjet::PseudoJet>* GetVector() { return fMomentumVector; }
181 /** Get Ptr to grid of cone finder
182 * @return ptr to grid of cone finder
184 AliHLTJETConeGrid* GetGrid() { return fGrid; }
186 /** Get number of jet candates = seeds */
187 Int_t GetNJetCandidates() { return fNJetCandidates; }
189 /** Get ptr to jet candiates = seeds for cone finder */
190 TClonesArray* GetJetCandidates() { return fJetCandidates; }
193 * ---------------------------------------------------------------------------------
195 * ---------------------------------------------------------------------------------
199 * @param aEtaPhi eta and phi of the seed
200 * @param aGridIdx indeces in the grid
201 * @param coneRadius coneRadius
203 void AddSeed( const Float_t* aEtaPhi, const Int_t* aGridIdx,
204 const Float_t coneRadius );
206 ///////////////////////////////////////////////////////////////////////////////////
210 /** copy constructor prohibited */
211 AliHLTJETReader (const AliHLTJETReader&);
213 /** assignment operator prohibited */
214 AliHLTJETReader& operator= (const AliHLTJETReader&);
217 * ---------------------------------------------------------------------------------
218 * Initialize - private
219 * ---------------------------------------------------------------------------------
222 /** Initialize reader for the FFSC cone jet finder
223 * @return 0 on success, otherwise <0
225 Int_t InitializeFFSC();
228 /** Initialize reader for the fastjet jet finders
229 * @return 0 on success, otherwise <0
231 Int_t InitializeFastjet();
235 * ---------------------------------------------------------------------------------
237 * ---------------------------------------------------------------------------------
244 AliESDEvent *fESD; //! transient
246 /** off-line MC event */
247 AliMCEvent *fMC; //! transient
249 /** on-line MC event */
250 AliHLTMCEvent *fHLTMC; //! transient
253 AliAODEvent *fAOD; //! transient
255 // -- Particle structures
256 // ------------------------
259 /** Vector of fastjet momemtum entries */
260 vector<fastjet::PseudoJet> *fMomentumVector; //! transient
263 /** Grid for cone finder */
264 AliHLTJETConeGrid *fGrid; //! transient
269 /** Number of jet candates = seeds */
270 Int_t fNJetCandidates; // see above
272 /** Jet candiates = seeds for cone finder */
273 TClonesArray *fJetCandidates; //! transient
278 /** Ptr to seed cuts */
279 AliHLTJETConeSeedCuts *fSeedCuts; //! transient
281 /** Ptr to track cuts */
282 AliHLTJETTrackCuts *fTrackCuts; //! transient
284 ClassDef(AliHLTJETReader, 1)