|
|
Go to the documentation of this file.
6 const auto& pad_cluster_pset =
pset.getParameterSet(
"gemPadCluster");
7 const auto& pad_cluster_tag = pad_cluster_pset.getParameter<
edm::InputTag>(
"inputTag");
9 geomToken_ = esConsumes<GEMGeometry, MuonGeometryRecord>();
10 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();
62 "Pad Cluster Occupancy",
73 bookHist1D(booker, key3,
"occ_pad",
"Pad Cluster Occupancy", num_pads, 0.5, num_pads + 0.5,
"Pad number");
81 booker.
setCurrentFolder(
"MuonGEMDigisV/GEMDigisTask/PadCluster/BunchCrossing");
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);
104 bookHist1D(booker, key3,
"bx",
"Pad Cluster Bunch Crossing", 5, -2.5, 2.5,
"Bunch crossing");
124 GEMDetId gemid = (*range_iter).first;
125 const auto&
range = (*range_iter).second;
127 if (
gem->idToDet(gemid) ==
nullptr) {
129 <<
"Maybe it comes from unmatched geometry." << std::endl;
136 Int_t region_id = gemid.
region();
137 Int_t station_id = gemid.
station();
138 Int_t layer_id = gemid.
layer();
139 Int_t chamber_id = gemid.
chamber();
140 Int_t roll_id = gemid.
roll();
143 ME3IdsKey key3(region_id, station_id, layer_id);
145 for (
auto digi =
range.first; digi !=
range.second; ++digi) {
150 const auto& padsVec = digi->pads();
151 if (padsVec.empty()) {
155 Int_t pad = padsVec[0];
158 Int_t
bx = digi->bx();
161 const GlobalPoint& global_pos = surface.toGlobal(local_pos);
163 Float_t g_r = global_pos.
perp();
164 Float_t g_phi = global_pos.
phi();
165 Float_t g_x = global_pos.
x();
166 Float_t g_y = global_pos.
y();
167 Float_t g_abs_z = std::fabs(global_pos.
z());
std::tuple< Int_t, Int_t > ME2IdsKey
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.
GEMPadDigiClusterValidation(const edm::ParameterSet &)
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)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
edm::EDGetTokenT< GEMPadDigiClusterCollection > pad_cluster_token_
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.
dqm::impl::MonitorElement * bookXYOccupancy(DQMStore::IBooker &booker, const T &key, const char *name_prefix, const char *title_prefix)
MEMap3Ids me_detail_occ_phi_pad_
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="")
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > geomToken_
constexpr int chamber() const
constexpr int roll() const
MEMap3Ids me_detail_occ_xy_
void analyze(const edm::Event &, const edm::EventSetup &) override
Log< level::Error, false > LogError
~GEMPadDigiClusterValidation() override
std::tuple< Int_t, Int_t, Int_t > ME3IdsKey
constexpr int station() const
MEMap3Ids me_detail_occ_pad_
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_