CMS 3D CMS Logo

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

#include <L1TdeGEMTPG.h>

Inheritance diagram for L1TdeGEMTPG:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

 L1TdeGEMTPG (const edm::ParameterSet &ps)
 
 ~L1TdeGEMTPG () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 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
 
const EDProduceroperator= (const EDProducer &)=delete
 

Protected Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, const edm::Run &, const edm::EventSetup &) override
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Private Attributes

std::map< uint32_t, std::map< std::string, MonitorElement * > > chamberHistos
 
std::vector< std::string > chambers_
 
std::vector< double > clusterMaxBin_
 
std::vector< double > clusterMinBin_
 
std::vector< unsigned > clusterNBin_
 
std::vector< std::string > clusterVars_
 
edm::EDGetTokenT< GEMPadDigiClusterCollectiondata_token_
 
std::vector< std::string > dataEmul_
 
edm::EDGetTokenT< GEMPadDigiClusterCollectionemul_token_
 
std::string monitorDir_
 
bool verbose_
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 13 of file L1TdeGEMTPG.h.

Constructor & Destructor Documentation

◆ L1TdeGEMTPG()

L1TdeGEMTPG::L1TdeGEMTPG ( const edm::ParameterSet ps)

Definition at line 5 of file L1TdeGEMTPG.cc.

6  : data_token_(consumes<GEMPadDigiClusterCollection>(ps.getParameter<edm::InputTag>("data"))),
7  emul_token_(consumes<GEMPadDigiClusterCollection>(ps.getParameter<edm::InputTag>("emul"))),
8  monitorDir_(ps.getParameter<std::string>("monitorDir")),
9  verbose_(ps.getParameter<bool>("verbose")),
10 
11  chambers_(ps.getParameter<std::vector<std::string>>("chambers")),
12  dataEmul_(ps.getParameter<std::vector<std::string>>("dataEmul")),
13 
14  // variables
15  clusterVars_(ps.getParameter<std::vector<std::string>>("clusterVars")),
16 
17  // binning
18  clusterNBin_(ps.getParameter<std::vector<unsigned>>("clusterNBin")),
19  clusterMinBin_(ps.getParameter<std::vector<double>>("clusterMinBin")),
20  clusterMaxBin_(ps.getParameter<std::vector<double>>("clusterMaxBin")) {}

◆ ~L1TdeGEMTPG()

L1TdeGEMTPG::~L1TdeGEMTPG ( )
override

Definition at line 22 of file L1TdeGEMTPG.cc.

22 {}

Member Function Documentation

◆ analyze()

void L1TdeGEMTPG::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 45 of file L1TdeGEMTPG.cc.

45  {
46  if (verbose_)
47  edm::LogInfo("L1TdeGEMTPG") << "L1TdeGEMTPG: analyzing collections" << std::endl;
48 
49  // handles
52  e.getByToken(data_token_, dataClusters);
53  e.getByToken(emul_token_, emulClusters);
54 
55  for (auto it = dataClusters->begin(); it != dataClusters->end(); it++) {
56  auto range = dataClusters->get((*it).first);
57  const int type = ((*it).first).station() - 1;
58  for (auto cluster = range.first; cluster != range.second; cluster++) {
59  if (cluster->isValid()) {
60  chamberHistos[type]["cluster_size_data"]->Fill(cluster->pads().size());
61  chamberHistos[type]["cluster_pad_data"]->Fill(cluster->pads().front());
62  chamberHistos[type]["cluster_bx_data"]->Fill(cluster->bx());
63  }
64  }
65  }
66 
67  for (auto it = emulClusters->begin(); it != emulClusters->end(); it++) {
68  auto range = emulClusters->get((*it).first);
69  const int type = ((*it).first).station() - 1;
70  for (auto cluster = range.first; cluster != range.second; cluster++) {
71  if (cluster->isValid()) {
72  chamberHistos[type]["cluster_size_emul"]->Fill(cluster->pads().size());
73  chamberHistos[type]["cluster_pad_emul"]->Fill(cluster->pads().front());
74  chamberHistos[type]["cluster_bx_emul"]->Fill(cluster->bx());
75  }
76  }
77  }
78 }

References chamberHistos, data_token_, MillePedeFileConverter_cfg::e, emul_token_, FastTimerService_cff::range, relativeConstraints::station, and verbose_.

◆ bookHistograms()

