Project
Loading...
Searching...
No Matches
GeneratorService.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
13
14#ifndef ALICEO2_GENERATORSERVICE_H_
15#define ALICEO2_GENERATORSERVICE_H_
16
17#include <utility> // for pair
18#include <vector>
21#include <Generators/PrimaryGenerator.h> // could be forward declaration
22#include <DetectorsBase/Stack.h>
23
24namespace o2
25{
26
27namespace dataformats
28{
30}
31
32namespace eventgen
33{
34
37 virtual ~VertexOption() = default; /* this is making the class polymorphic */
38};
39
40// some specialized structs allow to pass different options
42
43}; // this means to apply no Vertex
44
47
49 // the mean vertex object
51};
52
55
59{
60
61 public:
62 void initService(std::string const& generatorName,
63 std::string const& triggerName,
64 VertexOption const& vtxOption);
65
66 std::pair<std::vector<MCTrack>, o2::dataformats::MCEventHeader> generateEvent();
67
68 void generateEvent_MCTracks(std::vector<MCTrack>& tracks, o2::dataformats::MCEventHeader& header);
69 void generateEvent_TParticles(std::vector<TParticle>& tparts, o2::dataformats::MCEventHeader& header);
70
71 private:
72 PrimaryGenerator mPrimGen;
73 o2::data::Stack mStack;
74};
75
76} // namespace eventgen
77} // namespace o2
78
79#endif
Definition of the Stack class.
Definition of the MCTrack class.
A class offering convenient generator configuration and encapsulation of lower level classes....
std::pair< std::vector< MCTrack >, o2::dataformats::MCEventHeader > generateEvent()
void generateEvent_MCTracks(std::vector< MCTrack > &tracks, o2::dataformats::MCEventHeader &header)
void generateEvent_TParticles(std::vector< TParticle > &tparts, o2::dataformats::MCEventHeader &header)
void initService(std::string const &generatorName, std::string const &triggerName, VertexOption const &vtxOption)
o2::dataformats::MeanVertexObject MeanVertexObject
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
o2::dataformats::MeanVertexObject * meanVertexObject
virtual ~VertexOption()=default