CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
CTPPSDiamondRecHitProducer Class Reference
Inheritance diagram for CTPPSDiamondRecHitProducer:
edm::stream::EDProducer<>

Public Member Functions

 CTPPSDiamondRecHitProducer (const edm::ParameterSet &)
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &)
 

Private Member Functions

void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

CTPPSDiamondRecHitProducerAlgorithm algo_
 
bool applyCalib_
 
edm::ESWatcher< PPSTimingCalibrationRcdcalibWatcher_
 A watcher to detect timing calibration changes. More...
 
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondDigi > > digiToken_
 
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecordgeometryToken_
 
edm::ESGetToken< PPSTimingCalibrationLUT, PPSTimingCalibrationLUTRcdtimingCalibrationLUTToken_
 
edm::ESGetToken< PPSTimingCalibration, PPSTimingCalibrationRcdtimingCalibrationToken_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Definition at line 36 of file CTPPSDiamondRecHitProducer.cc.

Constructor & Destructor Documentation

◆ CTPPSDiamondRecHitProducer()

CTPPSDiamondRecHitProducer::CTPPSDiamondRecHitProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 57 of file CTPPSDiamondRecHitProducer.cc.

References applyCalib_, edm::ParameterSet::getParameter(), AlCaHLTBitMon_QueryRunRegistry::string, timingCalibrationLUTToken_, and timingCalibrationToken_.

59  geometryToken_(esConsumes<CTPPSGeometry, VeryForwardRealGeometryRecord>()),
60  applyCalib_(iConfig.getParameter<bool>("applyCalibration")),
61  algo_(iConfig) {
62  if (applyCalib_) {
63  timingCalibrationToken_ = esConsumes<PPSTimingCalibration, PPSTimingCalibrationRcd>(
64  edm::ESInputTag(iConfig.getParameter<std::string>("timingCalibrationTag")));
65  timingCalibrationLUTToken_ = esConsumes<PPSTimingCalibrationLUT, PPSTimingCalibrationLUTRcd>();
66  }
67  produces<edm::DetSetVector<CTPPSDiamondRecHit> >();
68 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::ESGetToken< PPSTimingCalibration, PPSTimingCalibrationRcd > timingCalibrationToken_
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondDigi > > digiToken_
edm::ESGetToken< PPSTimingCalibrationLUT, PPSTimingCalibrationLUTRcd > timingCalibrationLUTToken_
CTPPSDiamondRecHitProducerAlgorithm algo_
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecord > geometryToken_

Member Function Documentation

◆ fillDescriptions()

void CTPPSDiamondRecHitProducer::fillDescriptions ( edm::ConfigurationDescriptions descr)
static

Definition at line 87 of file CTPPSDiamondRecHitProducer.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, HLT_2022v14_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

87  {
89 
90  desc.add<edm::InputTag>("digiTag", edm::InputTag("ctppsDiamondRawToDigi", "TimingDiamond"))
91  ->setComment("input digis collection to retrieve");
92  desc.add<std::string>("timingCalibrationTag", "GlobalTag:PPSDiamondTimingCalibration")
93  ->setComment("input tag for timing calibrations retrieval");
94  desc.add<double>("timeSliceNs", 25.0 / 1024.0)
95  ->setComment("conversion constant between HPTDC timing bin size and nanoseconds");
96  desc.add<bool>("applyCalibration", true)->setComment("switch on/off the timing calibration");
97 
98  descr.add("ctppsDiamondRecHits", desc);
99 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ produce()

void CTPPSDiamondRecHitProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 70 of file CTPPSDiamondRecHitProducer.cc.

References algo_, applyCalib_, CTPPSDiamondRecHitProducerAlgorithm::build(), calibWatcher_, edm::ESWatcher< T >::check(), digiToken_, geometryToken_, edm::EventSetup::getData(), iEvent, eostools::move(), TimingRecHitProducerAlgorithm< G, D, R >::setCalibration(), timingCalibrationLUTToken_, and timingCalibrationToken_.

70  {
71  auto pOut = std::make_unique<edm::DetSetVector<CTPPSDiamondRecHit> >();
72 
73  // get the digi collection
74  const auto& digis = iEvent.get(digiToken_);
75 
76  if (!digis.empty()) {
77  if (applyCalib_ && calibWatcher_.check(iSetup))
79 
80  // produce the rechits collection
81  algo_.build(iSetup.getData(geometryToken_), digis, *pOut);
82  }
83 
84  iEvent.put(std::move(pOut));
85 }
void build(const CTPPSGeometry &, const edm::DetSetVector< CTPPSDiamondDigi > &, edm::DetSetVector< CTPPSDiamondRecHit > &) override
edm::ESGetToken< PPSTimingCalibration, PPSTimingCalibrationRcd > timingCalibrationToken_
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondDigi > > digiToken_
int iEvent
Definition: GenABIO.cc:224
bool getData(T &iHolder) const
Definition: EventSetup.h:122
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
void setCalibration(const PPSTimingCalibration &calib, const PPSTimingCalibrationLUT &calibLUT)
edm::ESGetToken< PPSTimingCalibrationLUT, PPSTimingCalibrationLUTRcd > timingCalibrationLUTToken_
CTPPSDiamondRecHitProducerAlgorithm algo_
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecord > geometryToken_
edm::ESWatcher< PPSTimingCalibrationRcd > calibWatcher_
A watcher to detect timing calibration changes.
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ algo_

CTPPSDiamondRecHitProducerAlgorithm CTPPSDiamondRecHitProducer::algo_
private

Definition at line 54 of file CTPPSDiamondRecHitProducer.cc.

Referenced by produce().

◆ applyCalib_

bool CTPPSDiamondRecHitProducer::applyCalib_
private

Definition at line 53 of file CTPPSDiamondRecHitProducer.cc.

Referenced by CTPPSDiamondRecHitProducer(), and produce().

◆ calibWatcher_

edm::ESWatcher<PPSTimingCalibrationRcd> CTPPSDiamondRecHitProducer::calibWatcher_
private

A watcher to detect timing calibration changes.

Definition at line 51 of file CTPPSDiamondRecHitProducer.cc.

Referenced by produce().

◆ digiToken_

edm::EDGetTokenT<edm::DetSetVector<CTPPSDiamondDigi> > CTPPSDiamondRecHitProducer::digiToken_
private

Definition at line 45 of file CTPPSDiamondRecHitProducer.cc.

Referenced by produce().

◆ geometryToken_

edm::ESGetToken<CTPPSGeometry, VeryForwardRealGeometryRecord> CTPPSDiamondRecHitProducer::geometryToken_
private

Definition at line 48 of file CTPPSDiamondRecHitProducer.cc.

Referenced by produce().

◆ timingCalibrationLUTToken_

edm::ESGetToken<PPSTimingCalibrationLUT, PPSTimingCalibrationLUTRcd> CTPPSDiamondRecHitProducer::timingCalibrationLUTToken_
private

Definition at line 47 of file CTPPSDiamondRecHitProducer.cc.

Referenced by CTPPSDiamondRecHitProducer(), and produce().

◆ timingCalibrationToken_

edm::ESGetToken<PPSTimingCalibration, PPSTimingCalibrationRcd> CTPPSDiamondRecHitProducer::timingCalibrationToken_
private

Definition at line 46 of file CTPPSDiamondRecHitProducer.cc.

Referenced by CTPPSDiamondRecHitProducer(), and produce().