hepmc - Blame information for rev 99
Subversion Repositories:
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 88 | garren | 1 | ////////////////////////////////////////////////////////////////////////// |
| 2 | // testHepMCIteration.h | ||
| 3 | // | ||
| 4 | // garren@fnal.gov, May 2007 | ||
| 5 | // | ||
| 6 | // Define methods and classes used by testHepMCIteration | ||
| 7 | ////////////////////////////////////////////////////////////////////////// | ||
| 8 | |||
| 9 | /// returns true if the GenParticle particle is a photon with pT > 10 GeV | ||
| 10 | bool IsPhoton( const HepMC::GenParticle* p ) { | ||
| 11 | if ( p->pdg_id() == 22 | ||
| 12 | && p->momentum().perp() > 10. ) return true; | ||
| 13 | return false; | ||
| 14 | } | ||
| 15 | |||
| 16 | /// returns true if the GenParticle is a W+/W- | ||
| 17 | bool IsWBoson( const HepMC::GenParticle* p ) { | ||
| 99 | garren | 18 | if ( abs(p->pdg_id()) == 24 ) return true; |
| 88 | garren | 19 | return false; |
| 20 | } | ||
| 21 | |||
| 22 | //! test class | ||
| 23 | |||
| 24 | /// \class IsFinalState | ||
| 25 | /// this predicate returns true if the input has no decay vertex | ||
| 26 | class IsFinalState { | ||
| 27 | public: | ||
| 28 | /// returns true if the GenParticle does not decay | ||
| 29 | bool operator()( const HepMC::GenParticle* p ) { | ||
| 30 | if ( !p->end_vertex() && p->status()==1 ) return true; | ||
| 31 | return false; | ||
| 32 | } | ||
| 33 | }; | ||
| 34 | |||
| 35 |
