CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes
PCaloHit Class Reference

#include <PCaloHit.h>

Public Member Functions

uint16_t depth () const
 
double energy () const
 
double energyEM () const
 
double energyHad () const
 
EncodedEventId eventId () const
 
int geantTrackId () const
 
const char * getName () const
 
unsigned int id () const
 
bool operator< (const PCaloHit &d) const
 
bool operator== (const PCaloHit &d) const
 
 PCaloHit (float e=0., float t=0., int i=0, float emFraction=1., uint16_t d=0)
 
 PCaloHit (unsigned int id, float e=0., float t=0., int i=0, float emFraction=1., uint16_t d=0)
 
 PCaloHit (float eEM, float eHad, float t, int i=0, uint16_t d=0)
 
 PCaloHit (unsigned int id, float eEM, float eHad, float t, int i=0, uint16_t d=0)
 
void setDepth (uint16_t depth)
 
void setEnergy (double e)
 
void setEventId (EncodedEventId e)
 
void setID (unsigned int id)
 
void setTime (float t)
 
double time () const
 

Static Public Member Functions

static const char * name ()
 

Static Public Attributes

static const int kEcalDepthIdMask = 0x3
 
static const int kEcalDepthMask = 0x1FFF
 
static const int kEcalDepthOffset = 3
 
static const int kEcalDepthRefz = 0X4
 

Protected Attributes

unsigned int detId
 
uint16_t myDepth
 
float myEMFraction
 
float myEnergy
 
int myItra
 
float myTime
 
EncodedEventId theEventId
 

Detailed Description

Definition at line 8 of file PCaloHit.h.

Constructor & Destructor Documentation

◆ PCaloHit() [1/4]

PCaloHit::PCaloHit ( float  e = 0.,
float  t = 0.,
int  i = 0,
float  emFraction = 1.,
uint16_t  d = 0 
)
inline

Definition at line 10 of file PCaloHit.h.

11  : myEnergy(e), myEMFraction(emFraction), myTime(t), myItra(i), myDepth(d) {}
int myItra
Definition: PCaloHit.h:69
float myEMFraction
Definition: PCaloHit.h:67
uint16_t myDepth
Definition: PCaloHit.h:71
d
Definition: ztail.py:151
float myTime
Definition: PCaloHit.h:68
float myEnergy
Definition: PCaloHit.h:66

◆ PCaloHit() [2/4]

PCaloHit::PCaloHit ( unsigned int  id,
float  e = 0.,
float  t = 0.,
int  i = 0,
float  emFraction = 1.,
uint16_t  d = 0 
)
inline

Definition at line 13 of file PCaloHit.h.

14  : myEnergy(e), myEMFraction(emFraction), myTime(t), myItra(i), detId(id), myDepth(d) {}
int myItra
Definition: PCaloHit.h:69
float myEMFraction
Definition: PCaloHit.h:67
uint16_t myDepth
Definition: PCaloHit.h:71
d
Definition: ztail.py:151
float myTime
Definition: PCaloHit.h:68
unsigned int detId
Definition: PCaloHit.h:70
float myEnergy
Definition: PCaloHit.h:66

◆ PCaloHit() [3/4]

PCaloHit::PCaloHit ( float  eEM,
float  eHad,
float  t,
int  i = 0,
uint16_t  d = 0 
)

Definition at line 4 of file PCaloHit.cc.

References myEMFraction, and myEnergy.

4  : myTime(t), myItra(i), myDepth(d) {
5  myEnergy = eEM + eHad;
6  myEMFraction = (myEnergy <= 0.f ? 1.f : eEM / myEnergy);
7 }
int myItra
Definition: PCaloHit.h:69
float myEMFraction
Definition: PCaloHit.h:67
uint16_t myDepth
Definition: PCaloHit.h:71
d
Definition: ztail.py:151
float myTime
Definition: PCaloHit.h:68
float myEnergy
Definition: PCaloHit.h:66

