ATLAS Offline Software
Functions | Variables
python.CaloScaleNoiseConfig Namespace Reference

Functions

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

Variables

 parser = argparse.ArgumentParser(description="(Re-)scale noise based on HV DCS values")
 
 help
 
 action
 
 type
 
 str
 
 default
 
 args = parser.parse_args()
 
 ts = strptime(args.datestamp+'/UTC','%Y-%m-%d:%H:%M:%S/%Z')
 
 TimeStamp = int(timegm(ts))
 
int TimeStamp_ns = TimeStamp*1000000000
 
 rlb = TimeStampToRunLumi(TimeStamp_ns)
 
 flags = initConfigFlags()
 
 RunNumbers
 
 TimeStamps
 
 Files
 
 DatabaseInstance
 
 AtlasVersion
 
 GlobalTag
 
 cfg = MainEvgenServicesCfg(flags)
 

Function Documentation

◆ CaloScaleNoiseCfg()

def python.CaloScaleNoiseConfig.CaloScaleNoiseCfg (   flagsIn,
  absolute = True,
  mu = 60,
  dt = 25,
  output = 'cellnoise_data.root' 
)

Definition at line 12 of file CaloScaleNoiseConfig.py.

12 def CaloScaleNoiseCfg(flagsIn,absolute=True,mu=60,dt=25,output='cellnoise_data.root'):
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 
20  msg = logging.getLogger("CaloScaleNoiseCfg")
21  #pick noise-tag depending on mu and dt
22 
23  if not absolute:
24  #relative rescale, use current UPD-online tag
25  noisetag="LARNoiseOflCellNoise-RUN2-UPD1-00"
26  msg.info("Noise rescaling using tag %s", noisetag)
27  else:
28  if (dt!=25):
29  raise RuntimeError("At this point (early run 3), only a dt of 25ns is supported")
30 
31  if mu==0:
32  noisetag="LARNoiseOflCellNoisenoise-mc16-EposA3-ofc25mu0-25ns"
33  elif mu==60:
34  noisetag="LARNoiseOflCellNoisenoise-mc16-EposA3-ofc25mu60-25ns"
35  else:
36  raise RuntimeError("At this point (early run 3), only mu values of 0 and 60 are supported")
37 
38 
39  msg.info("Absolute noise scaling using tag %s for mu=%i and dt=%i" , noisetag,mu,dt)
40 
41  result=ComponentAccumulator()
42 
43  from LArGeoAlgsNV.LArGMConfig import LArGMCfg
44  result.merge(LArGMCfg(flags))
45  from TileGeoModel.TileGMConfig import TileGMCfg
46  result.merge(TileGMCfg(flags))
47 
48 
49  result.merge(CaloNoiseCondAlgCfg(flags,noisetype="totalNoise"))
50  result.merge(CaloNoiseCondAlgCfg(flags,noisetype="electronicNoise"))
51  result.merge(CaloNoiseCondAlgCfg(flags,noisetype="pileupNoise"))
52 
53 
54  if absolute:
55  result.merge(addOverride(flags,"/LAR/NoiseOfl/CellNoise",noisetag))
56  else:
57  result.merge(addOverride(flags,"/LAR/NoiseOfl/CellNoise",noisetag))
58 
59  result.merge(LArHVScaleCfg(flags))
60 
61  result.addEventAlgo(CompFactory.CaloRescaleNoise(absScaling=absolute))
62 
63  import os
64  rootfile="cellnoise_data.root"
65  if os.path.exists(rootfile):
66  os.remove(rootfile)
67  result.addService(CompFactory.THistSvc(Output = ["file1 DATAFILE='"+output+"' OPT='RECREATE'"]))
68  result.setAppProperty("HistogramPersistency","ROOT")
69 
70  return result
71 
72 

Variable Documentation

◆ action

python.CaloScaleNoiseConfig.action

Definition at line 77 of file CaloScaleNoiseConfig.py.

◆ args

python.CaloScaleNoiseConfig.args = parser.parse_args()

Definition at line 80 of file CaloScaleNoiseConfig.py.

◆ AtlasVersion

python.CaloScaleNoiseConfig.AtlasVersion

Definition at line 109 of file CaloScaleNoiseConfig.py.

◆ cfg

python.CaloScaleNoiseConfig.cfg = MainEvgenServicesCfg(flags)

Definition at line 115 of file CaloScaleNoiseConfig.py.

◆ DatabaseInstance

python.CaloScaleNoiseConfig.DatabaseInstance

Definition at line 107 of file CaloScaleNoiseConfig.py.

◆ default

python.CaloScaleNoiseConfig.default

Definition at line 79 of file CaloScaleNoiseConfig.py.

◆ Files

python.CaloScaleNoiseConfig.Files

Definition at line 106 of file CaloScaleNoiseConfig.py.

◆ flags

python.CaloScaleNoiseConfig.flags = initConfigFlags()

Definition at line 103 of file CaloScaleNoiseConfig.py.

◆ GlobalTag

python.CaloScaleNoiseConfig.GlobalTag

Definition at line 112 of file CaloScaleNoiseConfig.py.

◆ help

python.CaloScaleNoiseConfig.help

Definition at line 76 of file CaloScaleNoiseConfig.py.

◆ parser

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

Definition at line 75 of file CaloScaleNoiseConfig.py.

◆ rlb

list python.CaloScaleNoiseConfig.rlb = TimeStampToRunLumi(TimeStamp_ns)

Definition at line 96 of file CaloScaleNoiseConfig.py.

◆ RunNumbers

python.CaloScaleNoiseConfig.RunNumbers

Definition at line 104 of file CaloScaleNoiseConfig.py.

◆ str

python.CaloScaleNoiseConfig.str

Definition at line 78 of file CaloScaleNoiseConfig.py.

◆ TimeStamp

python.CaloScaleNoiseConfig.TimeStamp = int(timegm(ts))

Definition at line 87 of file CaloScaleNoiseConfig.py.

◆ TimeStamp_ns

int python.CaloScaleNoiseConfig.TimeStamp_ns = TimeStamp*1000000000

Definition at line 88 of file CaloScaleNoiseConfig.py.

◆ TimeStamps

python.CaloScaleNoiseConfig.TimeStamps

Definition at line 105 of file CaloScaleNoiseConfig.py.

◆ ts

python.CaloScaleNoiseConfig.ts = strptime(args.datestamp+'/UTC','%Y-%m-%d:%H:%M:%S/%Z')

Definition at line 86 of file CaloScaleNoiseConfig.py.

◆ type

python.CaloScaleNoiseConfig.type

Definition at line 78 of file CaloScaleNoiseConfig.py.

python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.CaloScaleNoiseConfig.CaloScaleNoiseCfg
def CaloScaleNoiseCfg(flagsIn, absolute=True, mu=60, dt=25, output='cellnoise_data.root')
Definition: CaloScaleNoiseConfig.py:12
python.IOVDbSvcConfig.addOverride
def addOverride(flags, folder, tag, db=None)
Definition: IOVDbSvcConfig.py:224
python.CaloNoiseCondAlgConfig.CaloNoiseCondAlgCfg
def CaloNoiseCondAlgCfg(flags, noisetype="totalNoise")
Definition: CaloNoiseCondAlgConfig.py:11
LArGMConfig.LArGMCfg
def LArGMCfg(flags)
Definition: LArGMConfig.py:8
python.LArHVScaleConfig.LArHVScaleCfg
def LArHVScaleCfg(configFlags)
Definition: LArHVScaleConfig.py:8
TileGMConfig.TileGMCfg
def TileGMCfg(flags)
Definition: TileGMConfig.py:7