CMS 3D CMS Logo

FTLSimpleRecHitAlgo.cc
Go to the documentation of this file.
2 
4  public:
7  edm::ConsumesCollector& sumes ) :
8  FTLRecHitAlgoBase( conf, sumes ),
9  thresholdToKeep_( conf.getParameter<double>("thresholdToKeep") ),
10  calibration_( conf.getParameter<double>("calibrationConstant") ) { }
11 
13  ~FTLSimpleRecHitAlgo() override { }
14 
16  void getEvent(const edm::Event&) final {}
17  void getEventSetup(const edm::EventSetup&) final {}
18 
20  FTLRecHit makeRecHit(const FTLUncalibratedRecHit& uRecHit, uint32_t& flags ) const final;
21 
22  private:
24 };
25 
26 FTLRecHit
27 FTLSimpleRecHitAlgo::makeRecHit(const FTLUncalibratedRecHit& uRecHit, uint32_t& flags ) const {
28 
29  float energy = uRecHit.amplitude() * calibration_;
30  float time = uRecHit.time();
31  float timeError = uRecHit.timeError();
32 
33  FTLRecHit rh( uRecHit.id(), energy, time, timeError );
34 
35  // Now fill flags
36  // all rechits from the digitizer are "good" at present
37  if( energy > thresholdToKeep_ ) {
38  flags = FTLRecHit::kGood;
39  rh.setFlag(flags);
40  } else {
41  flags = FTLRecHit::kKilled;
42  rh.setFlag(flags);
43  }
44 
45  return rh;
46 }
47 
std::vector< Variable::Flags > flags
Definition: MVATrainer.cc:135
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.