27 dataLabel_(iConfig.getUntrackedParameter<
std::
string>(
"dataLabel",
"")),
28 UseInputDB_(iConfig.getUntrackedParameter<
bool>(
"UseInputDB",
false)),
32 filename(iConfig.getUntrackedParameter<
std::
string>(
"rootFilename",
"CondDB_TKCC_20X_v3_hlt_50822.root")),
33 dirpath(iConfig.getUntrackedParameter<
std::
string>(
"rootDirPath",
"")),
35 MeanNumberOfCluster(0),
36 calibrationthreshold(iConfig.getUntrackedParameter<uint32_t>(
"CalibrationThreshold", 10000)) {
40 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" before opening file " <<
filename.c_str();
42 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" after opening file ";
50 <<
"SiStripQualityHotStripIdentifierRoot::getNewObject called" << std::endl;
52 auto obj = std::make_unique<SiStripBadStrip>();
61 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] Total number of events is " <<
TotNumberOfEvents 62 <<
" which is bigger than " <<
calibrationthreshold <<
". Calibration is preparing to be launched." 66 <<
"Mean Number of Cluster is " <<
MeanNumberOfCluster <<
". Calibration is launched." << std::endl;
68 if (AlgoName ==
"SiStripHotStripAlgorithmFromClusterOccupancy") {
69 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] " 70 "call to SiStripHotStripAlgorithmFromClusterOccupancy" 93 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] copy SiStripObject in SiStripBadStrip" 100 for (; rIter != rIterEnd; ++rIter) {
105 <<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists" << std::endl;
108 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] " << ss.str() << std::endl;
109 }
else if (AlgoName ==
"SiStripBadAPVAlgorithmFromClusterOccupancy") {
110 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] " 111 "call to SiStripBadAPVAlgorithmFromClusterOccupancy" 117 parameters.getUntrackedParameter<
double>(
"HighOccupancyThreshold", 10));
121 parameters.getUntrackedParameter<
double>(
"OccupancyThreshold", 1.E-5));
135 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] copy SiStripObject in SiStripBadStrip" 138 std::stringstream
ss;
142 for (; rIter != rIterEnd; ++rIter) {
147 <<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists" << std::endl;
150 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] " << ss.str() << std::endl;
152 }
else if (AlgoName ==
"SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy") {
154 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] call to " 155 "SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy" 160 parameters.getUntrackedParameter<
double>(
"ProbabilityThreshold", 1.E-7));
163 parameters.getUntrackedParameter<uint32_t>(
"MinNumEntriesPerStrip", 5));
173 parameters.getUntrackedParameter<
double>(
"HighOccupancyThreshold", 10));
177 parameters.getUntrackedParameter<
double>(
"OccupancyThreshold", 1.E-5));
189 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] copy SiStripObject in SiStripBadStrip" 192 std::stringstream
ss;
196 for (; rIter != rIterEnd; ++rIter) {
201 <<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists" << std::endl;
204 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] " << ss.str() << std::endl;
206 edm::LogError(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject]" 207 " call for a unknow HotStrip identification algoritm" 210 std::vector<uint32_t>
a;
214 <<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists" << std::endl;
220 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] :: Empty Events :: " 221 <<
"Mean Number of Cluster is " <<
MeanNumberOfCluster <<
" Calibration NOT launched" << std::endl;
226 <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] :: Not Enough Events :: " 227 <<
"Total number of events is " <<
TotNumberOfEvents <<
" Calibration NOT launched" << std::endl;
262 <<
" [SiStripQualityHotStripIdentifierRoot::bookHistos] " <<
dirpath << std::endl;
267 <<
" [SiStripQualityHotStripIdentifierRoot::bookHistos] vector size " << MEs.size() << std::endl;
269 std::vector<MonitorElement*>::const_iterator iter = MEs.begin();
270 std::vector<MonitorElement*>::const_iterator iterEnd = MEs.end();
273 bool gotNentries =
true;
278 <<
"[SiStripQualityHotStripIdentifierRoot::bookHistos] gotNentries flag " << gotNentries <<
" number of " 284 for (; iter != iterEnd; ++iter) {
287 if (!gotNentries && strstr(me_name.c_str(),
"TotalNumberOfCluster__T") !=
nullptr &&
288 strstr(me_name.c_str(),
"Profile") ==
nullptr) {
296 <<
"[SiStripQualityHotStripIdentifierRoot::bookHistos] gotNentries flag " << gotNentries << std::endl;
302 <<
" [SiStripQualityHotStripIdentifierRoot::bookHistos] :: Histogram with to check # of evemnts missing" 305 for (; iter != iterEnd; ++iter) {
311 unsigned int detid = 0;
313 sprintf(title,
"%s", me_name.c_str());
315 char* ptr = strtok_r(title,
"__", &saveptr);
317 while (ptr !=
nullptr) {
322 ptr = strtok_r(
nullptr,
"_", &saveptr);
325 LogDebug(
"SiStripQualityHotStripIdentifierRoot")
326 <<
" [SiStripQualityHotStripIdentifierRoot::bookHistos] detid " << detid << std::endl;
void setProbabilityThreshold(long double prob)
void setAbsoluteLowThreshold(long double absolute_low)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void setOutputFileName(std::string OutputFileName, bool WriteOutputFile)
edm::ESHandle< SiStripQuality > SiStripQuality_
static const char tracker_[]
void extractBadStrips(SiStripQuality *, HistoMap &, edm::ESHandle< SiStripQuality > &)
SiStripQualityHotStripIdentifierRoot(const edm::ParameterSet &)
SiStrip::QualityHistosMap ClusterPositionHistoMap
void setNumberIterations(int number_iterations)
double MeanNumberOfCluster
SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy * theIdentifier3
void setOutputFileName(std::string OutputFileName, bool WriteOutputFile, std::string DQMOutfileName, bool WriteDQMHistograms)
void setAbsoluteOccupancyThreshold(long double absolute_occupancy)
void setAbsoluteLowThreshold(long double absolute_low)
void setNumberOfEvents(double Nevents)
void setTrackerGeometry(const TrackerGeometry *tkgeom)
~SiStripQualityHotStripIdentifierRoot() override
void setHighOccupancyThreshold(long double high_occupancy)
Registry::const_iterator RegistryIterator
void setLowOccupancyThreshold(long double low_occupancy)
uint32_t calibrationthreshold
unsigned long long m_cacheID_
const TrackerTopology * tTopo
RegistryIterator getRegistryVectorEnd() const
SiStripHotStripAlgorithmFromClusterOccupancy * theIdentifier
void algoEndJob() override
void setLowOccupancyThreshold(long double low_occupancy)
void setMinNumEntries(unsigned short m)
void algoBeginRun(const edm::Run &, const edm::EventSetup &) override
void setOccupancyThreshold(long double occupancy)
std::vector< MonitorElement * > getAllContents(std::string const &path, uint32_t runNumber=0, uint32_t lumi=0) const
const TrackerGeometry * tracker_
void setTrackerGeometry(const TrackerGeometry *tkgeom)
ContainerIterator getDataVectorBegin() const
void setAbsoluteOccupancyThreshold(long double occupancy)
void setNumberOfEvents(double Nevents)
void setProbabilityThreshold(long double prob)
const edm::ParameterSet conf_
void setTrackerGeometry(const TrackerGeometry *tkgeom)
void setNumberIterations(int number_iterations)
void setOutputFileName(std::string OutputFileName, bool WriteOutputFile)
RegistryIterator getRegistryVectorBegin() const
void setDoStore(const bool doStore)
When set to false the payload will not be written to the db.
void setMinNumEntries(unsigned short m)
std::pair< ContainerIterator, ContainerIterator > Range
void extractBadAPVs(SiStripQuality *, HistoMap &, edm::ESHandle< SiStripQuality > &)
SiStripBadAPVAlgorithmFromClusterOccupancy * theIdentifier2
bool open(std::string const &filename, bool overwrite=false, std::string const &path="", std::string const &prepend="", OpenRunDirs stripdirs=KeepRunDirs, bool fileMustExist=true)
void extractBadAPVSandStrips(SiStripQuality *, HistoMap &, edm::ESHandle< SiStripQuality > &)
T const * product() const
void setNumberOfEvents(double Nevents)
void setHighOccupancyThreshold(long double high_occupancy)
edm::ESHandle< TrackerGeometry > theTrackerGeom
std::unique_ptr< SiStripBadStrip > getNewObject() override
void setMinNumEntriesPerStrip(unsigned short m)
void setMinNumEntriesPerStrip(unsigned short m)