CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  virtual ~IO_EPOS();
24  bool fill_next_event( HepMC::GenEvent* );
25  void write_event( const HepMC::GenEvent* );
26  void print( std::ostream& ostr = std::cout ) const;
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
42  int i,std::vector<HepMC::GenParticle*>& hepevt_particle, HepMC::GenEvent* evt );
43  void build_end_vertex(
44  int i, std::vector<HepMC::GenParticle*>& hepevt_particle, HepMC::GenEvent* evt );
45  int find_in_map(
46  const std::map<HepMC::GenParticle*,int>& m, HepMC::GenParticle* p) const;
47 
48  private: // use of copy constructor is not allowed
49  IO_EPOS( const IO_EPOS& ) : HepMC::IO_BaseClass() {}
50 
51  private: // data members
52 
58  };
59 
60  // INLINES access methods //
63 
66 
69 
72 
75 
78 
79  inline bool IO_EPOS::trust_beam_particles() const
80  { return m_trust_beam_particles; }
81 
84 
87  { m_skip_nucl_frag = b; }
88 
89 } // HepMC
90 
91 #endif // HEPMC_IO_EPOS_H
92 //--------------------------------------------------------------------------
bool m_skip_nucl_frag
Definition: IO_EPOS.h:57
HepMC::GenParticle * build_particle(int index)
Definition: IO_EPOS.cc:317
void set_skip_nuclear_fragments(bool b=true)
!!MODIFICATION
Definition: IO_EPOS.h:86
void print(std::ostream &ostr=std::cout) const
Definition: IO_EPOS.cc:25
int i
Definition: DBlmapReader.cc:9
bool fill_next_event(HepMC::GenEvent *)
Definition: IO_EPOS.cc:36
bool m_trust_beam_particles
Definition: IO_EPOS.h:56
bool trust_both_mothers_and_daughters() const
Definition: IO_EPOS.h:61
void build_end_vertex(int i, std::vector< HepMC::GenParticle * > &hepevt_particle, HepMC::GenEvent *evt)
Definition: IO_EPOS.cc:251
void build_production_vertex(int i, std::vector< HepMC::GenParticle * > &hepevt_particle, HepMC::GenEvent *evt)
Definition: IO_EPOS.cc:188
bool m_print_inconsistency_errors
Definition: IO_EPOS.h:55
bool print_inconsistency_errors() const
Definition: IO_EPOS.h:67
bool m_trust_mothers_before_daughters
Definition: IO_EPOS.h:53
bool m_trust_both_mothers_and_daughters
Definition: IO_EPOS.h:54
bool trust_beam_particles() const
Definition: IO_EPOS.h:79
void set_trust_both_mothers_and_daughters(bool b=false)
Definition: IO_EPOS.h:70
void write_event(const HepMC::GenEvent *)
Definition: IO_EPOS.cc:112
IO_EPOS(const IO_EPOS &)
Definition: IO_EPOS.h:49
void set_trust_mothers_before_daughters(bool b=true)
Definition: IO_EPOS.h:73
virtual ~IO_EPOS()
Definition: IO_EPOS.cc:23
void set_trust_beam_particles(bool b=true)
Definition: IO_EPOS.h:82
double b
Definition: hdecay.h:120
int find_in_map(const std::map< HepMC::GenParticle *, int > &m, HepMC::GenParticle *p) const
Definition: IO_EPOS.cc:331
tuple cout
Definition: gather_cfg.py:121
bool trust_mothers_before_daughters() const
Definition: IO_EPOS.h:64
void set_print_inconsistency_errors(bool b=true)
Definition: IO_EPOS.h:76