ATLAS Offline Software
Classes | Functions
python.LArConfigFlags Namespace Reference

Classes

class  RawChannelSource
 

Functions

def createLArConfigFlags ()
 
def _getLArRunInfo (prevFlags)
 
def _determineRawChannelSource (prevFlags)
 

Function Documentation

◆ _determineRawChannelSource()

def python.LArConfigFlags._determineRawChannelSource (   prevFlags)
private

Definition at line 108 of file LArConfigFlags.py.

108 def _determineRawChannelSource(prevFlags):
109  log = logging.getLogger('LArConfigFlags.determineRawChannelSource')
110  if prevFlags.Input.isMC or prevFlags.Overlay.DataOverlay:
111  return RawChannelSource.Input
112 
113  lri=_getLArRunInfo(prevFlags)
114  #runType: 0=RawData, 1=RawDataResult, 2=Result
115  if lri is None or lri.runType is None:
116  log.warning("WARNING do not have LArRunInfo !")
117  return RawChannelSource.Both
118  log.info("runType %d",lri.runType())
119  if (lri.runType()==0):
120  return RawChannelSource.Calculated #Have only digits in bytestream
121  elif (lri.runType()==1 or lri.runType()==2):
122  return RawChannelSource.Both #Have both, digits and raw-channels in bytestream
123  else:
124  log.warning("Unknown LAr run type %i",lri.runType())
125  return RawChannelSource.Both

◆ _getLArRunInfo()

def python.LArConfigFlags._getLArRunInfo (   prevFlags)
private

Definition at line 96 of file LArConfigFlags.py.

96 def _getLArRunInfo(prevFlags):
97  log = logging.getLogger('LArConfigFlags.getLArRunInfo')
98  global _lArRunInfo #Cache of lar run info
99  if _lArRunInfo is None:
100  from LArConditionsCommon.LArRunFormat import getLArFormatForRun
101  runnbr=prevFlags.Input.RunNumbers[0] #If more than one run, assume config for first run is valid for all runs
102  dbStr="COOLONL_LAR/"+prevFlags.IOVDb.DatabaseInstance
103  _lArRunInfo=getLArFormatForRun(run=runnbr,connstring=dbStr)
104  log.info("Got LArRunInfo for run %d",runnbr)
105  return _lArRunInfo
106 
107 

◆ createLArConfigFlags()

def python.LArConfigFlags.createLArConfigFlags ( )

Definition at line 13 of file LArConfigFlags.py.

