CMS 3D CMS Logo

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

#include <MuonGEMRecHitsHarvestor.h>

Inheritance diagram for MuonGEMRecHitsHarvestor:
MuonGEMBaseHarvestor 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 &, DQMStore::IGetter &) override
 
 MuonGEMRecHitsHarvestor (const edm::ParameterSet &)
 
 ~MuonGEMRecHitsHarvestor () override
 
- Public Member Functions inherited from MuonGEMBaseHarvestor
 MuonGEMBaseHarvestor (const edm::ParameterSet &, std::string)
 
- 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 final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () 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 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)
 

Private Attributes

Bool_t detail_plot_
 
std::vector< Int_t > layer_ids_
 
std::vector< Int_t > region_ids_
 
std::vector< Int_t > station_ids_
 

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 MuonGEMBaseHarvestor
void bookEff1D (DQMStore::IBooker &ibooker, DQMStore::IGetter &getter, const TString &passed_path, const TString &total_path, const TString &folder, const TString &eff_name, const TString &eff_title="Efficiency")
 
void bookEff2D (DQMStore::IBooker &ibooker, DQMStore::IGetter &getter, const TString &passed_path, const TString &total_path, const TString &folder, const TString &eff_name, const TString &eff_title="Efficiency")
 
TProfile * computeEfficiency (const TH1F &passed, const TH1F &total, const char *name, const char *title, Double_t confidence_level=0.683)
 
TH2F * computeEfficiency (const TH2F &passed, const TH2F &total, const char *name, const char *title)
 
template<typename T >
TgetElement (DQMStore::IGetter &getter, const TString &path)
 
- 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 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 ()
 
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 MuonGEMBaseHarvestor
const std::string kLogCategory_
 
- 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 6 of file MuonGEMRecHitsHarvestor.h.

Constructor & Destructor Documentation

◆ MuonGEMRecHitsHarvestor()

MuonGEMRecHitsHarvestor::MuonGEMRecHitsHarvestor ( const edm::ParameterSet pset)
explicit

Definition at line 6 of file MuonGEMRecHitsHarvestor.cc.

References detail_plot_, layer_ids_, muonDTDigis_cfi::pset, region_ids_, and station_ids_.

7  : MuonGEMBaseHarvestor(pset, "MuonGEMRecHitsHarvestor") {
8  region_ids_ = pset.getUntrackedParameter<std::vector<Int_t> >("regionIds");
9  station_ids_ = pset.getUntrackedParameter<std::vector<Int_t> >("stationIds");
10  layer_ids_ = pset.getUntrackedParameter<std::vector<Int_t> >("layerIds");
11 
12  detail_plot_ = pset.getParameter<Bool_t>("detailPlot");
13 }
std::vector< Int_t > region_ids_
MuonGEMBaseHarvestor(const edm::ParameterSet &, std::string)
std::vector< Int_t > layer_ids_
std::vector< Int_t > station_ids_

◆ ~MuonGEMRecHitsHarvestor()

MuonGEMRecHitsHarvestor::~MuonGEMRecHitsHarvestor ( )
override

Definition at line 15 of file MuonGEMRecHitsHarvestor.cc.

15 {}

Member Function Documentation

◆ dqmEndJob()

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

Implements DQMEDHarvester.

Definition at line 17 of file MuonGEMRecHitsHarvestor.cc.

References MuonGEMBaseHarvestor::bookEff1D(), MuonGEMBaseHarvestor::bookEff2D(), detail_plot_, GEMUtils::getSuffixName(), GEMUtils::getSuffixTitle(), layer_ids_, region_ids_, and station_ids_.

