CMS 3D CMS Logo

IO_EPOS.h
Go to the documentation of this file.
1 //--------------------------------------------------------------------------
2 #ifndef HEPMC_IO_EPOS_H
3 #define HEPMC_IO_EPOS_H
4 //THIS IS A BRUTAL COPY OF EPOS g_Wrapper from HEPMC
5 //We need it because the EPOS generator needs a largeer version of EPOS g to store the event
6 #include <map>
7 #include <vector>
8 #include "HepMC/IO_BaseClass.h"
10 
11 namespace EPOS {
12  /*
13  namespace HepMC{
14  class GenEvent;
15  class GenVertex;
16  class GenParticle;
17  }
18 */
19 
20  class IO_EPOS : public HepMC::IO_BaseClass {
21  public:
22  IO_EPOS();
23  ~IO_EPOS() override;
24  bool fill_next_event(HepMC::GenEvent*) override;
25  void write_event(const HepMC::GenEvent*) override;
26  void print(std::ostream& ostr = std::cout) const override;
27 
28  // see comments below for these switches.
30  bool trust_mothers_before_daughters() const;
31  bool print_inconsistency_errors() const;
32  bool trust_beam_particles() const;
33  void set_trust_mothers_before_daughters(bool b = true);
34  void set_trust_both_mothers_and_daughters(bool b = false);
35  void set_print_inconsistency_errors(bool b = true);
36  void set_trust_beam_particles(bool b = true);
37  void set_skip_nuclear_fragments(bool b = true);
38 
39  protected: // for internal use only
41  void build_production_vertex(int i, std::vector<HepMC::GenParticle*>& hepevt_particle, HepMC::GenEvent* evt);
42  void build_end_vertex(int i, std::vector<HepMC::GenParticle*>& hepevt_particle, HepMC::GenEvent* evt);
43  int find_in_map(const std::map<HepMC::GenParticle*, int>& m, HepMC::GenParticle* p) const;
44 
45  private: // use of copy constructor is not allowed
46  IO_EPOS(const IO_EPOS&) : HepMC::IO_BaseClass() {}
47 
48  private: // data members
54  };
55 
56  // INLINES access methods //
58 
60 
62 
64 
66 
68 
69  inline bool IO_EPOS::trust_beam_particles() const { return m_trust_beam_particles; }
70 
72 
75 
76 } // namespace EPOS
77 
78 #endif // HEPMC_IO_EPOS_H
79 //--------------------------------------------------------------------------
EPOS::IO_EPOS::set_trust_both_mothers_and_daughters
void set_trust_both_mothers_and_daughters(bool b=false)
Definition: IO_EPOS.h:63
mps_fire.i
i
Definition: mps_fire.py:355
EPOS::IO_EPOS::m_skip_nucl_frag
bool m_skip_nucl_frag
Definition: IO_EPOS.h:53
EPOS::IO_EPOS::build_production_vertex
void build_production_vertex(int i, std::vector< HepMC::GenParticle * > &hepevt_particle, HepMC::GenEvent *evt)
Definition: IO_EPOS.cc:174
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
EPOS::IO_EPOS::m_trust_mothers_before_daughters
bool m_trust_mothers_before_daughters
Definition: IO_EPOS.h:49
gather_cfg.cout
cout
Definition: gather_cfg.py:144
EPOS::IO_EPOS::set_skip_nuclear_fragments
void set_skip_nuclear_fragments(bool b=true)
!!MODIFICATION
Definition: IO_EPOS.h:74
EPOS::IO_EPOS::IO_EPOS
IO_EPOS(const IO_EPOS &)
Definition: IO_EPOS.h:46
HepMC::GenEvent
Definition: hepmc_rootio.cc:9
EPOS::IO_EPOS::set_print_inconsistency_errors
void set_print_inconsistency_errors(bool b=true)
Definition: IO_EPOS.h:67
EPOS::IO_EPOS::set_trust_mothers_before_daughters
void set_trust_mothers_before_daughters(bool b=true)
Definition: IO_EPOS.h:65
EPOS::IO_EPOS::trust_mothers_before_daughters
bool trust_mothers_before_daughters() const
Definition: IO_EPOS.h:59
EPOS::IO_EPOS::m_trust_both_mothers_and_daughters
bool m_trust_both_mothers_and_daughters
Definition: IO_EPOS.h:50
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
EPOS::IO_EPOS::m_trust_beam_particles
bool m_trust_beam_particles
Definition: IO_EPOS.h:52
EPOS_Wrapper.h
b
double b
Definition: hdecay.h:118
EPOS
Definition: EPOS_Wrapper.h:119
EPOS::IO_EPOS::build_end_vertex
void build_end_vertex(int i, std::vector< HepMC::GenParticle * > &hepevt_particle, HepMC::GenEvent *evt)
Definition: IO_EPOS.cc:229
EPOS::IO_EPOS::m_print_inconsistency_errors
bool m_print_inconsistency_errors
Definition: IO_EPOS.h:51
EPOS::IO_EPOS::~IO_EPOS
~IO_EPOS() override
Definition: IO_EPOS.cc:23
EPOS::IO_EPOS::print
void print(std::ostream &ostr=std::cout) const override
Definition: IO_EPOS.cc:25
EPOS::IO_EPOS::print_inconsistency_errors
bool print_inconsistency_errors() const
Definition: IO_EPOS.h:61
EPOS::IO_EPOS
Definition: IO_EPOS.h:20
EPOS::IO_EPOS::trust_beam_particles
bool trust_beam_particles() const
Definition: IO_EPOS.h:69
EPOS::IO_EPOS::find_in_map
int find_in_map(const std::map< HepMC::GenParticle *, int > &m, HepMC::GenParticle *p) const
Definition: IO_EPOS.cc:303
GenParticle.GenParticle
GenParticle
Definition: GenParticle.py:18
EPOS::IO_EPOS::write_event
void write_event(const HepMC::GenEvent *) override
Definition: IO_EPOS.cc:104
HepMC
Definition: GenParticle.h:15
EPOS::IO_EPOS::trust_both_mothers_and_daughters
bool trust_both_mothers_and_daughters() const
Definition: IO_EPOS.h:57
EPOS::IO_EPOS::set_trust_beam_particles
void set_trust_beam_particles(bool b=true)
Definition: IO_EPOS.h:71
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
EPOS::IO_EPOS::fill_next_event
bool fill_next_event(HepMC::GenEvent *) override
Definition: IO_EPOS.cc:33
EPOS::IO_EPOS::IO_EPOS
IO_EPOS()
Definition: IO_EPOS.cc:16
EPOS::IO_EPOS::build_particle
HepMC::GenParticle * build_particle(int index)
Definition: IO_EPOS.cc:292