///////////////////////////////////////////////////////////////////////////
//
// 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 "McPart.h"
#include "TMath.h"
     
ClassImp(McPart)
///________________________________________________________________________
 McPart::McPart() {
  // Default constructor 
  m_type=0; 
  m_parnt = 0;
  for(int i =0; i < 4; i++){
  m_InitMom = 0;
  m_TermPos = 0;
  }
}

///________________________________________________________________________
 McPart::~McPart() {
  // Default destructor 
    delete m_InitMom;
    delete m_TermPos;
}
///_______________________________________________________________________
 McPart::McPart(Int_t ID) {
  // Create an McPart object with article ID 
  m_type = ID;
}

///________________________________________________________________________
 McPart::McPart(McPart* part){
  // Copy constructor, still has to be finished
  m_type = part->GetType();
  m_status = part->GetStatus();
  m_parnt = part->GetParnt();
  m_charge = part->GetCharge();
}

///________________________________________________________________________
 void McPart::SetUpParticle(Int_t type,Float_t charge,Int_t status,
			   McPart* parntptr, TLorentzVector* tmom,
			   TLorentzVector* tpos) {
  // Set all the attributes of the particle
  m_parnt = parntptr;
  m_charge = charge;
  m_status=status;
  m_type=type;
  SetMomentum(tmom);
  SetPosition(tpos);
}
///________________________________________________________________________
 void McPart::SetMomentum(TLorentzVector *momentum){
  // Store the initial momentum of the particle
    m_InitMom = momentum;
}

///________________________________________________________________________
 void McPart::SetPosition(TLorentzVector *position){
  // Store the initial position of the particle
    m_TermPos = position;
}


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.