CMS 3D CMS Logo

FTLSimpleRecHitAlgo.cc
Go to the documentation of this file.
2 
4 public:
7  : FTLRecHitAlgoBase(conf, sumes),
8  thresholdToKeep_(conf.getParameter<double>("thresholdToKeep")),
9  calibration_(conf.getParameter<double>("calibrationConstant")) {}
10 
12  ~FTLSimpleRecHitAlgo() override {}
13 
15  void getEvent(const edm::Event&) final {}
16  void getEventSetup(const edm::EventSetup&) final {}
17 
19  FTLRecHit makeRecHit(const FTLUncalibratedRecHit& uRecHit, uint32_t& flags) const final;
20 
21 private:
23 };
24 
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_) {
35  flags = FTLRecHit::kGood;
36  rh.setFlag(flags);
37  } else {
38  flags = FTLRecHit::kKilled;
39  rh.setFlag(flags);
40  }
41 
42  return rh;
43 }
44 
std::pair< float, float > time() const
std::pair< float, float > amplitude() const
FTLSimpleRecHitAlgo(const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
Constructor.
FTLRecHit makeRecHit(const FTLUncalibratedRecHit &uRecHit, uint32_t &flags) const final
make the rec hit
void getEventSetup(const edm::EventSetup &) final
void getEvent(const edm::Event &) final
get event and eventsetup information
#define DEFINE_EDM_PLUGIN(factory, type, name)
~FTLSimpleRecHitAlgo() override
Destructor.