Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DaVinci
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LHCb
DaVinci
Commits
5a9e413f
Commit
5a9e413f
authored
4 years ago
by
Davide Fazzini
Browse files
Options
Downloads
Patches
Plain Diff
update dtfdict QMtest
parent
272f2084
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!1103
Draft: Add AnalysisHelpers to DaVinci Stack
,
!405
DV tests update
Pipeline
#1721107
passed
4 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
DaVinciTests/tests/options/dtfdict.py
+27
-17
27 additions, 17 deletions
DaVinciTests/tests/options/dtfdict.py
DaVinciTests/tests/qmtest/dtfdict.qms/test_dtfdict.qmt
+4
-1
4 additions, 1 deletion
DaVinciTests/tests/qmtest/dtfdict.qms/test_dtfdict.qmt
with
31 additions
and
18 deletions
DaVinciTests/tests/options/dtfdict.py
+
27
−
17
View file @
5a9e413f
...
...
@@ -14,7 +14,7 @@
Test of the DFTDict module
"""
__author__
=
"
Alessio PIUCCI alessio.piucc
i@cern.ch
"
__author__
=
"
Davide Fazzini davide.fazzin
i@cern.ch
"
from
Configurables
import
DaVinci
...
...
@@ -29,13 +29,14 @@ from PhysSelPython.Wrappers import DataOnDemand
from
Configurables
import
TupleToolDecayTreeFitter
,
TupleToolDecay
,
TupleToolKinematic
from
Configurables
import
LoKi__Hybrid__DictOfFunctors
,
LoKi__Hybrid__Dict2Tuple
from
Configurables
import
LoKi__Hybrid__DTFDict
as
DTFDict
from
Configurables
import
CondDB
def
get_selection_sequence
(
name
):
"""
Get the selection from stripping stream
"""
alg
=
FilterDesktop
(
'
SelFilterFor{}B2D
'
.
format
(
name
))
alg
.
Code
=
'
ALL
'
reqSels
=
[
DataOnDemand
(
Location
=
'
Phys/
Lb2LcDD2HHHPIDBeauty2Charm
Line/Particles
'
)]
reqSels
=
[
DataOnDemand
(
Location
=
'
/
Phys/
BetaSBd2JpsiKstarDetached
Line/Particles
'
)]
sel
=
Selection
(
'
Sel
'
+
name
,
Algorithm
=
alg
,
RequiredSelections
=
reqSels
)
return
SelectionSequence
(
'
SelSeq
'
+
name
,
TopSelection
=
sel
)
...
...
@@ -43,50 +44,59 @@ def get_selection_sequence(name):
####################
# some options
DaVinci
().
Simulation
=
False
DaVinci
().
Lumi
=
True
DaVinci
().
DataType
=
'
2012
'
DaVinci
().
EvtMax
=
-
1
# Number of events
DaVinci
().
PrintFreq
=
10
# Events to skip
DaVinci
().
DataType
=
"
Upgrade
"
# Must be given
DaVinci
().
Simulation
=
True
DaVinci
().
InputType
=
'
LDST
'
DaVinci
().
Lumi
=
False
CondDB
().
Upgrade
=
True
DaVinci
().
CondDBtag
=
"
sim-20171127-vc-md100
"
DaVinci
().
DDDBtag
=
"
dddb-20171126
"
from
Configurables
import
L0Conf
L0Conf
().
EnsureKnownTCK
=
False
#for MDST
DaVinci
(
StrippingStream
=
'
Bhadron
'
,
InputType
=
'
M
DST
'
)
DaVinci
(
StrippingStream
=
'
AllStreams
'
,
InputType
=
'
L
DST
'
)
DaVinci
().
EvtMax
=
1000
DaVinci
().
TupleFile
=
'
test_DFTDict.root
'
# define the sequence
seq
=
GaudiSequencer
(
'
My
Lb2LcDs
DTTupleSeq
'
)
seq
=
GaudiSequencer
(
'
My
Bd2KstMuMu
DTTupleSeq
'
)
sel
=
get_selection_sequence
(
'
Lb2LcDs
'
)
sel
=
get_selection_sequence
(
'
Bd2JpsiKstarSel
'
)
seq
.
Members
+=
[
sel
.
sequence
()]
tuple_input
=
sel
.
outputLocation
()
print
"
sequence test: passed
"
# make a tuple
tpl
=
DecayTreeTuple
(
'
Lb2LcDsDTTuple
'
)
tpl
=
DecayTreeTuple
(
"
Bd2JpsiKstar
"
)
tpl
.
Inputs
=
[
tuple_input
]
tpl
.
ToolList
=
[
'
TupleToolKinematic
'
]
tpl
.
Decay
=
'
[Lambda_b0 -> ^(Lambda_c+
-> ^
p
+ ^
K- ^pi+) ^(D-
-> ^K+
^K-
^pi-)]CC
'
tpl
.
Decay
=
"
[B0 -> ^(J/psi(1S)
-> ^
mu
+ ^
mu-) ^(K*(892)0
-> ^K+ ^pi-)]CC
"
# add a branch
tpl
.
addBranches
({
"
Lb
"
:
"
[
Lambda_b0 -> Lambda_c+ D-
]CC
"
})
tpl
.
addBranches
({
"
B0
"
:
"
[
B0 -> J/psi(1S) K*(892)0
]CC
"
})
tpl
.
Lb
.
ToolList
=
[
"
TupleToolDecayTreeFitter/Cons
"
]
# fit with mass constraint
tpl
.
Lb
.
addTool
(
TupleToolDecayTreeFitter
(
"
Cons
"
))
tpl
.
B0
.
ToolList
=
[
"
TupleToolDecayTreeFitter/Cons
"
]
# fit with mass constraint
tpl
.
B0
.
addTool
(
TupleToolDecayTreeFitter
(
"
Cons
"
))
DictTuple
=
tpl
.
Lb
.
addTupleTool
(
LoKi__Hybrid__Dict2Tuple
,
"
DTFTuple
"
)
DictTuple
=
tpl
.
B0
.
addTupleTool
(
LoKi__Hybrid__Dict2Tuple
,
"
DTFTuple
"
)
DictTuple
.
addTool
(
DTFDict
,
"
Cons
"
)
DictTuple
.
Source
=
"
LoKi::Hybrid::DTFDict/Cons
"
DictTuple
.
NumVar
=
100
DictTuple
.
Cons
.
constrainToOriginVertex
=
True
DictTuple
.
Cons
.
daughtersToConstrain
=
[
"
Lambda_c+
"
,
"
D_s-
"
]
DictTuple
.
Cons
.
daughtersToConstrain
=
[
"
J/psi(1S)
"
,
"
K*(892)0
"
]
DictTuple
.
Cons
.
Substitutions
=
{
'
Lambda_b0 -> Lambda_c+ ^D
-
'
:
'
D_s-
'
,
'
Lambda_b~0 -> Lambda_c~- ^D+
'
:
'
D_s+
'
,
'
J/psi(1S) -> ^mu+ mu
-
'
:
'
e+
'
,
'
J/psi(1S) -> mu+ ^mu-
'
:
'
e-
'
,
}
print
"
LoKi__Hybrid__Dict2Tuple test: passed
"
...
...
This diff is collapsed.
Click to expand it.
DaVinciTests/tests/qmtest/dtfdict.qms/test_dtfdict.qmt
+
4
−
1
View file @
5a9e413f
...
...
@@ -15,6 +15,9 @@
<argument
name=
"args"
><set>
<text>
../options/dtfdict.py
</text>
<text>
--option
</text>
<text>
from PRConfig import TestFileDB; from Configurables import DaVinci; TestFileDB.test_file_db['
R14S20-bhadron.mdst
'].run(configurable=DaVinci())
</text>
<text>
from PRConfig import TestFileDB; from Configurables import DaVinci; TestFileDB.test_file_db['
Upgrade_Bd2KstarMuMu
'].run(configurable=DaVinci())
</text>
</set></argument>
<argument
name=
"validator"
><text>
countErrorLines({"FATAL":0, "ERROR":0})
</text></argument>
</extension>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment