CMS 3D CMS Logo

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

#include <GEMStripDigiValidation.h>

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

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 GEMStripDigiValidation (const edm::ParameterSet &)
 
 ~GEMStripDigiValidation () override
 
- Public Member Functions inherited from GEMBaseValidation
 GEMBaseValidation (const edm::ParameterSet &, std::string)
 
 ~GEMBaseValidation () override=0
 
- 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
 

Private Attributes

edm::EDGetTokenT< edm::DetSetVector< GEMDigiSimLink > > digisimlink_token_
 
edm::ESGetToken< GEMGeometry, MuonGeometryRecordgeomToken_
 
edm::ESGetToken< GEMGeometry, MuonGeometryRecordgeomTokenBeginRun_
 
MonitorElementme_detail_bx_
 
MEMap3Ids me_detail_bx_layer_
 
MEMap2Ids me_detail_occ_det_
 
MEMap3Ids me_detail_occ_strip_
 
MEMap3Ids me_detail_occ_xy_
 
MEMap1Ids me_detail_occ_zr_
 
MEMap2Ids me_detail_strip_occ_det_
 
MEMap3Ids me_detail_strip_occ_eta_
 
MEMap3Ids me_detail_strip_occ_phi_
 
MEMap2Ids me_detail_total_strip_
 
MonitorElementme_detail_total_strip_all_
 
MEMap2Ids me_occ_pid_
 
MEMap3Ids me_occ_pid_eta_
 
edm::EDGetTokenT< edm::PSimHitContainersimhit_token_
 
edm::EDGetTokenT< GEMDigiCollectionstrip_token_
 

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 Member Functions inherited from GEMBaseValidation
template<typename T >
dqm::impl::MonitorElementbookDetectorOccupancy (DQMStore::IBooker &booker, const T &key, const GEMStation *station, const char *name_prfix, const char *title_prefix)
 
template<typename T >
dqm::impl::MonitorElementbookHist1D (DQMStore::IBooker &booker, const T &key, const char *name, const char *title, Int_t nbinsx, Double_t xlow, Double_t xup, const char *x_title="", const char *y_title="Entries")
 
template<typename T >
dqm::impl::MonitorElementbookHist2D (DQMStore::IBooker &booker, const T &key, const char *name, const char *title, Int_t nbinsx, Double_t xlow, Double_t xup, Int_t nbinsy, Double_t ylow, Double_t yup, const char *x_title="", const char *y_title="")
 
template<typename T >
dqm::impl::MonitorElementbookPIDHist (DQMStore::IBooker &booker, const T &key, const char *name, const char *title)
 
template<typename T >
dqm::impl::MonitorElementbookPIDHist (DQMStore::IBooker &booker, const T &key, Int_t ieta, const char *name, const char *title)
 
template<typename T >
dqm::impl::MonitorElementbookPolarOccupancy (DQMStore::IBooker &booker, const T &key, const char *name_prefix, const char *title_prefix)
 
template<typename T >
dqm::impl::MonitorElementbookXYOccupancy (DQMStore::IBooker &booker, const T &key, const char *name_prefix, const char *title_prefix)
 
dqm::impl::MonitorElementbookZROccupancy (DQMStore::IBooker &booker, Int_t region_id, const char *name_prfix, const char *title_prefix)
 
template<typename T >
dqm::impl::MonitorElementbookZROccupancy (DQMStore::IBooker &booker, const T &key, const char *name_prfix, const char *title_prefix)
 
Int_t getDetOccBinX (Int_t num_layers, Int_t chamber_id, Int_t layer_id)
 
Int_t getPidIdx (Int_t pid)
 
Bool_t isMuonSimHit (const PSimHit &)
 
Float_t toDegree (Float_t radian)
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 
- Protected Attributes inherited from GEMBaseValidation
Bool_t detail_plot_
 
std::vector< Double_t > eta_range_
 
edm::ESGetToken< GEMGeometry, MuonGeometryRecordgeomToken_
 
