]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/BASE/util/AliHLTMCGeneratorComponent.h
attaching file writer to the StreamerInfo component
[u/mrichter/AliRoot.git] / HLT / BASE / util / AliHLTMCGeneratorComponent.h
CommitLineData
7aac8168 1// -*- Mode: C++ -*-
2
3// $Id: AliHLTMCGeneratorComponent.h $
4
5#ifndef ALIHLTMCGENERATORCOMPONENT_H
6#define ALIHLTMCGENERATORCOMPONENT_H
7//* This file is property of and copyright by the ALICE HLT Project *
8//* ALICE Experiment at CERN, All rights reserved. *
9//* See cxx source for full Copyright notice *
10
11/** @file AliHLTMCGeneratorComponent.h
12 @author Jochen Thaeder <thaeder@kip.uni-heidelberg.de>
13 @date
14 @brief Component for generating MC events
15 @note The class is used in Offline (AliRoot) context
16*/
17
18// see below for class documentation
19// or
20// refer to README to build package
21// or
22// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
23
24#include "AliGenerator.h"
25#include "AliRunLoader.h"
26#include "AliMCEvent.h"
27
28#include "AliHLTDataSource.h"
29#include "AliHLTMCEvent.h"
30
31/**
32 * @class AliHLTMCGeneratorComponent
33 * An HLT data source component which simulates PYTHIA events
34 * right now set up for Jet Production, this can be extended by
35 * a person in need.
36 *
37 * The events are pulished in form of AliHLTMCEvent.
38 *
39 * <h2>General properties:</h2>
40 *
41 * Component ID: \b MCGenerator <br>
42 * Library: \b libAliHLTUtil.so<br>
43 * Input Data Types: none <br>
44 * Output Data Types: kAliHLTDataTypeMCObject|kAliHLTDataOriginHLT<br>
45 * <i>AliHLTMCEvent</i><br>
46 *
47 * <h2>Mandatory arguments:</h2>
48 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
49 * \li -seed <i> Seed for generation </i> <br>
50 *
51 * \li -runtype <i> Run type as a string </i> <br>
52 *
53 * \li -nevents <i> Number of events to generate </i> <br>
54 *
55 * \li -coneRadius <i> Cone radius for PyCell </i> <br>
56 *
57 * \li -jetCutMinEt <i> Final state min Et cut for PyCell </i> <br>
396e75ed 58 *
59 * \li -applyParticleCuts <i> Apply particle cuts before filling in AliHLTMCEvent </i> <br>
60 *
7aac8168 61 *
62 * <h2>Optional arguments:</h2>
63 *
64 * <h2>Configuration:</h2>
65 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
66 * Configuration by component arguments.
67 *
68 * <h2>Default CDB entries:</h2>
69 * The component loads no CDB entries.
70 *
71 * <h2>Performance:</h2>
72 * The component does not process any event data.
73 *
74 * <h2>Memory consumption:</h2>
75 * The component does not process any event data.
76 *
77 * <h2>Output size:</h2>
78 * According to the available data. The component is an AliHLTDataSource
79 * and inteded to be used in the AliHLTSystem framework only. The component
80 * implements the standard AliHLTSystem adaptive buffer allocation.
81 *
82 * @ingroup alihlt_util_components
83 */
84
85class AliHLTMCGeneratorComponent : public AliHLTDataSource {
86
87 public:
88
89 /*
90 * ---------------------------------------------------------------------------------
91 * Constructor / Destructor
92 * ---------------------------------------------------------------------------------
93 */
94
95 /** standard constructor */
96 AliHLTMCGeneratorComponent();
97
98 /** destructor */
99 virtual ~AliHLTMCGeneratorComponent();
100
101 /*
102 * ---------------------------------------------------------------------------------
103 * Public functions to implement AliHLTComponent's interface.
104 * These functions are required for the registration process
105 * ---------------------------------------------------------------------------------
106 */
107
108 /** interface function, see @ref AliHLTComponent for description */
109 const Char_t* GetComponentID();
110
111 /** interface function, see @ref AliHLTComponent for description */
112 AliHLTComponentDataType GetOutputDataType();
113
114 /** interface function, see @ref AliHLTComponent for description */
115 virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
116
117 /** interface function, see @ref AliHLTComponent for description */
118 AliHLTComponent* Spawn();
119
120 protected:
121 /*
122 * ---------------------------------------------------------------------------------
123 * Protected functions to implement AliHLTComponent's interface.
124 * These functions provide initialization as well as the actual processing
125 * capabilities of the component.
126 * ---------------------------------------------------------------------------------
127 */
128
129 /**
130 * Init method.
131 * Overwrites the AliHLTFilePublisher::DoInit() method.
132 * @param argc size of the argument array
133 * @param argv agument array for component initialization
134 * @return number of processed members of the argv <br>
135 * -EINVAL unknown argument <br>
136 * -EPROTO parameter for argument missing <br>
137 */
138 Int_t DoInit( int argc, const char** argv );
139
140 /**
141 * Deinit method. Calls also the one of AliHLTFilePublisher.
142 */
143 Int_t DoDeinit();
144
145 /**
146 * Data processing method for the component.
147 * The component uses the @ref alihltcomponent-high-level-interface
148 * to put serialized Root object into the output stream. Despite of that it
149 * implements the low-level DumpEvent method in order to allow child classes
150 * to use the low-level method.
151 * @param evtData event data structure
152 * @param trigData trigger data structure
153 * @param outputPtr not used
154 * @param size not used
155 * @param outputBlocks not used
156 * @return
157 */
158 Int_t GetEvent( const AliHLTComponentEventData& evtData,
159 AliHLTComponentTriggerData& trigData,
160 AliHLTUInt8_t* outputPtr,
161 AliHLTUInt32_t& size,
162 vector<AliHLTComponentBlockData>& outputBlocks);
163
164 using AliHLTDataSource::GetEvent;
165
166 private:
167
168 /*
169 * ---------------------------------------------------------------------------------
170 * Private functions to implement AliHLTComponent's interface.
171 * These functions provide initialization as well as the actual processing
172 * capabilities of the component.
173 * ---------------------------------------------------------------------------------
174 */
175
176 /** copy constructor prohibited */
177 AliHLTMCGeneratorComponent(const AliHLTMCGeneratorComponent&);
178
179 /** assignment operator prohibited */
180 AliHLTMCGeneratorComponent& operator=(const AliHLTMCGeneratorComponent&);
181
182 /** Create Generator Factory
183 * @return Ptr to generator
184 */
185 AliGenerator* GeneratorFactory();
186
187 /*
188 * ---------------------------------------------------------------------------------
189 * Members - private
190 * ---------------------------------------------------------------------------------
191 */
192
193 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
194 // ++ Enum / static const
195 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
196
197 /** Run Type */
198 enum PprRun_t {
199 kPythia6Jets20_24, kPythia6Jets24_29, kPythia6Jets29_35,
200 kPythia6Jets35_42, kPythia6Jets42_50, kPythia6Jets50_60,
201 kPythia6Jets60_72, kPythia6Jets72_86, kPythia6Jets86_104,
202 kPythia6Jets104_125, kPythia6Jets125_150, kPythia6Jets150_180,
203 kPyJetJet, kPyGammaJetPHOS, kRunMax
204 };
205
206 /** Run type name */
207 static const Char_t *fgkPprRunName[]; //! transient
208
209 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
210 // ++ Data Members
211 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
212
213 /* Ptr to current AliMCEvent, to be shipped out*/
214 AliMCEvent *fpMC; //! transient
215
216 /* Ptr to current AliHLTMCEvent, to be shipped out*/
217 AliHLTMCEvent *fpHLTMC; //! transient
218
219 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
220 // ++ Event Handling
221 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
222
223 /** Number of events */
224 Int_t fNEvents; // see above
225
226 /** Current event */
227 Int_t fCurrentEvent; // see above
228
229 /** Event number */
230 Int_t fEventNumber; // see above
231
232 /** Run number */
233 Int_t fRunNumber; // see above
234
235 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
236 // ++ MC Generation
237 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
238
239 /** RunLoader */
240 AliRunLoader *fRunLoader; //! transient
241
242 /** Event venerator base class */
243 AliGenerator *fGenerator; //! transient
244
245 /** Comment line */
246 TString fComment; // see above
247
248 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
249 // ++ MC Generation
250 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
251
252 /** Seed for random generation - default 0 */
253 UInt_t fSeed; // see above
254
255 /** Run type - default kPythia6Jets104*/
256 PprRun_t fRunType; // see above
257
258 /** Center of mass energy - default 14 TeV*/
259 Float_t fEcms; // see above
260
261 /** Max Eta - Final state kinematic cut for PyCell - default 0.2 */
262 Float_t fJetEtaMax; // see above
263
264 /** Min Eta - Final state kinematic cut for PyCell - default -0.2 */
265 Float_t fJetEtaMin; // see above
266
267 /** Max Et - Final state kinematic cut for PyCell - default 1000 GeV*/
268 Float_t fJetEtMax; // see above
269
270 /** Min Et - Final state kinematic cut for PyCell - default 10 GeV */
271 Float_t fJetEtMin; // see above
272
273 /** Cone radius for PyCell - default 0.4 */
274 Float_t fJetConeRadius; // see above
275
276 /** Min Pt transfer of the hard scattering - default 10 GeV */
277 Double_t fPtHardMin; // see above
278
279 /** Min Pt transfer of the hard scattering - default infinity */
280 Double_t fPtHardMax; // see above
281
282 /** Quench mode 0 = no, 1 = AM, 2 = IL - default 0*/
283 Int_t fQuenching ; // see above
284
285 /** Q Hat - default 20 */
286 Float_t fQhat; // see above
287
396e75ed 288 /** Apply particle cuts, before filling in AliHLTMCEvent */
289 Bool_t fApplyParticleCuts; // see above
290
7aac8168 291 ClassDef(AliHLTMCGeneratorComponent, 0)
292};
293#endif