CMS 3D CMS Logo

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

#include <L1TPUM.h>

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

Public Member Functions

 L1TPUM (const edm::ParameterSet &ps)
 
 ~L1TPUM () 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 &e, const edm::EventSetup &c) override
 
void bookHistograms (DQMStore::IBooker &ibooker, const edm::Run &, const edm::EventSetup &) override
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Private Attributes

std::string histFolder_
 
MonitorElementnonZeroRegionsBx0_
 
MonitorElementnonZeroRegionsBxM2_
 
MonitorElementnonZeroRegionsBxP2_
 
MonitorElementregionBxEtSum_
 
MonitorElementregionBxPopulation_
 
MonitorElementregionsAvgEtBx0_
 
MonitorElementregionsAvgEtBxM2_
 
MonitorElementregionsAvgEtBxP2_
 
MonitorElementregionsAvgNonZeroEtBx0_
 
MonitorElementregionsAvgNonZeroEtBxM2_
 
MonitorElementregionsAvgNonZeroEtBxP2_
 
edm::EDGetTokenT< L1CaloRegionCollectionregionSource_
 
std::vector< MonitorElement * > regionsPUMEtaBx0_
 
std::vector< MonitorElement * > regionsPUMEtaBxM2_
 
std::vector< MonitorElement * > regionsPUMEtaBxP2_
 
MonitorElementregionsTotalEtBx0_
 
MonitorElementregionsTotalEtBxM2_
 
MonitorElementregionsTotalEtBxP2_
 

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 24 of file L1TPUM.h.

Constructor & Destructor Documentation

◆ L1TPUM()

L1TPUM::L1TPUM ( const edm::ParameterSet ps)

Definition at line 29 of file L1TPUM.cc.

30  : regionSource_(consumes<L1CaloRegionCollection>(ps.getParameter<edm::InputTag>("regionSource"))),
31  histFolder_(ps.getParameter<std::string>("histFolder")) {}
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::EDGetTokenT< L1CaloRegionCollection > regionSource_
Definition: L1TPUM.h:34
std::string histFolder_
Definition: L1TPUM.h:35

◆ ~L1TPUM()

L1TPUM::~L1TPUM ( )
override

Definition at line 33 of file L1TPUM.cc.

33 {}

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 35 of file L1TPUM.cc.

References muonRecoAnalyzer_cfi::etaBin, dqm::impl::MonitorElement::Fill(), HcalObjRepresent::Fill(), nonZeroRegionsBx0_, nonZeroRegionsBxM2_, nonZeroRegionsBxP2_, nano_mu_digi_cff::region, regionBxEtSum_, regionBxPopulation_, regionsAvgEtBx0_, regionsAvgEtBxM2_, regionsAvgEtBxP2_, regionsAvgNonZeroEtBx0_, regionsAvgNonZeroEtBxM2_, regionsAvgNonZeroEtBxP2_, regionSource_, regionsPUMEtaBx0_, regionsPUMEtaBxM2_, regionsPUMEtaBxP2_, regionsTotalEtBx0_, regionsTotalEtBxM2_, and regionsTotalEtBxP2_.

