37 edm::LogInfo(
"SiStripCertificationInfo") <<
"SiStripCertificationInfo::Deleting SiStripCertificationInfo ";
44 edm::LogInfo(
"SiStripCertificationInfo") <<
"SiStripCertificationInfo::Deleting SiStripCertificationInfo ";
58 edm::LogInfo (
"SiStripCertificationInfo") <<
"SiStripCertificationInfo:: Begining of Run";
71 if( eSetup.
find( recordKey ) != 0) {
77 std::vector<int> FedsInIds= sumFED->m_fed_in;
78 for(
unsigned int it = 0; it < FedsInIds.size(); ++it) {
79 int fedID = FedsInIds[it];
80 if(fedID>=siStripFedIdMin && fedID<=siStripFedIdMax) ++
nFEDConnected_;
98 std::string strip_dir =
"";
105 std::string hname =
"CertificationReportMap";
106 std::string htitle =
"SiStrip Certification for Good Detector Fraction";
111 for (std::map<std::string, SubDetMEs>::const_iterator it =
SubDetMEsMap.begin();
114 std::string det = it->first;
129 SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
136 SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
143 SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
150 SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
157 SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
164 SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
178 std::string tracking_dir =
"";
180 if (tracking_dir.size() > 0) {
190 TrackingMEsMap.insert(std::pair<std::string,MonitorElement*>(type,me));
194 TrackingMEsMap.insert(std::pair<std::string,MonitorElement*>(type,me));
198 TrackingMEsMap.insert(std::pair<std::string,MonitorElement*>(type,me));
214 edm::LogInfo(
"SiStripDaqInfo") <<
"SiStripDaqInfo::endLuminosityBlock";
226 edm::LogInfo (
"SiStripCertificationInfo") <<
"SiStripCertificationInfo:: End Run";
238 edm::LogError(
"SiStripCertificationInfo") <<
" SiStripCertificationInfo::fillTrackingCertificationMEs : MEs missing ";
241 std::string tk_dir =
"";
243 if (tk_dir.size() == 0) {
248 std::vector<MonitorElement*> all_mes =
dqmStore_->
getContents(tk_dir+
"/EventInfo/reportSummaryContents");
250 for (std::vector<MonitorElement *>::const_iterator it = all_mes.begin();
251 it!= all_mes.end(); it++) {
257 for (std::map<std::string, MonitorElement*>::const_iterator it =
TrackingMEsMap.begin();
259 std::string
type = it->first;
260 if (name.find(type) != std::string::npos) {
261 it->second->Fill(val);
275 edm::LogError(
"SiStripCertificationInfo") <<
" SiStripCertificationInfo::fillSiStripCertificationMEs : MEs missing ";
279 std::string mdir =
"MechanicalView";
283 uint16_t nDetTot = 0;
284 uint16_t nFaultyTot = 0;
285 uint16_t nSToNTot = 0;
289 for (std::map<std::string, SubDetMEs>::iterator it =
SubDetMEsMap.begin();
292 std::string
name = it->first;
293 std::string
tag = it->second.subdet_tag;
296 std::string bad_module_folder = mechanical_dir+
"/"+it->second.folder_name+
"/"+
"BadModuleList";
299 uint16_t ndet_subdet = 0;
300 uint16_t nfaulty_subdet = 0;
301 int nlayer = it->second.n_layer;
303 for (
int ilayer = 0; ilayer < nlayer; ilayer++) {
304 uint16_t ndet_layer =
detCabling_->connectedNumber(tag, ilayer+1);
305 ndet_subdet += ndet_layer;
307 uint16_t nfaulty_layer = 0;
308 for (std::vector<MonitorElement *>::iterator im = faulty_detMEs.begin(); im != faulty_detMEs.end(); im++) {
310 if ((*im)->getIntValue() == 0)
continue;
311 uint32_t detId = atoi((*im)->getName().c_str());
312 std::pair<std::string,int32_t> det_layer_pair = folder_organizer.
GetSubDetAndLayer(detId,
false);
313 if (
abs(det_layer_pair.second) == ilayer+1) nfaulty_layer++;
316 nfaulty_subdet += nfaulty_layer;
317 float fraction_layer = -1.0;
318 if ( ndet_layer > 0) fraction_layer = 1 - ((nfaulty_layer*1.0)/ndet_layer);
321 if (ybin <= SiStripCertificationSummaryMap->getNbinsY()) {
324 float fraction_subdet = -1.0;
325 if (ndet_subdet > 0) fraction_subdet = 1 - ((nfaulty_subdet*1.0)/ndet_subdet);
327 std::string full_path = mechanical_dir.substr(0, mechanical_dir.find_last_of(
"/"))
328 +
"/EventInfo/reportSummaryContents/SiStrip_SToNFlag_"+name;
335 me->
Fill(fminf(fraction_subdet,ston_flg));
336 }
else me->
Fill(fraction_subdet);
337 nDetTot += ndet_subdet ;
338 nFaultyTot += nfaulty_subdet;
340 float fraction_global = -1.0;
341 if (nDetTot > 0) fraction_global = 1.0 - ((nFaultyTot*1.0)/nDetTot);
342 float ston_frac_global = 1.0;
343 if (nSToNTot > 0) ston_frac_global = sToNTot/nSToNTot;
353 for (std::map<std::string, MonitorElement*>::const_iterator it =
TrackingMEsMap.begin();
366 for (std::map<std::string, SubDetMEs>::iterator it =
SubDetMEsMap.begin();
368 it->second.det_fractionME->Reset();
380 for (std::map<std::string, SubDetMEs>::iterator it =
SubDetMEsMap.begin();
382 it->second.det_fractionME->Reset();
383 it->second.det_fractionME->Fill(-1.0);
400 for (std::map<std::string, MonitorElement*>::const_iterator it =
TrackingMEsMap.begin();
402 it->second->Fill(-1.0);
412 edm::LogError(
"SiStripCertificationInfo") <<
" SiStripCertificationInfo::fillSiStripCertificationMEsAtLumi : MEs missing ";
417 std::string strip_dir =
"";
419 if (strip_dir.size() == 0) strip_dir =
"SiStrip";
421 std::string full_path;
422 float dcs_flag = 1.0;
423 float dqm_flag = 1.0;
424 for (std::map<std::string, SubDetMEs>::iterator it =
SubDetMEsMap.begin();
426 std::string
type = it->first;
427 full_path = strip_dir +
"/EventInfo/DCSContents/SiStrip_" +
type;
430 full_path = strip_dir +
"/EventInfo/reportSummaryContents/SiStrip_" +
type;
433 it->second.det_fractionME->Reset();
434 it->second.det_fractionME->Fill(fminf(dqm_flag,dcs_flag));
438 full_path = strip_dir +
"/EventInfo/reportSummary";
441 full_path = strip_dir +
"/EventInfo/DCSSummary";
const std::string & getName(void) const
get name of ME
MonitorElement * TrackingCertification
void bookTrackingCertificationMEs()
MonitorElement * SiStripCertification
void cd(void)
go to top directory (ie. root)
void fillSiStripCertificationMEsAtLumi()
#define DEFINE_FWK_MODULE(type)
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)
void analyze(edm::Event const &, edm::EventSetup const &)
Analyze.
void fillDummySiStripCertification()
void fillDummyTrackingCertification()
bool sistripCertificationBooked_
std::map< std::string, MonitorElement * > TrackingMEsMap
MonitorElement * bookFloat(const char *name)
Book float.
const eventsetup::EventSetupRecord * find(const eventsetup::EventSetupRecordKey &) const
int getNbinsY(void) const
get # of bins in Y-axis
bool trackingCertificationBooked_
void endLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &iSetup)
End Of Luminosity.
std::map< std::string, SubDetMEs > SubDetMEsMap
void fillTrackingCertificationMEs()
double getFloatValue(void) const
SiStripCertificationInfo(const edm::ParameterSet &ps)
Constructor.
Kind kind(void) const
Get the type of the monitor element.
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
std::vector< MonitorElement * > getContents(const std::string &path) const
MonitorElement * det_fractionME
void bookSiStripCertificationMEs()
virtual ~SiStripCertificationInfo()
Destructor.
void endRun(edm::Run const &run, edm::EventSetup const &eSetup)
EndRun.
void beginRun(edm::Run const &run, edm::EventSetup const &eSetup)
Begin Run.
void resetTrackingCertificationMEs()
MonitorElement * SiStripCertificationSummaryMap
void resetSiStripCertificationMEs()
int getNbinsX(void) const
get # of bins in X-axis
std::pair< std::string, int32_t > GetSubDetAndLayer(const uint32_t &detid, bool ring_flag=0)
edm::ESHandle< SiStripDetCabling > detCabling_
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
void fillSiStripCertificationMEs()
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void Reset(void)
reset ME (ie. contents, errors, etc)
static bool goToDir(DQMStore *dqm_store, std::string name)
void setCurrentFolder(const std::string &fullpath)
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
const std::string & pwd(void) const
unsigned long long m_cacheID_
static void getTopFolderPath(DQMStore *dqm_store, std::string type, std::string &path)