ATLAS Offline Software
LArCalibConfigFlags.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
2 
3 def addLArCalibFlags(flags, isSC=False):
4 
5  flags.Input.isMC=False
6  flags.addFlag("LArCalib.isSC",isSC)
7  flags.addFlag("LArCalib.BadChannelDB","LAR_OFL")
8  flags.addFlag("LArCalib.BadChannelTag","-RUN2-UPD3-00")
9  flags.addFlag("LArCalib.BadChannelTagSC","-RUN3-UPD3-00")
10 
11  #Folders:
12  def _prefix(prevFlags):
13  if prevFlags.LArCalib.isSC:
14  return "/LAR/ElecCalibOflSC/"
15  else:
16  return "/LAR/ElecCalibOfl/"
17 
18  flags.addFlag("LArCalib.Pedestal.Folder", lambda prevFlags: _prefix(prevFlags)+"Pedestals/Pedestal")
19  flags.addFlag("LArCalib.AutoCorr.Folder", lambda prevFlags: _prefix(prevFlags)+"AutoCorrs/AutoCorr")
20  flags.addFlag("LArCalib.PhysAutoCorr.Folder", lambda prevFlags: _prefix(prevFlags)+"AutoCorrs/PhysicsAutoCorr")
21  flags.addFlag("LArCalib.CaliWave.Folder", lambda prevFlags: _prefix(prevFlags)+"CaliWaves/CaliWave")
22  flags.addFlag("LArCalib.OFCCali.Folder", lambda prevFlags: _prefix(prevFlags)+"OFC/CaliWave")
23  flags.addFlag("LArCalib.PhysWave.Folder", lambda prevFlags: _prefix(prevFlags)+"PhysWaves/RTM")
24  flags.addFlag("LArCalib.Ramp.Folder", lambda prevFlags: _prefix(prevFlags)+"Ramps/RampLinea")
25  flags.addFlag("LArCalib.OFCPhys.Folder", lambda prevFlags: _prefix(prevFlags)+"OFC/PhysWave/RTM/")
26  flags.addFlag("LArCalib.Shape.Folder", lambda prevFlags: _prefix(prevFlags)+"Shape/RTM/")
27  flags.addFlag("LArCalib.MphysOverMcal.Folder", lambda prevFlags: _prefix(prevFlags)+"MphysOverMcal/RTM")
28  flags.addFlag("LArCalib.PhysCaliTdiff.Folder",lambda prevFlags: _prefix(prevFlags)+"PhysCaliTdiff")
29  flags.addFlag("LArCalib.CaliPulseParams.Folder", lambda prevFlags: _prefix(prevFlags)+"CaliPulseParams/RTM")
30  flags.addFlag("LArCalib.DetCellParams.Folder", lambda prevFlags: _prefix(prevFlags)+"DetCellParams/RTM")
31 
32  flags.addFlag("LArCalib.FCALPhysWave.Folder", "/LAR/ElecCalibOfl/PhysWaves/FCALFromTB")
33 
34  flags.addFlag("LArCalib.GroupingType",lambda prevFlags: "SuperCells" if prevFlags.LArCalib.isSC else "ExtendedSubDetector")
35  flags.addFlag("LArCalib.Output.POOLFile","ouput.pool.root")
36  flags.addFlag("LArCalib.Output.ROOTFile","")
37  flags.addFlag("LArCalib.Output.POOLFile2","ouput2.pool.root")
38  flags.addFlag("LArCalib.Output.ROOTFile2","")
39  flags.addFlag("LArCalib.Output.SaveAverages",True)
40 
41  flags.addFlag("LArCalib.Gain",0)
42 
43  flags.addFlag("LArCalib.doValidation",True)
44 
45  flags.addFlag("LArCalib.CorrectBadChannels",True)
46 
47  #Flags to find the input files/databases
48  flags.addFlag("LArCalib.Input.Dir",".")
49  flags.addFlag("LArCalib.Input.RunNumbers",[])
50  flags.addFlag("LArCalib.Input.Type","calibration_LArElec-Pedestal")
51  flags.addFlag("LArCalib.Input.Files",_getInputFiles)
52  flags.addFlag("LArCalib.Input.SubDet","") #EM, HEC or FCAL
53  flags.addFlag("LArCalib.Input.isRawData",False)
54  flags.addFlag("LArCalib.Input.paramsFile","parameters.dat")
55 
56  flags.addFlag("LArCalib.Input.Database","LAR_OFL") #In practice, a sqlite file
57  flags.addFlag("LArCalib.Input.Database2","LAR_OFL") #In practice, a sqlite file, sometimes we need 2 of them
58 
59  flags.addFlag("LArCalib.Input.ChannelSelection","") #Read only a subset of COOL channels. Format like '3,4,5:10'
60 
61  flags.addFlag("LArCalib.IOVStart", lambda pF: min(pF.LArCalib.Input.RunNumbers) if len(pF.LArCalib.Input.RunNumbers)>0 else 0) #Output IOV start (runnumber)
62  flags.addFlag("LArCalib.IOVEnd", 0x7FFFFFFF) #Output IOV end (runnumber)
63 
64 
65 
66  flags.addFlag("LArCalib.Preselection.Side",[])
67  flags.addFlag("LArCalib.Preselection.BEC",[])
68  flags.addFlag("LArCalib.Preselection.FT",[])
69  flags.addFlag("LArCalib.Preselection.Slot",[])
70 
71  flags.addFlag("LArCalib.SCIgnoreBarrelChannels",False)
72  flags.addFlag("LArCalib.SCIgnoreEndcapChannels",False)
73 
74  flags.addFlag("LArCalib.RTM.ExtractAll",True) # False = extract only tauR
75  flags.addFlag("LArCalib.RTM.DumpOmegaScan",False)
76  flags.addFlag("LArCalib.RTM.DumpResOscill",False)
77 
78  flags.addFlag("LArCalib.CaliWave.Nsteps",24)
79  flags.addFlag("LArCalib.doOFCCali",True)
80 
81  flags.addFlag("LArCalib.OFC.Ncoll",0)
82  flags.addFlag("LArCalib.OFC.UsePhysCalibTDiff",True)
83  flags.addFlag("LArCalib.OFC.Normalize",True)
84  flags.addFlag("LArCalib.OFC.useDelta",False)
85  flags.addFlag("LArCalib.OFC.Nsamples",4)
86  flags.addFlag("LArCalib.OFC.ShapeCorrection",False)
87 
88  flags.addFlag("LArCalib.PhysACuseHG",False)
89 
90 def _getInputFiles(prevFlags):
91  from LArCalibProcessing.GetInputFiles import GetInputFiles
92  allFiles=[]
93  for rn in prevFlags.LArCalib.Input.RunNumbers:
94  pattern="data.*%(rn)07d.%(type)s.*" % {'rn' : rn,'type' : prevFlags.LArCalib.Input.Type }
95  allFiles+=GetInputFiles(prevFlags.LArCalib.Input.Dir,pattern)
96 
97  return allFiles
98 
99 def LArCalibFolderTag(folder,tag):
100  return ''.join(folder.split('/')) + tag
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
python.LArCalibConfigFlags._getInputFiles
def _getInputFiles(prevFlags)
Definition: LArCalibConfigFlags.py:90
python.GetInputFiles.GetInputFiles
def GetInputFiles(inputPath, filePattern)
Definition: GetInputFiles.py:5
python.LArCalibConfigFlags.LArCalibFolderTag
def LArCalibFolderTag(folder, tag)
Definition: LArCalibConfigFlags.py:99
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
python.LArCalibConfigFlags.addLArCalibFlags
def addLArCalibFlags(flags, isSC=False)
Definition: LArCalibConfigFlags.py:3