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 (const CaloG4Hit &aHit)
 
void addEnergyDeposit (double em, double hd)
 
 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 (const CaloHitID &id)
 
void setID (uint32_t i, double d, int j, uint16_t k=0)
 
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 32 of file CaloG4Hit.h.

Constructor & Destructor Documentation

◆ CaloG4Hit() [1/2]

CaloG4Hit::CaloG4Hit ( )

Definition at line 13 of file CaloG4Hit.cc.

13  {
14  setEntry(0., 0., 0.);
15  setEntryLocal(0., 0., 0.);
16  elem = 0.;
17  hadr = 0.;
18  theIncidentEnergy = 0.;
19 }

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

◆ ~CaloG4Hit()

CaloG4Hit::~CaloG4Hit ( )
override

Definition at line 21 of file CaloG4Hit.cc.

21 {}

◆ CaloG4Hit() [2/2]

CaloG4Hit::CaloG4Hit ( const CaloG4Hit right)

Definition at line 23 of file CaloG4Hit.cc.

23  {
24  entry = right.entry;
25  entryLocal = right.entryLocal;
26  pos = right.pos;
27  elem = right.elem;
28  hadr = right.hadr;
30  hitID = right.hitID;
31 }

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

Member Function Documentation

◆ addEnergyDeposit() [1/2]

void CaloG4Hit::addEnergyDeposit ( const CaloG4Hit aHit)

Definition at line 50 of file CaloG4Hit.cc.

50 { addEnergyDeposit(aHit.getEM(), aHit.getHadr()); }

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

◆ addEnergyDeposit() [2/2]

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

Definition at line 45 of file CaloG4Hit.cc.

45  {
46  elem += em;
47  hadr += hd;
48 }

References elem, and hadr.

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

◆ Draw()

void CaloG4Hit::Draw ( )
inlineoverride

Definition at line 42 of file CaloG4Hit.h.

42 {}

◆ getDepth()

uint16_t CaloG4Hit::getDepth ( void  ) const
inline

Definition at line 68 of file CaloG4Hit.h.

68 { return hitID.depth(); }

References CaloHitID::depth(), and hitID.

Referenced by SimG4HcalValidation::fill(), and CaloSD::saveHit().

◆ getEM()

double CaloG4Hit::getEM ( ) const
inline

Definition at line 55 of file CaloG4Hit.h.

55 { return elem; }

References elem.

Referenced by addEnergyDeposit(), ZdcSD::getFromLibrary(), CaloSD::saveHit(), HcalTB02Analysis::update(), and ZdcTestAnalysis::update().

◆ getEnergyDeposit()

double CaloG4Hit::getEnergyDeposit ( ) const
inline

◆ getEntry()

math::XYZPoint CaloG4Hit::getEntry ( ) const
inline

◆ getEntryLocal()

math::XYZPoint CaloG4Hit::getEntryLocal ( ) const
inline

Definition at line 49 of file CaloG4Hit.h.

49 { return entryLocal; }

References entryLocal.

Referenced by ZdcSD::getFromLibrary().

◆ getHadr()

double CaloG4Hit::getHadr ( ) const
inline

Definition at line 58 of file CaloG4Hit.h.

58 { return hadr; }

References hadr.

Referenced by addEnergyDeposit(), ZdcSD::getFromLibrary(), CaloSD::saveHit(), HcalTB02Analysis::update(), and ZdcTestAnalysis::update().

◆ getID()

CaloHitID CaloG4Hit::getID ( ) const
inline

Definition at line 70 of file CaloG4Hit.h.

70 { return hitID; }

References hitID.

◆ getIncidentEnergy()

double CaloG4Hit::getIncidentEnergy ( ) const
inline

◆ getPosition()

math::XYZPoint CaloG4Hit::getPosition ( ) const
inline

◆ getTimeSlice()

double CaloG4Hit::getTimeSlice ( ) const
inline

◆ getTimeSliceID()

int CaloG4Hit::getTimeSliceID ( ) const
inline

Definition at line 67 of file CaloG4Hit.h.

67 { return hitID.timeSliceID(); }

References hitID, and CaloHitID::timeSliceID().

Referenced by HcalTB02Analysis::update(), and ZdcTestAnalysis::update().

◆ getTrackID()

int CaloG4Hit::getTrackID ( ) const
inline

◆ getUnitID()

uint32_t CaloG4Hit::getUnitID ( ) const
inline

◆ operator delete()

void CaloG4Hit::operator delete ( void *  CaloG4Hit)
inline

Definition at line 122 of file CaloG4Hit.h.

122 { fpCaloG4HitAllocator->FreeSingle((CaloG4Hit*)aHit); }

References fpCaloG4HitAllocator.

◆ operator new()

void * CaloG4Hit::operator new ( size_t  )
inline

Definition at line 116 of file CaloG4Hit.h.

116  {
118  fpCaloG4HitAllocator = new G4Allocator<CaloG4Hit>;
119  return (void*)fpCaloG4HitAllocator->MallocSingle();
120 }

References fpCaloG4HitAllocator.

◆ operator=()

const CaloG4Hit & CaloG4Hit::operator= ( const CaloG4Hit right)

Definition at line 33 of file CaloG4Hit.cc.

33  {
34  entry = right.entry;
35  entryLocal = right.entryLocal;
36  pos = right.pos;
37  elem = right.elem;
38  hadr = right.hadr;
40  hitID = right.hitID;
41 
42  return *this;
43 }

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

◆ operator==()

bool CaloG4Hit::operator== ( const CaloG4Hit )
inline

