]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/BASE/util/AliHLTMCEvent.h
fixed a problem with writing the expert QA Data. Added a method in simulation and...
[u/mrichter/AliRoot.git] / HLT / BASE / util / AliHLTMCEvent.h
CommitLineData
b16d48a7 1//-*- Mode: C++ -*-
2
805aa9da 3// $Id: $
b16d48a7 4
5#ifndef ALIHLTMCEVENT_H
6#define ALIHLTMCEVENT_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 AliHLTMCEvent.h
13 @author Jochen Thaeder
14 @date
15 @brief Container class for an AliMCEvent
16*/
17
18#include "TObject.h"
19#include "TParticle.h"
20#include "TClonesArray.h"
21
805aa9da 22#include "AliHLTLogging.h"
b16d48a7 23#include "AliMCEvent.h"
24
25/**
26 * @class AliHLTMCEvent
27 * Container class for off-line AliMCEvent, as this class is coupled to
28 * TTrees an can not be easily copied and send via the HLT chain.
29 *
30 * This class as the complete functionality as the off-line class,
31 * only the ones needed so far.
32 *
33 * There is no extra "stack" class, the stack is included in this class
34 * a TClonesArray of TParticles
35 *
36 */
37
805aa9da 38class AliHLTMCEvent : public TObject, public AliHLTLogging {
b16d48a7 39
40public:
41
42 /*
43 * ---------------------------------------------------------------------------------
44 * Constructor / Destructor
45 * ---------------------------------------------------------------------------------
46 */
47
48 /** standard constructor */
49 AliHLTMCEvent();
50
51 /** constructor
52 * @param iNumberTracks number of initial tracks
53 */
54 AliHLTMCEvent( Int_t iNumberTracks );
55
56 /** constructor
57 * @param pMCEvent ptr to off-line AliMCEvent
58 */
59 AliHLTMCEvent( AliMCEvent *pMCEvent );
60
61 /** destructor */
62 virtual ~AliHLTMCEvent();
63
64 /*
65 * ---------------------------------------------------------------------------------
66 * Getter
67 * ---------------------------------------------------------------------------------
68 */
69
70 /** Get number of particles
71 * @return number of particles
72 */
73 Int_t GetNumberOfTracks() const { return fNParticles; }
74
75 /** Return particle at index iParticle
76 * @param iParticle Particle index in local stack
77 * @return ptr on success, NULL on failure
78 */
79 TParticle* Particle( Int_t iParticle );
80
81 /** Return next particle
82 * @return ptr on success, NULL on failure
83 */
84 TParticle* NextParticle();
85
86 /*
87 * ---------------------------------------------------------------------------------
88 * Setter
89 * ---------------------------------------------------------------------------------
90 */
91
92 /** Add a prticle to this container
93 * @param particle ptr to TParticle classs
94 */
95 void AddParticle( const TParticle* particle);
96
97 /** Fill the off-line MC event in to this class
98 * @param pMCEvent ptr to off-line AliMCEvent
99 */
100 void FillMCEvent( AliMCEvent *pMCEvent );
101
102 /*
103 * ---------------------------------------------------------------------------------
104 * Helper
105 * ---------------------------------------------------------------------------------
106 */
107
108 /** Compress the TClonesArray fStack */
109 void Compress();
110
111 /** Reset index for next particle */
112 void Reset();
113
114 ///////////////////////////////////////////////////////////////////////////////////
115
116private:
117
118 /** copy constructor prohibited */
119 AliHLTMCEvent (const AliHLTMCEvent&);
120
121 /** assignment operator prohibited */
122 AliHLTMCEvent& operator= (const AliHLTMCEvent&);
123
124 /*
125 * ---------------------------------------------------------------------------------
126 * Members - private
127 * ---------------------------------------------------------------------------------
128 */
129
130 /** Number of particles */
131 Int_t fNParticles; // see above
132
133 /** Current particle */
134 Int_t fCurrentParticleIndex; // see above
135
136 /** Ptr to current particle */
137 TParticle *fCurrentParticle; // see above
138
139 /** Stack of particles */
140 TClonesArray *fStack; // see above
141
142 ClassDef(AliHLTMCEvent, 1)
143
144};
145#endif
146