Skip to content
Snippets Groups Projects
Commit 1794d689 authored by Eduardo Rodrigues's avatar Eduardo Rodrigues
Browse files

Merge branch 'eduardo-DaVinciTests-Tesla' into '2017-patches'

Further removal of tests relying on 2015 data Tesla test removed

See merge request !148
parents db58b8cd 5de7c83f
No related branches found
No related tags found
2 merge requests!526Draft: S29r2p2 cache,!148Further removal of tests relying on 2015 data Tesla test removed
from Gaudi.Configuration import *
from LHCbKernel.Configuration import *
from Configurables import GaudiSequencer,RawEventJuggler
from Configurables import DaVinci
from Configurables import DecodeRawEvent
from Configurables import DstConf
DstConf().Turbo=True
DaVinci()
DaVinci().EvtMax=-1
DaVinci().DataType="2015"
DaVinci().Turbo=True
from GaudiConf import IOHelper
IOHelper().inputFiles( ["tesla_2015_TCK.dst"] , clear=True )
import GaudiPython
from Gaudi.Configuration import ApplicationMgr
from Configurables import LoKiSvc
from GaudiKernel import ROOT6WorkAroundEnabled
if ROOT6WorkAroundEnabled('ROOT-7492'):
# trigger autoloading of LHCbKernel dictionary
GaudiPython.gbl.LHCb.LHCbID
# trigger autoloading of DigiEvent dictionary
GaudiPython.gbl.LHCb.CaloDigit
gaudi = GaudiPython.AppMgr()
gaudi.initialize()
TES = gaudi.evtsvc()
version='v10r0_0x00fa0051'
from TurboStreamProd.helpers import *
from TurboStreamProd import prodDict
lines = streamLines(prodDict,version,'DiMuon',debug=True)
lines += streamLines(prodDict,version,'Charm',debug=True)
lines += streamLines(prodDict,version,'CharmSpec',debug=True)
n=0
passed=True
while True:
gaudi.run(1)
if not TES['DAQ/RawEvent']: break # probably end of file
### Check all hypos and clusters have valid positions
for line in lines:
parts = TES["Turbo/"+line+"/Particles"]
if hasattr(parts,"__iter__"):
for p in parts:
if p.proto():
for hypo in p.proto().calo():
hypopos = hypo.target().position()
if ( hypopos.x()**2 + hypopos.y()**2 + hypopos.z()**2 + hypopos.e()**2 ) < 5.0:
passed=False
print "Invalid hypo position"
break
for cluster in hypo.target().clusters():
clusterpos = cluster.target().position()
if ( clusterpos.x()**2 + clusterpos.y()**2 + clusterpos.z()**2 + clusterpos.e()**2 ) < 5.0:
passed=False
print "Invalid cluster position"
break
n+=1
n+=1
if passed==False:
break
if passed==False:
break
print "Analysed "+str(n)+" calo classes successfully"
from Gaudi.Configuration import *
from LHCbKernel.Configuration import *
from Configurables import GaudiSequencer,RawEventJuggler
from Configurables import DaVinci
from Configurables import DecodeRawEvent
from Configurables import DstConf
DstConf().Turbo=True
DaVinci()
DaVinci().EvtMax=-1
DaVinci().DataType="2015"
from GaudiConf import IOHelper
IOHelper().inputFiles( ["tesla_2015_TCK.dst"] , clear=True )
import GaudiPython
from Gaudi.Configuration import ApplicationMgr
from Configurables import LoKiSvc
from GaudiKernel import ROOT6WorkAroundEnabled
if ROOT6WorkAroundEnabled('ROOT-7492'):
# trigger autoloading of LHCbKernel dictionary
GaudiPython.gbl.LHCb.LHCbID
# trigger autoloading of DigiEvent dictionary
GaudiPython.gbl.LHCb.CaloDigit
gaudi = GaudiPython.AppMgr()
gaudi.initialize()
TES = gaudi.evtsvc()
version='v10r0_0x00fa0051'
from TurboStreamProd.helpers import *
from TurboStreamProd import prodDict
lines = streamLines(prodDict,version,'DiMuon',debug=True)
lines += streamLines(prodDict,version,'Charm',debug=True)
lines += streamLines(prodDict,version,'CharmSpec',debug=True)
n=0
passed=True
while True:
gaudi.run(1)
if not TES['DAQ/RawEvent']: break # probably end of file
for line in lines:
parts = TES["Turbo/"+line+"/Particles"]
if hasattr(parts,"__iter__"):
for p in parts:
if p.proto():
if p.proto().muonPID():
if p.proto().muonPID().IsMuon():
### MuonIDs should always point to muon segments and an ID track...
if p.proto().track()!=p.proto().muonPID().idTrack():
print "Failed to find ID track"
passed=False
break
if p.proto().muonPID().muonTrack()==None:
print "Failed to find muon track"
passed=False
break
if p.proto().muonPID().muonTrack().type()!=7:
print "Muon track is of wrong type"
passed=False
break
n+=1
if passed==False:
break
print "Analysed "+str(n)+" particles successfully"
from Gaudi.Configuration import *
from LHCbKernel.Configuration import *
from Configurables import GaudiSequencer,RawEventJuggler
from Configurables import DaVinci
from Configurables import DecodeRawEvent
from Configurables import DstConf
DstConf().Turbo=True
DaVinci()
DaVinci().EvtMax=-1
DaVinci().DataType="2015"
from GaudiConf import IOHelper
IOHelper().inputFiles( ["tesla_2015_TCK.dst"] , clear=True )
import GaudiPython
from Gaudi.Configuration import ApplicationMgr
from Configurables import LoKiSvc
from GaudiKernel import ROOT6WorkAroundEnabled
if ROOT6WorkAroundEnabled('ROOT-7492'):
# trigger autoloading of LHCbKernel dictionary
GaudiPython.gbl.LHCb.LHCbID
# trigger autoloading of DigiEvent dictionary
GaudiPython.gbl.LHCb.CaloDigit
gaudi = GaudiPython.AppMgr()
gaudi.initialize()
TES = gaudi.evtsvc()
version='v10r0_0x00fa0051'
from TurboStreamProd.helpers import *
from TurboStreamProd import prodDict
lines = streamLines(prodDict,version,'DiMuon',debug=True)
lines += streamLines(prodDict,version,'Charm',debug=True)
lines += streamLines(prodDict,version,'CharmSpec',debug=True)
n=0
passed=True
while True:
gaudi.run(1)
if not TES['DAQ/RawEvent']: break # probably end of file
for line in lines:
parts = TES["Turbo/"+line+"/Particles"]
if hasattr(parts,"__iter__"):
for p in parts:
if p.proto():
if p.proto().track():
### Charged particle should have an associated RICH PID with track
if p.proto().track()!=p.proto().richPID().track():
passed=False
break
n+=1
if passed==False:
break
print "Analysed "+str(n)+" particles successfully"
from Gaudi.Configuration import *
from LHCbKernel.Configuration import *
from Configurables import GaudiSequencer,RawEventJuggler
from Configurables import DaVinci
from Configurables import DecodeRawEvent
from Configurables import DstConf
DstConf().Turbo=True
DaVinci()
DaVinci().EvtMax=-1
DaVinci().DataType="2015"
DaVinci().Turbo=True
from GaudiConf import IOHelper
IOHelper().inputFiles( ["tesla_2015_TCK.dst"] , clear=True )
import GaudiPython
from Gaudi.Configuration import ApplicationMgr
from Configurables import LoKiSvc
from GaudiKernel import ROOT6WorkAroundEnabled
if ROOT6WorkAroundEnabled('ROOT-7492'):
# trigger autoloading of LHCbKernel dictionary
GaudiPython.gbl.LHCb.LHCbID
# trigger autoloading of DigiEvent dictionary
GaudiPython.gbl.LHCb.CaloDigit
gaudi = GaudiPython.AppMgr()
gaudi.initialize()
tes = gaudi.evtsvc()
vertLoc = "Turbo/Primary"
protoLoc = "Turbo/Protos"
trackLoc = "Turbo/Tracks"
rpidLoc = "Turbo/RichPIDs"
mpidLoc = "Turbo/MuonPIDs"
hypoLoc = "Turbo/CaloHypos"
clusterLoc = "Turbo/CaloClusters"
n_events=0
n_vert=0
n_proto=0
n_track=0
n_rpid=0
n_mpid=0
n_hypo=0
n_cluster=0
version='v10r0_0x00fa0051'
from TurboStreamProd.helpers import *
from TurboStreamProd import prodDict
lines = streamLines(prodDict,version,'DiMuon',debug=True)
lines += streamLines(prodDict,version,'Charm',debug=True)
lines += streamLines(prodDict,version,'CharmSpec',debug=True)
while True:
gaudi.run(1)
#
if not tes['/Event/DAQ/RawEvent']:
print "End of file"
break
#
n=0
for line in lines:
rep = tes["Hlt2/SelReports"].selReport(line+"Decision")
if rep:
n+=1
if n==0:
continue
n_events+=1
n_vert+=tes[vertLoc].size()
n_proto+=tes[protoLoc].size()
n_track+=tes[trackLoc].size()
n_rpid+=tes[rpidLoc].size()
n_mpid+=tes[mpidLoc].size()
n_hypo+=tes[hypoLoc].size()
n_cluster+=tes[clusterLoc].size()
print "Average size of PV container = "+str( float(n_vert)/float(n_events) )
print "Average size of ProtoParticle container = "+str( float(n_proto)/float(n_events) )
print "Average size of Track container = "+str( float(n_track)/float(n_events) )
print "Average size of RICH PID container = "+str( float(n_rpid)/float(n_events) )
print "Average size of Muon PID container = "+str( float(n_mpid)/float(n_events) )
print "Average size of CaloHypo container = "+str( float(n_hypo)/float(n_events) )
print "Average size of CaloCluster container = "+str( float(n_cluster)/float(n_events) )
from Gaudi.Configuration import *
from LHCbKernel.Configuration import *
from Configurables import GaudiSequencer,RawEventJuggler
from Configurables import DaVinci
from Configurables import DecodeRawEvent
from Configurables import DstConf
DstConf().Turbo=True
DaVinci()
DaVinci().EvtMax=-1
DaVinci().DataType="2015"
from GaudiConf import IOHelper
IOHelper().inputFiles( ["tesla_2015_TCK.dst"] , clear=True )
import GaudiPython
from Gaudi.Configuration import ApplicationMgr
from Configurables import LoKiSvc
from GaudiKernel import ROOT6WorkAroundEnabled
if ROOT6WorkAroundEnabled('ROOT-7492'):
# trigger autoloading of LHCbKernel dictionary
GaudiPython.gbl.LHCb.LHCbID
# trigger autoloading of DigiEvent dictionary
GaudiPython.gbl.LHCb.CaloDigit
gaudi = GaudiPython.AppMgr()
gaudi.initialize()
TES = gaudi.evtsvc()
tistostool= gaudi.toolsvc().create('TriggerTisTos',interface='ITriggerTisTos')
triggerTisTosTool2 = gaudi.toolsvc().create('Hlt2TriggerTisTos', interface='ITriggerTisTos')
hltline = "Hlt2DiMuonJPsiTurbo"
nTOS = 0
nDEC = 0
while True:
gaudi.run(1)
if not TES['DAQ/RawEvent']: break # probably end of file
#parts = TES["Turbo/Hlt2CharmHadDstp2D0Pip_D02PimPipTurbo/Particles"]
parts = TES["Turbo/"+hltline+"/Particles"]
if hasattr(parts,"__iter__"):
for p in parts:
if p.particleID().pid()==443:
#HLT2TISTOS = triggerTisTosTool2.triggerSelectionNames(p,hltline+"Decision",tistostool.kAnything,tistostool.kAnything,tistostool.kAnything,tistostool.kAnything)
#tos = triggerTisTosTool2.triggerTisTos().tos()
triggerTisTosTool2.setTriggerInput(hltline+"Decision")
tistostool.setOfflineInput(p)
triggerTisTosTool2.setOfflineInput(tistostool.offlineLHCbIDs())
tos = triggerTisTosTool2.tisTosTobTrigger().tos()
dec = triggerTisTosTool2.triggerTisTos().decision()
if dec:
nDEC += 1
if tos:
nTOS += 1
print "# decisions = "+str(nDEC)
print "# TOS = "+str(nTOS)
<?xml version="1.0" ?><!DOCTYPE extension PUBLIC '-//QM/2.3/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'>
<!--
#######################################################
# SUMMARY OF THIS TEST
# ...................
# Author: sbenson
# Purpose: Check the TOS and decision
# Prerequisites: default_2015
# Common failure modes, severities and cures:
# . SEVERE: Segfault or raised exception, stderr, nonzero return code
# . MAJOR: additional FATAL/ERROR messages always a major problem. no ERROR messages should ever be printed when running this test.
# . MINOR: additional WARNING messages, it is unclear how severe these may be, you will need to hunt down the cause and either fix the problem or suppress the warning.
# . EXPECTED: At the moment this test has a habit of timing out or being killed by some abort signal in finalize, but the output always looks fine.
#######################################################
-->
<extension class="GaudiTest.GaudiExeTest" kind="test">
<argument name="program"><text>python</text></argument>
<argument name="timeout"><integer>3600</integer></argument>
<argument name="args"><set>
<text>../options/DV_2015_MuonCheck.py</text>
</set></argument>
<argument name="validator"><text>
block = """
Analysed 2591 particles successfully
"""
findReferenceBlock(block)
</text></argument>
</extension>
<?xml version="1.0" ?><!DOCTYPE extension PUBLIC '-//QM/2.3/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'>
<!--
#######################################################
# SUMMARY OF THIS TEST
# ...................
# Author: sbenson
# Purpose: Check the TOS and decision
# Prerequisites: default_2015
# Common failure modes, severities and cures:
# . SEVERE: Segfault or raised exception, stderr, nonzero return code
# . MAJOR: additional FATAL/ERROR messages always a major problem. no ERROR messages should ever be printed when running this test.
# . MINOR: additional WARNING messages, it is unclear how severe these may be, you will need to hunt down the cause and either fix the problem or suppress the warning.
# . EXPECTED: At the moment this test has a habit of timing out or being killed by some abort signal in finalize, but the output always looks fine.
#######################################################
-->
<extension class="GaudiTest.GaudiExeTest" kind="test">
<argument name="program"><text>python</text></argument>
<argument name="timeout"><integer>3600</integer></argument>
<argument name="args"><set>
<text>../options/DV_2015_RichCheck.py</text>
</set></argument>
<argument name="validator"><text>
block = """
Analysed 28279 particles successfully
"""
findReferenceBlock(block)
</text></argument>
</extension>
<?xml version="1.0" ?><!DOCTYPE extension PUBLIC '-//QM/2.3/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'>
<!--
#######################################################
# SUMMARY OF THIS TEST
# ...................
# Author: sbenson
# Purpose: Check the TOS and decision efficiency on MC
# Prerequisites: None
# Common failure modes, severities and cures:
# . SEVERE: Segfault or raised exception, stderr, nonzero return code
# . MAJOR: additional FATAL/ERROR messages always a major problem. no ERROR messages should ever be printed when running this test.
# . MINOR: additional WARNING messages, it is unclear how severe these may be, you will need to hunt down the cause and either fix the problem or suppress the warning.
# . EXPECTED: At the moment this test has a habit of timing out or being killed by some abort signal in finalize, but the output always looks fine.
#######################################################
-->
<extension class="GaudiTest.GaudiExeTest" kind="test">
<argument name="program"><text>python</text></argument>
<argument name="timeout"><integer>3600</integer></argument>
<argument name="args"><set>
<text>../options/DV_2015_SharedContainers.py</text>
</set></argument>
<argument name="validator"><text>
block = """
Average size of PV container = 2.01599147122
Average size of ProtoParticle container = 7.45095948827
Average size of Track container = 7.52132196162
Average size of RICH PID container = 3.76759061834
Average size of Muon PID container = 3.76759061834
Average size of CaloHypo container = 8.03411513859
Average size of CaloCluster container = 7.8710021322
"""
findReferenceBlock(block)
</text></argument>
</extension>
<?xml version="1.0" ?><!DOCTYPE extension PUBLIC '-//QM/2.3/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'>
<!--
#######################################################
# SUMMARY OF THIS TEST
# ...................
# Author: sbenson
# Purpose: Check the TOS and decision
# Prerequisites: default_2015
# Common failure modes, severities and cures:
# . SEVERE: Segfault or raised exception, stderr, nonzero return code
# . MAJOR: additional FATAL/ERROR messages always a major problem. no ERROR messages should ever be printed when running this test.
# . MINOR: additional WARNING messages, it is unclear how severe these may be, you will need to hunt down the cause and either fix the problem or suppress the warning.
# . EXPECTED: At the moment this test has a habit of timing out or being killed by some abort signal in finalize, but the output always looks fine.
#######################################################
-->
<extension class="GaudiTest.GaudiExeTest" kind="test">
<argument name="program"><text>python</text></argument>
<argument name="timeout"><integer>3600</integer></argument>
<argument name="args"><set>
<text>../options/DV_2015_TISTOS.py</text>
</set></argument>
<argument name="validator"><text>
block = """
# decisions = 214
# TOS = 214
"""
findReferenceBlock(block)
</text></argument>
</extension>
<?xml version="1.0" ?><!DOCTYPE extension PUBLIC '-//QM/2.3/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'>
<!--
#######################################################
# SUMMARY OF THIS TEST
# ...................
# Author: sbenson
# Purpose: Check the TOS and decision
# Prerequisites: default_2015
# Common failure modes, severities and cures:
# . SEVERE: Segfault or raised exception, stderr, nonzero return code
# . MAJOR: additional FATAL/ERROR messages always a major problem. no ERROR messages should ever be printed when running this test.
# . MINOR: additional WARNING messages, it is unclear how severe these may be, you will need to hunt down the cause and either fix the problem or suppress the warning.
# . EXPECTED: At the moment this test has a habit of timing out or being killed by some abort signal in finalize, but the output always looks fine.
#######################################################
-->
<extension class="GaudiTest.GaudiExeTest" kind="test">
<argument name="program"><text>python</text></argument>
<argument name="timeout"><integer>3600</integer></argument>
<argument name="args"><set>
<text>../options/DV_2015_CaloCheck.py</text>
</set></argument>
<argument name="validator"><text>
block = """
Analysed 122556 calo classes successfully
"""
findReferenceBlock(block)
</text></argument>
</extension>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment