|
|
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);
18 for (
const auto&
region :
gem->regions()) {
19 Int_t region_id =
region->region();
24 Int_t station_id =
station->station();
29 const auto& superChamberVec =
station->superChambers();
30 if (superChamberVec.empty()) {
32 <<
" and station = " << station_id;
36 if (super_chamber ==
nullptr) {
38 <<
" and station = " << station_id;
42 Int_t layer_id =
chamber->id().layer();
43 ME3IdsKey key3(region_id, station_id, layer_id);
45 const auto& etaPartitionVec =
chamber->etaPartitions();
46 if (etaPartitionVec.empty() || etaPartitionVec.front() ==
nullptr) {
48 <<
"Eta partition missing or null for region, station, super chamber, chamber = (" << region_id <<
", "
49 << station_id <<
", " << super_chamber->
id() <<
", " <<
chamber->id() <<
")";
52 Int_t num_pads = etaPartitionVec.front()->npads();
71 bookHist1D(booker, key3,
"occ_pad",
"Pad Occupancy", num_pads, 0.5, num_pads + 0.5,
"Pad number");
81 for (
const auto&
region :
gem->regions()) {
82 Int_t region_id =
region->region();
84 Int_t station_id =
station->station();
86 const auto& superChamberVec =
station->superChambers();
87 if (superChamberVec.empty()) {
89 <<
" and station = " << station_id;
93 if (super_chamber ==
nullptr) {
95 <<
" and station = " << station_id;
99 Int_t layer_id =
chamber->id().layer();
100 ME3IdsKey key3(region_id, station_id, layer_id);
123 GEMDetId gemid = (*range_iter).first;
124 const auto&
range = (*range_iter).second;
126 if (
gem->idToDet(gemid) ==
nullptr) {
128 <<
"Maybe it comes from unmatched geometry." << std::endl;
135 Int_t region_id = gemid.
region();
136 Int_t station_id = gemid.
station();
137 Int_t layer_id = gemid.
layer();
138 Int_t chamber_id = gemid.
chamber();
139 Int_t roll_id = gemid.
roll();
142 ME3IdsKey key3(region_id, station_id, layer_id);
144 for (
auto digi =
range.first; digi !=
range.second; ++digi) {
145 Int_t pad = digi->pad();
146 Int_t
bx = digi->bx();
149 const GlobalPoint& global_pos = surface.toGlobal(local_pos);
151 Float_t g_r = global_pos.
perp();
152 Float_t g_phi = global_pos.
phi();
153 Float_t g_x = global_pos.
x();
154 Float_t g_y = global_pos.
y();
155 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.
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)
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.
const GEMGeometry * initGeometry(const edm::EventSetup &)
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_
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_