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>
24
25namespace o2
26{
27
28namespace dataformats
29{
31}
32
33namespace eventgen
34{
35
38 virtual ~VertexOption() = default; /* this is making the class polymorphic */
39};
40
41// some specialized structs allow to pass different options
43
44}; // this means to apply no Vertex
45
48
50 // the mean vertex object
52};
53
56
60{
61
62 public:
63 void initService(std::string const& generatorName,
64 std::string const& triggerName,
65 VertexOption const& vtxOption);
66
67 std::pair<std::vector<MCTrack>, o2::dataformats::MCEventHeader> generateEvent();
68
69 void generateEvent_MCTracks(std::vector<MCTrack>& tracks, o2::dataformats::MCEventHeader& header);
71 void generateEvent_TParticles(std::vector<TParticle>& tparts, o2::dataformats::MCEventHeader& header);
72
73 private:
74 PrimaryGenerator mPrimGen;
75 o2::data::Stack mStack;
76};
77
78} // namespace eventgen
79} // namespace o2
80
81#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
std::vector< T, fair::mq::pmr::polymorphic_allocator< T > > vector
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
o2::dataformats::MeanVertexObject * meanVertexObject
virtual ~VertexOption()=default