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

Destructor.

Definition at line 20 of file FTLSimpleUncalibRecHitAlgo.cc.

20 { }

Member Function Documentation

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

get event and eventsetup information

Implements FTLUncalibratedRecHitAlgoBase.

Definition at line 23 of file FTLSimpleUncalibRecHitAlgo.cc.

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

Implements FTLUncalibratedRecHitAlgoBase.

Definition at line 24 of file FTLSimpleUncalibRecHitAlgo.cc.

References makeRecHit().

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

make the rec hit

Implements FTLUncalibratedRecHitAlgoBase.

Definition at line 34 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().

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

Member Data Documentation

double FTLSimpleUncalibRecHitAlgo::adcLSB_
private

Definition at line 30 of file FTLSimpleUncalibRecHitAlgo.cc.

Referenced by FTLSimpleUncalibRecHitAlgo(), and makeRecHit().

double FTLSimpleUncalibRecHitAlgo::timeError_
private

Definition at line 30 of file FTLSimpleUncalibRecHitAlgo.cc.

Referenced by FTLSimpleUncalibRecHitAlgo(), and makeRecHit().

double FTLSimpleUncalibRecHitAlgo::toaLSBToNS_
private

Definition at line 30 of file FTLSimpleUncalibRecHitAlgo.cc.

Referenced by FTLSimpleUncalibRecHitAlgo(), and makeRecHit().