CMS 3D CMS Logo

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

Public Member Functions

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...
 
 MTDRecHitAlgo (const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
 Constructor. More...
 
 ~MTDRecHitAlgo () override
 Destructor. More...
 
- Public Member Functions inherited from MTDRecHitAlgoBase
 MTDRecHitAlgoBase (const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
 Constructor. More...
 
const std::string & name () const
 
virtual ~MTDRecHitAlgoBase ()
 Destructor. More...
 

Private Attributes

double calibration_
 
double thresholdToKeep_
 

Detailed Description

Definition at line 3 of file MTDRecHitAlgo.cc.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 6 of file MTDRecHitAlgo.cc.

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

Destructor.

Definition at line 13 of file MTDRecHitAlgo.cc.

13 { }

Member Function Documentation

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

get event and eventsetup information

Implements MTDRecHitAlgoBase.

Definition at line 16 of file MTDRecHitAlgo.cc.

16 {}
void MTDRecHitAlgo::getEventSetup ( const edm::EventSetup )
inlinefinalvirtual

Implements MTDRecHitAlgoBase.

Definition at line 17 of file MTDRecHitAlgo.cc.

References flags, and makeRecHit().

17 {}
FTLRecHit MTDRecHitAlgo::makeRecHit ( const FTLUncalibratedRecHit uRecHit,
uint32_t &  flags 
) const
finalvirtual

make the rec hit

Implements MTDRecHitAlgoBase.

Definition at line 28 of file MTDRecHitAlgo.cc.

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

Referenced by getEventSetup().

28  {
29 
30  float energy = uRecHit.amplitude() * calibration_;
31  float time = uRecHit.time();
32  float timeError = uRecHit.timeError();
33 
34  FTLRecHit rh( uRecHit.id(), energy, time, timeError );
35 
36  // Now fill flags
37  // all rechits from the digitizer are "good" at present
38  if( energy > thresholdToKeep_ ) {
40  rh.setFlag(flags);
41  } else {
43  rh.setFlag(flags);
44  }
45 
46  return rh;
47 }
double thresholdToKeep_
std::vector< Variable::Flags > flags
Definition: MVATrainer.cc:135
double calibration_

Member Data Documentation

double MTDRecHitAlgo::calibration_
private

Definition at line 23 of file MTDRecHitAlgo.cc.

Referenced by makeRecHit().

double MTDRecHitAlgo::thresholdToKeep_
private

Definition at line 23 of file MTDRecHitAlgo.cc.

Referenced by makeRecHit().