Definition at line 38 of file CaloG4Hit.h.

38 { return false; }

◆ Print()

void CaloG4Hit::Print ( void  )
override

Definition at line 52 of file CaloG4Hit.cc.

52 { edm::LogVerbatim("CaloSim") << (*this); }

◆ setEM()

void CaloG4Hit::setEM ( double  e)
inline

Definition at line 56 of file CaloG4Hit.h.

56 { elem = e; }

References MillePedeFileConverter_cfg::e, and elem.

Referenced by CaloSD::createNewHit().

◆ setEntry()

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

Definition at line 47 of file CaloG4Hit.h.

47 { entry.SetCoordinates(x, y, z); }

References entry, x, y, and z.

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

◆ setEntryLocal()

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

Definition at line 50 of file CaloG4Hit.h.

50 { entryLocal.SetCoordinates(x, y, z); }

References entryLocal, x, y, and z.

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

◆ setHadr()

void CaloG4Hit::setHadr ( double  e)
inline

Definition at line 59 of file CaloG4Hit.h.

59 { hadr = e; }

References MillePedeFileConverter_cfg::e, and hadr.

Referenced by CaloSD::createNewHit().

◆ setID() [1/2]

void CaloG4Hit::setID ( const CaloHitID id)
inline

Definition at line 72 of file CaloG4Hit.h.

72 { hitID = id; }

References hitID, and triggerObjects_cff::id.

◆ setID() [2/2]

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

Definition at line 71 of file CaloG4Hit.h.

71 { hitID.setID(i, d, j, k); }

References ztail::d, hitID, mps_fire::i, dqmiolumiharvest::j, dqmdumpme::k, and CaloHitID::setID().

Referenced by CaloSD::createNewHit().

◆ setIncidentEnergy()

void CaloG4Hit::setIncidentEnergy ( double  e)
inline

Definition at line 62 of file CaloG4Hit.h.

62 { theIncidentEnergy = e; }

References MillePedeFileConverter_cfg::e, and theIncidentEnergy.

Referenced by CaloSD::createNewHit().

◆ setPosition()

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

Definition at line 53 of file CaloG4Hit.h.

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

References x, y, and z.

Referenced by CaloSD::createNewHit().

Member Data Documentation

◆ elem

double CaloG4Hit::elem
private

Definition at line 83 of file CaloG4Hit.h.

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

◆ entry

math::XYZPoint CaloG4Hit::entry
private

Definition at line 80 of file CaloG4Hit.h.

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

◆ entryLocal

math::XYZPoint CaloG4Hit::entryLocal
private

Definition at line 81 of file CaloG4Hit.h.

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

◆ hadr

double CaloG4Hit::hadr
private

Definition at line 84 of file CaloG4Hit.h.

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

◆ hitID

CaloHitID CaloG4Hit::hitID
private

◆ pos

math::XYZPoint CaloG4Hit::pos
private

Definition at line 82 of file CaloG4Hit.h.

Referenced by CaloG4Hit(), getPosition(), and operator=().

◆ theIncidentEnergy

double CaloG4Hit::theIncidentEnergy
private

Definition at line 85 of file CaloG4Hit.h.

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

DDAxes::y
mps_fire.i
i
Definition: mps_fire.py:355
CaloHitID::depth
uint16_t depth() const
Definition: CaloHitID.h:24
pos
Definition: PixelAliasList.h:18
CaloHitID::trackID
int trackID() const
Definition: CaloHitID.h:23
CaloG4Hit::elem
double elem
Definition: CaloG4Hit.h:83
DDAxes::x
CaloG4Hit::pos
math::XYZPoint pos
Definition: CaloG4Hit.h:82
CaloHitID::unitID
uint32_t unitID() const
Definition: CaloHitID.h:20
CaloG4Hit::hadr
double hadr
Definition: CaloG4Hit.h:84
CaloG4Hit::entry
math::XYZPoint entry
Definition: CaloG4Hit.h:80
CaloHitID::setID
void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
Definition: CaloHitID.cc:40
fpCaloG4HitAllocator
G4ThreadLocal G4Allocator< CaloG4Hit > * fpCaloG4HitAllocator
Definition: CaloG4Hit.cc:11
CaloG4Hit::entryLocal
math::XYZPoint entryLocal
Definition: CaloG4Hit.h:81
DDAxes::z
CaloG4Hit::hitID
CaloHitID hitID
Definition: CaloG4Hit.h:86
CaloHitID::timeSlice
double timeSlice() const
Definition: CaloHitID.h:22
dqmdumpme.k
k
Definition: dqmdumpme.py:60
CaloG4Hit::getEM
double getEM() const
Definition: CaloG4Hit.h:55
CaloG4Hit::setEntryLocal
void setEntryLocal(double x, double y, double z)
Definition: CaloG4Hit.h:50
CaloG4Hit::theIncidentEnergy
double theIncidentEnergy
Definition: CaloG4Hit.h:85
CaloG4Hit::setEntry
void setEntry(double x, double y, double z)
Definition: CaloG4Hit.h:47
edm::LogVerbatim
Definition: MessageLogger.h:297
CaloG4Hit
Definition: CaloG4Hit.h:32
CaloHitID::timeSliceID
int timeSliceID() const
Definition: CaloHitID.h:21
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
ztail.d
d
Definition: ztail.py:151
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
CaloG4Hit::getHadr
double getHadr() const
Definition: CaloG4Hit.h:58
CaloG4Hit::addEnergyDeposit
void addEnergyDeposit(double em, double hd)
Definition: CaloG4Hit.cc:45
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37