// ----------------------------------------------------------------------------
// $Id: LCDMcPart.cxx,v 1.1 2001/05/10 17:25:04 toshi Exp $
// ----------------------------------------------------------------------------
//
// $Log: LCDMcPart.cxx,v $
// Revision 1.1 2001/05/10 17:25:04 toshi
// Rename *.C to *.cxx.
//
// Revision 1.2 2001/04/28 23:44:05 toshi
// Start to use CVS.
//
//
///////////////////////////////////////////////////////////////////////////
// //
// LCDMcPart //
// //
// The class McPart is the class containing the Monte Carlo particle //
// information such as the particle ID, a pointer to the parent McPart //
// object if it exists,the charge and the position and momentum initially//
// and at the calorimeter. All particles recorded in the detector get an //
// McPart object assigned to them. //
// //
///////////////////////////////////////////////////////////////////////////
#include "LCDMcPart.h"
ClassImp(LCDMcPart)
///________________________________________________________________________
LCDMcPart::LCDMcPart(): m_partID(0), m_status(0), m_parent(-1){
// Default constructor
m_position = TVector3(0.,0.,0.);
m_term_pos = TVector3(0.,0.,0.);
m_4momentum = TLorentzVector(0.,0.,0.,0.);
}
///________________________________________________________________________
///________________________________________________________________________
LCDMcPart::LCDMcPart(Int_t ID) {
// Create an McPart object with STDHEP particle ID
m_partID = ID;
m_status=0;
m_parent=-1;
m_position = TVector3(0.,0.,0.);
m_term_pos = TVector3(0.,0.,0.);
m_4momentum = TLorentzVector(0.,0.,0.,0.);
}
///________________________________________________________________________
///________________________________________________________________________
LCDMcPart::LCDMcPart(LCDMcPart* part){
// Copy constructor, still has to be finished
m_partID = part->GetParticleID();
m_status = part->GetStatus();
m_charge = part->GetCharge();
m_parent = part->GetParentIdx();
m_position = part->GetPosition();
m_term_pos = part->GetTermPosition();
m_4momentum = part->Get4Momentum();
}
///________________________________________________________________________
///________________________________________________________________________
void LCDMcPart::SetUpParticle(Int_t id,
Double_t charge,
Int_t status,
Int_t parentidx,
const TLorentzVector& mom,
const TVector3& term_pos) {
// Set all the attributes of the particle
SetParticleID(id) ;
SetCharge(charge) ;
SetStatus(status) ;
SetParentIdx(parentidx) ;
Set4Momentum(mom) ;
SetTermPosition(term_pos);
}
///________________________________________________________________________
///________________________________________________________________________
void LCDMcPart::SetUpParticle(Int_t id,
Float_t charge,
Int_t status,
Int_t parentidx,
const TLorentzVector& mom,
const TVector3& term_pos) {
// Set all the attributes of the particle
SetParticleID(id) ;
SetCharge(charge) ;
SetStatus(status) ;
SetParentIdx(parentidx) ;
Set4Momentum(mom) ;
SetTermPosition(term_pos);
}
///________________________________________________________________________
ROOT page - Class index - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.