| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

HepMC::GenParticle Class Reference

HepMC::GenParticle contains momentum, generated mass, particle ID, decay status, flow, polarization, pointers to production and decay vertices and a unique barcode identfier. More...

#include <GenParticle.h>

Collaboration diagram for HepMC::GenParticle:

[legend]
List of all members.

Public Member Functions

 GenParticle (void)
 default constructor
 GenParticle (const FourVector &momentum, int pdg_id, int status=0, const Flow &itsflow=Flow(), const Polarization &polar=Polarization(0, 0))
 constructor requires momentum and particle ID
 GenParticle (const GenParticle &inparticle)
 shallow copy.
virtual ~GenParticle ()
void swap (GenParticle &other)
 swap
GenParticleoperator= (const GenParticle &inparticle)
 shallow.
bool operator== (const GenParticle &) const
 check for equality
bool operator!= (const GenParticle &) const
 check for inequality
void print (std::ostream &ostr=std::cout) const
 dump this particle's full info to ostr
 operator HepMC::FourVector () const
 conversion operator
FourVector momentum () const
 standard 4 momentum
int pdg_id () const
 particle ID
int status () const
 HEPEVT decay status.
Flow flow () const
 particle flow
int flow (int code_index) const
 particle flow index
Polarization polarization () const
 polarization information
GenVertexproduction_vertex () const
 pointer to the production vertex
GenVertexend_vertex () const
 pointer to the decay vertex
GenEventparent_event () const
 pointer to the event that owns this particle
double generated_mass () const
 Because of precision issues, the generated mass is not always the same as the mass calculated from the momentum 4 vector. mass as generated.
double generatedMass () const
 generatedMass() is included for backwards compatibility with CLHEP HepMC
int barcode () const
 The barcode is the particle's reference number, every vertex in the event has a unique barcode. particle barcode.
bool suggest_barcode (int the_bar_code)
 In general there is no reason to "suggest_barcode".
void set_momentum (const FourVector &vec4)
 set standard 4 momentum
void set_pdg_id (int id)
 set particle ID
void set_status (int status=0)
 set decay status
void set_flow (const Flow &f)
 set particle flow
void set_flow (int code_index, int code=0)
 set particle flow index
void set_polarization (const Polarization &pol=Polarization(0, 0))
 set polarization
void set_generated_mass (const double &m)
 If you do not call set_generated_mass(), then generated_mass() will simply return the mass calculated from momentum() define the actual generated mass.
void setGeneratedMass (const double &m)
 setGeneratedMass() is included for backwards compatibility with CLHEP HepMC

Protected Member Functions

void set_production_vertex_ (GenVertex *productionvertex=0)
 set production vertex
void set_end_vertex_ (GenVertex *decayvertex=0)
 set decay vertex
void set_barcode_ (int the_bar_code)
 for use by GenEvent only

Private Attributes

FourVector m_momentum
int m_pdg_id
int m_status
Flow m_flow
Polarization m_polarization
GenVertexm_production_vertex
GenVertexm_end_vertex
int m_barcode
double m_generated_mass

Friends

class GenVertex
class GenEvent
std::ostream & operator<< (std::ostream &, const GenParticle &)
 print particle

Detailed Description

HepMC::GenParticle contains momentum, generated mass, particle ID, decay status, flow, polarization, pointers to production and decay vertices and a unique barcode identfier.

Definition at line 55 of file GenParticle.h.


Constructor & Destructor Documentation

HepMC::GenParticle::GenParticle ( void   ) 

default constructor

HepMC::GenParticle::GenParticle ( const FourVector momentum,
int  pdg_id,
int  status = 0,
const Flow itsflow = Flow(),
const Polarization polar = Polarization(0, 0) 
)

constructor requires momentum and particle ID

HepMC::GenParticle::GenParticle ( const GenParticle inparticle  ) 

shallow copy.

virtual HepMC::GenParticle::~GenParticle (  )  [virtual]


Member Function Documentation

void HepMC::GenParticle::swap ( GenParticle other  ) 

swap

GenParticle& HepMC::GenParticle::operator= ( const GenParticle inparticle  ) 

shallow.

bool HepMC::GenParticle::operator== ( const GenParticle  )  const

check for equality

bool HepMC::GenParticle::operator!= ( const GenParticle  )  const

check for inequality

void HepMC::GenParticle::print ( std::ostream &  ostr = std::cout  )  const

dump this particle's full info to ostr

HepMC::GenParticle::operator HepMC::FourVector (  )  const [inline]

conversion operator

Definition at line 171 of file GenParticle.h.

00172     { return m_momentum; }

FourVector HepMC::GenParticle::momentum (  )  const [inline]

standard 4 momentum

Definition at line 174 of file GenParticle.h.

00175     { return m_momentum; }

int HepMC::GenParticle::pdg_id (  )  const [inline]

particle ID

Definition at line 177 of file GenParticle.h.

00177 { return m_pdg_id; }

int HepMC::GenParticle::status (  )  const [inline]

HEPEVT decay status.

Definition at line 179 of file GenParticle.h.

00179 { return m_status; }

Flow HepMC::GenParticle::flow (  )  const [inline]

particle flow

Definition at line 186 of file GenParticle.h.

00186 { return m_flow; }

int HepMC::GenParticle::flow ( int  code_index  )  const [inline]

particle flow index

Definition at line 188 of file GenParticle.h.

00189     { return m_flow.icode( code_index ); }

Polarization HepMC::GenParticle::polarization (  )  const [inline]

polarization information

Definition at line 191 of file GenParticle.h.

00192     { return m_polarization; }

GenVertex * HepMC::GenParticle::production_vertex (  )  const [inline]

pointer to the production vertex

Definition at line 181 of file GenParticle.h.

00182     { return m_production_vertex; }

GenVertex * HepMC::GenParticle::end_vertex (  )  const [inline]

pointer to the decay vertex

Definition at line 184 of file GenParticle.h.

00184 { return m_end_vertex; }

GenEvent* HepMC::GenParticle::parent_event (  )  const

pointer to the event that owns this particle

double HepMC::GenParticle::generated_mass (  )  const

Because of precision issues, the generated mass is not always the same as the mass calculated from the momentum 4 vector. mass as generated.

If the generated mass has been set, then generated_mass() returns that value. If the generated mass has not been set, then generated_mass() returns the mass calculated from the momentum 4 vector.

double HepMC::GenParticle::generatedMass (  )  const [inline]

generatedMass() is included for backwards compatibility with CLHEP HepMC

Definition at line 116 of file GenParticle.h.

00116 { return generated_mass(); }

int HepMC::GenParticle::barcode (  )  const [inline]

The barcode is the particle's reference number, every vertex in the event has a unique barcode. particle barcode.

Particle barcodes are positive numbers, vertex barcodes are negative numbers.

Definition at line 215 of file GenParticle.h.

00215 { return m_barcode; }

bool HepMC::GenParticle::suggest_barcode ( int  the_bar_code  ) 

In general there is no reason to "suggest_barcode".

void HepMC::GenParticle::set_momentum ( const FourVector vec4  )  [inline]

set standard 4 momentum

Definition at line 194 of file GenParticle.h.

00195     { m_momentum = vec4; }

void HepMC::GenParticle::set_pdg_id ( int  id  )  [inline]

set particle ID

Definition at line 197 of file GenParticle.h.

00197 { m_pdg_id = id; }

void HepMC::GenParticle::set_status ( int  status = 0  )  [inline]

set decay status

Definition at line 199 of file GenParticle.h.

00199 { m_status = status; }

void HepMC::GenParticle::set_flow ( const Flow f  )  [inline]

set particle flow

Definition at line 201 of file GenParticle.h.

00201 { m_flow = f; }

void HepMC::GenParticle::set_flow ( int  code_index,
int  code = 0 
) [inline]

set particle flow index

Definition at line 203 of file GenParticle.h.

00204     {
00205         if ( code == 0 ) { 
00206             m_flow.set_unique_icode( code_index );
00207         } else { 
00208             m_flow.set_icode( code_index, code );
00209         }
00210     }

void HepMC::GenParticle::set_polarization ( const Polarization pol = Polarization(0, 0)  )  [inline]

set polarization

Definition at line 212 of file GenParticle.h.

00213     { m_polarization = polar; }

void HepMC::GenParticle::set_generated_mass ( const double &  m  ) 

If you do not call set_generated_mass(), then generated_mass() will simply return the mass calculated from momentum() define the actual generated mass.

void HepMC::GenParticle::setGeneratedMass ( const double &  m  )  [inline]

setGeneratedMass() is included for backwards compatibility with CLHEP HepMC

Definition at line 140 of file GenParticle.h.

00141                          { return set_generated_mass(m); }

void HepMC::GenParticle::set_production_vertex_ ( GenVertex productionvertex = 0  )  [protected]

set production vertex

void HepMC::GenParticle::set_end_vertex_ ( GenVertex decayvertex = 0  )  [protected]

set decay vertex

void HepMC::GenParticle::set_barcode_ ( int  the_bar_code  )  [inline, protected]

for use by GenEvent only

Definition at line 217 of file GenParticle.h.

00217 { m_barcode = bc; }


Friends And Related Function Documentation

friend class GenVertex [friend]

Definition at line 57 of file GenParticle.h.

friend class GenEvent [friend]

Definition at line 58 of file GenParticle.h.

std::ostream& operator<< ( std::ostream &  ,
const GenParticle  
) [friend]

print particle


Member Data Documentation

FourVector HepMC::GenParticle::m_momentum [private]

Definition at line 154 of file GenParticle.h.

int HepMC::GenParticle::m_pdg_id [private]

Definition at line 155 of file GenParticle.h.

int HepMC::GenParticle::m_status [private]

Definition at line 156 of file GenParticle.h.

Flow HepMC::GenParticle::m_flow [private]

Definition at line 157 of file GenParticle.h.

Polarization HepMC::GenParticle::m_polarization [private]

Definition at line 158 of file GenParticle.h.

GenVertex* HepMC::GenParticle::m_production_vertex [private]

Definition at line 159 of file GenParticle.h.

GenVertex* HepMC::GenParticle::m_end_vertex [private]

Definition at line 160 of file GenParticle.h.

int HepMC::GenParticle::m_barcode [private]

Definition at line 161 of file GenParticle.h.

double HepMC::GenParticle::m_generated_mass [private]

Definition at line 162 of file GenParticle.h.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 19:56:44 2011 for HepMC by doxygen 1.4.7