CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  virtual ~FTLSimpleRecHitAlgo() { }
14 
16  virtual void getEvent(const edm::Event&) override final {}
17  virtual void getEventSetup(const edm::EventSetup&) override final {}
18 
20  virtual FTLRecHit makeRecHit(const FTLUncalibratedRecHit& uRecHit, uint32_t& flags ) const override 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 
virtual ~FTLSimpleRecHitAlgo()
Destructor.
virtual void getEvent(const edm::Event &) overridefinal
get event and eventsetup information
std::vector< Variable::Flags > flags
Definition: MVATrainer.cc:135
FTLSimpleRecHitAlgo(const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
Constructor.
virtual void getEventSetup(const edm::EventSetup &) overridefinal
#define DEFINE_EDM_PLUGIN(factory, type, name)
virtual FTLRecHit makeRecHit(const FTLUncalibratedRecHit &uRecHit, uint32_t &flags) const overridefinal
make the rec hit