|
|
Go to the documentation of this file.
27 UseInputDB_(iConfig.getUntrackedParameter<
bool>(
"UseInputDB",
false)),
31 filename(iConfig.getUntrackedParameter<
std::
string>(
"rootFilename",
"CondDB_TKCC_20X_v3_hlt_50822.root")),
32 dirpath(iConfig.getUntrackedParameter<
std::
string>(
"rootDirPath",
"")),
34 MeanNumberOfCluster(0),
35 calibrationthreshold(iConfig.getUntrackedParameter<uint32_t>(
"CalibrationThreshold", 10000)),
38 stripQualityToken_(UseInputDB_
41 : decltype(stripQualityToken_){}) {
45 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" before opening file " <<
filename.c_str();
47 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" after opening file ";
55 <<
"SiStripQualityHotStripIdentifierRoot::getNewObject called" << std::endl;
57 auto obj = std::make_unique<SiStripBadStrip>();
66 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] Total number of events is " <<
TotNumberOfEvents
67 <<
" which is bigger than " <<
calibrationthreshold <<
". Calibration is preparing to be launched."
71 <<
"Mean Number of Cluster is " <<
MeanNumberOfCluster <<
". Calibration is launched." << std::endl;
73 if (
AlgoName ==
"SiStripHotStripAlgorithmFromClusterOccupancy") {
74 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] "
75 "call to SiStripHotStripAlgorithmFromClusterOccupancy"
100 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] copy SiStripObject in SiStripBadStrip"
103 std::stringstream
ss;
107 for (; rIter != rIterEnd; ++rIter) {
109 qobj->getDataVectorBegin() + rIter->iend);
112 <<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists" << std::endl;
115 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] " <<
ss.str() << std::endl;
116 }
else if (
AlgoName ==
"SiStripBadAPVAlgorithmFromClusterOccupancy") {
117 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] "
118 "call to SiStripBadAPVAlgorithmFromClusterOccupancy"
124 parameters.getUntrackedParameter<
double>(
"HighOccupancyThreshold", 10));
128 parameters.getUntrackedParameter<
double>(
"OccupancyThreshold", 1.E-5));
144 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] copy SiStripObject in SiStripBadStrip"
147 std::stringstream
ss;
151 for (; rIter != rIterEnd; ++rIter) {
153 qobj->getDataVectorBegin() + rIter->iend);
156 <<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists" << std::endl;
159 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] " <<
ss.str() << std::endl;
161 }
else if (
AlgoName ==
"SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy") {
163 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] call to "
164 "SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy"
169 parameters.getUntrackedParameter<
double>(
"ProbabilityThreshold", 1.E-7));
172 parameters.getUntrackedParameter<uint32_t>(
"MinNumEntriesPerStrip", 5));
182 parameters.getUntrackedParameter<
double>(
"HighOccupancyThreshold", 10));
186 parameters.getUntrackedParameter<
double>(
"OccupancyThreshold", 1.E-5));
200 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] copy SiStripObject in SiStripBadStrip"
203 std::stringstream
ss;
207 for (; rIter != rIterEnd; ++rIter) {
209 qobj->getDataVectorBegin() + rIter->iend);
212 <<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists" << std::endl;
215 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] " <<
ss.str() << std::endl;
217 edm::LogError(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject]"
218 " call for a unknow HotStrip identification algoritm"
221 std::vector<uint32_t>
a;
225 <<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists" << std::endl;
231 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] :: Empty Events :: "
232 <<
"Mean Number of Cluster is " <<
MeanNumberOfCluster <<
" Calibration NOT launched" << std::endl;
237 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] :: Not Enough Events :: "
238 <<
"Total number of events is " <<
TotNumberOfEvents <<
" Calibration NOT launched" << std::endl;
260 <<
" [SiStripQualityHotStripIdentifierRoot::bookHistos] " <<
dirpath << std::endl;
265 <<
" [SiStripQualityHotStripIdentifierRoot::bookHistos] vector size " <<
MEs.size() << std::endl;
267 std::vector<MonitorElement*>::const_iterator iter =
MEs.begin();
268 std::vector<MonitorElement*>::const_iterator iterEnd =
MEs.end();
271 bool gotNentries =
true;
272 if (
parameters.getUntrackedParameter<uint32_t>(
"NumberOfEvents", 0) == 0 &&
273 parameters.getUntrackedParameter<
double>(
"OccupancyThreshold", 0) != 0)
276 <<
"[SiStripQualityHotStripIdentifierRoot::bookHistos] gotNentries flag " << gotNentries <<
" number of "
277 <<
parameters.getUntrackedParameter<uint32_t>(
"NumberOfEvents", 0) <<
" occup "
278 <<
parameters.getUntrackedParameter<
double>(
"OccupancyThreshold", 0) <<
" OccupancyHisto"
282 for (; iter != iterEnd; ++iter) {
285 if (!gotNentries && strstr(me_name.c_str(),
"TotalNumberOfCluster__T") !=
nullptr &&
286 strstr(me_name.c_str(),
"Profile") ==
nullptr) {
294 <<
"[SiStripQualityHotStripIdentifierRoot::bookHistos] gotNentries flag " << gotNentries << std::endl;
300 <<
" [SiStripQualityHotStripIdentifierRoot::bookHistos] :: Histogram with to check # of events missing"
303 for (; iter != iterEnd; ++iter) {
306 if (strstr(me_name.c_str(), (
parameters.getUntrackedParameter<
std::string>(
"OccupancyHisto")).c_str()) ==
nullptr)
309 unsigned int detid = 0;
311 sprintf(
title,
"%s", me_name.c_str());
313 char* ptr = strtok_r(
title,
"__", &saveptr);
315 while (ptr !=
nullptr) {
320 ptr = strtok_r(
nullptr,
"_", &saveptr);
323 LogDebug(
"SiStripQualityHotStripIdentifierRoot")
324 <<
" [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
Log< level::Warning, false > LogWarning
const edm::ParameterSet conf_
SiStripDetInfo read(std::string filePath)
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
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)
constexpr static char const *const kDefaultFile
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)
SiStrip::QualityHistosMap ClusterPositionHistoMap
void setOutputFileName(std::string OutputFileName, bool WriteOutputFile, std::string DQMOutfileName, bool WriteDQMHistograms)