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

Merge branch 'dev-flavtag-update-qmtest' into '2018-patches'

Update Flavour Tagging qmtest files

See merge request !205

(cherry picked from commit 4368c509)

6379dc49 Update FT qmtests for new FT tunings
e239af3a Update reference file and use TestTuning
b46d4425 Remove debug-level-depending reference output
parent 37a428df
No related branches found
No related tags found
2 merge requests!1103Draft: Add AnalysisHelpers to DaVinci Stack,!208Cherry-pick MR !205 to master branch
"""
Example Options for BTagging algorithm
@author Marco Musy, Kevin Heinicke
@date 2010-09-29, 2018-05-03
"""
from Gaudi.Configuration import *
import GaudiPython
from Configurables import GaudiSequencer
# some selections
from Configurables import CheatedSelection, BDecayTool, MCDecayFinder
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
myDecay = '[B+ -> (J/psi(1S) => mu+ mu- ) K+]cc'
cheatsel = CheatedSelection("CheatedSelection")
cheatsel.Inputs = [ "Phys/TaggingPions" ]
cheatsel.AssociatorInputData = [ "Phys/CheatedSelection/Particles" ]
cheatsel.OutputLevel = 5
cheatsel.addTool( BDecayTool )
cheatsel.BDecayTool.addTool( MCDecayFinder )
cheatsel.BDecayTool.MCDecayFinder.Decay = myDecay
# setup tagging
location = "Phys/CheatedSelection"
from Configurables import BTagging, BTaggingTool, BTaggingChecker
from FlavourTagging.Tunings import applyTuning
tag = BTagging("BTagging")
tag.Inputs = [ location ]
#tag.OutputLevel = 5
tag.addTool( BDecayTool )
tag.BDecayTool.addTool( MCDecayFinder )
tag.BDecayTool.MCDecayFinder.Decay = myDecay
tag.addTool( BTaggingTool )
applyTuning(tag.BTaggingTool, 'TestTuning')
tag.BTaggingTool.AssocPVCriterion = 'PVbyIP' # needed by CheatedSelection
# Flavour tagging Checker
tagcheck = BTaggingChecker("BTaggingChecker")
tagcheck.Inputs = [ location ]
tagcheck.TagsLocation = location+"/FlavourTags"
# tagcheck.OutputLevel = DEBUG
tagcheck.addTool( BDecayTool )
tagcheck.BDecayTool.addTool( MCDecayFinder )
tagcheck.BDecayTool.MCDecayFinder.Decay = myDecay
MessageSvc().Format = "% F%40W%S%7W%R%T %0W%M"
# standard configuration
from Configurables import DaVinci
DaVinci().EvtMax = 1000 # Number of events
DaVinci().SkipEvents = 0 # Events to skip
DaVinci().PrintFreq = 100
DaVinci().DataType = "2012"
DaVinci().CondDBtag = 'sim-20121025-vc-mu100'
DaVinci().DDDBtag = "dddb-20120831"
DaVinci().Simulation = True
from Configurables import StoreExplorerAlg, PrintDecayTree
PrintDecayTree().Inputs = [ location ]
DaVinci().MoniSequence = [
cheatsel,
tag,
tagcheck,
] # The algorithms
#from GaudiConf import IOHelper
#IOHelper().inputFiles(['PFN:root://eoslhcb.cern.ch//eos/lhcb/freezer/lhcb/MC/2012/ALLSTREAMS.DST/00021062/0000/00021062_00000001_1.allstreams.dst']) # Bu2JpsiK
importOptions( '$PRCONFIGOPTS/DaVinci/FlavourTagging/MC12-B2JPsiMuMuK.py' )
appMgr = GaudiPython.AppMgr()
appMgr.run( DaVinci().EvtMax )
......@@ -4,34 +4,29 @@
<argument name="program"><text>python</text></argument>
<argument name="timeout"><integer>3600</integer></argument>
<argument name="args"><set>
<text>../options/Tagging/DVTestTagging-MC12.py</text>
<text>../options/Tagging/DVTestTagging-Summer2017Opt-Run1.py</text>
</set></argument>
<argument name="validator"><text>
findReferenceBlock("""
BTagging SUCCESS #ERRORS = 1 Message = 'Tagging Tool returned error.'
BTaggingChecker INFO =======================================================
BTaggingChecker INFO WARNING: The following numbers do not represent the correct tagging powers.
BTaggingChecker INFO Summary: EXCLUSIVE TAGGING PERFORMANCE
BTaggingChecker INFO Category EFF. Etag Wrong TF r w
BTaggingChecker INFO 1 Category 2.4+-1.6 14+-1.9 29+-6.6 34 14
BTaggingChecker INFO 2 Category 0.77+-0.92 11+-1.7 37+-7.8 24 14
BTaggingChecker INFO 3 Category 2.1+-1.2 4.1+-1.1 14+-9.4 12 2
BTaggingChecker INFO 4 Category 1.6+-1 2.6+-0.86 11+-10 8 1
BTaggingChecker INFO 5 Category 1.5+-0.65 1.5+-0.65 0+-0 5 0
BTaggingChecker INFO ---------------------------------------------------------
BTaggingChecker INFO ** OS muon 0.87+-0.91 3.5+-0.99 25+-12 9 3
BTaggingChecker INFO ** OS elec 1.3+-0.94 2.3+-0.81 12+-12 7 1
BTaggingChecker INFO ** OS kaon 2.4+-1.6 13+-1.8 28+-6.8 31 12
BTaggingChecker INFO ** SS kaon 0.15+-0.4 2.3+-0.81 62+-17 3 5
BTaggingChecker INFO ** SS pion 1.4+-1.2 7.3+-1.4 28+-9 18 7
BTaggingChecker INFO ** VertexCh 3.9+-1.9 17+-2 26+-5.7 43 15
BTaggingChecker INFO ** OS nnetkaon 3.2+-1.8 21+-2.2 31+-5.4 50 22
BTaggingChecker INFO ** SS nnetkaon 1.2+-1.2 15+-2 64+-6.6 19 34
BTaggingChecker INFO ** OS Charm 1.2+-0.58 1.2+-0.58 0+-0 4 0
BTaggingChecker INFO ** OS muon 0.874636+-0.909124 3.49854+-0.992118 25+-12.5 9 3
BTaggingChecker INFO ** OS elec 1.31195+-0.937816 2.33236+-0.814941 12.5+-11.6927 7 1
BTaggingChecker INFO ** OS kaon 2.33884+-1.53195 13.1195+-1.82294 28.8889+-6.7566 32 13
BTaggingChecker INFO ** SS kaon 0.374844+-0.649362 8.16327+-1.4784 60.7143+-9.22962 11 17
BTaggingChecker INFO ** SS pion 1.41108+-1.18357 7.28863+-1.4036 28+-8.97998 18 7
BTaggingChecker INFO ** VertexCh 3.4842+-1.85224 17.7843+-2.06466 27.8689+-5.74058 44 17
BTaggingChecker INFO ** OS nnetkaon 2.1026+-1.53339 44.0233+-2.68039 39.0728+-3.97059 92 59
BTaggingChecker INFO ** SS nnetkaon 0.419301+-0.696782 51.895+-2.69781 54.4944+-3.73249 81 97
BTaggingChecker INFO ** OS Charm 0.874636+-0.909124 3.49854+-0.992118 25+-12.5 9 3
BTaggingChecker INFO ---------------------------------------------------------
BTaggingChecker INFO Tagging efficiency = 33 +/- 2.5 %
BTaggingChecker INFO Wrong Tag fraction = 25 +/- 4.2 %
BTaggingChecker INFO EFFECTIVE COMB. TE = 8.3 +/- 2.5 % (Total events= 343)
BTaggingChecker SUCCESS =========================================================
BTaggingChecker INFO Tagging efficiency = 0 +/- 0 %
BTaggingChecker INFO Wrong Tag fraction = -nan +/- -nan %
BTaggingChecker INFO EFFECTIVE COMB. TE = 0 +/- 0 % (Total events= 343)
""", stdout, result, causes, signature_offset = 1)
countErrorLines({"FATAL":0})
</text></argument>
......
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