|
|
Go to the documentation of this file.
26 UseInputDB_(iConfig.getUntrackedParameter<
bool>(
"UseInputDB",
false)),
30 filename(iConfig.getUntrackedParameter<
std::
string>(
"rootFilename",
"CondDB_TKCC_20X_v3_hlt_50822.root")),
31 dirpath(iConfig.getUntrackedParameter<
std::
string>(
"rootDirPath",
"")),
33 MeanNumberOfCluster(0),
34 calibrationthreshold(iConfig.getUntrackedParameter<uint32_t>(
"CalibrationThreshold", 10000)),
37 stripQualityToken_(UseInputDB_
40 : decltype(stripQualityToken_){}) {
44 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" before opening file " <<
filename.c_str();
46 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" after opening file ";
54 <<
"SiStripQualityHotStripIdentifierRoot::getNewObject called" << std::endl;
56 auto obj = std::make_unique<SiStripBadStrip>();
65 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] Total number of events is " <<
TotNumberOfEvents
66 <<
" which is bigger than " <<
calibrationthreshold <<
". Calibration is preparing to be launched."
70 <<
"Mean Number of Cluster is " <<
MeanNumberOfCluster <<
". Calibration is launched." << std::endl;
72 if (
AlgoName ==
"SiStripHotStripAlgorithmFromClusterOccupancy") {
73 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] "
74 "call to SiStripHotStripAlgorithmFromClusterOccupancy"
97 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] copy SiStripObject in SiStripBadStrip"
100 std::stringstream
ss;
104 for (; rIter != rIterEnd; ++rIter) {
109 <<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists" << std::endl;
112 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] " <<
ss.str() << std::endl;
113 }
else if (
AlgoName ==
"SiStripBadAPVAlgorithmFromClusterOccupancy") {
114 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] "
115 "call to SiStripBadAPVAlgorithmFromClusterOccupancy"
121 parameters.getUntrackedParameter<
double>(
"HighOccupancyThreshold", 10));
125 parameters.getUntrackedParameter<
double>(
"OccupancyThreshold", 1.E-5));
139 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] copy SiStripObject in SiStripBadStrip"
142 std::stringstream
ss;
146 for (; rIter != rIterEnd; ++rIter) {
151 <<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists" << std::endl;
154 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] " <<
ss.str() << std::endl;
156 }
else if (
AlgoName ==
"SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy") {
158 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] call to "
159 "SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy"
164 parameters.getUntrackedParameter<
double>(
"ProbabilityThreshold", 1.E-7));
167 parameters.getUntrackedParameter<uint32_t>(
"MinNumEntriesPerStrip", 5));
177 parameters.getUntrackedParameter<
double>(
"HighOccupancyThreshold", 10));
181 parameters.getUntrackedParameter<
double>(
"OccupancyThreshold", 1.E-5));
193 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] copy SiStripObject in SiStripBadStrip"
196 std::stringstream
ss;
200 for (; rIter != rIterEnd; ++rIter) {
205 <<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists" << std::endl;
208 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] " <<
ss.str() << std::endl;
210 edm::LogError(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject]"
211 " call for a unknow HotStrip identification algoritm"
214 std::vector<uint32_t>
a;
218 <<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists" << std::endl;
224 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] :: Empty Events :: "
225 <<
"Mean Number of Cluster is " <<
MeanNumberOfCluster <<
" Calibration NOT launched" << std::endl;
230 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] :: Not Enough Events :: "
231 <<
"Total number of events is " <<
TotNumberOfEvents <<
" Calibration NOT launched" << std::endl;
253 <<
" [SiStripQualityHotStripIdentifierRoot::bookHistos] " <<
dirpath << std::endl;
258 <<
" [SiStripQualityHotStripIdentifierRoot::bookHistos] vector size " <<
MEs.size() << std::endl;
260 std::vector<MonitorElement*>::const_iterator iter =
MEs.begin();
261 std::vector<MonitorElement*>::const_iterator iterEnd =
MEs.end();
264 bool gotNentries =
true;
265 if (
parameters.getUntrackedParameter<uint32_t>(
"NumberOfEvents", 0) == 0 &&
266 parameters.getUntrackedParameter<
double>(
"OccupancyThreshold", 0) != 0)
269 <<
"[SiStripQualityHotStripIdentifierRoot::bookHistos] gotNentries flag " << gotNentries <<
" number of "
270 <<
parameters.getUntrackedParameter<uint32_t>(
"NumberOfEvents", 0) <<
" occup "
271 <<
parameters.getUntrackedParameter<
double>(
"OccupancyThreshold", 0) <<
" OccupancyHisto"
275 for (; iter != iterEnd; ++iter) {
278 if (!gotNentries && strstr(me_name.c_str(),
"TotalNumberOfCluster__T") !=
nullptr &&
279 strstr(me_name.c_str(),
"Profile") ==
nullptr) {
287 <<
"[SiStripQualityHotStripIdentifierRoot::bookHistos] gotNentries flag " << gotNentries << std::endl;
293 <<
" [SiStripQualityHotStripIdentifierRoot::bookHistos] :: Histogram with to check # of evemnts missing"
296 for (; iter != iterEnd; ++iter) {
299 if (strstr(me_name.c_str(), (
parameters.getUntrackedParameter<
std::string>(
"OccupancyHisto")).c_str()) ==
nullptr)
302 unsigned int detid = 0;
304 sprintf(
title,
"%s", me_name.c_str());
306 char* ptr = strtok_r(
title,
"__", &saveptr);
308 while (ptr !=
nullptr) {
313 ptr = strtok_r(
nullptr,
"_", &saveptr);
316 LogDebug(
"SiStripQualityHotStripIdentifierRoot")
317 <<
" [SiStripQualityHotStripIdentifierRoot::bookHistos] detid " << detid << std::endl;
bool check(const edm::EventSetup &iSetup)
const TrackerTopology * tTopo
void extractBadAPVs(SiStripQuality *, HistoMap &, const SiStripQuality *)
void extractBadAPVSandStrips(SiStripQuality *, HistoMap &, const SiStripQuality *)
void setOccupancyThreshold(long double occupancy)
void setDoStore(const bool doStore)
When set to false the payload will not be written to the db.
edm::ESGetToken< SiStripQuality, SiStripQualityRcd > stripQualityToken_
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
ContainerIterator getDataVectorBegin() const
Log< level::Warning, false > LogWarning
const edm::ParameterSet conf_
SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy * theIdentifier3
void setAbsoluteOccupancyThreshold(long double absolute_occupancy)
void extractBadStrips(SiStripQuality *, HistoMap &, const SiStripQuality *)
edm::ESWatcher< SiStripQualityRcd > stripQualityWatcher_
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
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
void setTrackerGeometry(const TrackerGeometry *tkgeom)
void setOutputFileName(std::string OutputFileName, bool WriteOutputFile)
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
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
bool getData(T &iHolder) const
~SiStripQualityHotStripIdentifierRoot() override
void setMinNumEntries(unsigned short m)
void setNumberIterations(int number_iterations)
const SiStripQuality * SiStripQuality_
T getParameter(std::string const &) const
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)