CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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,
MuonGeometryRecord
geomToken_
 
edm::ESGetToken< GEMGeometry,
MuonGeometryRecord
geomTokenBeginRun_
 
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
< GEMPadDigiCollection
pad_token_
 
edm::EDGetTokenT
< edm::PSimHitContainer
simhit_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
< DQMEDAnalyzerGlobalCache
initializeGlobalCache (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,
MuonGeometryRecord
geomToken_
 
edm::ESGetToken< GEMGeometry,
MuonGeometryRecord
geomTokenBeginRun_
 
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 ( const edm::ParameterSet pset)
explicit

Definition at line 3 of file GEMPadDigiValidation.cc.

References digisimlink_token_, geomToken_, geomTokenBeginRun_, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterSet(), pad_token_, 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_
ParameterSet const & getParameterSet(std::string const &) const
GEMBaseValidation(const edm::ParameterSet &, std::string)
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
GEMPadDigiValidation::~GEMPadDigiValidation ( )
override

Definition at line 136 of file GEMPadDigiValidation.cc.

136 {}

Member Function Documentation

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

Implements GEMBaseValidation.

Definition at line 138 of file GEMPadDigiValidation.cc.

References funct::abs(), makePileupJSON::bx, GEMEtaPartition::centreOfPad(), GEMDetId::chamber(), GEMSuperChamber::chambers(), universalConfigTemplate::collection, GEMBaseValidation::detail_plot_, digisimlink_token_, GEMGeometry::etaPartition(), geomToken_, edm::EventSetup::getData(), GEMBaseValidation::getDetOccBinX(), GEMGeometry::idToDet(), GEMDetId::ieta(), GEMBaseValidation::isMuonSimHit(), edm::HandleBase::isValid(), GEMBaseValidation::kLogCategory_, GEMDetId::layer(), MainPageGenerator::link, 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_, GEMEtaPartition::padOfStrip(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), edm::Handle< T >::product(), sistrip::SpyUtilities::range(), GEMDetId::region(), HLT_FULL_cff::region, GEMGeometry::regions(), simhit_token_, relativeConstraints::station, GEMDetId::station(), GeomDet::surface(), GEMBaseValidation::toDegree(), Surface::toGlobal(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

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

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

Member Data Documentation

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

Definition at line 21 of file GEMPadDigiValidation.h.

Referenced by analyze(), and GEMPadDigiValidation().

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

Definition at line 22 of file GEMPadDigiValidation.h.

Referenced by analyze(), and GEMPadDigiValidation().

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

Definition at line 23 of file GEMPadDigiValidation.h.

Referenced by bookHistograms(), and GEMPadDigiValidation().

MEMap3Ids GEMPadDigiValidation::me_detail_bx_
private

Definition at line 35 of file GEMPadDigiValidation.h.

Referenced by analyze(), and bookHistograms().

MEMap2Ids GEMPadDigiValidation::me_detail_occ_det_
private

Definition at line 29 of file GEMPadDigiValidation.h.

Referenced by analyze(), and bookHistograms().

MEMap3Ids GEMPadDigiValidation::me_detail_occ_pad_
private

Definition at line 34 of file GEMPadDigiValidation.h.

Referenced by analyze(), and bookHistograms().

MEMap3Ids GEMPadDigiValidation::me_detail_occ_phi_pad_
private

Definition at line 33 of file GEMPadDigiValidation.h.

Referenced by analyze(), and bookHistograms().

MEMap3Ids GEMPadDigiValidation::me_detail_occ_xy_
private

Definition at line 31 of file GEMPadDigiValidation.h.

Referenced by analyze(), and bookHistograms().

MEMap1Ids GEMPadDigiValidation::me_detail_occ_zr_
private

Definition at line 32 of file GEMPadDigiValidation.h.

Referenced by analyze(), and bookHistograms().

MEMap2Ids GEMPadDigiValidation::me_detail_pad_occ_det_
private

Definition at line 30 of file GEMPadDigiValidation.h.

Referenced by analyze(), and bookHistograms().

MEMap3Ids GEMPadDigiValidation::me_occ_total_pad_
private

Definition at line 26 of file GEMPadDigiValidation.h.

Referenced by analyze(), and bookHistograms().

MEMap3Ids GEMPadDigiValidation::me_pad_occ_eta_
private

Definition at line 27 of file GEMPadDigiValidation.h.

Referenced by analyze(), and bookHistograms().

MEMap3Ids GEMPadDigiValidation::me_pad_occ_phi_
private

Definition at line 28 of file GEMPadDigiValidation.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 19 of file GEMPadDigiValidation.h.

Referenced by analyze(), and GEMPadDigiValidation().

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

Definition at line 20 of file GEMPadDigiValidation.h.

Referenced by analyze(), and GEMPadDigiValidation().