|
|
Go to the documentation of this file.
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 geomToken_ = esConsumes<GEMGeometry, MuonGeometryRecord>();
9 geomTokenBeginRun_ = esConsumes<GEMGeometry, MuonGeometryRecord, edm::Transition::BeginRun>();
20 for (
const auto&
region :
gem->regions()) {
21 Int_t region_id =
region->region();
26 Int_t station_id =
station->station();
31 const auto& superChamberVec =
station->superChambers();
32 if (superChamberVec.empty()) {
34 <<
" and station = " << station_id;
38 if (super_chamber ==
nullptr) {
40 <<
" and station = " << station_id;
44 Int_t layer_id =
chamber->id().layer();
45 ME3IdsKey key3(region_id, station_id, layer_id);
47 const auto& etaPartitionVec =
chamber->etaPartitions();
48 if (etaPartitionVec.empty() || etaPartitionVec.front() ==
nullptr) {
50 <<
"Eta partition missing or null for region, station, super chamber, chamber = (" << region_id <<
", "
51 << station_id <<
", " << super_chamber->
id() <<
", " <<
chamber->id() <<
")";
54 Int_t num_pads = etaPartitionVec.front()->npads();
73 bookHist1D(booker, key3,
"occ_pad",
"Pad Occupancy", num_pads, 0.5, num_pads + 0.5,
"Pad number");
83 for (
const auto&
region :
gem->regions()) {
84 Int_t region_id =
region->region();
86 Int_t station_id =
station->station();
88 const auto& superChamberVec =
station->superChambers();
89 if (superChamberVec.empty()) {
91 <<
" and station = " << station_id;
95 if (super_chamber ==
nullptr) {
97 <<
" and station = " << station_id;
101 Int_t layer_id =
chamber->id().layer();
102 ME3IdsKey key3(region_id, station_id, layer_id);
125 GEMDetId gemid = (*range_iter).first;
126 const auto&
range = (*range_iter).second;
128 if (
gem->idToDet(gemid) ==
nullptr) {
130 <<
"Maybe it comes from unmatched geometry." << std::endl;
137 Int_t region_id = gemid.
region();
138 Int_t station_id = gemid.
station();
139 Int_t layer_id = gemid.
layer();
140 Int_t chamber_id = gemid.
chamber();
141 Int_t roll_id = gemid.
roll();
144 ME3IdsKey key3(region_id, station_id, layer_id);
146 for (
auto digi =
range.first; digi !=
range.second; ++digi) {
151 Int_t pad = digi->pad();
152 Int_t
bx = digi->bx();
155 const GlobalPoint& global_pos = surface.toGlobal(local_pos);
157 Float_t g_r = global_pos.
perp();
158 Float_t g_phi = global_pos.
phi();
159 Float_t g_x = global_pos.
x();
160 Float_t g_y = global_pos.
y();
161 Float_t g_abs_z = std::fabs(global_pos.
z());
std::tuple< Int_t, Int_t > ME2IdsKey
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
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")
const std::vector< const GEMChamber * > & chambers() const
Return the chambers in the super chamber.
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > geomTokenBeginRun_
constexpr int layer() const
constexpr int region() const
dqm::impl::MonitorElement * bookDetectorOccupancy(DQMStore::IBooker &booker, const T &key, const GEMStation *station, const char *name_prfix, const char *title_prefix)
virtual void setCurrentFolder(std::string const &fullpath)
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > geomToken_
void analyze(const edm::Event &, const edm::EventSetup &) override
dqm::impl::MonitorElement * bookZROccupancy(DQMStore::IBooker &booker, Int_t region_id, const char *name_prfix, const char *title_prefix)
const Plane & surface() const
The nominal surface of the GeomDet.
MEMap3Ids me_detail_occ_xy_
MEMap3Ids me_detail_occ_pad_
dqm::impl::MonitorElement * bookXYOccupancy(DQMStore::IBooker &booker, const T &key, const char *name_prefix, const char *title_prefix)
~GEMPadDigiValidation() override
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="")
constexpr int chamber() const
GEMPadDigiValidation(const edm::ParameterSet &)
constexpr int roll() const
edm::EDGetTokenT< GEMPadDigiCollection > pad_token_
Log< level::Error, false > LogError
MEMap3Ids me_detail_occ_phi_pad_
std::tuple< Int_t, Int_t, Int_t > ME3IdsKey
constexpr int station() const
GEMDetId id() const
Return the GEMDetId of this super chamber.
Geom::Phi< T > phi() const
Int_t getDetOccBinX(Int_t chamber_id, Int_t layer_id)
const std::string kLogCategory_