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 //--------------------------------------------------------------------------
bool m_skip_nucl_frag
Definition: IO_EPOS.h:53
bool fill_next_event(HepMC::GenEvent *) override
Definition: IO_EPOS.cc:33
HepMC::GenParticle * build_particle(int index)
Definition: IO_EPOS.cc:292
void set_skip_nuclear_fragments(bool b=true)
!!MODIFICATION
Definition: IO_EPOS.h:74
void build_end_vertex(int i, std::vector< HepMC::GenParticle *> &hepevt_particle, HepMC::GenEvent *evt)
Definition: IO_EPOS.cc:229
bool m_trust_beam_particles
Definition: IO_EPOS.h:52
~IO_EPOS() override
Definition: IO_EPOS.cc:23
bool m_print_inconsistency_errors
Definition: IO_EPOS.h:51
bool m_trust_mothers_before_daughters
Definition: IO_EPOS.h:49
bool m_trust_both_mothers_and_daughters
Definition: IO_EPOS.h:50
void write_event(const HepMC::GenEvent *) override
Definition: IO_EPOS.cc:104
void set_trust_both_mothers_and_daughters(bool b=false)
Definition: IO_EPOS.h:63
bool trust_mothers_before_daughters() const
Definition: IO_EPOS.h:59
bool trust_both_mothers_and_daughters() const
Definition: IO_EPOS.h:57
IO_EPOS(const IO_EPOS &)
Definition: IO_EPOS.h:46
bool trust_beam_particles() const
Definition: IO_EPOS.h:69
void set_trust_mothers_before_daughters(bool b=true)
Definition: IO_EPOS.h:65
int find_in_map(const std::map< HepMC::GenParticle *, int > &m, HepMC::GenParticle *p) const
Definition: IO_EPOS.cc:303
void set_trust_beam_particles(bool b=true)
Definition: IO_EPOS.h:71
void build_production_vertex(int i, std::vector< HepMC::GenParticle *> &hepevt_particle, HepMC::GenEvent *evt)
Definition: IO_EPOS.cc:174
double b
Definition: hdecay.h:120
void print(std::ostream &ostr=std::cout) const override
Definition: IO_EPOS.cc:25
bool print_inconsistency_errors() const
Definition: IO_EPOS.h:61
void set_print_inconsistency_errors(bool b=true)
Definition: IO_EPOS.h:67