35  {
36  edm::Handle<L1CaloRegionCollection> regionCollection;
37  event.getByToken(regionSource_, regionCollection);
38 
39  int nonzeroRegionsBxP2{0};
40  int nonzeroRegionsBx0{0};
41  int nonzeroRegionsBxM2{0};
42 
43  float regionsTotalEtBxP2{0.};
44  float regionsTotalEtBx0{0.};
45  float regionsTotalEtBxM2{0.};
46 
47  for (const auto& region : *regionCollection) {
48  if (region.et() > 0) {
49  if (region.bx() == 0) {
50  nonzeroRegionsBx0++;
51  regionsTotalEtBx0 += region.et();
52  } else if (region.bx() == 2) {
53  nonzeroRegionsBxP2++;
54  regionsTotalEtBxP2 += region.et();
55  } else if (region.bx() == -2) {
56  nonzeroRegionsBxM2++;
57  regionsTotalEtBxM2 += region.et();
58  }
59  }
60  }
61 
62  regionsTotalEtBxP2_->Fill(regionsTotalEtBxP2);
63  regionsTotalEtBx0_->Fill(regionsTotalEtBx0);
64  regionsTotalEtBxM2_->Fill(regionsTotalEtBxM2);
65 
66  regionsAvgEtBxP2_->Fill(regionsTotalEtBxP2 / 396.);
67  regionsAvgEtBx0_->Fill(regionsTotalEtBx0 / 396.);
68  regionsAvgEtBxM2_->Fill(regionsTotalEtBxM2 / 396.);
69 
70  regionsAvgNonZeroEtBxP2_->Fill(regionsTotalEtBxP2 / nonzeroRegionsBxP2);
71  regionsAvgNonZeroEtBx0_->Fill(regionsTotalEtBx0 / nonzeroRegionsBx0);
72  regionsAvgNonZeroEtBxM2_->Fill(regionsTotalEtBxM2 / nonzeroRegionsBxM2);
73 
74  nonZeroRegionsBxP2_->Fill(nonzeroRegionsBxP2);
75  nonZeroRegionsBx0_->Fill(nonzeroRegionsBx0);
76  nonZeroRegionsBxM2_->Fill(nonzeroRegionsBxM2);
77 
78  for (const auto& region : *regionCollection) {
79  size_t etaBin = region.gctEta();
80  regionBxPopulation_->Fill(etaBin * 18 + region.gctPhi(), region.bx());
81  regionBxEtSum_->Fill(etaBin * 18 + region.gctPhi(), region.bx(), region.et());
82  if (region.bx() == 0)
83  regionsPUMEtaBx0_[etaBin]->Fill(nonzeroRegionsBx0 / PUMNORMALIZE, region.et());
84  else if (region.bx() == 2)
85  regionsPUMEtaBxP2_[etaBin]->Fill(nonzeroRegionsBxP2 / PUMNORMALIZE, region.et());
86  else if (region.bx() == -2)
87  regionsPUMEtaBxM2_[etaBin]->Fill(nonzeroRegionsBxM2 / PUMNORMALIZE, region.et());
88  }
89 }
MonitorElement * regionsTotalEtBxP2_
Definition: L1TPUM.h:37
MonitorElement * regionsAvgNonZeroEtBxM2_
Definition: L1TPUM.h:47
MonitorElement * regionsAvgEtBxM2_
Definition: L1TPUM.h:43
edm::EDGetTokenT< L1CaloRegionCollection > regionSource_
Definition: L1TPUM.h:34
MonitorElement * regionsAvgEtBxP2_
Definition: L1TPUM.h:41
std::vector< MonitorElement * > regionsPUMEtaBxP2_
Definition: L1TPUM.h:56
MonitorElement * nonZeroRegionsBxM2_
Definition: L1TPUM.h:51
MonitorElement * regionBxPopulation_
Definition: L1TPUM.h:53
void Fill(long long x)
MonitorElement * nonZeroRegionsBx0_
Definition: L1TPUM.h:50
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * nonZeroRegionsBxP2_
Definition: L1TPUM.h:49
MonitorElement * regionsAvgNonZeroEtBxP2_
Definition: L1TPUM.h:45
std::vector< MonitorElement * > regionsPUMEtaBxM2_
Definition: L1TPUM.h:58
std::vector< MonitorElement * > regionsPUMEtaBx0_
Definition: L1TPUM.h:57
MonitorElement * regionsAvgEtBx0_
Definition: L1TPUM.h:42
MonitorElement * regionsTotalEtBx0_
Definition: L1TPUM.h:38
MonitorElement * regionsAvgNonZeroEtBx0_
Definition: L1TPUM.h:46
MonitorElement * regionsTotalEtBxM2_
Definition: L1TPUM.h:39
MonitorElement * regionBxEtSum_
Definition: L1TPUM.h:54

◆ bookHistograms()

void L1TPUM::bookHistograms ( DQMStore::IBooker ibooker,
const edm::Run run,
const edm::EventSetup es 
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 91 of file L1TPUM.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), histFolder_, hcalRecHitTable_cff::ieta, nonZeroRegionsBx0_, nonZeroRegionsBxM2_, nonZeroRegionsBxP2_, regionBxEtSum_, regionBxPopulation_, regionsAvgEtBx0_, regionsAvgEtBxM2_, regionsAvgEtBxP2_, regionsAvgNonZeroEtBx0_, regionsAvgNonZeroEtBxM2_, regionsAvgNonZeroEtBxP2_, regionsPUMEtaBx0_, regionsPUMEtaBxM2_, regionsPUMEtaBxP2_, regionsTotalEtBx0_, regionsTotalEtBxM2_, regionsTotalEtBxP2_, dqm::implementation::NavigatorBase::setCurrentFolder(), and to_string().

