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 hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () 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::ESInputTag timingCalibrationTag_
 Label to timing calibration tag. More...
 

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

Constructor & Destructor Documentation

◆ CTPPSDiamondRecHitProducer()

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

Definition at line 54 of file CTPPSDiamondRecHitProducer.cc.

56  timingCalibrationTag_(iConfig.getParameter<std::string>("timingCalibrationTag")),
57  applyCalib_(iConfig.getParameter<bool>("applyCalibration")),
58  algo_(iConfig) {
59  produces<edm::DetSetVector<CTPPSDiamondRecHit> >();
60 }

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 86 of file CTPPSDiamondRecHitProducer.cc.

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

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), HLT_2018_cff::InputTag, edm::ParameterDescriptionNode::setComment(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ produce()

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

Definition at line 62 of file CTPPSDiamondRecHitProducer.cc.

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

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

Member Data Documentation

◆ algo_

CTPPSDiamondRecHitProducerAlgorithm CTPPSDiamondRecHitProducer::algo_
private

Definition at line 57 of file CTPPSDiamondRecHitProducer.cc.

Referenced by produce().

◆ applyCalib_

bool CTPPSDiamondRecHitProducer::applyCalib_
private

Definition at line 56 of file CTPPSDiamondRecHitProducer.cc.

Referenced by produce().

◆ calibWatcher_

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

A watcher to detect timing calibration changes.

Definition at line 54 of file CTPPSDiamondRecHitProducer.cc.

Referenced by produce().

◆ digiToken_

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

Definition at line 49 of file CTPPSDiamondRecHitProducer.cc.

Referenced by produce().

◆ timingCalibrationTag_

edm::ESInputTag CTPPSDiamondRecHitProducer::timingCalibrationTag_
private

Label to timing calibration tag.

Definition at line 52 of file CTPPSDiamondRecHitProducer.cc.

Referenced by produce().

edm::ESWatcher::check
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:52
VeryForwardRealGeometryRecord
Event setup record containing the real (actual) geometry information.
Definition: VeryForwardRealGeometryRecord.h:22
edm::DetSetVector
Definition: DetSetVector.h:61
geometry
ESHandle< TrackerGeometry > geometry
Definition: TkLasBeamFitter.cc:200
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
CTPPSDiamondRecHitProducer::calibWatcher_
edm::ESWatcher< PPSTimingCalibrationRcd > calibWatcher_
A watcher to detect timing calibration changes.
Definition: CTPPSDiamondRecHitProducer.cc:54
CTPPSDiamondRecHitProducerAlgorithm::build
void build(const CTPPSGeometry &, const edm::DetSetVector< CTPPSDiamondDigi > &, edm::DetSetVector< CTPPSDiamondRecHit > &)
Definition: CTPPSDiamondRecHitProducerAlgorithm.cc:22
geometry
Definition: geometry.py:1
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
CTPPSDiamondRecHitProducer::digiToken_
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondDigi > > digiToken_
Definition: CTPPSDiamondRecHitProducer.cc:49
edm::Handle
Definition: AssociativeIterator.h:50
CTPPSDiamondRecHitProducer::applyCalib_
bool applyCalib_
Definition: CTPPSDiamondRecHitProducer.cc:56
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
CTPPSDiamondRecHitProducer::timingCalibrationTag_
edm::ESInputTag timingCalibrationTag_
Label to timing calibration tag.
Definition: CTPPSDiamondRecHitProducer.cc:52
edm::ESHandle
Definition: DTSurvey.h:22
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
CTPPSDiamondRecHitProducerAlgorithm::setCalibration
void setCalibration(const PPSTimingCalibration &)
Definition: CTPPSDiamondRecHitProducerAlgorithm.cc:17
iEvent
int iEvent
Definition: GenABIO.cc:224
PPSTimingCalibrationRcd
EventSetup record for TOTEM/PPS timing calibration information.
Definition: PPSTimingCalibrationRcd.h:14
get
#define get
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
CTPPSDiamondRecHitProducer::algo_
CTPPSDiamondRecHitProducerAlgorithm algo_
Definition: CTPPSDiamondRecHitProducer.cc:57
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::ParameterDescriptionNode::setComment
void setComment(std::string const &value)
Definition: ParameterDescriptionNode.cc:106
edm::InputTag
Definition: InputTag.h:15