hepmc - Diff between revs 2 and 65
Subversion Repositories:
| Rev 2 | Rev 65 | |||
|---|---|---|---|---|
| Line 45... | Line 45... | |||
| 45 | class GenEvent; | 45 | class GenEvent; | |
| 46 | class GenVertex; | 46 | class GenVertex; | |
| 47 | class GenParticle; | 47 | class GenParticle; | |
| 48 | class ParticleDataTable; | 48 | class ParticleDataTable; | |
| 49 | 49 | |||
| - | 50 | //! IO_HERWIG is used to get Herwig information | ||
| - | 51 | |||
| - | 52 | /// | ||
| - | 53 | /// \class IO_HERWIG | ||
| - | 54 | /// IO class for reading the HEPEVT common block from | ||
| - | 55 | /// the Herwig monte carlo program. | ||
| - | 56 | /// | ||
| 50 | class IO_HERWIG : public IO_BaseClass { | 57 | class IO_HERWIG : public IO_BaseClass { | |
| 51 | public: | 58 | public: | |
| 52 | IO_HERWIG(); | 59 | IO_HERWIG(); | |
| 53 | virtual ~IO_HERWIG(); | 60 | virtual ~IO_HERWIG(); | |
| - | 61 | /// get the next event | ||
| 54 | bool fill_next_event( GenEvent* ); | 62 | bool fill_next_event( GenEvent* ); | |
| - | 63 | /// write to ostr | ||
| 55 | void print( std::ostream& ostr = std::cout ) const; | 64 | void print( std::ostream& ostr = std::cout ) const; | |
| - | 65 | /// this information is dubious | ||
| 56 | double interfaces_to_version_number() const {return 6.400;} | 66 | double interfaces_to_version_number() const {return 6.400;} | |
| 57 | 67 | |||
| 58 | // see comments below for these switches. | 68 | // see comments below for these switches. | |
| - | 69 | /// default is true | ||
| 59 | bool print_inconsistency_errors() const; | 70 | bool print_inconsistency_errors() const; | |
| - | 71 | /// decide whether or not to print inconsistency errors | ||
| 60 | void set_print_inconsistency_errors( bool b = 1 ); | 72 | void set_print_inconsistency_errors( bool b = 1 ); | |
| 61 | 73 | |||
| - | 74 | /// ask how to deal with extra non-physical pseudo particles | ||
| 62 | bool no_gaps_in_barcodes() const | 75 | bool no_gaps_in_barcodes() const | |
| 63 | { return m_no_gaps_in_barcodes; } | 76 | { return m_no_gaps_in_barcodes; } | |
| - | 77 | /// The HERWIG HEPEVT common block has some EXTRA non-physical ENTRIES | ||
| - | 78 | /// (such as CMS frame, HARD subprocess, and CONE). | ||
| - | 79 | /// These are removed by IO_HERWIG. Thus the HepMC event will APPEAR | ||
| - | 80 | /// to have fewer particles in it that herwig did. | ||
| - | 81 | /// There is a switch m_no_gaps_in_barcodes. For | ||
| - | 82 | /// true - then the extra particles are removed from HEPEVT, with | ||
| - | 83 | /// the result that the HepMC barcodes will be sequential, with | ||
| - | 84 | /// no gaps. | ||
| - | 85 | /// false - the barcodes will correspond directly to the HEPEVT index, but | ||
| - | 86 | /// there will be gaps ... ie some barcodes will be unassigned. | ||
| - | 87 | /// this switch requested by I Hinchliffe, October 31, 2002 | ||
| 64 | void set_no_gaps_in_barcodes( bool a ) | 88 | void set_no_gaps_in_barcodes( bool a ) | |
| 65 | { m_no_gaps_in_barcodes=a; } | 89 | { m_no_gaps_in_barcodes=a; } | |
| 66 | 90 | |||
| 67 | protected: // for internal use only | 91 | protected: // for internal use only | |
| - | 92 | /// default is true | ||
| 68 | bool trust_both_mothers_and_daughters() const; | 93 | bool trust_both_mothers_and_daughters() const; | |
| - | 94 | /// default is false | ||
| 69 | bool trust_mothers_before_daughters() const; | 95 | bool trust_mothers_before_daughters() const; | |
| - | 96 | /// define mother daughter trust rules | ||
| 70 | void set_trust_mothers_before_daughters( bool b = 1 ); | 97 | void set_trust_mothers_before_daughters( bool b = 1 ); | |
| - | 98 | /// define mother daughter trust rules | ||
| 71 | void set_trust_both_mothers_and_daughters( bool b = 0 ); | 99 | void set_trust_both_mothers_and_daughters( bool b = 0 ); | |
| 72 | 100 | |||
| 73 | GenParticle* build_particle( int index ); | 101 | GenParticle* build_particle( int index ); | |
| 74 | void build_production_vertex( | 102 | void build_production_vertex( | |
| 75 | int i,std::vector<GenParticle*>& hepevt_particle, GenEvent* evt ); | 103 | int i,std::vector<GenParticle*>& hepevt_particle, GenEvent* evt ); | |
| 76 | void build_end_vertex( | 104 | void build_end_vertex( | |
| 77 | int i, std::vector<GenParticle*>& hepevt_particle, GenEvent* evt ); | 105 | int i, std::vector<GenParticle*>& hepevt_particle, GenEvent* evt ); | |
| - | 106 | /// find this particle in the map | ||
| 78 | int find_in_map( | 107 | int find_in_map( | |
| 79 | const std::map<GenParticle*,int>& m, GenParticle* p) const; | 108 | const std::map<GenParticle*,int>& m, GenParticle* p) const; | |
| 80 | 109 | |||
| - | 110 | /// make the HERWIG HEPEVT common block look like the standard | ||
| 81 | void repair_hepevt() const; | 111 | void repair_hepevt() const; | |
| - | 112 | /// deal with artifacts of repairing HEPEVT | ||
| 82 | void remove_gaps_in_hepevt() const; | 113 | void remove_gaps_in_hepevt() const; | |
| - | 114 | /// zero out a HEPEVT pseudo particle | ||
| 83 | void zero_hepevt_entry( int i ) const; | 115 | void zero_hepevt_entry( int i ) const; | |
| - | 116 | /// translate particle ID | ||
| 84 | int translate_herwig_to_pdg_id( int i ) const; | 117 | int translate_herwig_to_pdg_id( int i ) const; | |
| 85 | 118 | |||
| 86 | private: // following are not implemented for Herwig | 119 | private: // following are not implemented for Herwig | |
| 87 | virtual void write_event( const GenEvent* ){} | 120 | virtual void write_event( const GenEvent* ){} | |
| 88 | virtual void write_particle_data_table( const ParticleDataTable* ){} | 121 | virtual void write_particle_data_table( const ParticleDataTable* ){} | |
