8 : kGEMOHStatusCollectionToken_(
10 kGEMVFATStatusCollectionToken_(
12 kMonitorGE11_(ps.getUntrackedParameter<
bool>(
"monitorGE11")),
13 kMonitorGE21_(ps.getUntrackedParameter<
bool>(
"monitorGE21")),
14 kMonitorGE0_(ps.getUntrackedParameter<
bool>(
"monitorGE0")),
15 kMaskChamberWithError_(ps.getUntrackedParameter<
bool>(
"maskChamberWithError")),
16 kLogCategory_(ps.getUntrackedParameter<
std::
string>(
"logCategory")) {}
49 <<
" but nameNumerator returns an empty string";
67 <<
" but nameNumerator returns an empty string";
79 return std::make_tuple(
false, 0, 0);
82 const std::vector<const GEMSuperChamber*> superchamber_vec =
station->superChambers();
85 return std::make_tuple(
false, 0, 0);
88 std::vector<int> id_vec;
90 superchamber_vec.end(),
91 std::back_inserter(id_vec),
92 [](
const GEMSuperChamber* superchamber) ->
int {
return superchamber->id().chamber(); });
93 const auto [first_chamber, last_chamber] = std::minmax_element(id_vec.begin(), id_vec.end());
94 if ((first_chamber == id_vec.end())
or (last_chamber == id_vec.end())) {
96 return std::make_tuple(
false, 0, 0);
99 return std::make_tuple(
true, *first_chamber, *last_chamber);
105 return std::make_tuple(
false, 0, 0);
108 const std::vector<const GEMSuperChamber*> superchamber_vec =
station->superChambers();
111 return std::make_tuple(
false, 0, 0);
114 const std::vector<const GEMChamber*> chamber_vec = superchamber_vec.front()->chambers();
117 return std::make_tuple(
false, 0, 0);
119 const std::vector<const GEMEtaPartition*> eta_partition_vec = chamber_vec.front()->etaPartitions();
122 return std::make_tuple(
false, 0, 0);
125 std::vector<int> ieta_vec;
127 eta_partition_vec.end(),
128 std::back_inserter(ieta_vec),
130 const auto [first_ieta, last_ieta] = std::minmax_element(ieta_vec.begin(), ieta_vec.end());
131 if ((first_ieta == ieta_vec.end())
or (last_ieta == ieta_vec.end())) {
133 return std::make_tuple(
false, 0, 0);
136 return std::make_tuple(
true, *first_ieta, *last_ieta);
142 const TString&
title,
155 const double xlow = first_chamber - 0.5;
156 const double xup = last_chamber + 0.5;
157 const int nbinsx = last_chamber - first_chamber + 1;
160 me->setAxisTitle(
"Chamber", 1);
173 const TString&
title,
181 if (not chamber_success) {
187 if (not ieta_success) {
192 const double xlow = first_chamber - 0.5;
193 const double xup = last_chamber + 0.5;
194 const int nbinsx = last_chamber - first_chamber + 1;
196 const double ylow = first_ieta - 0.5;
197 const double yup = last_ieta + 0.5;
198 const int nbinsy = last_ieta - first_ieta + 1;
201 me->setAxisTitle(
"Chamber", 1);
202 me->setAxisTitle(
"i#eta", 2);
209 for (
int ieta = first_ieta;
ieta <= last_ieta;
ieta++) {
241 const bool mask =
true;
243 for (
auto iter = oh_status_collection->
begin(); iter != oh_status_collection->
end(); iter++) {
244 const auto [oh_id,
range] = (*iter);
245 if (chamber_id != oh_id) {
249 for (
auto oh_status =
range.first; oh_status !=
range.second; oh_status++) {
250 if (oh_status->isBad()) {
257 for (
auto iter = vfat_status_collection->
begin(); iter != vfat_status_collection->
end(); iter++) {
258 const auto [vfat_id,
range] = (*iter);
262 for (
auto vfat_status =
range.first; vfat_status !=
range.second; vfat_status++) {
263 if (vfat_status->isBad()) {
274 const bool has_key = me_map.find(
key) != me_map.end();
277 const std::string hint = me_map.empty() ?
"empty" : me_map.begin()->second->getName();
285 me_map[
key]->Fill(
x);
291 me_map[
key]->Fill(
x,
y);
296 const double first_bin_center = axis->GetBinCenter(1);
297 const double last_bin_center = axis->GetBinCenter(axis->GetNbins());
298 return std::clamp(
value, first_bin_center, last_bin_center);
308 const TAxis* x_axis =
me->getTH1F()->GetXaxis();
319 const TH2F*
hist =
me->getTH2F();
320 const TAxis* x_axis =
hist->GetXaxis();
321 const TAxis* y_axis =
hist->GetYaxis();
bool skipGEMStation(const int)
MonitorElement * bookChamberEtaPartition(DQMStore::IBooker &, const TString &, const TString &, const GEMStation *)
MonitorElement * bookNumerator2D(DQMStore::IBooker &, MonitorElement *)
void fillMEWithinLimits(MonitorElement *, const double)
std::tuple< bool, int, int > getEtaPartitionRange(const GEMStation *)
bool maskChamberWithError(const GEMDetId &chamber_id, const GEMOHStatusCollection *, const GEMVFATStatusCollection *)
Log< level::Error, false > LogError
static std::string to_string(const XMLCh *ch)
std::map< GEMDetId, MonitorElement * > MEMap
void fillME(MEMap &, const GEMDetId &, const double)
MonitorElement * bookNumerator1D(DQMStore::IBooker &, MonitorElement *)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
MonitorElement * bookChamber(DQMStore::IBooker &, const TString &, const TString &, const GEMStation *)
key
prepare the HTCondor submission files and eventually submit them
const std::string kLogCategory_
DigiRangeIterator begin() const
std::string nameNumerator(const std::string &)
std::tuple< bool, int, int > getChamberRange(const GEMStation *)
bool checkRefs(const std::vector< T *> &)
bool hasMEKey(const MEMap &, const GEMDetId &)
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
double clampWithAxis(const double, const TAxis *axis)
constexpr GEMDetId chamberId() const
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
GEMDQMEfficiencySourceBase(const edm::ParameterSet &)
DigiRangeIterator end() const
A container for a generic type of digis indexed by some index, implemented with a map<IndexType...