91  {
92  ibooker.setCurrentFolder(histFolder_ + "/BX0");
93  regionsPUMEtaBx0_.resize(PUMETABINS);
94  for (size_t ieta = 0; ieta < PUMETABINS; ++ieta) {
95  regionsTotalEtBx0_ = ibooker.book1D("regionsTotalEt", "Total ET distribution;Sum Rank;Counts", 200, 0, 2000);
96  regionsAvgEtBx0_ = ibooker.book1D("regionsAvgEt", "Average Rank;Average Rank;Counts", R10BINS, R10MIN, R10MAX);
98  ibooker.book1D("regionsAvgNonZeroEt", "Average Rank >0;Average Rank Regions>0;Counts", R10BINS, R10MIN, R10MAX);
99  nonZeroRegionsBx0_ = ibooker.book1D("nonZeroRegions", "Nonzero regions;Number Regions >0;Counts", 397, -0.5, 396.5);
100  regionsPUMEtaBx0_[ieta] = ibooker.book2D("regionsPUMEta" + std::to_string(ieta),
101  "PUM Bin rank distribution;PU bin;Rank",
102  PUMBINS,
103  PUMMIN,
104  PUMMAX,
105  R10BINS,
106  R10MIN,
107  R10MAX);
108  }
109 
110  ibooker.setCurrentFolder(histFolder_ + "/BXP2");
111  regionsPUMEtaBxP2_.resize(PUMETABINS);
112  for (size_t ieta = 0; ieta < PUMETABINS; ++ieta) {
113  regionsTotalEtBxP2_ = ibooker.book1D("regionsTotalEt", "Total ET distribution;Sum Rank;Counts", 200, 0, 2000);
114  regionsAvgEtBxP2_ = ibooker.book1D("regionsAvgEt", "Average Rank;Average Rank;Counts", R10BINS, R10MIN, R10MAX);
116  ibooker.book1D("regionsAvgNonZeroEt", "Average Rank >0;Average Rank Regions>0;Counts", R10BINS, R10MIN, R10MAX);
118  ibooker.book1D("nonZeroRegions", "Nonzero regions;Number Regions >0;Counts", 397, -0.5, 396.5);
119  regionsPUMEtaBxP2_[ieta] = ibooker.book2D("regionsPUMEta" + std::to_string(ieta),
120  "PUM Bin rank distribution;PU bin;Rank",
121  PUMBINS,
122  PUMMIN,
123  PUMMAX,
124  R10BINS,
125  R10MIN,
126  R10MAX);
127  }
128 
129  ibooker.setCurrentFolder(histFolder_ + "/BXM2");
130  regionsPUMEtaBxM2_.resize(PUMETABINS);
131  for (size_t ieta = 0; ieta < PUMETABINS; ++ieta) {
132  regionsTotalEtBxM2_ = ibooker.book1D("regionsTotalEt", "Total ET distribution;Sum Rank;Counts", 200, 0, 2000);
133  regionsAvgEtBxM2_ = ibooker.book1D("regionsAvgEt", "Average Rank;Average Rank;Counts", R10BINS, R10MIN, R10MAX);
135  ibooker.book1D("regionsAvgNonZeroEt", "Average Rank >0;Average Rank Regions>0;Counts", R10BINS, R10MIN, R10MAX);
137  ibooker.book1D("nonZeroRegions", "Nonzero regions;Number Regions >0;Counts", 397, -0.5, 396.5);
138  regionsPUMEtaBxM2_[ieta] = ibooker.book2D("regionsPUMEta" + std::to_string(ieta),
139  "PUM Bin rank distribution;PU bin;Rank",
140  PUMBINS,
141  PUMMIN,
142  PUMMAX,
143  R10BINS,
144  R10MIN,
145  R10MAX);
146  }
147 
148  ibooker.setCurrentFolder(histFolder_ + "/RegionBxInfo");
150  ibooker.book2D("regionBxPopulation",
151  "Event counts per region per bunch crossing;Region index (18*eta+phi);BX index;Counts",
152  396,
153  -0.5,
154  395.5,
155  5,
156  -2.5,
157  2.5);
158  regionBxEtSum_ = ibooker.book2D("regionBxEtSum",
159  "Et per region per bunch crossing;Region index (18*eta+phi);BX index;Counts*et",
160  396,
161  -0.5,
162  395.5,
163  5,
164  -2.5,
165  2.5);
166 }
MonitorElement * regionsTotalEtBxP2_
Definition: L1TPUM.h:37
MonitorElement * regionsAvgNonZeroEtBxM2_
Definition: L1TPUM.h:47
MonitorElement * regionsAvgEtBxM2_
Definition: L1TPUM.h:43
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
MonitorElement * regionsAvgEtBxP2_
Definition: L1TPUM.h:41
std::vector< MonitorElement * > regionsPUMEtaBxP2_
Definition: L1TPUM.h:56
MonitorElement * nonZeroRegionsBxM2_
Definition: L1TPUM.h:51
static std::string to_string(const XMLCh *ch)
MonitorElement * regionBxPopulation_
Definition: L1TPUM.h:53
MonitorElement * nonZeroRegionsBx0_
Definition: L1TPUM.h:50
MonitorElement * nonZeroRegionsBxP2_
Definition: L1TPUM.h:49
MonitorElement * regionsAvgNonZeroEtBxP2_
Definition: L1TPUM.h:45
std::vector< MonitorElement * > regionsPUMEtaBxM2_
Definition: L1TPUM.h:58
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:221
std::vector< MonitorElement * > regionsPUMEtaBx0_
Definition: L1TPUM.h:57
std::string histFolder_
Definition: L1TPUM.h:35
MonitorElement * regionsAvgEtBx0_
Definition: L1TPUM.h:42
MonitorElement * regionsTotalEtBx0_
Definition: L1TPUM.h:38
MonitorElement * regionsAvgNonZeroEtBx0_
Definition: L1TPUM.h:46
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MonitorElement * regionsTotalEtBxM2_
Definition: L1TPUM.h:39
MonitorElement * regionBxEtSum_
Definition: L1TPUM.h:54

