CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members | Public Member Functions | Private Attributes
MuonGEMDigisHarvestor Class Reference

#include <MuonGEMDigisHarvestor.h>

Inheritance diagram for MuonGEMDigisHarvestor:
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
 
 MuonGEMDigisHarvestor (const edm::ParameterSet &)
 constructor More...
 
 ~MuonGEMDigisHarvestor () override
 destructor More...
 
- 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
 
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

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 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 MuonGEMDigisHarvestor.h.

Constructor & Destructor Documentation

◆ MuonGEMDigisHarvestor()

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

constructor

Definition at line 4 of file MuonGEMDigisHarvestor.cc.

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

5  : MuonGEMBaseHarvestor(pset, "MuonGEMDigisHarvestor") {
6  // to make it compatible to both full geometry and slice test
7  region_ids_ = pset.getUntrackedParameter<std::vector<Int_t> >("regionIds");
8  station_ids_ = pset.getUntrackedParameter<std::vector<Int_t> >("stationIds");
9  layer_ids_ = pset.getUntrackedParameter<std::vector<Int_t> >("layerIds");
10 
11  detail_plot_ = pset.getParameter<Bool_t>("detailPlot");
12 }
MuonGEMBaseHarvestor(const edm::ParameterSet &, std::string)
std::vector< Int_t > region_ids_
std::vector< Int_t > layer_ids_
std::vector< Int_t > station_ids_

◆ ~MuonGEMDigisHarvestor()

MuonGEMDigisHarvestor::~MuonGEMDigisHarvestor ( )
override

destructor

Definition at line 14 of file MuonGEMDigisHarvestor.cc.

14 {}

Member Function Documentation

◆ dqmEndJob()

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

Implements DQMEDHarvester.

Definition at line 16 of file MuonGEMDigisHarvestor.cc.

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

16  {
17  TString simhit_occ_folder = "GEM/SimHits/";
18  TString occ_folder = "GEM/Digis/";
19  TString eff_folder = "GEM/Digis/";
20  TString occ_folder_pad = "GEM/Pad/";
21  TString eff_folder_pad = "GEM/Pad/";
22  TString occ_folder_cluster = "GEM/PadCluster/";
23  TString eff_folder_cluster = "GEM/PadCluster/";
24 
25  for (Int_t region_id : region_ids_) {
26  for (Int_t station_id : station_ids_) {
27  TString name_suffix_re_st = GEMUtils::getSuffixName(region_id, station_id);
28  TString title_suffix_re_st = GEMUtils::getSuffixTitle(region_id, station_id);
29 
30  if (detail_plot_) {
31  // NOTE Detector Component efficiency
32  TString strip_det_name = "sim_matched_occ_det" + name_suffix_re_st;
33  TString pad_det_name = "sim_matched_occ_det" + name_suffix_re_st;
34  TString simhit_det_name = "sim_muon_occ_det" + name_suffix_re_st;
35  TString strip_det_path = occ_folder + strip_det_name;
36  TString pad_det_path = occ_folder_pad + pad_det_name;
37  TString cluster_det_path = occ_folder_cluster + pad_det_name;
38  TString simhit_det_path = simhit_occ_folder + simhit_det_name;
39  TString eff_det_name = "eff_det" + name_suffix_re_st;
40  TString eff_det_title = "Detector Component Efficiency (Muon Only) :" + title_suffix_re_st;
41 
42  bookEff2D(booker, getter, strip_det_path, simhit_det_path, eff_folder, eff_det_name, eff_det_title);
43  bookEff2D(booker, getter, pad_det_path, simhit_det_path, eff_folder_pad, eff_det_name, eff_det_title);
44  bookEff2D(booker, getter, cluster_det_path, simhit_det_path, eff_folder_cluster, eff_det_name, eff_det_title);
45  }
46 
47  for (Int_t layer_id : layer_ids_) {
48  if (station_id != 0 and layer_id > 2)
49  continue;
50  TString name_suffix_re_st_ly = GEMUtils::getSuffixName(region_id, station_id, layer_id);
51  TString title_suffix_re_st_ly = GEMUtils::getSuffixTitle(region_id, station_id, layer_id);
52 
53  // NOTE eta efficiency
54  TString strip_eta_name = "sim_matched_occ_eta" + name_suffix_re_st_ly;
55  TString pad_eta_name = "sim_matched_occ_eta" + name_suffix_re_st_ly;
56  TString simhit_eta_name = "sim_muon_occ_eta" + name_suffix_re_st_ly;
57  TString strip_eta_path = occ_folder + strip_eta_name;
58  TString pad_eta_path = occ_folder_pad + pad_eta_name;
59  TString cluster_eta_path = occ_folder_cluster + pad_eta_name;
60  TString simhit_eta_path = simhit_occ_folder + simhit_eta_name;
61  TString eff_eta_name = "eff_eta" + name_suffix_re_st_ly;
62  TString eff_eta_title = "Eta Efficiency (Muon Only) :" + title_suffix_re_st_ly;
63 
64  if (detail_plot_)
65  bookEff1D(booker, getter, strip_eta_path, simhit_eta_path, eff_folder, eff_eta_name, eff_eta_title);
66  bookEff1D(booker, getter, pad_eta_path, simhit_eta_path, eff_folder_pad, eff_eta_name, eff_eta_title);
67  bookEff1D(booker, getter, cluster_eta_path, simhit_eta_path, eff_folder_cluster, eff_eta_name, eff_eta_title);
68 
69  // NOTE phi efficiency
70  TString strip_phi_name = "sim_matched_occ_phi" + name_suffix_re_st_ly;
71  TString pad_phi_name = "sim_matched_occ_phi" + name_suffix_re_st_ly;
72  TString simhit_phi_name = "sim_muon_occ_phi" + name_suffix_re_st_ly;
73  TString strip_phi_path = occ_folder + strip_phi_name;
74  TString pad_phi_path = occ_folder_pad + pad_phi_name;
75  TString cluster_phi_path = occ_folder_cluster + pad_phi_name;
76  TString simhit_phi_path = simhit_occ_folder + simhit_phi_name;
77  TString eff_phi_name = "eff_phi" + name_suffix_re_st_ly;
78  TString eff_phi_title = "Phi Efficiency (Muon Only) :" + title_suffix_re_st_ly;
79 
80  if (detail_plot_)
81  bookEff1D(booker, getter, strip_phi_path, simhit_phi_path, eff_folder, eff_phi_name, eff_phi_title);
82  bookEff1D(booker, getter, pad_phi_path, simhit_phi_path, eff_folder_pad, eff_phi_name, eff_phi_title);
83  bookEff1D(booker, getter, cluster_phi_path, simhit_phi_path, eff_folder_cluster, eff_phi_name, eff_phi_title);
84  } // layer loop
85  } // statino loop
86  } // region loop
87 }
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")
std::vector< Int_t > region_ids_
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 MuonGEMDigisHarvestor::detail_plot_
private

Definition at line 17 of file MuonGEMDigisHarvestor.h.

Referenced by dqmEndJob(), and MuonGEMDigisHarvestor().

◆ layer_ids_

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

Definition at line 16 of file MuonGEMDigisHarvestor.h.

Referenced by dqmEndJob(), and MuonGEMDigisHarvestor().

◆ region_ids_

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

Definition at line 16 of file MuonGEMDigisHarvestor.h.

Referenced by dqmEndJob(), and MuonGEMDigisHarvestor().

◆ station_ids_

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

Definition at line 16 of file MuonGEMDigisHarvestor.h.

Referenced by dqmEndJob(), and MuonGEMDigisHarvestor().