ATLAS Offline Software
TBH6ByteStream-Monitor.py
Go to the documentation of this file.
1 include( "AthenaCommon/Atlas.UnixStandardJob.py" )
2 
3 include( "DetDescrCnvSvc/DetStore_joboptions.py" )
4 
5 DetDescrCnvSvc = Service( "DetDescrCnvSvc" )
6 DetDescrCnvSvc.DetectorManagers+= ["CaloTTDescrManager"]
7 DetDescrCnvSvc.DetectorManagers += [ "CaloMgr" ]
8 
9 # include( "LArDetMgrDetDescrCnv/LArDetMgrDetDescrCnv_joboptions.py" )
10 # include( "LArDetMgrDetDescrCnv/LArDetMgrDetDescrCnv_H8_joboptions.py" )
11 include( "LArDetMgrDetDescrCnv/LArDetMgrDetDescrCnv_H6_joboptions.py" )
12 #
13 #---- ByteStream-Files input --------------------
14 #
15 
16 include( "TBCnv/TBReadH6BS_jobOptions.py" )
17 ByteStreamInputSvc = Service( "ByteStreamInputSvc" )
18 # ByteStreamInputSvc.inputFiles = ["MyRawEvent.re"]
19 # With H6 - See also TBReadH6BS_jobOptions.py !!
20 # ByteStreamInputSvc.inputFiles = ["bytestream.out"]
21 # ByteStreamInputSvc.inputFiles = ["/scratchdisk/rmcphers/data/run240.dat"]
22 #ByteStreamInputSvc.inputFiles = ["/scratchdisk/rmcphers/data/run370.dat"]
23 ByteStreamInputSvc.inputFiles = [ "/raid/bytestream/phys/run590.bstr" ]
24 
25 
26 ToolSvc = Service( "ToolSvc" )
27 
28 ToolSvc.TBByteStreamCnvTool.Dump = FALSE
29 ToolSvc.TBByteStreamCnvTool.OutputLevel = WARNING
30 
31 #--- Monitoring ---------------------------
32 
33 theApp.TopAlg += [ "TBAlgoSequencer/Seq1" ]
34 
35 theApp.Dlls += [ "AthenaMonitoring"]
36 
37 Seq1 = Algorithm( "Seq1" )
38 
39 Seq1.SubAlgorithms = [
40  "TBEventStreamer/BeamStreamer",
41  "TBBPCRec/TBBPCRec",
42 # "ReadTBLArDigits",
43  "AthenaMon/TBMon1",
44  "AthenaMon/LArMon1",
45  "TBLArRawChannelBuilder",
46  "CaloCellMaker/CaloCellMaker",
47  "AthenaMon/CaloMonitor" ]
48 
49 #
50 # Event selection (streaming)
51 #
52 # add some documentation
53 #
54 BeamStreamer = Algorithm( "BeamStreamer" )
55 #
56 BeamStreamer.ToolNames = [ "TBPatternUnitStreamerTool/BitSelector" ]
57 #
58 BeamStreamer.BitSelector.AcceptPattern = [ "S1", "S2", "S3" ]
59 BeamStreamer.BitSelector.RejectPattern = [ "VetoLeft",
60  "VetoRight",
61  "VetoUp",
62  "VetoDown",
63  "HoleVeto",
64  "EarlyPU",
65  "LatePU" ]
66 
67 TBBPCRec = Algorithm("TBBPCRec")
68 include( "TBRec/H6BPCRec_jobOptions.py" )
69 TBBPCRec.OutputLevel = WARNING
70 
71 #ReadTBLArDigits = Algorithm( "ReadTBLArDigits" )
72 #ReadTBLArDigits.ContainerKey="FREE"
73 #ReadTBLArDigits.DumpFile="TBLArDigits.txt"
74 #ReadTBLArDigits.PrintCellLocation=TRUE
75 #ReadTBLArDigits.OutputLevel=3
76 #NtupleSvc = Service( "NtupleSvc" )
77 #NtupleSvc.Output=["FILE1 DATAFILE='TBLArDigits.root' TYP='ROOT' OPT='NEW'"]
78 
79 #ReadLArDigits = Algorithm( "ReadLArDigits" )
80 #ReadLArDigits.ContainerKey="FREE"
81 #ReadLArDigits.DumpFile="LArDigits.txt"
82 #ReadLArDigits.PrintCellLocation=TRUE
83 #ReadLArDigits.OutputLevel=3
84 
85 TBLArRawChannelBuilder = Algorithm("TBLArRawChannelBuilder");
86 TBLArRawChannelBuilder.OutputLevel = INFO
87 TBLArRawChannelBuilder.maxSamp = 8
88 TBLArRawChannelBuilder.RecoMode = "CUBIC"
89 TBLArRawChannelBuilder.CubicAdcCut = 10.
90 
91 include ("CaloRec/CaloCellMakerFromRaw_H6_jobOptions.py" )
92 
93 theApp.Dlls += [ "TBMonitoring" ]
94 theApp.Dlls += [ "LArMonitoring" ]
95 
96 TBMon1 = Algorithm( "TBMon1" )
97 LArMon1 = Algorithm( "LArMon1" )
98 
99 tdcbinnum = 100
100 tdcmin = 0
101 tdcmax = 1023
102 
103 bpcmin = -70*mm
104 bpcmax = 70*mm
105 bpcbinnum = 70
106 
107 # ------------- BPC Monitor -------
108 TBMon1.AthenaMonTools += ["TBBPCMonTool/BPCmon"]
109 ToolSvc.BPCmon.MonitorBPC = TRUE
110 ToolSvc.BPCmon.MonitorBPCRaw = TRUE
111 ToolSvc.BPCmon.FakeDetectors = FALSE
112 # H6 BPCs
113 ToolSvc.BPCmon.BPCNames = ["BPC0","BPC1","BPC2","BPC3","BPC4","BPC5"]
114 ToolSvc.BPCmon.BPCMaxPos = bpcmax
115 ToolSvc.BPCmon.BPCMinPos = bpcmin
116 ToolSvc.BPCmon.BPCBinNum = bpcbinnum
117 ToolSvc.BPCmon.TDCBinNum = tdcbinnum
118 ToolSvc.BPCmon.TDCMax = tdcmax
119 ToolSvc.BPCmon.TDCMin = tdcmin
120 #ToolSvc.BPCmon.OutputLevel =3
121 
122 # # ------------- Scint Monitor -------
123 #TBMon1.AthenaMonTools += ["TBScintillatorMonTool/Scintmon"]
124 #ToolSvc.Scintmon.FakeDetectors = FALSE
125 # # H6 scint names :
126 #ToolSvc.Scintmon.ScintNames = ["S1","S2","S3", "B",
127 # "Veto",
128 # "muon1","muon2","muon3","muon4",
129 # "muon5","muon6","muon7","muon8",]
130 
131 #ToolSvc.Scintmon.TDCBinNum = tdcbinnum
132 #ToolSvc.Scintmon.TDCMax = tdcmax
133 #ToolSvc.Scintmon.TDCMin = tdcmin
134 #ToolSvc.Scintmon.OutputLevel =3
135 
136 # ------------- Scint Monitor -------
137 # TBMon1.AthenaMonTools += ["TBTailCatcherRawMonTool/TCmon"]
138 
139 #------------- ADC Monitor -------
140 TBMon1.AthenaMonTools += ["TBADCRawMonTool/ADCmon"]
141 ToolSvc.ADCmon.TestADCMonTool = FALSE
142 include( "TBCnv/H6ADCChannelNames.py" ) # list of ADC
143 ToolSvc.ADCmon.ADCBinNum = tdcbinnum
144 ToolSvc.ADCmon.ADCMax = tdcmax
145 ToolSvc.ADCmon.ADCMin = tdcmin
146 
147 #------------- TDC Monitor -------
148 TBMon1.AthenaMonTools += ["TBTDCRawMonTool/TDCmon"]
149 ToolSvc.TDCmon.TestTDCMonTool = FALSE
150 include( "TBCnv/H6TDCChannelNames.py" ) # list of TDC
151 ToolSvc.TDCmon.TDCBinNum = tdcbinnum
152 ToolSvc.TDCmon.TDCMax = tdcmax
153 ToolSvc.TDCmon.TDCMin = tdcmin
154 
155 #------------- LArDigitMonitoring -------------
156 LArMon1.AthenaMonTools += ["LArDigMonTool<LArDigitContainer>/pedmon0"]
157 ToolSvc.pedmon0.histoPathBase = "/stat/pedsamp0"
158 ToolSvc.pedmon0.digitKey = "FREE"
159 # ToolSvc.pedmon0.maxSamp = 3
160 ToolSvc.pedmon0.pedMode = "SAMPLE"
161 ToolSvc.pedmon0.pedSamp = 0
162 #ToolSvc.pedmon0.OutputLevel = 3
163 
164 #------------- CaloResponse Monitoring ---------
165 CaloMonitor = Algorithm( "CaloMonitor" )
166 CaloMonitor.AthenaMonTools += [ "TBCaloResponseMonTool/calMonitor" ]
167 ToolSvc.calMonitor.OutputLevel = INFO
168 # output
169 ToolSvc.calMonitor.histoPathBase = "/stat/calomon"
170 # input
171 ToolSvc.calMonitor.CellContainerName = "AllCalo" # CaloCellContainer
172 ToolSvc.calMonitor.BPCContainerName = "BPCCont" # TBBPCCont
173 #
174 # IncludedCalos: possible are LAREM, LARHEC, LARFCAL, TILE, or
175 # H6CALO = LAREM, LARHEC, LARFCAL
176 # H8CALO = LAREM, TILE
177 #
178 H8CALO = [ "LAREM", "TILE" ]
179 H6CALO = [ "LAREM", "LARHEC", "LARFCAL" ]
180 ToolSvc.calMonitor.IncludedCalos = H6CALO
181 #
182 # IncludedSamplings: possible are PreSamplerB, EMB1, EMB2, EMB3,
183 # PreSamplerE, EME1, EME2, EME3,
184 # TileBar0, TileBar1, TileBar2,
185 # TileGap1, TileGap2, TileGap3,
186 # TileExt0, TileExt1, TileExt2,
187 # FCal1, FCal2, FCal3
188 # or
189 # H6Samplings = EME2, EME3,
190 # HEC0, HEC1, HEC2
191 # FCal1, FCal2, FCal3
192 # H8Samplings = PreSamplerB,
193 # EMB1, EMB2, EMB3,
194 # TileBar0, TileBar1, TileBar2
195 #
196 H6Samplings = [ "EME2", "EME3", "HEC0", "HEC1", "HEC2",
197  "FCal1", "FCal2", "FCal3" ]
198 H8Samplings = [ "PreSamplerB", "EMB1", "EMB2", "EMB3",
199  "TileBar0", "TileBar1", "TileBar2" ]
200 ToolSvc.calMonitor.IncludedSamplings = H6Samplings
201 # calorimeter energy histogram definitions
202 ToolSvc.calMonitor.CaloEnergyBins = 100
203 ToolSvc.calMonitor.CaloEnergyMin = -10.*GeV
204 ToolSvc.calMonitor.CaloEnergyMax = 390.*GeV
205 # calorimeter eta range
206 ToolSvc.calMonitor.CaloEtaBins = 35
207 ToolSvc.calMonitor.CaloEtaMin = 1.5
208 ToolSvc.calMonitor.CaloEtaMax = 5.0
209 # calorimeter phi range
210 ToolSvc.calMonitor.CaloPhiBins = 64
211 ToolSvc.calMonitor.CaloPhiMin = 90.*deg
212 ToolSvc.calMonitor.CaloPhiMax = 180.*deg
213 # BPC x/y ranges
214 ToolSvc.calMonitor.BPCXBins = bpcbinnum
215 ToolSvc.calMonitor.BPCXMin = bpcmin
216 ToolSvc.calMonitor.BPCXMax = bpcmax
217 ToolSvc.calMonitor.BPCYBins = bpcbinnum
218 ToolSvc.calMonitor.BPCYMin = bpcmin
219 ToolSvc.calMonitor.BPCYMax = bpcmax
220 # average profile configurations
221 ToolSvc.calMonitor.MinEventsInBin = 20
222 # display unit switches
223 ToolSvc.calMonitor.EnergyUnits = GeV
224 ToolSvc.calMonitor.LengthUnits = mm
225 ToolSvc.calMonitor.AngleUnits = rad
226 # -- use root histos --
227 theApp.Dlls += [ "RootHistCnv" ]
228 theApp.HistogramPersistency = "ROOT"
229 HistogramPersistencySvc = Service( "HistogramPersistencySvc" )
230 HistogramPersistencySvc.OutputFile = "/home/lochp/scan-136.root"
231 
232 # -- Use auditors --
233 #theApp.Dlls += [ "GaudiAud" ]
234 # write out a summary of the time spent
235 #
236 #theAuditorSvc = AuditorSvc()
237 #theAuditorSvc.Auditors += [ "ChronoAuditor"]
238 # write out a short message upon entering or leaving each algorithm
239 #
240 # AuditorSvc.Auditors += { "NameAuditor" };
241 #-------------------------------------------------------------------------
242 # user driving parameters
243 #
244 # Number of events to be processed (default is 10)
245 theApp.EvtMax = 100000
246 
247 # Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
248 MessageSvc = Service( "MessageSvc" )
249 MessageSvc.OutputLevel = INFO
250 
251 AthenaEventLoopMgr = Service( "AthenaEventLoopMgr" )
252 AthenaEventLoopMgr.OutputLevel = WARNING
253 
254 # Dump all objects available
255 #StoreGateSvc = Service( "StoreGateSvc" )
256 #StoreGateSvc.Dump = TRUE
python.FakeAthena.Algorithm
def Algorithm(name)
Definition: FakeAthena.py:41
python.FakeAthena.Service
def Service(name)
Definition: FakeAthena.py:38
python.Include.include
include
Definition: Include.py:319