ATLAS Offline Software
Loading...
Searching...
No Matches
TBH6ByteStream-Monitor-EventStorage.py
Go to the documentation of this file.
1include( "AthenaCommon/Atlas.UnixStandardJob.py" )
2
3include( "DetDescrCnvSvc/DetStore_joboptions.py" )
4
5DetDescrCnvSvc = Service( "DetDescrCnvSvc" )
6DetDescrCnvSvc.DetectorManagers+= ["CaloTTDescrManager"]
7DetDescrCnvSvc.DetectorManagers += [ "CaloMgr" ]
8
9# include( "LArDetMgrDetDescrCnv/LArDetMgrDetDescrCnv_joboptions.py" )
10# include( "LArDetMgrDetDescrCnv/LArDetMgrDetDescrCnv_H8_joboptions.py" )
11include( "LArDetMgrDetDescrCnv/LArDetMgrDetDescrCnv_H6_joboptions.py" )
12#
13
14from LArRecUtils.LArADC2MeVCondAlgDefault import LArADC2MeVCondAlgDefault
15LArADC2MeVCondAlgDefault()
16
17#---- ByteStream-Files input --------------------
18#
19
20# include( "TBCnv/TBReadH6BS_jobOptions.py" )
21include( "TBCnv/TBReadH6BS_EventStorage_jobOptions.py" )
22ByteStreamInputSvc = Service( "ByteStreamInputSvc" )
23
24# ByteStreamInputSvc.InputDirectory += ["/scratchdisk1/h6data"]
25ByteStreamInputSvc.InputDirectory += ["/castor/cern.ch/atlas/testbeam/cbt-ec2/phys"]
26ByteStreamInputSvc.FilePrefix += ["daq_beamDAQ_H6"]
27
28ToolSvc.TBByteStreamCnvTool.Dump = FALSE
29ToolSvc.TBByteStreamCnvTool.OutputLevel = WARNING
30
31#--- Monitoring ---------------------------
32
33theApp.TopAlg += [ "TBAlgoSequencer/Seq1" ]
34
35theApp.Dlls += [ "AthenaMonitoring"]
36
37Seq1 = Algorithm( "Seq1" )
38
39Seq1.SubAlgorithms = [
40 "TBEventStreamer/EventInfoStreamer",
41 "AthenaMon/TBMon0",
42 "TBEventStreamer/BeamStreamer",
43 "TBBPCRec/TBBPCRec",
44 "TBPhaseRec/TBPhaseRec",
45 "TBScintillatorRec/TBScintRec",
46 "TBTailCatcherRec/TBTailCatcherRec",
47 "TBMWPCRec/TBMWPCRec",
48 "AthenaMon/TBMon1",
49 "AthenaMon/LArMon1",
50 "LArRawChannelSimpleBuilder/TBLArRawChannelBuilder",
51 "CaloCellMaker/CaloCellMaker",
52 "AthenaMon/CaloCellMon",
53 "AthenaMon/CaloMonitor",
54 "AthenaMon/PhaseMon"
55 ]
56
57EventInfoStreamer = Algorithm( "EventInfoStreamer" )
58EventInfoStreamer.ToolNames = [ "TBEventInfoStreamerTool/EventTypeSelector" ]
59# possible selection: "Physics", "Special", "f/e_Calibration",
60# "Random", "BPC_Calibration", default: "Physics"
61EventInfoStreamer.EventTypeSelector.AcceptedTypes=["Physics"]
62
63#
64BeamStreamer = Algorithm( "BeamStreamer" )
65#
66BeamStreamer.ToolNames = [ "TBPatternUnitStreamerTool/BitSelector" ]
67#
68BeamStreamer.BitSelector.AcceptPattern = [ "S1", "S2", "S3" ]
69BeamStreamer.BitSelector.RejectPattern = [
70# "VetoLeft",
71# "VetoRight",
72# "VetoUp",
73# "VetoDown",
74# "HoleVeto",
75 "EarlyPU",
76 "LatePU"
77 ]
78
79TBMon0 = Algorithm("TBMon0")
80TBMon0.AthenaMonTools += ["TBTriggerPatternUnitMonTool/PatternUnitMon"]
81ToolSvc.PatternUnitMon.FakeDetectors = FALSE
82ToolSvc.PatternUnitMon.TriggFlags = [0x00000001, # S1 accept
83 0x00000002, # S2 accept
84 0x00000004, # S3 accept
85 0x00000008, # B2 accept
86 0x00000010, # VetoLeft
87 0x00000020, # VetoRight
88 0x00000040, # VetoDown
89 0x00000080, # VetoUp
90 0x00000100, # Mu 1 Left
91 0x00000200, # Mu 1 Right
92 0x00000400, # Mu 2 Left
93 0x00000800, # Early PileUp
94 0x00001000, # Late PileUp
95 0x00002000, # In Spill Tag
96 0x00004000, # Off Spill Tag
97 0x00008000, # Cedar 6 of 8 segments
98 0x00010000, # Mu 2 Right
99 0x00020000, # Hole Counter
100 0x00040000, # W1*W2 coincidence
101 0x00080000, # B1 accept
102 0x00100000, # Scaler Reset Tag
103 0x08000000, # Cedar 7 of 8 segments
104 0x10000000, # Cedar 8 of 8 segments
105 ]
106
107TBBPCRec = Algorithm("TBBPCRec")
108include( "TBRec/H6BPCRec_jobOptions.py" )
109TBBPCRec.OutputLevel = INFO
110TBBPCRec.CalibFileName = "H6BPCCalib.txt"
111
112TBPhaseRec = Algorithm("TBPhaseRec")
113include( "TBRec/H6PhaseRec_jobOptions.py" )
114TBPhaseRec.OutputLevel = INFO
115
116TBScintRec = Algorithm("TBScintRec")
117include( "TBRec/H6ScintRec_jobOptions.py" )
118TBScintRec.OutputLevel = INFO
119
120TBTailCatcherRec = Algorithm("TBTailCatcherRec")
121include( "TBRec/H6TailCatcherRec_jobOptions.py" )
122
123TBMWPCRec = Algorithm("TBMWPCRec")
124include( "TBRec/H6MWPCRec_jobOptions.py" )
125
126TBLArRawChannelBuilder = Algorithm("TBLArRawChannelBuilder");
127TBLArRawChannelBuilder.OutputLevel = INFO
128TBLArRawChannelBuilder.maxSamp = 3
129TBLArRawChannelBuilder.RecoMode = "CUBIC"
130TBLArRawChannelBuilder.CubicAdcCut = 50.
131TBLArRawChannelBuilder.OutputLevel = INFO
132
133include ("CaloRec/CaloCellMakerFromRaw_H6_jobOptions.py" )
134
135theApp.Dlls += [ "TBMonitoring" ]
136theApp.Dlls += [ "LArMonitoring" ]
137theApp.Dlls += [ "CaloMonitoring" ]
138
139TBMon1 = Algorithm( "TBMon1" )
140LArMon1 = Algorithm( "LArMon1" )
141
142tdcbinnum = 100
143tdcmin = 0
144tdcmax = 2047
145
146bpcmin = -70*mm
147bpcmax = 70*mm
148bpcbinnum = 70
149
150# ------------- BPC Monitor -------
151TBMon1.AthenaMonTools += ["TBBPCMonTool/BPCmon"]
152ToolSvc.BPCmon.MonitorBPC = TRUE
153ToolSvc.BPCmon.MonitorBPCRaw = TRUE
154ToolSvc.BPCmon.FakeDetectors = FALSE
155# H6 BPCs
156ToolSvc.BPCmon.BPCNames = ["BPC0","BPC1","BPC2","BPC3","BPC4","BPC5"]
157ToolSvc.BPCmon.BPCMaxPos = bpcmax
158ToolSvc.BPCmon.BPCMinPos = bpcmin
159ToolSvc.BPCmon.BPCBinNum = bpcbinnum
160ToolSvc.BPCmon.TDCBinNum = tdcbinnum
161ToolSvc.BPCmon.TDCMax = tdcmax
162ToolSvc.BPCmon.TDCMin = tdcmin
163ToolSvc.BPCmon.BookAtFirstEvent = TRUE # If false, histos are booked before 1st event (no run number in histo title)
164
165# ------------- Scint Monitor -------
166TBMon1.AthenaMonTools += ["TBScintillatorMonTool/Scintmon"]
167ToolSvc.Scintmon.FakeDetectors = FALSE
168# H6 scint names :
169ToolSvc.Scintmon.ScintNames = ["S1","S2","S3", "B",
170 "Veto","Halo",
171 "muon1","muon2","muon3","muon4",
172 "muon5","muon6","muon7","muon8"]
173ToolSvc.Scintmon.BookAtFirstEvent = TRUE # If false, histos are booked before 1st event (no run number in histo title)
174ToolSvc.Scintmon.TDCBinNum = tdcbinnum
175ToolSvc.Scintmon.TDCMax = tdcmax
176ToolSvc.Scintmon.TDCMin = tdcmin
177ToolSvc.Scintmon.OutputLevel = INFO
178
179# ------------- MWPC Monitor -------
180TBMon1.AthenaMonTools += ["TBMWPCMonTool/MWPCmon"]
181ToolSvc.MWPCmon.MonitorMWPC = TRUE
182ToolSvc.MWPCmon.MonitorMWPCRaw = TRUE
183#ToolSvc.MWPCmon.FakeDetectors = FALSE
184
185
186# ------------- TailCatcher Monitor -------
187TBMon1.AthenaMonTools += ["TBTailCatcherRawMonTool/TCmon"]
188ToolSvc.TCmon.MonitorTailCatcherRaw = TRUE
189ToolSvc.TCmon.MonitorTailCatcherRaw = TRUE
190ToolSvc.TCmon.OutputLevel = INFO
191
192#------------- ADC Monitor -------
193TBMon1.AthenaMonTools += ["TBADCRawMonTool/ADCmon"]
194ToolSvc.ADCmon.TestADCMonTool = FALSE
195include( "TBCnv/H6ADCChannelNames.py" ) # list of ADC
196ToolSvc.ADCmon.ADCBinNum = tdcbinnum
197ToolSvc.ADCmon.ADCMax = tdcmax
198ToolSvc.ADCmon.ADCMin = tdcmin
199
200#------------- TDC Monitor -------
201TBMon1.AthenaMonTools += ["TBTDCRawMonTool/TDCmon"]
202ToolSvc.TDCmon.TestTDCMonTool = FALSE
203include( "TBCnv/H6TDCChannelNames.py" ) # list of TDC
204ToolSvc.TDCmon.TDCBinNum = tdcbinnum
205ToolSvc.TDCmon.TDCMax = tdcmax
206ToolSvc.TDCmon.TDCMin = tdcmin
207
208#------------- LArDigitMonitoring -------------
209LArMon1.AthenaMonTools += ["LArDigMonTool<LArDigitContainer>/pedmon0"]
210ToolSvc.pedmon0.histoPathBase = "/stat/pedsamp0"
211ToolSvc.pedmon0.digitKey = "FREE"
212ToolSvc.pedmon0.maxSamp = 3
213ToolSvc.pedmon0.pedMode = "SAMPLE"
214ToolSvc.pedmon0.pedSamp = 0
215ToolSvc.pedmon0.adcCut = 50
216ToolSvc.pedmon0.OutputLevel = INFO
217
218#------------- LArDigitTBPhaseMonitoring -------------
219from LArCabling.LArCablingAccess import LArOnOffIdMapping
221
222LArMon1.AthenaMonTools += ["LArDigTBPhaseMonTool<LArDigitContainer>/LArDigitTBTDC0"]
223ToolSvc.LArDigitTBTDC0.histoPathBase = "/stat/LArDigitTBTDC0"
224ToolSvc.LArDigitTBTDC0.digitKey = "FREE"
225ToolSvc.LArDigitTBTDC0.TBPhaseName = "TBPhase"
226ToolSvc.LArDigitTBTDC0.pedMode = "SAMPLE"
227ToolSvc.LArDigitTBTDC0.pedSamp = 0
228#ToolSvc.LArDigitTBTDC0.OutputLevel = INFO
229
230#------------- CaloCell Monitoring ---------
231CaloCellMon = Algorithm( "CaloCellMon")
232
233CaloCellMon.AthenaMonTools = ["CaloCellMonitoringTool/calocelltool"]
234ToolSvc.calocelltool.OutputLevel = INFO
235
236#------------- CaloResponse Monitoring ---------
237CaloMonitor = Algorithm( "CaloMonitor" )
238CaloMonitor.AthenaMonTools += [ "TBCaloResponseMonTool/calMonitor" ]
239ToolSvc.calMonitor.OutputLevel = INFO
240# output
241ToolSvc.calMonitor.histoPathBase = "/stat/calomon"
242# input
243ToolSvc.calMonitor.CellContainerName = "AllCalo" # CaloCellContainer
244ToolSvc.calMonitor.BPCContainerName = "BPCCont" # TBBPCCont
245#
246#IncludedCalos: possible are LAREM, LARHEC, LARFCAL, TILE, or
247# H6CALO = LAREM, LARHEC, LARFCAL
248# H8CALO = LAREM, TILE
249#
250H8CALO = [ "LAREM", "TILE" ]
251H6CALO = [ "LAREM", "LARHEC", "LARFCAL" ]
252ToolSvc.calMonitor.IncludedCalos = H6CALO
253
254# IncludedSamplings: possible are PreSamplerB, EMB1, EMB2, EMB3,
255# PreSamplerE, EME1, EME2, EME3,
256# TileBar0, TileBar1, TileBar2,
257# TileGap1, TileGap2, TileGap3,
258# TileExt0, TileExt1, TileExt2,
259# FCal1, FCal2, FCal3
260# or
261# H6Samplings = EME2, EME3,
262# HEC0, HEC1, HEC2
263# FCal1, FCal2, FCal3
264# H8Samplings = PreSamplerB,
265# EMB1, EMB2, EMB3,
266# TileBar0, TileBar1, TileBar2
267#
268H6Samplings = [ "EME2", "EME3", "HEC0", "HEC1", "HEC2",
269 "FCal1", "FCal2", "FCal3" ]
270H8Samplings = [ "PreSamplerB", "EMB1", "EMB2", "EMB3",
271 "TileBar0", "TileBar1", "TileBar2" ]
272ToolSvc.calMonitor.IncludedSamplings = H6Samplings
273# calorimeter energy histogram definitions
274ToolSvc.calMonitor.CaloEnergyBins = 100
275ToolSvc.calMonitor.CaloEnergyMin = -10.*GeV
276ToolSvc.calMonitor.CaloEnergyMax = 390.*GeV
277# calorimeter eta range
278ToolSvc.calMonitor.CaloEtaBins = 35
279ToolSvc.calMonitor.CaloEtaMin = 1.5
280ToolSvc.calMonitor.CaloEtaMax = 5.0
281# calorimeter phi range
282ToolSvc.calMonitor.CaloPhiBins = 64
283ToolSvc.calMonitor.CaloPhiMin = 90.*deg
284ToolSvc.calMonitor.CaloPhiMax = 180.*deg
285# BPC x/y ranges
286ToolSvc.calMonitor.BPCXBins = bpcbinnum
287ToolSvc.calMonitor.BPCXMin = bpcmin
288ToolSvc.calMonitor.BPCXMax = bpcmax
289ToolSvc.calMonitor.BPCYBins = bpcbinnum
290ToolSvc.calMonitor.BPCYMin = bpcmin
291ToolSvc.calMonitor.BPCYMax = bpcmax
292# average profile configurations
293ToolSvc.calMonitor.MinEventsInBin = 20
294# display unit switches
295ToolSvc.calMonitor.EnergyUnits = GeV
296ToolSvc.calMonitor.LengthUnits = mm
297ToolSvc.calMonitor.AngleUnits = rad
298
299#------------- Phase Monitor -------
300PhaseMon = Algorithm( "PhaseMon" )
301PhaseMon.AthenaMonTools = [ "TBPhaseMonTool/phaseMonitor" ]
302ToolSvc.phaseMonitor.histoPathBase = "/stat/phasemon"
303ToolSvc.phaseMonitor.TBTDCRawContainerName = "TDCRawCont" # TBTDCRawContainer
304ToolSvc.phaseMonitor.CellContainerName = "AllCalo" # CaloCellContainer
305ToolSvc.phaseMonitor.PhaseTDCNames = ["word1frag0x03chan0","word2frag0x03chan0"]
306# IncludedSamplings: possible are PreSamplerB, EMB1, EMB2, EMB3,
307# PreSamplerE, EME1, EME2, EME3,
308# TileBar0, TileBar1, TileBar2,
309# TileGap1, TileGap2, TileGap3,
310# TileExt0, TileExt1, TileExt2,
311# FCal1, FCal2, FCal3
312# or
313# H6Samplings = EME2, EME3,
314# HEC0, HEC1, HEC2
315# FCal1, FCal2, FCal3
316# H8Samplings = PreSamplerB,
317# EMB1, EMB2, EMB3,
318# TileBar0, TileBar1, TileBar2
319#
320# H6Samplings = [ "EME2", "EME3", "HEC0", "HEC1", "HEC2", "FCal1", "FCal2", "FCal3" ]
321# H8Samplings = [ "PreSamplerB", "EMB1", "EMB2", "EMB3", "TileBar0", "TileBar1", "TileBar2" ]
322ToolSvc.phaseMonitor.IncludedSamplings = H6Samplings
323ToolSvc.phaseMonitor.TBPhaseName = "TBPhase"
324ToolSvc.phaseMonitor.EnergyCut = 5.*GeV
325ToolSvc.phaseMonitor.TDCBins = 80
326ToolSvc.phaseMonitor.TDCMin = 200
327ToolSvc.phaseMonitor.TDCMax = 1000
328ToolSvc.phaseMonitor.TDCRightMin = 200
329ToolSvc.phaseMonitor.TDCRightMax = 300
330ToolSvc.phaseMonitor.TDCLeftMin = -300
331ToolSvc.phaseMonitor.TDCLeftMax = -200
332ToolSvc.phaseMonitor.TimeBins = 100
333# ToolSvc.phaseMonitor.TimeMin = 180.*ns
334# ToolSvc.phaseMonitor.TimeMax = 220.*ns
335ToolSvc.phaseMonitor.TimeMin = 45.*ns
336ToolSvc.phaseMonitor.TimeMax = 95.*ns
337ToolSvc.phaseMonitor.PhaseBins = 70
338ToolSvc.phaseMonitor.PhaseMin = -5.*ns
339ToolSvc.phaseMonitor.PhaseMax = 30.*ns
340ToolSvc.phaseMonitor.TimeUnits = ns
341ToolSvc.phaseMonitor.OutputLevel = INFO
342
343# -- use root histos --
344theApp.Dlls += [ "RootHistCnv" ]
345theApp.HistogramPersistency = "ROOT"
346HistogramPersistencySvc = Service( "HistogramPersistencySvc" )
347
348# -- Use auditors --
349#theApp.Dlls += [ "GaudiAud" ]
350# write out a summary of the time spent
351#
352#theAuditorSvc = AuditorSvc()
353#theAuditorSvc.Auditors += [ "ChronoAuditor"]
354# write out a short message upon entering or leaving each algorithm
355#
356# AuditorSvc.Auditors += { "NameAuditor" };
357#-------------------------------------------------------------------------
358# user driving parameters
359#
360# Number of events to be processed (default is 10)
361theApp.EvtMax = 1000
362
363# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
364MessageSvc = Service( "MessageSvc" )
365MessageSvc.OutputLevel = INFO
366
367AthenaEventLoopMgr = Service( "AthenaEventLoopMgr" )
368AthenaEventLoopMgr.OutputLevel = WARNING
369
370# Dump all objects available
371# StoreGateSvc = Service( "StoreGateSvc" )
372# StoreGateSvc.Dump = TRUE
373
374ByteStreamInputSvc.RunNumber = [1367]
375HistogramPersistencySvc.OutputFile = "run1367.root"