#include "CalHit.h"


///////////////////////////////////////////////////////////////////////////
//                                                                       
// CalHit                                                                
// The CalHit class contains the information about a single calorimeter  
// tower. This includes the towerID tag, the total energy in the tower,  
// and the list of particles which deposited energy in the tower and how 
// much energy they deposited.                                           
//                                                                       
///////////////////////////////////////////////////////////////////////////

ClassImp(CalHit)
///________________________________________________________________________
 CalHit::CalHit(){
  // Default constructor
  m_Etot = 0;
  m_tower = 0;
}
///________________________________________________________________________
 CalHit::CalHit(towerID* tower){
  // Create a CalHit object with towerID of tower
  m_Etot = 0;
  m_tower = tower;
}
//_________________________________________________________________________
 CalHit::~CalHit(){
  // Destructor, calls Clean to remove TObjArrays.
  Clean();
}
//_________________________________________________________________________
 void CalHit::Clean(){
  // Make sure there are no memory leaks
  m_MCE.Delete();
  delete m_tower;
}
//_________________________________________________________________________
 Float_t CalHit::AddE(Float_t hit){
  // Function to increment the total energy in the tower 
  // and return the new total
  m_Etot += hit;
  return m_Etot;
}
//_________________________________________________________________________
 void CalHit::AddHit(EDeposit* EDep){
  // Add a hit to the list
  //  AddE(EDep->GetEDeposit());
  m_Etot += EDep->GetEDeposit();
  m_MCE.Add(EDep);
}


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.