14  lcf=AthConfigFlags()
15 
16  lcf.addFlag("LAr.doAlign",lambda prevFlags : prevFlags.GeoModel.Layout=="atlas")
17  lcf.addFlag("LAr.doHVCorr",lambda prevFlags : not prevFlags.Input.isMC)
18  lcf.addFlag("LAr.doCellEmMisCalib",lambda prevFlags : prevFlags.Input.isMC)
19 
20  lcf.addFlag("LAr.RawChannelSource", _determineRawChannelSource, type=RawChannelSource)
21 
22  lcf.addFlag("LAr.doCellNoiseMasking",True)
23  lcf.addFlag("LAr.doCellSporadicNoiseMasking",True)
24  lcf.addFlag("LAr.doBadFebMasking",lambda prevFlags : not prevFlags.Input.isMC)
25  lcf.addFlag("LAr.doDeadOTxCorr",lambda prevFlags : not prevFlags.Input.isMC and prevFlags.GeoModel.Run >= LHCPeriod.Run3)
26 
27  # Include MC shape folder
28  lcf.addFlag("LAr.UseMCShape", True)
29  # Name of sqlite file containing Electronic Calibration values
30  lcf.addFlag("LAr.ElecCalibSqlite", "")
31  # Load Electronic Calibration constants
32  lcf.addFlag("LAr.LoadElecCalib", True)
33  # Folder name for Optimal Filtering coefficients (empty means default)
34  lcf.addFlag("LAr.OFCShapeFolder", "")
35  # Load conditions with this `run-number' string
36  lcf.addFlag("LAr.ForceIOVRunNumber", "")
37  # Include Shape folder
38  lcf.addFlag("LAr.UseShape", True)
39  # DataBase server string
40  lcf.addFlag("LAr.DBConnection", "")
41 
42  # Number of collisions to optimize OFC for pileup
43  lcf.addFlag("LAr.ROD.NumberOfCollisions",0)
44  # Number of samples in LAr digitization + ROD emulation
45  lcf.addFlag("LAr.ROD.nSamples", 5)
46  # Index of first sample in LAr digitization + ROD emulation
47  lcf.addFlag("LAr.ROD.FirstSample", 0)
48  # Number of preceeding samples (necessary for phase 2 simulation)
49  lcf.addFlag("LAr.ROD.nPreceedingSamples", 0)
50  # Force using the highest gain autocorrelation function
51  # when doing OFC optimization
52  lcf.addFlag("LAr.ROD.UseHighestGainAutoCorr", False)
53  # Flag not to use pileup noise neither average constrain in EMB and EMEC-OW,
54  # and both pileup noise and average constrain everywhere else
55  lcf.addFlag("LAr.ROD.DoOFCMixedOptimization", False)
56 
58  lcf.addFlag("LAr.ROD.UseDelta", 0)
59  # Force using the iterative OFC procedure
60  lcf.addFlag("LAr.ROD.forceIter",False)
61  # NN based energy reconstruction
62  lcf.addFlag("LAr.ROD.NNRawChannelBuilding", False)
63  lcf.addFlag("LAr.ROD.nnJson", "")
64  lcf.addFlag("LAr.ROD.nnOutputNode", "")
65  lcf.addFlag("LAr.ROD.nnInputNode", "")
66  # default LArRawSC container
67  lcf.addFlag("LAr.LATOME.DTInfoForL1","SC_ET_ID")
68  # storing SC CaloCellContainer with bcid'ed energies
69  lcf.addFlag("LAr.DT.storeET_ID",False)
70  lcf.addFlag("LAr.DT.ET_IDKey","SCell")
71  lcf.addFlag("LAr.DT.doSCMasking",True)
72  # storing SC CaloCellContainers +-1 around bcid'ed energies
73  lcf.addFlag("LAr.DT.storeET_additional",False)
74  lcf.addFlag("LAr.DT.ET_PlusKey","SCellPlus")
75  lcf.addFlag("LAr.DT.ET_MinusKey","SCellMinus")
76 
77 
79  lcf.addFlag("LAr.NoisyRO.CellQuality", 4000)
80  # Number of channels above quality cut
81  lcf.addFlag("LAr.NoisyRO.BadChanPerFEB", 30)
82  # Number of Bad FEBs per partition cut
83  lcf.addFlag("LAr.NoisyRO.BadFEBCut", 5)
84  # Number of channels to declare MNB-Loose
85  lcf.addFlag("LAr.NoisyRO.MNBLooseCut", 5)
86  # Number of channels to declare MNB-Tight
87  lcf.addFlag("LAr.NoisyRO.MNBTightCut", 17)
88  # Number of channels to declare MNB-Tight wir PS veto
89  lcf.addFlag("LAr.NoisyRO.MNBTight_PsVetoCut", [13,3])
90 
91  return lcf
92 
93 
94 _lArRunInfo=None
95 
python.LArConfigFlags._getLArRunInfo
def _getLArRunInfo(prevFlags)
Definition: LArConfigFlags.py:96
LArRunFormat
python.LArConfigFlags.createLArConfigFlags
def createLArConfigFlags()
Definition: LArConfigFlags.py:13
python.LArRunFormat.getLArFormatForRun
def getLArFormatForRun(run, quiet=False, connstring="COOLONL_LAR/CONDBR2")
Definition: LArRunFormat.py:58
python.LArConfigFlags._determineRawChannelSource
def _determineRawChannelSource(prevFlags)
Definition: LArConfigFlags.py:108