Skip to content
Snippets Groups Projects
Commit 80eba81f authored by Jean-Baptiste De Vivie De Regie's avatar Jean-Baptiste De Vivie De Regie
Browse files

Merge branch 'LArCoverageNoiseNoHV' into '24.0'

Reproducibilty of LArCoverageMonAlg

See merge request !78714
parents 7894b6bd 2ce788c7
No related branches found
No related tags found
2 merge requests!787692025-03-24: merge of 24.0 into main,!78714Reproducibilty of LArCoverageMonAlg
......@@ -9,7 +9,7 @@ from AthenaConfiguration.AccumulatorCache import AccumulatorCache
@AccumulatorCache
def CaloNoiseCondAlgCfg(flags, noisetype="totalNoise"):
if noisetype not in ("electronicNoise","pileupNoise","totalNoise"):
if noisetype not in ("electronicNoise","pileupNoise","totalNoise","electronicNoiseNoHV"):
raise RuntimeError("Requested noise of unknown type %s" % noisetype)
noiseAlgName="Calo_"+noisetype+"Alg"
......@@ -109,12 +109,14 @@ def CaloNoiseCondAlgCfg(flags, noisetype="totalNoise"):
result.merge(addFolders(flags,"/TILE/OFL02/NOISE/CELL","TILE_OFL",className="CondAttrListCollection"))
if flags.LAr.doHVCorr:
log.info("Run2 & doLArHVCorr=True: Will rescale noise automatically for HV trips")
if flags.LAr.doHVCorr and noisetype != "electronicNoiseNoHV":
log.info("Run 2/3 & doLArHVCorr=True: Will rescale noise automatically for HV trips")
theCaloNoiseAlg.useHVCorr=True
from LArCalibUtils.LArHVScaleConfig import LArHVScaleCfg
result.merge(LArHVScaleCfg(flags))
pass
else:
theCaloNoiseAlg.useHVCorr=False
pass
else: #COMP200 case:
log.info("Configuring CaloNoiseCondAlg for Run1 real data processing")
......
......@@ -33,24 +33,29 @@ StatusCode CaloNoiseCondAlg::initialize() {
ATH_MSG_INFO("Will compute electronic noise");
m_noiseType=CaloNoise::ELEC;
}
else if (noiseKey=="pileupNoise") {
else if (noiseKey == "electronicNoiseNoHV") {
ATH_MSG_INFO("Will compute electronic noise without HV corrections");
m_noiseType = CaloNoise::ELEC;
if (m_useHVCorr) {
ATH_MSG_WARNING("Inconsistent configuration, set useHVCorr=False");
m_useHVCorr=false;
}
}
else if (noiseKey == "pileupNoise") {
ATH_MSG_INFO("Will compute pileup noise");
m_noiseType=CaloNoise::PILEUP;
if (m_useHVCorr) {
ATH_MSG_INFO("Disabling HV correction, only pile-up noise");
}
m_useHVCorr=false;
}
else if (noiseKey=="totalNoise") {
} else if (noiseKey == "totalNoise") {
m_noiseType=CaloNoise::TOTAL;
ATH_MSG_INFO("Will compute total (electronic + pileup) noise");
}
else {
} else {
ATH_MSG_ERROR("Unexpected noise key given: " << noiseKey << ". Expeced 'electronicNoise' or 'pileupNoise' or 'totalNoise'.");
return StatusCode::FAILURE;
}
ATH_CHECK( m_hvCorrKey.initialize(m_useHVCorr) );
const bool doLumiFolderInit = m_lumi0 < 0 && m_noiseType!=CaloNoise::ELEC;
......
......@@ -58,7 +58,7 @@ def LArCoverageConfigCore(helper, algoinstance,flags):
#Configure the CaloNoise
from CaloTools.CaloNoiseCondAlgConfig import CaloNoiseCondAlgCfg
helper.resobj.merge(CaloNoiseCondAlgCfg(flags, noisetype="electronicNoise"))
helper.resobj.merge(CaloNoiseCondAlgCfg(flags, noisetype="electronicNoiseNoHV"))
#-- caloNoise groups --
caloNoiseToolArrayEM = helper.addArray([nLayers],larCoverageAlg,caloNoiseToolGroupName+"EM",topPath='/')
......
......@@ -85,7 +85,7 @@ class LArCoverageAlg: public AthMonitorAlgorithm
SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};
/** Key for CaloNoise */
SG::ReadCondHandleKey<CaloNoise> m_noiseCDOKey{this,"CaloNoiseKey","electronicNoise","SG Key of CaloNoise data object"};
SG::ReadCondHandleKey<CaloNoise> m_noiseCDOKey{this,"CaloNoiseKey","electronicNoiseNoHV","SG Key of CaloNoise data object"};
/** Handle to bad-channel tools */
Gaudi::Property<std::vector<std::string> > m_problemsToMask{this,"ProblemsToMask",{}, "Bad-Channel categories to mask"};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment