5 #ifndef ALIHLTMCEVENT_H
6 #define ALIHLTMCEVENT_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 AliHLTMCEvent.h
13 @author Jochen Thaeder
15 @brief Container class for an AliMCEvent
19 #include "TParticle.h"
20 #include "TClonesArray.h"
22 #include "AliGenPythiaEventHeader.h"
23 #include "AliMCEvent.h"
24 #include "AliAODJet.h"
26 #include "AliHeader.h"
28 #include "AliHLTLogging.h"
31 * @class AliHLTMCEvent
32 * Container class for off-line AliMCEvent, as the class AliMCEvent
33 * is coupled to TTrees and can not be easily copied and send via
36 * This class as the complete functionality as the off-line class,
37 * only the ones needed so far.
39 * There is no extra "stack" class, the stack is included in this class
40 * a TClonesArray of TParticles
44 class AliHLTMCEvent : public TObject, public AliHLTLogging {
49 * ---------------------------------------------------------------------------------
50 * Constructor / Destructor
51 * ---------------------------------------------------------------------------------
54 /** standard constructor */
58 virtual ~AliHLTMCEvent();
61 * ---------------------------------------------------------------------------------
63 * ---------------------------------------------------------------------------------
66 /** Fill the off-line MC event in to this class
67 * @param stack ptr to AliStack
68 * @param header ptr to AliHeader
69 * @return 0 on sucess, <0 on error
71 Int_t FillMCEvent( AliStack *stack, AliHeader *header );
73 /** Fill the off-line MC event in to this class
74 * @param pMCEvent ptr to off-line AliMCEvent
75 * @return 0 on sucess, <0 on error
77 Int_t FillMCEvent( AliMCEvent *pMCEvent );
80 * ---------------------------------------------------------------------------------
82 * ---------------------------------------------------------------------------------
88 /** Get number of particles
89 * @return number of particles
91 Int_t GetNumberOfTracks() const { return fNParticles; }
93 /** Return particle at index iParticle
94 * @param iParticle Particle index in local stack
95 * @return ptr on success, NULL on failure
97 TParticle* Particle( Int_t iParticle );
99 /** Return next particle
100 * @return ptr on success, NULL on failure
102 TParticle* NextParticle();
104 /** Get Index of current particle
105 * @return Index of current particle
107 Int_t GetIndex() { return fCurrentParticleIndex; }
110 // -------------------
112 /** Get number of generated jets
113 * @return number of generated jets
115 Int_t GetNumberOfGenJets() const { return fNGenJets; }
117 /** Return generated jets at index iJet
118 * @param iJet Generated jet index in local array
119 * @return ptr on success, NULL on failure
121 AliAODJet* GenJet( Int_t iJet ) const;
123 /** Return next generated jet
124 * @return ptr on success, NULL on failure
126 AliAODJet* NextGenJet() ;
129 * ---------------------------------------------------------------------------------
131 * ---------------------------------------------------------------------------------
134 /** Compress the TClonesArray fStack */
137 /** Reset index for next particle */
140 ///////////////////////////////////////////////////////////////////////////////////
144 /** copy constructor prohibited */
145 AliHLTMCEvent (const AliHLTMCEvent&);
147 /** assignment operator prohibited */
148 AliHLTMCEvent& operator= (const AliHLTMCEvent&);
151 * ---------------------------------------------------------------------------------
153 * ---------------------------------------------------------------------------------
159 /** Fill the particles in into the local stack
160 * @param stack ptr to off-line AliStack
161 * @return 0 on sucess, <0 on error
163 Int_t FillMCTracks( AliStack *stack );
165 /** Add a particle to this container
166 * @param particle ptr to TParticle classs
168 void AddParticle( const TParticle* particle);
171 // -------------------
173 /** Fill the jets into local array
174 * @param stack ptr to off-line AliGenPythiaEventHeader
175 * @return 0 on sucess, <0 on error
177 Int_t FillMCJets( AliGenPythiaEventHeader* header );
179 /** Add a jet to his container
180 * @param stack ptr to off-line AliGenPythiaEventHeader
181 * @param iterJet idx of jet in event
183 void AddGenJet( AliGenPythiaEventHeader* header, Int_t iterJet );
186 * ---------------------------------------------------------------------------------
187 * Pythia jets - private
188 * ---------------------------------------------------------------------------------
191 /** Retrieve pythia event header out of an AliMCEvent
192 * @param mcEvent ptr to AliMCEvent
193 * @return ptr on sucess, NULL on error
195 AliGenPythiaEventHeader* GetPythiaEventHeader(AliMCEvent *mcEvent);
198 * ---------------------------------------------------------------------------------
200 * ---------------------------------------------------------------------------------
206 /** Current particle */
207 Int_t fCurrentParticleIndex; // see above
209 /** Number of particles */
210 Int_t fNParticles; // see above
212 /** Stack of particles [TParticle]*/
213 TClonesArray *fStack; // see above
216 // -------------------
218 /** Current generated jet */
219 Int_t fCurrentGenJetIndex; // see above
221 /** Number of generated jets */
222 Int_t fNGenJets; // see above
224 /** Array of generated jets [AliAODJet]*/
225 TClonesArray *fGenJets; // see above
227 ClassDef(AliHLTMCEvent, 1)