edm::ESGetToken< GEMGeometry, MuonGeometryRecordgeomTokenBeginRun_
 
const std::string kLogCategory_
 
const Int_t kMuonPDGId_ = 13
 
std::vector< Int_t > pid_list_
 
Int_t xy_occ_num_bins_
 
std::vector< Int_t > zr_occ_num_bins_
 
std::vector< Double_t > zr_occ_range_
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 10 of file GEMStripDigiValidation.h.

Constructor & Destructor Documentation

◆ GEMStripDigiValidation()

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

Definition at line 4 of file GEMStripDigiValidation.cc.

References digisimlink_token_, geomToken_, geomTokenBeginRun_, muonDTDigis_cfi::pset, simhit_token_, and strip_token_.

5  : GEMBaseValidation(pset, "GEMStripDigiValidation") {
6  const auto& strip_pset = pset.getParameterSet("gemStripDigi");
7  const auto& strip_tag = strip_pset.getParameter<edm::InputTag>("inputTag");
8  strip_token_ = consumes<GEMDigiCollection>(strip_tag);
9 
10  const auto& simhit_pset = pset.getParameterSet("gemSimHit");
11  const auto& simhit_tag = simhit_pset.getParameter<edm::InputTag>("inputTag");
12  simhit_token_ = consumes<edm::PSimHitContainer>(simhit_tag);
13 
14  const auto& digisimlink_tag = pset.getParameter<edm::InputTag>("gemDigiSimLink");
15  digisimlink_token_ = consumes<edm::DetSetVector<GEMDigiSimLink>>(digisimlink_tag);
16 
17  geomToken_ = esConsumes<GEMGeometry, MuonGeometryRecord>();
18  geomTokenBeginRun_ = esConsumes<GEMGeometry, MuonGeometryRecord, edm::Transition::BeginRun>();
19 }
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > geomTokenBeginRun_
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > geomToken_
edm::EDGetTokenT< edm::DetSetVector< GEMDigiSimLink > > digisimlink_token_
edm::EDGetTokenT< GEMDigiCollection > strip_token_
GEMBaseValidation(const edm::ParameterSet &, std::string)
edm::EDGetTokenT< edm::PSimHitContainer > simhit_token_

◆ ~GEMStripDigiValidation()

GEMStripDigiValidation::~GEMStripDigiValidation ( )
override

Definition at line 159 of file GEMStripDigiValidation.cc.

159 {}

Member Function Documentation

◆ analyze()

void GEMStripDigiValidation::analyze ( const edm::Event event,
const edm::EventSetup setup 
)
overridevirtual

Implements GEMBaseValidation.

Definition at line 161 of file GEMStripDigiValidation.cc.

