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 reco::FormulaEvaluator timeError_
 
const double toaLSBToNS_
 
const double tofDelay_
 

Detailed Description

Definition at line 6 of file ETLUncalibRecHitAlgo.cc.

Constructor & Destructor Documentation

◆ ETLUncalibRecHitAlgo()

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

Constructor.

Definition at line 9 of file ETLUncalibRecHitAlgo.cc.

11  adcNBits_(conf.getParameter<uint32_t>("adcNbits")),
12  adcSaturation_(conf.getParameter<double>("adcSaturation")),
14  toaLSBToNS_(conf.getParameter<double>("toaLSB_ns")),
15  tofDelay_(conf.getParameter<double>("tofDelay")),
16  timeError_(conf.getParameter<std::string>("timeResolutionInNs")) {}

◆ ~ETLUncalibRecHitAlgo()

ETLUncalibRecHitAlgo::~ETLUncalibRecHitAlgo ( )
inlineoverride

Destructor.

Definition at line 19 of file ETLUncalibRecHitAlgo.cc.

19 {}

Member Function Documentation

◆ getEvent()

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

get event and eventsetup information

Implements MTDUncalibratedRecHitAlgoBase< DataFrame >.

Definition at line 22 of file ETLUncalibRecHitAlgo.cc.

22 {}

◆ getEventSetup()

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

Implements MTDUncalibratedRecHitAlgoBase< DataFrame >.

Definition at line 23 of file ETLUncalibRecHitAlgo.cc.

23 {}

◆ makeRecHit()

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

make the rec hit

Definition at line 37 of file ETLUncalibRecHitAlgo.cc.

37  {
38  constexpr int iSample = 2; //only in-time sample
39  const auto& sample = dataFrame.sample(iSample);
40 
41  const std::array<double, 1> amplitudeV = {{double(sample.data()) * adcLSB_}};
42  // NB: Here amplitudeV is defined as an array in order to be used
43  // below as an input to FormulaEvaluator::evaluate.
44  double time = double(sample.toa()) * toaLSBToNS_ - tofDelay_;
45  unsigned char flag = 0;
46 
47  LogDebug("ETLUncalibRecHit") << "ADC+: set the charge to: " << amplitudeV[0] << ' ' << sample.data() << ' ' << adcLSB_
48  << ' ' << std::endl;
49  LogDebug("ETLUncalibRecHit") << "ADC+: set the time to: " << time << ' ' << sample.toa() << ' ' << toaLSBToNS_ << ' '
50  << std::endl;
51  LogDebug("ETLUncalibRecHit") << "Final uncalibrated amplitude : " << amplitudeV[0] << std::endl;
52 
53  const std::array<double, 1> emptyV = {{0.}};
54  double timeError = timeError_.evaluate(amplitudeV, emptyV);
55 
56  return FTLUncalibratedRecHit(dataFrame.id(),
57  dataFrame.row(),
58  dataFrame.column(),
59  {amplitudeV[0], 0.f},
60  {time, 0.f},
61  timeError,
62  -1.f,
63  -1.f,
64  flag);
65 }

References adcLSB_, FTLDataFrameT< D, S, DECODE >::column(), reco::FormulaEvaluator::evaluate(), RemoveAddSevLevel::flag, FTLDataFrameT< D, S, DECODE >::id(), LogDebug, FTLDataFrameT< D, S, DECODE >::row(), simplePhotonAnalyzer_cfi::sample, FTLDataFrameT< D, S, DECODE >::sample(), protons_cff::time, timeError_, toaLSBToNS_, and tofDelay_.

Member Data Documentation

◆ adcLSB_

const double ETLUncalibRecHitAlgo::adcLSB_
private

Definition at line 31 of file ETLUncalibRecHitAlgo.cc.

Referenced by makeRecHit().

◆ adcNBits_

const uint32_t ETLUncalibRecHitAlgo::adcNBits_
private

Definition at line 29 of file ETLUncalibRecHitAlgo.cc.

◆ adcSaturation_

const double ETLUncalibRecHitAlgo::adcSaturation_
private

Definition at line 30 of file ETLUncalibRecHitAlgo.cc.

◆ timeError_

const reco::FormulaEvaluator ETLUncalibRecHitAlgo::timeError_
private

Definition at line 34 of file ETLUncalibRecHitAlgo.cc.

Referenced by makeRecHit().

◆ toaLSBToNS_

const double ETLUncalibRecHitAlgo::toaLSBToNS_
private

Definition at line 32 of file ETLUncalibRecHitAlgo.cc.

Referenced by makeRecHit().

◆ tofDelay_

const double ETLUncalibRecHitAlgo::tofDelay_
private

Definition at line 33 of file ETLUncalibRecHitAlgo.cc.

Referenced by makeRecHit().

FTLDataFrameT::id
const D & id() const
det id
Definition: FTLDataFrameT.h:31
ETLUncalibRecHitAlgo::adcLSB_
const double adcLSB_
Definition: ETLUncalibRecHitAlgo.cc:31
simplePhotonAnalyzer_cfi.sample
sample
Definition: simplePhotonAnalyzer_cfi.py:12
ETLUncalibRecHitAlgo::adcSaturation_
const double adcSaturation_
Definition: ETLUncalibRecHitAlgo.cc:30
protons_cff.time
time
Definition: protons_cff.py:39
FTLDataFrameT::column
const int column() const
column
Definition: FTLDataFrameT.h:41
ETLUncalibRecHitAlgo::adcNBits_
const uint32_t adcNBits_
Definition: ETLUncalibRecHitAlgo.cc:29
MTDUncalibratedRecHitAlgoBase
Definition: MTDUncalibratedRecHitAlgoBase.h:16
ETLUncalibRecHitAlgo::tofDelay_
const double tofDelay_
Definition: ETLUncalibRecHitAlgo.cc:33
FTLDataFrameT::sample
const S & sample(int i) const
Definition: FTLDataFrameT.h:57
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ETLUncalibRecHitAlgo::timeError_
const reco::FormulaEvaluator timeError_
Definition: ETLUncalibRecHitAlgo.cc:34
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
ETLUncalibRecHitAlgo::toaLSBToNS_
const double toaLSBToNS_
Definition: ETLUncalibRecHitAlgo.cc:32
reco::FormulaEvaluator::evaluate
double evaluate(V const &iVariables, P const &iParameters) const
Definition: FormulaEvaluator.h:73
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
FTLDataFrameT::row
const int row() const
row
Definition: FTLDataFrameT.h:36
FTLUncalibratedRecHit
Definition: FTLUncalibratedRecHit.h:7
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116