void L1TdeGEMTPG::bookHistograms ( DQMStore::IBooker iBooker,
const edm::Run ,
const edm::EventSetup  
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 24 of file L1TdeGEMTPG.cc.

24  {
26 
27  // chamber type
28  for (unsigned iType = 0; iType < chambers_.size(); iType++) {
29  // data vs emulator
30  for (unsigned iData = 0; iData < dataEmul_.size(); iData++) {
31  // cluster variable
32  for (unsigned iVar = 0; iVar < clusterVars_.size(); iVar++) {
33  const std::string key("cluster_" + clusterVars_[iVar] + "_" + dataEmul_[iData]);
34  const std::string histName(key + "_" + chambers_[iType]);
35  const std::string histTitle(chambers_[iType] + " Cluster " + clusterVars_[iVar] + " (" + dataEmul_[iData] +
36  ")");
37  chamberHistos[iType][key] =
38  iBooker.book1D(histName, histTitle, clusterNBin_[iVar], clusterMinBin_[iVar], clusterMaxBin_[iVar]);
39  chamberHistos[iType][key]->getTH1()->SetMinimum(0);
40  }
41  }
42  }
43 }

References dqm::implementation::IBooker::book1D(), chamberHistos, chambers_, clusterMaxBin_, clusterMinBin_, clusterNBin_, clusterVars_, dataEmul_, B2GTnPMonitor_cfi::histTitle, crabWrapper::key, monitorDir_, dqm::implementation::NavigatorBase::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

Member Data Documentation

◆ chamberHistos

std::map<uint32_t, std::map<std::string, MonitorElement*> > L1TdeGEMTPG::chamberHistos
private

Definition at line 38 of file L1TdeGEMTPG.h.

Referenced by analyze(), and bookHistograms().

◆ chambers_

std::vector<std::string> L1TdeGEMTPG::chambers_
private

Definition at line 28 of file L1TdeGEMTPG.h.

Referenced by bookHistograms().

◆ clusterMaxBin_

std::vector<double> L1TdeGEMTPG::clusterMaxBin_
private

Definition at line 34 of file L1TdeGEMTPG.h.

Referenced by bookHistograms().

◆ clusterMinBin_

std::vector<double> L1TdeGEMTPG::clusterMinBin_
private

Definition at line 33 of file L1TdeGEMTPG.h.

Referenced by bookHistograms().

◆ clusterNBin_

std::vector<unsigned> L1TdeGEMTPG::clusterNBin_
private

Definition at line 32 of file L1TdeGEMTPG.h.

Referenced by bookHistograms().

◆ clusterVars_

std::vector<std::string> L1TdeGEMTPG::clusterVars_
private

Definition at line 31 of file L1TdeGEMTPG.h.

Referenced by bookHistograms().

◆ data_token_

edm::EDGetTokenT<GEMPadDigiClusterCollection> L1TdeGEMTPG::data_token_
private

Definition at line 23 of file L1TdeGEMTPG.h.

Referenced by analyze().

◆ dataEmul_

std::vector<std::string> L1TdeGEMTPG::dataEmul_
private

Definition at line 29 of file L1TdeGEMTPG.h.

Referenced by bookHistograms().

◆ emul_token_

edm::EDGetTokenT<GEMPadDigiClusterCollection> L1TdeGEMTPG::emul_token_
private

Definition at line 24 of file L1TdeGEMTPG.h.

Referenced by analyze().

◆ monitorDir_

std::string L1TdeGEMTPG::monitorDir_
private

Definition at line 25 of file L1TdeGEMTPG.h.

Referenced by bookHistograms().

◆ verbose_

bool L1TdeGEMTPG::verbose_
private

Definition at line 26 of file L1TdeGEMTPG.h.

Referenced by analyze().

FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
L1TdeGEMTPG::chamberHistos
std::map< uint32_t, std::map< std::string, MonitorElement * > > chamberHistos
Definition: L1TdeGEMTPG.h:38
L1TdeGEMTPG::clusterNBin_
std::vector< unsigned > clusterNBin_
Definition: L1TdeGEMTPG.h:32
L1TdeGEMTPG::chambers_
std::vector< std::string > chambers_
Definition: L1TdeGEMTPG.h:28
relativeConstraints.station
station
Definition: relativeConstraints.py:67
L1TdeGEMTPG::dataEmul_
std::vector< std::string > dataEmul_
Definition: L1TdeGEMTPG.h:29
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
edm::Handle< GEMPadDigiClusterCollection >
L1TdeGEMTPG::monitorDir_
std::string monitorDir_
Definition: L1TdeGEMTPG.h:25
L1TdeGEMTPG::clusterMinBin_
std::vector< double > clusterMinBin_
Definition: L1TdeGEMTPG.h:33
B2GTnPMonitor_cfi.histTitle
histTitle
Definition: B2GTnPMonitor_cfi.py:112
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:40
L1TdeGEMTPG::verbose_
bool verbose_
Definition: L1TdeGEMTPG.h:26
L1TdeGEMTPG::clusterVars_
std::vector< std::string > clusterVars_
Definition: L1TdeGEMTPG.h:31
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1TdeGEMTPG::clusterMaxBin_
std::vector< double > clusterMaxBin_
Definition: L1TdeGEMTPG.h:34
L1TdeGEMTPG::emul_token_
edm::EDGetTokenT< GEMPadDigiClusterCollection > emul_token_
Definition: L1TdeGEMTPG.h:24
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
L1TdeGEMTPG::data_token_
edm::EDGetTokenT< GEMPadDigiClusterCollection > data_token_
Definition: L1TdeGEMTPG.h:23
crabWrapper.key
key
Definition: crabWrapper.py:19
edm::InputTag
Definition: InputTag.h:15
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
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37