CMS 3D CMS Logo

PCaloHit Class Reference

#include <SimDataFormats/CaloHit/interface/PCaloHit.h>

List of all members.

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 (unsigned int id, float eEM, float eHad, float t, int i=0, uint16_t d=0)
 PCaloHit (float eEM, float eHad, float t, int i=0, 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 e=0., float t=0., int i=0, float emFraction=1., uint16_t d=0)
void setEventId (EncodedEventId e)
double time () const

Static Public Member Functions

static const char * name ()

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.

00013                            : myEnergy(e), myEMFraction(emFraction), myTime(t),
00014     myItra(i), myDepth(d) { }

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.

00017                                                   : myEnergy (e), 
00018     myEMFraction(emFraction), myTime (t), myItra (i), detId(id), myDepth(d) { }

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.

00005                                : myTime(t), myItra(i), myDepth(d) { 
00006   myEnergy = eEM + eHad;
00007   myEMFraction = (myEnergy <= 0. ? 1. :eEM/myEnergy);
00008 }

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.

00011                                : myTime(t), myItra(i), detId(id), myDepth(d) {
00012   myEnergy = eEM + eHad;
00013   myEMFraction = (myEnergy <= 0. ? 1. :eEM/myEnergy);
00014 }


Member Function Documentation

uint16_t PCaloHit::depth (  )  const [inline]

Definition at line 45 of file PCaloHit.h.

References myDepth.

Referenced by operator<<().

00045 { return myDepth; } 

double PCaloHit::energy (  )  const [inline]

Definition at line 29 of file PCaloHit.h.

References myEnergy.

Referenced by CaloHitResponse::analogSignalAmplitude(), EcalSelectiveReadoutValidation::analyzeEB(), EcalSelectiveReadoutValidation::analyzeEE(), CastorHitCorrection::charge(), and HcalHitCorrection::charge().

00029 { return myEnergy; }

double PCaloHit::energyEM (  )  const [inline]

Definition at line 30 of file PCaloHit.h.

References myEMFraction, and myEnergy.

Referenced by HcalHitCorrection::correct(), CastorHitCorrection::correct(), and operator<<().

00030 { return myEMFraction*myEnergy; }

double PCaloHit::energyHad (  )  const [inline]

Definition at line 31 of file PCaloHit.h.

References myEMFraction, and myEnergy.

Referenced by HcalHitCorrection::correct(), CastorHitCorrection::correct(), and operator<<().

00031 { return (1.-myEMFraction)*myEnergy; }

EncodedEventId PCaloHit::eventId (  )  const [inline]

Definition at line 51 of file PCaloHit.h.

References theEventId.

00051 {return theEventId;}

int PCaloHit::geantTrackId (  )  const [inline]

Definition at line 37 of file PCaloHit.h.

References myItra.

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

00037 { return myItra; }

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

Definition at line 26 of file PCaloHit.h.

References name().

00026 { return name (); }

unsigned int PCaloHit::id ( void   )  const [inline]

Definition at line 40 of file PCaloHit.h.

References detId.

Referenced by ZDCHitFilter::accepts(), HOHitFilter::accepts(), HFHitFilter::accepts(), CastorHitFilter::accepts(), HBHEHitFilter::accepts(), CaloHitResponse::analogSignalAmplitude(), EcalSelectiveReadoutValidation::analyzeEB(), EcalSelectiveReadoutValidation::analyzeEE(), CastorHitCorrection::charge(), HcalHitCorrection::charge(), HcalHitCorrection::correct(), CastorHitCorrection::correct(), HcalHitCorrection::delay(), CastorHitCorrection::delay(), CaloHitResponse::makeAnalogSignal(), operator<<(), HcalHitCorrection::timeBin(), and CastorHitCorrection::timeBin().

00040 { return detId; }

static const char* PCaloHit::name ( void   )  [inline, static]

Definition at line 24 of file PCaloHit.h.

Referenced by getName().

00024 { return "Hit"; }

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

Definition at line 56 of file PCaloHit.h.

References myEnergy.

00056 { return myEnergy < d.myEnergy; }

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

Definition at line 59 of file PCaloHit.h.

References detId, and myEnergy.

00060   { return (myEnergy == d.myEnergy && detId == d.detId); }

void PCaloHit::setEventId ( EncodedEventId  e  )  [inline]

Definition at line 49 of file PCaloHit.h.

References theEventId.

Referenced by CrossingFrame< T >::addPileups().

00049 { theEventId = e; }

double PCaloHit::time ( void   )  const [inline]

Definition at line 34 of file PCaloHit.h.

References myTime.

Referenced by CaloHitResponse::add(), HcalHitCorrection::correct(), CastorHitCorrection::correct(), CaloHitResponse::makeAnalogSignal(), operator<<(), HcalHitCorrection::timeBin(), and CastorHitCorrection::timeBin().

00034 { return myTime; }


Member Data Documentation

unsigned int PCaloHit::detId [protected]

Definition at line 68 of file PCaloHit.h.

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

uint16_t PCaloHit::myDepth [protected]

Definition at line 69 of file PCaloHit.h.

Referenced by depth().

float PCaloHit::myEMFraction [protected]

Definition at line 65 of file PCaloHit.h.

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

float PCaloHit::myEnergy [protected]

Definition at line 64 of file PCaloHit.h.

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

int PCaloHit::myItra [protected]

Definition at line 67 of file PCaloHit.h.

Referenced by geantTrackId().

float PCaloHit::myTime [protected]

Definition at line 66 of file PCaloHit.h.

Referenced by time().

EncodedEventId PCaloHit::theEventId [protected]

Definition at line 70 of file PCaloHit.h.

Referenced by eventId(), and setEventId().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:29:29 2009 for CMSSW by  doxygen 1.5.4