Member Data Documentation

◆ histFolder_

std::string L1TPUM::histFolder_
private

Definition at line 35 of file L1TPUM.h.

Referenced by bookHistograms().

◆ nonZeroRegionsBx0_

MonitorElement* L1TPUM::nonZeroRegionsBx0_
private

Definition at line 50 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ nonZeroRegionsBxM2_

MonitorElement* L1TPUM::nonZeroRegionsBxM2_
private

Definition at line 51 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ nonZeroRegionsBxP2_

MonitorElement* L1TPUM::nonZeroRegionsBxP2_
private

Definition at line 49 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ regionBxEtSum_

MonitorElement* L1TPUM::regionBxEtSum_
private

Definition at line 54 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ regionBxPopulation_

MonitorElement* L1TPUM::regionBxPopulation_
private

Definition at line 53 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ regionsAvgEtBx0_

MonitorElement* L1TPUM::regionsAvgEtBx0_
private

Definition at line 42 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ regionsAvgEtBxM2_

MonitorElement* L1TPUM::regionsAvgEtBxM2_
private

Definition at line 43 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ regionsAvgEtBxP2_

MonitorElement* L1TPUM::regionsAvgEtBxP2_
private

Definition at line 41 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ regionsAvgNonZeroEtBx0_

MonitorElement* L1TPUM::regionsAvgNonZeroEtBx0_
private

Definition at line 46 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ regionsAvgNonZeroEtBxM2_

MonitorElement* L1TPUM::regionsAvgNonZeroEtBxM2_
private

Definition at line 47 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ regionsAvgNonZeroEtBxP2_

MonitorElement* L1TPUM::regionsAvgNonZeroEtBxP2_
private

Definition at line 45 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ regionSource_

edm::EDGetTokenT<L1CaloRegionCollection> L1TPUM::regionSource_
private

Definition at line 34 of file L1TPUM.h.

Referenced by analyze().

◆ regionsPUMEtaBx0_

std::vector<MonitorElement*> L1TPUM::regionsPUMEtaBx0_
private

Definition at line 57 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ regionsPUMEtaBxM2_

std::vector<MonitorElement*> L1TPUM::regionsPUMEtaBxM2_
private

Definition at line 58 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ regionsPUMEtaBxP2_

std::vector<MonitorElement*> L1TPUM::regionsPUMEtaBxP2_
private

Definition at line 56 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ regionsTotalEtBx0_

MonitorElement* L1TPUM::regionsTotalEtBx0_
private

Definition at line 38 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ regionsTotalEtBxM2_

MonitorElement* L1TPUM::regionsTotalEtBxM2_
private

Definition at line 39 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ regionsTotalEtBxP2_

MonitorElement* L1TPUM::regionsTotalEtBxP2_
private

Definition at line 37 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().