Tags:
view all tags
########################################################################<br />from Gaudi.Configuration import *<br />from Configurables import DecayTreeTuple, PhysDesktop<br />from Configurables import CombineParticles, FilterDesktop<br />from Configurables import TupleToolTrigger, BackgroundCategory, TupleToolTISTOS<br />from Configurables import DaVinci,HltSelReportsDecoder,HltVertexReportsDecoder,HltDecReportsDecoder<br />from Configurables import CombineParticles, PhysDesktop<br />from PhysSelPython.Wrappers import Selection, SelectionSequence, DataOnDemand<br /><br />#<br /># MC matching<br />#<br /><br />matchkaonFromD0 = "(mcMatch('[D0 -> ^K- pi+]CC'))"<br />matchpionFromD0 = "(mcMatch('[D0 -> K- ^pi+]CC'))"<br />matchkaonFromKst = "(mcMatch('[K*(892)0 -> ^K+ pi-]CC'))"<br />matchpionFromKst = "(mcMatch('[K*(892)0 -> K+ ^pi-]CC'))"<br />matchD0 = "(mcMatch('Beauty => =^D0 K*(892)~0'))"<br />matchD0bar = "(mcMatch('Beauty => ^D~0 K*(892)0'))"<br />matchKst = "(mcMatch('Beauty => D~0 ^K*(892)0'))"<br />matchKstbar = "(mcMatch('Beauty => D0 ^K*(892)~0'))"<br /><br />#<br /># Create selection sequence<br />#<br /><br />_pions = DataOnDemand(Location='Phys/StdNoPIDsPions')<br />_kaons = DataOnDemand(Location='Phys/StdNoPIDsKaons')<br /><br />_d2hh = CombineParticles("d2hh")<br />_d2hh.DecayDescriptor = "[D0 -> K- pi+]cc"<br />_d2hh.DaughtersCuts = { "K-" : matchkaonFromD0 , "pi+" : matchpionFromD0 }<br />_d2hh.MotherCut = "(VFASPF(VCHI2/VDOF)<100)"<br />_d2hh.Preambulo = [<br /> "from LoKiPhysMC.decorators import *",<br /> "from PartProp.Nodes import CC" ]<br /><br />SelD2hh = Selection( "SelD2hh",<br /> Algorithm== _d2hh,<br /> RequiredSelections=[_pions,_kaons] ) <br /><br />_kst2hh = CombineParticles("kst2hh")<br />_kst2hh.DecayDescriptor = "[K*(892)0 -> K+ pi-]cc"<br />_kst2hh.DaughtersCuts = { "K-" : matchkaonFromKst , "pi+" : matchpionFromKst }<br />_kst2hh.MotherCut = "(VFASPF(VCHI2/VDOF)<100)"<br />_kst2hh.Preambulo = [<br /> "from LoKiPhysMC.decorators import *",<br /> "from PartProp.Nodes import CC" ]<br /><br />SelKst2hh = Selection( "SelKst2hh",<br /> Algorithm= _kst2hh,<br /> RequiredSelections=[_pions,_kaons] )<br /><br />_b2dkst = CombineParticles("b2dkst")<br />_b2dkst.DecayDescriptor = "[B0 -> D~0 K*(892)0]cc"<br />_b2dkst.DaughtersCuts = { "D0" : "("+matchD0+" | "+matchD0bar+")" , "K*(892)0" : "("+matchKst+" | "+matchKstbar+")" }<br />_b2dkst.MotherCut = "(VFASPF(VCHI2/VDOF)<100)"<br />_b2dkst.Preambulo = [<br /> "from LoKiPhysMC.decorators import *",<br /> "from PartProp.Nodes import CC" ]<br /><br />SelB2D0Kst = Selection( "SelB2D0Kst",<br /> Algorithm = _b2dkst,<br /> RequiredSelections=[SelD2hh,SelKst2hh] )<br /><br />SeqB2D0Kst = SelectionSequence('SeqB2D0Kst',TopSelection = SelB2D0Kst) <br /><br />#<br /># Make the tuple for validation<br />#<br /><br />B2D0Kst_FromMC_Tree = DecayTreeTuple("B2D0Kst_FromMC_Tree")<br />B2D0Kst_FromMC_Tree.InputLocations = ["/Event/Phys/B2D0Kstar"]<br />B2D0Kst_FromMC_Tree.Decay = "[[B0]cc => (^D~0 => ^K+ ^pi-) (^K*(892)0 => ^K+ ^pi-)]cc"<br />B2D0Kst_FromMC_Tree.ToolList = ["TupleToolKinematic",<br /> "TupleToolPid",<br /> "TupleToolGeometry",<br /> "TupleToolPrimaries",<br /> "TupleToolTrackInfo",<br /> "TupleToolPropertime"]<br />B2D0Kst_FromMC_Tree.UseLabXSyntax = True<br />B2D0Kst_FromMC_Tree.RevertToPositiveID = False<br /><br />#<br /># Write DST<br />#<br /><br />from Configurables import SelDSTWriter, DaVinci<br /><br />dstWriter = SelDSTWriter("B2D0Kst_FromMC_Writer",<br /> SelectionSequences = [SeqB2D0Kst],<br /> OutputFileSuffix = '/tmp/edsmith/B02D0Kst_MC2010magdown11164011') %RED%#actually a prefix, will be followed by ".SeqB2D0Kst.dst" %ENDCOLOR% #<br /># Configure DaVinci<br />#<br /><br />from Configurables import DaVinci<br />DaVinci().EvtMax = -1 # Number of events<br />DaVinci().SkipEvents = 0 # Events to skip<br />DaVinci().PrintFreq = 1000<br />DaVinci().DataType = "2010" # Default is "DC06"<br />DaVinci().Simulation = True<br />DaVinci().HistogramFile = "dummy_histos.root" # Histogram file<br />DaVinci().TupleFile = "dummy_tuple.root" # Ntuple<br />DaVinci().UserAlgorithms = [SeqB2D0Kst.sequence(),B2D0Kst_FromMC_Tree,dstWriter.sequence()]<br />#DaVinci().UserAlgorithms = [SeqB2D0Kst.sequence(),dstWriter.sequence()]<br />DaVinci().RedoMCLinks = True<br />DaVinci().EnableUnpack = True <br />DaVinci().CondDBtag = "sim-20100831-vc-mu100"<br />DaVinci().DDDBtag = "head-20100119"<br />DaVinci().MainOptions = '<DATA>.py' %RED%#here you put the data you want to make a dst from%ENDCOLOR% # Use the CondDB to get the right database tags <br />from Configurables import CondDB<br />CondDB(UseOracle = False, DisableLFC = True, IgnoreHeartBeat = True) -- Main.EdmundSmith - 2010-12-09
Edit
|
Attach
|
Watch
|
P
rint version
|
H
istory
:
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r1 - 2010-12-09
-
EdmundSmith
Home
Site map
Atlas web
CMS web
Computing web
Documentation web
PPDITForum web
LHCb web
PPDLabSpace web
Sandbox web
TWiki web
LHCb Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
Register User
Edit
Attach
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback