21 desc.add<
int>(
"bxMin", -10);
22 desc.add<
int>(
"bxMax", 10);
23 desc.add<
bool>(
"useDBEMap",
true);
24 descriptions.
add(
"GEMDigiSource",
desc);
30 auto gemChMap = std::make_unique<GEMChMap>(chMap);
32 std::map<int, bool> mapCheckedType;
33 for (
auto const&
p : gemChMap->chamberMap()) {
37 if (!gemChMap->isValidStrip(dc.chamberType,
ieta, 1))
40 if (mapCheckedType[dc.chamberType])
43 if (!gemChMap->isValidStrip(dc.chamberType,
ieta,
strip))
45 auto& stripInfo = gemChMap->getChannel(dc.chamberType,
ieta,
strip);
49 mapCheckedType[dc.chamberType] =
true;
53 auto gemChMap = std::make_unique<GEMChMap>();
56 std::map<int, bool> mapCheckedType;
57 for (
auto const&
p : gemChMap->chamberMap()) {
62 if (!gemChMap->isValidStrip(dc.chamberType,
ieta, 1))
64 Int_t nChamberType = dc.chamberType;
66 nChamberType = 13 - gemChId.
layer();
67 }
else if (gemChId.
station() == 2) {
68 nChamberType = 24 - (
ieta - 1) / 4;
71 if (mapCheckedType[nChamberType])
73 mapCheckedType[nChamberType] =
true;
75 if (!gemChMap->isValidStrip(nChamberType,
ieta,
strip))
77 auto& stripInfo = gemChMap->getChannel(nChamberType,
ieta,
strip);
96 float radS = -5.0 / 180 *
M_PI;
97 float radL = 355.0 / 180 *
M_PI;
99 mapTotalDigi_layer_ =
MEMap4Inf(
this,
"occ",
"Digi Occupancy", 36, 0.5, 36.5, 24, -0.5, 24 - 0.5,
"Chamber",
"VFAT");
101 this,
"occ_rphi",
"Digi R-Phi Occupancy", 360, radS, radL, 8,
fRadiusMin_,
fRadiusMax_,
"#phi (rad)",
"R [cm]");
104 MEMap4Inf(
this,
"occ_phi",
"Digi Phi Occupancy", 72, -5, 355,
"#phi (degree)",
"Number of fired digis");
107 "Total number of digis per event for each layers",
111 "Number of fired digis",
116 "Total number of digis per event for each eta partitions",
120 "Number of fired digis",
126 mapDigiOccPerCh_ =
MEMap5Inf(
this,
"occ",
"Digi Occupancy", 1, -0.5, 1.5, 1, 0.5, 1.5,
"Digi",
"iEta");
230 event.getByToken(this->
tagDigi_, gemDigis);
234 std::map<ME4IdsKey, Int_t> total_digi_layer;
235 std::map<ME3IdsKey, Int_t> total_digi_eta;
237 ME2IdsKey key2{gid.region(), gid.station()};
238 ME3IdsKey key3{gid.region(), gid.station(), gid.layer()};
239 ME4IdsKey key4Ch{gid.region(), gid.station(), gid.layer(), gid.chamber()};
240 std::map<Int_t, bool> bTagVFAT;
247 if (total_digi_eta.find(key3IEta) == total_digi_eta.end())
248 total_digi_eta[key3IEta] = 0;
249 const auto& digis_in_det = gemDigis->get(eId);
250 auto nChamberType =
mapChamberType_[{gid.station(), gid.layer(), gid.chamber(), eId.
ieta()}];
251 Int_t nIdxModule =
getIdxModule(gid.station(), nChamberType);
252 ME4IdsKey key4{gid.region(), gid.station(), gid.layer(), nIdxModule};
253 ME5IdsKey key5Ch{gid.region(), gid.station(), gid.layer(), nIdxModule, gid.chamber()};
254 if (total_digi_layer.find(key4) == total_digi_layer.end())
255 total_digi_layer[key4] = 0;
256 for (
auto d = digis_in_det.first;
d != digis_in_det.second; ++
d) {
264 GlobalPoint digi_global_pos = surface.toGlobal(
iEta->centreOfStrip(
d->strip()));
265 Float_t
fPhi = (Float_t)digi_global_pos.
phi();
267 Float_t fPhiDeg = fPhiShift * 180.0 /
M_PI;
274 Int_t nIEtaInMod = eId.
ieta();
275 if (gid.station() == 2) {
281 total_digi_layer[key4]++;
282 total_digi_eta[key3IEta]++;
286 if (bTagVFAT.find(nIdxVFAT) == bTagVFAT.end()) {
290 bTagVFAT[nIdxVFAT] =
true;
294 for (
auto [
key, num_total_digi] : total_digi_layer)
296 for (
auto [
key, num_total_digi] : total_digi_eta)
MEMap4Inf mapTotalDigi_layer_
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)
int ProcessWithMEMap5WithChamber(BookingHelper &bh, ME5IdsKey key) override
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
std::tuple< Int_t, Int_t, Int_t, Int_t, Int_t > ME5IdsKey
std::vector< GEMDetId > listChamberId_
virtual void setCurrentFolder(std::string const &fullpath)
int SetLabelForChambers(K key, Int_t nAxis, Int_t nNumBin=-1, Int_t nIdxStart=1)
MEMapInfT< MEMap3Ids, ME3IdsKey > MEMap3Inf
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
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
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
int ProcessWithMEMap4(BookingHelper &bh, ME4IdsKey key) override
void SetBinLowEdgeX(Double_t dXL)
int GenerateMEPerChamber(DQMStore::IBooker &ibooker)
Float_t restrictAngle(const Float_t fTheta, const Float_t fStart)
MEMap4Inf mapTotalDigiPerEvtLayer_
const edm::ESGetToken< GEMChMap, GEMChMapRcd > gemChMapToken_
key
prepare the HTCondor submission files and eventually submit them
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_
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()
MEMap4Inf mapDigiOcc_phi_
int SetLabelForIEta(K key, Int_t nAxis, Int_t nNumBin=-1)
MEMap4Inf mapDigiOcc_ieta_
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_
MEMapInfT< MEMap5Ids, ME5IdsKey > MEMap5Inf
void SetNbinsX(Int_t nBinsX)
MEMap5Inf mapDigiOccPerCh_
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)
ME4IdsKey key5Tokey4(ME5IdsKey key)
MEMap3Inf mapDigiWheel_layer_
int ProcessWithMEMap3(BookingHelper &bh, ME3IdsKey key) override
std::map< ME3IdsKey, Int_t > mapStripToVFAT_