Using TisTos software with Stripping MicroDSTs

Introduction

This page is intended for people who wish to use TisTos software for MicroDSTs created in official Stripping. Code examples are given for the most common use case - use of TupleToolTISTOS in DecayTreeTuple.

This page does not try to explain problems related to this topic in general. An older page goes a bit more in depth and may be useful for people using private MicroDSTs who may have to customize their setup.

MDTS created by Stripping 17-17b, DV v29r3

Use DaVinci v29r3.

You may get some warning if you use TupleToolEventInfo, but this is from a misconfiguration of the ODIN decoder, I think this needs a newer davinci to avoid.

from Gaudi.Configuration import *
stream="Leptonic" # depends on your stream!                                                                                                                                                                                             
locationRoot = "/Event/" + stream + "/"
loc = "Phys/MicroDSTDiMuonIncLine" # location of your particles within the stream                                                                                                                                                       

# Set-up non-standard location for DecayTreeTuple
#See DaVinciTutorial6 for Decay tree tuple
from DecayTreeTuple.Configuration import *
                                                                                   

                                                           
tuple = DecayTreeTuple("MyDecayTreeTuple",OutputLevel=3)
tuple.InputLocations = [ loc ]
tuple.RootInTES = locationRoot
tuple.ToolList =  ["TupleToolEventInfo","TupleToolGeometry","TupleToolTrigger" ]
tuple.Decay = "J/psi(1S) -> ^mu- ^mu+"

#See DaVinciTutorial7 for how this works...
tttt = tuple.addTupleTool("TupleToolTISTOS")
tttt.VerboseL0 = True
tttt.VerboseHlt1 =True
tttt.VerboseHlt2 = True
tttt.TriggerList = [
'L0MuonDecision',
'L0DiMuonDecision',
'Hlt1SingleMuonNoIPL0Decision',
'Hlt1DiMuonNoIPL0DiDecision',
'Hlt2UnbiasedDiMuonDecision'
'Hlt1TrackAllL0',
'Hlt1TrackMuon',
'Hlt1DiMuonHighMass',
'Hlt2DiMuonJPsi',
'Hlt2TopoMu2BodyBBDT',
'Hlt2TopoMu3BodyBBDT',
'Hlt2DiMuonUnbiasedJPsiDecision',
]

from Configurables import DaVinci
DaVinci().EvtMax=-1
DaVinci().DataType="2011"
DaVinci().HistogramFile = "DVHistos.root"
DaVinci().UserAlgorithms = [setup]
DaVinci().TupleFile = "strip17.root"
DaVinci().InputType='MDST'

# This is Stripping 17 file
EventSelector().Input   = [
"   DATAFILE='root://castorlhcb.cern.ch//castor/cern.ch/grid/lhcb/LHCb/Collision11/LEPTONIC.MDST/00012735/0000/00012735_00000034_1.leptonic.mdst?svcClass=lhcbdisk' TYP='POOL_ROOTTREE' OPT='READ'" ]

MDTS created by Stripping 17, DV v29r1

Use DaVinci v29r1.

from Gaudi.Configuration import *
stream="Leptonic" # depends on your stream!                                                                                                                                                                                             
locationRoot = "/Event/" + stream + "/"
loc = "Phys/MicroDSTDiMuonIncLine" # location of your particles within the stream                                                                                                                                                       

# Set-up non-standard location for DecayTreeTuple
#See DaVinciTutorial6 for Decay tree tuple
from DecayTreeTuple.Configuration import *
                                                                                                                                              
tuple = DecayTreeTuple("MyDecayTreeTuple",OutputLevel=3)
tuple.InputLocations = [ loc ]
tuple.RootInTES = locationRoot
tuple.ToolList =  ["TupleToolEventInfo","TupleToolGeometry","TupleToolTrigger" ]
tuple.Decay = "J/psi(1S) -> ^mu- ^mu+"

#See DaVinciTutorial7 for how this works...
tttt = tuple.addTupleTool("TupleToolTISTOS")
tttt.VerboseL0 = True
tttt.VerboseHlt1 =True
tttt.VerboseHlt2 = True
tttt.TriggerList = [
'L0MuonDecision',
'L0DiMuonDecision',
'Hlt1SingleMuonNoIPL0Decision',
'Hlt1DiMuonNoIPL0DiDecision',
'Hlt2UnbiasedDiMuonDecision'
'Hlt1TrackAllL0',
'Hlt1TrackMuon',
'Hlt1DiMuonHighMass',
'Hlt2DiMuonJPsi',
'Hlt2TopoMu2BodyBBDT',
'Hlt2TopoMu3BodyBBDT',
'Hlt2DiMuonUnbiasedJPsiDecision',
]

from Configurables import L0TriggerTisTos,TriggerTisTos
tttt.addTool(L0TriggerTisTos)
tttt.addTool(TriggerTisTos)

tttt.L0TriggerTisTos.UseParticle2LHCbIDsMap = 2
tttt.TriggerTisTos.UseParticle2LHCbIDsMap = 2

rawEventLoc=locationRoot + "DAQ/RawEvent"

