|
|
Go to the documentation of this file.
28 dataLabel_(iConfig.getUntrackedParameter<
std::
string>(
"dataLabel",
"")),
29 UseInputDB_(iConfig.getUntrackedParameter<
bool>(
"UseInputDB",
false)),
33 filename(iConfig.getUntrackedParameter<
std::
string>(
"rootFilename",
"CondDB_TKCC_20X_v3_hlt_50822.root")),
34 dirpath(iConfig.getUntrackedParameter<
std::
string>(
"rootDirPath",
"")),
36 MeanNumberOfCluster(0),
37 calibrationthreshold(iConfig.getUntrackedParameter<uint32_t>(
"CalibrationThreshold", 10000)) {
41 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" before opening file " <<
filename.c_str();
43 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" after opening file ";
51 <<
"SiStripQualityHotStripIdentifierRoot::getNewObject called" << std::endl;
53 auto obj = std::make_unique<SiStripBadStrip>();
62 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] Total number of events is " <<
TotNumberOfEvents
63 <<
" which is bigger than " <<
calibrationthreshold <<
". Calibration is preparing to be launched."
67 <<
"Mean Number of Cluster is " <<
MeanNumberOfCluster <<
". Calibration is launched." << std::endl;
69 if (
AlgoName ==
"SiStripHotStripAlgorithmFromClusterOccupancy") {
70 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] "
71 "call to SiStripHotStripAlgorithmFromClusterOccupancy"
94 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] copy SiStripObject in SiStripBadStrip"
101 for (; rIter != rIterEnd; ++rIter) {
106 <<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists" << std::endl;
109 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] " <<
ss.str() << std::endl;
110 }
else if (
AlgoName ==
"SiStripBadAPVAlgorithmFromClusterOccupancy") {
111 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] "
112 "call to SiStripBadAPVAlgorithmFromClusterOccupancy"
118 parameters.getUntrackedParameter<
double>(
"HighOccupancyThreshold", 10));
122 parameters.getUntrackedParameter<
double>(
"OccupancyThreshold", 1.E-5));
136 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] copy SiStripObject in SiStripBadStrip"
139 std::stringstream
ss;
143 for (; rIter != rIterEnd; ++rIter) {
148 <<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists" << std::endl;
151 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] " <<
ss.str() << std::endl;
153 }
else if (
AlgoName ==
"SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy") {
155 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] call to "
156 "SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy"
161 parameters.getUntrackedParameter<
double>(
"ProbabilityThreshold", 1.E-7));
164 parameters.getUntrackedParameter<uint32_t>(
"MinNumEntriesPerStrip", 5));
174 parameters.getUntrackedParameter<
double>(
"HighOccupancyThreshold", 10));
178 parameters.getUntrackedParameter<
double>(
"OccupancyThreshold", 1.E-5));
190 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] copy SiStripObject in SiStripBadStrip"
193 std::stringstream
ss;
197 for (; rIter != rIterEnd; ++rIter) {
202 <<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists" << std::endl;
205 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] " <<
ss.str() << std::endl;
207 edm::LogError(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject]"
208 " call for a unknow HotStrip identification algoritm"
211 std::vector<uint32_t>
a;
215 <<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists" << std::endl;
221 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] :: Empty Events :: "
222 <<
"Mean Number of Cluster is " <<
MeanNumberOfCluster <<
" Calibration NOT launched" << std::endl;
227 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] :: Not Enough Events :: "
228 <<
"Total number of events is " <<
TotNumberOfEvents <<
" Calibration NOT launched" << std::endl;
263 <<
" [SiStripQualityHotStripIdentifierRoot::bookHistos] " <<
dirpath << std::endl;
268 <<
" [SiStripQualityHotStripIdentifierRoot::bookHistos] vector size " <<
MEs.size() << std::endl;
270 std::vector<MonitorElement*>::const_iterator iter =
MEs.begin();
271 std::vector<MonitorElement*>::const_iterator iterEnd =
MEs.end();
274 bool gotNentries =
true;
275 if (
parameters.getUntrackedParameter<uint32_t>(
"NumberOfEvents", 0) == 0 &&
276 parameters.getUntrackedParameter<
double>(
"OccupancyThreshold", 0) != 0)
279 <<
"[SiStripQualityHotStripIdentifierRoot::bookHistos] gotNentries flag " << gotNentries <<
" number of "
280 <<
parameters.getUntrackedParameter<uint32_t>(
"NumberOfEvents", 0) <<
" occup "
281 <<
parameters.getUntrackedParameter<
double>(
"OccupancyThreshold", 0) <<
" OccupancyHisto"
285 for (; iter != iterEnd; ++iter) {
288 if (!gotNentries && strstr(me_name.c_str(),
"TotalNumberOfCluster__T") !=
nullptr &&
289 strstr(me_name.c_str(),
"Profile") ==
nullptr) {
297 <<
"[SiStripQualityHotStripIdentifierRoot::bookHistos] gotNentries flag " << gotNentries << std::endl;
303 <<
" [SiStripQualityHotStripIdentifierRoot::bookHistos] :: Histogram with to check # of evemnts missing"
306 for (; iter != iterEnd; ++iter) {
309 if (strstr(me_name.c_str(), (
parameters.getUntrackedParameter<
std::string>(
"OccupancyHisto")).c_str()) ==
nullptr)
312 unsigned int detid = 0;
314 sprintf(
title,
"%s", me_name.c_str());
316 char* ptr = strtok_r(
title,
"__", &saveptr);
318 while (ptr !=
nullptr) {
323 ptr = strtok_r(
nullptr,
"_", &saveptr);
326 LogDebug(
"SiStripQualityHotStripIdentifierRoot")
327 <<
" [SiStripQualityHotStripIdentifierRoot::bookHistos] detid " << detid << std::endl;
T const * product() const
void extractBadAPVSandStrips(SiStripQuality *, HistoMap &, edm::ESHandle< SiStripQuality > &)
const TrackerTopology * tTopo
void setOccupancyThreshold(long double occupancy)
void setDoStore(const bool doStore)
When set to false the payload will not be written to the db.
void setMinNumEntriesPerStrip(unsigned short m)
void setProbabilityThreshold(long double prob)
static const char tracker_[]
void setNumberOfEvents(double Nevents)
uint32_t calibrationthreshold
void setNumberOfEvents(double Nevents)
void setAbsoluteLowThreshold(long double absolute_low)
void setLowOccupancyThreshold(long double low_occupancy)
SiStripQualityHotStripIdentifierRoot(const edm::ParameterSet &)
void setHighOccupancyThreshold(long double high_occupancy)
void setNumberIterations(int number_iterations)
T getUntrackedParameter(std::string const &, T const &) const
Log< level::Info, false > LogInfo
void setTrackerGeometry(const TrackerGeometry *tkgeom)
virtual std::vector< dqm::harvesting::MonitorElement * > getAllContents(std::string const &path) const
edm::ESHandle< SiStripQuality > SiStripQuality_
ContainerIterator getDataVectorBegin() const
Log< level::Warning, false > LogWarning
const edm::ParameterSet conf_
SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy * theIdentifier3
void extractBadAPVs(SiStripQuality *, HistoMap &, edm::ESHandle< SiStripQuality > &)
void setAbsoluteOccupancyThreshold(long double absolute_occupancy)
void extractBadStrips(SiStripQuality *, HistoMap &, const SiStripQuality *)
void setLowOccupancyThreshold(long double low_occupancy)
const TrackerGeometry * tracker_
std::pair< ContainerIterator, ContainerIterator > Range
RegistryIterator getRegistryVectorBegin() const
void setNumberOfEvents(double Nevents)
SiStripBadAPVAlgorithmFromClusterOccupancy * theIdentifier2
void setMinNumEntries(unsigned short m)
void algoBeginRun(const edm::Run &, const edm::EventSetup &) override
void setTrackerGeometry(const TrackerGeometry *tkgeom)
void setOutputFileName(std::string OutputFileName, bool WriteOutputFile)
unsigned long long m_cacheID_
void setHighOccupancyThreshold(long double high_occupancy)
void setTrackerGeometry(const TrackerGeometry *tkgeom)
std::unique_ptr< SiStripBadStrip > getNewObject() override
void setAbsoluteLowThreshold(long double absolute_low)
void setProbabilityThreshold(long double prob)
void algoEndJob() override
void setOutputFileName(std::string OutputFileName, bool WriteOutputFile)
Log< level::Error, false > LogError
SiStripHotStripAlgorithmFromClusterOccupancy * theIdentifier
~SiStripQualityHotStripIdentifierRoot() override
void setMinNumEntries(unsigned short m)
void setNumberIterations(int number_iterations)
edm::ESHandle< TrackerGeometry > theTrackerGeom
T getParameter(std::string const &) const
DQM_DEPRECATED bool open(std::string const &filename, bool overwrite=false, std::string const &path="", std::string const &prepend="", OpenRunDirs stripdirs=KeepRunDirs, bool fileMustExist=true)
void setAbsoluteOccupancyThreshold(long double occupancy)
Registry::const_iterator RegistryIterator
double MeanNumberOfCluster
void setMinNumEntriesPerStrip(unsigned short m)
RegistryIterator getRegistryVectorEnd() const
SiStrip::QualityHistosMap ClusterPositionHistoMap
void setOutputFileName(std::string OutputFileName, bool WriteOutputFile, std::string DQMOutfileName, bool WriteDQMHistograms)