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

Merge branch 'erodrigu-tests-cleanup' into 'master'

Clean-up of ever-lasting failing test

See merge request !316
parents f87fe2d3 0d15ec59
No related branches found
No related tags found
2 merge requests!1103Draft: Add AnalysisHelpers to DaVinci Stack,!316Clean-up of ever-lasting failing test
Pipeline #803079 passed
###############################################################################
# (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration #
# #
# This software is distributed under the terms of the GNU General Public #
# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". #
# #
# In applying this licence, CERN does not waive the privileges and immunities #
# granted to it by virtue of its status as an Intergovernmental Organization #
# or submit itself to any jurisdiction. #
###############################################################################
## @file DVTestHltDecayTreeTuple.py
#
#
# See DecayTreeTuple documentation
#
# @author P. Koppenburg
# @date 2008-03-07
#
from Gaudi.Configuration import *
from GaudiKernel.SystemOfUnits import *
MessageSvc().Format = "% F%30W%S%7W%R%T %0W%M"
#######################################################################
#
# Selection
#
from StrippingConf.Configuration import StrippingConf
from StrippingConf.StrippingStream import StrippingStream
from StrippingArchive.Utils import lineBuilder
lineBuilder = lineBuilder('Stripping29r2', 'BetaS')
line = lineBuilder.lineFromName('StrippingBetaSBd2JpsiKsDetachedLine')
stream = StrippingStream("B2JpsiXTest", Lines = [line])
sc = StrippingConf()
sc.appendStream( stream )
########################################################################
#
# The Decay Tuple
#
from Configurables import DecayTreeTuple
tuple = DecayTreeTuple("Tuple")
tuple.ToolList += [
"TupleToolMCTruth"
, "TupleToolMCBackgroundInfo"
, "TupleToolGeometry"
, "TupleToolKinematic"
, "TupleToolPropertime"
, "TupleToolPrimaries"
, "TupleToolEventInfo"
, "TupleToolTrackInfo"
# , "TupleToolTISTOS"
]
tuple.Inputs = [line.outputLocation()]
tuple.Decay = "[ B0 -> ^( J/psi(1S) -> ^mu+ ^mu- ) ^( KS0 -> ^pi+ ^pi- ) ]CC"
#tuple.OutputLevel = 1 ;
########################################################################
#
# The Event Tuple
#
from Configurables import EventTuple, TupleToolTrigger
evtTuple = EventTuple()
evtTuple.ToolList = [ "TupleToolEventInfo",
"TupleToolGeneration" ]
evtTuple.addTool(TupleToolTrigger())
evtTuple.TupleToolTrigger.VerboseHlt1 = True
evtTuple.TupleToolTrigger.VerboseHlt2 = True
# evtTuple.OutputLevel = 1
########################################################################
#
# The MC truth Tuple
#
from Configurables import MCDecayTreeTuple
mcTuple = MCDecayTreeTuple("MCTuple")
mcTuple.Decay = "( [ [B0]nos => ^( J/psi(1S) => ^mu+ ^mu- ) ^( KS0 => ^pi+ ^pi- ) ]CC ) || ( [ [B0]os -> ^( J/psi(1S) => ^mu+ ^mu- ) ^( KS0 => ^pi+ ^pi- ) ]CC )"
mcTuple.ToolList = [ "MCTupleToolKinematic", "TupleToolEventInfo", "MCTupleToolReconstructed" ]
from Configurables import MCTupleToolReconstructed, MCReconstructed
#ToolSvc().addTool(MCReconstructed)
#ToolSvc().MCReconstructed.OutputLevel = 1
#mcTuple.OutputLevel = 1
from Configurables import PrintMCTree
pmc = PrintMCTree()
pmc.ParticleNames = [ "B0", "B~0" ]
########################################################################
#
# DaVinci
#
from Configurables import DaVinci
DaVinci().EvtMax = 100
DaVinci().SkipEvents = 0
DaVinci().DataType = "2010"
DaVinci().Simulation = True
#DaVinci().CondDBtag = 'MC09-20100827-vc-md100'
DaVinci().TupleFile = "DecayTreeTuple.root" # Ntuple
DaVinci().MoniSequence = [ tuple, evtTuple, mcTuple ] # , pmc ]
DaVinci().appendToMainSequence( [ sc.sequence() ] )
DaVinci().CondDBtag="sim-20100715-vc-md100"
DaVinci().DDDBtag="head-20100624"
from PRConfig import TestFileDB
TestFileDB.test_file_db["MC2010_BdJPsiKs"].run(configurable=DaVinci(),withDB=False)
<?xml version="1.0" ?>
<!--
(c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration
This software is distributed under the terms of the GNU General Public
Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".
In applying this licence, CERN does not waive the privileges and immunities
granted to it by virtue of its status as an Intergovernmental Organization
or submit itself to any jurisdiction.
-->
<!DOCTYPE extension PUBLIC '-//QM/2.3/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'>
<extension class="GaudiTest.GaudiExeTest" kind="test">
<argument name="program"><text>gaudirun.py</text></argument>
<argument name="args"><set>
<text>-T</text>
<text>$DAVINCITESTSROOT/tests/options/DVTestDecayTreeTuple-MC2010.py</text>
<text>$DAVINCITESTSROOT/tests/options/EnableFPEAuditor.py</text>
</set></argument>
<argument name="validator"><text>
findReferenceBlock("""
Tuple SUCCESS Number of counters : 4
| Counter | # | sum | mean/eff^* | rms/err^* | min | max |
| "# Phys/BetaSBd2JpsiKsDetachedLine" | 100 | 11 | 0.11000 | 0.31289 | 0.0000 | 1.0000 |
| "# input particles" | 100 | 11 | 0.11000 | 0.31289 | 0.0000 | 1.0000 |
|*"#accept" | 100 | 11 |( 11.0000 +- 3.12890 )%| ------- | ------- |
| "Event" | 100 | 100 | 1.0000 | 0.0000 | 1.0000 | 1.0000 |
""", stdout, result, causes,
signature_offset = 0, id="Tuple")
findReferenceBlock("""
EventTuple SUCCESS Number of counters : 1
| Counter | # | sum | mean/eff^* | rms/err^* | min | max |
| "Event" | 100 | 100 | 1.0000 | 0.0000 | 1.0000 | 1.0000 |
""", stdout, result, causes, signature_offset = 0, id="EventTuple")
findReferenceBlock("""
MCTuple SUCCESS Number of counters : 2
| Counter | # | sum | mean/eff^* | rms/err^* | min | max |
|*"#accept" | 100 | 99 |( 99.0000 +- 0.994987 )%| ------- | ------- |
| "Event" | 100 | 100 | 1.0000 | 0.0000 | 1.0000 | 1.0000 |
""", stdout, result, causes, signature_offset = 0, id="MCTuple")
countErrorLines({"FATAL":0})
</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