References funct::abs(), nano_mu_digi_cff::bx, GEMBaseValidation::detail_plot_, digisimlink_token_, dqm::impl::MonitorElement::Fill(), mixOne_premix_on_sim_cfi::gem, geomToken_, GEMBaseValidation::getDetOccBinX(), GEMBaseValidation::getPidIdx(), hcalRecHitTable_cff::ieta, GEMBaseValidation::isMuonSimHit(), edm::HandleBase::isValid(), crabWrapper::key, GEMBaseValidation::kLogCategory_, electronStore::links, me_detail_bx_, me_detail_bx_layer_, me_detail_occ_det_, me_detail_occ_strip_, me_detail_occ_xy_, me_detail_occ_zr_, me_detail_strip_occ_det_, me_detail_strip_occ_eta_, me_detail_strip_occ_phi_, me_detail_total_strip_, me_detail_total_strip_all_, me_occ_pid_, me_occ_pid_eta_, PV3DBase< T, PVType, FrameType >::perp(), edm::Handle< T >::product(), FastTimerService_cff::range, nano_mu_digi_cff::region, GEMDetId::region(), nano_mu_digi_cff::roll, singleTopDQM_cfi::setup, simhit_token_, relativeConstraints::station, nano_mu_digi_cff::strip, strip_token_, GEMBaseValidation::toDegree(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

161  {
162  const auto& gemH = setup.getHandle(geomToken_);
163  if (!gemH.isValid()) {
164  edm::LogError(kLogCategory_) << "Failed to initialize GEM geometry.";
165  return;
166  }
167  const GEMGeometry* gem = gemH.product();
168 
170  event.getByToken(digisimlink_token_, digiSimLink);
171  if (not digiSimLink.isValid()) {
172  edm::LogError(kLogCategory_) << "Failed to get GEMDigiSimLink." << std::endl;
173  return;
174  }
175 
176  edm::Handle<edm::PSimHitContainer> simhit_container;
177  event.getByToken(simhit_token_, simhit_container);
178  if (not simhit_container.isValid()) {
179  edm::LogError(kLogCategory_) << "Failed to get PSimHitContainer." << std::endl;
180  return;
181  }
182 
183  edm::Handle<GEMDigiCollection> digi_collection;
184  event.getByToken(strip_token_, digi_collection);
185  if (not digi_collection.isValid()) {
186  edm::LogError(kLogCategory_) << "Cannot get strips by Token stripToken." << std::endl;
187  return;
188  }
189 
190  // NOTE
191  Int_t total_strip = 0;
192  std::map<ME2IdsKey, Int_t> total_strip_2IdsMap;
193  for (const auto digi_pair : *digi_collection) {
194  GEMDetId id = digi_pair.first;
195  if (gem->idToDet(id) == nullptr) {
196  edm::LogError(kLogCategory_) << "Getting DetId failed. Discard this gem strip hit. Maybe it comes "
197  << "from unmatched geometry." << std::endl;
198  continue;
199  }
200 
201  Int_t region_id = id.region();
202  Int_t layer_id = id.layer();
203  Int_t station_id = id.station();
204  Int_t chamber_id = id.chamber();
205  Int_t ieta = id.ieta();
206  Int_t num_layers = id.nlayers();
207 
208  ME2IdsKey key2{region_id, station_id};
209  ME3IdsKey key3{region_id, station_id, layer_id};
210  Int_t bin_x = getDetOccBinX(num_layers, chamber_id, layer_id);
211 
212  const BoundPlane& surface = gem->idToDet(id)->surface();
213  const GEMEtaPartition* roll = gem->etaPartition(id);
214 
215  const GEMDigiCollection::Range& range = digi_pair.second;
216  auto links = digiSimLink->find(id);
217  if (links == digiSimLink->end())
218  continue;
219 
220  for (auto digi = range.first; digi != range.second; ++digi) {
221  total_strip++;
222  total_strip_2IdsMap[key2]++;
223  Int_t strip = digi->strip();
224  Int_t bx = digi->bx();
225  bx = bx < -10 ? -10 : bx;
226  bx = bx > 10 ? 10 : bx;
227 
228  GlobalPoint strip_global_pos = surface.toGlobal(roll->centreOfStrip(strip));
229 
230  Float_t digi_g_x = strip_global_pos.x();
231  Float_t digi_g_y = strip_global_pos.y();
232  Float_t digi_g_r = strip_global_pos.perp();
233  Float_t digi_g_abs_z = std::abs(strip_global_pos.z());
234 
235  if (detail_plot_) {
237  me_detail_bx_layer_[key3]->Fill(bx);
238 
239  me_detail_occ_zr_[region_id]->Fill(digi_g_abs_z, digi_g_r);
240  me_detail_occ_det_[key2]->Fill(bin_x, ieta);
241  me_detail_occ_xy_[key3]->Fill(digi_g_x, digi_g_y);
242  me_detail_occ_strip_[key3]->Fill(strip);
243  }
244  }
245  } // range loop
246  if (detail_plot_) {
247  me_detail_total_strip_all_->Fill(total_strip);
248  for (const auto& region : gem->regions()) {
249  Int_t region_id = region->region();
250  for (const auto& station : region->stations()) {
251  Int_t station_id = station->station();
252  ME2IdsKey key2{region_id, station_id};
253  me_detail_total_strip_[key2]->Fill(total_strip_2IdsMap[key2]);
254  }
255  }
256  }
257 
258  // NOTE
259  for (const auto& simhit : *simhit_container.product()) {
260  if (gem->idToDet(simhit.detUnitId()) == nullptr) {
261  edm::LogError(kLogCategory_) << "SimHit did not match with GEMGeometry." << std::endl;
262  continue;
263  }
264 
265  GEMDetId simhit_gemid(simhit.detUnitId());
266 
267  Int_t region_id = simhit_gemid.region();
268  Int_t station_id = simhit_gemid.station();
269  Int_t layer_id = simhit_gemid.layer();
270  Int_t chamber_id = simhit_gemid.chamber();
271  Int_t ieta = simhit_gemid.ieta();
272  Int_t num_layers = simhit_gemid.nlayers();
273 
274  ME3IdsKey key{region_id, station_id, ieta};
275  ME2IdsKey key2{region_id, station_id};
276  ME3IdsKey key3{region_id, station_id, layer_id};
277 
278  const GEMEtaPartition* roll = gem->etaPartition(simhit_gemid);
279 
280  const auto& simhit_local_pos = simhit.localPosition();
281  const auto& simhit_global_pos = roll->surface().toGlobal(simhit_local_pos);
282 
283  Float_t simhit_g_eta = std::abs(simhit_global_pos.eta());
284  Float_t simhit_g_phi = toDegree(simhit_global_pos.phi());
285 
286  auto simhit_trackId = simhit.trackId();
287 
288  Int_t bin_x = getDetOccBinX(num_layers, chamber_id, layer_id);
289 
290  auto links = digiSimLink->find(simhit_gemid);
291  if (links == digiSimLink->end())
292  continue;
293 
294  for (const auto& link : *links) {
295  if (simhit_trackId == link.getTrackId()) {
296  Int_t pid = simhit.particleType();
297  Int_t pid_idx = getPidIdx(pid);
298 
299  me_occ_pid_[key2]->Fill(pid_idx);
300  me_occ_pid_eta_[key]->Fill(pid_idx);
301 
302  if (detail_plot_) {
303  if (isMuonSimHit(simhit)) {
304  me_detail_strip_occ_eta_[key3]->Fill(simhit_g_eta);
305  me_detail_strip_occ_phi_[key3]->Fill(simhit_g_phi);
306  me_detail_strip_occ_det_[key2]->Fill(bin_x, ieta);
307  }
308  }
309  break;
310  }
311  }
312  } // simhit_container loop
313 }
T perp() const
Definition: PV3DBase.h:69
constexpr int region() const
Definition: GEMDetId.h:171
T z() const
Definition: PV3DBase.h:61
Bool_t isMuonSimHit(const PSimHit &)
T const * product() const
Definition: Handle.h:70
MonitorElement * me_detail_total_strip_all_
Log< level::Error, false > LogError
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > geomToken_
void Fill(long long x)
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
edm::EDGetTokenT< edm::DetSetVector< GEMDigiSimLink > > digisimlink_token_
Int_t getPidIdx(Int_t pid)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
edm::EDGetTokenT< GEMDigiCollection > strip_token_
std::pair< const_iterator, const_iterator > Range
bool isValid() const
Definition: HandleBase.h:70
edm::EDGetTokenT< edm::PSimHitContainer > simhit_token_
std::tuple< Int_t, Int_t > ME2IdsKey
Float_t toDegree(Float_t radian)
std::tuple< Int_t, Int_t, Int_t > ME3IdsKey
Int_t getDetOccBinX(Int_t num_layers, Int_t chamber_id, Int_t layer_id)
const std::string kLogCategory_

◆ bookHistograms()

void GEMStripDigiValidation::bookHistograms ( DQMStore::IBooker booker,
edm::Run const &  run,
edm::EventSetup const &  setup 
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 21 of file GEMStripDigiValidation.cc.

References dqm::implementation::IBooker::book1D(), GEMBaseValidation::bookDetectorOccupancy(), GEMBaseValidation::bookHist1D(), GEMBaseValidation::bookPIDHist(), GEMBaseValidation::bookXYOccupancy(), GEMBaseValidation::bookZROccupancy(), relativeConstraints::chamber, GEMSuperChamber::chambers(), chambers, GEMBaseValidation::detail_plot_, GEMBaseValidation::eta_range_, mixOne_premix_on_sim_cfi::gem, geomTokenBeginRun_, hcalRecHitTable_cff::ieta, crabWrapper::key, GEMBaseValidation::kLogCategory_, me_detail_bx_, me_detail_bx_layer_, me_detail_occ_det_, me_detail_occ_strip_, me_detail_occ_xy_, me_detail_occ_zr_, me_detail_strip_occ_det_, me_detail_strip_occ_eta_, me_detail_strip_occ_phi_, me_detail_total_strip_, me_detail_total_strip_all_, me_occ_pid_, me_occ_pid_eta_, nano_mu_digi_cff::region, dqm::implementation::NavigatorBase::setCurrentFolder(), singleTopDQM_cfi::setup, and relativeConstraints::station.

23  {
24  const auto gemH = setup.getHandle(geomTokenBeginRun_);
25  if (!gemH.isValid()) {
26  edm::LogError(kLogCategory_) << "Failed to initialize GEM geometry.";
27  return;
28  }
29  const GEMGeometry* gem = gemH.product();
30 
31  // NOTE Bunch Crossing
32  booker.setCurrentFolder("GEM/Digis");
33 
34  if (detail_plot_) {
35  me_detail_bx_ = booker.book1D("bx", "Strip Digi Bunch Crossing", 5, -2.5, 2.5);
36 
37  for (const auto& region : gem->regions()) {
38  if (region == nullptr) {
39  edm::LogError(kLogCategory_) << "Null region";
40  continue;
41  }
42  Int_t region_id = region->region();
43  for (const auto& station : region->stations()) {
44  if (station == nullptr) {
45  edm::LogError(kLogCategory_) << "Null station for region = " << region_id;
46  continue;
47  }
48  Int_t station_id = station->station();
49 
50  const auto& superChamberVec = station->superChambers();
51  if (superChamberVec.empty()) {
52  edm::LogError(kLogCategory_) << "Super chambers missing for region = " << region_id
53  << " and station = " << station_id;
54  continue;
55  }
56  const GEMSuperChamber* super_chamber = superChamberVec.front();
57  if (super_chamber == nullptr) {
58  edm::LogError(kLogCategory_) << "Failed to find super chamber for region = " << region_id
59  << " and station = " << station_id;
60  continue;
61  }
62  for (const auto& chamber : super_chamber->chambers()) {
63  Int_t layer_id = chamber->id().layer();
64  ME3IdsKey key3(region_id, station_id, layer_id);
65 
66  me_detail_bx_layer_[key3] =
67  bookHist1D(booker, key3, "bx", "Strip Digi Bunch Crossing", 5, -2.5, 2.5, "Bunch crossing");
68  } // chamber loop
69  } // station loop
70  } // region loop
71  }
72 
73  // NOTE Occupancy
74  if (detail_plot_)
76  booker.book1D("total_strips_per_event", "Number of strip digi per event", 50, -0.5, 395.5);
77 
78  for (const auto& region : gem->regions()) {
79  Int_t region_id = region->region();
80 
81  if (detail_plot_)
82  me_detail_occ_zr_[region_id] = bookZROccupancy(booker, region_id, "strip", "Strip Digi");
83 
84  for (const auto& station : region->stations()) {
85  Int_t station_id = station->station();
86  ME2IdsKey key2{region_id, station_id};
87 
88  me_occ_pid_[key2] = bookPIDHist(booker, key2, "sim_occ_pid", "Particle population");
89 
90  if (detail_plot_) {
92  bookHist1D(booker, key2, "total_strips_per_event", "Number of strip digs per event", 50, -0.5, 99.5);
93 
94  me_detail_occ_det_[key2] = bookDetectorOccupancy(booker, key2, station, "strip", "Strip Digi");
95 
97  bookDetectorOccupancy(booker, key2, station, "sim_matched_strip", "Matched Strip Digi");
98  }
99 
100  const auto& superChamberVec = station->superChambers();
101  if (superChamberVec.empty() || superChamberVec[0] == nullptr) {
102  edm::LogError(kLogCategory_) << "Super chambers missing or null for region = " << region_id
103  << " and station = " << station_id;
104  } else {
105  for (const auto& etaPart : superChamberVec[0]->chambers()[0]->etaPartitions()) {
106  Int_t ieta = etaPart->id().ieta();
107  ME3IdsKey key{region_id, station_id, ieta};
108  me_occ_pid_eta_[key] = bookPIDHist(booker, key2, ieta, "sim_occ_pid", "Particle population");
109  }
110  for (const auto& chamber : superChamberVec[0]->chambers()) {
111  if (chamber == nullptr) {
112  edm::LogError(kLogCategory_) << "Null chamber for region, station, super chamber = (" << region_id << ", "
113  << station_id << ", " << superChamberVec[0]->id() << ")";
114  continue;
115  }
116  Int_t layer_id = chamber->id().layer();
117  ME3IdsKey key3{region_id, station_id, layer_id};
118 
119  const auto& etaPartitionsVec = chamber->etaPartitions();
120  if (etaPartitionsVec.empty() || etaPartitionsVec.front() == nullptr) {
122  << "Eta partition missing or null for region, station, super chamber, chamber = (" << region_id << ", "
123  << station_id << ", " << superChamberVec[0]->id() << ", " << chamber->id() << ")";
124  continue;
125  }
126 
127  if (detail_plot_) {
128  Int_t num_strips = etaPartitionsVec.front()->nstrips();
129 
130  me_detail_strip_occ_eta_[key3] = bookHist1D(booker,
131  key3,
132  "sim_matched_occ_eta",
133  "Matched Strip Eta Occupancy",
134  16,
135  eta_range_[station_id * 2 + 0],
136  eta_range_[station_id * 2 + 1],
137  "#eta");
138 
140  booker, key3, "sim_matched_occ_phi", "Matched Strip Phi Occupancy", 36, -5, 355, "#phi [degrees]");
141 
142  me_detail_occ_xy_[key3] = bookXYOccupancy(booker, key3, "strip", "Strip Digi");
143 
144  me_detail_occ_strip_[key3] = bookHist1D(booker,
145  key3,
146  "occ_strip",
147  "Strip Digi Occupancy per strip number",
148  num_strips,
149  0.5,
150  num_strips + 0.5,
151  "strip number");
152  }
153  } // chamber
154  } // end else
155  } // station looop
156  } // region loop
157 }
dqm::impl::MonitorElement * bookHist1D(DQMStore::IBooker &booker, const T &key, const char *name, const char *title, Int_t nbinsx, Double_t xlow, Double_t xup, const char *x_title="", const char *y_title="Entries")
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > geomTokenBeginRun_
MonitorElement * me_detail_total_strip_all_
Log< level::Error, false > LogError
dqm::impl::MonitorElement * bookZROccupancy(DQMStore::IBooker &booker, Int_t region_id, const char *name_prfix, const char *title_prefix)
dqm::impl::MonitorElement * bookXYOccupancy(DQMStore::IBooker &booker, const T &key, const char *name_prefix, const char *title_prefix)
std::vector< Double_t > eta_range_
std::tuple< Int_t, Int_t > ME2IdsKey
std::tuple< Int_t, Int_t, Int_t > ME3IdsKey
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
static char chambers[264][20]
Definition: ReadPGInfo.cc:243
dqm::impl::MonitorElement * bookPIDHist(DQMStore::IBooker &booker, const T &key, const char *name, const char *title)
const std::string kLogCategory_
const std::vector< const GEMChamber * > & chambers() const
Return the chambers in the super chamber.
dqm::impl::MonitorElement * bookDetectorOccupancy(DQMStore::IBooker &booker, const T &key, const GEMStation *station, const char *name_prfix, const char *title_prefix)

Member Data Documentation

◆ digisimlink_token_

edm::EDGetTokenT<edm::DetSetVector<GEMDigiSimLink> > GEMStripDigiValidation::digisimlink_token_
private

Definition at line 21 of file GEMStripDigiValidation.h.

Referenced by analyze(), and GEMStripDigiValidation().

◆ geomToken_

edm::ESGetToken<GEMGeometry, MuonGeometryRecord> GEMStripDigiValidation::geomToken_
private

Definition at line 22 of file GEMStripDigiValidation.h.

Referenced by analyze(), and GEMStripDigiValidation().

◆ geomTokenBeginRun_

edm::ESGetToken<GEMGeometry, MuonGeometryRecord> GEMStripDigiValidation::geomTokenBeginRun_
private

Definition at line 23 of file GEMStripDigiValidation.h.

Referenced by bookHistograms(), and GEMStripDigiValidation().

◆ me_detail_bx_

MonitorElement* GEMStripDigiValidation::me_detail_bx_
private

Definition at line 36 of file GEMStripDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ me_detail_bx_layer_

MEMap3Ids GEMStripDigiValidation::me_detail_bx_layer_
private

Definition at line 37 of file GEMStripDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ me_detail_occ_det_

MEMap2Ids GEMStripDigiValidation::me_detail_occ_det_
private

Definition at line 31 of file GEMStripDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ me_detail_occ_strip_

MEMap3Ids GEMStripDigiValidation::me_detail_occ_strip_
private

Definition at line 33 of file GEMStripDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ me_detail_occ_xy_

MEMap3Ids GEMStripDigiValidation::me_detail_occ_xy_
private

Definition at line 32 of file GEMStripDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ me_detail_occ_zr_

MEMap1Ids GEMStripDigiValidation::me_detail_occ_zr_
private

Definition at line 30 of file GEMStripDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ me_detail_strip_occ_det_

MEMap2Ids GEMStripDigiValidation::me_detail_strip_occ_det_
private

Definition at line 44 of file GEMStripDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ me_detail_strip_occ_eta_

MEMap3Ids GEMStripDigiValidation::me_detail_strip_occ_eta_
private

Definition at line 42 of file GEMStripDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ me_detail_strip_occ_phi_

MEMap3Ids GEMStripDigiValidation::me_detail_strip_occ_phi_
private

Definition at line 43 of file GEMStripDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ me_detail_total_strip_

MEMap2Ids GEMStripDigiValidation::me_detail_total_strip_
private

Definition at line 29 of file GEMStripDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ me_detail_total_strip_all_

MonitorElement* GEMStripDigiValidation::me_detail_total_strip_all_
private

Definition at line 28 of file GEMStripDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ me_occ_pid_

MEMap2Ids GEMStripDigiValidation::me_occ_pid_
private

Definition at line 40 of file GEMStripDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ me_occ_pid_eta_

MEMap3Ids GEMStripDigiValidation::me_occ_pid_eta_
private

Definition at line 41 of file GEMStripDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ simhit_token_

edm::EDGetTokenT<edm::PSimHitContainer> GEMStripDigiValidation::simhit_token_
private

Definition at line 20 of file GEMStripDigiValidation.h.

Referenced by analyze(), and GEMStripDigiValidation().

◆ strip_token_

edm::EDGetTokenT<GEMDigiCollection> GEMStripDigiValidation::strip_token_
private

Definition at line 19 of file GEMStripDigiValidation.h.

Referenced by analyze(), and GEMStripDigiValidation().