CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
RPCRecHitValidClient Class Reference

#include <RPCRecHitValidClient.h>

Inheritance diagram for RPCRecHitValidClient:
DQMEDHarvester edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void dqmEndJob (DQMStore::IBooker &booker, DQMStore::IGetter &getter) override
 
 RPCRecHitValidClient (const edm::ParameterSet &pset)
 
 ~RPCRecHitValidClient () override
 
- Public Member Functions inherited from DQMEDHarvester
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginJob () override
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &) override
 
virtual void dqmAnalyze (DQMStore::IBooker &, DQMStore::IGetter &, edm::Event const &, edm::EventSetup const &)
 
 DQMEDHarvester (edm::ParameterSet const &iConfig)
 
 DQMEDHarvester ()
 
virtual void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmEndRun (DQMStore::IBooker &, DQMStore::IGetter &, edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &es) final
 
void endProcessBlockProduce (edm::ProcessBlock &) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &es) final
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
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
 
bool wantsGlobalLuminosityBlocks () const noexcept final
 
bool wantsGlobalRuns () const noexcept final
 
bool wantsInputProcessBlocks () const noexcept final
 
bool wantsProcessBlocks () const noexcept final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const noexcept
 
bool wantsStreamRuns () const noexcept
 
 ~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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

std::string subDir_
 

Additional Inherited Members

- Public Types inherited from DQMEDHarvester
typedef dqm::harvesting::DQMStore DQMStore
 
