20 desc.add<
int>(
"bxMin", -10);
21 desc.add<
int>(
"bxMax", 10);
22 descriptions.
add(
"GEMDigiSource",
desc);
29 auto gemChMap = std::make_unique<GEMChMap>(chMap);
31 std::map<int, bool> mapCheckedType;
32 for (
auto const&
p : gemChMap->chamberMap()) {
36 if (!gemChMap->isValidStrip(dc.chamberType,
ieta, 1))
39 if (mapCheckedType[dc.chamberType])
42 if (!gemChMap->isValidStrip(dc.chamberType,
ieta,
strip))
44 auto& stripInfo = gemChMap->getChannel(dc.chamberType,
ieta,
strip);
48 mapCheckedType[dc.chamberType] =
true;
52 auto gemChMap = std::make_unique<GEMChMap>();
55 std::map<int, bool> mapCheckedType;
56 for (
auto const&
p : gemChMap->chamberMap()) {
61 if (!gemChMap->isValidStrip(dc.chamberType,
ieta, 1))
64 if (mapCheckedType[dc.chamberType])
66 mapCheckedType[dc.chamberType] =
true;
68 if (!gemChMap->isValidStrip(dc.chamberType,
ieta,
strip))
70 auto& stripInfo = gemChMap->getChannel(dc.chamberType,
ieta,
strip);
89 float radS = -5.0 / 180 *
M_PI;
90 float radL = 355.0 / 180 *
M_PI;
92 mapTotalDigi_layer_ =
MEMap3Inf(
this,
"occ",
"Digi Occupancy", 36, 0.5, 36.5, 24, -0.5, 24 - 0.5,
"Chamber",
"VFAT");
94 this,
"occ_rphi",
"Digi R-Phi Occupancy", 360, radS, radL, 8,
fRadiusMin_,
fRadiusMax_,
"#phi (rad)",
"R [cm]");
97 MEMap3Inf(
this,
"occ_phi",
"Digi Phi Occupancy", 72, -5, 355,
"#phi (degree)",
"Number of fired digis");
100 "Total number of digis per event for each layers",
104 "Number of fired digis",
109 "Total number of digis per event for each eta partitions",
113 "Number of fired digis",
119 mapDigiOccPerCh_ =
MEMap4Inf(
this,
"occ",
"Digi Occupancy", 1, -0.5, 1.5, 1, 0.5, 1.5,
"Digi",
"iEta");
217 event.getByToken(this->
tagDigi_, gemDigis);
221 std::map<ME3IdsKey, Int_t> total_digi_layer;
222 std::map<ME3IdsKey, Int_t> total_digi_eta;
224 ME2IdsKey key2{gid.region(), gid.station()};
225 ME3IdsKey key3{gid.region(), gid.station(), gid.layer()};
226 ME4IdsKey key4Ch{gid.region(), gid.station(), gid.layer(), gid.chamber()};
227 std::map<Int_t, bool> bTagVFAT;
231 if (total_digi_layer.find(key3) == total_digi_layer.end())
232 total_digi_layer[key3] = 0;
236 if (total_digi_eta.find(key3IEta) == total_digi_eta.end())
237 total_digi_eta[key3IEta] = 0;
238 const auto& digis_in_det = gemDigis->get(eId);
239 auto nChamberType =
mapChamberType_[{gid.station(), gid.layer(), gid.chamber(), eId.
ieta()}];
240 Int_t nIdxModule =
getIdxModule(gid.station(), nChamberType);
241 Int_t nCh = (gid.chamber() - 1) * stationInfo.
nNumModules_ + nIdxModule;
242 for (
auto d = digis_in_det.first;
d != digis_in_det.second; ++
d) {
250 GlobalPoint digi_global_pos = surface.toGlobal(
iEta->centreOfStrip(
d->strip()));
251 Float_t fPhi = (Float_t)digi_global_pos.
phi();
253 Float_t fPhiDeg = fPhiShift * 180.0 /
M_PI;
263 total_digi_layer[key3]++;
264 total_digi_eta[key3IEta]++;
268 if (bTagVFAT.find(nIdxVFAT) == bTagVFAT.end()) {
272 bTagVFAT[nIdxVFAT] =
true;
276 for (
auto [
key, num_total_digi] : total_digi_layer)
278 for (
auto [
key, num_total_digi] : total_digi_eta)
int ProcessWithMEMap2WithEta(BookingHelper &bh, ME3IdsKey key) override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
constexpr int station() const
MEMapInfT< MEMap4Ids, ME4IdsKey > MEMap4Inf
int getIdxModule(const int, const int)
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
MEMap3Inf mapTotalDigiPerEvtLayer_
std::vector< GEMDetId > listChamberId_
virtual void setCurrentFolder(std::string const &fullpath)
MEMapInfT< MEMap3Ids, ME3IdsKey > MEMap3Inf
for(int i=first, nt=offsets[nh];i< nt;i+=gridDim.x *blockDim.x)
int ProcessWithMEMap2(BookingHelper &bh, ME2IdsKey key) override
Geom::Phi< T > phi() const
int initGeometry(edm::EventSetup const &iSetup)
std::tuple< Int_t, Int_t, Int_t, Int_t > ME4IdsKey
const GeomDet * idToDet(DetId) const override
MEMap3Inf mapDigiOcc_ieta_
MEMap4Inf mapDigiOccPerCh_
MEMap3Inf mapDigiOcc_phi_
int SetLabelForVFATs(K key, Int_t nNumEtaPartitions, Int_t nAxis, Int_t nNumBin=-1)
std::map< ME3IdsKey, MEStationInfo > mapStationInfo_
edm::EDGetTokenT< LumiScalersCollection > lumiScalers_
void SetBinHighEdgeX(Double_t dXH)
std::string strFolderMain_
constexpr int layer() const
int Fill(K key, Double_t x)
MEMap3Inf mapTotalDigiPerEvtIEta_
constexpr int chamber() const
MEMap3Inf mapTotalDigi_layer_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
void SetBinLowEdgeX(Double_t dXL)
int GenerateMEPerChamber(DQMStore::IBooker &ibooker)
Float_t restrictAngle(const Float_t fTheta, const Float_t fStart)
const edm::ESGetToken< GEMChMap, GEMChMapRcd > gemChMapToken_
MEMapInfT< MEMap2Ids, ME2IdsKey > MEMap2Inf
#define DEFINE_FWK_MODULE(type)
void SetNbinsY(Int_t nBinsY)
GEMDigiSource(const edm::ParameterSet &cfg)
constexpr int ieta() const
const GEMGeometry * GEMGeometry_
int ProcessWithMEMap3WithChamber(BookingHelper &bh, ME4IdsKey key) override
const Plane & surface() const
The nominal surface of the GeomDet.
void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override
void LoadROMap(edm::EventSetup const &iSetup)
std::map< ME4IdsKey, Int_t > mapChamberType_
void SetNoUnderOverflowBin()
int SetLabelForIEta(K key, Int_t nAxis, Int_t nNumBin=-1)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
DQMStore::IBooker * getBooker()
std::string getNameDirLayer(ME3IdsKey key3)
int bookND(BookingHelper &bh, K key)
ME3IdsKey key4Tokey3(ME4IdsKey key)
std::map< GEMDetId, std::vector< const GEMEtaPartition * > > mapEtaPartition_
void SetNbinsX(Int_t nBinsX)
std::tuple< Int_t, Int_t > ME2IdsKey
std::tuple< Int_t, Int_t, Int_t > ME3IdsKey
void SetBinConfX(Int_t nBins, Double_t dL=0.5, Double_t dH=-1048576.0)
void SetBinConfY(Int_t nBins, Double_t dL=0.5, Double_t dH=-1048576.0)
int SetLabelForChambers(K key, Int_t nAxis, Int_t nNumBin=-1, Int_t nIdxStart=1, Int_t nNumModules=1)
MEMap3Inf mapDigiWheel_layer_
int ProcessWithMEMap3(BookingHelper &bh, ME3IdsKey key) override
std::map< ME3IdsKey, Int_t > mapStripToVFAT_