2 #ifndef HEPMC_GEN_PARTICLE_H
3 #define HEPMC_GEN_PARTICLE_H
29 #include "HepMC/Flow.h"
30 #include "HepMC/Polarization.h"
31 #include "HepMC/SimpleVector.h"
32 #include "HepMC/IteratorRange.h"
35 #define hepmc_uint64_t __int64
38 #define hepmc_uint64_t uint64_t
46 class GenParticleProductionRange;
47 class ConstGenParticleProductionRange;
48 class GenParticleEndRange;
49 class ConstGenParticleEndRange;
85 void print( std::ostream& ostr = std::cout )
const;
102 int flow(
int code_index )
const;
165 void set_flow(
int code_index,
int code = 0 );
199 double m_generated_mass;
209 {
return m_momentum; }
212 {
return m_momentum; }
219 {
return m_production_vertex; }
226 {
return m_flow.
icode( code_index ); }
229 {
return m_polarization; }
232 { m_momentum = vec4; }
250 { m_polarization = polar; }
257 return ( m_status==1 ) ?
true :
false;
260 return ( m_status==2 ) ?
true :
false;
263 return ( m_status==4 ) ?
true :
false;
268 #endif // HEPMC_GEN_PARTICLE_H
Flow set_unique_icode(int code_index=1)
set unique flow code
bool operator==(const GenParticle &) const
check for equality
GenEvent * parent_event() const
pointer to the event that owns this particle
void set_generated_mass(const double &m)
define the actual generated mass
int pdg_id() const
particle ID
GenParticle(void)
default constructor
void set_status(int status=0)
set decay status
int barcode() const
particle barcode
double generatedMass() const
generatedMass() is included for backwards compatibility with CLHEP HepMC
GenParticle & operator=(const GenParticle &inparticle)
void set_flow(const Flow &f)
set particle flow
GenVertex * production_vertex() const
pointer to the production vertex
GenVertex contains information about decay vertices.
bool has_decayed() const
Convenience method. Returns true if status==2.
bool suggest_barcode(int the_bar_code)
In general there is no reason to "suggest_barcode".
The GenEvent class is the core of HepMC.
bool is_undecayed() const
Convenience method. Returns true if status==1.
Flow set_icode(int code_index, int code)
set flow code
GenParticleEndRange acts like a collection of particles.
int status() const
HEPEVT decay status.
double generated_mass() const
mass as generated
void set_barcode_(int the_bar_code)
for use by GenEvent only
GenParticleProductionRange particles_in(IteratorRange range=relatives)
incoming particle range
void set_production_vertex_(GenVertex *productionvertex=0)
set production vertex - for internal use only
The Polarization class stores theta and phi for a GenParticle.
void swap(GenParticle &other)
swap
void set_momentum(const FourVector &vec4)
set standard 4 momentum
const Flow & flow() const
particle flow
const Polarization & polarization() const
polarization information
GenParticleProductionRange acts like a collection of particles.
GenParticleEndRange particles_out(IteratorRange range=relatives)
outgoing particle range
void print(std::ostream &ostr=std::cout) const
dump this particle's full info to ostr
const FourVector & momentum() const
standard 4 momentum
friend std::ostream & operator<<(std::ostream &, const GenParticle &)
print particle
FourVector is a simple representation of a physics 4 vector.
bool operator!=(const GenParticle &) const
check for inequality
GenVertex * end_vertex() const
pointer to the decay vertex
IteratorRange
type of iteration
void setGeneratedMass(const double &m)
setGeneratedMass() is included for backwards compatibility with CLHEP HepMC
void convert_momentum(const double &)
void set_pdg_id(int id)
set particle ID
void set_polarization(const Polarization &pol=Polarization(0, 0))
set polarization
void set_end_vertex_(GenVertex *decayvertex=0)
set decay vertex - for internal use only
int icode(int code_index=1) const
flow code
The GenParticle class contains information about generated particles.