typedef dqm::harvesting::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
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
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
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)
 
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 ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
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< Bconsumes (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 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 ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
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 DQMEDHarvester
DQMStoredqmstore_
 
edm::GetterOfProducts< DQMTokenjobmegetter_
 
edm::EDPutTokenT< DQMTokenjobToken_
 
edm::GetterOfProducts< DQMTokenlumimegetter_
 
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::GetterOfProducts< DQMTokenrunmegetter_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 17 of file RPCRecHitValidClient.h.

Constructor & Destructor Documentation

◆ RPCRecHitValidClient()

RPCRecHitValidClient::RPCRecHitValidClient ( const edm::ParameterSet pset)

◆ ~RPCRecHitValidClient()

RPCRecHitValidClient::~RPCRecHitValidClient ( )
inlineoverride

Definition at line 20 of file RPCRecHitValidClient.h.

20 {};

Member Function Documentation

◆ dqmEndJob()

void RPCRecHitValidClient::dqmEndJob ( DQMStore::IBooker booker,
DQMStore::IGetter getter 
)
overridevirtual

Implements DQMEDHarvester.

Definition at line 16 of file RPCRecHitValidClient.cc.

References custom_jme_cff::area, newFWLiteAna::bin, dqm::implementation::IBooker::book1D(), MillePedeFileConverter_cfg::e, dqm::impl::MonitorElement::Fill(), dqm::implementation::IGetter::get(), dqm::impl::MonitorElement::getTH1(), SiStripPI::min, PFElectronDQMAnalyzer_cfi::nBin, nEvent, fftjetproducer_cfi::noiseLevel, and dqm::implementation::NavigatorBase::setCurrentFolder().

16  {
17  booker.setCurrentFolder(subDir_);
18  MEP me_rollEfficiencyBarrel_eff =
19  booker.book1D("RollEfficiencyBarrel_eff", "Roll efficiency in Barrel;Efficiency [%]", 50 + 2, -2, 100 + 2);
20  MEP me_rollEfficiencyEndcap_eff =
21  booker.book1D("RollEfficiencyEndcap_eff", "Roll efficiency in Endcap;Efficiency [%]", 50 + 2, -2, 100 + 2);
22  MEP me_rollEfficiencyStatCutOffBarrel_eff =
23  booker.book1D("RollEfficiencyCutOffBarrel_eff",
24  "Roll efficiency in Barrel without low stat chamber;Efficiency [%]",
25  50 + 2,
26  -2,
27  100 + 2);
28  MEP me_rollEfficiencyStatCutOffEndcap_eff =
29  booker.book1D("RollEfficiencyCutOffEndcap_eff",
30  "Roll efficiency in Endcap without low stat chamber;Efficiency [%]",
31  50 + 2,
32  -2,
33  100 + 2);
34 
35  const double maxNoise = 1e-7;
36  MEP me_rollNoiseBarrel_noise = booker.book1D("RollNoiseBarrel_noise",
37  "Roll noise in Barrel;Noise level [Event^{-1}cm^{-2}]",
38  25 + 2,
39  -maxNoise / 25,
40  maxNoise + maxNoise / 25);
41  MEP me_rollNoiseEndcap_noise = booker.book1D("RollNoiseEndcap_noise",
42  "Roll noise in Endcap;Noise level [Event^{-1}cm^{-2}]",
43  25 + 2,
44  -maxNoise / 25,
45  maxNoise + maxNoise / 25);
46 
47  MEP me_matchOccupancyBarrel_detId = getter.get(subDir_ + "/Occupancy/MatchOccupancyBarrel_detId");
48  MEP me_matchOccupancyEndcap_detId = getter.get(subDir_ + "/Occupancy/MatchOccupancyEndcap_detId");
49  MEP me_refOccupancyBarrel_detId = getter.get(subDir_ + "/Occupancy/RefOccupancyBarrel_detId");
50  MEP me_refOccupancyEndcap_detId = getter.get(subDir_ + "/Occupancy/RefOccupancyEndcap_detId");
51 
52  if (me_matchOccupancyBarrel_detId and me_refOccupancyBarrel_detId) {
53  TH1 *h_matchOccupancyBarrel_detId = me_matchOccupancyBarrel_detId->getTH1();
54  TH1 *h_refOccupancyBarrel_detId = me_refOccupancyBarrel_detId->getTH1();
55 
56  for (int bin = 1, nBin = h_matchOccupancyBarrel_detId->GetNbinsX(); bin <= nBin; ++bin) {
57  const double nRec = h_matchOccupancyBarrel_detId->GetBinContent(bin);
58  const double nRef = h_refOccupancyBarrel_detId->GetBinContent(bin);
59 
60  const double eff = nRef ? nRec / nRef * 100 : -1;
61 
62  me_rollEfficiencyBarrel_eff->Fill(eff);
63  if (nRef >= 20)
64  me_rollEfficiencyStatCutOffBarrel_eff->Fill(eff);
65  }
66  }
67 
68  if (me_matchOccupancyEndcap_detId and me_refOccupancyEndcap_detId) {
69  TH1 *h_matchOccupancyEndcap_detId = me_matchOccupancyEndcap_detId->getTH1();
70  TH1 *h_refOccupancyEndcap_detId = me_refOccupancyEndcap_detId->getTH1();
71 
72  for (int bin = 1, nBin = h_matchOccupancyEndcap_detId->GetNbinsX(); bin <= nBin; ++bin) {
73  const double nRec = h_matchOccupancyEndcap_detId->GetBinContent(bin);
74  const double nRef = h_refOccupancyEndcap_detId->GetBinContent(bin);
75 
76  const double eff = nRef ? nRec / nRef * 100 : -1;
77 
78  me_rollEfficiencyEndcap_eff->Fill(eff);
79  if (nRef >= 20)
80  me_rollEfficiencyStatCutOffEndcap_eff->Fill(eff);
81  }
82  }
83 
84  MEP me_eventCount = getter.get(subDir_ + "/Occupancy/EventCount");
85  const double nEvent = me_eventCount ? me_eventCount->getTH1()->GetBinContent(1) : 1;
86  MEP me_noiseOccupancyBarrel_detId = getter.get(subDir_ + "/Occupancy/NoiseOccupancyBarrel_detId");
87  MEP me_rollAreaBarrel_detId = getter.get(subDir_ + "/Occupancy/RollAreaBarrel_detId");
88  if (me_noiseOccupancyBarrel_detId and me_rollAreaBarrel_detId) {
89  TH1 *h_noiseOccupancyBarrel_detId = me_noiseOccupancyBarrel_detId->getTH1();
90  TH1 *h_rollAreaBarrel_detId = me_rollAreaBarrel_detId->getTH1();
91 
92  for (int bin = 1, nBin = h_noiseOccupancyBarrel_detId->GetNbinsX(); bin <= nBin; ++bin) {
93  const double noiseCount = h_noiseOccupancyBarrel_detId->GetBinContent(bin);
94  const double area = h_rollAreaBarrel_detId->GetBinContent(bin);
95  const double noiseLevel = area > 0 ? noiseCount / area / nEvent : 0;
96  if (noiseLevel == 0.)
97  me_rollNoiseBarrel_noise->Fill(-maxNoise / 50); // Fill underflow bin if noise is exactly zero
98  else
99  me_rollNoiseBarrel_noise->Fill(std::min(noiseLevel, maxNoise));
100  }
101  }
102 
103  MEP me_noiseOccupancyEndcap_detId = getter.get(subDir_ + "/Occupancy/NoiseOccupancyEndcap_detId");
104  MEP me_rollAreaEndcap_detId = getter.get(subDir_ + "/Occupancy/RollAreaEndcap_detId");
105  if (me_noiseOccupancyEndcap_detId and me_rollAreaEndcap_detId) {
106  TH1 *h_noiseOccupancyEndcap_detId = me_noiseOccupancyEndcap_detId->getTH1();
107  TH1 *h_rollAreaEndcap_detId = me_rollAreaEndcap_detId->getTH1();
108 
109  for (int bin = 1, nBin = h_noiseOccupancyEndcap_detId->GetNbinsX(); bin <= nBin; ++bin) {
110  const double noiseCount = h_noiseOccupancyEndcap_detId->GetBinContent(bin);
111  const double area = h_rollAreaEndcap_detId->GetBinContent(bin);
112  const double noiseLevel = area > 0 ? noiseCount / area / nEvent : 0;
113  if (noiseLevel == 0)
114  me_rollNoiseEndcap_noise->Fill(-maxNoise / 50); // Fill underflow bin if noise if exactly zero
115  else
116  me_rollNoiseEndcap_noise->Fill(std::min(noiseLevel, maxNoise));
117  }
118  }
119 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
int nEvent
Definition: myFastSimVal.cc:44
void Fill(long long x)
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:712
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98

Member Data Documentation

◆ subDir_

std::string RPCRecHitValidClient::subDir_
private

Definition at line 25 of file RPCRecHitValidClient.h.