|
|
Go to the documentation of this file.
33 consumes<DQMToken, edm::InRun>(
edm::InputTag(
"siStripOfflineAnalyser",
"DQMGenerationSiStripAnalyserRun"));
34 consumes<DQMToken, edm::InLumi>(
edm::InputTag(
"siStripOfflineAnalyser",
"DQMGenerationSiStripAnalyserLumi"));
38 edm::LogInfo(
"SiStripCertificationInfo") <<
"SiStripCertificationInfo:: Begining of Run";
50 runInfoRec->get(sumFED);
53 for (
auto const fedID : sumFED->
m_fed_in) {
54 if (fedID >= siStripFedIdMin && fedID <= siStripFedIdMax)
75 if (!strip_dir.empty())
83 std::string htitle =
"SiStrip Certification for Good Detector Fraction";
90 auto const& det =
pr.first;
97 if (!strip_dir.empty())
145 if (!strip_dir.empty())
155 edm::LogInfo(
"SiStripDaqInfo") <<
"SiStripDaqInfo::endLuminosityBlock";
164 edm::LogInfo(
"SiStripCertificationInfo") <<
"SiStripCertificationInfo:: End Run";
178 <<
" SiStripCertificationInfo::fillSiStripCertificationMEs : MEs missing ";
193 uint16_t nDetTot = 0;
194 uint16_t nFaultyTot = 0;
195 uint16_t nSToNTot = 0;
205 std::string bad_module_folder = mechanical_dir +
"/" + subDetME.folder_name +
"/" +
"BadModuleList";
206 std::vector<MonitorElement*> faulty_detMEs = dqm_store.
getContents(bad_module_folder);
208 uint16_t ndet_subdet = 0;
209 uint16_t nfaulty_subdet = 0;
210 int nlayer = subDetME.n_layer;
212 for (
int ilayer = 0; ilayer < nlayer; ilayer++) {
214 ndet_subdet += ndet_layer;
216 uint16_t nfaulty_layer = 0;
217 for (
auto me : faulty_detMEs) {
220 if (
me->getIntValue() == 0)
222 uint32_t detId = atoi(
me->getName().c_str());
223 std::pair<std::string, int32_t> det_layer_pair = folder_organizer.
GetSubDetAndLayer(detId, tTopo,
false);
224 if (
abs(det_layer_pair.second) == ilayer + 1)
228 nfaulty_subdet += nfaulty_layer;
229 float fraction_layer = -1.0;
231 fraction_layer = 1 - ((nfaulty_layer * 1.0) / ndet_layer);
235 if (ybin <= SiStripCertificationSummaryMap->getNbinsY()) {
239 float fraction_subdet = -1.0;
241 fraction_subdet = 1 - ((nfaulty_subdet * 1.0) / ndet_subdet);
243 std::string full_path = mechanical_dir.substr(0, mechanical_dir.find_last_of(
'/')) +
244 "/EventInfo/reportSummaryContents/SiStrip_SToNFlag_" +
name;
251 me->Fill(fminf(fraction_subdet, ston_flg));
253 me->Fill(fraction_subdet);
254 nDetTot += ndet_subdet;
255 nFaultyTot += nfaulty_subdet;
257 float fraction_global = -1.0;
259 fraction_global = 1.0 - ((nFaultyTot * 1.0) / nDetTot);
260 float ston_frac_global = 1.0;
262 ston_frac_global = sToNTot / nSToNTot;
276 pr.second.det_fractionME->Reset();
288 pr.second.det_fractionME->Reset();
289 pr.second.det_fractionME->Fill(-1.0);
305 <<
" SiStripCertificationInfo::fillSiStripCertificationMEsAtLumi : MEs missing ";
312 if (strip_dir.empty())
313 strip_dir =
"SiStrip";
316 float dcs_flag = 1.0;
317 float dqm_flag = 1.0;
319 full_path = strip_dir +
"/EventInfo/DCSContents/SiStrip_" +
type;
323 full_path = strip_dir +
"/EventInfo/reportSummaryContents/SiStrip_" +
type;
327 subDetME.det_fractionME->Reset();
328 subDetME.det_fractionME->Fill(fminf(dqm_flag, dcs_flag));
332 full_path = strip_dir +
"/EventInfo/reportSummary";
336 full_path = strip_dir +
"/EventInfo/DCSSummary";
void endLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &iSetup) override
T const * product() const
virtual std::vector< dqm::harvesting::MonitorElement * > getContents(std::string const &path) const
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
void resetSiStripCertificationMEs(DQMStore &dqm_store)
std::vector< int > m_fed_in
Log< level::Info, false > LogInfo
void fillSiStripCertificationMEsAtLumi(DQMStore &dqm_store)
SiStripCertificationInfo(const edm::ParameterSet &ps)
Kind kind() const
Get the type of the monitor element.
edm::ESHandle< SiStripDetCabling > detCabling_
std::pair< std::string, int32_t > GetSubDetAndLayer(const uint32_t &detid, const TrackerTopology *tTopo, bool ring_flag=false)
std::optional< T > tryToGet() const
#define DEFINE_FWK_MODULE(type)
virtual void Reset()
Remove all data from the ME, keept the empty histogram with all its settings.
void setCurrentFolder(std::string const &fullpath) override
bool sistripCertificationBooked_
virtual double getFloatValue() const
std::string pwd() override
void fillDummySiStripCertification(DQMStore &dqm_store)
virtual int getNbinsY() const
get # of bins in Y-axis
static bool goToDir(DQMStore &dqm_store, std::string const &name)
void endRun(edm::Run const &run, edm::EventSetup const &eSetup) override
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
std::map< std::string, SubDetMEs > SubDetMEsMap
Log< level::Error, false > LogError
void bookSiStripCertificationMEs(DQMStore &dqm_store)
MonitorElement * det_fractionME
MonitorElement * SiStripCertificationSummaryMap
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
virtual int getNbinsX() const
get # of bins in X-axis
void fillSiStripCertificationMEs(DQMStore &dqm_store, edm::EventSetup const &eSetup)
virtual MonitorElement * get(std::string const &fullpath) const
MonitorElement * SiStripCertification
Abs< T >::type abs(const T &t)
unsigned long long m_cacheID_
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
static void getTopFolderPath(DQMStore &dqm_store, std::string const &top_dir, std::string &path)
void beginRun(edm::Run const &run, edm::EventSetup const &eSetup) override
uint32_t connectedNumber(const std::string &subDet, const uint16_t layer) const
void analyze(edm::Event const &, edm::EventSetup const &) override