CMS 3D CMS Logo

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

#include <L1TdeCSCTPG.h>

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

Public Member Functions

 L1TdeCSCTPG (const edm::ParameterSet &ps)
 
 ~L1TdeCSCTPG () 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
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

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::vector< double > alctMaxBin_
 
std::vector< double > alctMinBin_
 
std::vector< unsigned > alctNBin_
 
std::vector< std::string > alctVars_
 
std::map< uint32_t, std::map< std::string, MonitorElement * > > chamberHistos
 
std::vector< std::string > chambers_
 
std::vector< double > clctMaxBin_
 
std::vector< double > clctMinBin_
 
std::vector< unsigned > clctNBin_
 
std::vector< std::string > clctVars_
 
edm::EDGetTokenT< CSCALCTDigiCollectiondataALCT_token_
 
edm::EDGetTokenT< CSCCLCTDigiCollectiondataCLCT_token_
 
std::vector< std::string > dataEmul_
 
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollectiondataLCT_token_
 
edm::EDGetTokenT< CSCALCTDigiCollectionemulALCT_token_
 
edm::EDGetTokenT< CSCCLCTDigiCollectionemulCLCT_token_
 
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollectionemulLCT_token_
 
std::vector< double > lctMaxBin_
 
std::vector< double > lctMinBin_
 
std::vector< unsigned > lctNBin_
 
std::vector< std::string > lctVars_
 
std::string monitorDir_
 

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 >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache 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 15 of file L1TdeCSCTPG.h.

Constructor & Destructor Documentation

◆ L1TdeCSCTPG()

L1TdeCSCTPG::L1TdeCSCTPG ( const edm::ParameterSet ps)

Definition at line 5 of file L1TdeCSCTPG.cc.

6  : dataALCT_token_(consumes<CSCALCTDigiCollection>(ps.getParameter<edm::InputTag>("dataALCT"))),
7  emulALCT_token_(consumes<CSCALCTDigiCollection>(ps.getParameter<edm::InputTag>("emulALCT"))),
8  dataCLCT_token_(consumes<CSCCLCTDigiCollection>(ps.getParameter<edm::InputTag>("dataCLCT"))),
9  emulCLCT_token_(consumes<CSCCLCTDigiCollection>(ps.getParameter<edm::InputTag>("emulCLCT"))),
10  dataLCT_token_(consumes<CSCCorrelatedLCTDigiCollection>(ps.getParameter<edm::InputTag>("dataLCT"))),
11  emulLCT_token_(consumes<CSCCorrelatedLCTDigiCollection>(ps.getParameter<edm::InputTag>("emulLCT"))),
12  monitorDir_(ps.getParameter<std::string>("monitorDir")),
13 
14  chambers_(ps.getParameter<std::vector<std::string>>("chambers")),
15  dataEmul_(ps.getParameter<std::vector<std::string>>("dataEmul")),
16 
17  // variables
18  alctVars_(ps.getParameter<std::vector<std::string>>("alctVars")),
19  clctVars_(ps.getParameter<std::vector<std::string>>("lctVars")),
20  lctVars_(ps.getParameter<std::vector<std::string>>("lctVars")),
21 
22  // binning
23  alctNBin_(ps.getParameter<std::vector<unsigned>>("alctNBin")),
24  clctNBin_(ps.getParameter<std::vector<unsigned>>("lctNBin")),
25  lctNBin_(ps.getParameter<std::vector<unsigned>>("lctNBin")),
26  alctMinBin_(ps.getParameter<std::vector<double>>("alctMinBin")),
27  clctMinBin_(ps.getParameter<std::vector<double>>("lctMinBin")),
28  lctMinBin_(ps.getParameter<std::vector<double>>("lctMinBin")),
29  alctMaxBin_(ps.getParameter<std::vector<double>>("alctMaxBin")),
30  clctMaxBin_(ps.getParameter<std::vector<double>>("lctMaxBin")),
31  lctMaxBin_(ps.getParameter<std::vector<double>>("lctMaxBin")) {}

