CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
PPSTimingCalibrationPCLWorker Class Reference
Inheritance diagram for PPSTimingCalibrationPCLWorker:
DQMGlobalEDAnalyzer< TimingCalibrationHistograms > DQMGlobalEDAnalyzerBase< TimingCalibrationHistograms, Args... > edm::global::EDProducer< edm::RunCache< TimingCalibrationHistograms >, edm::EndRunProducer, edm::Accumulator, Args... > edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void dqmAnalyze (const edm::Event &, const edm::EventSetup &, const TimingCalibrationHistograms &) const override
 
 PPSTimingCalibrationPCLWorker (const edm::ParameterSet &)
 
- Public Member Functions inherited from DQMGlobalEDAnalyzer< TimingCalibrationHistograms >
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &, TimingCalibrationHistograms const &) const
 
void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup) const final
 
- Public Member Functions inherited from DQMGlobalEDAnalyzerBase< TimingCalibrationHistograms, Args... >
void accumulate (edm::StreamID id, edm::Event const &event, edm::EventSetup const &setup) const final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &, TimingCalibrationHistograms &) const
 
 DQMGlobalEDAnalyzerBase ()
 
std::shared_ptr< TimingCalibrationHistogramsglobalBeginRun (edm::Run const &run, edm::EventSetup const &setup) const final
 
void globalEndRun (edm::Run const &, edm::EventSetup const &) const final
 
- Public Member Functions inherited from edm::global::EDProducer< edm::RunCache< TimingCalibrationHistograms >, edm::EndRunProducer, edm::Accumulator, Args... >
 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
 
EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &)
 
- Static Public Member Functions inherited from edm::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

void bookHistograms (DQMStore::IBooker &, const edm::Run &, const edm::EventSetup &, TimingCalibrationHistograms &) const override
 

Private Attributes

edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondRecHit > > diamondRecHitToken_
 
const std::string dqmDir_
 
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecordgeomEsToken_
 

Additional Inherited Members

- Public Types inherited from DQMGlobalEDAnalyzerBase< TimingCalibrationHistograms, Args... >
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from DQMGlobalEDAnalyzerBase< TimingCalibrationHistograms, Args... >
uint64_t meId (edm::Run const &run) const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
- Protected Attributes inherited from DQMGlobalEDAnalyzerBase< TimingCalibrationHistograms, Args... >
DQMStoredqmstore_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 30 of file PPSTimingCalibrationPCLWorker.cc.

Constructor & Destructor Documentation

◆ PPSTimingCalibrationPCLWorker()

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

Definition at line 52 of file PPSTimingCalibrationPCLWorker.cc.

55  geomEsToken_(esConsumes<edm::Transition::BeginRun>()),
56  dqmDir_(iConfig.getParameter<std::string>("dqmDir")) {}

Member Function Documentation

◆ bookHistograms()

void PPSTimingCalibrationPCLWorker::bookHistograms ( DQMStore::IBooker iBooker,
const edm::Run iRun,
const edm::EventSetup iSetup,
TimingCalibrationHistograms iHists 
) const
overrideprivatevirtual

Implements DQMGlobalEDAnalyzerBase< TimingCalibrationHistograms, Args... >.

Definition at line 60 of file PPSTimingCalibrationPCLWorker.cc.

63  {
64  iBooker.cd();
65  iBooker.setCurrentFolder(dqmDir_);
66  std::string ch_name;
67 
68  const auto& geom = iSetup.getData(geomEsToken_);
69  for (auto it = geom.beginSensor(); it != geom.endSensor(); ++it) {
70  if (!CTPPSDiamondDetId::check(it->first))
71  continue;
72  const CTPPSDiamondDetId detid(it->first);
73  if (detid.station() != 1)
74  continue;
75  detid.channelName(ch_name);
76  iHists.leadingTime[detid.rawId()] = iBooker.book1D("t_" + ch_name, ch_name + ";t (ns);Entries", 1200, -60., 60.);
77  iHists.toT[detid.rawId()] = iBooker.book1D("tot_" + ch_name, ch_name + ";ToT (ns);Entries", 100, -20., 20.);
78  iHists.leadingTimeVsToT[detid.rawId()] =
79  iBooker.book2D("tvstot_" + ch_name, ch_name + ";ToT (ns);t (ns)", 240, 0., 60., 450, -20., 25.);
80  }
81 }

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), dqm::implementation::NavigatorBase::cd(), CTPPSDiamondDetId::channelName(), CTPPSDiamondDetId::check(), dqmDir_, relativeConstraints::geom, geomEsToken_, edm::EventSetup::getData(), TimingCalibrationHistograms::leadingTime, TimingCalibrationHistograms::leadingTimeVsToT, DetId::rawId(), dqm::implementation::NavigatorBase::setCurrentFolder(), CTPPSDetId::station(), AlCaHLTBitMon_QueryRunRegistry::string, and TimingCalibrationHistograms::toT.

◆ dqmAnalyze()

void PPSTimingCalibrationPCLWorker::dqmAnalyze ( const edm::Event iEvent,
const edm::EventSetup iSetup,
const TimingCalibrationHistograms iHists 
) const
overridevirtual

