CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/GeneratorInterface/ReggeGribovPartonMCInterface/interface/IO_EPOS.h

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 #ifndef HEPMC_IO_EPOS_H
00003 #define HEPMC_IO_EPOS_H
00004 //THIS IS A BRUTAL COPY OF EPOS g_Wrapper from HEPMC
00005 //We need it because the EPOS generator needs a largeer version of EPOS g to store the event
00006 #include <map>
00007 #include <vector>
00008 #include "HepMC/IO_BaseClass.h"
00009 #include "GeneratorInterface/ReggeGribovPartonMCInterface/interface/EPOS_Wrapper.h"
00010 
00011 namespace EPOS {
00012 /*
00013     namespace HepMC{
00014       class GenEvent;
00015       class GenVertex;
00016       class GenParticle;
00017     }  
00018 */
00019 
00020     class IO_EPOS : public HepMC::IO_BaseClass {
00021     public:
00022         IO_EPOS();
00023         virtual           ~IO_EPOS();
00024         bool              fill_next_event( HepMC::GenEvent* );
00025         void              write_event( const HepMC::GenEvent* );
00026         void              print( std::ostream& ostr = std::cout ) const;
00027         
00028         // see comments below for these switches.
00029         bool              trust_both_mothers_and_daughters() const;
00030         bool              trust_mothers_before_daughters() const;
00031         bool              print_inconsistency_errors() const;
00032         bool              trust_beam_particles() const;
00033         void              set_trust_mothers_before_daughters( bool b = true );
00034         void              set_trust_both_mothers_and_daughters( bool b = false );
00035         void              set_print_inconsistency_errors( bool b = true );
00036         void              set_trust_beam_particles( bool b = true );
00037         void              set_skip_nuclear_fragments( bool b = true );
00038 
00039     protected: // for internal use only
00040         HepMC::GenParticle* build_particle( int index );
00041         void build_production_vertex( 
00042             int i,std::vector<HepMC::GenParticle*>& hepevt_particle, HepMC::GenEvent* evt );
00043         void build_end_vertex( 
00044             int i, std::vector<HepMC::GenParticle*>& hepevt_particle, HepMC::GenEvent* evt );
00045         int  find_in_map( 
00046             const std::map<HepMC::GenParticle*,int>& m, HepMC::GenParticle* p) const;
00047 
00048     private: // use of copy constructor is not allowed
00049         IO_EPOS( const IO_EPOS& ) : HepMC::IO_BaseClass() {}
00050 
00051     private: // data members
00052 
00053         bool m_trust_mothers_before_daughters;
00054         bool m_trust_both_mothers_and_daughters;
00055         bool m_print_inconsistency_errors; 
00056         bool m_trust_beam_particles;
00057         bool m_skip_nucl_frag;
00058     };
00059 
00060     // INLINES access methods //
00061     inline bool IO_EPOS::trust_both_mothers_and_daughters() const 
00062     { return m_trust_both_mothers_and_daughters; }
00063         
00064     inline bool IO_EPOS::trust_mothers_before_daughters() const 
00065     { return m_trust_mothers_before_daughters; }
00066 
00067     inline bool IO_EPOS::print_inconsistency_errors() const
00068     { return m_print_inconsistency_errors; }
00069 
00070     inline void IO_EPOS::set_trust_both_mothers_and_daughters( bool b )
00071     { m_trust_both_mothers_and_daughters = b; }
00072 
00073     inline void IO_EPOS::set_trust_mothers_before_daughters( bool b )
00074     { m_trust_mothers_before_daughters = b; }
00075 
00076     inline void IO_EPOS::set_print_inconsistency_errors( bool b  )
00077     { m_print_inconsistency_errors = b; }
00078 
00079     inline bool IO_EPOS::trust_beam_particles() const
00080     { return m_trust_beam_particles; }
00081 
00082     inline void IO_EPOS::set_trust_beam_particles( bool b )
00083     { m_trust_beam_particles = b; }
00084 
00086     inline void IO_EPOS::set_skip_nuclear_fragments( bool b)
00087     { m_skip_nucl_frag = b; }
00088 
00089 } // HepMC
00090 
00091 #endif  // HEPMC_IO_EPOS_H
00092 //--------------------------------------------------------------------------