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 7 of file LArCalib_RTMParamsConfig.py.

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

Variable Documentation

◆ AtlasVersion

python.LArCalib_RTMParamsConfig.AtlasVersion

Definition at line 158 of file LArCalib_RTMParamsConfig.py.

◆ BadChannelDB

python.LArCalib_RTMParamsConfig.BadChannelDB

Definition at line 151 of file LArCalib_RTMParamsConfig.py.

◆ BadChannelTag

python.LArCalib_RTMParamsConfig.BadChannelTag

Definition at line 152 of file LArCalib_RTMParamsConfig.py.

◆ cfg

python.LArCalib_RTMParamsConfig.cfg = MainServicesCfg(ConfigFlags)

Definition at line 166 of file LArCalib_RTMParamsConfig.py.

◆ ConfigFlags

python.LArCalib_RTMParamsConfig.ConfigFlags = initConfigFlags()

Definition at line 143 of file LArCalib_RTMParamsConfig.py.

◆ Database

python.LArCalib_RTMParamsConfig.Database

Definition at line 149 of file LArCalib_RTMParamsConfig.py.

◆ DatabaseInstance

python.LArCalib_RTMParamsConfig.DatabaseInstance

Definition at line 154 of file LArCalib_RTMParamsConfig.py.

◆ DBConnection

python.LArCalib_RTMParamsConfig.DBConnection

Definition at line 155 of file LArCalib_RTMParamsConfig.py.

◆ doAlign

python.LArCalib_RTMParamsConfig.doAlign

Definition at line 160 of file LArCalib_RTMParamsConfig.py.

◆ Files

python.LArCalib_RTMParamsConfig.Files

Definition at line 147 of file LArCalib_RTMParamsConfig.py.

◆ GlobalTag

python.LArCalib_RTMParamsConfig.GlobalTag

Definition at line 156 of file LArCalib_RTMParamsConfig.py.

◆ ROOTFile

python.LArCalib_RTMParamsConfig.ROOTFile

Definition at line 153 of file LArCalib_RTMParamsConfig.py.

◆ RunNumbers

python.LArCalib_RTMParamsConfig.RunNumbers

Definition at line 148 of file LArCalib_RTMParamsConfig.py.

◆ SubDet

python.LArCalib_RTMParamsConfig.SubDet

Definition at line 150 of file LArCalib_RTMParamsConfig.py.