CMS 3D CMS Logo

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

Public Member Functions

 FTLSimpleUncalibRecHitAlgo (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
 
FTLUncalibratedRecHit makeRecHit (const FTLDataFrame &dataFrame) const final
 make the rec hit More...
 
 ~FTLSimpleUncalibRecHitAlgo () override
 Destructor. More...
 
- Public Member Functions inherited from FTLUncalibratedRecHitAlgoBase
 FTLUncalibratedRecHitAlgoBase (const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
 Constructor. More...
 
const std::string & name () const
 
virtual ~FTLUncalibratedRecHitAlgoBase ()
 Destructor. More...
 

Private Attributes

double adcLSB_
 
double timeError_
 
double toaLSBToNS_
 

Detailed Description

Definition at line 4 of file FTLSimpleUncalibRecHitAlgo.cc.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 7 of file FTLSimpleUncalibRecHitAlgo.cc.

References adcLSB_, edm::ParameterSet::getParameter(), timeError_, and toaLSBToNS_.

8  : FTLUncalibratedRecHitAlgoBase(conf, sumes) {
9  uint32_t nBits = conf.getParameter<uint32_t>("adcNbits");
10  double saturation = conf.getParameter<double>("adcSaturation");
11  adcLSB_ = saturation / (1 << nBits);
12 
13  toaLSBToNS_ = conf.getParameter<double>("toaLSB_ns");
14 
15  timeError_ = conf.getParameter<double>("timeResolutionInNs");
16  }
T getParameter(std::string const &) const
FTLUncalibratedRecHitAlgoBase(const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
Constructor.
FTLSimpleUncalibRecHitAlgo::~FTLSimpleUncalibRecHitAlgo ( )
inlineoverride

Destructor.

Definition at line 19 of file FTLSimpleUncalibRecHitAlgo.cc.

19 {}

Member Function Documentation

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

get event and eventsetup information

Implements FTLUncalibratedRecHitAlgoBase.

Definition at line 22 of file FTLSimpleUncalibRecHitAlgo.cc.

22 {}
void FTLSimpleUncalibRecHitAlgo::getEventSetup ( const edm::EventSetup )
inlinefinalvirtual

Implements FTLUncalibratedRecHitAlgoBase.

Definition at line 23 of file FTLSimpleUncalibRecHitAlgo.cc.

References makeRecHit().

23 {}
FTLUncalibratedRecHit FTLSimpleUncalibRecHitAlgo::makeRecHit ( const FTLDataFrame dataFrame) const
finalvirtual

make the rec hit

Implements FTLUncalibratedRecHitAlgoBase.

Definition at line 32 of file FTLSimpleUncalibRecHitAlgo.cc.

References adcLSB_, CustomPhysics_cfi::amplitude, constexpr, DEFINE_EDM_PLUGIN, RemoveAddSevLevel::flag, FTLDataFrameT< D, S, DECODE >::id(), LogDebug, simplePhotonAnalyzer_cfi::sample, FTLDataFrameT< D, S, DECODE >::sample(), ntuplemaker::time, timeError_, and toaLSBToNS_.

Referenced by getEventSetup().

32  {
33  constexpr int iSample = 2; //only in-time sample
34  const auto& sample = dataFrame.sample(iSample);
35 
36  double amplitude = double(sample.data()) * adcLSB_;
37  double time = double(sample.toa()) * toaLSBToNS_;
38  unsigned char flag = 0;
39 
40  LogDebug("FTLSimpleUncalibRecHit") << "ADC+: set the charge to: " << amplitude << ' ' << sample.data() << ' '
41  << adcLSB_ << ' ' << std::endl;
42  LogDebug("FTLSimpleUncalibRecHit") << "ADC+: set the time to: " << time << ' ' << sample.toa() << ' ' << toaLSBToNS_
43  << ' ' << std::endl;
44  LogDebug("FTLSimpleUncalibRecHit") << "Final uncalibrated amplitude : " << amplitude << std::endl;
45 
46  return FTLUncalibratedRecHit(
47  dataFrame.id(), std::make_pair(amplitude, 0.), std::make_pair(time, 0.), timeError_, flag);
48 }
#define LogDebug(id)
const S & sample(int i) const
Definition: FTLDataFrameT.h:57
#define constexpr
const D & id() const
det id
Definition: FTLDataFrameT.h:31

Member Data Documentation

double FTLSimpleUncalibRecHitAlgo::adcLSB_
private

Definition at line 29 of file FTLSimpleUncalibRecHitAlgo.cc.

Referenced by FTLSimpleUncalibRecHitAlgo(), and makeRecHit().

double FTLSimpleUncalibRecHitAlgo::timeError_
private

Definition at line 29 of file FTLSimpleUncalibRecHitAlgo.cc.

Referenced by FTLSimpleUncalibRecHitAlgo(), and makeRecHit().

double FTLSimpleUncalibRecHitAlgo::toaLSBToNS_
private

Definition at line 29 of file FTLSimpleUncalibRecHitAlgo.cc.

Referenced by FTLSimpleUncalibRecHitAlgo(), and makeRecHit().