12 if (strRunType ==
"online") {
14 }
else if (strRunType ==
"offline") {
16 }
else if (strRunType ==
"relval") {
18 }
else if (strRunType ==
"allplots") {
53 const auto&
chambers = superchambers.front()->chambers();
59 return chambers.front()->nEtaPartitions();
67 for (
auto sch : superChambers_) {
68 int n_lay = sch->nChambers();
69 for (
int l = 0;
l < n_lay;
l++) {
70 Bool_t bExist =
false;
71 if (not sch->chamber(
l + 1))
74 if (ch.id() == sch->chamber(
l + 1)->id()) {
81 gemChambers_.push_back(*sch->chamber(
l + 1));
88 const int region_number =
region->region();
91 const auto&& superchambers =
station->superChambers();
93 const int station_number =
station->station();
94 const int num_superchambers = superchambers.size();
95 const int num_layers = superchambers.front()->nChambers();
98 const int num_vfat = num_etas * max_vfat;
103 for (
int layer_number = 1; layer_number <= num_layers; layer_number++) {
104 ME3IdsKey key3(region_number, station_number, layer_number);
106 MEStationInfo(region_number, station_number, layer_number, num_superchambers, num_etas, num_vfat, num_digi);
125 Int_t re1 = std::get<0>(key1), st1 = std::get<1>(key1), la1 = std::get<2>(key1);
126 Int_t re2 = std::get<0>(key2), st2 = std::get<1>(key2), la2 = std::get<2>(key2);
127 if (re1 < 0 && re2 > 0)
129 if (re1 > 0 && re2 < 0)
131 Bool_t bRes = (re1 < 0);
132 Int_t sum1 = 256 *
std::abs(re1) + 16 * st1 + 1 * la1;
133 Int_t sum2 = 256 *
std::abs(re2) + 16 * st2 + 1 * la2;
143 std::vector<ME3IdsKey> listLayers;
145 listLayers.push_back(
key);
147 for (Int_t
i = 0;
i < (Int_t)listLayers.size();
i++)
153 h2Res->setYTitle(
"Layer");
155 if (h2Res ==
nullptr)
159 h2Res->setBinLabel(
i, Form(
"%i",
i), 1);
160 for (Int_t
i = 1;
i <= (Int_t)listLayers.size();
i++) {
161 auto key = listLayers[
i - 1];
166 h2Res->setBinLabel(
i,
label, 2);
167 Int_t nNumCh = mapStationInfo_[
key].nNumChambers_;
168 h2Res->setBinContent(0,
i, nNumCh);
202 Int_t nLa = gid.
layer();
203 char cLS = (nCh % 2 == 0 ?
'L' :
'S');
210 for (
auto iEta : ch.etaPartitions()) {
230 auto strSuffixName = Form(
"_GE%d1-E%02i", gid.
station(), eId.
ieta());
231 auto strSuffixTitle = Form(
" GE%d1-E%02i", gid.
station(), eId.
ieta());
244 Bool_t bDoneEven =
false, bDoneOdd =
false;
247 for (
auto superchamber : listSuperChambers) {
248 Int_t chamberNo = superchamber->id().chamber();
249 if (chamberNo % 2 == 0 && bDoneEven)
251 if (chamberNo % 2 != 0 && bDoneOdd)
254 auto& etaPartitions = superchamber->chambers().front()->etaPartitions();
262 std::vector<Float_t> listRadiusLower, listRadiusUpper;
263 for (
auto iEta : etaPartitions) {
266 LocalPoint lp1(0.0, -0.5 * fHeight), lp2(0.0, 0.5 * fHeight);
267 auto& surface = iEta->surface();
268 GlobalPoint gp1 = surface.toGlobal(lp1), gp2 = surface.toGlobal(lp2);
269 Float_t fR1 = gp1.
perp(), fR2 = gp2.perp();
271 listRadiusLower.push_back(fRL);
272 listRadiusUpper.push_back(fRH);
278 std::sort(listRadiusLower.begin(), listRadiusLower.end());
279 std::sort(listRadiusUpper.begin(), listRadiusUpper.end());
281 std::vector<Float_t>& listR =
284 listR.push_back(listRadiusLower.front());
285 for (
int i = 1;
i < (int)listRadiusLower.size();
i++) {
286 listR.push_back(0.5 * (listRadiusLower[
i] + listRadiusUpper[
i - 1]));
288 listR.push_back(listRadiusUpper.back());
290 if (chamberNo % 2 == 0)
292 if (chamberNo % 2 != 0)
295 if (bDoneEven && bDoneOdd)
307 std::vector<std::pair<Int_t, std::pair<std::pair<Float_t, Float_t>, Bool_t>>> listDivPhi;
310 for (
auto superchamber : listSuperChambers) {
311 auto iEta = superchamber->chambers().front()->etaPartitions().front();
314 Float_t fWidthStrip =
std::abs(iEta->centreOfStrip((Int_t)1).x() - iEta->centreOfStrip((Int_t)0).x());
316 Int_t nStripMid = (Int_t)iEta->strip(lpRef);
317 Int_t nFirstStrip = 1 - ((nNumStripEta / 2) - nStripMid);
318 Int_t nLastStrip = nFirstStrip + nNumStripEta - 1;
320 auto& surface = iEta->surface();
321 LocalPoint lpF = iEta->centreOfStrip((Float_t)(nFirstStrip - 0.5));
322 LocalPoint lpL = iEta->centreOfStrip((Float_t)(nLastStrip + 0.5));
326 Float_t fPhiF = gpF.
phi();
327 Float_t fPhiL = gpL.
phi();
328 if (fPhiF * fPhiL < 0 &&
std::abs(fPhiF) > 0.5 * 3.14159265359) {
330 fPhiF += 2 * 3.14159265359;
332 fPhiL += 2 * 3.14159265359;
334 Bool_t bFlipped = fPhiF > fPhiL;
335 Float_t fPhiMin =
std::min(fPhiF, fPhiL);
336 Float_t fPhiMax =
std::max(fPhiF, fPhiL);
338 listDivPhi.emplace_back();
339 listDivPhi.back().first = iEta->id().chamber();
340 listDivPhi.back().second.first.first = fPhiMin;
341 listDivPhi.back().second.first.second = fPhiMax;
342 listDivPhi.back().second.second = bFlipped;
346 for (
auto p : listDivPhi) {
348 stationInfo.
fMinPhi_ =
p.second.first.first;
float stripLength() const override
T getUntrackedParameter(std::string const &, T const &) const
Int_t nNumEtaPartitionGE11_
dqm::impl::MonitorElement * CreateSummaryHist(DQMStore::IBooker &ibooker, TString strName)
bool checkRefs(const std::vector< T * > &)
virtual int ProcessWithMEMap4(BookingHelper &bh, ME4IdsKey key)
TString getSuffixName(Int_t region_id)
virtual int ProcessWithMEMap2AbsReWithEta(BookingHelper &bh, ME3IdsKey key)
int initGeometry(edm::EventSetup const &iSetup)
std::tuple< Int_t, Int_t, Int_t, Int_t > ME4IdsKey
int readGeometryRadiusInfoChamber(const GEMStation *station, MEStationInfo &stationInfo)
Geom::Phi< T > phi() const
std::map< ME3IdsKey, MEStationInfo > mapStationInfo_
int keyToRegion(ME2IdsKey key)
int readGeometryPhiInfoChamber(const GEMStation *station, MEStationInfo &stationInfo)
std::map< ME3IdsKey, int > mapStationToIdx_
static const int maxChan_
int keyToLayer(ME3IdsKey key)
Log< level::Error, false > LogError
TString getSuffixTitle(Int_t region_id)
std::vector< Float_t > listRadiusOddChamber_
std::string log_category_
constexpr int ieta() const
std::vector< const GEMSuperChamber * > superChambers() const
Return the super chambers in the region.
bool getData(T &iHolder) const
std::map< ME3IdsKey, bool > MEMap2AbsReWithEtaCheck_
std::map< ME2IdsKey, bool > MEMap2Check_
virtual int ProcessWithMEMap3(BookingHelper &bh, ME3IdsKey key)
virtual void setXTitle(std::string const &title)
int GenerateMEPerChamber(DQMStore::IBooker &ibooker)
std::vector< Float_t > listRadiusEvenChamber_
std::map< ME3IdsKey, bool > MEMap3Check_
constexpr int region() const
const std::vector< const GEMRegion * > & regions() const
Return a vector of all GEM regions.
int getNumEtaPartitions(const GEMStation *)
virtual int ProcessWithMEMap3WithChamber(BookingHelper &bh, ME4IdsKey key)
std::vector< GEMChamber > gemChambers_
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > geomToken_
tuple key
prepare the HTCondor submission files and eventually submit them
Abs< T >::type abs(const T &t)
int getMaxVFAT(const int)
int keyToStation(ME2IdsKey key)
std::map< ME4IdsKey, bool > MEMap4Check_
const std::vector< const GEMSuperChamber * > & superChambers() const
Return a vector of all GEM super chambers.
const GEMGeometry * GEMGeometry_
constexpr int chamber() const
constexpr int layer() const
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
constexpr int station() const
virtual int ProcessWithMEMap2WithEta(BookingHelper &bh, ME3IdsKey key)
int SortingLayers(std::vector< ME3IdsKey > &listLayers)
GEMDQMBase(const edm::ParameterSet &cfg)
std::map< ME3IdsKey, bool > MEMap2WithEtaCheck_
std::tuple< Int_t, Int_t > ME2IdsKey
std::tuple< Int_t, Int_t, Int_t > ME3IdsKey
static char chambers[264][20]
Int_t nNumEtaPartitionGE0_
std::map< ME4IdsKey, bool > MEMap3WithChCheck_
Int_t nNumEtaPartitionGE21_
virtual int ProcessWithMEMap2(BookingHelper &bh, ME2IdsKey key)