#include <IO_HERWIG.h>
Inheritance diagram for HepMC::IO_HERWIG:
Public Member Functions | |
IO_HERWIG () | |
virtual | ~IO_HERWIG () |
bool | fill_next_event (GenEvent *) |
get the next event | |
void | print (std::ostream &ostr=std::cout) const |
write to ostr | |
double | interfaces_to_version_number () const |
this information is dubious | |
bool | print_inconsistency_errors () const |
default is true | |
void | set_print_inconsistency_errors (bool b=1) |
decide whether or not to print inconsistency errors | |
bool | no_gaps_in_barcodes () const |
ask how to deal with extra non-physical pseudo particles | |
void | set_no_gaps_in_barcodes (bool a) |
The HERWIG HEPEVT common block has some EXTRA non-physical ENTRIES (such as CMS frame, HARD subprocess, and CONE). | |
GenEvent * | read_next_event () |
do not over-ride | |
ParticleDataTable * | read_particle_data_table () |
do not over-ride | |
virtual GenEvent *& | operator>> (GenEvent *&) |
the same as read_next_event | |
virtual ParticleDataTable *& | operator>> (ParticleDataTable *&) |
the same as read_particle_data_table | |
virtual const GenEvent *& | operator<< (const GenEvent *&) |
the same as write_event | |
virtual GenEvent *& | operator<< (GenEvent *&) |
the same as write_event | |
virtual const ParticleDataTable *& | operator<< (const ParticleDataTable *&) |
the same as write_particle_data_table | |
virtual ParticleDataTable *& | operator<< (ParticleDataTable *&) |
the same as write_particle_data_table | |
Protected Member Functions | |
bool | trust_both_mothers_and_daughters () const |
default is true | |
bool | trust_mothers_before_daughters () const |
default is false | |
void | set_trust_mothers_before_daughters (bool b=1) |
define mother daughter trust rules | |
void | set_trust_both_mothers_and_daughters (bool b=0) |
define mother daughter trust rules | |
GenParticle * | build_particle (int index) |
make a particle | |
void | build_production_vertex (int i, std::vector< GenParticle * > &hepevt_particle, GenEvent *evt) |
make a production vertex | |
void | build_end_vertex (int i, std::vector< GenParticle * > &hepevt_particle, GenEvent *evt) |
make a decay vertex | |
int | find_in_map (const std::map< GenParticle *, int > &m, GenParticle *p) const |
find this particle in the map | |
void | repair_hepevt () const |
make the HERWIG HEPEVT common block look like the standard | |
void | remove_gaps_in_hepevt () const |
deal with artifacts of repairing HEPEVT | |
void | zero_hepevt_entry (int i) const |
zero out a HEPEVT pseudo particle | |
int | translate_herwig_to_pdg_id (int i) const |
translate particle ID | |
Private Member Functions | |
virtual void | write_event (const GenEvent *) |
write this GenEvent | |
virtual void | write_particle_data_table (const ParticleDataTable *) |
write this ParticleDataTable | |
virtual bool | fill_particle_data_table (ParticleDataTable *) |
fill this ParticleDataTable | |
IO_HERWIG (const IO_HERWIG &) | |
Private Attributes | |
bool | m_trust_mothers_before_daughters |
bool | m_trust_both_mothers_and_daughters |
bool | m_print_inconsistency_errors |
bool | m_no_gaps_in_barcodes |
std::vector< int > | m_herwig_to_pdg_id |
std::set< int > | m_no_antiparticles |
Definition at line 57 of file IO_HERWIG.h.
HepMC::IO_HERWIG::IO_HERWIG | ( | ) |
virtual HepMC::IO_HERWIG::~IO_HERWIG | ( | ) | [virtual] |
HepMC::IO_HERWIG::IO_HERWIG | ( | const IO_HERWIG & | ) | [inline, private] |
bool HepMC::IO_HERWIG::fill_next_event | ( | GenEvent * | ) | [virtual] |
void HepMC::IO_HERWIG::print | ( | std::ostream & | ostr = std::cout |
) | const [virtual] |
double HepMC::IO_HERWIG::interfaces_to_version_number | ( | ) | const [inline] |
bool HepMC::IO_HERWIG::print_inconsistency_errors | ( | ) | const [inline] |
default is true
Definition at line 149 of file IO_HERWIG.h.
00150 { return m_print_inconsistency_errors; }
void HepMC::IO_HERWIG::set_print_inconsistency_errors | ( | bool | b = 1 |
) | [inline] |
decide whether or not to print inconsistency errors
Definition at line 158 of file IO_HERWIG.h.
00159 { m_print_inconsistency_errors = b; }
bool HepMC::IO_HERWIG::no_gaps_in_barcodes | ( | ) | const [inline] |
ask how to deal with extra non-physical pseudo particles
Definition at line 75 of file IO_HERWIG.h.
00076 { return m_no_gaps_in_barcodes; }
void HepMC::IO_HERWIG::set_no_gaps_in_barcodes | ( | bool | a | ) | [inline] |
The HERWIG HEPEVT common block has some EXTRA non-physical ENTRIES (such as CMS frame, HARD subprocess, and CONE).
These are removed by IO_HERWIG. Thus the HepMC event will APPEAR to have fewer particles in it that herwig did. There is a switch m_no_gaps_in_barcodes. For true - then the extra particles are removed from HEPEVT, with the result that the HepMC barcodes will be sequential, with no gaps. false - the barcodes will correspond directly to the HEPEVT index, but there will be gaps ... ie some barcodes will be unassigned. this switch requested by I Hinchliffe, October 31, 2002
Definition at line 88 of file IO_HERWIG.h.
00089 { m_no_gaps_in_barcodes=a; }
bool HepMC::IO_HERWIG::trust_both_mothers_and_daughters | ( | ) | const [inline, protected] |
default is true
Definition at line 143 of file IO_HERWIG.h.
00144 { return m_trust_both_mothers_and_daughters; }
bool HepMC::IO_HERWIG::trust_mothers_before_daughters | ( | ) | const [inline, protected] |
default is false
Definition at line 146 of file IO_HERWIG.h.
00147 { return m_trust_mothers_before_daughters; }
void HepMC::IO_HERWIG::set_trust_mothers_before_daughters | ( | bool | b = 1 |
) | [inline, protected] |
define mother daughter trust rules
Definition at line 155 of file IO_HERWIG.h.
00156 { m_trust_mothers_before_daughters = b; }
void HepMC::IO_HERWIG::set_trust_both_mothers_and_daughters | ( | bool | b = 0 |
) | [inline, protected] |
define mother daughter trust rules
Definition at line 152 of file IO_HERWIG.h.
00153 { m_trust_both_mothers_and_daughters = b; }
GenParticle* HepMC::IO_HERWIG::build_particle | ( | int | index | ) | [protected] |
make a particle
void HepMC::IO_HERWIG::build_production_vertex | ( | int | i, | |
std::vector< GenParticle * > & | hepevt_particle, | |||
GenEvent * | evt | |||
) | [protected] |
make a production vertex
void HepMC::IO_HERWIG::build_end_vertex | ( | int | i, | |
std::vector< GenParticle * > & | hepevt_particle, | |||
GenEvent * | evt | |||
) | [protected] |
make a decay vertex
int HepMC::IO_HERWIG::find_in_map | ( | const std::map< GenParticle *, int > & | m, | |
GenParticle * | p | |||
) | const [protected] |
find this particle in the map
void HepMC::IO_HERWIG::repair_hepevt | ( | ) | const [protected] |
make the HERWIG HEPEVT common block look like the standard
void HepMC::IO_HERWIG::remove_gaps_in_hepevt | ( | ) | const [protected] |
deal with artifacts of repairing HEPEVT
void HepMC::IO_HERWIG::zero_hepevt_entry | ( | int | i | ) | const [protected] |
zero out a HEPEVT pseudo particle
int HepMC::IO_HERWIG::translate_herwig_to_pdg_id | ( | int | i | ) | const [protected] |
translate particle ID
virtual void HepMC::IO_HERWIG::write_event | ( | const GenEvent * | ) | [inline, private, virtual] |
virtual void HepMC::IO_HERWIG::write_particle_data_table | ( | const ParticleDataTable * | ) | [inline, private, virtual] |
write this ParticleDataTable
Implements HepMC::IO_BaseClass.
Definition at line 124 of file IO_HERWIG.h.
virtual bool HepMC::IO_HERWIG::fill_particle_data_table | ( | ParticleDataTable * | ) | [inline, private, virtual] |
fill this ParticleDataTable
Implements HepMC::IO_BaseClass.
Definition at line 125 of file IO_HERWIG.h.
GenEvent * HepMC::IO_BaseClass::read_next_event | ( | ) | [inline, inherited] |
do not over-ride
creates a new event and fills it by calling the sister method read_next_event( GenEvent* )
Definition at line 87 of file IO_BaseClass.h.
00087 { 00090 // 00091 // 1. create an empty event container 00092 GenEvent* evt = new GenEvent(); 00093 // 2. fill the evt container - if the read is successful, return the 00094 // pointer, otherwise return null and delete the evt 00095 if ( fill_next_event( evt ) ) return evt; 00096 // note: the below delete is only reached if read fails 00097 // ... thus there is not much overhead in new then delete 00098 // since this statement is rarely reached 00099 delete evt; 00100 return 0; 00101 }
ParticleDataTable * HepMC::IO_BaseClass::read_particle_data_table | ( | ) | [inline, inherited] |
do not over-ride
creates a new particle data table and fills it by calling the sister method read_particle_data_table( ParticleDataTable* )
Definition at line 103 of file IO_BaseClass.h.
00103 { 00106 // 00107 // 1. create an empty pdt 00108 ParticleDataTable* pdt = new ParticleDataTable(); 00109 // 2. fill the pdt container - if the read is successful, return the 00110 // pointer, otherwise return null and delete the evt 00111 if ( fill_particle_data_table( pdt ) ) return pdt; 00112 // next statement is only reached if read fails 00113 delete pdt; 00114 return 0; 00115 }
the same as read_next_event
Definition at line 121 of file IO_BaseClass.h.
00121 { 00122 evt = read_next_event(); 00123 return evt; 00124 }
ParticleDataTable *& HepMC::IO_BaseClass::operator>> | ( | ParticleDataTable *& | ) | [inline, virtual, inherited] |
the same as read_particle_data_table
Definition at line 137 of file IO_BaseClass.h.
00138 { 00139 pdt = read_particle_data_table(); 00140 return pdt; 00141 }
const GenEvent *& HepMC::IO_BaseClass::operator<< | ( | const GenEvent *& | ) | [inline, virtual, inherited] |
the same as write_event
Definition at line 126 of file IO_BaseClass.h.
00127 { 00128 write_event( evt ); 00129 return evt; 00130 }
the same as write_event
Definition at line 132 of file IO_BaseClass.h.
00132 { 00133 write_event( evt ); 00134 return evt; 00135 }
const ParticleDataTable *& HepMC::IO_BaseClass::operator<< | ( | const ParticleDataTable *& | ) | [inline, virtual, inherited] |
the same as write_particle_data_table
Definition at line 143 of file IO_BaseClass.h.
00144 { 00145 write_particle_data_table( pdt ); 00146 return pdt; 00147 }
ParticleDataTable *& HepMC::IO_BaseClass::operator<< | ( | ParticleDataTable *& | ) | [inline, virtual, inherited] |
the same as write_particle_data_table
Definition at line 149 of file IO_BaseClass.h.
00150 { 00151 write_particle_data_table( pdt ); 00152 return pdt; 00153 }
bool HepMC::IO_HERWIG::m_trust_mothers_before_daughters [private] |
Definition at line 132 of file IO_HERWIG.h.
bool HepMC::IO_HERWIG::m_trust_both_mothers_and_daughters [private] |
Definition at line 133 of file IO_HERWIG.h.
bool HepMC::IO_HERWIG::m_print_inconsistency_errors [private] |
Definition at line 134 of file IO_HERWIG.h.
bool HepMC::IO_HERWIG::m_no_gaps_in_barcodes [private] |
Definition at line 135 of file IO_HERWIG.h.
std::vector<int> HepMC::IO_HERWIG::m_herwig_to_pdg_id [private] |
Definition at line 136 of file IO_HERWIG.h.
std::set<int> HepMC::IO_HERWIG::m_no_antiparticles [private] |
Definition at line 137 of file IO_HERWIG.h.