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

Functions

 LArRTMParamsCfg (flags)

Variables

 ConfigFlags = initConfigFlags()
 Files
 RunNumbers
 Database
 SubDet
 BadChannelDB
 BadChannelTag
 ROOTFile
 DatabaseInstance
 DBConnection
 GlobalTag
 AtlasVersion
 doAlign
 cfg = MainServicesCfg(ConfigFlags)

Function Documentation

◆ LArRTMParamsCfg()

python.LArCalib_RTMParamsConfig.LArRTMParamsCfg ( flags)

Definition at line 6 of file LArCalib_RTMParamsConfig.py.

6def LArRTMParamsCfg(flags):
7
8 #Get basic services and cond-algos
9 from LArCalibProcessing.LArCalibBaseConfig import LArCalibBaseCfg,chanSelStr
10 result=LArCalibBaseCfg(flags)
11
12 from LArCalibProcessing.utils import FolderTagResolver
13 FolderTagResolver._globalTag=flags.IOVDb.GlobalTag
14 rs=FolderTagResolver()
15 DetCellParamsTag=rs.getFolderTag(flags.LArCalib.DetCellParams.Folder)
16 CaliPulseParamsTag=rs.getFolderTag(flags.LArCalib.CaliPulseParams.Folder)
17 CaliWaveTag=rs.getFolderTag(flags.LArCalib.CaliWave.Folder)
18 del rs #Close database
19
20 #Retrieve CaliWave:
21 from IOVDbSvc.IOVDbSvcConfig import addFolders
22 result.merge(addFolders(flags,flags.LArCalib.CaliWave.Folder,detDb=flags.LArCalib.Input.Database, tag=CaliWaveTag, modifiers=chanSelStr(flags)))
23
24 if not flags.LArCalib.RTM.ExtractAll:
25 #Get information from database:
26 result.merge(addFolders(flags,flags.LArCalib.DetCellParams.Folder,detDb=flags.LArCalib.Input.Database, tag=DetCellParamsTag))
27 result.merge(addFolders(flags,flags.LArCalib.CaliPulseParams.Folder,detDb=flags.LArCalib.Input.Database, tag=CaliPulseParamsTag))
28
29
30 LArRTMParamExtractor = CompFactory.LArRTMParamExtractor()
31
32 LArRTMParamExtractor.KeyList = ["LArCaliWave"]
33 LArRTMParamExtractor.TestMode = False
34 LArRTMParamExtractor.GroupingType = flags.LArCalib.GroupingType
35 LArRTMParamExtractor.IgnoreDACSelection = True
36 LArRTMParamExtractor.isSC = flags.LArCalib.isSC
37
38 LArRTMParamExtractor.ExtractTaur = True
39 LArRTMParamExtractor.ExtractTcal = flags.LArCalib.RTM.ExtractAll
40 LArRTMParamExtractor.ExtractFstep = flags.LArCalib.RTM.ExtractAll
41 LArRTMParamExtractor.ExtractOmega0 = flags.LArCalib.RTM.ExtractAll
42
43 LArRTMParamExtractor.FT = flags.LArCalib.Preselection.FT
44 LArRTMParamExtractor.PosNeg = 0 if len(flags.LArCalib.Preselection.Side)==0 else flags.LArCalib.Preselection.Side[0]
45 LArRTMParamExtractor.Slot = flags.LArCalib.Preselection.Slot
46
47 LArRTMParamExtractor.DumpOmegaScan = flags.LArCalib.RTM.DumpOmegaScan
48 LArRTMParamExtractor.DumpResOscill = flags.LArCalib.RTM.DumpResOscill
49
50
51 theLArWFParamTool = CompFactory.LArWFParamTool()
52 theLArWFParamTool.isSC = flags.LArCalib.isSC
53
54 theLArWFParamTool.UseOmegaScanHelper = True
55 theLArWFParamTool.CosRespScan = [ False , True , False , False ] # Strips only
56 theLArWFParamTool.Omega0Min = [ 0.100 , 0.220 , 0.060 , 0.100 ]
57 theLArWFParamTool.Omega0Max = [ 0.600 , 0.310 , 0.215 , 0.700 ]
58 theLArWFParamTool.NpointScan = [ 800 , 900 , 310 , 120 ]
59 theLArWFParamTool.StoreResOscill = [True * 4] if flags.LArCalib.RTM.DumpResOscill else [False *4]
60
61 LArRTMParamExtractor.LArWFParamTool=theLArWFParamTool
62
63 result.addEventAlgo(LArRTMParamExtractor)
64
65 rootfile=flags.LArCalib.Output.ROOTFile
66 bcKey = "LArBadChannelSC" if flags.LArCalib.isSC else "LArBadChannel"
67 if rootfile != "":
68 LArWFParams2Ntuple = CompFactory.LArWFParams2Ntuple("LArWFParams2Ntuple")
69 LArWFParams2Ntuple.DumpCaliPulseParams = True
70 LArWFParams2Ntuple.DumpDetCellParams = True
71 LArWFParams2Ntuple.CaliPulseParamsKey="LArCaliPulseParams_RTM"
72 LArWFParams2Ntuple.DetCellParamsKey="LArDetCellParams_RTM"
73 LArWFParams2Ntuple.BadChanKey = bcKey
74 LArWFParams2Ntuple.isSC = flags.LArCalib.isSC
75 LArWFParams2Ntuple.AddCalib = True
76 result.addEventAlgo(LArWFParams2Ntuple)
77
78 if flags.LArCalib.RTM.DumpOmegaScan:
79 LArOmegaScans2Ntuple = CompFactory.LArCaliWaves2Ntuple("LArOmegaScans2Ntuple")
80 LArOmegaScans2Ntuple.NtupleName = "OMEGASCAN"
81 LArOmegaScans2Ntuple.BadChanKey = bcKey
82 LArOmegaScans2Ntuple.isSC = flags.LArCalib.isSC
83 LArOmegaScans2Ntuple.KeyList = ["OmegaScan"]
84 result.addEventAlgo(LArOmegaScans2Ntuple)
85
86 if ( flags.LArCalib.RTM.DumpResOscill ):
87 LArResOscillsBefore2Ntuple = CompFactory.LArCaliWaves2Ntuple("LArResOscillsBefore2Ntuple")
88 LArResOscillsBefore2Ntuple.NtupleName = "RESOSCILLBEFORE"
89 LArResOscillsBefore2Ntuple.BadChanKey = bcKey
90 LArResOscillsBefore2Ntuple.isSC = flags.LArCalib.isSC
91 LArResOscillsBefore2Ntuple.KeyList = ["ResOscillBefore"]
92 result.addEventAlgo(LArResOscillsBefore2Ntuple)
93
94 LArResOscillsAfter2Ntuple = CompFactory.LArCaliWaves2Ntuple("LArResOscillsAfter2Ntuple")
95 LArResOscillsAfter2Ntuple.NtupleName = "RESOSCILLAFTER"
96 LArResOscillsAfter2Ntuple.BadChanKey = bcKey
97 LArResOscillsAfter2Ntuple.KeyList = ["ResOscillAfter"]
98 result.addEventAlgo(LArResOscillsAfter2Ntuple)
99
100 import os
101 if os.path.exists(rootfile):
102 os.remove(rootfile)
103 result.addService(CompFactory.NTupleSvc(Output = [ "FILE1 DATAFILE='"+rootfile+"' OPT='NEW'" ]))
104 result.setAppProperty("HistogramPersistency","ROOT")
105 pass # end if ROOT ntuple writing
106
107
108
109 from RegistrationServices.OutputConditionsAlgConfig import OutputConditionsAlgCfg
110 result.merge(OutputConditionsAlgCfg(flags,
111 outputFile=flags.LArCalib.Output.POOLFile,
112 ObjectList=["LArCaliPulseParamsComplete#"+"LArCaliPulseParams_RTM#"+flags.LArCalib.CaliPulseParams.Folder,
113 "LArDetCellParamsComplete#"+"LArDetCellParams_RTM#"+flags.LArCalib.DetCellParams.Folder,],
114 IOVTagList=[CaliPulseParamsTag,DetCellParamsTag],
115 Run1=flags.LArCalib.IOVStart,
116 Run2=flags.LArCalib.IOVEnd
117 ))
118
119 #RegistrationSvc
120 result.addService(CompFactory.IOVRegistrationSvc(RecreateFolders = False))
121 result.getService("IOVDbSvc").DBInstance=""
122
123
124 #MC Event selector since we have no input data file
125 from McEventSelector.McEventSelectorConfig import McEventSelectorCfg
126 result.merge(McEventSelectorCfg(flags,
127 RunNumber = flags.LArCalib.Input.RunNumbers[0],
128 EventsPerRun = 1,
129 FirstEvent = 1,
130 InitialTimeStamp = 0,
131 TimeStampInterval = 1))
132
133 from PerfMonComps.PerfMonCompsConfig import PerfMonMTSvcCfg
134 result.merge(PerfMonMTSvcCfg(flags))
135
136 return result
137

