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
 
bool isFinecaloTrackID () const
 
void operator delete (void *CaloG4Hit)
 
void * operator new (std::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=default
 

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.

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

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:50
double hadr
Definition: CaloG4Hit.h:86
double theIncidentEnergy
Definition: CaloG4Hit.h:87
void setEntry(double x, double y, double z)
Definition: CaloG4Hit.h:47
double elem
Definition: CaloG4Hit.h:85

◆ ~CaloG4Hit()

CaloG4Hit::~CaloG4Hit ( )
overridedefault

◆ CaloG4Hit() [2/2]

CaloG4Hit::CaloG4Hit ( const CaloG4Hit right)

Definition at line 23 of file CaloG4Hit.cc.

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

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 }
CaloHitID hitID
Definition: CaloG4Hit.h:88
math::XYZPoint entry
Definition: CaloG4Hit.h:82
double hadr
Definition: CaloG4Hit.h:86
math::XYZPoint entryLocal
Definition: CaloG4Hit.h:83
double theIncidentEnergy
Definition: CaloG4Hit.h:87
math::XYZPoint pos
Definition: CaloG4Hit.h:84
double elem
Definition: CaloG4Hit.h:85

Member Function Documentation

◆ addEnergyDeposit() [1/2]

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

Definition at line 45 of file CaloG4Hit.cc.

References elem, and hadr.

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

45  {
46  elem += em;
47  hadr += hd;
48 }
double hadr
Definition: CaloG4Hit.h:86
double elem
Definition: CaloG4Hit.h:85

◆ addEnergyDeposit() [2/2]

void CaloG4Hit::addEnergyDeposit ( const CaloG4Hit aHit)

Definition at line 50 of file CaloG4Hit.cc.

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

50 { addEnergyDeposit(aHit.getEM(), aHit.getHadr()); }
double getEM() const
Definition: CaloG4Hit.h:55
double getHadr() const
Definition: CaloG4Hit.h:58
void addEnergyDeposit(double em, double hd)
Definition: CaloG4Hit.cc:45

◆ 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 69 of file CaloG4Hit.h.

References CaloHitID::depth(), and hitID.

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

69 { return hitID.depth(); }
CaloHitID hitID
Definition: CaloG4Hit.h:88
uint16_t depth() const
Definition: CaloHitID.h:24

◆ getEM()

double CaloG4Hit::getEM ( ) const
inline

Definition at line 55 of file CaloG4Hit.h.

References elem.

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

55 { return elem; }
double elem
Definition: CaloG4Hit.h:85

◆ getEnergyDeposit()

double CaloG4Hit::getEnergyDeposit ( ) const
inline

◆ getEntry()

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

Definition at line 46 of file CaloG4Hit.h.

References entry.

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

46 { return entry; }
math::XYZPoint entry
Definition: CaloG4Hit.h:82

◆ getEntryLocal()

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

Definition at line 49 of file CaloG4Hit.h.

References entryLocal.

Referenced by ZdcSD::getFromLibrary().

49 { return entryLocal; }
math::XYZPoint entryLocal
Definition: CaloG4Hit.h:83

◆ getHadr()

double CaloG4Hit::getHadr ( ) const
inline

Definition at line 58 of file CaloG4Hit.h.

References hadr.

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

58 { return hadr; }
double hadr
Definition: CaloG4Hit.h:86

◆ getID()

CaloHitID CaloG4Hit::getID ( ) const
inline

Definition at line 72 of file CaloG4Hit.h.

References hitID.

72 { return hitID; }
CaloHitID hitID
Definition: CaloG4Hit.h:88

◆ getIncidentEnergy()

double CaloG4Hit::getIncidentEnergy ( ) const
inline

Definition at line 61 of file CaloG4Hit.h.

References theIncidentEnergy.

Referenced by CastorShowerLibraryMaker::FillShowerEvent(), ZdcSD::getFromLibrary(), and HcalTB02Analysis::update().

61 { return theIncidentEnergy; }
double theIncidentEnergy
Definition: CaloG4Hit.h:87

◆ getPosition()

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

◆ getTimeSlice()

double CaloG4Hit::getTimeSlice ( ) const
inline

◆ getTimeSliceID()

int CaloG4Hit::getTimeSliceID ( ) const
inline

Definition at line 68 of file CaloG4Hit.h.

References hitID, and CaloHitID::timeSliceID().

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

68 { return hitID.timeSliceID(); }
int timeSliceID() const
Definition: CaloHitID.h:21
CaloHitID hitID
Definition: CaloG4Hit.h:88

◆ getTrackID()