Implements DQMGlobalEDAnalyzerBase< TimingCalibrationHistograms, Args... >.

Definition at line 85 of file PPSTimingCalibrationPCLWorker.cc.

87  {
88  // then extract the rechits information for later processing
90  iEvent.getByToken(diamondRecHitToken_, dsv_rechits);
91  // ensure timing detectors rechits are found in the event content
92  if (dsv_rechits->empty()) {
93  edm::LogWarning("PPSTimingCalibrationPCLWorker:dqmAnalyze") << "No rechits retrieved from the event content.";
94  return;
95  }
96  for (const auto& ds_rechits : *dsv_rechits) {
97  const CTPPSDiamondDetId detid(ds_rechits.detId());
98  if (iHists.leadingTimeVsToT.count(detid.rawId()) == 0) {
99  edm::LogWarning("PPSTimingCalibrationPCLWorker:dqmAnalyze")
100  << "Pad with detId=" << detid << " is not set to be monitored.";
101  continue;
102  }
103  for (const auto& rechit : ds_rechits) {
104  // skip invalid rechits
105  if (rechit.time() == 0. || rechit.toT() < 0.)
106  continue;
107  iHists.leadingTime.at(detid.rawId())->Fill(rechit.time());
108  iHists.toT.at(detid.rawId())->Fill(rechit.toT());
109  iHists.leadingTimeVsToT.at(detid.rawId())->Fill(rechit.toT(), rechit.time());
110  }
111  }
112 }

References diamondRecHitToken_, HcalObjRepresent::Fill(), iEvent, TimingCalibrationHistograms::leadingTime, TimingCalibrationHistograms::leadingTimeVsToT, and TimingCalibrationHistograms::toT.

◆ fillDescriptions()

void PPSTimingCalibrationPCLWorker::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 116 of file PPSTimingCalibrationPCLWorker.cc.

116  {
118  desc.add<edm::InputTag>("diamondRecHitTag", edm::InputTag("ctppsDiamondUncalibRecHits"))
119  ->setComment("input tag for the PPS diamond detectors rechits");
120  desc.add<std::string>("dqmDir", "AlCaReco/PPSTimingCalibrationPCL")
121  ->setComment("output path for the various DQM plots");
122 
123  descriptions.addWithDefaultLabel(desc);
124 }

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

Member Data Documentation

◆ diamondRecHitToken_

edm::EDGetTokenT<edm::DetSetVector<CTPPSDiamondRecHit> > PPSTimingCalibrationPCLWorker::diamondRecHitToken_
private

Definition at line 51 of file PPSTimingCalibrationPCLWorker.cc.

Referenced by dqmAnalyze().

◆ dqmDir_

const std::string PPSTimingCalibrationPCLWorker::dqmDir_
private

Definition at line 54 of file PPSTimingCalibrationPCLWorker.cc.

Referenced by bookHistograms().

◆ geomEsToken_

edm::ESGetToken<CTPPSGeometry, VeryForwardRealGeometryRecord> PPSTimingCalibrationPCLWorker::geomEsToken_
private

Definition at line 52 of file PPSTimingCalibrationPCLWorker.cc.

Referenced by bookHistograms().

edm::DetSetVector
Definition: DetSetVector.h:61
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
edm::Handle
Definition: AssociativeIterator.h:50
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
dqm::implementation::NavigatorBase::cd
virtual void cd()
Definition: DQMStore.cc:29
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
PPSTimingCalibrationPCLWorker::diamondRecHitToken_
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondRecHit > > diamondRecHitToken_
Definition: PPSTimingCalibrationPCLWorker.cc:51
PPSTimingCalibrationPCLWorker::dqmDir_
const std::string dqmDir_
Definition: PPSTimingCalibrationPCLWorker.cc:54
CTPPSDiamondDetId
Detector ID class for CTPPS Timing Diamond detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bit...
Definition: CTPPSDiamondDetId.h:24
TimingCalibrationHistograms::toT
MonitorMap toT
Definition: TimingCalibrationStruct.h:13
iEvent
int iEvent
Definition: GenABIO.cc:224
CTPPSDiamondDetId::check
static bool check(unsigned int raw)
returns true if the raw ID is a PPS-timing one
Definition: CTPPSDiamondDetId.h:40
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HcalObjRepresent::Fill
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
Definition: HcalObjRepresent.h:1053
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
TimingCalibrationHistograms::leadingTime
MonitorMap leadingTime
Definition: TimingCalibrationStruct.h:13
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
PPSTimingCalibrationPCLWorker::geomEsToken_
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecord > geomEsToken_
Definition: PPSTimingCalibrationPCLWorker.cc:52
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDConsumerBase::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: EDConsumerBase.h:159
edm::InputTag
Definition: InputTag.h:15
edm::ConfigurationDescriptions::addWithDefaultLabel
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:87
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
TimingCalibrationHistograms::leadingTimeVsToT
MonitorMap leadingTimeVsToT
Definition: TimingCalibrationStruct.h:14