CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
ETLUncalibRecHitAlgo Class Reference
Inheritance diagram for ETLUncalibRecHitAlgo:
MTDUncalibratedRecHitAlgoBase< DataFrame >

Public Member Functions

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

Private Attributes

const double adcLSB_
 
const uint32_t adcNBits_
 
const double adcSaturation_
 
const double timeError_
 
const double toaLSBToNS_
 
const double tofDelay_
 

Detailed Description

Definition at line 4 of file ETLUncalibRecHitAlgo.cc.

Constructor & Destructor Documentation

◆ ETLUncalibRecHitAlgo()

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

Constructor.

Definition at line 7 of file ETLUncalibRecHitAlgo.cc.

9  adcNBits_(conf.getParameter<uint32_t>("adcNbits")),
10  adcSaturation_(conf.getParameter<double>("adcSaturation")),
12  toaLSBToNS_(conf.getParameter<double>("toaLSB_ns")),
13  tofDelay_(conf.getParameter<double>("tofDelay")),
14  timeError_(conf.getParameter<double>("timeResolutionInNs")) {}

◆ ~ETLUncalibRecHitAlgo()

ETLUncalibRecHitAlgo::~ETLUncalibRecHitAlgo ( )
inlineoverride

Destructor.

Definition at line 17 of file ETLUncalibRecHitAlgo.cc.

17 {}

Member Function Documentation

◆ getEvent()

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

get event and eventsetup information

Implements MTDUncalibratedRecHitAlgoBase< DataFrame >.

Definition at line 20 of file ETLUncalibRecHitAlgo.cc.

20 {}

◆ getEventSetup()

void ETLUncalibRecHitAlgo::getEventSetup ( const edm::EventSetup )
inlinefinalvirtual

Implements MTDUncalibratedRecHitAlgoBase< DataFrame >.

Definition at line 21 of file ETLUncalibRecHitAlgo.cc.

21 {}

◆ makeRecHit()

FTLUncalibratedRecHit ETLUncalibRecHitAlgo::makeRecHit ( const ETLDataFrame dataFrame) const
final

make the rec hit

Definition at line 35 of file ETLUncalibRecHitAlgo.cc.

35  {
36  constexpr int iSample = 2; //only in-time sample
37  const auto& sample = dataFrame.sample(iSample);
38 
39  double amplitude = double(sample.data()) * adcLSB_;
40  double time = double(sample.toa()) * toaLSBToNS_ - tofDelay_;
41  unsigned char flag = 0;
42 
43  LogDebug("ETLUncalibRecHit") << "ADC+: set the charge to: " << amplitude << ' ' << sample.data() << ' ' << adcLSB_
44  << ' ' << std::endl;
45  LogDebug("ETLUncalibRecHit") << "ADC+: set the time to: " << time << ' ' << sample.toa() << ' ' << toaLSBToNS_ << ' '
46  << std::endl;
47  LogDebug("ETLUncalibRecHit") << "Final uncalibrated amplitude : " << amplitude << std::endl;
48 
49  return FTLUncalibratedRecHit(
50  dataFrame.id(), dataFrame.row(), dataFrame.column(), {amplitude, 0.f}, {time, 0.f}, timeError_, flag);
51 }

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

Member Data Documentation

◆ adcLSB_

const double ETLUncalibRecHitAlgo::adcLSB_
private

Definition at line 29 of file ETLUncalibRecHitAlgo.cc.

Referenced by makeRecHit().

◆ adcNBits_

const uint32_t ETLUncalibRecHitAlgo::adcNBits_
private

Definition at line 27 of file ETLUncalibRecHitAlgo.cc.

◆ adcSaturation_

const double ETLUncalibRecHitAlgo::adcSaturation_
private

Definition at line 28 of file ETLUncalibRecHitAlgo.cc.

◆ timeError_

const double ETLUncalibRecHitAlgo::timeError_
private

Definition at line 32 of file ETLUncalibRecHitAlgo.cc.

Referenced by makeRecHit().

◆ toaLSBToNS_

const double ETLUncalibRecHitAlgo::toaLSBToNS_
private

Definition at line 30 of file ETLUncalibRecHitAlgo.cc.

Referenced by makeRecHit().

◆ tofDelay_

const double ETLUncalibRecHitAlgo::tofDelay_
private

Definition at line 31 of file ETLUncalibRecHitAlgo.cc.

Referenced by makeRecHit().

FTLDataFrameT::id
const D & id() const
det id
Definition: FTLDataFrameT.h:31
CustomPhysics_cfi.amplitude
amplitude
Definition: CustomPhysics_cfi.py:12
ETLUncalibRecHitAlgo::adcLSB_
const double adcLSB_
Definition: ETLUncalibRecHitAlgo.cc:29
simplePhotonAnalyzer_cfi.sample
sample
Definition: simplePhotonAnalyzer_cfi.py:12
ETLUncalibRecHitAlgo::adcSaturation_
const double adcSaturation_
Definition: ETLUncalibRecHitAlgo.cc:28
FTLDataFrameT::column
const int column() const
column
Definition: FTLDataFrameT.h:41
ETLUncalibRecHitAlgo::adcNBits_
const uint32_t adcNBits_
Definition: ETLUncalibRecHitAlgo.cc:27
MTDUncalibratedRecHitAlgoBase
Definition: MTDUncalibratedRecHitAlgoBase.h:16
ETLUncalibRecHitAlgo::tofDelay_
const double tofDelay_
Definition: ETLUncalibRecHitAlgo.cc:31
FTLDataFrameT::sample
const S & sample(int i) const
Definition: FTLDataFrameT.h:57
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
ETLUncalibRecHitAlgo::timeError_
const double timeError_
Definition: ETLUncalibRecHitAlgo.cc:32
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
ETLUncalibRecHitAlgo::toaLSBToNS_
const double toaLSBToNS_
Definition: ETLUncalibRecHitAlgo.cc:30
FTLDataFrameT::row
const int row() const
row
Definition: FTLDataFrameT.h:36
FTLUncalibratedRecHit
Definition: FTLUncalibratedRecHit.h:7
ntuplemaker.time
time
Definition: ntuplemaker.py:310
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116