CMS 3D CMS Logo

ETLUncalibRecHitAlgo.cc
Go to the documentation of this file.
3 
5 public:
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")) {}
15 
17  ~ETLUncalibRecHitAlgo() override {}
18 
20  void getEvent(const edm::Event&) final {}
21  void getEventSetup(const edm::EventSetup&) final {}
22 
24  FTLUncalibratedRecHit makeRecHit(const ETLDataFrame& dataFrame) const final;
25 
26 private:
27  const uint32_t adcNBits_;
28  const double adcSaturation_;
29  const double adcLSB_;
30  const double toaLSBToNS_;
31  const double tofDelay_;
32  const double timeError_;
33 };
34 
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 }
52 
ETLUncalibRecHitAlgo::makeRecHit
FTLUncalibratedRecHit makeRecHit(const ETLDataFrame &dataFrame) const final
make the rec hit
Definition: ETLUncalibRecHitAlgo.cc:35
FTLDataFrameT::id
const D & id() const
det id
Definition: FTLDataFrameT.h:31
CustomPhysics_cfi.amplitude
amplitude
Definition: CustomPhysics_cfi.py:12
MessageLogger.h
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
ETLUncalibRecHitAlgo
Definition: ETLUncalibRecHitAlgo.cc:4
MTDUncalibratedRecHitAlgoBase
Definition: MTDUncalibratedRecHitAlgoBase.h:16
MakerMacros.h
ETLUncalibRecHitAlgo::~ETLUncalibRecHitAlgo
~ETLUncalibRecHitAlgo() override
Destructor.
Definition: ETLUncalibRecHitAlgo.cc:17
ETLUncalibRecHitAlgo::tofDelay_
const double tofDelay_
Definition: ETLUncalibRecHitAlgo.cc:31
MTDUncalibratedRecHitAlgoBase.h
FTLDataFrameT::sample
const S & sample(int i) const
Definition: FTLDataFrameT.h:57
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition: PluginFactory.h:124
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
edm::ParameterSet
Definition: ParameterSet.h:36
ETLUncalibRecHitAlgo::ETLUncalibRecHitAlgo
ETLUncalibRecHitAlgo(const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
Constructor.
Definition: ETLUncalibRecHitAlgo.cc:7
edmplugin::PluginFactory
Definition: PluginFactory.h:34
ETLUncalibRecHitAlgo::timeError_
const double timeError_
Definition: ETLUncalibRecHitAlgo.cc:32
edm::EventSetup
Definition: EventSetup.h:57
ETLUncalibRecHitAlgo::toaLSBToNS_
const double toaLSBToNS_
Definition: ETLUncalibRecHitAlgo.cc:30
FTLDataFrameT
Readout digi for HGC.
Definition: FTLDataFrameT.h:14
ETLUncalibRecHitAlgo::getEvent
void getEvent(const edm::Event &) final
get event and eventsetup information
Definition: ETLUncalibRecHitAlgo.cc:20
FTLDataFrameT::row
const int row() const
row
Definition: FTLDataFrameT.h:36
FTLUncalibratedRecHit
Definition: FTLUncalibratedRecHit.h:7
ntuplemaker.time
time
Definition: ntuplemaker.py:310
ETLUncalibRecHitAlgo::getEventSetup
void getEventSetup(const edm::EventSetup &) final
Definition: ETLUncalibRecHitAlgo.cc:21
edm::Event
Definition: Event.h:73
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116