◆ ~L1TdeCSCTPG()

L1TdeCSCTPG::~L1TdeCSCTPG ( )
override

Definition at line 33 of file L1TdeCSCTPG.cc.

33 {}

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 72 of file L1TdeCSCTPG.cc.

72  {
73  // handles
80 
81  e.getByToken(dataALCT_token_, dataALCTs);
82  e.getByToken(emulALCT_token_, emulALCTs);
83  e.getByToken(dataCLCT_token_, dataCLCTs);
84  e.getByToken(emulCLCT_token_, emulCLCTs);
85  e.getByToken(dataLCT_token_, dataLCTs);
86  e.getByToken(emulLCT_token_, emulLCTs);
87 
88  for (auto it = dataALCTs->begin(); it != dataALCTs->end(); it++) {
89  auto range = dataALCTs->get((*it).first);
90  const int type = ((*it).first).iChamberType() - 1;
91  for (auto alct = range.first; alct != range.second; alct++) {
92  chamberHistos[type]["alct_quality_data"]->Fill(alct->getQuality());
93  chamberHistos[type]["alct_wiregroup_data"]->Fill(alct->getKeyWG());
94  chamberHistos[type]["alct_bx_data"]->Fill(alct->getBX());
95  }
96  }
97 
98  for (auto it = emulALCTs->begin(); it != emulALCTs->end(); it++) {
99  auto range = emulALCTs->get((*it).first);
100  const int type = ((*it).first).iChamberType() - 1;
101  for (auto alct = range.first; alct != range.second; alct++) {
102  chamberHistos[type]["alct_quality_emul"]->Fill(alct->getQuality());
103  chamberHistos[type]["alct_wiregroup_emul"]->Fill(alct->getKeyWG());
104  chamberHistos[type]["alct_bx_emul"]->Fill(alct->getBX());
105  }
106  }
107 
108  for (auto it = dataCLCTs->begin(); it != dataCLCTs->end(); it++) {
109  auto range = dataCLCTs->get((*it).first);
110  const int type = ((*it).first).iChamberType() - 1;
111  for (auto clct = range.first; clct != range.second; clct++) {
112  chamberHistos[type]["clct_pattern_data"]->Fill(clct->getPattern());
113  chamberHistos[type]["clct_quality_data"]->Fill(clct->getQuality());
114  chamberHistos[type]["clct_halfstrip_data"]->Fill(clct->getKeyStrip());
115  chamberHistos[type]["clct_bend_data"]->Fill(clct->getBend());
116  }
117  }
118 
119  for (auto it = emulCLCTs->begin(); it != emulCLCTs->end(); it++) {
120  auto range = emulCLCTs->get((*it).first);
121  const int type = ((*it).first).iChamberType() - 1;
122  for (auto clct = range.first; clct != range.second; clct++) {
123  chamberHistos[type]["clct_pattern_emul"]->Fill(clct->getPattern());
124  chamberHistos[type]["clct_quality_emul"]->Fill(clct->getQuality());
125  chamberHistos[type]["clct_halfstrip_emul"]->Fill(clct->getKeyStrip());
126  chamberHistos[type]["clct_bend_emul"]->Fill(clct->getBend());
127  }
128  }
129 
130  for (auto it = dataLCTs->begin(); it != dataLCTs->end(); it++) {
131  auto range = dataLCTs->get((*it).first);
132  const int type = ((*it).first).iChamberType() - 1;
133  for (auto lct = range.first; lct != range.second; lct++) {
134  chamberHistos[type]["lct_pattern_data"]->Fill(lct->getCLCTPattern());
135  chamberHistos[type]["lct_quality_data"]->Fill(lct->getQuality());
136  chamberHistos[type]["lct_wiregroup_data"]->Fill(lct->getKeyWG());
137  chamberHistos[type]["lct_halfstrip_data"]->Fill(lct->getStrip());
138  chamberHistos[type]["lct_bend_data"]->Fill(lct->getBend());
139  }
140  }
141 
142  for (auto it = emulLCTs->begin(); it != emulLCTs->end(); it++) {
143  auto range = emulLCTs->get((*it).first);
144  const int type = ((*it).first).iChamberType() - 1;
145  for (auto lct = range.first; lct != range.second; lct++) {
146  chamberHistos[type]["lct_pattern_emul"]->Fill(lct->getCLCTPattern());
147  chamberHistos[type]["lct_quality_emul"]->Fill(lct->getQuality());
148  chamberHistos[type]["lct_wiregroup_emul"]->Fill(lct->getKeyWG());
149  chamberHistos[type]["lct_halfstrip_emul"]->Fill(lct->getStrip());
150  chamberHistos[type]["lct_bend_emul"]->Fill(lct->getBend());
151  }
152  }
153 }

