CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CaloG4Hit Class Reference

#include <CaloG4Hit.h>

Inheritance diagram for CaloG4Hit:

Public Member Functions

void addEnergyDeposit (double em, double hd)
 
void addEnergyDeposit (const CaloG4Hit &aHit)
 
 CaloG4Hit ()
 
 CaloG4Hit (const CaloG4Hit &right)
 
void Draw () override
 
uint16_t getDepth () const
 
double getEM () const
 
double getEnergyDeposit () const
 
math::XYZPoint getEntry () const
 
math::XYZPoint getEntryLocal () const
 
double getHadr () const
 
CaloHitID getID () const
 
double getIncidentEnergy () const
 
math::XYZPoint getPosition () const
 
double getTimeSlice () const
 
int getTimeSliceID () const
 
int getTrackID () const
 
uint32_t getUnitID () const
 
void operator delete (void *CaloG4Hit)
 
void * operator new (size_t)
 
const CaloG4Hitoperator= (const CaloG4Hit &right)
 
bool operator== (const CaloG4Hit &)
 
void Print () override
 
void setEM (double e)
 
void setEntry (double x, double y, double z)
 
void setEntryLocal (double x, double y, double z)
 
void setHadr (double e)
 
void setID (uint32_t i, double d, int j, uint16_t k=0)
 
void setID (const CaloHitID &id)
 
void setIncidentEnergy (double e)
 
void setPosition (double x, double y, double z)
 
 ~CaloG4Hit () override
 

Private Attributes

double elem
 
math::XYZPoint entry
 
math::XYZPoint entryLocal
 
double hadr
 
CaloHitID hitID
 
math::XYZPoint pos
 
double theIncidentEnergy
 

Detailed Description

Definition at line 33 of file CaloG4Hit.h.

Constructor & Destructor Documentation

CaloG4Hit::CaloG4Hit ( )

Definition at line 12 of file CaloG4Hit.cc.

References elem, hadr, setEntry(), setEntryLocal(), and theIncidentEnergy.

Referenced by operator==().

12  {
13 
14  setEntry(0.,0.,0.);
15  setEntryLocal(0.,0.,0.);
16  elem = 0.;
17  hadr = 0.;
18  theIncidentEnergy = 0.;
19 }
void setEntryLocal(double x, double y, double z)
Definition: CaloG4Hit.h:54
double hadr
Definition: CaloG4Hit.h:89
double theIncidentEnergy
Definition: CaloG4Hit.h:90
void setEntry(double x, double y, double z)
Definition: CaloG4Hit.h:51
double elem
Definition: CaloG4Hit.h:88
CaloG4Hit::~CaloG4Hit ( )
override

Definition at line 21 of file CaloG4Hit.cc.

21 {}
CaloG4Hit::CaloG4Hit ( const CaloG4Hit right)

Definition at line 23 of file CaloG4Hit.cc.

References elem, entry, entryLocal, hadr, hitID, pos, and theIncidentEnergy.

23  {
24 
25  entry = right.entry;
26  entryLocal = right.entryLocal;
27  pos = right.pos;
28  elem = right.elem;
29  hadr = right.hadr;
31  hitID = right.hitID;
32 }
CaloHitID hitID
Definition: CaloG4Hit.h:91
math::XYZPoint entry
Definition: CaloG4Hit.h:85
double hadr
Definition: CaloG4Hit.h:89
math::XYZPoint entryLocal
Definition: CaloG4Hit.h:86
double theIncidentEnergy
Definition: CaloG4Hit.h:90
math::XYZPoint pos
Definition: CaloG4Hit.h:87
double elem
Definition: CaloG4Hit.h:88

Member Function Documentation

void CaloG4Hit::addEnergyDeposit ( double  em,
double  hd 
)

Definition at line 47 of file CaloG4Hit.cc.

References elem, and hadr.

Referenced by addEnergyDeposit(), setID(), and CaloSD::updateHit().

47  {
48 
49  elem += em ;
50  hadr += hd;
51 }
double hadr
Definition: CaloG4Hit.h:89
double elem
Definition: CaloG4Hit.h:88
void CaloG4Hit::addEnergyDeposit ( const CaloG4Hit aHit)

Definition at line 53 of file CaloG4Hit.cc.

References addEnergyDeposit(), getEM(), and getHadr().

