hepmc - Diff between revs 508 and 521
Subversion Repositories:
| Rev 508 | Rev 521 | |||
|---|---|---|---|---|
| Line 659... | Line 659... | |||
| 659 | if ( newunit == "MM" ) return use_length_unit( Units::MM ); | 659 | if ( newunit == "MM" ) return use_length_unit( Units::MM ); | |
| 660 | else if( newunit == "CM" ) return use_length_unit( Units::CM ); | 660 | else if( newunit == "CM" ) return use_length_unit( Units::CM ); | |
| 661 | else std::cerr << "GenEvent::use_length_unit ERROR: use either MM or CM\n"; | 661 | else std::cerr << "GenEvent::use_length_unit ERROR: use either MM or CM\n"; | |
| 662 | return false; | 662 | return false; | |
| 663 | } | 663 | } | |
| - | 664 | |||
| - | 665 | void GenEvent::define_units( std::string& new_m, std::string& new_l ) { | ||
| - | 666 | |||
| - | 667 | if ( new_m == "MEV" ) m_momentum_unit = Units::MEV ; | ||
| - | 668 | else if( new_m == "GEV" ) m_momentum_unit = Units::GEV ; | ||
| - | 669 | else std::cerr << "GenEvent::define_units ERROR: use either MEV or GEV\n"; | ||
| - | 670 | |||
| - | 671 | if ( new_l == "MM" ) m_position_unit = Units::MM ; | ||
| - | 672 | else if( new_l == "CM" ) m_position_unit = Units::CM ; | ||
| - | 673 | else std::cerr << "GenEvent::define_units ERROR: use either MM or CM\n"; | ||
| - | 674 | |||
| - | 675 | } | ||
| 664 | 676 | |||
| 665 | bool GenEvent::is_valid() const { | 677 | bool GenEvent::is_valid() const { | |
| 666 | /// A GenEvent is presumed valid if it has both associated | 678 | /// A GenEvent is presumed valid if it has both associated | |
| 667 | /// particles and vertices. No other information is checked. | 679 | /// particles and vertices. No other information is checked. | |
| 668 | if ( vertices_empty() ) return false; | 680 | if ( vertices_empty() ) return false; | |
