Report problems to ATLAS LXR Team (with time and IP address indicated)

The LXR Cross Referencer

source navigation ]
diff markup ]
identifier search ]
general search ]
 
 
Architecture: linux ]
Version: head ] [ nightly ] [ GaudiDev ]
  Links to LXR source navigation pages for stable releases [ 12.*.* ]   [ 13.*.* ]   [ 14.*.* ] 

001 #**************************************************************
002 #
003 # jopOptions file for TileCal commissioning analysis
004 #
005 #==============================================================
006 
007 from AthenaCommon.AppMgr import theApp
008 svcMgr = theApp.serviceMgr()
009 
010 #---  Output printout level ----------------------------------- 
011 #output threshold (1=VERBOSE, 2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL)
012 if not 'OutputLevel' in dir():
013     OutputLevel = 4
014 svcMgr.MessageSvc.OutputLevel = OutputLevel
015 svcMgr.MessageSvc.defaultLimit = 1000000
016 svcMgr.MessageSvc.Format = "% F%60W%S%7W%R%T %0W%M"
017 svcMgr.MessageSvc.useColors = False
018 
019 
020 if not 'RunFromLocal' in dir():
021     RunFromLocal=False
022 
023 if not 'RunNumber' in dir():
024     RunNumber = 0
025 
026 if RunNumber>40000:
027     if not 'TileFrameLength' in dir():
028         TileFrameLength = 7; # expected value in all runs starting from M6
029 
030 if not 'TileUseCOOL' in dir():
031     TileUseCOOL=False; # don't use COOL DB by default for commissioning
032     
033 if 'TilePhysRun' in dir():
034     if TilePhysRun:
035         if not 'InputDirectory' in dir():
036            if RunNumber<10800:
037                 InputDirectory = "/castor/cern.ch/atlas/P1commisioning/phaseII"
038            elif RunNumber<20000:
039                 InputDirectory = "/castor/cern.ch/atlas/P1commisioning/phaseIII"
040            elif RunNumber<28000:
041                 InputDirectory = "/castor/cern.ch/grid/atlas/t0/perm/DAQ"
042            elif RunNumber<32053:
043                 InputDirectory = "/castor/cern.ch/grid/atlas/t0/perm/DAQ/M5"
044            elif RunNumber<32946:
045                 InputDirectory = "/castor/cern.ch/grid/atlas/t0/perm/DAQ/CaloWeekNov07"
046            elif RunNumber<39801:
047                 InputDirectory = "/castor/cern.ch/grid/atlas/t0/perm/DAQ/CaloWeekFeb08"
048            elif RunNumber<44520:
049                 InputDirectory = "/castor/cern.ch/grid/atlas/DAQ/M6"
050            elif RunNumber<54063:
051                 InputDirectory = "/castor/cern.ch/grid/atlas/DAQ/CaloWeekApr08"
052            elif RunNumber<71501:
053                 InputDirectory = "/castor/cern.ch/grid/atlas/DAQ/M7"
054            else:
055                 InputDirectory = "/castor/cern.ch/atlas/testbeam/tilecal/2008/daq"
056 else:
057     TilePhysRun=False
058 
059 if not 'InputDirectory' in dir():
060     if RunNumber<36127:
061         InputDirectory = "/castor/cern.ch/atlas/testbeam/tilecal/2007/daq"
062     else:
063         InputDirectory = "/castor/cern.ch/atlas/testbeam/tilecal/2008/daq"
064 
065 if not 'FileFilter' in dir():
066     FileFilter = ".data"
067 
068 from os import system,popen
069 
070 def FindFile(path,runinput,filter):
071 
072     run=str(runinput)
073 
074     while len(run)<7:
075         run='0'+run
076         
077     files=[]
078     fullname=[]
079 
080     if RunFromLocal:
081         for f in popen('ls %(path)s | grep %(run)s' % {'path': path, 'run':run }):
082             files.append(f)
083 
084     else:
085         if (TilePhysRun and RunNumber>28000 and RunNumber<40000):
086             for f in popen('nsls -l %(path)s | grep %(run)s | grep -v "               [ 0-9][ 0-9][0-9] " | grep %(filt)s | grep -e "b0000[01][01][01][01]" -e "physics.cosmics" | grep -v writing | cut -c66- ' % {'path': path, 'run':run, 'filt':filter  }):
087                 files.append(f)
088         elif (TilePhysRun and RunNumber>40000 and RunNumber<45000):
089             for f in popen('nsls -l %(path)s | grep %(run)s | grep -v "               [ 0-9][ 0-9][0-9] " | grep %(filt)s | grep -e "NIM0" -e "[pP]hysics" | grep -v writing | cut -c66- ' % {'path': path, 'run':run, 'filt':filter  }):
090                 files.append(f)
091         else:
092             for f in popen('nsls -l %(path)s | grep %(run)s | grep -v "               [ 0-9][ 0-9][0-9] " | grep %(filt)s | grep -v writing | cut -c66- ' % {'path': path, 'run':run, 'filt':filter  }):
093                 files.append(f)
094 
095     for nn in range(len(files)):
096         temp=files[nn].split('\n')
097         fullname.append(path+'/'+temp[0])
098 
099     return [fullname,run]
100 
101 
102 if not 'FileNameVec' in dir():
103     if not 'FileName' in dir():    
104         tmp= FindFile(InputDirectory,RunNumber,FileFilter)
105         FileNameVec = tmp[0]
106         FormattedRunNumber=tmp[1]
107     else:
108         FileNameVec = [ FileName ]
109         FormattedRunNumber=RunNumber
110 else:
111     FormattedRunNumber=RunNumber
112      
113 print "InputDirectory is "+str(InputDirectory)
114 print "RunNumber was "+str(RunNumber)
115 print "RunNumber is "+str(FormattedRunNumber)
116 print "FullFileName is "+str(FileNameVec)
117 
118 if not 'Version' in dir():
119     Version="0"
120 
121 if not 'OutputDirectory' in dir():
122     OutputDirectory = "/tmp/Reco-"+str(RunNumber)+"-"+Version+"/"
123 
124 system('mkdir -p %s' %(OutputDirectory))
125 
126 if not 'EvtMin' in dir():
127     if (not 'doTileMon' in dir() or doTileMon):
128         EvtMin=1
129     else:
130         EvtMin=0
131     EvtMinNotSet=True
132 
133 if not 'EvtMax' in dir():
134     EvtMax = 5000000
135 
136 if not 'EventsPerFile' in dir():
137     EventsPerFile = 0
138 
139 if not 'DrawerList' in dir():
140     DrawerList="-1"
141 
142 #-----------------------------------
143 # TileCal reconstruction for commissioning
144 #-----------------------------------
145 
146 # if run type is set to non-zero value, it overrides event trig type
147 if not 'TileRunType' in dir():
148     TileRunType = 0; # 1 - physics, 2 - laser, 4 - pedestal, 8 - CIS run 
149 
150 # override run type with one of these flags
151 if not 'TileCisRun' in dir():
152     TileCisRun = False
153 if not 'TileMonoRun' in dir():
154     TileMonoRun=False
155 if not 'TilePedRun' in dir():
156     TilePedRun=False
157 if not 'TileLasRun' in dir():
158     TileLasRun=False
159 if not 'TileLedRun' in dir():
160     TileLedRun=False
161 if not 'TilePhysRun' in dir():
162     TilePhysRun=False
163 
164 if TileCisRun:
165     TileRunType = 8
166     # set all parameters for standard CIS run
167     if not 'TileFrameLength' in dir():
168         TileFrameLength = 7
169 
170     # do not convert ADC counts to pCb
171     if not 'TileCalibrateEnergy' in dir():
172         TileCalibrateEnergy = False
173 
174     # skip all events when just one channel is fired (4*48)
175     if 'EvtMinNotSet' in dir():
176         EvtMin=190
177 
178 elif TileMonoRun:
179     TileRunType = 8
180     if not 'doTileFlat' in dir():
181         doTileFlat=True
182     if not 'doTileOpt' in dir():
183         doTileOpt=True
184     if not 'TileFrameLength' in dir():
185         TileFrameLength=9
186 
187 elif TilePedRun:
188     TileRunType = 4
189     if not 'TileFrameLength' in dir():
190         TileFrameLength=7
191     
192 elif TileLasRun:
193     TileRunType = 2
194     if not 'doTileFlat' in dir():
195         doTileFlat=True
196     if not 'doTileOpt' in dir():
197         doTileOpt=True
198     if not 'TileFrameLength' in dir():
199         TileFrameLength=9
200     
201 elif TileLedRun:
202     TileRunType = 2
203     if not 'doTileFlat' in dir():
204         doTileFlat=True
205     if not 'doTileOpt' in dir():
206         doTileOpt=True
207     if not 'TileFrameLength' in dir():
208         TileFrameLength=9
209     
210 else:
211     if TilePhysRun:
212         TileRunType = 1
213         if not 'doTileFlat' in dir():
214             doTileFlat=True
215         if not 'doTileOpt' in dir():
216             doTileOpt=True
217 
218     if not 'TileFrameLength' in dir():
219         TileFrameLength = 9; # the value we expect in single gain run
220 
221     if not 'doTileFlat' in dir():
222         doTileFlat = True
223 
224     if not 'doTileOpt' in dir():
225         doTileOpt = True
226 
227     if not 'doTileFit' in dir():
228         doTileFit = True
229 
230     if not 'doTileMuId' in dir():
231         doTileMuId = True
232     
233     if not 'doTileRODMuId' in dir():
234         doTileRODMuId = True
235 
236     if not 'doTileMuonFitter' in dir():
237         doTileMuonFitter = True
238     
239     if not 'doCaloNtuple' in dir():
240         doCaloNtuple = True
241 
242 # special options
243 # which algorithms to run 
244 # and output from which algorithm to use as input for TileCellBuilder
245 # by default we use just fit method, which gives the best results
246 # but for phys run we use all 3 methods (see above)
247 
248 if not 'doTileFlat' in dir():
249     doTileFlat = False
250 
251 if not 'doTileOpt' in dir():
252     doTileOpt = False
253 
254 if not 'doTileFit' in dir():
255     doTileFit = True
256 
257 from TileRecUtils.TileRecFlags import jobproperties
258 
259 jobproperties.TileRecFlags.doTileFit=doTileFit
260 jobproperties.TileRecFlags.doTileOpt=doTileOpt
261 jobproperties.TileRecFlags.doTileFlat=doTileFlat
262 jobproperties.TileRecFlags.doTileManyAmps=False
263 
264 jobproperties.print_JobProperties('tree&value')
265 
266 if not 'useRODReco' in dir():
267     useRODReco = False
268 if useRODReco:
269     TileUseCOOL=True
270 
271 # calculate calibration constants and store them in POOL
272 if not 'doTileCalib' in dir():
273     doTileCalib = False
274 recoMethod="fit"
275 processAllChannels=True
276     
277 # create monitoring histograms
278 if not 'doTileMon' in dir():
279     doTileMon = True
280 
281 # all other parameters which can be set to True or False
282 # from the command line 
283 
284 # use PMT ordering in ntuple (convert channel to PMT number) 
285 if not 'doTileCable' in dir():
286     doTileCable = True
287 
288 # convert ADC counts to pCb by default
289 if not 'TileCalibrateEnergy' in dir():
290     TileCalibrateEnergy = True
291 
292 # create TileRec/h1000 ntuple
293 if not 'doTileNtuple' in dir():
294     doTileNtuple=True
295 
296 # store results of reconstruction in POOL file
297 if not 'doCreatePool' in dir():
298     doCreatePool=False
299 
300 # run v-atlas event display
301 if not 'doEventDisplay' in dir():
302     doEventDisplay=False
303 
304 # prepare XML files for Atlantis
305 if not 'doAtlantis' in dir():
306     doAtlantis=False
307 
308 # create CALO/169 ntuple with cell by cell info, as well as CBNT
309 if not 'doCaloNtuple' in dir():
310     doCaloNtuple = False
311 
312 # run TileMuId
313 if not 'doTileMuId' in dir():
314     doTileMuId = False
315     
316 # run TileRODMuId
317 if not 'doTileRODMuId' in dir():
318     doTileRODMuId = False
319 
320 # run TileMuonFitter
321 if not 'doTileMuonFitter' in dir():
322     doTileMuonFitter = False
323     
324 # run TopoClustering
325 if not 'doCaloTopoCluster' in dir():
326     doCaloTopoCluster = False
327 
328 # check if we want to create CBNT
329 if (doCaloNtuple or doTileMuId or doTileRODMuId or doTileMuonFitter or doCaloTopoCluster or doTileNtuple):
330     doCBNT = True
331 else:
332     doCBNT = False
333 
334 if doCBNT:
335     CBNTAthenaAware = True
336 else:
337     CBNTAthenaAware = False
338 
339 # check if we need to create TileCells
340 if (doCBNT or doCreatePool or doEventDisplay or doAtlantis):
341     doCaloCell = True
342 else:
343     doCaloCell = False
344 
345 #---------------
346 # end of options
347 #---------------
348 
349 #=============================================================
350 #=== init Det Descr
351 #=============================================================
352 
353 from AthenaCommon.GlobalFlags import GlobalFlags
354 GlobalFlags.DetGeo.set_commis()
355 GlobalFlags.Luminosity.set_zero()
356 GlobalFlags.DataSource.set_data()
357 GlobalFlags.InputFormat.set_bytestream()
358 
359 from AthenaCommon.DetFlags import DetFlags
360 DetFlags.Calo_setOff()  #Switched off to avoid geometry
361 DetFlags.ID_setOff()
362 DetFlags.Muon_setOff()
363 DetFlags.Truth_setOff()
364 DetFlags.LVL1_setOff()
365 DetFlags.digitize.all_setOff()
366 
367 DetFlags.detdescr.ID_setOff()
368 DetFlags.detdescr.Muon_setOff()
369 DetFlags.detdescr.LAr_setOff()
370 DetFlags.detdescr.Tile_setOn()
371 DetFlags.readRDOBS.Tile_setOn()
372 DetFlags.Print()
373 
374 from AthenaCommon.GlobalFlags import jobproperties
375 jobproperties.Global.DetDescrVersion = 'ATLAS-CommNF-07-00-00'
376 log.info( "DetDescrVersion = %s" % (jobproperties.Global.DetDescrVersion()) )
377 
378 from AtlasGeoModel import SetGeometryVersion
379 from AtlasGeoModel import GeoModelInit
380 from GeoModelSvc.GeoModelSvcConf import GeoModelSvc
381 GeoModelSvc = GeoModelSvc()
382 log.info( "GeoModelSvc.AtlasVersion = %s" % (GeoModelSvc.AtlasVersion) )
383 #GeoModelSvc.TileVersionOverride = "TileCal-Comm-01"
384 #log.info( "GeoModelSvc.TileVersionOverride = %s" % (GeoModelSvc.TileVersionOverride) )
385 
386 include( "TileTBRec/TileTBDefaults_jobOptions.py" )
387 
388 # Set Global tag for IOVDbSvc for commissioning
389 from IOVDbSvc.CondDB import conddb
390 conddb.setGlobalTag('COMCOND-005-01')
391 
392 #=============================================================
393 #=== setup TileConditions
394 #=============================================================
395 TileBchlList='TileNoBad.oflBch'; # dummy file with bad channels by default
396 include( "TileConditions/TileConditionsCosmics_jobOptions.py" )
397 tileInfoConfigurator.OutputLevel = OutputLevel
398 
399 print tileInfoConfigurator
400 
401 #=============================================================
402 #=== ByteStream Input
403 #=============================================================
404 include( "ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py" )
405 include( "ByteStreamCnvSvcBase/BSAddProvSvc_RDO_jobOptions.py" )
406 theApp.ExtSvc += [ "ByteStreamCnvSvc" ] 
407 ByteStreamInputSvc = svcMgr.ByteStreamInputSvc
408 ByteStreamInputSvc.FullFileName += FileNameVec
409 
410 # read ByteStream and reconstruct data
411 include( "TileTBRec/TileTBRec_jobOptions.py" )
412 #ToolSvc.TileRawChannelBuilderFitFilter.MaxTimeFromPeak = 250.0; # recover behaviour of rel 13.0.30  
413 
414 # frag to ROD mapping
415 if not 'TileMap' in dir():
416     ByteStreamCnvSvc = svcMgr.ByteStreamCnvSvc
417     ByteStreamCnvSvc.ROD2ROBmap = [ "-1" ]
418 else:
419     include( TileMap )
420 
421 if (doEventDisplay or doCreatePool):
422     # create TileHit from TileRawChannel and store it in TileHitVec
423     from TileRecAlgs.TileHitFromRawChGetter import *
424     theTileHitFromRawChGetter = TileHitFromRawChGetter()
425     theTileHitFromRawChGetter.TileRawChannelToHit().TileRawChannelContainer = "TileRawChannelFit"
426     theTileHitFromRawChGetter.TileRawChannelToHit().UseSamplFract = False
427 
428     print theTileHitFromRawChGetter.TileRawChannelToHit()
429 
430 if doCaloCell:
431     # create TileCell from TileRawChannel and store it in CaloCellContainer
432     #include( "CaloRec/CaloCellMaker_config.py" )
433     #include( "CaloRec/CaloCellMaker_jobOptions.py" )
434 
435     # take only TileCal part from two includes commented above
436     include( "TileTBRec/TileTBRCToCellTool_jobOptions.py" )
437     # use one or another container with rawChannels as input
438     #theTileCellBuilder.TileRawChannelContainer = "TileRawChannelFit"
439     # mask bad channels for physics run
440     if TilePhysRun:
441         print "Masking bad channels in TileCellBuilder"
442         from AthenaCommon.AppMgr import ToolSvc
443         ToolSvc.TileCellBuilder.maskBadChannels = True
444         print ToolSvc.TileCellBuilder
445 
446     theCaloCellMaker.CaloCellMakerToolNames += ["CaloCellContainerFinalizerTool"]
447     # make lots of checks (should not be necessary eventually)
448     theCaloCellMaker.CaloCellMakerToolNames += ["CaloCellContainerCheckerTool"]
449 
450 if doCaloTopoCluster :
451     from CaloRec.CaloTopoClusterFlags import jobproperties
452     jobproperties.CaloTopoClusterFlags.doTopoClusterLocalCalib = False
453     include ("CaloRec/CaloTopoCluster_jobOptions.py")
454     CaloTopoCluster.TopoMaker.NoiseSigma= 1.68 / 1023 / 64 * 800 * 1.414214 * GeV
455     CaloTopoCluster.TopoMaker.CaloNoiseTool=''
456     CaloTopoCluster.TopoMaker.UseCaloNoiseTool=False
457     CaloTopoCluster.TopoMaker.UsePileUpNoise=False
458     CaloTopoCluster.TopoMaker.CellThresholdOnAbsEinSigma     =    0.0 
459     CaloTopoCluster.TopoMaker.NeighborThresholdOnAbsEinSigma =    2.0 
460     CaloTopoCluster.TopoMaker.SeedThresholdOnEorAbsEinSigma  =    4.0     # note E or AbsE 
461     # thresholds in addition to 4/2/0 thresholds 
462     CaloTopoCluster.TopoMaker.CellThresholdOnAbsEt           =    0.0*MeV  
463     CaloTopoCluster.TopoMaker.NeighborThresholdOnAbsEt       =    0.0*MeV 
464     CaloTopoCluster.TopoMaker.SeedThresholdOnEtorAbsEt       =    0.0*MeV # note Et or AbsEt
465     CaloTopoCluster.TopoMaker.CalorimeterNames = [ "TILE" ]
466     CaloTopoCluster.TopoMaker.SeedSamplingNames= [ "TileBar0", "TileBar1", "TileBar2", "TileExt0", "TileExt1", "TileExt2", "TileGap1", "TileGap2", "TileGap3" ]
467     CaloTopoCluster.TopoSplitter.SamplingNames = [ "TileBar0", "TileBar1", "TileBar2", "TileExt0", "TileExt1", "TileExt2", "TileGap1", "TileGap2", "TileGap3" ]
468 
469 if doTileMuId:
470     include ("TileMuId/TileMuId_cosmics_jobOptions.py")
471 
472 if doTileMuonFitter:
473     include( "TileCosmicAlgs/TileMuonFitter_jobOptions.py")
474 
475 if doCBNT:
476     if CBNTAthenaAware:
477         include( "CBNT_Athena/CBNT_AthenaAware_jobOptions.py" )
478         from CBNT_Athena.CBNT_AthenaAwareCfg import CBNT_AthenaAware
479         CBNT_AthenaAware = CBNT_AthenaAware()
480     else:
481         include( "CBNT_Athena/CBNT_Athena_jobOptions.py" )
482 
483     if doTileMuId:
484         include ("TileMuId/CBNT_TileMu_jobOptions.py")
485 
486     if doTileRODMuId:
487         svcMgr.ByteStreamAddressProviderSvc.TypeNames += [ "TileL2Container/TileL2Cnt" ]
488         include ("TileL2Algs/CBNT_TileMuROD_jobOptions.py")
489 
490     if doTileMuonFitter:
491         include( "TileCosmicAlgs/CBNT_TileMuonFitter_jobOptions.py")
492 
493     if doCaloNtuple:
494         if CBNTAthenaAware:
495             from CaloRec.CaloRecConf import CBNTAA_CaloInfo, CBNTAA_CaloCell 
496             CBNT_AthenaAware += CBNTAA_CaloInfo()
497             # Calo cells without tile details
498             CBNT_AthenaAware += CBNTAA_CaloCell("CBNTAA_TileCell")
499             CBNT_TileCell = CBNT_AthenaAware.CBNTAA_TileCell
500             CBNT_TileCell.Suffix="Tile"
501             # detailed info as well
502             from TileRec.TileRecConf import CBNTAA_TileCell
503             CBNT_TileCellDetails  = CBNTAA_TileCell("CBNT_DetailedTileCell")
504             CBNT_AthenaAware += CBNT_TileCellDetails
505             CBNT_TileCellDetails.CellEnergyThreshold = 0.0
506             CBNT_TileCellDetails.SaveCellDetails = True
507             CBNT_TileCellDetails.SavePositionInfo = True
508         else:
509             from CaloRec.CaloRecConf import CBNT_CaloInfo, CBNT_CaloCell 
510             CBNT_Athena += CBNT_CaloInfo()
511             CBNT_Athena += CBNT_CaloCell("CBNT_TileCell")
512             CBNT_TileCell = CBNT_Athena.CBNT_TileCell
513             CBNT_TileCell.NtupleLocID="/FILE1/CALO/169"; 
514 
515         from CaloIdentifier import SUBCALO 
516         # SUBCALO enum: LAREM=0, LARHEC=1, LARFCAL=2, TILE=3, NSUBCALO NOT_VALID
517         CBNT_TileCell.CaloNums = [ SUBCALO.TILE ]
518         CBNT_TileCell.MaxNCells = 5184
519         CBNT_TileCell.SaveDetInfo = True
520         CBNT_TileCell.SaveTimeInfo = True
521         CBNT_TileCell.SaveQualityInfo = True
522 
523     if doCaloTopoCluster:
524         include ( "CaloRec/CaloTopoCluster_CBNT_jobOptions.py" )
525         if CBNTAthenaAware:
526             CBNT_AthenaAware.CBNT_CaloClusterTopo.CellDetailsNoiseTool = ''
527         else:
528             CBNT_Athena.CBNT_CaloClusterTopo.CellDetailsNoiseTool = ''
529 
530 if doTileNtuple:
531     # create TileCal standalone ntuple
532     include( "TileTBRec/TileTBNtuple_jobOptions.py" )
533 
534     if useRODReco:
535         TileTBNtuple.TileRawChannelContainerDsp = "TileRawChannelCnt"
536 
537     # read all frags from BS file and store in ntuple
538     TileTBNtuple.drawerList = [ DrawerList ]
539 
540     if doTileCable:
541         # take drawer type (barrel/ext.barrel) from frag ID
542         # and create arrays ordered according to PMT number
543         TileTBNtuple.drawerType = [ ]
544         
545     else:
546         # don't use cabling for channel->pmt conversion
547         # arrays in ntuple will be ordered according to channel number
548         TileTBNtuple.drawerType = [
549             0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
550             0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
551             0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
552             0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
553             0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
554             0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
555             0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
556             0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
557             0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
558             0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
559             0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
560             0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
561             0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
562             0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
563             0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
564             0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
565         ]
566 
567     # keep only fragment with coincidence trigger and CIS parameters
568     TileTBNtuple.beamFragList = [ "0x8", "0x9", "0xa", "0xb", "0xc", "0xd", "0xe", "0xf", "0x0ff" ]
569 
570     # don't store some extra stuff
571     TileTBNtuple.CompleteNtuple = FALSE
572 
573     # events per file
574     TileTBNtuple.EventsPerFile = EventsPerFile
575 
576 from AthenaCommon.AlgSequence import AlgSequence
577 topSequence = AlgSequence()
578 
579 if (doTileNtuple or doCBNT):
580 
581     theApp.HistogramPersistency = "ROOT"
582 
583     if CBNTAthenaAware:
584 
585         if not hasattr(svcMgr,"THistSvc"):
586             from GaudiSvc.GaudiSvcConf import THistSvc
587             svcMgr+=THistSvc("THistSvc")
588             tTHistSvc = svcMgr.THistSvc
589         exec 'tTHistSvc.Output += [ "AANT DATAFILE=\'%(dir)s/tiletb_%(RunNum).f_%(Version)s.aan.root\' OPT=\'RECREATE\' " ] ' %  {'dir': OutputDirectory, 'RunNum': RunNumber, 'Version': Version }
590 
591         from AnalysisTools.AnalysisToolsConf import AANTupleStream
592         topSequence += AANTupleStream( "AANTupleStream1" )
593         AANTupleStream1 = topSequence.AANTupleStream1
594         AANTupleStream1.ExtraRefNames = [ "StreamESD","StreamRDO" ]
595         exec 'AANTupleStream1.OutputName = \'%(dir)s/tiletb_%(RunNum).f_%(Version)s.aan.root\' ' %  {'dir': OutputDirectory, 'RunNum': RunNumber, 'Version': Version }
596         AANTupleStream1.ExistDataHeader = False
597 
598     else:
599 
600         # Root Ntuple output
601         if not hasattr(svcMgr,"HistogramPersistencySvc"):
602             from GaudiSvc.GaudiSvcConf import HistogramPersistencySvc
603             svcMgr+=HistogramPersistencySvc()
604         exec 'svcMgr.HistogramPersistencySvc.OutputFile = "%(dir)s/histo_%(RunNum).f_%(Version)s.root" ' %  {'dir': OutputDirectory, 'RunNum': RunNumber, 'Version': Version }
605 
606         if not hasattr(svcMgr,"NTupleSvc"):
607             from GaudiSvc.GaudiSvcConf import NTupleSvc
608             svcMgr+=NTupleSvc()
609         exec 'svcMgr.NTupleSvc.Output = [ "FILE1 DATAFILE=\'%(dir)s/tiletb_%(RunNum).f_%(Version)s.root\' OPT=\'NEW\' " ] ' %  {'dir': OutputDirectory, 'RunNum': RunNumber, 'Version': Version }
610         for i in range(2,21):
611             exec 'svcMgr.NTupleSvc.Output += [ "FILE%(fn)s DATAFILE=\'%(dir)s/tiletb_%(RunNum).f_%(Version)s_%(ext)02d.root\' OPT=\'NEW\' " ] ' %  {'fn': i, 'dir': OutputDirectory, 'RunNum': RunNumber, 'Version': Version, 'ext': i-1 }
612 
613 
614 if doTileMon:
615     # Monitoring historgrams
616     if not hasattr(svcMgr,"THistSvc"):
617         from GaudiSvc.GaudiSvcConf import THistSvc
618         svcMgr+=THistSvc("THistSvc")
619         tTHistSvc = svcMgr.THistSvc
620     exec 'tTHistSvc.Output += [ "SHIFT DATAFILE=\'%(dir)s/tilemon_%(RunNum).f_%(Version)s.root\' OPT=\'RECREATE\' " ] ' %  {'dir': OutputDirectory, 'RunNum': RunNumber, 'Version': Version }
621 
622     if (TileMonoRun):
623         runType = 9
624     elif (TileLedRun or TileLasRun):
625         runType = 3
626     else:
627         runType = TileRunType
628 
629     from AthenaMonitoring.AthenaMonitoringConf import *
630     TileMon = AthenaMonManager( "TileMon" )
631 
632     TileMon.ManualRunLBSetup    = True
633     TileMon.ManualDataTypeSetup = True
634     TileMon.Environment         = "online"
635     TileMon.FileKey             = "SHIFT"
636     TileMon.Run                 = RunNumber
637     TileMon.LumiBlock           = 1
638         
639     from TileMonitoring.TileMonitoringConf import *
640 
641     theTileDigitsMon = TileDigitsMonTool ( name            ="TileDigitsMon", 
642                                            histoStreamName = "/SHIFT",
643                                            histoPathBase   = "/Tile/Digits",
644                                            book2D          = TilePedRun,
645                                            runType         = runType )
646 
647     theTileRawChannelMon = TileRawChannelMonTool ( name            ="TileRawChannelMon", 
648                                                    histoStreamName = "/SHIFT",
649                                                    histoPathBase   = "/Tile/RawChannel",
650                                                    book2D          = TileCisRun,
651                                                    PlotDSP         = useRODReco,
652                                                    runType         = runType )
653 
654     from AthenaCommon.AppMgr import ToolSvc
655     ToolSvc += theTileDigitsMon
656     ToolSvc += theTileRawChannelMon
657 
658     TileMon.AthenaMonTools += [ theTileDigitsMon ]
659     TileMon.AthenaMonTools += [ theTileRawChannelMon ]
660 
661     #from AthenaMonitoring.AthenaMonitoringConf import *
662     #TileMon = AthenaMon( "TileMon" )
663     #TileMon.AthenaMonTools += [ "TileDigitsMonTool/TileDigitsMon" ]
664     #TileMon.AthenaMonTools += [ "TileRawChannelMonTool/TileRawChannelMon" ]
665 
666     topSequence += TileMon;
667 
668 
669 if doTileCalib:
670     # new options to be written
671     if TilePhysRun or TilePedRun:
672         #Add Noise Calib Tool
673         from TileCalibAlgs.TileCalibAlgsConf import TileDigiNoiseCalibAlg
674         from TileCalibAlgs.TileCalibAlgsConf import TileRawChNoiseCalibAlg
675 
676         theTileDigiNoiseCalibAlg = TileDigiNoiseCalibAlg( "theTileDigiNoiseCalibAlg" )
677         topSequence += theTileDigiNoiseCalibAlg
678         theTileRawChNoiseCalibAlg = TileRawChNoiseCalibAlg( "theTileRawChNoiseCalibAlg" )
679         topSequence += theTileRawChNoiseCalibAlg
680         
681     elif TileCisRun:
682         # cis calibration using top calib alg
683         from TileCalibAlgs.TileCalibAlgsConf import TileTopCalibAlg
684         from TileCalibAlgs.TileCalibAlgsConf import TileCisDefaultCalibTool
685         
686         TileCalibAlg = TileTopCalibAlg()
687         TileCalibAlg.RunNumber        = RunNumber
688         TileCalibAlg.RunType          = 8
689         exec 'TileCalibAlg.FileName = \'%(dir)s/tileCalibCIS_%(RunNum).f_%(Version)s.root\' ' %  {'dir': OutputDirectory, 'RunNum': RunNumber, 'Version': Version }
690 
691         # declare CIS tool(s) and set jobOptions if necessary
692         TileCisTool = TileCisDefaultCalibTool()
693         from AthenaCommon.AppMgr import ToolSvc
694         ToolSvc += TileCisTool
695         TileCalibAlg.TileCalibTools += [ TileCisTool ]
696 
697         topSequence += TileCalibAlg        
698     else: 
699         print "TileCalib options are not ready yet for this runtype"
700 
701 
702 if doCreatePool:
703     # Pool Output
704     include( "AthenaPoolCnvSvc/WriteAthenaPool_jobOptions.py" )
705     from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
706     Stream1 = AthenaPoolOutputStream( "Stream1" )
707 
708     # list of output objects
709     Stream1.ItemList += [ "TileDigitsContainer#*" ]
710     Stream1.ItemList += [ "TileBeamElemContainer#*" ]
711     Stream1.ItemList += [ "TileRawChannelContainer#*" ]
712     Stream1.ItemList += [ "TileHitVector#*" ]
713     Stream1.ItemList += [ "CaloCellContainer#*" ]
714 
715 
716 if doEventDisplay:
717     from HitDisplay.HitDisplayConf import HitDisplay
718     theHitDisplay = HitDisplay()
719     topSequence += theHitDisplay
720 
721 
722 if doAtlantis:
723     include("JiveXML/JiveXML_jobOptionBase.py")
724     include("JiveXML/DataTypes_Calos.py")
725     from AthenaCommon.AppMgr import ToolSvc
726     ToolSvc.CaloClusterRetriever.FavouriteClusterCollection = "CaloTopoCluster"
727     ToolSvc.CaloClusterRetriever.OtherClusterCollections = ""
728     ToolSvc.CaloRetriever.DoTileDigit = True
729     ToolSvc.CaloRetriever.DoCaloCellDetails = True
730     ToolSvc.CaloRetriever.RetrieveHEC  = False
731     ToolSvc.CaloRetriever.RetrieveFCAL = False
732     ToolSvc.CaloRetriever.RetrieveLAr  = False
733     exec 'ToolSvc.EventData2XML.FileNamePrefix = "%(dir)s/cosmic_\"' %  {'dir': OutputDirectory, 'RunNum': RunNumber, 'Version': Version }
734     exec 'ToolSvc.EventData2XML.FileNamePrefix = "%(dir)s/cosmic_\"' %  {'dir': OutputDirectory, 'RunNum': RunNumber, 'Version': Version }
735 
736 
737 #-----------------------
738 # And some final options
739 #-----------------------
740 
741 theAuditorSvc = svcMgr.AuditorSvc
742 theAuditorSvc.Auditors =  [ "ChronoAuditor" ] 
743 
744 ByteStreamInputSvc.MaxBadEvents = 10000
745 # ByteStreamInputSvc.DumpFlag = TRUE
746 # from TileByteStream.TileByteStreamConf import TileROD_Decoder
747 # ToolSvc += TileROD_Decoder()
748 # ToolSvc.TileROD_Decoder.VerboseOutput = True
749 
750 print topSequence
751 
752 EventSelector.SkipEvents = EvtMin
753 theApp.EvtMax=EvtMax
754 

source navigation ] diff markup ] identifier search ] general search ]

Due to the LXR bug, the updates fail sometimes to remove references to deleted files. The Saturday's full rebuilds fix these problems
This page was automatically generated by the LXR engine. Valid HTML 4.01!