CMS 3D CMS Logo

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

#include <GEMPadDigiValidation.h>

Inheritance diagram for GEMPadDigiValidation:
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
 
 GEMPadDigiValidation (const edm::ParameterSet &)
 
 ~GEMPadDigiValidation () 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_
 
MEMap3Ids me_detail_bx_
 
MEMap2Ids me_detail_occ_det_
 
MEMap3Ids me_detail_occ_pad_
 
MEMap3Ids me_detail_occ_phi_pad_
 
MEMap3Ids me_detail_occ_xy_
 
MEMap1Ids me_detail_occ_zr_
 
MEMap2Ids me_detail_pad_occ_det_
 
MEMap3Ids me_occ_total_pad_
 
MEMap3Ids me_pad_occ_eta_
 
MEMap3Ids me_pad_occ_phi_
 
edm::EDGetTokenT< GEMPadDigiCollectionpad_token_
 
edm::EDGetTokenT< edm::PSimHitContainersimhit_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 GEMPadDigiValidation.h.

Constructor & Destructor Documentation

◆ GEMPadDigiValidation()

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

Definition at line 3 of file GEMPadDigiValidation.cc.

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

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

◆ ~GEMPadDigiValidation()

GEMPadDigiValidation::~GEMPadDigiValidation ( )
override

Definition at line 141 of file GEMPadDigiValidation.cc.

141 {}

Member Function Documentation

◆ analyze()

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

Implements GEMBaseValidation.

Definition at line 143 of file GEMPadDigiValidation.cc.

