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
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

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 >
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 25 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")) {}

◆ ~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.

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 }

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

◆ 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.

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 }

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

Member Data Documentation

◆ histFolder_

std::string L1TPUM::histFolder_
private

Definition at line 36 of file L1TPUM.h.

Referenced by bookHistograms().

◆ nonZeroRegionsBx0_

MonitorElement* L1TPUM::nonZeroRegionsBx0_
private

Definition at line 51 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ nonZeroRegionsBxM2_

MonitorElement* L1TPUM::nonZeroRegionsBxM2_
private

Definition at line 52 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ nonZeroRegionsBxP2_

MonitorElement* L1TPUM::nonZeroRegionsBxP2_
private

Definition at line 50 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ regionBxEtSum_

MonitorElement* L1TPUM::regionBxEtSum_
private

Definition at line 55 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ regionBxPopulation_

MonitorElement* L1TPUM::regionBxPopulation_
private

Definition at line 54 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ regionsAvgEtBx0_

MonitorElement* L1TPUM::regionsAvgEtBx0_
private

Definition at line 43 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ regionsAvgEtBxM2_

MonitorElement* L1TPUM::regionsAvgEtBxM2_
private

Definition at line 44 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ regionsAvgEtBxP2_

MonitorElement* L1TPUM::regionsAvgEtBxP2_
private

Definition at line 42 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ regionsAvgNonZeroEtBx0_

MonitorElement* L1TPUM::regionsAvgNonZeroEtBx0_
private

Definition at line 47 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ regionsAvgNonZeroEtBxM2_

MonitorElement* L1TPUM::regionsAvgNonZeroEtBxM2_
private

Definition at line 48 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ regionsAvgNonZeroEtBxP2_

MonitorElement* L1TPUM::regionsAvgNonZeroEtBxP2_
private

Definition at line 46 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ regionSource_

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

Definition at line 35 of file L1TPUM.h.

Referenced by analyze().

◆ regionsPUMEtaBx0_

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

Definition at line 58 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ regionsPUMEtaBxM2_

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

Definition at line 59 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ regionsPUMEtaBxP2_

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

Definition at line 57 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ regionsTotalEtBx0_

MonitorElement* L1TPUM::regionsTotalEtBx0_
private

Definition at line 39 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ regionsTotalEtBxM2_

MonitorElement* L1TPUM::regionsTotalEtBxM2_
private

Definition at line 40 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

◆ regionsTotalEtBxP2_

MonitorElement* L1TPUM::regionsTotalEtBxP2_
private

Definition at line 38 of file L1TPUM.h.

Referenced by analyze(), and bookHistograms().

L1TPUM::regionsAvgEtBxP2_
MonitorElement * regionsAvgEtBxP2_
Definition: L1TPUM.h:42
L1TPUM::regionsAvgEtBx0_
MonitorElement * regionsAvgEtBx0_
Definition: L1TPUM.h:43
L1TPUM::regionBxEtSum_
MonitorElement * regionBxEtSum_
Definition: L1TPUM.h:55
etaBin
int etaBin(const l1t::HGCalMulticluster *cl)
Definition: L1EGammaEEProducer.cc:19
L1TPUM::regionsAvgEtBxM2_
MonitorElement * regionsAvgEtBxM2_
Definition: L1TPUM.h:44
edm::Handle
Definition: AssociativeIterator.h:50
L1TPUM::nonZeroRegionsBxP2_
MonitorElement * nonZeroRegionsBxP2_
Definition: L1TPUM.h:50
L1TPUM::nonZeroRegionsBxM2_
MonitorElement * nonZeroRegionsBxM2_
Definition: L1TPUM.h:52
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
L1TPUM::regionsAvgNonZeroEtBxP2_
MonitorElement * regionsAvgNonZeroEtBxP2_
Definition: L1TPUM.h:46
L1TPUM::regionsPUMEtaBxP2_
std::vector< MonitorElement * > regionsPUMEtaBxP2_
Definition: L1TPUM.h:57
L1TPUM::regionBxPopulation_
MonitorElement * regionBxPopulation_
Definition: L1TPUM.h:54
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1TPUM::histFolder_
std::string histFolder_
Definition: L1TPUM.h:36
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
L1TPUM::regionsPUMEtaBx0_
std::vector< MonitorElement * > regionsPUMEtaBx0_
Definition: L1TPUM.h:58
L1TPUM::nonZeroRegionsBx0_
MonitorElement * nonZeroRegionsBx0_
Definition: L1TPUM.h:51
L1TPUM::regionsTotalEtBx0_
MonitorElement * regionsTotalEtBx0_
Definition: L1TPUM.h:39
L1TPUM::regionsAvgNonZeroEtBx0_
MonitorElement * regionsAvgNonZeroEtBx0_
Definition: L1TPUM.h:47
HcalObjRepresent::Fill
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
Definition: HcalObjRepresent.h:1053
L1TPUM::regionsTotalEtBxM2_
MonitorElement * regionsTotalEtBxM2_
Definition: L1TPUM.h:40
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
L1TPUM::regionsPUMEtaBxM2_
std::vector< MonitorElement * > regionsPUMEtaBxM2_
Definition: L1TPUM.h:59
HLT_2018_cff.region
region
Definition: HLT_2018_cff.py:81479
L1TPUM::regionsAvgNonZeroEtBxM2_
MonitorElement * regionsAvgNonZeroEtBxM2_
Definition: L1TPUM.h:48
L1TPUM::regionsTotalEtBxP2_
MonitorElement * regionsTotalEtBxP2_
Definition: L1TPUM.h:38
edm::InputTag
Definition: InputTag.h:15
L1TPUM::regionSource_
edm::EDGetTokenT< L1CaloRegionCollection > regionSource_
Definition: L1TPUM.h:35