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

SiPixelQuality PCL bug fix #24443

Merged
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
26 changes: 25 additions & 1 deletion CalibTracker/SiPixelQuality/plugins/SiPixelStatusHarvester.cc
Expand Up @@ -320,6 +320,30 @@ void SiPixelStatusHarvester::endRunProduce(edm::Run& iRun, const edm::EventSetup
siPixelQualityPCL_Tag[itIOV->first] = siPixelQualityPermBad;
siPixelQualityPrompt_Tag[itIOV->first] = siPixelQualityPermBad;

// loop over modules to fill the PROMPT DQM plots with permanent bad components
std::map<int, SiPixelModuleStatus> detectorStatus = tmpSiPixelStatus.getDetectorStatus();
std::map<int, SiPixelModuleStatus>::iterator itModEnd = detectorStatus.end();
for (std::map<int, SiPixelModuleStatus>::iterator itMod = detectorStatus.begin(); itMod != itModEnd; ++itMod) {

int detid = itMod->first;
uint32_t detId = uint32_t(detid);
SiPixelModuleStatus modStatus = itMod->second;

for (int iroc = 0; iroc < modStatus.nrocs(); ++iroc) {

if(badPixelInfo_->IsRocBad(detId, short(iroc))){
std::map<int, std::pair<int,int> > rocToOfflinePixel = pixelO2O_[detid];
int row = rocToOfflinePixel[iroc].first;
int column = rocToOfflinePixel[iroc].second; for (int iLumi = 0; iLumi<interval;iLumi++){
histo[PROMPTBADROC].fill(detId, nullptr, column, row);//, 1.0/nLumiBlock_);
}

} // if permanent BAD

} // loop over ROCs

} // loop over modules

// add empty bad components to "other" tag
edm::LogInfo("SiPixelStatusHarvester")
<< "Tag requested for other in low statistics IOV in the "<<outputBase_<<" harvester"<< std::endl;
Expand Down Expand Up @@ -559,7 +583,7 @@ bool SiPixelStatusHarvester::equal(SiPixelQuality* a, SiPixelQuality* b){
if(detIdA!=detIdB) return false;
else{
unsigned short BadRocsA = badRocListA[i].BadRocs;
unsigned short BadRocsB = badRocListA[i].BadRocs;
unsigned short BadRocsB = badRocListB[i].BadRocs;
if(BadRocsA!=BadRocsB) return false;
}

Expand Down
106 changes: 43 additions & 63 deletions CalibTracker/SiPixelQuality/test/step4_ALCAHARVEST.py
@@ -1,22 +1,26 @@
# Auto generated configuration file
# using:
# Revision: 1.381.2.28
# Source: /local/reps/CMSSW/CMSSW/Configuration/PyReleaseValidation/python/ConfigBuilder.py,v
# with command line options: step4 --data --conditions auto:com10 --scenario pp -s ALCAHARVEST:SiStripGains --filein file:PromptCalibProdSiStripGains.root -n -1 --no_exec
# Revision: 1.19
# Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v
# with command line options: step4 --conditions 100X_dataRun2_Express_v2 -s ALCAHARVEST:SiPixelQuality --data --era Run2_2017 --filein file:PromptCalibProdSiPixel.root --scenario pp -n 1 --fileout file:step4.root
import FWCore.ParameterSet.Config as cms

process = cms.Process('ALCAHARVEST')
from Configuration.StandardSequences.Eras import eras

process = cms.Process('ALCAHARVEST',eras.Run2_2018)

# import of standard configurations
process.load('Configuration.StandardSequences.Services_cff')
process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
process.load('FWCore.MessageService.MessageLogger_cfi')
process.load('Configuration.EventContent.EventContent_cff')
process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
process.load('Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff')
process.load('Configuration.StandardSequences.AlCaHarvesting_cff')
process.load('Configuration.Geometry.GeometryRecoDB_cff')
process.load('Configuration.StandardSequences.MagneticField_cff')
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')

process.MessageLogger.cerr.FwkReport.reportEvery = 50000

process.maxEvents = cms.untracked.PSet(
input = cms.untracked.int32(-1)
)
Expand All @@ -35,68 +39,44 @@
fileMode = cms.untracked.string('FULLMERGE')
)

process.PoolDBOutputService = cms.Service("PoolDBOutputService",
DBParameters = cms.PSet(
authenticationPath = cms.untracked.string(''),
authenticationSystem = cms.untracked.int32(0),
messageLevel = cms.untracked.int32(0),
security = cms.untracked.string('')
),
connect = cms.string('sqlite_file:promptCalibConditions.db'),
toPut = cms.VPSet(
cms.PSet(
record = cms.string('SiPixelQualityFromDbRcd_PCL'),
tag = cms.string('SiPixelQualityFromDbRcd_PCL'),
timetype = cms.untracked.string('runnumber')
),
cms.PSet(
record = cms.string('SiPixelQualityFromDbRcd_prompt'),
tag = cms.string('SiPixelQualityFromDbRcd_prompt'),
timetype = cms.untracked.string('lumiid')
),
cms.PSet(
record = cms.string('SiPixelQualityFromDbRcd_stuckTBM'),
tag = cms.string('SiPixelQualityFromDbRcd_stuckTBM'),
timetype = cms.untracked.string('lumiid'),
),
cms.PSet(
record = cms.string('SiPixelQualityFromDbRcd_other'),
tag = cms.string('SiPixelQualityFromDbRcd_other'),
timetype = cms.untracked.string('lumiid')
)

)

# Production Info
process.configurationMetadata = cms.untracked.PSet(
annotation = cms.untracked.string('step4 nevts:1'),
name = cms.untracked.string('Applications'),
version = cms.untracked.string('$Revision: 1.19 $')
)

# Output definition

# Other statements
process.PoolDBOutputService.toPut.extend(process.ALCAHARVESTSiPixelQuality_dbOutput)
process.pclMetadataWriter.recordsToMap.extend(process.ALCAHARVESTSiPixelQuality_metadata)
from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag(process.GlobalTag, '100X_dataRun2_Express_v2', '')

#This tag is already in the GT
#process.GlobalTag.toGet.append(
# cms.PSet(
# record = cms.string("SiPixelQualityFromDbRcd"),
# tag = cms.string("SiPixelQuality_v03_dup_hlt"),
# connect = cms.string("frontier://FrontierProd/CMS_CONDITIONS")
# )
#)
process.GlobalTag = GlobalTag(process.GlobalTag, '102X_dataRun2_Express_v1', '')

# Path and EndPath definitions
process.ALCAHARVESTSiPixelQuality = cms.EDAnalyzer("SiPixelStatusHarvester",

SiPixelStatusManagerParameters = cms.PSet(
outputBase = cms.untracked.string("dynamicLumibased"), #nLumibased #runbased #dynamicLumibased
aveDigiOcc = cms.untracked.int32(20000),
resetEveryNLumi = cms.untracked.int32(10),
moduleName = cms.untracked.string("siPixelStatusProducer"),
label = cms.untracked.string("siPixelStatus"),
),
debug = cms.untracked.bool(True),
recordName = cms.untracked.string("SiPixelQualityFromDbRcd"),
)

process.SiPixelQuality = cms.Path(process.ALCAHARVESTSiPixelQuality)
process.ALCAHARVESTDQMSaveAndMetadataWriter = cms.Path(process.dqmSaver+process.pclMetadataWriter)
process.EcalPedestals = cms.Path(process.ALCAHARVESTEcalPedestals)
process.LumiPCC = cms.Path(process.ALCAHARVESTLumiPCC)
process.BeamSpotByRun = cms.Path(process.ALCAHARVESTBeamSpotByRun)
process.SiPixelQuality = cms.Path(process.ALCAHARVESTSiPixelQuality)#+process.siPixelPhase1DQMHarvester)
process.SiStripGains = cms.Path(process.ALCAHARVESTSiStripGains)
process.BeamSpotHPByRun = cms.Path(process.ALCAHARVESTBeamSpotHPByRun)
process.SiPixelAli = cms.Path(process.ALCAHARVESTSiPixelAli)
process.BeamSpotByLumi = cms.Path(process.ALCAHARVESTBeamSpotByLumi)
process.BeamSpotHPByLumi = cms.Path(process.ALCAHARVESTBeamSpotHPByLumi)
process.SiStripGainsAAG = cms.Path(process.ALCAHARVESTSiStripGainsAAG)
process.SiStripQuality = cms.Path(process.ALCAHARVESTSiStripQuality)

# Schedule definition
process.schedule = cms.Schedule(process.SiPixelQuality)
process.schedule = cms.Schedule(process.SiPixelQuality,process.ALCAHARVESTDQMSaveAndMetadataWriter)
from PhysicsTools.PatAlgos.tools.helpers import associatePatAlgosToolsTask
associatePatAlgosToolsTask(process)


# Customisation from command line

# Add early deletion of temporary data products to reduce peak memory need
from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete
process = customiseEarlyDelete(process)
# End adding early deletion