CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
FTLSimpleRecHitAlgo Class Reference
Inheritance diagram for FTLSimpleRecHitAlgo:
FTLRecHitAlgoBase

Public Member Functions

 FTLSimpleRecHitAlgo (const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
 Constructor. More...
 
void getEvent (const edm::Event &) final
 get event and eventsetup information More...
 
void getEventSetup (const edm::EventSetup &) final
 
FTLRecHit makeRecHit (const FTLUncalibratedRecHit &uRecHit, uint32_t &flags) const final
 make the rec hit More...
 
 ~FTLSimpleRecHitAlgo () override
 Destructor. More...
 
- Public Member Functions inherited from FTLRecHitAlgoBase
 FTLRecHitAlgoBase (const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
 Constructor. More...
 
const std::string & name () const
 
virtual ~FTLRecHitAlgoBase ()
 Destructor. More...
 

Private Attributes

double calibration_
 
double thresholdToKeep_
 

Detailed Description

Definition at line 3 of file FTLSimpleRecHitAlgo.cc.

Constructor & Destructor Documentation

FTLSimpleRecHitAlgo::FTLSimpleRecHitAlgo ( const edm::ParameterSet conf,
edm::ConsumesCollector sumes 
)
inline

Constructor.

Definition at line 6 of file FTLSimpleRecHitAlgo.cc.

7  : FTLRecHitAlgoBase(conf, sumes),
8  thresholdToKeep_(conf.getParameter<double>("thresholdToKeep")),
9  calibration_(conf.getParameter<double>("calibrationConstant")) {}
T getParameter(std::string const &) const
FTLRecHitAlgoBase(const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
Constructor.
FTLSimpleRecHitAlgo::~FTLSimpleRecHitAlgo ( )
inlineoverride

Destructor.

Definition at line 12 of file FTLSimpleRecHitAlgo.cc.

12 {}

Member Function Documentation

void FTLSimpleRecHitAlgo::getEvent ( const edm::Event )
inlinefinalvirtual

get event and eventsetup information

Implements FTLRecHitAlgoBase.

Definition at line 15 of file FTLSimpleRecHitAlgo.cc.

15 {}
void FTLSimpleRecHitAlgo::getEventSetup ( const edm::EventSetup )
inlinefinalvirtual

Implements FTLRecHitAlgoBase.

Definition at line 16 of file FTLSimpleRecHitAlgo.cc.

References HLT_2018_cff::flags, and makeRecHit().

16 {}
FTLRecHit FTLSimpleRecHitAlgo::makeRecHit ( const FTLUncalibratedRecHit uRecHit,
uint32_t &  flags 
) const
finalvirtual

make the rec hit

Implements FTLRecHitAlgoBase.

Definition at line 25 of file FTLSimpleRecHitAlgo.cc.

References FTLUncalibratedRecHit::amplitude(), calibration_, DEFINE_EDM_PLUGIN, HCALHighEnergyHPDFilter_cfi::energy, FTLUncalibratedRecHit::id(), FTLRecHit::kGood, FTLRecHit::kKilled, thresholdToKeep_, FTLUncalibratedRecHit::time(), ntuplemaker::time, and FTLUncalibratedRecHit::timeError().

Referenced by getEventSetup().

25  {
26  float energy = uRecHit.amplitude().first * calibration_;
27  float time = uRecHit.time().first;
28  float timeError = uRecHit.timeError();
29 
30  FTLRecHit rh(uRecHit.id(), energy, time, timeError);
31 
32  // Now fill flags
33  // all rechits from the digitizer are "good" at present
34  if (energy > thresholdToKeep_) {
36  rh.setFlag(flags);
37  } else {
39  rh.setFlag(flags);
40  }
41 
42  return rh;
43 }
std::pair< float, float > time() const
std::pair< float, float > amplitude() const

Member Data Documentation

double FTLSimpleRecHitAlgo::calibration_
private

Definition at line 22 of file FTLSimpleRecHitAlgo.cc.

Referenced by makeRecHit().

double FTLSimpleRecHitAlgo::thresholdToKeep_
private

Definition at line 22 of file FTLSimpleRecHitAlgo.cc.

Referenced by makeRecHit().