CMS 3D CMS Logo

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

Public Member Functions

void getEvent (const edm::Event &) final
 get event and eventsetup information More...
 
void getEventSetup (const edm::EventSetup &) final
 
FTLUncalibratedRecHit makeRecHit (const BTLDataFrame &dataFrame) const final
 make the rec hit More...
 
FTLUncalibratedRecHit makeRecHit (const ETLDataFrame &dataFrame) const final
 
 MTDUncalibRecHitAlgo (const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
 Constructor. More...
 
 ~MTDUncalibRecHitAlgo () override
 Destructor. More...
 
- Public Member Functions inherited from MTDUncalibratedRecHitAlgoBase
 MTDUncalibratedRecHitAlgoBase (const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
 Constructor. More...
 
const std::string & name () const
 
virtual ~MTDUncalibratedRecHitAlgoBase ()
 Destructor. More...
 

Private Attributes

double BTL_adcLSB_
 
double BTL_timeError_
 
double BTL_toaLSBToNS_
 
double ETL_adcLSB_
 
double ETL_timeError_
 
double ETL_toaLSBToNS_
 

Detailed Description

Definition at line 4 of file MTDUncalibRecHitAlgo.cc.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 7 of file MTDUncalibRecHitAlgo.cc.

References BTL_adcLSB_, BTL_timeError_, BTL_toaLSBToNS_, ETL_adcLSB_, ETL_timeError_, ETL_toaLSBToNS_, and edm::ParameterSet::getParameter().

8  :
9  MTDUncalibratedRecHitAlgoBase( conf, sumes ) {
10  uint32_t BTL_nBits = conf.getParameter<uint32_t>("BTLadcNbits");
11  double BTL_saturation = conf.getParameter<double>("BTLadcSaturation");
12  BTL_adcLSB_ = BTL_saturation/(1<<BTL_nBits);
13  BTL_toaLSBToNS_ = conf.getParameter<double>("BTLtoaLSB_ns");
14  BTL_timeError_ = conf.getParameter<double>("BTLtimeResolutionInNs");
15 
16  uint32_t ETL_nBits = conf.getParameter<uint32_t>("ETLadcNbits");
17  double ETL_saturation = conf.getParameter<double>("ETLadcSaturation");
18  ETL_adcLSB_ = ETL_saturation/(1<<ETL_nBits);
19  ETL_toaLSBToNS_ = conf.getParameter<double>("ETLtoaLSB_ns");
20  ETL_timeError_ = conf.getParameter<double>("ETLtimeResolutionInNs");
21  }
T getParameter(std::string const &) const
MTDUncalibratedRecHitAlgoBase(const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
Constructor.
MTDUncalibRecHitAlgo::~MTDUncalibRecHitAlgo ( )
inlineoverride

Destructor.

Definition at line 24 of file MTDUncalibRecHitAlgo.cc.

24 { }

Member Function Documentation

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

get event and eventsetup information

Implements MTDUncalibratedRecHitAlgoBase.

Definition at line 27 of file MTDUncalibRecHitAlgo.cc.

27 {}
void MTDUncalibRecHitAlgo::getEventSetup ( const edm::EventSetup )
inlinefinalvirtual

Implements MTDUncalibratedRecHitAlgoBase.

Definition at line 28 of file MTDUncalibRecHitAlgo.cc.

References makeRecHit().

28 {}
FTLUncalibratedRecHit MTDUncalibRecHitAlgo::makeRecHit ( const BTLDataFrame dataFrame) const
finalvirtual

make the rec hit

Implements MTDUncalibratedRecHitAlgoBase.

Definition at line 40 of file MTDUncalibRecHitAlgo.cc.

References CustomPhysics_cfi::amplitude, BTL_adcLSB_, BTL_timeError_, BTL_toaLSBToNS_, constexpr, RemoveAddSevLevel::flag, FTLDataFrameT< D, S >::id(), LogDebug, simplePhotonAnalyzer_cfi::sample, FTLDataFrameT< D, S >::sample(), and ntuplemaker::time.

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()) * BTL_adcLSB_;
45  double time = double(sample.toa()) * BTL_toaLSBToNS_;
46 
47  unsigned char flag = 0;
48 
49  LogDebug("MTDUncalibRecHit") << "ADC+: set the charge to: " << amplitude << ' ' << sample.data()
50  << ' ' << BTL_adcLSB_ << ' ' << std::endl;
51  LogDebug("MTDUncalibRecHit") << "ADC+: set the time to: " << time << ' ' << sample.toa()
52  << ' ' << BTL_toaLSBToNS_ << ' ' << std::endl;
53  LogDebug("MTDUncalibRecHit") << "Final uncalibrated amplitude : " << amplitude << std::endl;
54 
55  return FTLUncalibratedRecHit( dataFrame.id(), amplitude, time, BTL_timeError_, flag);
56 }
#define LogDebug(id)
const D & id() const
det id
Definition: FTLDataFrameT.h:32
#define constexpr
const S & sample(int i) const
Definition: FTLDataFrameT.h:48
FTLUncalibratedRecHit MTDUncalibRecHitAlgo::makeRecHit ( const ETLDataFrame dataFrame) const
finalvirtual

Implements MTDUncalibratedRecHitAlgoBase.

Definition at line 58 of file MTDUncalibRecHitAlgo.cc.

References CustomPhysics_cfi::amplitude, constexpr, DEFINE_EDM_PLUGIN, ETL_adcLSB_, ETL_timeError_, ETL_toaLSBToNS_, RemoveAddSevLevel::flag, FTLDataFrameT< D, S >::id(), LogDebug, simplePhotonAnalyzer_cfi::sample, FTLDataFrameT< D, S >::sample(), and ntuplemaker::time.

58  {
59  constexpr int iSample=2; //only in-time sample
60  const auto& sample = dataFrame.sample(iSample);
61 
62  double amplitude = double(sample.data()) * ETL_adcLSB_;
63  double time = double(sample.toa()) * ETL_toaLSBToNS_;
64  unsigned char flag = 0;
65 
66  LogDebug("MTDUncalibRecHit") << "ADC+: set the charge to: " << amplitude << ' ' << sample.data()
67  << ' ' << ETL_adcLSB_ << ' ' << std::endl;
68  LogDebug("MTDUncalibRecHit") << "ADC+: set the time to: " << time << ' ' << sample.toa()
69  << ' ' << ETL_toaLSBToNS_ << ' ' << std::endl;
70  LogDebug("MTDUncalibRecHit") << "Final uncalibrated amplitude : " << amplitude << std::endl;
71 
72  return FTLUncalibratedRecHit( dataFrame.id(), amplitude, time, ETL_timeError_, flag);
73 }
#define LogDebug(id)
const D & id() const
det id
Definition: FTLDataFrameT.h:32
#define constexpr
const S & sample(int i) const
Definition: FTLDataFrameT.h:48

Member Data Documentation

double MTDUncalibRecHitAlgo::BTL_adcLSB_
private

Definition at line 35 of file MTDUncalibRecHitAlgo.cc.

Referenced by makeRecHit(), and MTDUncalibRecHitAlgo().

double MTDUncalibRecHitAlgo::BTL_timeError_
private

Definition at line 35 of file MTDUncalibRecHitAlgo.cc.

Referenced by makeRecHit(), and MTDUncalibRecHitAlgo().

double MTDUncalibRecHitAlgo::BTL_toaLSBToNS_
private

Definition at line 35 of file MTDUncalibRecHitAlgo.cc.

Referenced by makeRecHit(), and MTDUncalibRecHitAlgo().

double MTDUncalibRecHitAlgo::ETL_adcLSB_
private

Definition at line 36 of file MTDUncalibRecHitAlgo.cc.

Referenced by makeRecHit(), and MTDUncalibRecHitAlgo().

double MTDUncalibRecHitAlgo::ETL_timeError_
private

Definition at line 36 of file MTDUncalibRecHitAlgo.cc.

Referenced by makeRecHit(), and MTDUncalibRecHitAlgo().

double MTDUncalibRecHitAlgo::ETL_toaLSBToNS_
private

Definition at line 36 of file MTDUncalibRecHitAlgo.cc.

Referenced by makeRecHit(), and MTDUncalibRecHitAlgo().