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 ( const edm::ParameterSet conf,
edm::ConsumesCollector sumes 
)
inline

Constructor.

Definition at line 7 of file ETLUncalibRecHitAlgo.cc.

8  :
10  adcNBits_( conf.getParameter<uint32_t>("adcNbits") ),
11  adcSaturation_( conf.getParameter<double>("adcSaturation") ),
13  toaLSBToNS_( conf.getParameter<double>("toaLSB_ns") ),
14  tofDelay_( conf.getParameter<double>("tofDelay") ),
15  timeError_( conf.getParameter<double>("timeResolutionInNs") )
16  { }
ETLUncalibRecHitAlgo::~ETLUncalibRecHitAlgo ( )
inlineoverride

Destructor.

Definition at line 19 of file ETLUncalibRecHitAlgo.cc.

19 { }

Member Function Documentation

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

get event and eventsetup information

Implements MTDUncalibratedRecHitAlgoBase< DataFrame >.

Definition at line 22 of file ETLUncalibRecHitAlgo.cc.

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

Implements MTDUncalibratedRecHitAlgoBase< DataFrame >.

Definition at line 23 of file ETLUncalibRecHitAlgo.cc.

References makeRecHit().

23 {}
FTLUncalibratedRecHit ETLUncalibRecHitAlgo::makeRecHit ( const ETLDataFrame dataFrame) const
final

make the rec hit

Definition at line 40 of file ETLUncalibRecHitAlgo.cc.

References adcLSB_, CustomPhysics_cfi::amplitude, FTLDataFrameT< D, S, DECODE >::column(), constexpr, DEFINE_EDM_PLUGIN, 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_.

Referenced by getEventSetup().

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

Member Data Documentation

const double ETLUncalibRecHitAlgo::adcLSB_
private

Definition at line 32 of file ETLUncalibRecHitAlgo.cc.

Referenced by makeRecHit().

const uint32_t ETLUncalibRecHitAlgo::adcNBits_
private

Definition at line 30 of file ETLUncalibRecHitAlgo.cc.

const double ETLUncalibRecHitAlgo::adcSaturation_
private

Definition at line 31 of file ETLUncalibRecHitAlgo.cc.

const double ETLUncalibRecHitAlgo::timeError_
private

Definition at line 35 of file ETLUncalibRecHitAlgo.cc.

Referenced by makeRecHit().

const double ETLUncalibRecHitAlgo::toaLSBToNS_
private

Definition at line 33 of file ETLUncalibRecHitAlgo.cc.

Referenced by makeRecHit().

const double ETLUncalibRecHitAlgo::tofDelay_
private

Definition at line 34 of file ETLUncalibRecHitAlgo.cc.

Referenced by makeRecHit().