Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix and check on empty DQM content #8256

Merged
merged 1 commit into from
Mar 13, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ SiStripQualityHotStripIdentifierRoot::SiStripQualityHotStripIdentifierRoot(const
filename(iConfig.getUntrackedParameter<std::string>("rootFilename","CondDB_TKCC_20X_v3_hlt_50822.root")),
dirpath(iConfig.getUntrackedParameter<std::string>("rootDirPath","")),
TotNumberOfEvents(0),
MeanNumberOfCluster(0),
calibrationthreshold(iConfig.getUntrackedParameter<uint32_t>("CalibrationThreshold",10000))
{
reader = new SiStripDetInfoFileReader(fp_.fullPath());
Expand Down Expand Up @@ -59,7 +60,7 @@ SiStripBadStrip* SiStripQualityHotStripIdentifierRoot::getNewObject(){

bookHistos();

if (TotNumberOfEvents>=calibrationthreshold)
if (TotNumberOfEvents>=calibrationthreshold && MeanNumberOfCluster > 0.01)
{
edm::LogInfo("SiStripQualityHotStripIdentifierRoot") <<" [SiStripQualityHotStripIdentifierRoot::getNewObject] Total number of events is " << TotNumberOfEvents << ". Calibration is launched." <<std::endl;

Expand Down Expand Up @@ -141,14 +142,14 @@ SiStripBadStrip* SiStripQualityHotStripIdentifierRoot::getNewObject(){
theIdentifier3->setMinNumEntries(parameters.getUntrackedParameter<uint32_t>("MinNumEntries",100));
theIdentifier3->setMinNumEntriesPerStrip(parameters.getUntrackedParameter<uint32_t>("MinNumEntriesPerStrip",5));
theIdentifier3->setNumberOfEvents(TotNumberOfEvents);
theIdentifier3->setMinNumOfEvents();
theIdentifier3->setOutputFileName(conf_.getUntrackedParameter<std::string>("OccupancyRootFile","Occupancy.root"),conf_.getUntrackedParameter<bool>("WriteOccupancyRootFile",false),conf_.getUntrackedParameter<std::string>("DQMHistoOutputFile","DQMHistos.root"),conf_.getUntrackedParameter<bool>("WriteDQMHistoOutputFile",false));
theIdentifier3->setTrackerGeometry(_tracker);
theIdentifier3->setLowOccupancyThreshold(parameters.getUntrackedParameter<double>("LowOccupancyThreshold",5));
theIdentifier3->setHighOccupancyThreshold(parameters.getUntrackedParameter<double>("HighOccupancyThreshold",10));
theIdentifier3->setAbsoluteLowThreshold(parameters.getUntrackedParameter<double>("AbsoluteLowThreshold",0));
theIdentifier3->setNumberIterations(parameters.getUntrackedParameter<uint32_t>("NumberIterations",2));
theIdentifier3->setAbsoluteOccupancyThreshold(parameters.getUntrackedParameter<double>("OccupancyThreshold",1.E-5));
theIdentifier3->setMinNumOfEvents();

SiStripQuality* qobj = new SiStripQuality();
theIdentifier3->extractBadAPVSandStrips(qobj,ClusterPositionHistoMap,SiStripQuality_);//here I insert SiStripQuality as input and get qobj as output
Expand Down Expand Up @@ -239,6 +240,7 @@ void SiStripQualityHotStripIdentifierRoot::bookHistos(){
if (!gotNentries && strstr(me_name.c_str(),"TotalNumberOfCluster__T")!=NULL && strstr(me_name.c_str(),"Profile")==NULL ){

TotNumberOfEvents = ((TH1F*)(*iter)->getTH1F())->GetEntries();
MeanNumberOfCluster = ((TH1F*)(*iter)->getTH1F())->GetMean();
edm::LogInfo("SiStripQualityHotStripIdentifierRoot")<< "Total Number of Events: " << TotNumberOfEvents << std::endl;

gotNentries=true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ class SiStripQualityHotStripIdentifierRoot : public ConditionDBWriter<SiStripBad
std::string filename, dirpath;
unsigned short MinClusterWidth_, MaxClusterWidth_;
double TotNumberOfEvents;
double MeanNumberOfCluster;
uint32_t calibrationthreshold;

SiStrip::QualityHistosMap ClusterPositionHistoMap;
Expand Down