// ----------------------------------------------------------------------------
// $Id: LCDCalHit.cxx,v 1.4 2001/06/21 03:25:55 toshi Exp $
// ----------------------------------------------------------------------------
//
// $Log: LCDCalHit.cxx,v $
// Revision 1.4  2001/06/21 03:25:55  toshi
// Remove GetEscale(), GetThetaSeg(), GetPhiSeg(), GetEtot(), GetTheta(),
// GetPhi(), GetR(), and GetRcyl() to suite windows...
//
// Revision 1.3  2001/06/20 22:32:17  toshi
// Force to set m_iMCE[] and m_eMCE[] to be zero when a LCDCalHit is initialized.
//
// Revision 1.2  2001/06/20 03:35:47  toshi
// Changes to prevent windows compilar error.
//
// Revision 1.1  2001/05/10 17:14:36  toshi
// Rename LCDCalHit.C to LCDCalHit.cxx.
//
// Revision 1.2  2001/04/28 23:39:02  toshi
// Start to use CVS.
//
//

///////////////////////////////////////////////////////////////////////////
//                                                                       
// LCDCalHit                                                                
// The LCDCalHit 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.                                           
//                                                                       
///////////////////////////////////////////////////////////////////////////

#include "LCDCalHit.h"

ClassImp(LCDCalHit)

//_________________________________________________________________________
 void LCDCalHit::Init() {
  for (Int_t i=0; i < 50 ; i++) {
    m_iMCE[i]=0;
    m_eMCE[i]=0;
  }
}
//_________________________________________________________________________

//_________________________________________________________________________
 void LCDCalHit::AddHit(Int_t mcindex, Double_t edep){
  // Add a hit to the list
  //  AddE(EDep->GetEDeposit());
  if (m_nMCE > 49) {
    fprintf(stderr,"LCDCalHit::AddHit m_nMCE exceeds 49! m_nMCE=%dn",m_nMCE);
  } else {
    m_Etot += edep;
    m_iMCE[m_nMCE]=mcindex;
    m_eMCE[m_nMCE]=edep;
    m_nMCE++;
  }
}
//_________________________________________________________________________

//_________________________________________________________________________
 Double_t LCDCalHit::GetEtotMCE(){
  // Function to increment the total energy in the tower 
  // and return the new total
  Double_t e=0;
  for (Int_t imc=0 ; imc < m_nMCE ; imc++) {
    e+=m_eMCE[imc];
  }
  return e;
}
//_________________________________________________________________________



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.