53  {
54 
55  addEnergyDeposit(aHit.getEM(),aHit.getHadr());
56 }
void addEnergyDeposit(double em, double hd)
Definition: CaloG4Hit.cc:47
double getEM() const
Definition: CaloG4Hit.h:59
double getHadr() const
Definition: CaloG4Hit.h:62
void CaloG4Hit::Draw ( )
inlineoverride

Definition at line 45 of file CaloG4Hit.h.

References Print().

45 {}
uint16_t CaloG4Hit::getDepth ( void  ) const
inline

Definition at line 72 of file CaloG4Hit.h.

References CaloHitID::depth(), and hitID.

Referenced by SimG4HcalValidation::fill(), CaloSD::filterHit(), CaloG4HitLess::operator()(), CaloG4HitEqual::operator()(), and CaloSD::saveHit().

72 {return hitID.depth();}
uint16_t depth() const
Definition: CaloHitID.h:26
CaloHitID hitID
Definition: CaloG4Hit.h:91
double CaloG4Hit::getEM ( ) const
inline
double CaloG4Hit::getEnergyDeposit ( ) const
inline
math::XYZPoint CaloG4Hit::getEntry ( ) const
inline

Definition at line 50 of file CaloG4Hit.h.

References entry.

Referenced by HcalTB04Analysis::fillBuffer(), CastorShowerLibraryMaker::FillShowerEvent(), operator<<(), and EcalSimHitsValidProducer::update().

50 {return entry;}
math::XYZPoint entry
Definition: CaloG4Hit.h:85
math::XYZPoint CaloG4Hit::getEntryLocal ( ) const
inline

Definition at line 53 of file CaloG4Hit.h.

References entryLocal.

Referenced by ZdcSD::getFromLibrary(), and operator<<().

53 {return entryLocal;}
math::XYZPoint entryLocal
Definition: CaloG4Hit.h:86
double CaloG4Hit::getHadr ( ) const
inline
CaloHitID CaloG4Hit::getID ( ) const
inline

Definition at line 74 of file CaloG4Hit.h.

References hitID.

Referenced by operator<<().

74 {return hitID;}
CaloHitID hitID
Definition: CaloG4Hit.h:91
double CaloG4Hit::getIncidentEnergy ( ) const
inline
math::XYZPoint CaloG4Hit::getPosition ( ) const
inline
double CaloG4Hit::getTimeSlice ( ) const
inline
int CaloG4Hit::getTimeSliceID ( ) const
inline

Definition at line 71 of file CaloG4Hit.h.

References hitID, and CaloHitID::timeSliceID().

Referenced by CaloG4HitLess::operator()(), CaloG4HitEqual::operator()(), HcalTB02Analysis::update(), and ZdcTestAnalysis::update().

71 {return hitID.timeSliceID();}
CaloHitID hitID
Definition: CaloG4Hit.h:91
int timeSliceID() const
Definition: CaloHitID.h:23
int CaloG4Hit::getTrackID ( ) const
inline
uint32_t CaloG4Hit::getUnitID ( ) const
inline
void CaloG4Hit::operator delete ( void *  CaloG4Hit)
inline

Definition at line 129 of file CaloG4Hit.h.

References fpCaloG4HitAllocator, and operator<<().

129  {
130  fpCaloG4HitAllocator->FreeSingle((CaloG4Hit*) aHit);
131 }
G4ThreadLocal G4Allocator< CaloG4Hit > * fpCaloG4HitAllocator
Definition: CaloG4Hit.cc:10
void * CaloG4Hit::operator new ( size_t  )
inline

Definition at line 123 of file CaloG4Hit.h.

References fpCaloG4HitAllocator.

123  {
125  new G4Allocator<CaloG4Hit>;
126  return (void*)fpCaloG4HitAllocator->MallocSingle();
127 }
G4ThreadLocal G4Allocator< CaloG4Hit > * fpCaloG4HitAllocator
Definition: CaloG4Hit.cc:10
const CaloG4Hit & CaloG4Hit::operator= ( const CaloG4Hit right)

Definition at line 34 of file CaloG4Hit.cc.

References elem, entry, entryLocal, hadr, hitID, pos, and theIncidentEnergy.

