CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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< T > 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 &, TimingCalibrationHistogramsconst &) 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
< TimingCalibrationHistograms
globalBeginRun (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< T >
 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
 
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)
 
 ~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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
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,
VeryForwardRealGeometryRecord
geomEsToken_
 

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
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
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<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
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...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 
- 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 ( 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")) {}
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondRecHit > > diamondRecHitToken_
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecord > geomEsToken_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303

Member Function Documentation

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.

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.

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 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
bool getData(T &iHolder) const
Definition: EventSetup.h:128
static bool check(unsigned int raw)
returns true if the raw ID is a PPS-timing one
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecord > geomEsToken_
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
Detector ID class for CTPPS Timing Diamond detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bit...
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
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.

References diamondRecHitToken_, HcalObjRepresent::Fill(), edm::Event::getByToken(), TimingCalibrationHistograms::leadingTime, TimingCalibrationHistograms::leadingTimeVsToT, and TimingCalibrationHistograms::toT.

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 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondRecHit > > diamondRecHitToken_
Detector ID class for CTPPS Timing Diamond detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bit...
Log< level::Warning, false > LogWarning
void PPSTimingCalibrationPCLWorker::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 116 of file PPSTimingCalibrationPCLWorker.cc.

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

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 }
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
ParameterDescriptionBase * add(U const &iLabel, T const &value)

Member Data Documentation

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

Definition at line 44 of file PPSTimingCalibrationPCLWorker.cc.

Referenced by dqmAnalyze().

const std::string PPSTimingCalibrationPCLWorker::dqmDir_
private

Definition at line 47 of file PPSTimingCalibrationPCLWorker.cc.

Referenced by bookHistograms().

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

Definition at line 45 of file PPSTimingCalibrationPCLWorker.cc.

Referenced by bookHistograms().