Variable Documentation

◆ AtlasVersion

python.LArCalib_RTMParamsConfig.AtlasVersion

Definition at line 157 of file LArCalib_RTMParamsConfig.py.

◆ BadChannelDB

python.LArCalib_RTMParamsConfig.BadChannelDB

Definition at line 150 of file LArCalib_RTMParamsConfig.py.

◆ BadChannelTag

python.LArCalib_RTMParamsConfig.BadChannelTag

Definition at line 151 of file LArCalib_RTMParamsConfig.py.

◆ cfg

python.LArCalib_RTMParamsConfig.cfg = MainServicesCfg(ConfigFlags)

Definition at line 165 of file LArCalib_RTMParamsConfig.py.

◆ ConfigFlags

python.LArCalib_RTMParamsConfig.ConfigFlags = initConfigFlags()

Definition at line 142 of file LArCalib_RTMParamsConfig.py.

◆ Database

python.LArCalib_RTMParamsConfig.Database

Definition at line 148 of file LArCalib_RTMParamsConfig.py.

◆ DatabaseInstance

python.LArCalib_RTMParamsConfig.DatabaseInstance

Definition at line 153 of file LArCalib_RTMParamsConfig.py.

◆ DBConnection

python.LArCalib_RTMParamsConfig.DBConnection

Definition at line 154 of file LArCalib_RTMParamsConfig.py.

◆ doAlign

python.LArCalib_RTMParamsConfig.doAlign

Definition at line 159 of file LArCalib_RTMParamsConfig.py.

◆ Files

python.LArCalib_RTMParamsConfig.Files

Definition at line 146 of file LArCalib_RTMParamsConfig.py.

◆ GlobalTag

python.LArCalib_RTMParamsConfig.GlobalTag

Definition at line 155 of file LArCalib_RTMParamsConfig.py.

◆ ROOTFile

python.LArCalib_RTMParamsConfig.ROOTFile

Definition at line 152 of file LArCalib_RTMParamsConfig.py.

◆ RunNumbers

python.LArCalib_RTMParamsConfig.RunNumbers

Definition at line 147 of file LArCalib_RTMParamsConfig.py.

◆ SubDet

python.LArCalib_RTMParamsConfig.SubDet

Definition at line 149 of file LArCalib_RTMParamsConfig.py.