◆ PCaloHit() [4/4]

PCaloHit::PCaloHit ( unsigned int  id,
float  eEM,
float  eHad,
float  t,
int  i = 0,
uint16_t  d = 0 
)

Definition at line 9 of file PCaloHit.cc.

References myEMFraction, and myEnergy.

10  : myTime(t), myItra(i), detId(id), myDepth(d) {
11  myEnergy = eEM + eHad;
12  myEMFraction = (myEnergy <= 0.f ? 1.f : eEM / myEnergy);
13 }
int myItra
Definition: PCaloHit.h:69
float myEMFraction
Definition: PCaloHit.h:67
uint16_t myDepth
Definition: PCaloHit.h:71
d
Definition: ztail.py:151
float myTime
Definition: PCaloHit.h:68
unsigned int detId
Definition: PCaloHit.h:70
float myEnergy
Definition: PCaloHit.h:66

Member Function Documentation

◆ depth()

uint16_t PCaloHit::depth ( void  ) const
inline

Definition at line 43 of file PCaloHit.h.

References myDepth.

Referenced by setDepth().

43 { return myDepth; }
uint16_t myDepth
Definition: PCaloHit.h:71

◆ energy()

double PCaloHit::energy ( void  ) const
inline

Definition at line 24 of file PCaloHit.h.

References myEnergy.

Referenced by Jet.Jet::rawEnergy().

24 { return myEnergy; }
float myEnergy
Definition: PCaloHit.h:66

◆ energyEM()

double PCaloHit::energyEM ( ) const
inline

Definition at line 25 of file PCaloHit.h.

References myEMFraction, and myEnergy.

25 { return myEMFraction * myEnergy; }
float myEMFraction
Definition: PCaloHit.h:67
float myEnergy
Definition: PCaloHit.h:66

◆ energyHad()

double PCaloHit::energyHad ( ) const
inline

Definition at line 26 of file PCaloHit.h.

References myEMFraction, and myEnergy.

26 { return (1. - myEMFraction) * myEnergy; }
float myEMFraction
Definition: PCaloHit.h:67
float myEnergy
Definition: PCaloHit.h:66

◆ eventId()

EncodedEventId PCaloHit::eventId ( ) const
inline

Definition at line 48 of file PCaloHit.h.

References theEventId.

Referenced by ntupleDataFormat.Event::eventIdStr().

48 { return theEventId; }
EncodedEventId theEventId
Definition: PCaloHit.h:72

◆ geantTrackId()

int PCaloHit::geantTrackId ( ) const
inline

Definition at line 33 of file PCaloHit.h.

References myItra.

Referenced by JetMatchingTools::getTrackId().

33 { return myItra; }
int myItra
Definition: PCaloHit.h:69

◆ getName()

const char* PCaloHit::getName ( void  ) const
inline

Definition at line 21 of file PCaloHit.h.

References name().

Referenced by plotting.Plot::draw().

21 { return name(); }
static const char * name()
Definition: PCaloHit.h:19

◆ id()

unsigned int PCaloHit::id ( void  ) const
inline

Definition at line 37 of file PCaloHit.h.

References detId.

Referenced by setID().

37 { return detId; }
unsigned int detId
Definition: PCaloHit.h:70

◆ name()

static const char* PCaloHit::name ( void  )
inlinestatic

Definition at line 19 of file PCaloHit.h.

Referenced by config.CFG::__str__(), validation.Sample::digest(), and getName().

19 { return "Hit"; }

◆ operator<()

bool PCaloHit::operator< ( const PCaloHit d) const
inline

Definition at line 55 of file PCaloHit.h.

References ztail::d, and myEnergy.

55 { return myEnergy < d.myEnergy; }
d
Definition: ztail.py:151
float myEnergy
Definition: PCaloHit.h:66

◆ operator==()

bool PCaloHit::operator== ( const PCaloHit d) const
inline