References chamberHistos, dataALCT_token_, dataCLCT_token_, dataLCT_token_, MillePedeFileConverter_cfg::e, emulALCT_token_, emulCLCT_token_, emulLCT_token_, and FastTimerService_cff::range.

◆ bookHistograms()

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

Implements DQMEDAnalyzer.

Definition at line 35 of file L1TdeCSCTPG.cc.

35  {
37 
38  // chamber type
39  for (unsigned iType = 0; iType < chambers_.size(); iType++) {
40  // data vs emulator
41  for (unsigned iData = 0; iData < dataEmul_.size(); iData++) {
42  // alct variable
43  for (unsigned iVar = 0; iVar < alctVars_.size(); iVar++) {
44  const std::string key("alct_" + alctVars_[iVar] + "_" + dataEmul_[iData]);
45  const std::string histName(key + "_" + chambers_[iType]);
46  const std::string histTitle(chambers_[iType] + " ALCT " + alctVars_[iVar] + " (" + dataEmul_[iData] + ") ");
47  chamberHistos[iType][key] =
48  iBooker.book1D(histName, histTitle, alctNBin_[iVar], alctMinBin_[iVar], alctMaxBin_[iVar]);
49  }
50 
51  // clct variable
52  for (unsigned iVar = 0; iVar < clctVars_.size(); iVar++) {
53  const std::string key("clct_" + clctVars_[iVar] + "_" + dataEmul_[iData]);
54  const std::string histName(key + "_" + chambers_[iType]);
55  const std::string histTitle(chambers_[iType] + " CLCT " + clctVars_[iVar] + " (" + dataEmul_[iData] + ") ");
56  chamberHistos[iType][key] =
57  iBooker.book1D(histName, histTitle, clctNBin_[iVar], clctMinBin_[iVar], clctMaxBin_[iVar]);
58  }
59 
60  // lct variable
61  for (unsigned iVar = 0; iVar < lctVars_.size(); iVar++) {
62  const std::string key("lct_" + lctVars_[iVar] + "_" + dataEmul_[iData]);
63  const std::string histName(key + "_" + chambers_[iType]);
64  const std::string histTitle(chambers_[iType] + " LCT " + lctVars_[iVar] + " (" + dataEmul_[iData] + ") ");
65  chamberHistos[iType][key] =
66  iBooker.book1D(histName, histTitle, lctNBin_[iVar], lctMinBin_[iVar], lctMaxBin_[iVar]);
67  }
68  }
69  }
70 }

References alctMaxBin_, alctMinBin_, alctNBin_, alctVars_, dqm::implementation::IBooker::book1D(), chamberHistos, chambers_, clctMaxBin_, clctMinBin_, clctNBin_, clctVars_, dataEmul_, B2GTnPMonitor_cfi::histTitle, crabWrapper::key, lctMaxBin_, lctMinBin_, lctNBin_, lctVars_, monitorDir_, dqm::implementation::NavigatorBase::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

Member Data Documentation

◆ alctMaxBin_

std::vector<double> L1TdeCSCTPG::alctMaxBin_
private

