ATLAS Offline Software
Loading...
Searching...
No Matches
python.CaloScaleNoiseConfig Namespace Reference

Functions

 CaloScaleNoiseCfg (flagsIn, absolute=True, mu=60, dt=25, output='cellnoise_data.root', **hvscaleprops)

Variables

 parser = argparse.ArgumentParser(description="(Re-)scale noise based on HV DCS values")
 help
 action
 type
 str
 default
 args = parser.parse_args()
 flags = initConfigFlags()
 Files
 DatabaseInstance
 AtlasVersion
 GlobalTag
 SqliteInput
 SqliteFolders
 hvsp = buildHvScaleProps(args)
 cfg = MainEvgenServicesCfg(flags)

Function Documentation

◆ CaloScaleNoiseCfg()

CaloScaleNoiseCfg ( flagsIn,
absolute = True,
mu = 60,
dt = 25,
output = 'cellnoise_data.root',
** hvscaleprops )

Definition at line 12 of file CaloScaleNoiseConfig.py.

12def CaloScaleNoiseCfg(flagsIn, absolute=True, mu=60, dt=25, output='cellnoise_data.root', **hvscaleprops):
13
14 #Clone flags-container and modify it, since this is not a standard reco job
15 flags=flagsIn.clone()
16 flags.Calo.Noise.fixedLumiForNoise=1
17 flags.LAr.doHVCorr = False #Avoid double-rescaling
18 flags.lock()
19 msg = logging.getLogger("CaloScaleNoiseCfg")
20 #pick noise-tag depending on mu and dt
21 if not absolute:
22 #relative rescale, use current UPD-online tag
23 noisetag="LARNoiseOflCellNoise-RUN2-UPD1-00"
24 msg.info("Noise rescaling using tag %s", noisetag)
25 else:
26 if (dt!=25):
27 raise RuntimeError("At this point (late run 3), only a dt of 25ns is supported")
28 if mu==0:
29 noisetag="LARNoiseOflCellNoisenoise-mc16-EposA3-ofc25mu0-25ns"
30 elif mu==60:
31 noisetag="LARNoiseOflCellNoisenoise-mc16-EposA3-ofc25mu60-25ns"
32 else:
33 raise RuntimeError("At this point (late run 3), only mu values of 0 and 60 are supported")
34
35
36 msg.info("Absolute noise scaling using tag %s for mu=%i and dt=%i" , noisetag,mu,dt)
37
38 result=ComponentAccumulator()
39 from LArGeoAlgsNV.LArGMConfig import LArGMCfg
40 result.merge(LArGMCfg(flags))
41 from TileGeoModel.TileGMConfig import TileGMCfg
42 result.merge(TileGMCfg(flags))
43 result.merge(CaloNoiseCondAlgCfg(flags,noisetype="totalNoise"))
44 result.merge(CaloNoiseCondAlgCfg(flags,noisetype="electronicNoise"))
45 result.merge(CaloNoiseCondAlgCfg(flags,noisetype="pileupNoise"))
46 if noisetag is not None:
47 result.merge(addOverride(flags,"/LAR/NoiseOfl/CellNoise", noisetag))
48 result.merge(LArHVScaleCfg(flags, **hvscaleprops))
49 result.addEventAlgo(CompFactory.CaloRescaleNoise(absScaling=absolute))
50
51 import os
52 if os.path.exists(output):
53 os.remove(output)
54 result.addService(CompFactory.THistSvc(Output = ["file1 DATAFILE='"+output+"' OPT='RECREATE'"]))
55 result.setAppProperty("HistogramPersistency","ROOT")
56 return result
57
58

Variable Documentation

◆ action

python.CaloScaleNoiseConfig.action

Definition at line 65 of file CaloScaleNoiseConfig.py.

◆ args

python.CaloScaleNoiseConfig.args = parser.parse_args()

Definition at line 71 of file CaloScaleNoiseConfig.py.

◆ AtlasVersion

python.CaloScaleNoiseConfig.AtlasVersion

Definition at line 80 of file CaloScaleNoiseConfig.py.

◆ cfg

python.CaloScaleNoiseConfig.cfg = MainEvgenServicesCfg(flags)

Definition at line 88 of file CaloScaleNoiseConfig.py.

◆ DatabaseInstance

python.CaloScaleNoiseConfig.DatabaseInstance

Definition at line 78 of file CaloScaleNoiseConfig.py.

◆ default

python.CaloScaleNoiseConfig.default

Definition at line 68 of file CaloScaleNoiseConfig.py.

◆ Files

python.CaloScaleNoiseConfig.Files

Definition at line 77 of file CaloScaleNoiseConfig.py.

◆ flags

python.CaloScaleNoiseConfig.flags = initConfigFlags()

Definition at line 74 of file CaloScaleNoiseConfig.py.

◆ GlobalTag

python.CaloScaleNoiseConfig.GlobalTag

Definition at line 82 of file CaloScaleNoiseConfig.py.

◆ help

python.CaloScaleNoiseConfig.help

Definition at line 64 of file CaloScaleNoiseConfig.py.

◆ hvsp

python.CaloScaleNoiseConfig.hvsp = buildHvScaleProps(args)

Definition at line 87 of file CaloScaleNoiseConfig.py.

◆ parser

python.CaloScaleNoiseConfig.parser = argparse.ArgumentParser(description="(Re-)scale noise based on HV DCS values")

Definition at line 62 of file CaloScaleNoiseConfig.py.

◆ SqliteFolders

python.CaloScaleNoiseConfig.SqliteFolders

Definition at line 85 of file CaloScaleNoiseConfig.py.

◆ SqliteInput

python.CaloScaleNoiseConfig.SqliteInput

Definition at line 84 of file CaloScaleNoiseConfig.py.

◆ str

python.CaloScaleNoiseConfig.str

Definition at line 66 of file CaloScaleNoiseConfig.py.

◆ type

python.CaloScaleNoiseConfig.type

Definition at line 66 of file CaloScaleNoiseConfig.py.