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  :
8  FTLRecHitAlgoBase( conf, sumes ),
9  thresholdToKeep_( conf.getParameter<double>("thresholdToKeep") ),
10  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 13 of file FTLSimpleRecHitAlgo.cc.

13 { }

Member Function Documentation

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

get event and eventsetup information

Implements FTLRecHitAlgoBase.

Definition at line 16 of file FTLSimpleRecHitAlgo.cc.

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

Implements FTLRecHitAlgoBase.

Definition at line 17 of file FTLSimpleRecHitAlgo.cc.

References flags, and makeRecHit().

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

make the rec hit

Implements FTLRecHitAlgoBase.

Definition at line 27 of file FTLSimpleRecHitAlgo.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().

27  {
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_ ) {
39  rh.setFlag(flags);
40  } else {
42  rh.setFlag(flags);
43  }
44 
45  return rh;
46 }
std::vector< Variable::Flags > flags
Definition: MVATrainer.cc:135

Member Data Documentation

double FTLSimpleRecHitAlgo::calibration_
private

Definition at line 23 of file FTLSimpleRecHitAlgo.cc.

Referenced by makeRecHit().

double FTLSimpleRecHitAlgo::thresholdToKeep_
private

Definition at line 23 of file FTLSimpleRecHitAlgo.cc.

Referenced by makeRecHit().