CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CaloRecHit Class Reference

#include <CaloRecHit.h>

Inheritance diagram for CaloRecHit:
CastorRecHit HBHERecHit HFRecHit HGCRecHit HORecHit ZDCRecHit

Public Member Functions

uint32_t aux () const
 
 CaloRecHit ()
 
 CaloRecHit (const DetId &id, float energy, float time, uint32_t flags=0, uint32_t aux=0)
 
const DetIddetid () const
 
float energy () const
 
uint32_t flagField (int base, int width=1) const
 
uint32_t flags () const
 
void setAux (uint32_t value)
 
void setEnergy (float energy)
 
void setFlagField (uint32_t value, int base, int width=1)
 
void setFlags (uint32_t flags)
 
void setTime (float time)
 
float time () const
 

Private Attributes

uint32_t aux_
 
float energy_
 
uint32_t flags_
 
DetId id_
 
float time_
 

Detailed Description

Author
J. Mans - Minnesota

Definition at line 12 of file CaloRecHit.h.

Constructor & Destructor Documentation

CaloRecHit::CaloRecHit ( )

Definition at line 4 of file CaloRecHit.cc.

4  : energy_(0), time_(0), flags_(0), aux_(0) {
5 }
uint32_t aux_
Definition: CaloRecHit.h:33
float energy_
Definition: CaloRecHit.h:30
uint32_t flags_
Definition: CaloRecHit.h:32
float time_
Definition: CaloRecHit.h:31
CaloRecHit::CaloRecHit ( const DetId id,
float  energy,
float  time,
uint32_t  flags = 0,
uint32_t  aux = 0 
)
explicit

Definition at line 7 of file CaloRecHit.cc.

7  :
9 }
uint32_t aux() const
Definition: CaloRecHit.h:27
float time() const
Definition: CaloRecHit.h:19
uint32_t aux_
Definition: CaloRecHit.h:33
float energy_
Definition: CaloRecHit.h:30
float energy() const
Definition: CaloRecHit.h:17
uint32_t flags() const
Definition: CaloRecHit.h:22
uint32_t flags_
Definition: CaloRecHit.h:32
float time_
Definition: CaloRecHit.h:31
DetId id_
Definition: CaloRecHit.h:29

Member Function Documentation

uint32_t CaloRecHit::aux ( ) const
inline

Definition at line 27 of file CaloRecHit.h.

References aux_.

Referenced by operator<<(), HBHERecHit::setAuxHBHE(), HBHERecHit::setAuxPhase1(), HGCRecHit::setTimeError(), and HGCRecHit::timeError().

27 { return aux_; }
uint32_t aux_
Definition: CaloRecHit.h:33
const DetId& CaloRecHit::detid ( ) const
inline
float CaloRecHit::energy ( ) const
inline

Definition at line 17 of file CaloRecHit.h.

References energy_.

Referenced by cms::Analyzer_minbias::analyze(), AnalyzerMinbias::analyzeHcal(), CaloTowersCreationAlgo::assignHitHcal(), FWCaloRecHitDigitSetProxyBuilder::build(), HBHEHitMap::calcHcalNeighborTowers_(), HBHEHitMap::calcHcalSameTowers_(), HBHEHitMap::calcHits_(), egammaisolation::EgammaHcalExtractor::deposit(), muonisolation::CaloExtractorByAssociator::deposits(), AlCaHOCalibProducer::fillHOStore(), HcalRechitIsoCalculator::getBkgSubHcalRechitIso(), EcalHaloAlgo::GetHaloClusterCandidateEB(), EcalHaloAlgo::GetHaloClusterCandidateEE(), HcalHaloAlgo::GetHaloClusterCandidateHB(), HcalHaloAlgo::GetHaloClusterCandidateHE(), HcalRechitIsoCalculator::getHcalRechitIso(), EgammaHcalIsolation::getHcalSum(), hgcal::ClusterTools::getWidths(), HBHEHitMapOrganizer::HBHEHitMapOrganizer(), CSCHaloAlgo::HCALSegmentMatching(), HGCalImagingAlgo::Hexel::Hexel(), HcalHFStatusBitFromDigis::hfSetFlagFromDigi(), HcalHF_PETalgorithm::HFSetFlagFromPET(), HcalHF_S9S1algorithm::HFSetFlagFromS9S1(), HGCRecHit::id(), SimplePlan1RechitCombiner::makeRechit(), operator<(), operator<<(), HGCalImagingAlgo::populate(), reco::modules::CaloRecHitCandidateProducer< HitCollection >::produce(), CastorCellProducer::produce(), RecHitCorrector::produce(), reco::CentralityProducer::produce(), Jet.Jet::rawEnergy(), HBHEStatusBitSetter::rememberHit(), HGCalRecHitWorkerSimple::run(), FWCaloRecHitDigitSetProxyBuilder::scaleProduct(), setEnergy(), PFRecHitQTestHCALChannel::test(), PFRecHitQTestHCALTimeVsDepth::test(), PFRecHitQTestHCALThresholdVsDepth::test(), PFRecHitQTestThresholdInMIPs::test(), PFRecHitQTestThresholdInThicknessNormalizedMIPs::test(), HBHETimingShapedFlagSetter::timingStatus(), and ObjectValidator::validHit().