int CaloG4Hit::getTrackID ( ) const
inline

◆ getUnitID()

uint32_t CaloG4Hit::getUnitID ( ) const
inline

◆ isFinecaloTrackID()

bool CaloG4Hit::isFinecaloTrackID ( ) const
inline

Definition at line 70 of file CaloG4Hit.h.

References hitID, and CaloHitID::isFinecaloTrackID().

Referenced by CaloSD::saveHit().

70 { return hitID.isFinecaloTrackID(); }
bool isFinecaloTrackID() const
Definition: CaloHitID.h:30
CaloHitID hitID
Definition: CaloG4Hit.h:88

◆ operator delete()

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

Definition at line 124 of file CaloG4Hit.h.

References fpCaloG4HitAllocator.

124 { fpCaloG4HitAllocator->FreeSingle((CaloG4Hit*)aHit); }
G4ThreadLocal G4Allocator< CaloG4Hit > * fpCaloG4HitAllocator
Definition: CaloG4Hit.cc:11

◆ operator new()

void * CaloG4Hit::operator new ( std::size_t  )
inline

Definition at line 118 of file CaloG4Hit.h.

References fpCaloG4HitAllocator.

118  {
120  fpCaloG4HitAllocator = new G4Allocator<CaloG4Hit>;
121  return (void*)fpCaloG4HitAllocator->MallocSingle();
122 }
G4ThreadLocal G4Allocator< CaloG4Hit > * fpCaloG4HitAllocator
Definition: CaloG4Hit.cc:11

◆ operator=()

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

Definition at line 33 of file CaloG4Hit.cc.

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

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 }
CaloHitID hitID
Definition: CaloG4Hit.h:88
math::XYZPoint entry
Definition: CaloG4Hit.h:82
double hadr
Definition: CaloG4Hit.h:86
math::XYZPoint entryLocal
Definition: CaloG4Hit.h:83
double theIncidentEnergy
Definition: CaloG4Hit.h:87
math::XYZPoint pos
Definition: CaloG4Hit.h:84
double elem
Definition: CaloG4Hit.h:85

◆ 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); }
Log< level::Info, true > LogVerbatim

◆ setEM()

void CaloG4Hit::setEM ( double  e)
inline

Definition at line 56 of file CaloG4Hit.h.

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.

References entry, x, y, and z.

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

47 { entry.SetCoordinates(x, y, z); }
math::XYZPoint entry
Definition: CaloG4Hit.h:82

◆ setEntryLocal()

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

Definition at line 50 of file CaloG4Hit.h.

References entryLocal, x, y, and z.

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

50 { entryLocal.SetCoordinates(x, y, z); }
math::XYZPoint entryLocal
Definition: CaloG4Hit.h:83

◆ setHadr()

void CaloG4Hit::setHadr ( double  e)
inline

Definition at line 59 of file CaloG4Hit.h.

References MillePedeFileConverter_cfg::e, and hadr.

Referenced by CaloSD::createNewHit().

◆ setID() [1/2]

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

Definition at line 73 of file CaloG4Hit.h.

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

Referenced by CaloSD::createNewHit().

73 { hitID.setID(i, d, j, k); }
CaloHitID hitID
Definition: CaloG4Hit.h:88
d
Definition: ztail.py:151
void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
Definition: CaloHitID.cc:41

◆ setID() [2/2]

void CaloG4Hit::setID ( const CaloHitID id)
inline

Definition at line 74 of file CaloG4Hit.h.

References hitID, and l1ctLayer2EG_cff::id.

74 { hitID = id; }
CaloHitID hitID
Definition: CaloG4Hit.h:88

◆ setIncidentEnergy()

void CaloG4Hit::setIncidentEnergy ( double  e)
inline

◆ setPosition()

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

Definition at line 53 of file CaloG4Hit.h.

References x, y, and z.

Referenced by CaloSD::createNewHit().

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

Member Data Documentation

◆ elem

double CaloG4Hit::elem
private

Definition at line 85 of file CaloG4Hit.h.

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

◆ entry

math::XYZPoint CaloG4Hit::entry
private

Definition at line 82 of file CaloG4Hit.h.

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

◆ entryLocal

math::XYZPoint CaloG4Hit::entryLocal
private

Definition at line 83 of file CaloG4Hit.h.

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

◆ hadr

double CaloG4Hit::hadr
private

Definition at line 86 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 84 of file CaloG4Hit.h.

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

◆ theIncidentEnergy

double CaloG4Hit::theIncidentEnergy
private

Definition at line 87 of file CaloG4Hit.h.

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