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 93 of file CTPPSDiamondRecHitProducer.cc.

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

93  {
95 
96  desc.add<edm::InputTag>("digiTag", edm::InputTag("ctppsDiamondRawToDigi", "TimingDiamond"))
97  ->setComment("input digis collection to retrieve");
98  desc.add<std::string>("timingCalibrationTag", "GlobalTag:PPSDiamondTimingCalibration")
99  ->setComment("input tag for timing calibrations retrieval");
100  desc.add<double>("timeSliceNs", 25.0 / 1024.0)
101  ->setComment("conversion constant between HPTDC timing bin size and nanoseconds");
102  desc.add<bool>("applyCalibration", true)->setComment("switch on/off the timing calibration");
103 
104  descr.add("ctppsDiamondRecHits", desc);
105 }
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::getHandle(), iEvent, eostools::move(), CTPPSDiamondRecHitProducerAlgorithm::setCalibration(), timingCalibrationLUTToken_, and timingCalibrationToken_.

70  {
71  auto pOut = std::make_unique<edm::DetSetVector<CTPPSDiamondRecHit> >();
72 
73  // get the digi collection
75  iEvent.getByToken(digiToken_, digis);
76 
77  if (!digis->empty()) {
78  if (applyCalib_ && calibWatcher_.check(iSetup)) {
81  algo_.setCalibration(*hTimingCalib, *hTimingCalibLUT);
82  }
83  // get the geometry
85 
86  // produce the rechits collection
87  algo_.build(*geometry, *digis, *pOut);
88  }
89 
90  iEvent.put(std::move(pOut));
91 }
void build(const CTPPSGeometry &, const edm::DetSetVector< CTPPSDiamondDigi > &, edm::DetSetVector< CTPPSDiamondRecHit > &)
edm::ESGetToken< PPSTimingCalibration, PPSTimingCalibrationRcd > timingCalibrationToken_
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondDigi > > digiToken_
void setCalibration(const PPSTimingCalibration &, const PPSTimingCalibrationLUT &)
int iEvent
Definition: GenABIO.cc:224
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
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().