def configure(year, mc): """General configuration of DaVinci options. Keyword arguments: year -- One of lc2pxx.config.years mc -- True if booking MC ntuples, else false """ dv = DaVinci() # Output ntuple name dv.TupleFile = "DVntuple.root" # Process all events dv.EvtMax = -1 # Print status every 1000 events dv.PrintFreq = 1000 # Number of events to skip at the beginning of each file dv.SkipEvents = 0 dv.DataType = str(year) dv.Simulation = mc # Collision streams for Charm are on microDST, and in MC if not mc: dv.InputType = "MDST" # See "Question about microDST and RootInTES" in lhcb-davinci dv.RootInTES = "/Event/Charm" # Add a GetIntegratedLuminosity/LumiTuple TTree to output, but not in MC dv.Lumi = not mc
def configure(year, mc, input_type, n_events, root=None, tfn=None): """General configuration of DaVinci object. Keyword arguments: year -- One of (2011, 2012) mc -- True if creating Monte Carlo ntuples, else False """ dv = DaVinci() # Stripping output on CHARMCOMPLETEEVENT.DST, MC on ALLSTREAMS.DST dv.InputType = input_type # Output ntuple name dv.TupleFile = 'DVntuple.root' # Print status every 1000 events dv.PrintFreq = 1000 dv.EvtMax = n_events # Year of data taking dv.DataType = str(year) # Is the data from simulation dv.Simulation = mc # Add a GetIntegratedLuminosity/LumiTuple TTree to output if appropriate dv.Lumi = not mc if root is not None: dv.RootInTES = root if tfn is not None: dv.TupleFile = tfn
#'/lhcb/LHCb/Collision12/DIMUON.DST/00020198/0001/00020198_00014253_1.dimuon.dst', #'/lhcb/LHCb/Collision12/DIMUON.DST/00020198/0001/00020198_00014185_1.dimuon.dst' ] input = s20 # ## Input data from GaudiConf import IOHelper PFN = 'PFN:root://eoslhcb.cern.ch//eos/lhcb/grid/prod' ioh = IOHelper() ioh.inputFiles([PFN + i for i in input]) from Configurables import DaVinci davinci = DaVinci() ##davinci.EvtMax = 100000 davinci.PrintFreq = 100 davinci.EvtMax = 10000 ## davinci.EvtMax = 1000 # davinci.PrintFreq = 1 # davinci.SkipEvents = 37890 # davinci.EvtMax = 20 # davinci.PrintFreq = 100 # davinci.SkipEvents = 1 # davinci.EvtMax = 1000
_jpsiFilter.OutputPlots.Histos = { "P/1000": ('momentum', 0, 150), "PT/1000": ('pt_%1%', 0, 5, 750), "M": ('mass in MeV_%1%_%2%_%3%', 2.8 * Units.GeV, 3.2 * Units.GeV) } # JpsiFilterSel = Selection(name='JpsiFilterSel', Algorithm=_jpsiFilter, RequiredSelections=[JpsiSel]) JpsiSeq = SelectionSequence('SeqJpsi', TopSelection=JpsiFilterSel) seq = JpsiSeq.sequence() dv = DaVinci() dv.PrintFreq = 10 dv.HistogramFile = "DVHistos_Strip.root" dv.EvtMax = -1 dv.DataType = "MC09" dv.Simulation = True dv.RedoMCLinks = False dv.UserAlgorithms = [seq] dv.InputType = 'DST' # MC09 #dv.Input = [" DATAFILE='castor://castorlhcb.cern.ch:9002/?svcClass=lhcbdata&castorVersion=2&path=/castor/cern.ch/grid/lhcb/MC/MC09/DST/00004879/0000/00004879_00000001_1.dst' TYP='POOL_ROOTTREE' OPT='READ'"] dv.Input = [ "DATAFILE='PFN:/castor/cern.ch/user/j/jpalac/StripDST/MC09/DaVinci_v24r3p1/Sel.Jpsi.dst' TYP='POOL_ROOTTREE' OPT='READ'" ] ApplicationMgr().ExtSvc += ["NTupleSvc"] ApplicationMgr().HistogramPersistency = "ROOT"
evttuple.TupleName = "EventInfo" dv = DaVinci() dv.DataType = "2010" dv.Simulation = False dv.EvtMax = -1 dv.TupleFile = 'b2hh_stripped.root' dv.PrintFreq = 100 condDB = CondDB() condDB.UseOracle = True dv.DDDBtag = "head-20100518" dv.CondDBtag = "head-20100715" dv.Lumi = True dv.WriteFSR = True
import sys import GaudiPython as GP from GaudiConf import IOHelper from Configurables import (LHCbApp, ApplicationMgr, DataOnDemandSvc, DecodeRawEvent, CondDB, DaVinci) ## Copypasted from LHCb Starterkit: ## (http://lhcb.github.io/first-analysis-steps/05-interactive-dst.html) appConf = ApplicationMgr() dv = DaVinci() dv.DataType = '2015' dre = DecodeRawEvent() dre.DataOnDemand = True lhcbApp = LHCbApp() dv.PrintFreq = 1000000 # Only results from FT checking loop. lhcbApp.Simulation = False CondDB().Upgrade = True dv.IgnoreDQFlags = True inputFiles = [sys.argv[-1]] stream = str(sys.argv[-2]) IOHelper('ROOT').inputFiles(inputFiles) appMgr = GP.AppMgr() evt = appMgr.evtsvc() appMgr.run(1) def advance(decision): """Advance until stripping decision is true, returns
] input = s20 # ## Input data from GaudiConf import IOHelper PFN = 'PFN:root://eoslhcb.cern.ch//eos/lhcb/grid/prod' ioh = IOHelper() ioh.inputFiles ( [ PFN + i for i in input ] ) from Configurables import DaVinci davinci = DaVinci() ##davinci.EvtMax = 100000 davinci.PrintFreq = 100 davinci.EvtMax = 10000 ## davinci.EvtMax = 1000 # davinci.PrintFreq = 1 # davinci.SkipEvents = 37890 # davinci.EvtMax = 20 # davinci.PrintFreq = 100 # davinci.SkipEvents = 1 # davinci.EvtMax = 1000