17  {
18  TString simhit_occ_folder = "GEM/SimHits/";
19  TString occ_folder = "GEM/RecHits/";
20  TString eff_folder = "GEM/RecHits/";
21 
22  for (const auto& region_id : region_ids_) {
23  for (const auto& station_id : station_ids_) {
24  TString name_suf_re_st = GEMUtils::getSuffixName(region_id, station_id);
25  TString title_suf_re_st = GEMUtils::getSuffixTitle(region_id, station_id);
26 
27  if (detail_plot_) {
28  // NOTE Detector Component
29  TString rechit_det_path = occ_folder + "sim_matched_occ_det" + name_suf_re_st;
30  TString simhit_det_path = simhit_occ_folder + "sim_muon_occ_det" + name_suf_re_st;
31 
32  TString eff_det_name = "eff_det" + name_suf_re_st;
33  TString eff_det_title = "Detector Component Efficiency :" + title_suf_re_st;
34 
35  bookEff2D(booker, getter, rechit_det_path, simhit_det_path, eff_folder, eff_det_name, eff_det_title);
36  }
37  for (const auto& layer_id : layer_ids_) {
38  if (station_id != 0 and layer_id > 2)
39  continue;
40  TString name_suf_re_st_ly = GEMUtils::getSuffixName(region_id, station_id, layer_id);
41  TString title_suf_re_st_ly = GEMUtils::getSuffixTitle(region_id, station_id, layer_id);
42 
43  // NOTE Eta
44  TString rechit_eta_path = occ_folder + "sim_matched_occ_eta" + name_suf_re_st_ly;
45  TString simhit_eta_path = simhit_occ_folder + "sim_muon_occ_eta" + name_suf_re_st_ly;
46 
47  TString eff_eta_name = "eff_eta" + name_suf_re_st_ly;
48  TString eff_eta_title = "Eta Efficiency :" + title_suf_re_st_ly;
49 
50  bookEff1D(booker, getter, rechit_eta_path, simhit_eta_path, eff_folder, eff_eta_name, eff_eta_title);
51 
52  // NOTE Phi
53  TString rechit_phi_path = occ_folder + "sim_matched_occ_phi" + name_suf_re_st_ly;
54  TString simhit_phi_path = simhit_occ_folder + "sim_muon_occ_phi" + name_suf_re_st_ly;
55 
56  TString eff_phi_name = "eff_phi" + name_suf_re_st_ly;
57  TString eff_phi_title = "Phi Efficiency :" + title_suf_re_st_ly;
58 
59  bookEff1D(booker, getter, rechit_phi_path, simhit_phi_path, eff_folder, eff_phi_name, eff_phi_title);
60  } // layer loop
61  } // station loop
62  } // region loop
63 }
std::vector< Int_t > region_ids_
TString getSuffixName(Int_t region_id)
TString getSuffixTitle(Int_t region_id)
void bookEff2D(DQMStore::IBooker &ibooker, DQMStore::IGetter &getter, const TString &passed_path, const TString &total_path, const TString &folder, const TString &eff_name, const TString &eff_title="Efficiency")
void bookEff1D(DQMStore::IBooker &ibooker, DQMStore::IGetter &getter, const TString &passed_path, const TString &total_path, const TString &folder, const TString &eff_name, const TString &eff_title="Efficiency")
std::vector< Int_t > layer_ids_
std::vector< Int_t > station_ids_

Member Data Documentation

◆ detail_plot_

Bool_t MuonGEMRecHitsHarvestor::detail_plot_
private

Definition at line 15 of file MuonGEMRecHitsHarvestor.h.

Referenced by dqmEndJob(), and MuonGEMRecHitsHarvestor().

◆ layer_ids_

std::vector<Int_t> MuonGEMRecHitsHarvestor::layer_ids_
private

Definition at line 14 of file MuonGEMRecHitsHarvestor.h.

Referenced by dqmEndJob(), and MuonGEMRecHitsHarvestor().

◆ region_ids_

std::vector<Int_t> MuonGEMRecHitsHarvestor::region_ids_
private

Definition at line 14 of file MuonGEMRecHitsHarvestor.h.

Referenced by dqmEndJob(), and MuonGEMRecHitsHarvestor().

◆ station_ids_

std::vector<Int_t> MuonGEMRecHitsHarvestor::station_ids_
private

Definition at line 14 of file MuonGEMRecHitsHarvestor.h.

Referenced by dqmEndJob(), and MuonGEMRecHitsHarvestor().