17 { return energy_; }
float energy_
Definition: CaloRecHit.h:30
uint32_t CaloRecHit::flagField ( int  base,
int  width = 1 
) const

Definition at line 31 of file CaloRecHit.cc.

References flags_, masks, SiStripPI::max, and min().

Referenced by HFClusterAlgo::isPMTHit(), and setFlags().

31  {
32  return (flags_>>std::max(std::min(base,31),0))&masks[std::max(std::min(width,32),0)];
33 }
T min(T a, T b)
Definition: MathUtil.h:58
base
Make Sure CMSSW is Setup ##.
uint32_t flags_
Definition: CaloRecHit.h:32
constexpr uint32_t masks[]
Definition: CaloRecHit.cc:12
uint32_t CaloRecHit::flags ( ) const
inline
void CaloRecHit::setAux ( uint32_t  value)
inline
void CaloRecHit::setEnergy ( float  energy)
inline

Definition at line 18 of file CaloRecHit.h.

References energy(), and energy_.

18 { energy_=energy; }
float energy_
Definition: CaloRecHit.h:30
float energy() const
Definition: CaloRecHit.h:17
void CaloRecHit::setFlagField ( uint32_t  value,
int  base,
int  width = 1 
)

Definition at line 20 of file CaloRecHit.cc.

References hitfit::clear(), flags_, masks, SiStripPI::max, min(), and relativeConstraints::value.

Referenced by CastorSimpleRecAlgo::checkADCSaturation(), HcalHFStatusBitFromDigis::hfSetFlagFromDigi(), HcalHF_PETalgorithm::HFSetFlagFromPET(), HcalHF_S9S1algorithm::HFSetFlagFromS9S1(), HBHEIsolatedNoiseReflagger::produce(), HFFlexibleTimeCheck::reconstruct(), SimpleHBHEPhase1Algo::reconstruct(), HFSimpleTimeCheck::reconstruct(), CastorSimpleRecAlgo::recoverADCSaturation(), HBHEPhase1Reconstructor::runHBHENegativeEFilter(), setFlags(), HBHEStatusBitSetter::SetFlagsFromDigi(), HBHENegativeFlagSetter::setPulseShapeFlags(), HBHEPulseShapeFlagSetter::SetPulseShapeFlags(), and HBHETimingShapedFlagSetter::SetTimingShapedFlags().

20  {
22  value<<=std::max(std::min(base,31),0);
23  // clear out the relevant bits
24  uint32_t clear=masks[std::max(std::min(width,32),0)];
25  clear=clear<<std::max(std::min(base,31),0);
26  clear^=0xFFFFFFFFu;
27  flags_&=clear;
28  flags_|=value;
29 }
void clear(CLHEP::HepGenMatrix &m)
Helper function: Reset all elements of a matrix to 0.
Definition: matutil.cc:167
Definition: value.py:1
T min(T a, T b)
Definition: MathUtil.h:58
base
Make Sure CMSSW is Setup ##.
uint32_t flags_
Definition: CaloRecHit.h:32
constexpr uint32_t masks[]
Definition: CaloRecHit.cc:12
void CaloRecHit::setFlags ( uint32_t  flags)
inline
void CaloRecHit::setTime ( float  time)
inline

Definition at line 20 of file CaloRecHit.h.

References time(), and time_.

20 { time_=time; }
float time() const
Definition: CaloRecHit.h:19
float time_
Definition: CaloRecHit.h:31
float CaloRecHit::time ( ) const
inline

Member Data Documentation

uint32_t CaloRecHit::aux_
private

Definition at line 33 of file CaloRecHit.h.

Referenced by aux(), and setAux().

float CaloRecHit::energy_
private

Definition at line 30 of file CaloRecHit.h.

Referenced by energy(), and setEnergy().

uint32_t CaloRecHit::flags_
private

Definition at line 32 of file CaloRecHit.h.

Referenced by flagField(), flags(), setFlagField(), and setFlags().

DetId CaloRecHit::id_
private

Definition at line 29 of file CaloRecHit.h.

Referenced by detid().

float CaloRecHit::time_
private

Definition at line 31 of file CaloRecHit.h.

Referenced by setTime(), and time().