HepMC Reference Documentation

HepMC

GenEvent.h

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 #ifndef HEPMC_GEN_EVENT_H
00003 #define HEPMC_GEN_EVENT_H
00004 
00006 // Matt.Dobbs@Cern.CH, September 1999, refer to:
00007 // M. Dobbs and J.B. Hansen, "The HepMC C++ Monte Carlo Event Record for
00008 // High Energy Physics", Computer Physics Communications (to be published).
00009 //
00010 // Event record for MC generators (for use at any stage of generation)
00012 //
00013 // This class is intended as both a "container class" ( to store a MC
00014 //  event for interface between MC generators and detector simulation )
00015 //  and also as a "work in progress class" ( that could be used inside
00016 //  a generator and modified as the event is built ).
00017 //
00018 // Iterators are provided which allow the user to easily obtain a
00019 //  list of particles or vertices in an event --- this list can be filled
00020 //  subject to some sort of selection criteria. Examples are given below
00021 //  ( see HepMC::copy_if and std::copy )
00022 
00027 namespace HepMC {
00028 
00029     // To create a list from an iterator, use: (i.e. for a list of particles);
00030     // #include <algorithm>
00031     //     list<GenParticle*> thelist;
00032     //     copy( evt->particles_begin(), evt->particles_end(), 
00033     //           back_inserter(thelist) );
00034     // to create a list subject to a condition (predicate) use:
00035     //     list<GenParticle*> thelist;
00036     //     HepMC::copy_if( evt->particles_begin(), evt->particles_end(), 
00037     //                     back_inserter(thelist), is_photon() );
00038     // where is_photon() is a predicate like:
00039     //     class is_photon {
00040     //       public:
00041     //         bool operator() ( GenParticle const * p ) {
00042     //             if ( p && p->pdg_id() == 22 ) return true;
00043     //             return false;
00044     //         }
00045     //     };
00046     // which the user defines herself.
00047 
00049     template <class InputIterator, class OutputIterator, class Predicate>
00050     void copy_if( InputIterator first, InputIterator last, OutputIterator out,
00051                   Predicate pred ) {
00052         for ( ; first != last; ++first ) { if ( pred(*first) ) out = *first; }
00053     }
00054 } // HepMC
00055 
00056 // Since a container of all vertices in the event is maintained, the time
00057 //  required to loop over all vertices (or particles) is very fast -- and 
00058 //  the user does not gain much by first making his own list.
00059 //  (this is not true for the GenVertex:: versions of these iterators, which
00060 //   allow you to specify the vertex starting point and range)
00061 
00062 // Data Members:
00063 // signal_process_id()   The integer ID that uniquely specifies this signal
00064 //                       process, i.e. MSUB in Pythia. It is necessary to
00065 //                       package this with each event rather than with the run
00066 //                       because many processes may be generated within one
00067 //                       run.
00068 // event_number()        Strictly speaking we cannot think of any reason that
00069 //                       an event would need to know its own event number, it
00070 //                       is more likely something that would be assigned by
00071 //                       a database. It is included anyway (tradition?) since
00072 //                       we expect it may be useful for debugging. It can
00073 //                       be reset later by a database.
00074 // mpi()                 The number of multi parton interactions in the event.
00075 //                       This is NOT beam pileup.  Set to -1 by default.
00076 // beam_particles()      A pair of pointers to the incoming beam particles.
00077 // signal_process_vertex() pointer to the vertex containing the signal process
00078 // weights()             Vector of doubles which specify th weight of the evnt,
00079 //                       the first entry will be the "event weight" used for
00080 //                       hit and miss etc., but a general vector is used to
00081 //                       allow for reweighting etc. We envision a list of
00082 //                       WeightTags to be included with a run class which
00083 //                       would specify the meaning of the Weights .
00084 // random_states()       Vector of integers which specify the random number 
00085 //                       generator's state for this event. It is left to the
00086 //                       generator to make use of this. We envision a vector of
00087 //                       RndmStatesTags to be included with a run class which
00088 //                       would specify the meaning of the random_states.
00089 //
00091 // Memory allocation //
00093 // -When a vertex (particle) is added to a event (vertex), it is "adopted" 
00094 //  and becomes the responsibility of the event (vertex) to delete that 
00095 //  particle. 
00096 // -objects responsible for deleting memory:
00097 //    -events delete included vertices
00098 //    -each vertex deletes its outgoing particles which do not have decay
00099 //     vertices
00100 //    -each vertex deletes its incoming particles which do not
00101 //     have creation vertices 
00102 //
00104 // About the Barcodes //
00106 // - each vertex or particle has a barcode, which is just an integer which
00107 //   uniquely identifies it inside the event (i.e. there is a one to one
00108 //   mapping between particle memory addresses and particle barcodes... and 
00109 //   the same applied for vertices)
00110 // - The value of a barcode has NO MEANING and NO ORDER!
00111 //   For the user's convenience, when an event is read in via an IO_method
00112 //   from an indexed list (like the HEPEVT common block), then the index will
00113 //   become the barcode for that particle.
00114 // - particle barcodes are always positive integers
00115 //   vertex barcodes are always negative integers
00116 //   The barcodes are chosen and set automatically when a vertex or particle
00117 //   comes under the ownership of an event (i.e. it is contained in an event).
00118 // - You can tell when a particle or vertex is owned, because its 
00119 //   parent_event() return value will return a pointer to the event which owns
00120 //   it (or null if its an orphan).
00121 // 
00122 
00123 #include "HepMC/GenVertex.h"
00124 #include "HepMC/GenParticle.h"
00125 #include "HepMC/WeightContainer.h"
00126 #include "HepMC/HeavyIon.h"
00127 #include "HepMC/PdfInfo.h"
00128 #include "HepMC/Units.h"
00129 #include "HepMC/HepMCDefs.h"
00130 #include <map>
00131 #include <string>
00132 #include <vector>
00133 #include <algorithm>
00134 #include <iostream>
00135 
00136 namespace HepMC {
00137 
00139 
00145     class GenEvent {
00146         friend class GenParticle;
00147         friend class GenVertex;  
00148     public:
00150         GenEvent( int signal_process_id = 0, int event_number = 0,
00151                   GenVertex* signal_vertex = 0,
00152                   const WeightContainer& weights = std::vector<double>(),
00153                   const std::vector<long>& randomstates = std::vector<long>(),
00154                   Units::MomentumUnit = Units::default_momentum_unit(), 
00155                   Units::LengthUnit = Units::default_length_unit() );
00157         GenEvent( int signal_process_id, int event_number,
00158                   GenVertex* signal_vertex, const WeightContainer& weights,
00159                   const std::vector<long>& randomstates,
00160                   const HeavyIon& ion, const PdfInfo& pdf,
00161                   Units::MomentumUnit = Units::default_momentum_unit(), 
00162                   Units::LengthUnit = Units::default_length_unit() );
00164         GenEvent( Units::MomentumUnit, Units::LengthUnit,
00165                   int signal_process_id = 0, int event_number = 0,
00166                   GenVertex* signal_vertex = 0,
00167                   const WeightContainer& weights = std::vector<double>(),
00168                   const std::vector<long>& randomstates = std::vector<long>() );
00170         GenEvent( Units::MomentumUnit, Units::LengthUnit,
00171                   int signal_process_id, int event_number,
00172                   GenVertex* signal_vertex, const WeightContainer& weights,
00173                   const std::vector<long>& randomstates,
00174                   const HeavyIon& ion, const PdfInfo& pdf );
00175         GenEvent( const GenEvent& inevent );          
00176         GenEvent& operator=( const GenEvent& inevent ); 
00177         virtual ~GenEvent(); 
00178 
00179         void swap( GenEvent & other );  
00180     
00181         void print( std::ostream& ostr = std::cout ) const; 
00182         void print_version( std::ostream& ostr = std::cout ) const; 
00183 
00185         GenParticle* barcode_to_particle( int barCode ) const;
00187         GenVertex*   barcode_to_vertex(   int barCode ) const;
00188 
00190         // access methods //
00192 
00193         int signal_process_id() const; 
00194         int event_number() const; 
00195         int mpi() const;          
00196         double event_scale() const; 
00197         double alphaQCD() const; 
00198         double alphaQED() const; 
00199 
00200         GenVertex* signal_process_vertex() const;
00202         bool valid_beam_particles() const;
00204         std::pair<HepMC::GenParticle*,HepMC::GenParticle*> beam_particles() const;
00205 
00211         WeightContainer&        weights(); 
00212         const WeightContainer&  weights() const; 
00213 
00215         HeavyIon const *          heavy_ion() const;
00216         HeavyIon*                heavy_ion();
00218         PdfInfo const *           pdf_info() const;
00219         PdfInfo*                 pdf_info();
00220 
00222         const std::vector<long>& random_states() const;
00223 
00225         int     particles_size() const;
00227         bool    particles_empty() const;
00229         int     vertices_size() const;
00231         bool    vertices_empty() const;
00232 
00233         void write_units( std::ostream & os = std::cout ) const; 
00234 
00236         Units::MomentumUnit momentum_unit() const;
00238         Units::LengthUnit   length_unit()   const;
00239 
00241         // mutator methods //
00243 
00244         bool    add_vertex( GenVertex* vtx );    
00245         bool    remove_vertex( GenVertex* vtx ); 
00246         void    clear();                         
00247         
00248         void set_signal_process_id( int id ); 
00249         void set_event_number( int eventno ); 
00250         void set_mpi( int  ); 
00251         void set_event_scale( double scale ); 
00252         void set_alphaQCD( double a ); 
00253         void set_alphaQED( double a ); 
00254 
00256         void set_signal_process_vertex( GenVertex* );
00258         bool set_beam_particles(GenParticle*, GenParticle*);
00260         bool set_beam_particles(std::pair<HepMC::GenParticle*,HepMC::GenParticle*> const &);
00262         void set_random_states( const std::vector<long>& randomstates );
00263 
00265         void set_heavy_ion( const HeavyIon& ion );
00267         void set_pdf_info( const PdfInfo& p );
00268         
00270         void use_units( Units::MomentumUnit, Units::LengthUnit );
00273         void use_units( std::string&, std::string& );
00274 
00275     public:
00277         // vertex_iterators          //
00279         // Note:  the XXX_iterator is "resolvable" as XXX_const_iterator, but 
00280         //  not the reverse, which is consistent with STL, 
00281         //  see Musser, Derge, Saini 2ndEd. p. 69,70.
00282 
00284 
00288         class vertex_const_iterator :
00289           public std::iterator<std::forward_iterator_tag,HepMC::GenVertex*,ptrdiff_t>{
00290             // Iterates over all vertices in this event
00291         public:
00293             vertex_const_iterator(
00294                 const 
00295                 std::map<int,HepMC::GenVertex*,std::greater<int> >::const_iterator& i)
00296                 : m_map_iterator(i) {}
00297             vertex_const_iterator() {}
00299             vertex_const_iterator( const vertex_const_iterator& i )
00300                 { *this = i; }
00301             virtual ~vertex_const_iterator() {}
00303             vertex_const_iterator&  operator=( const vertex_const_iterator& i )
00304                 { m_map_iterator = i.m_map_iterator; return *this; }
00306             GenVertex* operator*(void) const { return m_map_iterator->second; }
00308             vertex_const_iterator&  operator++(void)  //Pre-fix increment 
00309                 { ++m_map_iterator; return *this; }
00311             vertex_const_iterator   operator++(int)   //Post-fix increment
00312                 { vertex_const_iterator out(*this); ++(*this); return out; }
00314             bool  operator==( const vertex_const_iterator& a ) const
00315                 { return m_map_iterator == a.m_map_iterator; }
00317             bool  operator!=( const vertex_const_iterator& a ) const
00318                 { return !(m_map_iterator == a.m_map_iterator); }
00319         protected:
00321             std::map<int,HepMC::GenVertex*,std::greater<int> >::const_iterator 
00322                                                                 m_map_iterator;
00323         };
00324         friend class vertex_const_iterator;
00326         vertex_const_iterator      vertices_begin() const
00327             { return GenEvent::vertex_const_iterator( 
00328                 m_vertex_barcodes.begin() ); }
00330         vertex_const_iterator      vertices_end() const
00331             { return GenEvent::vertex_const_iterator(
00332                 m_vertex_barcodes.end() ); }
00333 
00334 
00336 
00340         class vertex_iterator :
00341           public std::iterator<std::forward_iterator_tag,HepMC::GenVertex*,ptrdiff_t>{
00342             // Iterates over all vertices in this event
00343         public:
00345             vertex_iterator( 
00346                 const 
00347                 std::map<int,HepMC::GenVertex*,std::greater<int> >::iterator& i )
00348                 : m_map_iterator( i ) {}
00349             vertex_iterator() {}
00351             vertex_iterator( const vertex_iterator& i ) { *this = i; }
00352             virtual ~vertex_iterator() {}
00354             vertex_iterator&  operator=( const vertex_iterator& i ) {
00355                 m_map_iterator = i.m_map_iterator;
00356                 return *this;
00357             }
00359             operator vertex_const_iterator() const
00360                 { return vertex_const_iterator(m_map_iterator); }
00362             GenVertex*        operator*(void) const
00363                 { return m_map_iterator->second; }
00365             vertex_iterator&  operator++(void)  //Pre-fix increment 
00366                 { ++m_map_iterator;     return *this; }
00368             vertex_iterator   operator++(int)   //Post-fix increment
00369                 { vertex_iterator out(*this); ++(*this); return out; }
00371             bool              operator==( const vertex_iterator& a ) const
00372                 { return m_map_iterator == a.m_map_iterator; }
00374             bool              operator!=( const vertex_iterator& a ) const
00375                 { return !(m_map_iterator == a.m_map_iterator); }
00376         protected:
00378             std::map<int,HepMC::GenVertex*,std::greater<int> >::iterator 
00379                                                                m_map_iterator;
00380         };
00381         friend class vertex_iterator;
00383         vertex_iterator            vertices_begin() 
00384             { return GenEvent::vertex_iterator( 
00385                 m_vertex_barcodes.begin() ); }
00387         vertex_iterator            vertices_end()
00388             { return GenEvent::vertex_iterator(
00389                 m_vertex_barcodes.end() ); }
00390 
00391     public:
00393         // particle_iterator         //
00395         // Example of iterating over all particles in the event:
00396         //      for ( GenEvent::particle_const_iterator p = particles_begin();
00397         //            p != particles_end(); ++p ) {
00398         //         (*p)->print();
00399         //      }
00400         //
00401 
00403 
00407         class particle_const_iterator :
00408           public std::iterator<std::forward_iterator_tag,HepMC::GenParticle*,ptrdiff_t>{
00409             // Iterates over all vertices in this event
00410         public:
00412             particle_const_iterator(
00413                 const std::map<int,HepMC::GenParticle*>::const_iterator& i )
00414                 : m_map_iterator(i) {}
00415             particle_const_iterator() {}
00417             particle_const_iterator( const particle_const_iterator& i )
00418                 { *this = i; }
00419             virtual ~particle_const_iterator() {}
00421             particle_const_iterator& operator=(
00422                 const particle_const_iterator& i )
00423                 { m_map_iterator = i.m_map_iterator; return *this; }
00425             GenParticle*        operator*(void) const
00426                 { return m_map_iterator->second; }
00428             particle_const_iterator&  operator++(void)  //Pre-fix increment 
00429                 { ++m_map_iterator; return *this; }
00431             particle_const_iterator   operator++(int)   //Post-fix increment
00432                 { particle_const_iterator out(*this); ++(*this); return out; }
00434             bool  operator==( const particle_const_iterator& a ) const
00435                 { return m_map_iterator == a.m_map_iterator; }
00437             bool  operator!=( const particle_const_iterator& a ) const
00438                 { return !(m_map_iterator == a.m_map_iterator); }
00439         protected:
00441             std::map<int,HepMC::GenParticle*>::const_iterator m_map_iterator;
00442         };      
00443         friend class particle_const_iterator;
00445         particle_const_iterator      particles_begin() const
00446             { return GenEvent::particle_const_iterator( 
00447                 m_particle_barcodes.begin() ); }
00449         particle_const_iterator      particles_end() const
00450             { return GenEvent::particle_const_iterator(
00451                 m_particle_barcodes.end() ); }
00452 
00454 
00458         class particle_iterator :
00459           public std::iterator<std::forward_iterator_tag,HepMC::GenParticle*,ptrdiff_t>{
00460             // Iterates over all vertices in this event
00461         public:
00463             particle_iterator( const std::map<int,HepMC::GenParticle*>::iterator& i )
00464                 : m_map_iterator( i ) {}
00465             particle_iterator() {}
00467             particle_iterator( const particle_iterator& i ) { *this = i; }
00468             virtual ~particle_iterator() {}
00470             particle_iterator&  operator=( const particle_iterator& i ) {
00471                 m_map_iterator = i.m_map_iterator;
00472                 return *this;
00473             }
00475             operator particle_const_iterator() const
00476                 { return particle_const_iterator(m_map_iterator); }
00478             GenParticle*        operator*(void) const
00479                 { return m_map_iterator->second; }
00481             particle_iterator&  operator++(void) 
00482                 { ++m_map_iterator;     return *this; }
00484             particle_iterator   operator++(int)   
00485                 { particle_iterator out(*this); ++(*this); return out; }
00487             bool              operator==( const particle_iterator& a ) const
00488                 { return m_map_iterator == a.m_map_iterator; }
00490             bool              operator!=( const particle_iterator& a ) const
00491                 { return !(m_map_iterator == a.m_map_iterator); }
00492         protected:
00494             std::map<int,HepMC::GenParticle*>::iterator m_map_iterator;
00495         };
00496         friend class particle_iterator;
00498         particle_iterator particles_begin() 
00499             { return GenEvent::particle_iterator(
00500                 m_particle_barcodes.begin() ); }
00502         particle_iterator particles_end()
00503             { return GenEvent::particle_iterator(
00504                 m_particle_barcodes.end() ); }
00505 
00507     protected:
00508         //
00509         // Following methods intended for use by GenParticle/Vertex classes:
00510         // In general there is no reason they should be used elsewhere.
00512         bool         set_barcode( GenParticle* p, int suggested_barcode =false );
00514         bool         set_barcode( GenVertex*   v, int suggested_barcode =false );
00516         void         remove_barcode( GenParticle* p );
00518         void         remove_barcode( GenVertex*   v );
00519 
00520         void delete_all_vertices(); 
00521 
00522      private: // methods
00524         bool use_momentum_unit( Units::MomentumUnit );
00525         bool use_momentum_unit( std::string& );
00527         bool use_length_unit( Units::LengthUnit );
00528         bool use_length_unit( std::string& );
00529 
00530     private: // data members
00531         int                   m_signal_process_id;
00532         int                   m_event_number;  
00533         int                   m_mpi;        // number of multi paricle interactions
00534         double                m_event_scale;// energy scale, see hep-ph/0109068
00535         double                m_alphaQCD;   // QCD coupling, see hep-ph/0109068
00536         double                m_alphaQED;   // QED coupling, see hep-ph/0109068
00537         GenVertex*            m_signal_process_vertex;
00538         GenParticle*          m_beam_particle_1;
00539         GenParticle*          m_beam_particle_2;
00540         WeightContainer       m_weights; // weights for this event first weight
00541                                          // is used by default for hit and miss
00542         std::vector<long> m_random_states; // container of rndm num 
00543                                                // generator states
00544 
00545         std::map< int,HepMC::GenVertex*,std::greater<int> >   m_vertex_barcodes;
00546         std::map< int,HepMC::GenParticle*,std::less<int> >    m_particle_barcodes;
00547         HeavyIon*             m_heavy_ion;            // undefined by default
00548         PdfInfo*              m_pdf_info;             // undefined by default
00549         Units::MomentumUnit   m_momentum_unit;    // default value set by configure switch
00550         Units::LengthUnit     m_position_unit;    // default value set by configure switch
00551 
00552         //static unsigned int   s_counter;
00553     };
00554 
00555 
00557     // INLINE Free Functions //
00559 
00560     // Implemented in terms of GenEvent::use_...
00561     inline GenEvent& convert_units(GenEvent & evt, Units::MomentumUnit m, Units::LengthUnit l)
00562     {
00563       evt.use_units(m, l);
00564       return evt;
00565     }
00566 
00568     // INLINE Access Methods //
00570 
00575     inline int GenEvent::signal_process_id() const 
00576     { return m_signal_process_id; }
00577 
00578     inline int GenEvent::event_number() const { return m_event_number; }
00579 
00582     inline int GenEvent::mpi() const { return m_mpi; }
00583 
00584     inline double GenEvent::event_scale() const { return m_event_scale; }
00585 
00586     inline double GenEvent::alphaQCD() const { return m_alphaQCD; }
00587 
00588     inline double GenEvent::alphaQED() const { return m_alphaQED; }
00589  
00590     inline GenVertex* GenEvent::signal_process_vertex() const {
00592         return m_signal_process_vertex;
00593     }  
00594 
00595     inline WeightContainer& GenEvent::weights() { return m_weights; }
00596 
00597     inline const WeightContainer& GenEvent::weights() const 
00598     { return m_weights; }
00599 
00600     inline HeavyIon const * GenEvent::heavy_ion() const 
00601     { return m_heavy_ion; }
00602 
00603     inline HeavyIon*  GenEvent::heavy_ion()  
00604     { return m_heavy_ion; }
00605 
00606     inline PdfInfo const * GenEvent::pdf_info() const 
00607     { return m_pdf_info; }
00608 
00609     inline PdfInfo*  GenEvent::pdf_info()  
00610     { return m_pdf_info; }
00611 
00617     inline const std::vector<long>& GenEvent::random_states() const 
00618     { return m_random_states; }
00619 
00620     inline void GenEvent::set_signal_process_id( int id )
00621     { m_signal_process_id = id; }
00622 
00623     inline void GenEvent::set_event_number( int eventno )
00624     { m_event_number = eventno; }
00625 
00627     inline void GenEvent::set_mpi( int nmpi )
00628     { m_mpi = nmpi; }
00629 
00630 
00631     inline void GenEvent::set_event_scale( double sc ) { m_event_scale = sc; }
00632 
00633     inline void GenEvent::set_alphaQCD( double a ) { m_alphaQCD = a; }
00634 
00635     inline void GenEvent::set_alphaQED( double a ) { m_alphaQED = a; }
00636 
00637     inline void GenEvent::set_signal_process_vertex( GenVertex* vtx ) {
00638         m_signal_process_vertex = vtx;
00639         if ( m_signal_process_vertex ) add_vertex( m_signal_process_vertex );
00640     }
00641 
00642     inline void GenEvent::set_heavy_ion( const HeavyIon& ion )
00643     { m_heavy_ion = new HeavyIon(ion); }
00644 
00645     inline void GenEvent::set_pdf_info( const PdfInfo& p )
00646     { m_pdf_info = new PdfInfo(p); }
00647 
00648     inline void GenEvent::set_random_states( const std::vector<long>&
00649                                              randomstates )
00650     { m_random_states = randomstates; }
00651 
00652     inline void GenEvent::remove_barcode( GenParticle* p )
00653     { m_particle_barcodes.erase( p->barcode() ); }
00654 
00655     inline void GenEvent::remove_barcode( GenVertex* v )
00656     { m_vertex_barcodes.erase( v->barcode() ); }
00657 
00671     inline GenParticle* GenEvent::barcode_to_particle( int barCode ) const
00672     { 
00673         std::map<int,HepMC::GenParticle*>::const_iterator i 
00674             = m_particle_barcodes.find(barCode);
00675         return ( i != m_particle_barcodes.end() ) ? (*i).second : 0;
00676     }
00677 
00691     inline GenVertex* GenEvent::barcode_to_vertex( int barCode ) const
00692     {
00693         std::map<int,GenVertex*,std::greater<int> >::const_iterator i 
00694             = m_vertex_barcodes.find(barCode);
00695         return ( i != m_vertex_barcodes.end() ) ? (*i).second : 0;
00696     }
00697 
00698     inline int GenEvent::particles_size() const {
00699         return (int)m_particle_barcodes.size();
00700     }
00701     inline bool GenEvent::particles_empty() const {
00702         return (bool)m_particle_barcodes.empty();
00703     }
00704     inline int GenEvent::vertices_size() const {
00705         return (int)m_vertex_barcodes.size();
00706     }
00707     inline bool GenEvent::vertices_empty() const {
00708         return (bool)m_vertex_barcodes.empty();
00709     }
00710     
00711     // beam particles
00712     inline std::pair<HepMC::GenParticle *,HepMC::GenParticle *> GenEvent::beam_particles() const {
00713         return std::pair<GenParticle *,GenParticle *> (m_beam_particle_1, m_beam_particle_2);
00714     }
00715 
00716     // units
00717     inline Units::MomentumUnit GenEvent::momentum_unit() const {
00718         return m_momentum_unit; 
00719     }
00720     inline Units::LengthUnit   GenEvent::length_unit()   const {
00721         return m_position_unit; 
00722     }
00723     
00724     inline void GenEvent::use_units( Units::MomentumUnit new_m, Units::LengthUnit new_l ) { 
00725        use_momentum_unit( new_m );
00726        use_length_unit( new_l );
00727     }
00728     
00729     inline void GenEvent::use_units( std::string& new_m, std::string& new_l ) { 
00730        use_momentum_unit( new_m );
00731        use_length_unit( new_l );
00732     }
00733 
00734 } // HepMC
00735 
00736 #endif  // HEPMC_GEN_EVENT_H
00737 
00738 //--------------------------------------------------------------------------
00739 
00740 

Generated on Wed Jun 3 16:53:01 2009 for HepMC by  doxygen 1.5.1-3