from Configurables import RawEventSelectiveCopy
rawCopy = RawEventSelectiveCopy("CopyRawEvent")
rawCopy.InputRawEventLocation = "/Event/Trigger/RawEvent"
rawCopy.OutputRawEventLocation = rawEventLoc
rawCopy.RawBanksToCopy = [ "ODIN", "HltSelReports" ,
                                     "HltDecReports",
                                     "L0Calo",
                                     "L0CaloFull",
                                     "L0DU",
                                     "L0Muon",
                                     "L0MuonProcCand",
                                     "L0PU",
                                     "HltRoutingBits" ]

from Configurables import CopyODIN
CopyODIN().OutputPrefix= stream

from Configurables import (OdinTimeDecoder,ODINDecodeTool)
OdinTimeDecoder().addTool( ODINDecodeTool, 'ODINDecodeTool' )
OdinTimeDecoder().ODINDecodeTool.RawEventLocation = "/Event/Trigger/RawEvent"

from Configurables import EventNodeKiller
eventNodeKiller = EventNodeKiller('DAQkiller')
eventNodeKiller.Nodes = ['DAQ']

setup= GaudiSequencer( "MySeq", Members = [eventNodeKiller,CopyODIN(),rawCopy, tuple] )

from Configurables import DaVinci
DaVinci().EvtMax=-1
DaVinci().DataType="2011"
DaVinci().HistogramFile = "DVHistos.root"
DaVinci().UserAlgorithms = [setup]
DaVinci().TupleFile = "strip17.root"
DaVinci().InputType='MDST'

from MicroDSTConf.TriggerConfUtils import configureL0AndHltDecoding
configureL0AndHltDecoding(locationRoot)

# This is Stripping 17 file
EventSelector().Input   = [
"   DATAFILE='root://castorlhcb.cern.ch//castor/cern.ch/grid/lhcb/LHCb/Collision11/LEPTONIC.MDST/00012735/0000/00012735_00000034_1.leptonic.mdst?svcClass=lhcbdisk' TYP='POOL_ROOTTREE' OPT='READ'" ]

MDTS created by Stripping 12b - 16.

Use DaVinci v29r1 (for Stripping 12b you can also use v26r3p2, but for all 2011 data use v29r1).

from Gaudi.Configuration import *
locationRoot = "/Event/Leptonic/"  # depends on your stream!                                                                                                                                                                            
loc = "Phys/MicroDSTDiMuonIncLine" # location of your particles within the stream                                                                                                                                                       

# Set-up non-standard location for DecayTreeTuple, See DaVinciTutorial6
from DecayTreeTuple.Configuration import *
tuple = DecayTreeTuple("MyDecayTreeTuple",OutputLevel=3)
tuple.InputLocations = [ loc ]
tuple.RootInTES = locationRoot
tuple.ToolList =  ["TupleToolEventInfo","TupleToolGeometry","TupleToolTrigger"]
tuple.Decay = "J/psi(1S) -> ^mu- ^mu+"

#See DaVinciTutorial7 for how this works...

tttt=tuple.addTupleTool("TupleToolTISTOS")
tttt.VerboseL0 = True
tttt.VerboseHlt1 =True
tttt.VerboseHlt2 = True
tttt.TriggerList = [
'L0MuonDecision',
'L0DiMuonDecision',
'Hlt1SingleMuonNoIPL0Decision',
'Hlt1DiMuonNoIPL0DiDecision',
'Hlt2UnbiasedDiMuonDecision'
'Hlt1TrackAllL0',
'Hlt1TrackMuon',
'Hlt1DiMuonHighMass',
'Hlt2DiMuonJPsi',
'Hlt2TopoMu2BodyBBDT',
'Hlt2TopoMu3BodyBBDT',
'Hlt2DiMuonUnbiasedJPsiDecision',
]


from Configurables import L0TriggerTisTos,TriggerTisTos
tttt.addTool(L0TriggerTisTos)
tttt.addTool(TriggerTisTos)
tttt.L0TriggerTisTos.UseParticle2LHCbIDsMap = 2
tttt.TriggerTisTos.UseParticle2LHCbIDsMap = 2

setup= GaudiSequencer( "MySeq", Members = [tuple] )

from Configurables import DaVinci
DaVinci().EvtMax=-1
DaVinci().DataType="2010"
DaVinci().HistogramFile = "DVHistos.root"
DaVinci().UserAlgorithms = [setup]
DaVinci().TupleFile = "strip12b.root"
DaVinci().InputType='MDST'

from MicroDSTConf.TriggerConfUtils import configureL0AndHltDecoding
configureL0AndHltDecoding(locationRoot)

# This is Stripping 12b file:
EventSelector().Input   = [
"   DATAFILE='root://castorlhcb.cern.ch//castor/cern.ch/grid/lhcb/data/2010/LEPTONIC.MDST/00008393/0000/00008393_00000938_1.leptonic.mdst?svcClass=lhcbdisk' TYP='POOL_ROOTTREE' OPT='READ'"]

-- TomaszSkwarnicki - 01-Nov-2011

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r6 - 2012-05-14 - TomaszSkwarnicki
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    LHCb All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback