Commit dfb87c2d authored by Patrick Koppenburg's avatar Patrick Koppenburg 🍃
Browse files

Merge branch 'DVtests_dpa12' into 'master'

DV tests update

See merge request !405
parents 448ddd13 b0b76bbd
Pipeline #1857346 passed with stage
in 18 seconds
......@@ -28,7 +28,7 @@ DaVinci().UserAlgorithms = [ ]
DaVinci().EvtMax = 0 # No running
DaVinci().SkipEvents = 0
DaVinci().PrintFreq = 1
DaVinci().DataType = '2009'
DaVinci().DataType = 'Upgrade'
DaVinci().Lumi = True
########################################################################
MessageSvc().Format = "% F%60W%S%7W%R%T %0W%M"
......
......@@ -3,6 +3,7 @@
! Responsible : DaVinci coordinator
! Purpose : QMTests for DaVinci
!-----------------------------------------------------------------------------
!======================= DaVinciTests v3r5 2016-04-21 ========================
- 2016-07-20
......
......@@ -40,10 +40,19 @@ DaVinci().HistogramFile = "DVStandardIntermediate.root"
# Most of this will be configured from Dirac
#
##############################################################################
from Configurables import CondDB
DaVinci().UserAlgorithms = [ CP ] # count them all
DaVinci().EvtMax = 500
DaVinci().DataType = "2015"
DaVinci().Simulation = False
DaVinci().InputType = "DST"
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"
MessageSvc().Format = "% F%60W%S%7W%R%T %0W%M"
from PRConfig import TestFileDB
TestFileDB.test_file_db["Upgrade_Bd2KstarMuMu"].run()
......@@ -13,7 +13,6 @@
syntax: gaudirun.py $DAVINCIMONITORSROOT/options/TestStandardIntermediateCuts.py
Author: Juan Palacios <palacios@physik.uzh.ch>
"""
##############################################################################
from DaVinci.Configuration import DaVinci
......@@ -26,12 +25,16 @@ List = []
for a,b in StandardIntermediate.locations.iteritems():
print "DVTestCommonParticles adding location", a
List.append(b) # ist of algorithms
List.append(b) # list of algorithms
DaVinci( UserAlgorithms = List,
EvtMax = 1,
DataType = "2010",
Simulation = False,
InputType = "DST" )
DataType = "Upgrade",
Simulation = True,
InputType = "LDST"
)
MessageSvc().Format = "% F%60W%S%7W%R%T %0W%M"
from PRConfig import TestFileDB
TestFileDB.test_file_db["Upgrade_Bd2KstarMuMu"].run()
......@@ -22,14 +22,17 @@ Test for DaVinci initialisation
"""
from Gaudi.Configuration import *
from Configurables import DaVinci
DaVinci().MainOptions = ""
DaVinci().UserAlgorithms = [ ]
DaVinci().EvtMax = 0 # No running
DaVinci().SkipEvents = 0
DaVinci().PrintFreq = 1
DaVinci().DataType = '2009'
DaVinci().DataType = 'Upgrade'
DaVinci().Simulation = False
DaVinci().Lumi = True
########################################################################
MessageSvc().Format = "% F%60W%S%7W%R%T %0W%M"
###############################################################################
# (c) Copyright 2020 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. #
###############################################################################
'''Test accessing candidates on Turbo mdst.'''
from Configurables import DaVinci, LoKi__HDRFilter
from GaudiConf import IOHelper
from PhysSelPython.Wrappers import AutomaticData, ValidBPVSelection, SelectionSequence
# 2018 Turbo data.
IOHelper('ROOT').inputFiles([
'PFN:root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/swtest/lhcb/LHCb/Collision18/CHARMTWOBODY.MDST/00075136/0000/00075136_00000005_1.charmtwobody.mdst',
'PFN:root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/swtest/lhcb/LHCb/Collision18/CHARMTWOBODY.MDST/00075136/0000/00075136_00000012_1.charmtwobody.mdst',
'PFN:root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/swtest/lhcb/LHCb/Collision18/CHARMTWOBODY.MDST/00075136/0000/00075136_00000026_1.charmtwobody.mdst',
])
# Configure the data settings.
DaVinci().TurboStream = 'Charmtwobody'
DaVinci().DataType = '2018'
DaVinci().DDDBtag = 'dddb-20190206-3'
DaVinci().CondDBtag = 'cond-20191004-3'
DaVinci().EvtMax = 1000
# Get particles from an HLT2 line and check that they have a valid BPV
line = 'Hlt2CharmHadDstp2D0Pip_D02KmPipTurbo'
data = AutomaticData(line + '/Particles')
validbpv = ValidBPVSelection([data])
selseq = SelectionSequence(line + 'Seq', TopSelection=validbpv)
DaVinci().UserAlgorithms.append(selseq.sequence())
DaVinci().EventPreFilters = [
LoKi__HDRFilter(
'PreFilter',
Code='HLT_PASS({0!r})'.format(line + 'Decision'),
Location='Hlt2/DecReports')
]
......@@ -60,7 +60,7 @@ for i in MassRanges :
SelJpsi = Selection('SelJpsi_'+name,
Algorithm = filter,
RequiredSelections = [ MyLooseJpsi ])
printer = PrintDecayTree("Print_"+name,
Inputs = [SelJpsi.outputLocation()])
......@@ -81,11 +81,17 @@ seq = dstWriter.sequence()
DaVinci().UserAlgorithms = [ seq ]
##############################################################################
DaVinci().EvtMax = 100
from Configurables import CondDB
DaVinci().EvtMax = 1000
DaVinci().PrintFreq = 100
# DaVinci().SkipEvents = 0
DaVinci().DataType = "2010"
DaVinci().Simulation = True
DaVinci().DataType = "Upgrade"
DaVinci().Simulation = True
DaVinci().InputType = 'LDST'
DaVinci().Lumi = False
CondDB().Upgrade = True
DaVinci().CondDBtag = "sim-20171127-vc-md100"
DaVinci().DDDBtag = "dddb-20171126"
########################################################################
MessageSvc().Format = "% F%60W%S%7W%R%T %0W%M"
##############################################################################
......@@ -95,7 +101,5 @@ MessageSvc().Format = "% F%60W%S%7W%R%T %0W%M"
#-- 13144006 - 1 files - 10000 events - 4.13 GBytes
# MC 2010 Beam3500GeV-VeloClosed-MagDown-Nu3
# bs->Jpsi, Phi
from Gaudi.Configuration import *
EventSelector().Input = [
"DATAFILE='PFN:root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/swtest/lhcb/swtest/MC2010_BsJPsiPhi_00008405_00000506_1.dst' TYP='POOL_ROOTTREE' OPT='READ'"]
from PRConfig import TestFileDB
TestFileDB.test_file_db["Upgrade_Bd2KstarMuMu"].run()
#!/usr/bin/env gaudirun.py
###############################################################################
# (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. #
###############################################################################
# -*- coding: utf-8 -*-
# =============================================================================
# @file
# Test for processing of MC-uDSTs
# @author Vanya BELYAEV Ivan.Belyaev@itep.ru
# @date 2017-05-16
# =============================================================================
from StandardParticles import StdTightKaons as kaons
from PhysConf.Selections import RebuildSelection
kaons = RebuildSelection ( kaons )
from PhysConf.Selections import CombineSelection
phi = CombineSelection (
'Phi' , ## the name
kaons , ## input selection(s)
## algorithm properties
DecayDescriptor = 'phi(1020) -> K+ K-' ,
CombinationCut = " AM < 1050*MeV " ,
MotherCut = " ( CHI2VX < 10 ) & ( M < 1045 * MeV )"
)
from PhysConf.Selections import FilterSelection
phi = FilterSelection (
"TruePhi" , ## the name
phi , ## input selection(s)
## algorithm properties
Code = "mcMatch('phi(1020) => K+ K-', 2 )" , ## use mcTruth for only long protoparticles
Preambulo = [ 'from LoKiPhysMC.functions import mcMatch' ] ,
)
## from PhysConf.Selections import PrintSelection
## phi = PrintSelection ( phi )
from PhysConf.Selections import FilterSelection
phi = FilterSelection (
"MassPhi" , ## the name
phi , ## input selection(s)
## algorithm properties
Code = "0 < monitor( M/GeV , 'MASSPHI', 'MassKK' , histo)" ,
Preambulo = [
'from LoKiCore.functions import monitor, Gaudi' ,
'histo = Gaudi.Histo1DDef( "mass(K+K-)" , 1. , 1.04 , 80 )'
]
)
from Configurables import DaVinci
daVinci = DaVinci (
InputType = 'MDST' ,
DataType = "2016" ,
Simulation = True ,
StrippingStream='AllStreams' ,
##
HistogramFile = "DVHistos.root" ,
##
CondDBtag = 'sim-20160820-vc-md100' ,
DDDBtag = 'dddb-20150724'
)
from PhysConf.Selections import SelectionSequence
seq = SelectionSequence( 'SEQ' , phi ).sequence()
## assume here the merge request !62
daVinci.UserAlgorithms = [ phi ]
daVinci.EvtMax = 2000
daVinci.Input = [
"DATAFILE='PFN:root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/swtest/lhcb/MC/2016/ALLSTREAMS.MDST/00054389/0000/00054389_00000078_3.AllStreams.mdst' SVC='Gaudi::RootEvtSelector' OPT='READ'",
]
# =============================================================================
# The END
# =============================================================================
###############################################################################
# (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. #
###############################################################################
"""Invalid configuration for running over Turbo data."""
from Configurables import DaVinci
dv = DaVinci()
dv.DataType = '2016'
dv.InputType = 'MDST'
dv.Turbo = True
# The absence of this setting should cause DaVinci to throw an exception
# dv.RootInTES = '/Event/Turbo'
###############################################################################
# (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. #
###############################################################################
"""Valid configuration for running over Turbo data.
We don't set InputType to MDST explicitly, but this should be done by the
DaVinci configuration.
"""
from Configurables import DaVinci
dv = DaVinci()
dv.DataType = '2016'
# This value should be set automatically as Turbo = True (although it's better
# to set it explicitly anyway)
# dv.InputType = 'MDST'
dv.Turbo = True
dv.RootInTES = '/Event/Turbo'
###############################################################################
# (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. #
###############################################################################
"""Valid configuration for running over Turbo data."""
from Configurables import DaVinci
dv = DaVinci()
dv.DataType = '2016'
dv.InputType = 'MDST'
dv.Turbo = True
dv.RootInTES = '/Event/Turbo'
......@@ -13,14 +13,30 @@
from Gaudi.Configuration import *
from Configurables import GaudiSequencer
from Configurables import DaVinci, PhysConf
from Configurables import CondDB
########################################################################
DaVinci().EvtMax = 100 # Number of events
DaVinci().PrintFreq = 10 # Events to skip
DaVinci().DataType = "2012" # Must be given
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"
DaVinci().HistogramFile = "dst-annpid.root"
########################################################################
from Configurables import L0Conf
L0Conf().EnsureKnownTCK=False
from Configurables import ANNGlobalPID__ChargedProtoANNPIDMoni
DaVinci().UserAlgorithms += [ ANNGlobalPID__ChargedProtoANNPIDMoni("ANNPIDMoni") ]
########################################################################
from PRConfig import TestFileDB
TestFileDB.test_file_db["Upgrade_Bd2KstarMuMu"].run()
###############################################################################
# (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. #
###############################################################################
########################################################################
from Gaudi.Configuration import *
from Configurables import GaudiSequencer
from Configurables import DaVinci, PhysConf
########################################################################
DaVinci().EvtMax = 1000 # Number of events
DaVinci().PrintFreq = 100 # Events to skip
DaVinci().DataType = "2012" # Must be given
DaVinci().HistogramFile = "udst-annpid.root"
DaVinci().InputType = "MDST"
########################################################################
from Configurables import ( ANNGlobalPID__ChargedProtoANNPIDMoni,
TESCheck, GaudiSequencer )
protoLoc = "/Event/Bhadron/Rec/ProtoP/Charged"
seq = GaudiSequencer("ANNPIDCheckSeq")
seq.Members += [
TESCheck( "CheckProtos",
Inputs = [protoLoc],
OutputLevel = 5,
Stop = False ),
ANNGlobalPID__ChargedProtoANNPIDMoni( "ANNPIDMoni",
ProtoParticleLocation = protoLoc )
]
DaVinci().UserAlgorithms = [seq]
......@@ -13,14 +13,30 @@
from Gaudi.Configuration import *
from Configurables import GaudiSequencer
from Configurables import DaVinci, PhysConf
from Configurables import CondDB
########################################################################
DaVinci().EvtMax = 100 # Number of events
DaVinci().PrintFreq = 10 # Events to skip
DaVinci().DataType = "2012" # Must be given
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"
DaVinci().HistogramFile = "dst-unpacking.root"
########################################################################
from Configurables import L0Conf
L0Conf().EnsureKnownTCK=False
from Configurables import TrackMonitor
DaVinci().UserAlgorithms += [ TrackMonitor() ]
########################################################################
from PRConfig import TestFileDB
TestFileDB.test_file_db["Upgrade_Bd2KstarMuMu"].run()
###############################################################################
# (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. #
###############################################################################
########################################################################
from Gaudi.Configuration import *
from Configurables import GaudiSequencer
from Configurables import DaVinci, PhysConf
########################################################################
DaVinci().EvtMax = 1000 # Number of events
DaVinci().PrintFreq = 100 # Events to skip
DaVinci().DataType = "2012" # Must be given
DaVinci().HistogramFile = "udst-unpacking.root"
DaVinci().InputType = "MDST"
########################################################################
from Configurables import DataObjectVersionFilter
DaVinci().UserAlgorithms += [
DataObjectVersionFilter( "CheckDecReports",
DataObjectLocation = "/Event/Strip/Phys/DecReports",
MaxVersion = 999,
OutputLevel = 3 ),
DataObjectVersionFilter( "CheckTracks",
DataObjectLocation = "/Event/Bhadron/Rec/Track/Best",
MaxVersion = 999 ),
DataObjectVersionFilter( "CheckVeloClusters",
DataObjectLocation = "/Event/Bhadron/Raw/Velo/Clusters",
MaxVersion = 999,
OutputLevel = 3 ),
DataObjectVersionFilter( "CheckCaloElectrons",
DataObjectLocation = "/Event/Bhadron/Rec/Calo/Electrons",
MaxVersion = 999,
OutputLevel = 3 ),
DataObjectVersionFilter( "CheckCaloPhotons",
DataObjectLocation = "/Event/Bhadron/Rec/Calo/Photons",
MaxVersion = 999,
OutputLevel = 3 ),
# DataObjectVersionFilter( "CheckLiteTTClusters",
# DataObjectLocation = "/Event/Bhadron/Raw/TT/LiteClusters",
# MaxVersion = 999,
# OutputLevel = 3 ),
# DataObjectVersionFilter( "CheckLiteITClusters",
# DataObjectLocation = "/Event/Bhadron/Raw/IT/LiteClusters",
# MaxVersion = 999,
# OutputLevel = 3 ),
# DataObjectVersionFilter( "CheckLiteVeloClusters",
# DataObjectLocation = "/Event/Bhadron/Raw/Velo/LiteClusters",
# MaxVersion = 999,
# OutputLevel = 3 ),
DataObjectVersionFilter( "CheckBhadronKaons",
DataObjectLocation = "/Event/Bhadron/Phys/StdAllNoPIDsKaons/Particles",
MaxVersion = 999,
OutputLevel = 3 ),
DataObjectVersionFilter( "CheckPVs",
DataObjectLocation = "/Event/Bhadron/Rec/Vertex/Primary",
MaxVersion = 999,
OutputLevel = 3 )
]
###############################################################################
# (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. #
###############################################################################
########################################################################
#
# Example Options for BTagging algorithm
#
# @author Marco Musy
# @date 2010-09-29
#
########################################################################
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
########################################################################
#
# Flavour tagging.
#
location = "Phys/CheatedSelection"
####
from Configurables import BTagging, BTaggingTool, BTaggingChecker, BDecayTool, MCDecayFinder
tag = BTagging("BTagging")
tag.Inputs = [ location ]
#tag.OutputLevel = 5
tag.addTool( BDecayTool )
tag.BDecayTool.addTool( MCDecayFinder )
tag.BDecayTool.MCDecayFinder.Decay = myDecay
tag.addTool( BTaggingTool )
tag.BTaggingTool.ChoosePVCriterium = "PVbyIP" #needed by CheatedSel
# Reco14
from FlavourTagging.Tunings import TuneTool
TuneTool(tag,"Stripping23")
# Flavour tagging Checker:
tagcheck = BTaggingChecker("BTaggingChecker")
tagcheck.Inputs = [ location ]
tagcheck.TagsLocation = location+"/FlavourTags"
#tagcheck.OutputLevel = 1
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"