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
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

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< PPSTimingCalibration, PPSTimingCalibrationRcdtimingCalibrationToken_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Definition at line 35 of file CTPPSDiamondRecHitProducer.cc.

Constructor & Destructor Documentation

◆ CTPPSDiamondRecHitProducer()

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

Definition at line 55 of file CTPPSDiamondRecHitProducer.cc.

57  geometryToken_(esConsumes<CTPPSGeometry, VeryForwardRealGeometryRecord>()),
58  applyCalib_(iConfig.getParameter<bool>("applyCalibration")),
59  algo_(iConfig) {
60  if (applyCalib_) {
61  timingCalibrationToken_ = esConsumes<PPSTimingCalibration, PPSTimingCalibrationRcd>(
62  edm::ESInputTag(iConfig.getParameter<std::string>("timingCalibrationTag")));
63  }
64  produces<edm::DetSetVector<CTPPSDiamondRecHit> >();
65 }

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 89 of file CTPPSDiamondRecHitProducer.cc.

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

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

◆ produce()

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

Definition at line 67 of file CTPPSDiamondRecHitProducer.cc.

67  {
68  auto pOut = std::make_unique<edm::DetSetVector<CTPPSDiamondRecHit> >();
69 
70  // get the digi collection
72  iEvent.getByToken(digiToken_, digis);
73 
74  if (!digis->empty()) {
75  if (applyCalib_ && calibWatcher_.check(iSetup)) {
77  algo_.setCalibration(*hTimingCalib);
78  }
79  // get the geometry
81 
82  // produce the rechits collection
83  algo_.build(*geometry, *digis, *pOut);
84  }
85 
86  iEvent.put(std::move(pOut));
87 }

References algo_, applyCalib_, CTPPSDiamondRecHitProducerAlgorithm::build(), calibWatcher_, edm::ESWatcher< T >::check(), digiToken_, geometryToken_, edm::EventSetup::getHandle(), iEvent, eostools::move(), CTPPSDiamondRecHitProducerAlgorithm::setCalibration(), and timingCalibrationToken_.

Member Data Documentation

◆ algo_

CTPPSDiamondRecHitProducerAlgorithm CTPPSDiamondRecHitProducer::algo_
private

Definition at line 58 of file CTPPSDiamondRecHitProducer.cc.

Referenced by produce().

◆ applyCalib_

bool CTPPSDiamondRecHitProducer::applyCalib_
private

Definition at line 57 of file CTPPSDiamondRecHitProducer.cc.

Referenced by produce().

◆ calibWatcher_

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

A watcher to detect timing calibration changes.

Definition at line 55 of file CTPPSDiamondRecHitProducer.cc.

Referenced by produce().

◆ digiToken_

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

Definition at line 50 of file CTPPSDiamondRecHitProducer.cc.

Referenced by produce().

◆ geometryToken_

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

Definition at line 52 of file CTPPSDiamondRecHitProducer.cc.

Referenced by produce().

◆ timingCalibrationToken_

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

Definition at line 51 of file CTPPSDiamondRecHitProducer.cc.

Referenced by produce().

edm::ESWatcher::check
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:52
edm::DetSetVector
Definition: DetSetVector.h:61
edm::ESInputTag
Definition: ESInputTag.h:87
CTPPSDiamondRecHitProducer::calibWatcher_
edm::ESWatcher< PPSTimingCalibrationRcd > calibWatcher_
A watcher to detect timing calibration changes.
Definition: CTPPSDiamondRecHitProducer.cc:55
CTPPSDiamondRecHitProducerAlgorithm::build
void build(const CTPPSGeometry &, const edm::DetSetVector< CTPPSDiamondDigi > &, edm::DetSetVector< CTPPSDiamondRecHit > &)
Definition: CTPPSDiamondRecHitProducerAlgorithm.cc:24
geometry
Definition: geometry.py:1
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89287
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
CTPPSDiamondRecHitProducer::digiToken_
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondDigi > > digiToken_
Definition: CTPPSDiamondRecHitProducer.cc:50
edm::Handle
Definition: AssociativeIterator.h:50
CTPPSDiamondRecHitProducer::applyCalib_
bool applyCalib_
Definition: CTPPSDiamondRecHitProducer.cc:57
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
edm::ESHandle
Definition: DTSurvey.h:22
CTPPSDiamondRecHitProducer::geometryToken_
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecord > geometryToken_
Definition: CTPPSDiamondRecHitProducer.cc:52
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CTPPSDiamondRecHitProducerAlgorithm::setCalibration
void setCalibration(const PPSTimingCalibration &)
Definition: CTPPSDiamondRecHitProducerAlgorithm.cc:19
CTPPSDiamondRecHitProducer::timingCalibrationToken_
edm::ESGetToken< PPSTimingCalibration, PPSTimingCalibrationRcd > timingCalibrationToken_
Definition: CTPPSDiamondRecHitProducer.cc:51
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:148
CTPPSDiamondRecHitProducer::algo_
CTPPSDiamondRecHitProducerAlgorithm algo_
Definition: CTPPSDiamondRecHitProducer.cc:58
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::InputTag
Definition: InputTag.h:15