Definition at line 58 of file PCaloHit.h.

References ztail::d, detId, and myEnergy.

58 { return (myEnergy == d.myEnergy && detId == d.detId); }
d
Definition: ztail.py:151
unsigned int detId
Definition: PCaloHit.h:70
float myEnergy
Definition: PCaloHit.h:66

◆ setDepth()

void PCaloHit::setDepth ( uint16_t  depth)
inline

Definition at line 42 of file PCaloHit.h.

References depth(), and myDepth.

42 { myDepth = depth; }
uint16_t myDepth
Definition: PCaloHit.h:71
uint16_t depth() const
Definition: PCaloHit.h:43

◆ setEnergy()

void PCaloHit::setEnergy ( double  e)
inline

Definition at line 27 of file PCaloHit.h.

References MillePedeFileConverter_cfg::e, and myEnergy.

◆ setEventId()

void PCaloHit::setEventId ( EncodedEventId  e)
inline

Definition at line 47 of file PCaloHit.h.

References MillePedeFileConverter_cfg::e, and theEventId.

◆ setID()

void PCaloHit::setID ( unsigned int  id)
inline

Definition at line 36 of file PCaloHit.h.

References detId, and id().

36 { detId = id; }
unsigned int id() const
Definition: PCaloHit.h:37
unsigned int detId
Definition: PCaloHit.h:70

◆ setTime()

void PCaloHit::setTime ( float  t)
inline

Definition at line 51 of file PCaloHit.h.

References myTime, and submitPVValidationJobs::t.

◆ time()

double PCaloHit::time ( ) const
inline

Definition at line 30 of file PCaloHit.h.

References myTime.

30 { return myTime; }
float myTime
Definition: PCaloHit.h:68

Member Data Documentation

◆ detId

unsigned int PCaloHit::detId
protected

Definition at line 70 of file PCaloHit.h.

Referenced by id(), operator==(), and setID().

◆ kEcalDepthIdMask

const int PCaloHit::kEcalDepthIdMask = 0x3
static

Definition at line 60 of file PCaloHit.h.

Referenced by CaloSimHitStudy::analyzeHits().

◆ kEcalDepthMask

const int PCaloHit::kEcalDepthMask = 0x1FFF
static

Definition at line 61 of file PCaloHit.h.

Referenced by ECalSD::getDepth(), and CaloSteppingAction::getDepth().

◆ kEcalDepthOffset

const int PCaloHit::kEcalDepthOffset = 3
static

Definition at line 62 of file PCaloHit.h.

Referenced by ECalSD::getDepth(), and CaloSteppingAction::getDepth().

◆ kEcalDepthRefz

const int PCaloHit::kEcalDepthRefz = 0X4
static

Definition at line 63 of file PCaloHit.h.

Referenced by ECalSD::getDepth(), and CaloSteppingAction::getDepth().

◆ myDepth

uint16_t PCaloHit::myDepth
protected

Definition at line 71 of file PCaloHit.h.

Referenced by depth(), and setDepth().

◆ myEMFraction

float PCaloHit::myEMFraction
protected

Definition at line 67 of file PCaloHit.h.

Referenced by energyEM(), energyHad(), and PCaloHit().

◆ myEnergy

float PCaloHit::myEnergy
protected

Definition at line 66 of file PCaloHit.h.

Referenced by energy(), energyEM(), energyHad(), operator<(), operator==(), PCaloHit(), and setEnergy().

◆ myItra

int PCaloHit::myItra
protected

Definition at line 69 of file PCaloHit.h.

Referenced by geantTrackId().

◆ myTime

float PCaloHit::myTime
protected

Definition at line 68 of file PCaloHit.h.

Referenced by setTime(), and time().

◆ theEventId

EncodedEventId PCaloHit::theEventId
protected

Definition at line 72 of file PCaloHit.h.

Referenced by eventId(), and setEventId().