Definition at line 46 of file L1TdeCSCTPG.h.

Referenced by bookHistograms().

◆ alctMinBin_

std::vector<double> L1TdeCSCTPG::alctMinBin_
private

Definition at line 43 of file L1TdeCSCTPG.h.

Referenced by bookHistograms().

◆ alctNBin_

std::vector<unsigned> L1TdeCSCTPG::alctNBin_
private

Definition at line 40 of file L1TdeCSCTPG.h.

Referenced by bookHistograms().

◆ alctVars_

std::vector<std::string> L1TdeCSCTPG::alctVars_
private

Definition at line 36 of file L1TdeCSCTPG.h.

Referenced by bookHistograms().

◆ chamberHistos

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

Definition at line 52 of file L1TdeCSCTPG.h.

Referenced by analyze(), and bookHistograms().

◆ chambers_

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

Definition at line 33 of file L1TdeCSCTPG.h.

Referenced by bookHistograms().

◆ clctMaxBin_

std::vector<double> L1TdeCSCTPG::clctMaxBin_
private

Definition at line 47 of file L1TdeCSCTPG.h.

Referenced by bookHistograms().

◆ clctMinBin_

std::vector<double> L1TdeCSCTPG::clctMinBin_
private

Definition at line 44 of file L1TdeCSCTPG.h.

Referenced by bookHistograms().

◆ clctNBin_

std::vector<unsigned> L1TdeCSCTPG::clctNBin_
private

Definition at line 41 of file L1TdeCSCTPG.h.

Referenced by bookHistograms().

◆ clctVars_

std::vector<std::string> L1TdeCSCTPG::clctVars_
private

Definition at line 37 of file L1TdeCSCTPG.h.

Referenced by bookHistograms().

◆ dataALCT_token_

edm::EDGetTokenT<CSCALCTDigiCollection> L1TdeCSCTPG::dataALCT_token_
private

Definition at line 25 of file L1TdeCSCTPG.h.

Referenced by analyze().

◆ dataCLCT_token_

edm::EDGetTokenT<CSCCLCTDigiCollection> L1TdeCSCTPG::dataCLCT_token_
private

Definition at line 27 of file L1TdeCSCTPG.h.

Referenced by analyze().

◆ dataEmul_

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

Definition at line 34 of file L1TdeCSCTPG.h.

Referenced by bookHistograms().

◆ dataLCT_token_

edm::EDGetTokenT<CSCCorrelatedLCTDigiCollection> L1TdeCSCTPG::dataLCT_token_
private

Definition at line 29 of file L1TdeCSCTPG.h.

Referenced by analyze().

◆ emulALCT_token_

edm::EDGetTokenT<CSCALCTDigiCollection> L1TdeCSCTPG::emulALCT_token_
private

Definition at line 26 of file L1TdeCSCTPG.h.

Referenced by analyze().

◆ emulCLCT_token_

edm::EDGetTokenT<CSCCLCTDigiCollection> L1TdeCSCTPG::emulCLCT_token_
private

Definition at line 28 of file L1TdeCSCTPG.h.

Referenced by analyze().

◆ emulLCT_token_

edm::EDGetTokenT<CSCCorrelatedLCTDigiCollection> L1TdeCSCTPG::emulLCT_token_
private

Definition at line 30 of file L1TdeCSCTPG.h.

Referenced by analyze().

◆ lctMaxBin_

std::vector<double> L1TdeCSCTPG::lctMaxBin_
private

Definition at line 48 of file L1TdeCSCTPG.h.

Referenced by bookHistograms().

◆ lctMinBin_

std::vector<double> L1TdeCSCTPG::lctMinBin_
private

Definition at line 45 of file L1TdeCSCTPG.h.

Referenced by bookHistograms().

◆ lctNBin_

std::vector<unsigned> L1TdeCSCTPG::lctNBin_
private

Definition at line 42 of file L1TdeCSCTPG.h.

Referenced by bookHistograms().

◆ lctVars_