34  {
35 
36  entry = right.entry;
37  entryLocal = right.entryLocal;
38  pos = right.pos;
39  elem = right.elem;
40  hadr = right.hadr;
42  hitID = right.hitID;
43 
44  return *this;
45 }
CaloHitID hitID
Definition: CaloG4Hit.h:91
math::XYZPoint entry
Definition: CaloG4Hit.h:85
double hadr
Definition: CaloG4Hit.h:89
math::XYZPoint entryLocal
Definition: CaloG4Hit.h:86
double theIncidentEnergy
Definition: CaloG4Hit.h:90
math::XYZPoint pos
Definition: CaloG4Hit.h:87
double elem
Definition: CaloG4Hit.h:88
bool CaloG4Hit::operator== ( const CaloG4Hit )
inline

Definition at line 41 of file CaloG4Hit.h.

References CaloG4Hit().

41 {return false;}
void CaloG4Hit::Print ( void  )
override

Definition at line 58 of file CaloG4Hit.cc.

References LogDebug.

Referenced by Draw().

58  {
59  LogDebug("CaloSim") << (*this);
60 }
#define LogDebug(id)
void CaloG4Hit::setEM ( double  e)
inline

Definition at line 60 of file CaloG4Hit.h.

References MillePedeFileConverter_cfg::e, and elem.

Referenced by CaloSD::createNewHit().

void CaloG4Hit::setEntry ( double  x,
double  y,
double  z 
)
inline

Definition at line 51 of file CaloG4Hit.h.

References entry.

Referenced by CaloG4Hit(), and CaloSD::createNewHit().

51 {entry.SetCoordinates(x,y,z);}
math::XYZPoint entry
Definition: CaloG4Hit.h:85
void CaloG4Hit::setEntryLocal ( double  x,
double  y,
double  z 
)
inline

Definition at line 54 of file CaloG4Hit.h.

References entryLocal.

Referenced by CaloG4Hit(), and CaloSD::createNewHit().

54 {entryLocal.SetCoordinates(x,y,z);}
math::XYZPoint entryLocal
Definition: CaloG4Hit.h:86
void CaloG4Hit::setHadr ( double  e)
inline

Definition at line 63 of file CaloG4Hit.h.

References MillePedeFileConverter_cfg::e, and hadr.

Referenced by CaloSD::createNewHit().

void CaloG4Hit::setID ( uint32_t  i,
double  d,
int  j,
uint16_t  k = 0 
)
inline

Definition at line 75 of file CaloG4Hit.h.

References hitID, gen::k, and CaloHitID::setID().

Referenced by CaloSD::createNewHit().

75 { hitID.setID(i,d,j,k);}
CaloHitID hitID
Definition: CaloG4Hit.h:91
int k[5][pyjets_maxn]
void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
Definition: CaloHitID.cc:44
void CaloG4Hit::setID ( const CaloHitID id)
inline

Definition at line 76 of file CaloG4Hit.h.

References addEnergyDeposit(), hitID, and triggerObjects_cff::id.

void CaloG4Hit::setIncidentEnergy ( double  e)
inline
void CaloG4Hit::setPosition ( double  x,
double  y,
double  z 
)
inline

Definition at line 57 of file CaloG4Hit.h.

Referenced by CaloSD::createNewHit().

57 {pos.SetCoordinates(x,y,z);}

Member Data Documentation

double CaloG4Hit::elem
private

Definition at line 88 of file CaloG4Hit.h.

Referenced by addEnergyDeposit(), CaloG4Hit(), getEM(), getEnergyDeposit(), operator=(), and setEM().

math::XYZPoint CaloG4Hit::entry
private

Definition at line 85 of file CaloG4Hit.h.

Referenced by CaloG4Hit(), getEntry(), operator=(), and setEntry().

math::XYZPoint CaloG4Hit::entryLocal
private

Definition at line 86 of file CaloG4Hit.h.

Referenced by CaloG4Hit(), getEntryLocal(), operator=(), and setEntryLocal().

double CaloG4Hit::hadr
private

Definition at line 89 of file CaloG4Hit.h.

Referenced by addEnergyDeposit(), CaloG4Hit(), getEnergyDeposit(), getHadr(), operator=(), and setHadr().

CaloHitID CaloG4Hit::hitID
private
math::XYZPoint CaloG4Hit::pos
private
double CaloG4Hit::theIncidentEnergy
private

Definition at line 90 of file CaloG4Hit.h.

Referenced by CaloG4Hit(), getIncidentEnergy(), operator=(), and setIncidentEnergy().