References funct::abs(), nano_mu_digi_cff::bx, relativeConstraints::chamber, GEMDetId::chamber(), GEMSuperChamber::chambers(), universalConfigTemplate::collection, GEMBaseValidation::detail_plot_, digisimlink_token_, nano_mu_local_reco_cff::g_phi, nano_mu_local_reco_cff::g_r, nano_mu_local_reco_cff::g_x, nano_mu_local_reco_cff::g_y, mixOne_premix_on_sim_cfi::gem, geomToken_, GEMBaseValidation::getDetOccBinX(), hcalRecHitTable_cff::ieta, GEMDetId::ieta(), GEMBaseValidation::isMuonSimHit(), edm::HandleBase::isValid(), GEMBaseValidation::kLogCategory_, GEMDetId::layer(), electronStore::links, me_detail_bx_, me_detail_occ_det_, me_detail_occ_pad_, me_detail_occ_phi_pad_, me_detail_occ_xy_, me_detail_occ_zr_, me_detail_pad_occ_det_, me_occ_total_pad_, me_pad_occ_eta_, me_pad_occ_phi_, GEMDetId::nlayers(), pad_token_, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), edm::Handle< T >::product(), isotrackApplyRegressor::range, nano_mu_digi_cff::region, GEMDetId::region(), nano_mu_digi_cff::roll, singleTopDQM_cfi::setup, simhit_token_, relativeConstraints::station, GEMDetId::station(), GEMBaseValidation::toDegree(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

143  {
144  const auto& gemH = setup.getHandle(geomToken_);
145  if (!gemH.isValid()) {
146  edm::LogError(kLogCategory_) << "Failed to initialize GEM geometry.";
147  return;
148  }
149  const GEMGeometry* gem = gemH.product();
150 
152  event.getByToken(pad_token_, collection);
153  if (not collection.isValid()) {
154  edm::LogError(kLogCategory_) << "Cannot get pads by label GEMPadToken.";
155  return;
156  }
157 
159  event.getByToken(digisimlink_token_, digiSimLink);
160  if (not digiSimLink.isValid()) {
161  edm::LogError(kLogCategory_) << "Failed to get GEMDigiSimLink." << std::endl;
162  return;
163  }
164 
165  edm::Handle<edm::PSimHitContainer> simhit_container;
166  event.getByToken(simhit_token_, simhit_container);
167  if (not simhit_container.isValid()) {
168  edm::LogError(kLogCategory_) << "Failed to get PSimHitContainer." << std::endl;
169  return;
170  }
171 
172  std::map<ME3IdsKey, Int_t> total_pad;
173  for (const auto& pad_pair : *collection) {
174  GEMDetId gemid = pad_pair.first;
175  const auto& range = pad_pair.second;
176 
177  if (gem->idToDet(gemid) == nullptr) {
178  edm::LogError(kLogCategory_) << "Getting DetId failed. Discard this gem pad hit. "
179  << "Maybe it comes from unmatched geometry." << std::endl;
180  continue;
181  }
182 
183  const GEMEtaPartition* roll = gem->etaPartition(gemid);
184  const BoundPlane& surface = roll->surface();
185 
186  Int_t region_id = gemid.region();
187  Int_t station_id = gemid.station();
188  Int_t layer_id = gemid.layer();
189  Int_t chamber_id = gemid.chamber();
190  Int_t ieta = gemid.ieta();
191  Int_t num_layers = gemid.nlayers();
192 
193  ME2IdsKey key2(region_id, station_id);
194  ME3IdsKey key3(region_id, station_id, layer_id);
195 
196  for (auto digi = range.first; digi != range.second; ++digi) {
197  total_pad[key3]++;
198 
199  Int_t pad = digi->pad();
200  Int_t bx = digi->bx();
201 
202  const LocalPoint& local_pos = roll->centreOfPad(pad);
203  const GlobalPoint& global_pos = surface.toGlobal(local_pos);
204 
205  Float_t g_r = global_pos.perp();
206  Float_t g_phi = global_pos.phi();
207  Float_t g_x = global_pos.x();
208  Float_t g_y = global_pos.y();
209  Float_t g_abs_z = std::fabs(global_pos.z());
210 
211  Int_t bin_x = getDetOccBinX(num_layers, chamber_id, layer_id);
212 
213  if (detail_plot_) {
214  me_detail_occ_zr_[region_id]->Fill(g_abs_z, g_r);
215  me_detail_occ_xy_[key3]->Fill(g_x, g_y);
216  me_detail_occ_phi_pad_[key3]->Fill(g_phi, pad);
217  me_detail_occ_pad_[key3]->Fill(pad);
218  me_detail_occ_det_[key2]->Fill(bin_x, ieta);
219  me_detail_bx_[key3]->Fill(bx);
220  } // if detail_plot
221  } // digi loop
222  } // range loop
223 
224  for (const auto& region : gem->regions()) {
225  Int_t region_id = region->region();
226  for (const auto& station : region->stations()) {
227  Int_t station_id = station->station();
228  const auto& superChamberVec = station->superChambers();
229  if (superChamberVec.empty()) {
230  edm::LogError(kLogCategory_) << "Super chambers missing for region = " << region_id
231  << " and station = " << station_id;
232  continue;
233  }
234  const GEMSuperChamber* super_chamber = superChamberVec.front();
235  if (super_chamber == nullptr) {
236  edm::LogError(kLogCategory_) << "Failed to find super chamber for region = " << region_id
237  << " and station = " << station_id;
238  continue;
239  }
240  for (const auto& chamber : super_chamber->chambers()) {
241  Int_t layer_id = chamber->id().layer();
242  ME3IdsKey key3{region_id, station_id, layer_id};
243  me_occ_total_pad_[key3]->Fill(total_pad[key3]);
244  }
245  }
246  }
247 
248  // NOTE
249  for (const auto& simhit : *simhit_container.product()) {
250  if (not isMuonSimHit(simhit))
251  continue;
252  if (gem->idToDet(simhit.detUnitId()) == nullptr) {
253  edm::LogError(kLogCategory_) << "SimHit did not match with GEMGeometry." << std::endl;
254  continue;
255  }
256 
257  GEMDetId simhit_gemid(simhit.detUnitId());
258 
259  Int_t region_id = simhit_gemid.region();
260  Int_t station_id = simhit_gemid.station();
261  Int_t layer_id = simhit_gemid.layer();
262  Int_t chamber_id = simhit_gemid.chamber();
263  Int_t ieta = simhit_gemid.ieta();
264  Int_t num_layers = simhit_gemid.nlayers();
265 
266  ME2IdsKey key2{region_id, station_id};
267  ME3IdsKey key3{region_id, station_id, layer_id};
268 
269  const GEMEtaPartition* roll = gem->etaPartition(simhit_gemid);
270 
271  const auto& simhit_local_pos = simhit.localPosition();
272  const auto& simhit_global_pos = roll->surface().toGlobal(simhit_local_pos);
273 
274  Float_t simhit_g_eta = std::abs(simhit_global_pos.eta());
275  Float_t simhit_g_phi = toDegree(simhit_global_pos.phi());
276 
277  auto simhit_trackId = simhit.trackId();
278 
279  Int_t bin_x = getDetOccBinX(num_layers, chamber_id, layer_id);
280 
281  auto links = digiSimLink->find(simhit_gemid);
282  if (links == digiSimLink->end())
283  continue;
284 
285  Int_t simhit_strip = -1;
286  for (const auto& link : *links) {
287  if (simhit_trackId == link.getTrackId()) {
288  simhit_strip = link.getStrip();
289  break;
290  }
291  }
292  Int_t simhit_pad = roll->padOfStrip(simhit_strip);
293  auto range = collection->get(simhit_gemid);
294  for (auto pad = range.first; pad != range.second; ++pad) {
295  if (pad->pad() == simhit_pad) {
296  me_pad_occ_eta_[key3]->Fill(simhit_g_eta);
297  me_pad_occ_phi_[key3]->Fill(simhit_g_phi);
298  if (detail_plot_) {
299  me_detail_pad_occ_det_[key2]->Fill(bin_x, ieta);
300  }
301  break;
302  }
303  }
304  } // simhit_container loop
305 }
constexpr int station() const
Definition: GEMDetId.h:179
T perp() const
Definition: PV3DBase.h:69
constexpr int region() const
Definition: GEMDetId.h:171
T z() const
Definition: PV3DBase.h:61
edm::EDGetTokenT< GEMPadDigiCollection > pad_token_
edm::EDGetTokenT< edm::PSimHitContainer > simhit_token_
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
Bool_t isMuonSimHit(const PSimHit &)
T const * product() const
Definition: Handle.h:70
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > geomToken_
Log< level::Error, false > LogError
constexpr int layer() const
Definition: GEMDetId.h:190
constexpr int chamber() const
Definition: GEMDetId.h:183
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
edm::EDGetTokenT< edm::DetSetVector< GEMDigiSimLink > > digisimlink_token_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
constexpr int ieta() const
Definition: GEMDetId.h:199
bool isValid() const
Definition: HandleBase.h:70
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_
constexpr int nlayers() const
Definition: GEMDetId.h:213
const std::vector< const GEMChamber * > & chambers() const
Return the chambers in the super chamber.

◆ bookHistograms()

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

Implements DQMEDAnalyzer.

Definition at line 20 of file GEMPadDigiValidation.cc.

References GEMBaseValidation::bookDetectorOccupancy(), GEMBaseValidation::bookHist1D(), GEMBaseValidation::bookHist2D(), GEMBaseValidation::bookXYOccupancy(), GEMBaseValidation::bookZROccupancy(), relativeConstraints::chamber, GEMSuperChamber::chambers(), GEMBaseValidation::detail_plot_, GEMBaseValidation::eta_range_, mixOne_premix_on_sim_cfi::gem, geomTokenBeginRun_, GEMSuperChamber::id(), GEMBaseValidation::kLogCategory_, M_PI, me_detail_bx_, me_detail_occ_det_, me_detail_occ_pad_, me_detail_occ_phi_pad_, me_detail_occ_xy_, me_detail_occ_zr_, me_detail_pad_occ_det_, me_occ_total_pad_, me_pad_occ_eta_, me_pad_occ_phi_, nano_mu_digi_cff::region, dqm::implementation::NavigatorBase::setCurrentFolder(), singleTopDQM_cfi::setup, and relativeConstraints::station.

22  {
23  const auto gemH = setup.getHandle(geomTokenBeginRun_);
24  if (!gemH.isValid()) {
25  edm::LogError(kLogCategory_) << "Failed to initialize GEM geometry.";
26  return;
27  }
28  const GEMGeometry* gem = gemH.product();
29 
30  // NOTE Occupancy
31  booker.setCurrentFolder("GEM/Pad");
32 
33  for (const auto& region : gem->regions()) {
34  Int_t region_id = region->region();
35 
36  if (detail_plot_)
37  me_detail_occ_zr_[region_id] = bookZROccupancy(booker, region_id, "pad", "Pad");
38 
39  for (const auto& station : region->stations()) {
40  Int_t station_id = station->station();
41  ME2IdsKey key2(region_id, station_id);
42 
43  if (detail_plot_) {
44  me_detail_occ_det_[key2] = bookDetectorOccupancy(booker, key2, station, "pad", "Pad");
45  me_detail_pad_occ_det_[key2] = bookDetectorOccupancy(booker, key2, station, "sim_matched", "Matched Pad");
46  }
47 
48  const auto& superChamberVec = station->superChambers();
49  if (superChamberVec.empty()) {
50  edm::LogError(kLogCategory_) << "Super chambers missing for region = " << region_id
51  << " and station = " << station_id;
52  continue;
53  }
54  const GEMSuperChamber* super_chamber = superChamberVec.front();
55  if (super_chamber == nullptr) {
56  edm::LogError(kLogCategory_) << "Failed to find super chamber for region = " << region_id
57  << " and station = " << station_id;
58  continue;
59  }
60  for (const auto& chamber : super_chamber->chambers()) {
61  Int_t layer_id = chamber->id().layer();
62  ME3IdsKey key3(region_id, station_id, layer_id);
63 
64  const auto& etaPartitionVec = chamber->etaPartitions();
65  if (etaPartitionVec.empty() || etaPartitionVec.front() == nullptr) {
67  << "Eta partition missing or null for region, station, super chamber, chamber = (" << region_id << ", "
68  << station_id << ", " << super_chamber->id() << ", " << chamber->id() << ")";
69  continue;
70  }
71  Int_t num_pads = etaPartitionVec.front()->npads();
72 
73  me_occ_total_pad_[key3] =
74  bookHist1D(booker, key3, "total_pads_per_event", "Number of pad digis per event", 50, 0, 50);
75 
76  me_pad_occ_eta_[key3] = bookHist1D(booker,
77  key3,
78  "sim_matched_occ_eta",
79  "Matched Pad Eta Occupancy",
80  16,
81  eta_range_[station_id * 2 + 0],
82  eta_range_[station_id * 2 + 1],
83  "#eta");
84 
85  me_pad_occ_phi_[key3] =
86  bookHist1D(booker, key3, "sim_matched_occ_phi", "Matched Pad Phi Occupancy", 36, -5, 355, "#phi [degrees]");
87 
88  if (detail_plot_) {
89  me_detail_occ_xy_[key3] = bookXYOccupancy(booker, key3, "pad", "Pad");
90 
91  me_detail_occ_phi_pad_[key3] = bookHist2D(booker,
92  key3,
93  "occ_phi_pad",
94  "Pad Occupancy",
95  280,
96  -M_PI,
97  M_PI,
98  num_pads / 2,
99  0,
100  num_pads,
101  "#phi [rad]",
102  "Pad number");
103 
104  me_detail_occ_pad_[key3] =
105  bookHist1D(booker, key3, "occ_pad", "Pad Occupancy", num_pads, 0, num_pads, "Pad number");
106  }
107  } // layer loop
108  } // station loop
109  } // region loop
110 
111  // NOTE Bunch Crossing
112  if (detail_plot_) {
113  for (const auto& region : gem->regions()) {
114  Int_t region_id = region->region();
115  for (const auto& station : region->stations()) {
116  Int_t station_id = station->station();
117 
118  const auto& superChamberVec = station->superChambers();
119  if (superChamberVec.empty()) {
120  edm::LogError(kLogCategory_) << "Super chambers missing for region = " << region_id
121  << " and station = " << station_id;
122  continue;
123  }
124  const GEMSuperChamber* super_chamber = superChamberVec.front();
125  if (super_chamber == nullptr) {
126  edm::LogError(kLogCategory_) << "Failed to find super chamber for region = " << region_id
127  << " and station = " << station_id;
128  continue;
129  }
130  for (const auto& chamber : super_chamber->chambers()) {
131  Int_t layer_id = chamber->id().layer();
132  ME3IdsKey key3(region_id, station_id, layer_id);
133 
134  me_detail_bx_[key3] = bookHist1D(booker, key3, "bx", "Pad Bunch Crossing", 5, -2, 3, "Bunch crossing");
135  } // chamber loop
136  } // station loop
137  } // region loop
138  } // detail plot
139 }
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
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_
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > geomTokenBeginRun_
dqm::impl::MonitorElement * bookHist2D(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="")
#define M_PI
GEMDetId id() const
Return the GEMDetId of this super chamber.
std::tuple< Int_t, Int_t > ME2IdsKey
std::tuple< Int_t, Int_t, Int_t > ME3IdsKey
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> > GEMPadDigiValidation::digisimlink_token_
private

Definition at line 21 of file GEMPadDigiValidation.h.

Referenced by analyze(), and GEMPadDigiValidation().

◆ geomToken_

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

Definition at line 22 of file GEMPadDigiValidation.h.

Referenced by analyze(), and GEMPadDigiValidation().

◆ geomTokenBeginRun_

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

Definition at line 23 of file GEMPadDigiValidation.h.

Referenced by bookHistograms(), and GEMPadDigiValidation().

◆ me_detail_bx_

MEMap3Ids GEMPadDigiValidation::me_detail_bx_
private

Definition at line 35 of file GEMPadDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ me_detail_occ_det_

MEMap2Ids GEMPadDigiValidation::me_detail_occ_det_
private

Definition at line 29 of file GEMPadDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ me_detail_occ_pad_

MEMap3Ids GEMPadDigiValidation::me_detail_occ_pad_
private

Definition at line 34 of file GEMPadDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ me_detail_occ_phi_pad_

MEMap3Ids GEMPadDigiValidation::me_detail_occ_phi_pad_
private

Definition at line 33 of file GEMPadDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ me_detail_occ_xy_

MEMap3Ids GEMPadDigiValidation::me_detail_occ_xy_
private

Definition at line 31 of file GEMPadDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ me_detail_occ_zr_

MEMap1Ids GEMPadDigiValidation::me_detail_occ_zr_
private

Definition at line 32 of file GEMPadDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ me_detail_pad_occ_det_

MEMap2Ids GEMPadDigiValidation::me_detail_pad_occ_det_
private

Definition at line 30 of file GEMPadDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ me_occ_total_pad_

MEMap3Ids GEMPadDigiValidation::me_occ_total_pad_
private

Definition at line 26 of file GEMPadDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ me_pad_occ_eta_

MEMap3Ids GEMPadDigiValidation::me_pad_occ_eta_
private

Definition at line 27 of file GEMPadDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ me_pad_occ_phi_

MEMap3Ids GEMPadDigiValidation::me_pad_occ_phi_
private

Definition at line 28 of file GEMPadDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ pad_token_

edm::EDGetTokenT<GEMPadDigiCollection> GEMPadDigiValidation::pad_token_
private

Definition at line 19 of file GEMPadDigiValidation.h.

Referenced by analyze(), and GEMPadDigiValidation().

◆ simhit_token_

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

Definition at line 20 of file GEMPadDigiValidation.h.

Referenced by analyze(), and GEMPadDigiValidation().