std::vector<std::string> L1TdeCSCTPG::lctVars_
private

Definition at line 38 of file L1TdeCSCTPG.h.

Referenced by bookHistograms().

◆ monitorDir_

std::string L1TdeCSCTPG::monitorDir_
private

Definition at line 31 of file L1TdeCSCTPG.h.

Referenced by bookHistograms().

L1TdeCSCTPG::dataLCT_token_
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > dataLCT_token_
Definition: L1TdeCSCTPG.h:29
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
L1TdeCSCTPG::alctVars_
std::vector< std::string > alctVars_
Definition: L1TdeCSCTPG.h:36
L1TdeCSCTPG::lctMaxBin_
std::vector< double > lctMaxBin_
Definition: L1TdeCSCTPG.h:48
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
edm::Handle< CSCALCTDigiCollection >
L1TdeCSCTPG::alctNBin_
std::vector< unsigned > alctNBin_
Definition: L1TdeCSCTPG.h:40
L1TdeCSCTPG::emulLCT_token_
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > emulLCT_token_
Definition: L1TdeCSCTPG.h:30
L1TdeCSCTPG::alctMinBin_
std::vector< double > alctMinBin_
Definition: L1TdeCSCTPG.h:43
L1TdeCSCTPG::chamberHistos
std::map< uint32_t, std::map< std::string, MonitorElement * > > chamberHistos
Definition: L1TdeCSCTPG.h:52
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
B2GTnPMonitor_cfi.histTitle
histTitle
Definition: B2GTnPMonitor_cfi.py:112
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:40
L1TdeCSCTPG::alctMaxBin_
std::vector< double > alctMaxBin_
Definition: L1TdeCSCTPG.h:46
L1TdeCSCTPG::emulALCT_token_
edm::EDGetTokenT< CSCALCTDigiCollection > emulALCT_token_
Definition: L1TdeCSCTPG.h:26
L1TdeCSCTPG::lctNBin_
std::vector< unsigned > lctNBin_
Definition: L1TdeCSCTPG.h:42
L1TdeCSCTPG::chambers_
std::vector< std::string > chambers_
Definition: L1TdeCSCTPG.h:33
L1TdeCSCTPG::clctMaxBin_
std::vector< double > clctMaxBin_
Definition: L1TdeCSCTPG.h:47
L1TdeCSCTPG::clctNBin_
std::vector< unsigned > clctNBin_
Definition: L1TdeCSCTPG.h:41
L1TdeCSCTPG::dataCLCT_token_
edm::EDGetTokenT< CSCCLCTDigiCollection > dataCLCT_token_
Definition: L1TdeCSCTPG.h:27
L1TdeCSCTPG::lctMinBin_
std::vector< double > lctMinBin_
Definition: L1TdeCSCTPG.h:45
L1TdeCSCTPG::emulCLCT_token_
edm::EDGetTokenT< CSCCLCTDigiCollection > emulCLCT_token_
Definition: L1TdeCSCTPG.h:28
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
L1TdeCSCTPG::clctVars_
std::vector< std::string > clctVars_
Definition: L1TdeCSCTPG.h:37
L1TdeCSCTPG::dataEmul_
std::vector< std::string > dataEmul_
Definition: L1TdeCSCTPG.h:34
crabWrapper.key
key
Definition: crabWrapper.py:19
L1TdeCSCTPG::monitorDir_
std::string monitorDir_
Definition: L1TdeCSCTPG.h:31
L1TdeCSCTPG::lctVars_
std::vector< std::string > lctVars_
Definition: L1TdeCSCTPG.h:38
edm::InputTag
Definition: InputTag.h:15
L1TdeCSCTPG::clctMinBin_
std::vector< double > clctMinBin_
Definition: L1TdeCSCTPG.h:44
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
L1TdeCSCTPG::dataALCT_token_
edm::EDGetTokenT< CSCALCTDigiCollection > dataALCT_token_
Definition: L1TdeCSCTPG.h:25