Belle II Software  release-08-01-10
HepmcInputModule.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 #pragma once
9 
10 /* Basf2 headers. */
11 #include <framework/core/Module.h>
12 #include <framework/dataobjects/EventMetaData.h>
13 #include <framework/datastore/StoreObjPtr.h>
14 #include <generators/hepmc/HepMCReader.h>
15 #include <mdst/dataobjects/MCParticleGraph.h>
16 
17 /* C++ headers. */
18 #include <string>
19 
20 namespace Belle2 {
30  class HepMCInputModule : public Module {
31 
32  public:
33 
39 
41  virtual ~HepMCInputModule() {}
42 
44  virtual void initialize() override;
45 
47  virtual void event() override;
48 
50  virtual void terminate() override;
51 
52  protected:
53 
54  std::vector <std::string> m_inputFileNames;
55  std::string m_inputFileName;
56  uint m_iFile;
57  int m_nVirtual;
58  std::unique_ptr<HepMCReader> m_hepmcreader;
60  bool m_useWeights;
63  int m_runNum;
64  int m_expNum;
65  int m_evtNum;
66  int m_minEvent;
67  int m_maxEvent;
69  bool m_makeMaster;
71  private:
73  };
74 
76 } // end namespace Belle2
77 
The HepMCInput module.
bool m_useWeights
Parameter to switch on/off weight propagation.
int m_evtNum
The event number is needed if the reader acts as master.
bool m_ignorereadEventNr
Count event numbers 'manually'.
int m_maxEvent
Stop after processing n events.
virtual void initialize() override
Initializes the module.
virtual void event() override
method is called for each event.
virtual void terminate() override
method is called at end
std::string m_inputFileName
The Name of the current input HepMC file.
int m_expNum
The experiment number that should be used if the reader acts as master.
std::vector< std::string > m_inputFileNames
The list of filenames of input HepMCfile.
virtual ~HepMCInputModule()
Destructor.
std::unique_ptr< HepMCReader > m_hepmcreader
An instance of the HepMC reader.
int m_totalEvents
totla number of events to read
bool m_makeMaster
Parameter to signal if the modul should act as master.
bool m_wrongSignPz
Parameter to signal that direction of LER and HER was switched.
StoreObjPtr< EventMetaData > m_eventMetaDataPtr
event meta data pointer to control event nubmer etc
int m_minEvent
Start at event number x.
MCParticleGraph m_mcParticleGraph
The MCParticle graph object.
int m_nVirtual
The number of particles in each event that should be made virtual.
uint m_iFile
Index of the current HepMC input file.
int m_runNum
The run number that should be used if the reader acts as master.
Class to build, validate and sort a particle decay chain.
Base class for Modules.
Definition: Module.h:72
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
Abstract base class for different kinds of events.