Belle II Software  release-05-02-19
HepmcInputModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2019 Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Jo-Frrederik Krohn *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 
12 #include <framework/core/Module.h>
13 
14 #include <string>
15 
16 #include <mdst/dataobjects/MCParticleGraph.h>
17 
18 #include <generators/hepmc/HepMCReader.h>
19 #include <generators/utilities/InitialParticleGeneration.h>
20 
21 namespace Belle2 {
31  class HepMCInputModule : public Module {
32 
33  public:
34 
40 
42  virtual ~HepMCInputModule() {}
43 
45  virtual void initialize() override;
46 
48  virtual void event() override;
49 
51  virtual void terminate() override;
52 
53  protected:
54 
55  std::vector <std::string> m_inputFileNames;
56  std::string m_inputFileName;
57  uint m_iFile;
58  int m_nVirtual;
59  std::unique_ptr<HepMCReader> m_hepmcreader;
61  bool m_useWeights;
62  bool m_boost2Lab;
65  int m_runNum;
66  int m_expNum;
67  int m_evtNum;
68  int m_minEvent;
69  int m_maxEvent;
71  //int m_skipNEvents; /**< skip events in the file */
73  private:
76  };
77 
79 } // end namespace Belle2
80 
Belle2::HepMCInputModule::m_initial
InitialParticleGeneration m_initial
initial particle used by BeamParameter class
Definition: HepmcInputModule.h:82
Belle2::HepMCInputModule::m_runNum
int m_runNum
The run number that should be used if the reader acts as master.
Definition: HepmcInputModule.h:73
Belle2::HepMCInputModule::event
virtual void event() override
method is called for each event.
Definition: HepmcInputModule.cc:102
Belle2::HepMCInputModule::m_ignorereadEventNr
bool m_ignorereadEventNr
Count event numbers 'manually'.
Definition: HepmcInputModule.h:72
Belle2::HepMCInputModule::m_mcParticleGraph
MCParticleGraph m_mcParticleGraph
The MCParticle graph object.
Definition: HepmcInputModule.h:68
Belle2::MCParticleGraph
Class to build, validate and sort a particle decay chain.
Definition: MCParticleGraph.h:48
Belle2::HepMCInputModule::HepMCInputModule
HepMCInputModule()
Constructor.
Definition: HepmcInputModule.cc:31
Belle2::HepMCInputModule::m_minEvent
int m_minEvent
Start at event number x.
Definition: HepmcInputModule.h:76
Belle2::HepMCInputModule::m_iFile
uint m_iFile
Index of the current HepMC input file.
Definition: HepmcInputModule.h:65
Belle2::HepMCInputModule::m_hepmcreader
std::unique_ptr< HepMCReader > m_hepmcreader
An instance of the HepMC reader.
Definition: HepmcInputModule.h:67
Belle2::HepMCInputModule::initialize
virtual void initialize() override
Initializes the module.
Definition: HepmcInputModule.cc:51
Belle2::InitialParticleGeneration
Generate Collision.
Definition: InitialParticleGeneration.h:35
Belle2::DBObjPtr
Class for accessing objects in the database.
Definition: DBObjPtr.h:31
Belle2::HepMCInputModule::m_expNum
int m_expNum
The experiment number that should be used if the reader acts as master.
Definition: HepmcInputModule.h:74
Belle2::HepMCInputModule::~HepMCInputModule
virtual ~HepMCInputModule()
Destructor.
Definition: HepmcInputModule.h:50
Belle2::HepMCInputModule::m_inputFileName
std::string m_inputFileName
The Name of the current input HepMC file.
Definition: HepmcInputModule.h:64
Belle2::HepMCInputModule::m_nVirtual
int m_nVirtual
The number of particles in each event that should be made virtual.
Definition: HepmcInputModule.h:66
Belle2::HepMCInputModule::m_boost2Lab
bool m_boost2Lab
Parameter to switch on/off boost to LAB system.
Definition: HepmcInputModule.h:70
Belle2::HepMCInputModule::m_totalEvents
int m_totalEvents
totla number of events to read
Definition: HepmcInputModule.h:78
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::StoreObjPtr
Type-safe access to single objects in the data store.
Definition: ParticleList.h:33
Belle2::HepMCInputModule::m_wrongSignPz
bool m_wrongSignPz
Parameter to signal that direction of LER and HER was switched.
Definition: HepmcInputModule.h:71
Belle2::HepMCInputModule::m_maxEvent
int m_maxEvent
Stop after processing n events.
Definition: HepmcInputModule.h:77
Belle2::HepMCInputModule::m_evtNum
int m_evtNum
The event number is needed if the reader acts as master.
Definition: HepmcInputModule.h:75
Belle2::HepMCInputModule::m_inputFileNames
std::vector< std::string > m_inputFileNames
The list of filenames of input HepMCfile.
Definition: HepmcInputModule.h:63
Belle2::HepMCInputModule::m_useWeights
bool m_useWeights
Parameter to switch on/off weight propagation.
Definition: HepmcInputModule.h:69
Belle2::HepMCInputModule::terminate
virtual void terminate() override
method is called at end
Definition: HepmcInputModule.cc:153
Belle2::HepMCInputModule::m_eventMetaDataPtr
StoreObjPtr< EventMetaData > m_eventMetaDataPtr
event meta data pointer to control event nubmer etc
Definition: HepmcInputModule.h:83
Belle2::HepMCInputModule::m_beamParams
DBObjPtr< BeamParameters > m_beamParams
BeamParameter.
Definition: HepmcInputModule.h:80