CMS 3D CMS Logo

MCBaseParticle Class Reference

#include <RecoBTag/MCTools/interface/MCBaseParticle.h>

Inheritance diagram for MCBaseParticle:

MCParton

List of all members.

Public Member Functions

virtual const
math::XYZTLorentzVector
fourVector () const
virtual void fourVector (const HepMC::FourVector &fv)
 fill kinematical info
 MCBaseParticle (const HepMC::GenParticle *, const HepMC::GenEvent *)
 MCBaseParticle ()
virtual const HepMC::GenParticle * particle () const
virtual const MCParticleInfoparticleInfo () const
virtual void print () const
 prints base info
virtual void setPDGid (int info)
 fill particle info - this also decodes all particle related information and sets the corresponding variables
virtual ~MCBaseParticle ()
 default destructor

Protected Attributes

math::XYZTLorentzVector fourVector_
const HepMC::GenEvent * hepEvent
const HepMC::GenParticle * hepParticle
MCParticleInfo particleInfo_


Detailed Description

Definition at line 14 of file MCBaseParticle.h.


Constructor & Destructor Documentation

MCBaseParticle::MCBaseParticle (  )  [inline]

Definition at line 17 of file MCBaseParticle.h.

00017 {}

MCBaseParticle::MCBaseParticle ( const HepMC::GenParticle *  particle,
const HepMC::GenEvent *  event 
)

Definition at line 8 of file MCBaseParticle.cc.

References fourVector_, hepEvent, and hepParticle.

00008                                                                                             :
00009   particleInfo_( particle->pdg_id() )
00010  {
00011   hepParticle = particle;
00012   hepEvent    = event;
00013   fourVector_ = math::XYZTLorentzVector( particle->momentum() );
00014 }

MCBaseParticle::~MCBaseParticle (  )  [virtual]

default destructor

Definition at line 16 of file MCBaseParticle.cc.

00016                                 {
00017   //this->print();
00018 }


Member Function Documentation

virtual const math::XYZTLorentzVector& MCBaseParticle::fourVector (  )  const [inline, virtual]

Definition at line 46 of file MCBaseParticle.h.

References fourVector_.

Referenced by MCParton::print().

00046 { return fourVector_; }

virtual void MCBaseParticle::fourVector ( const HepMC::FourVector &  fv  )  [inline, virtual]

fill kinematical info

Definition at line 35 of file MCBaseParticle.h.

References fourVector_.

00035                                                         {
00036     fourVector_ = fv;
00037   }

virtual const HepMC::GenParticle* MCBaseParticle::particle (  )  const [inline, virtual]

Definition at line 47 of file MCBaseParticle.h.

References hepParticle.

00047 { return hepParticle; }

virtual const MCParticleInfo& MCBaseParticle::particleInfo (  )  const [inline, virtual]

Definition at line 45 of file MCBaseParticle.h.

References particleInfo_.

Referenced by MCParton::print(), and MCParton::setParticleProperties().

00045 { return particleInfo_; }

void MCBaseParticle::print ( void   )  const [virtual]

prints base info

Reimplemented in MCParton.

Definition at line 21 of file MCBaseParticle.cc.

References GenMuonPlsPt100GeV_cfg::cout, and lat::endl().

00021                                  {
00022   cout << "--> MCBaseParticle:" << endl;
00023 //   cout << "--> LundCode                :" << particleInfo.LundCode() << endl;
00024 //   cout << "--> mass                    :" << mass                  << endl;
00025 //   cout << "--> eta                     :" << eta                   << endl;
00026 //   cout << "--> phi                     :" << phi                   << endl;
00027 //   cout << "--> pabs                    :" << pabs                  << endl;
00028 //   cout << "--> e                       :" << e                     << endl;
00029 //   cout << "--> px                      :" << FourVector.px()       << endl;
00030 //   cout << "--> py                      :" << FourVector.py()       << endl;
00031 //   cout << "--> pz                      :" << FourVector.pz()       << endl;
00032 }

virtual void MCBaseParticle::setPDGid ( int  info  )  [inline, virtual]

fill particle info - this also decodes all particle related information and sets the corresponding variables

Definition at line 28 of file MCBaseParticle.h.

References particleInfo_, and MCParticleInfo::setCode().

00028                                     { 
00029     particleInfo_.setCode( info ); 
00030   }


Member Data Documentation

math::XYZTLorentzVector MCBaseParticle::fourVector_ [protected]

Definition at line 53 of file MCBaseParticle.h.

Referenced by fourVector(), and MCBaseParticle().

const HepMC::GenEvent* MCBaseParticle::hepEvent [protected]

Definition at line 50 of file MCBaseParticle.h.

Referenced by MCBaseParticle(), and MCParton::setParticleProperties().

const HepMC::GenParticle* MCBaseParticle::hepParticle [protected]

Definition at line 51 of file MCBaseParticle.h.

Referenced by MCBaseParticle(), particle(), and MCParton::setParticleProperties().

MCParticleInfo MCBaseParticle::particleInfo_ [protected]

Definition at line 52 of file MCBaseParticle.h.

Referenced by particleInfo(), and setPDGid().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:28:04 2009 for CMSSW by  doxygen 1.5.4