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::PCaloHit ( float  e = 0.,
float  t = 0.,
int  i = 0,
float  emFraction = 1.,
uint16_t  d = 0 
)
inline

Definition at line 12 of file PCaloHit.h.

Referenced by PCaloHit().

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 16 of file PCaloHit.h.

References edmIntegrityCheck::d, mps_fire::i, PCaloHit(), and lumiQTWidget::t.

17  : myEnergy (e),
18  myEMFraction(emFraction), myTime (t), myItra (i), detId(id), myDepth(d) { }
int myItra
Definition: PCaloHit.h:76
float myEMFraction
Definition: PCaloHit.h:74
uint16_t myDepth
Definition: PCaloHit.h:78
float myTime
Definition: PCaloHit.h:75
unsigned int detId
Definition: PCaloHit.h:77
float myEnergy
Definition: PCaloHit.h:73
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.

5  : myTime(t), myItra(i), myDepth(d) {
6  myEnergy = eEM + eHad;
7  myEMFraction = (myEnergy <= 0. ? 1. :eEM/myEnergy);
8 }
int myItra
Definition: PCaloHit.h:76
float myEMFraction
Definition: PCaloHit.h:74
uint16_t myDepth
Definition: PCaloHit.h:78
float myTime
Definition: PCaloHit.h:75
float myEnergy
Definition: PCaloHit.h:73
PCaloHit::PCaloHit ( unsigned int  id,
float  eEM,
float  eHad,
float  t,
int  i = 0,
uint16_t  d = 0 
)

Definition at line 10 of file PCaloHit.cc.

References myEMFraction, and myEnergy.

11  : myTime(t), myItra(i), detId(id), myDepth(d) {
12  myEnergy = eEM + eHad;
13  myEMFraction = (myEnergy <= 0. ? 1. :eEM/myEnergy);
14 }
int myItra
Definition: PCaloHit.h:76
float myEMFraction
Definition: PCaloHit.h:74
uint16_t myDepth
Definition: PCaloHit.h:78
float myTime
Definition: PCaloHit.h:75
unsigned int detId
Definition: PCaloHit.h:77
float myEnergy
Definition: PCaloHit.h:73

Member Function Documentation

uint16_t PCaloHit::depth ( void  ) const
inline

Definition at line 49 of file PCaloHit.h.

References myDepth.

Referenced by EBHitResponse::add(), EBHitResponse::apdSignalAmplitude(), operator<<(), EBHitResponse::run(), and setDepth().

49 { return myDepth; }
uint16_t myDepth
Definition: PCaloHit.h:78
double PCaloHit::energy ( void  ) const
inline
double PCaloHit::energyEM ( ) const
inline

Definition at line 30 of file PCaloHit.h.

References myEMFraction, and myEnergy.

Referenced by operator<<().

30 { return myEMFraction*myEnergy; }
float myEMFraction
Definition: PCaloHit.h:74
float myEnergy
Definition: PCaloHit.h:73
double PCaloHit::energyHad ( ) const
inline

Definition at line 31 of file PCaloHit.h.

References myEMFraction, and myEnergy.

Referenced by operator<<().

31 { return (1.-myEMFraction)*myEnergy; }
float myEMFraction
Definition: PCaloHit.h:74
float myEnergy
Definition: PCaloHit.h:73
EncodedEventId PCaloHit::eventId ( ) const
inline

Definition at line 54 of file PCaloHit.h.

References theEventId.

Referenced by ntupleDataFormat.Event::eventIdStr().

54 {return theEventId;}
EncodedEventId theEventId
Definition: PCaloHit.h:79
int PCaloHit::geantTrackId ( ) const
inline

Definition at line 39 of file PCaloHit.h.

References myItra.

Referenced by JetMatchingTools::getTrackId(), and operator<<().

39 { return myItra; }
int myItra
Definition: PCaloHit.h:76
const char* PCaloHit::getName ( void  ) const
inline

Definition at line 26 of file PCaloHit.h.

References name().

Referenced by plotting.Plot::draw().

26 { return name (); }
static const char * name()
Definition: PCaloHit.h:24
unsigned int PCaloHit::id ( void  ) const
inline
static const char* PCaloHit::name ( void  )
inlinestatic

Definition at line 24 of file PCaloHit.h.

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

24 { return "Hit"; }
bool PCaloHit::operator< ( const PCaloHit d) const
inline

Definition at line 61 of file PCaloHit.h.

References myEnergy.

61 { return myEnergy < d.myEnergy; }
float myEnergy
Definition: PCaloHit.h:73
bool PCaloHit::operator== ( const PCaloHit d) const
inline

Definition at line 64 of file PCaloHit.h.

References detId, and myEnergy.

65  { return (myEnergy == d.myEnergy && detId == d.detId); }
unsigned int detId
Definition: PCaloHit.h:77
float myEnergy
Definition: PCaloHit.h:73
void PCaloHit::setDepth ( uint16_t  depth)
inline

Definition at line 48 of file PCaloHit.h.

References depth(), and myDepth.

48 { myDepth = depth; }
uint16_t depth() const
Definition: PCaloHit.h:49
uint16_t myDepth
Definition: PCaloHit.h:78
void PCaloHit::setEnergy ( double  e)
inline

Definition at line 32 of file PCaloHit.h.

References MillePedeFileConverter_cfg::e, and myEnergy.

void PCaloHit::setEventId ( EncodedEventId  e)
inline

Definition at line 53 of file PCaloHit.h.

References MillePedeFileConverter_cfg::e, and theEventId.

void PCaloHit::setID ( unsigned int  id)
inline

Definition at line 42 of file PCaloHit.h.

References detId, and id().

Referenced by HcalHBHEMuonSimAnalyzer::analyze().

42 { detId = id; }
unsigned int id() const
Definition: PCaloHit.h:43
unsigned int detId
Definition: PCaloHit.h:77
void PCaloHit::setTime ( float  t)
inline

Definition at line 57 of file PCaloHit.h.

References myTime, and lumiQTWidget::t.

57 {myTime=t;}
float myTime
Definition: PCaloHit.h:75
double PCaloHit::time ( ) const
inline

Member Data Documentation

unsigned int PCaloHit::detId
protected

Definition at line 77 of file PCaloHit.h.

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

const int PCaloHit::kEcalDepthIdMask = 0x3
static
const int PCaloHit::kEcalDepthMask = 0x1FFF
static

Definition at line 68 of file PCaloHit.h.

Referenced by EcalTimeMapDigitizer::add(), and ECalSD::getDepth().

const int PCaloHit::kEcalDepthOffset = 3
static

Definition at line 69 of file PCaloHit.h.

Referenced by EcalTimeMapDigitizer::add(), and ECalSD::getDepth().

const int PCaloHit::kEcalDepthRefz = 0X4
static

Definition at line 70 of file PCaloHit.h.

Referenced by ECalSD::getDepth().

uint16_t PCaloHit::myDepth
protected

Definition at line 78 of file PCaloHit.h.

Referenced by depth(), and setDepth().

float PCaloHit::myEMFraction
protected

Definition at line 74 of file PCaloHit.h.

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

float PCaloHit::myEnergy
protected

Definition at line 73 of file PCaloHit.h.

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

int PCaloHit::myItra
protected

Definition at line 76 of file PCaloHit.h.

Referenced by geantTrackId().

float PCaloHit::myTime
protected

Definition at line 75 of file PCaloHit.h.

Referenced by setTime(), and time().

EncodedEventId PCaloHit::theEventId
protected

Definition at line 79 of file PCaloHit.h.

Referenced by eventId(), and setEventId().