def stripping_sequence_nopids(): """Return a list of sequences to run and monitor NoPIDs stripping. The list contains three sequences: 1. StreamCharmFromBSemiNoPIDs StrippingConf, which runs all the semileptonic Lambda_c -> X stripping lines, but without PID cuts 2. Stripping report on the above 3. Algorithm that reports correlations in the above stripping lines Sequences 2 and 3 aren't strictly necessary, but are nice to have. The list can be run by DaVinci with DaVinci().appendToMainSequence(stripping_sequence_nopids()) """ stream = StrippingStream("StreamCharmFromBSemi") stream.appendLines( CharmFromBSemiAllLinesConf("CharmFromBSemi", confdict).lines() ) # Create stripping configuration from my stream conf = StrippingConf( Streams=[stream], MaxCandidates=2000, AcceptBadEvents=True, # Stripping reports already exist in the DST, # so put these ones somewhere fake HDRLocation="NowhereIsNowHere" ) # Extra reporting reporting = StrippingReport(Selections=conf.selections()) correlations = AlgorithmCorrelationsAlg(Algorithms=conf.selections()) return [conf.sequence(), reporting, correlations]
# Select my line MyStream = StrippingStream("MyStream") MyLines = [ 'StrippingPsiX0' ] for stream in streams: for line in stream.lines: if line.name() in MyLines: MyStream.appendLines( [ line ] ) # Configure Stripping from Configurables import ProcStatusCheck filterBadEvents = ProcStatusCheck() sc = StrippingConf( Streams = [ MyStream ], MaxCandidates = 2000, AcceptBadEvents = False, BadEventSelection = filterBadEvents ) ################ SelDSTWriterElements = { 'default' : stripDSTElements() } SelDSTWriterConf = { 'default' : stripDSTStreamConf() } #sc = StrippingConf(Streams = [StrippingPsiX0.stream]) if MODE == 'MC': dstWriter = SelDSTWriter( "MyDSTWriter", StreamConf = SelDSTWriterConf, MicroDSTElements = SelDSTWriterElements,
charmMicroDSTname = 'Charm' pidMicroDSTname = 'PID' bhadronMicroDSTname = 'Bhadron' mdstStreams = [ leptonicMicroDSTname,charmMicroDSTname,pidMicroDSTname,bhadronMicroDSTname ] dstStreams = [ "BhadronCompleteEvent", "CharmCompleteEvent", "Dimuon", "EW", "Semileptonic", "Calibration", "MiniBias", "Radiative" ] stripTESPrefix = 'Strip' from Configurables import ProcStatusCheck sc = StrippingConf( Streams = streams, MaxCandidates = 2000, AcceptBadEvents = False, BadEventSelection = ProcStatusCheck(), TESPrefix = stripTESPrefix, ActiveMDSTStream = True, Verbose = True, DSTStreams = dstStreams, MicroDSTStreams = mdstStreams ) # # Configure the dst writers for the output # enablePacking = True from DSTWriters.microdstelements import * from DSTWriters.Configuration import ( SelDSTWriter, stripDSTStreamConf, stripDSTElements, stripMicroDSTStreamConf, stripMicroDSTElements,
#get the line builders from the archive # # Merge into one stream and run in flag mode # AllStreams = StrippingStream("Dimuon") for line in lb.lines(): print line.name() if line.name() == 'StrippingB2XMuMu_InclDiMuHighQ2Line': AllStreams.appendLines([line]) sc = StrippingConf( Streams = [ AllStreams ], MaxCandidates = 2000 ) tuple = DecayTreeTuple("Jpsi_Tuple") tuple.Inputs = ["Phys/B2XMuMu_InclDiMuHighQ2Line/Particles/"] tuple.ToolList = [ "TupleToolKinematic" , "TupleToolEventInfo" , "TupleToolRecoStats" , "TupleToolMCTruth"
custom_stream = StrippingStream('CustomStream') custom_line = 'StrippingD2hhCompleteEventPromptDst2D2RSLine' for stream in streams: for line in stream.lines: if line.name() == custom_line: custom_stream.appendLines([line]) line = 'D2hhCompleteEventPromptDst2D2RSLine' # Create the actual Stripping configurable filterBadEvents = ProcStatusCheck() sc = StrippingConf(Streams=[custom_stream], MaxCandidates=2000, AcceptBadEvents=False, BadEventSelection=filterBadEvents) # The output is placed directly into Phys, so we only need to # define the stripping line here line = 'D2hhCompleteEventPromptDst2D2RSLine' # Create an ntuple to capture D*+ decays from the StrippingLine line dtt = DecayTreeTuple('TupleDstToD0pi_D0ToKpi') dtt.Inputs = ['/Event/Phys/{0}/Particles'.format(line)] dtt.Decay = '[D*(2010)+ -> (D0 -> K- pi+) pi+]CC' # Configure DaVinci # Important: The selection sequence needs to be inserted into # the Gaudi sequence for the stripping to run
line = 'D2hhPromptDst2D2KKLine' custom_stream = StrippingStream('CustomStream') custom_line = 'Stripping' + line for stream in streams: for sline in stream.lines: if sline.name() == custom_line: custom_stream.appendLines([sline]) # Create the actual Stripping configurable filterBadEvents = ProcStatusCheck() sc = StrippingConf(Streams=[custom_stream], MaxCandidates=2000, AcceptBadEvents=False, BadEventSelection=filterBadEvents) # Create an ntuple to capture D*+ decays from the StrippingLine line dtt = DecayTreeTuple('TupleDstToD0pi_D0ToKK') # The output is placed directly into Phys, so we only need to # define the stripping line here dtt.Inputs = ['/Event/Phys/{0}/Particles'.format(line)] dtt.Decay = '[D*(2010)+ -> (D0 -> K- K+) pi+]CC' # Configure DaVinci # Important: The selection sequence needs to be inserted into # the Gaudi sequence for the stripping to run DaVinci().appendToMainSequence([event_node_killer, sc.sequence()]) DaVinci().UserAlgorithms += [dtt]
from StrippingArchive.Stripping21.StrippingB2XMuMuInclusive \ import defaultConfig as config from StrippingConf.Configuration import StrippingConf, StrippingStream stripping='stripping20' lb = builder('B2XMuMuIncl',config) print config AllStreams = StrippingStream("MyStream") for line in lb.lines(): if line.name() == 'StrippingB2XMuMuIncl_InclDiMuHighQ2Line': AllStreams.appendLines([line]) sc = StrippingConf( Streams = [ AllStreams ], MaxCandidates = 2000 ) stripsel = AutomaticData(Location = "Phys/B2XMuMuIncl_InclDiMuHighQ2Line/Particles") stripfilter = FilterDesktop("stripfilter", Preambulo = ["from LoKiPhysMC.decorators import *", "from LoKiPhysMC.functions import mcMatch"], Code = "ALL") inclmumu = Selection ("Sel"+name, Algorithm = stripfilter, RequiredSelections = [stripsel]) seq = SelectionSequence("seq", TopSelection = inclmumu)
print config #get the line builders from the archive# # Merge into one stream and run in flag mode # AllStreams = StrippingStream("Dimuon") for line in lb.lines(): print line.name() if line.name() == 'StrippingB2XMuMuInclusive_InclDiMuHighQ2Line': AllStreams.appendLines([line]) if line.name() == 'StrippingB2XMuMuInclusive_InclDiMuLowQ2Line': AllStreams.appendLines([line]) sc = StrippingConf( Streams = [ AllStreams ], MaxCandidates = 2000 ) # But what we really want is to make a dimuon and a Kaon from StandardParticles import StdLooseKaons as kaons LowQ2MuonsOnDemand = DataOnDemand(Location = "Phys/B2XMuMuInclusive_InclDiMuLowQ2Line/Particles") HighQ2MuonsOnDemand = DataOnDemand(Location = "Phys/B2XMuMuInclusive_InclDiMuHighQ2Line/Particles") bothstripping = MergedSelection("Selection_mergeddaughters", RequiredSelections = [LowQ2MuonsOnDemand,HighQ2MuonsOnDemand])
#--------------------------------------------------------------- #Use default Stripping21 on MC #--------------------------------------------------------------- from StrippingConf.Configuration import StrippingConf, StrippingStream from StrippingSettings.Utils import strippingConfiguration from StrippingSettings.Stripping21.LineConfigDictionaries_RD import B2XMuMu from StrippingArchive.Utils import buildStreams from StrippingArchive import strippingArchive from StrippingArchive.Stripping21.StrippingB2XuMuNu import B2XuMuNuBuilder from StrippingSettings.Stripping21.LineConfigDictionaries_Semileptonic import B2XuMuNu B2XuMuNuConf = B2XuMuNuBuilder('B2XuMuNuBuilder', B2XuMuNu['CONFIG']) B2XuMuNuLines = B2XuMuNuConf.lines() sc = StrippingConf(HDRLocation="DecReports") sstream = StrippingStream("TestStream") sstream.appendLines(B2XuMuNuLines) sstream.OutputLevel = 2 sc.appendStream(sstream) #--------------------------- # Run fixing XmumuLine #--------------------------- from Configurables import NeutrinoBuildTupleTool, PromptNeutrinoTupleTool tuple = DecayTreeTuple('PromptNeutrinoTupleTool') tuple.OutputLevel = INFO stream = 'AllStreams'
streams = buildStreams(stripping = config, archive = archive) MyStream = StrippingStream("MyStream") MyLines = [ 'StrippingTau23MuTau2PMuMuLine' ] for stream in streams: for line in stream.lines: if line.name() in MyLines: print 'StrippingTau23MuTau2PMuMuLine' MyStream.appendLines( [ line ] ) from Configurables import ProcStatusCheck filterBadEvents = ProcStatusCheck() sc = StrippingConf( Streams = [ MyStream ], MaxCandidates = 2000, AcceptBadEvents = False, BadEventSelection = filterBadEvents ) from Configurables import DecayTreeTuple tuple= DecayTreeTuple('LC_OS') tuple.Inputs = [ "Phys/Tau23MuTau2PMuMuLine/Particles" ] tuple.UseLoKiDecayFinders = False #tuple.IgnoreP2PVFromInputLocations = True # ignore all stored Particle -> PV relations tuple.ReFitPVs = True # re-fit the PVs tuple.Decay = '[Lambda_c+ -> ^p+ ^mu+ ^mu- ]cc' tuple.ToolList += [ "TupleToolEventInfo" , "TupleToolGeneration" , "TupleToolMCTruth" , "TupleToolMCBackgroundInfo"
from GaudiKernel.SystemOfUnits import * MessageSvc().Format = "% F%30W%S%7W%R%T %0W%M" ####################################################################### # # Selection # from StrippingConf.Configuration import StrippingConf from StrippingConf.StrippingStream import StrippingStream from StrippingArchive.Utils import lineBuilder lineBuilder = lineBuilder('Stripping17', 'BetaS') line = lineBuilder.lineFromName('StrippingBetaSBd2JpsiKsDetachedLine') stream = StrippingStream("B2JpsiXTest", Lines=[line]) sc = StrippingConf() sc.appendStream(stream) ######################################################################## # # The Decay Tuple # from Configurables import DecayTreeTuple tuple = DecayTreeTuple("Tuple") tuple.ToolList += [ "TupleToolMCTruth", "TupleToolMCBackgroundInfo", "TupleToolGeometry", "TupleToolKinematic", "TupleToolPropertime", "TupleToolPrimaries", "TupleToolEventInfo", "TupleToolTrackInfo" # , "TupleToolTISTOS" ]
from Gaudi.Configuration import * from Configurables import SelDSTWriter, DaVinci ############################################################################## # # Monitoring # importOptions( "$DAVINCIMONITORSROOT/options/DaVinciMonitoring.py") ############################################################################## # # Stripping # from StrippingConf.Configuration import StrippingConf from StrippingSelections.Streams import allStreams sc = StrippingConf( Streams = allStreams ) ############################################################################## # # Hlt # # DaVinci().Hlt = True # DaVinci().HltThresholdSettings = 'Physics_320Vis_300L0_10Hlt1_Jan10' # DaVinci().L0 = True # DaVinci().ReplaceL0BanksWithEmulated = True ############################################################################## # # DaVinci # DaVinci().DataType = "2009" # Default is "MC09" DaVinci().UserAlgorithms = [ sc.sequence() ] DaVinci().EvtMax = 1000
from Gaudi.Configuration import * MessageSvc().Format = "% F%60W%S%7W%R%T %0W%M" # # DaVinci Monitoring is done first # importOptions( "$DAVINCIMONITORSROOT/options/DaVinciMonitoring.py") # # Stripping job configuration # from StrippingSelections.Streams import allStreams from StrippingConf.Configuration import StrippingConf sc = StrippingConf( Streams = allStreams ) from Configurables import SelDSTWriter dstWriter = SelDSTWriter("MyDSTWriter", SelectionSequences = sc.activeStreams(), OutputPrefix = 'Strip', OutputFileSuffix = '000000') dstWriter.ExtraItems += ['/Event/DAQ/RawEvent#1', '/Event/Strip/Phys/DecReports#1'] # # DaVinci configuration # from Configurables import DaVinci DaVinci().DataType = "2010" DaVinci().InputType = 'SDST' DaVinci().EvtMax = 10000 DaVinci().appendToMainSequence( [ sc.sequence() ] ) DaVinci().appendToMainSequence( [ dstWriter.sequence() ] )
#----------------------Standard stripping20------------------------- stripping='stripping20' config = strippingConfiguration(stripping) archive = strippingArchive(stripping) streams = buildStreams(stripping=config, archive=archive) #----Select my line------------------------------------------------- MyStream = StrippingStream("MyStream") MyLines = [ 'StrippingFullDSTDiMuonJpsi2MuMuDetachedLine' ] for stream in streams: for line in stream.lines: if line.name() in MyLines: MyStream.appendLines( [ line ] ) sc = StrippingConf( HDRLocation = "MyStrip", Streams = [ MyStream ] ) #------------------------------------------------------------------------ #----Jpsi->mumu--------------------------------- location = "Phys/FullDSTDiMuonJpsi2MuMuDetachedLine/Particles" Jpsi2MuMu = AutomaticData(Location = location) #----selection p+ and K- and Lambda0 ------------------------- kaons = DataOnDemand(Location = "Phys/StdNoPIDsKaons/Particles") protons = DataOnDemand(Location = "Phys/StdNoPIDsProtons/Particles") Lambda0LL = DataOnDemand(Location = "Phys/StdLooseLambdaLL/Particles") Lambda0DD = DataOnDemand(Location = "Phys/StdLooseLambdaDD/Particles") AllLambda0 = MergedSelection( "AllLambda0", RequiredSelections = [Lambda0LL, Lambda0DD]) #DaughtCut = "(TRCHI2DOF < 4.0) & (MIPCHI2DV(PRIMARY)>9) & (TRGHOSTPROB < 0.2)" DaughtCutK = "(MIPCHI2DV(PRIMARY)>4) & (TRCHI2DOF < 4.0) & (PT>250*MeV) & (PIDK-PIDpi>0) & (PIDK-PIDp>-6) & (TRGHOSTPROB < 0.2)"
streams=buildStreams(stripping=config,archive=archive) MyStream= StrippingStream("MyStream") MyLines= ["StrippingBetaSQ2B3piSelectionLine"] for stream in streams: for line in stream.lines: if line.name() in MyLines: MyStream.appendLines( [ line ]) from Configurables import ProcStatusCheck filterBadEvents=ProcStatusCheck() sc=StrippingConf( Streams= [ MyStream ], MaxCandidates = 2000, AcceptBadEvents = False, BadEventSelection = filterBadEvents, HDRLocation = "SomeNoExistingLocation" ) from Configurables import StrippingReport sr= StrippingReport(Selections =sc.selections()) StripSequencer = GaudiSequencer('StripSequencer') StripSequencer.Members= [sc.sequence(),sr] StripSequencer.IgnoreFilterPassed =True DaVinci().appendToMainSequence([event_node_killer,StripSequencer]) ############################################################################################ from PhysSelPython.Wrappers import Selection
#for key, val in def_str_no_pre.iteritems(): #if "Prescale" in key: #def_str_no_pre[key] = 1.0 from StrippingSelections import StrippingD2hhh_conf D2HHHConf = StrippingD2hhh_conf.D2hhhConf('D2hhh',default_config) D2hhhLines = D2HHHConf.lines() for line in D2hhhLines : print line.name(), line.outputLocation() ss.appendLines( [D2hhhLines[lineNumber]] ) stripOutputLoc = D2hhhLines[lineNumber].outputLocation() from StrippingConf.Configuration import StrippingConf conf = StrippingConf( Streams = [ ss ] ) from Configurables import StrippingReport sr = StrippingReport(Selections = conf.selections()) from Gaudi.Configuration import * from LHCbKernel.Configuration import * MessageSvc().Format = "% F%60W%S%7W%R%T %0W%M" from Configurables import DaVinci DaVinci().PrintFreq = 500 DaVinci().HistogramFile = 'DV_stripping_histos.root' DaVinci().TupleFile = "DPiPiPi_NTuple.root"
VOID_Preambulo = ["from LoKiTracks.decorators import *" , "from LoKiCore.functions import * ", "from GaudiKernel.SystemOfUnits import *"]) filterBadEvents = GaudiSequencer("BadEventFilter", ModeOR = True, Members = [ flts.sequencer("GECFilter"), ProcStatusCheck() ] ) streamFilter = { 'default' : filterBadEvents, 'MiniBias' : ProcStatusCheck() } sc = StrippingConf( Streams = streams, MaxCandidates = 2000, AcceptBadEvents = False, BadEventSelection = streamFilter, TESPrefix = stripTESPrefix, ActiveMDSTStream = True, Verbose = True, DSTStreams = dstStreams, MicroDSTStreams = mdstStreams ) # # Configure the dst writers for the output # enablePacking = True from DSTWriters.microdstelements import * from DSTWriters.Configuration import ( SelDSTWriter, stripDSTStreamConf, stripDSTElements, stripMicroDSTStreamConf,
# Select my line MyStream = StrippingStream("MyStream") MyLines = [ 'Stripping'+line.lineName for line in [Phi2KsKs_line] ] for stream in streams: for line in stream.lines: if line.name() in MyLines: MyStream.appendLines( [ line ] ) # Configure Stripping from Configurables import ProcStatusCheck filterBadEvents = ProcStatusCheck() sc = StrippingConf( Streams = [ MyStream ], MaxCandidates = 2000, AcceptBadEvents = False, BadEventSelection = filterBadEvents ) DaVinci().appendToMainSequence( [ eventNodeKiller, sc.sequence() ] ) # MC Tuples addMCTuple('phi2KsKs', '[phi(1020) -> ^(KS0 -> ^pi+ ^pi-) ^(KS0 -> ^pi+ ^pi-)]CC') addMCTuple('phi2KsKl', '[phi(1020) -> ^(KS0 -> ^pi+ ^pi-) ^(KL0 -> ^pi+ ^pi-)]CC') addMCTuple('Ds_phi2KsKl', '[D_s+ -> ^(phi(1020) -> ^(KS0 -> ^pi+ ^pi-) ^(KS0 -> ^pi+ ^pi-)) ^pi+]CC') if 'minbias' in dataSample.name: addMCTuple('phi2KK', '[phi(1020) -> ^K- ^K-]CC') # addMCTuple('KsKs', '[(KS0 -> ^pi+ ^pi-)cc && (KS0 -> ^pi+ ^pi-)cc]') addMCTuple('Ks', '[KS0 -> ^pi+ ^pi-]CC') from Configurables import PrintMCTree, PrintMCDecayTreeTool mctree = PrintMCTree("PrintTruePhi")
def execute(stripRun, stripConf, stripLine, dataType, hltReport, tupleDecay, evtMax, mag, outputType="ntuple", strippingStream = "Charm"): #0 "pi" "pi" #1 "mu" "mu" #2 "K" "pi" #3 "e" "mu" #4 "K" "mu" stripLines = { "kkpi":0, "kpipi":1, "pipipi":2, "kpipios":3, "kkk":4, "kkpios":5, "hhh":6, } lineNumber = stripLines[stripLine] # Now build the stream from StrippingConf.StrippingStream import StrippingStream ss = StrippingStream("ByTom") from StrippingSelections import StrippingD2hhh_conf line = False if stripConf == "default" or stripConf == "def": from StrippingArchive import Utils D2HHHConf, default_config = Utils.lineBuilderAndConf("stripping20","D2hhh") def_str_no_pre = default_config for key, val in def_str_no_pre.iteritems(): if "Prescale" in key: def_str_no_pre[key] = 1.0 D2HHHConf = StrippingD2hhh_conf.D2hhhConf('D2hhh',def_str_no_pre) D2hhhLines = D2HHHConf.lines() for line in D2hhhLines : print line.name(), line.outputLocation() ss.appendLines( [D2hhhLines[lineNumber]] ) stripOutputLoc = D2hhhLines[lineNumber].outputLocation() else: raise ValueError("Unknown value of stripConf: %s"%stripConf) from StrippingConf.Configuration import StrippingConf conf = StrippingConf( Streams = [ ss ] ) from Configurables import StrippingReport sr = StrippingReport(Selections = conf.selections()) MessageSvc().Format = "% F%60W%S%7W%R%T %0W%M" from Configurables import DaVinci from Configurables import LoKi__HDRFilter as StripFilter strfilter = StripFilter( 'StripPassFilter', Code="HLT_PASS('"+D2hhhLines[lineNumber].name()+"Decision')", Location="/Event/Strip/Phys/DecReports" ) #strfilter = StripFilter( 'StripPassFilter', Code="HLT_PASS('StrippingD2hhh_PPPLineDecision')", Location="/Event/Strip/Phys/DecReports" ) DaVinci().EventPreFilters += [strfilter] DaVinci().PrintFreq = 500 DaVinci().HistogramFile = 'DV_histos.root' DaVinci().TupleFile = "DPiPiPi_NTuple.root" DaVinci().EvtMax = evtMax storeExp = StoreExplorerAlg() storeExp.Load = 1 storeExp.PrintFreq = 10.0 #DaVinci().appendToMainSequence( [ storeExp ] ) if stripRun: #from Configurables import bankKiller #bk = bankKiller( "KillHltBanks", BankTypes = [ "Evt/Strip/Phys/DecReports", "Evt/AllStreams" ] ) #DaVinci().appendToMainSequence( [ bk ] ) from Configurables import EventNodeKiller enk = EventNodeKiller() enk.Nodes=[ "Event/Strip/Phys/DecReports", "Event/AllStreams"] DaVinci().appendToMainSequence( [ enk ] ) #DaVinci().appendToMainSequence( [ storeExp ] ) DaVinci().appendToMainSequence( [ conf.sequence() ] ) DaVinci().appendToMainSequence( [ sr ] ) if hltReport: from Configurables import ReadHltReport DaVinci().appendToMainSequence( [ ReadHltReport() ] ) DaVinci().InputType = 'MDST' DaVinci().RootInTES = "/Event/Charm" a = "->" if dataType == "MC10": DaVinci().DataType = "2010" DaVinci().Simulation = True DaVinci().DDDBtag = "head-20101206" if mag == "up": DaVinci().CondDBtag = "sim-20101210-vc-mu100" elif mag == "down": DaVinci().CondDBtag = "sim-20101210-vc-md100" DaVinci().Lumi = False elif dataType == "MC11": DaVinci().DataType = "2011" DaVinci().Simulation = True DaVinci().DDDBtag = "MC11-20111102" if mag == "up": DaVinci().CondDBtag = "sim-20111111-vc-mu100" elif mag == "down": DaVinci().CondDBtag = "sim-20111111-vc-md100" DaVinci().Lumi = False elif dataType == "MC11a": DaVinci().DataType = "2011" DaVinci().Simulation = True DaVinci().DDDBtag = "MC11-20111102" if mag == "up": DaVinci().CondDBtag = "sim-20111111-vc-mu100" elif mag == "down": DaVinci().CondDBtag = "sim-20111111-vc-md100" DaVinci().Lumi = False elif dataType == "MC2012": DaVinci().DataType = "2012" DaVinci().Simulation = True DaVinci().DDDBtag = "Sim08-20130503-1" if mag == "up": DaVinci().CondDBtag = "Sim08-20130503-1-vc-mu100" elif mag == "down": DaVinci().CondDBtag = "Sim08-20130503-1-vc-md100" DaVinci().Lumi = False elif dataType == "MC2011": DaVinci().DataType = "2011" DaVinci().Simulation = True DaVinci().DDDBtag = "Sim08-20130503" if mag == "up": DaVinci().CondDBtag = "Sim08-20130503-vc-mu100" elif mag == "down": DaVinci().CondDBtag = "Sim08-20130503-vc-md100" DaVinci().Lumi = False elif dataType == "data2012": a = "->" DaVinci().DataType = "2012" DaVinci().Simulation = False #DaVinci().DDDBtag = "dddb-20130111" #if mag == "up": #DaVinci().CondDBtag = "cond-20130114" #elif mag == "down": #DaVinci().CondDBtag = "cond-20130114" DaVinci().Lumi = True elif dataType == "data2011": a = "->" DaVinci().DataType = "2011" DaVinci().Simulation = False #DaVinci().DDDBtag = "dddb-20130111" #if mag == "up": #DaVinci().CondDBtag = "cond-20130114" #elif mag == "down": #DaVinci().CondDBtag = "cond-20130114" DaVinci().Lumi = True elif dataType == "data": sys.exit("correct the dataType to include the year") from Configurables import DecayTreeTuple from Configurables import TupleToolTISTOS from Configurables import TupleToolMassHypo, TupleToolSubMass if outputType in ["ntuple", "nt", "tuple", "root"]: print "stripOutputLoc:",stripOutputLoc dttuple = DecayTreeTuple( "DPiPiPi_NTuple" ) dttuple.ToolList = ["TupleToolGeometry", "TupleToolEventInfo", "TupleToolKinematic", #"TupleToolPrimaries", "TupleToolPropertime", "TupleToolAngles", "TupleToolPid", #"TupleToolRICHPid", "TupleToolDecay", #"TupleToolTrigger", #"TupleToolTrackPosition", #"TupleToolTrackInfo", #"TupleToolRecoStats", "TupleToolDira", "TupleToolDalitz", "TupleToolSubMass", ] dttuple.Inputs = [ stripOutputLoc ] print "tuple input :",dttuple.Inputs print "number of events:", DaVinci().EvtMax #[D+ -> pi- pi+ pi+]CC if tupleDecay == "pipipi": dttuple.Decay = "[D+ "+a+" ^pi- ^pi+ ^pi+]CC" dttuple.addBranches ({ "D": "[D+ "+a+" pi- pi+ pi+]CC", "x1": "[D+ "+a+" ^pi- pi+ pi+]CC", "x2": "[D+ "+a+" pi- ^pi+ pi+]CC", "x3": "[D+ "+a+" pi- pi+ ^pi+]CC", }) elif tupleDecay == "kpipios": dttuple.Decay = "[D+ "+a+" ^pi- ^pi+ ^K+]CC" dttuple.addBranches ({ "D": "[D+ "+a+" pi- pi+ K+]CC", "x1": "[D+ "+a+" ^pi- pi+ K+]CC", "x2": "[D+ "+a+" pi- ^pi+ K+]CC", "x3": "[D+ "+a+" pi- pi+ ^K+]CC", }) elif tupleDecay == "ds2phipi": dttuple.Decay = "[D+ "+a+" ^mu+ ^mu- ^pi+]CC" dttuple.addBranches ({ "D": "[D+ "+a+" mu+ mu- pi+]CC", "x1": "[D+ "+a+" ^mu+ mu- pi+]CC", "x2": "[D+ "+a+" mu+ ^mu- pi+]CC", "x3": "[D+ "+a+" mu+ mu- ^pi+]CC", }) #if tupleDecay == "eta": #dttuple.Decay = "[(D+ "+a+" ^(eta "+a+" ^pi+ ^pi-) ^pi+),(D- "+a+" ^(eta "+a+" ^pi+ ^pi-) ^pi-)]" #dttuple.addBranches ({ #"D": "[(D+ "+a+" (eta "+a+" pi+ pi-) pi+),(D- "+a+" (eta "+a+" pi+ pi-) pi-)]", #"eta": "[(D+ "+a+" ^(eta "+a+" ^pi+ ^pi-) ^pi+),(D- "+a+" ^(eta "+a+" ^pi+ ^pi-) ^pi-)]", #"pip": "[(D+ "+a+" (eta "+a+" ^pi+ pi-) pi+),(D- "+a+" (eta "+a+" ^pi+ pi-) pi-)]", #"pim": "[(D+ "+a+" (eta "+a+" pi+ ^pi-) pi+),(D- "+a+" (eta "+a+" pi+ ^pi-) pi-)]", #"pi": "[(D+ "+a+" (eta "+a+" pi+ pi-) ^pi+),(D- "+a+" (eta "+a+" pi+ pi-) ^pi-)]", #}) dttuple.TupleName = "DPiPiPi_NTuple" ttmhk = TupleToolMassHypo("KaonHypo") ttmhk.PIDReplacements = { "pi+" : "K+"} #ttmhk.CC = True dttuple.D.addTool(ttmhk) dttuple.D.ToolList += ["TupleToolMassHypo/KaonHypo"] ttmhm = TupleToolMassHypo("MuonHypo") ttmhm.PIDReplacements = { "pi+" : "mu+"} #ttmhm.CC = True dttuple.D.addTool(ttmhm) dttuple.D.ToolList += ["TupleToolMassHypo/MuonHypo"] dttuple.addTool(TupleToolTISTOS()) dttuple.TupleToolTISTOS.VerboseL0 = True dttuple.TupleToolTISTOS.VerboseHlt1 = True dttuple.TupleToolTISTOS.VerboseHlt2 = True dttuple.TupleToolTISTOS.Verbose = True dttuple.ToolList += ["TupleToolTISTOS"] dttuple.TupleToolTISTOS.TriggerList = [ "L0CALODecision", "L0ElectronDecision", "L0PhotonDecision", "L0HadronDecision", "L0MuonDecision", "Hlt1TrackMuonDecision", "Hlt1TrackAllL0Decision", "Hlt2Topo2BodyBBDTDecision", "Hlt2Topo3BodyBBDTDecision", "Hlt2Topo4BodyBBDTDecision", 'Hlt2CharmHadD2HHHDecision', ] #+ [ trigger_name+"Decision" for trigger_name in # ["L0CALO","L0ElectronNoSPD","L0PhotonNoSPD","L0HadronNoSPD","L0MuonNoSPD","L0DiMuonNoSPD","L0Electron","L0ElectronHi","L0Photon","L0PhotonHi","L0Hadron","L0Muon","L0DiMuon","L0HighSumETJet","L0B1gas","L0B2gas",]\ # + ["Hlt1MBMicroBiasVelo","Hlt1Global","Hlt1DiMuonHighMass","Hlt1DiMuonLowMass","Hlt1SingleMuonNoIP","Hlt1SingleMuonHighPT","Hlt1TrackAllL0","Hlt1TrackMuon","Hlt1TrackPhoton","Hlt1Lumi","Hlt1LumiMidBeamCrossing","Hlt1MBNoBias","Hlt1MBMicroBiasVeloRateLimited","Hlt1MBMicroBiasTStation","Hlt1MBMicroBiasTStationRateLimited","Hlt1L0Any","Hlt1L0AnyRateLimited","Hlt1L0AnyNoSPD","Hlt1L0AnyNoSPDRateLimited","Hlt1NoPVPassThrough","Hlt1DiProton","Hlt1DiProtonLowMult","Hlt1BeamGasNoBeamBeam1","Hlt1BeamGasNoBeamBeam2","Hlt1BeamGasBeam1","Hlt1BeamGasBeam2","Hlt1BeamGasCrossingEnhancedBeam1","Hlt1BeamGasCrossingEnhancedBeam2","Hlt1BeamGasCrossingForcedReco","Hlt1ODINTechnical","Hlt1Tell1Error","Hlt1VeloClosingMicroBias","Hlt1BeamGasCrossingParasitic","Hlt1ErrorEvent","Hlt1SingleElectronNoIP","Hlt1TrackForwardPassThrough","Hlt1TrackForwardPassThroughLoose","Hlt1CharmCalibrationNoBias","Hlt1L0HighSumETJet","Hlt1BeamGasCrossingForcedRecoFullZ","Hlt1BeamGasHighRhoVertices","Hlt1VertexDisplVertex","Hlt1TrackAllL0Tight","Hlt1HighPtJetsSinglePV","Hlt1L0PU","Hlt1L0CALO",]\ # + ["Hlt2SingleElectronTFLowPt","Hlt2SingleElectronTFHighPt","Hlt2DiElectronHighMass","Hlt2DiElectronB","Hlt2B2HHLTUnbiased","Hlt2Topo2BodySimple","Hlt2Topo3BodySimple","Hlt2Topo4BodySimple","Hlt2Topo2BodyBBDT","Hlt2Topo3BodyBBDT","Hlt2Topo4BodyBBDT","Hlt2TopoMu2BodyBBDT","Hlt2TopoMu3BodyBBDT","Hlt2TopoMu4BodyBBDT","Hlt2TopoE2BodyBBDT","Hlt2TopoE3BodyBBDT","Hlt2TopoE4BodyBBDT","Hlt2IncPhi","Hlt2IncPhiSidebands","Hlt2CharmHadD02HHKsLL","Hlt2Dst2PiD02PiPi","Hlt2Dst2PiD02MuMu","Hlt2Dst2PiD02KMu","Hlt2Dst2PiD02KPi","Hlt2PassThrough","Hlt2Transparent","Hlt2Forward","Hlt2DebugEvent","Hlt2CharmHadD02HH_D02PiPi","Hlt2CharmHadD02HH_D02PiPiWideMass","Hlt2CharmHadD02HH_D02KK","Hlt2CharmHadD02HH_D02KKWideMass","Hlt2CharmHadD02HH_D02KPi","Hlt2CharmHadD02HH_D02KPiWideMass","Hlt2ExpressJPsi","Hlt2ExpressJPsiTagProbe","Hlt2ExpressLambda","Hlt2ExpressKS","Hlt2ExpressDs2PhiPi","Hlt2ExpressBeamHalo","Hlt2ExpressDStar2D0Pi","Hlt2ExpressHLT1Physics","Hlt2Bs2PhiGamma","Hlt2Bs2PhiGammaWideBMass","Hlt2Bd2KstGamma","Hlt2Bd2KstGammaWideKMass","Hlt2Bd2KstGammaWideBMass","Hlt2CharmHadD2KS0H_D2KS0Pi","Hlt2CharmHadD2KS0H_D2KS0K","Hlt2CharmRareDecayD02MuMu","Hlt2B2HH","Hlt2MuonFromHLT1","Hlt2SingleMuon","Hlt2SingleMuonHighPT","Hlt2SingleMuonLowPT","Hlt2DiProton","Hlt2DiProtonTF","Hlt2DiProtonLowMult","Hlt2DiProtonLowMultTF","Hlt2CharmSemilepD02HMuNu_D02KMuNuWS","Hlt2CharmSemilepD02HMuNu_D02PiMuNuWS","Hlt2CharmSemilepD02HMuNu_D02KMuNu","Hlt2CharmSemilepD02HMuNu_D02PiMuNu","Hlt2TFBc2JpsiMuX","Hlt2TFBc2JpsiMuXSignal","Hlt2DisplVerticesLowMassSingle","Hlt2DisplVerticesHighMassSingle","Hlt2DisplVerticesDouble","Hlt2DisplVerticesSinglePostScaled","Hlt2DisplVerticesHighFDSingle","Hlt2DisplVerticesSingleDown","Hlt2CharmSemilepD2HMuMu","Hlt2CharmSemilepD2HMuMuWideMass","Hlt2B2HHPi0_Merged","Hlt2CharmHadD2HHH","Hlt2CharmHadD2HHHWideMass","Hlt2DiMuon","Hlt2DiMuonLowMass","Hlt2DiMuonJPsi","Hlt2DiMuonJPsiHighPT","Hlt2DiMuonPsi2S","Hlt2DiMuonB","Hlt2DiMuonZ","Hlt2DiMuonDY1","Hlt2DiMuonDY2","Hlt2DiMuonDY3","Hlt2DiMuonDY4","Hlt2DiMuonDetached","Hlt2DiMuonDetachedHeavy","Hlt2DiMuonDetachedJPsi","Hlt2DiMuonNoPV","Hlt2TriMuonDetached","Hlt2TriMuonTau","Hlt2CharmSemilepD02HHMuMu","Hlt2CharmSemilepD02HHMuMuWideMass","Hlt2CharmHadD02HHHH","Hlt2CharmHadD02HHHHWideMass","Hlt2ErrorEvent","Hlt2Global","Hlt2diPhotonDiMuon","Hlt2LowMultMuon","Hlt2LowMultHadron","Hlt2LowMultPhoton","Hlt2LowMultElectron","Hlt2SingleTFElectron","Hlt2SingleTFVHighPtElectron","Hlt2B2HHLTUnbiasedDetached","Hlt2CharmHadLambdaC2KPPi","Hlt2SingleMuonVHighPT","Hlt2CharmSemilepD02HMuNu_D02KMuNuTight","Hlt2CharmHadMinBiasLambdaC2KPPi","Hlt2CharmHadMinBiasD02KPi","Hlt2CharmHadMinBiasD02KK","Hlt2CharmHadMinBiasDplus2hhh","Hlt2CharmHadMinBiasLambdaC2LambdaPi","Hlt2DisplVerticesSingle","Hlt2DisplVerticesDoublePostScaled","Hlt2DisplVerticesSingleHighMassPostScaled","Hlt2DisplVerticesSingleHighFDPostScaled","Hlt2DisplVerticesSingleMVPostScaled","Hlt2RadiativeTopoTrackTOS","Hlt2RadiativeTopoPhotonL0","Hlt2DiMuonPsi2SHighPT","Hlt2DoubleDiMuon","Hlt2DiMuonAndMuon","Hlt2DiMuonAndGamma","Hlt2DiMuonAndD0","Hlt2DiMuonAndDp","Hlt2DiMuonAndDs","Hlt2DiMuonAndLc","Hlt2CharmSemilepD02HHMuMuHardHadronsSoftMuons","Hlt2CharmSemilepD02HHMuMuHardHadronsSoftMuonsWideMass","Hlt2CharmSemilepD02HHMuMuHardHadronsAndMuons","Hlt2CharmSemilepD02HHMuMuHardHadronsAndMuonsWideMass","Hlt2TopoRad2BodyBBDT","Hlt2TopoRad2plus1BodyBBDT","Hlt2Lumi","Hlt2LowMultHadron_nofilter","Hlt2LowMultElectron_nofilter","Hlt2CharmHadD02HHKsDD","Hlt2CharmHadD2KS0KS0","Hlt2CharmHadD2KS0KS0WideMass","Hlt2ExpressD02KPi","Hlt2CharmHadLambdaC2KPPiWideMass","Hlt2CharmHadLambdaC2KPK","Hlt2CharmHadLambdaC2KPKWideMass","Hlt2CharmHadLambdaC2PiPPi","Hlt2CharmHadLambdaC2PiPPiWideMass","Hlt2CharmHadLambdaC2PiPK","Hlt2CharmHadLambdaC2PiPKWideMass","Hlt2CharmHadD2KS0H_D2KS0DDPi","Hlt2CharmHadD2KS0H_D2KS0DDK","Hlt2DiPhi","Hlt2CharmHadD02HHHHDstNoHltOne_4pi","Hlt2CharmHadD02HHHHDstNoHltOne_4piWideMass","Hlt2CharmHadD02HHHHDstNoHltOne_K3pi","Hlt2CharmHadD02HHHHDstNoHltOne_K3piWideMass","Hlt2CharmHadD02HHHHDstNoHltOne_KKpipi","Hlt2CharmHadD02HHHHDstNoHltOne_KKpipiWideMass","Hlt2CharmHadD02HHHHDstNoHltOne_2K2pi","Hlt2CharmHadD02HHHHDstNoHltOne_2K2piWideMass","Hlt2CharmHadD02HHHHDstNoHltOne_3Kpi","Hlt2CharmHadD02HHHHDstNoHltOne_3KpiWideMass","Hlt2CharmHadD02HHHHDstNoHltOne_Ch2","Hlt2CharmHadD02HHHHDstNoHltOne_Ch2WideMass","Hlt2CharmSemilep3bodyD2PiMuMu","Hlt2CharmSemilep3bodyD2PiMuMuSS","Hlt2CharmSemilep3bodyD2KMuMu","Hlt2CharmSemilep3bodyD2KMuMuSS","Hlt2CharmSemilep3bodyLambdac2PMuMu","Hlt2CharmSemilep3bodyLambdac2PMuMuSS","Hlt2LambdaC_LambdaC2Lambda0LLPi","Hlt2LambdaC_LambdaC2Lambda0LLK","Hlt2LambdaC_LambdaC2Lambda0DDPi","Hlt2LambdaC_LambdaC2Lambda0DDK","Hlt2RadiativeTopoTrack","Hlt2RadiativeTopoPhoton","Hlt2CharmHadD02HHHHDst_4pi","Hlt2CharmHadD02HHHHDst_4piWideMass","Hlt2CharmHadD02HHHHDst_K3pi","Hlt2CharmHadD02HHHHDst_K3piWideMass","Hlt2CharmHadD02HHHHDst_KKpipi","Hlt2CharmHadD02HHHHDst_KKpipiWideMass","Hlt2CharmHadD02HHHHDst_2K2pi","Hlt2CharmHadD02HHHHDst_2K2piWideMass","Hlt2CharmHadD02HHHHDst_3Kpi","Hlt2CharmHadD02HHHHDst_3KpiWideMass","Hlt2CharmHadD02HHHHDst_Ch2","Hlt2CharmHadD02HHHHDst_Ch2WideMass","Hlt2CharmSemilepD02PiPiMuMu","Hlt2CharmSemilepD02KKMuMu","Hlt2CharmSemilepD02KPiMuMu","Hlt2CharmHadD02HHHH_4pi","Hlt2CharmHadD02HHHH_4piWideMass","Hlt2CharmHadD02HHHH_K3pi","Hlt2CharmHadD02HHHH_K3piWideMass","Hlt2CharmHadD02HHHH_KKpipi","Hlt2CharmHadD02HHHH_KKpipiWideMass","Hlt2CharmHadD02HHHH_2K2pi","Hlt2CharmHadD02HHHH_2K2piWideMass","Hlt2CharmHadD02HHHH_3Kpi","Hlt2CharmHadD02HHHH_3KpiWideMass","Hlt2CharmHadD02HHHH_Ch2","Hlt2CharmHadD02HHHH_Ch2WideMass","Hlt2DiMuonDetachedPsi2S","Hlt2CharmHadD02HHXDst_hhX","Hlt2CharmHadD02HHXDst_hhXWideMass","Hlt2LowMultD2KPi","Hlt2LowMultD2KPiPi","Hlt2LowMultD2K3Pi","Hlt2LowMultChiC2HH","Hlt2LowMultChiC2HHHH","Hlt2LowMultD2KPiWS","Hlt2LowMultD2KPiPiWS","Hlt2LowMultD2K3PiWS","Hlt2LowMultChiC2HHWS","Hlt2LowMultChiC2HHHHWS","Hlt2LowMultDDInc","Hlt2DisplVerticesSingleLoosePS","Hlt2DisplVerticesSingleHighFD","Hlt2DisplVerticesSingleVeryHighFD","Hlt2DisplVerticesSingleHighMass","Hlt2DisplVerticesSinglePS","Hlt2DisplVerticesDoublePS","Hlt2CharmHadD2HHHKsLL","Hlt2CharmHadD2HHHKsDD","Hlt2KshortToMuMuPiPi","Hlt2LowMultChiC2PP","Hlt2LowMultDDIncCP","Hlt2LowMultDDIncVF","Hlt2LowMultLMR2HH","Hlt2HighPtJets","Hlt2ChargedHyperon_Xi2Lambda0LLPi","Hlt2ChargedHyperon_Xi2Lambda0LLMu","Hlt2ChargedHyperon_Omega2Lambda0LLK","Hlt2ChargedHyperon_Xi2Lambda0DDPi","Hlt2ChargedHyperon_Xi2Lambda0DDMu","Hlt2ChargedHyperon_Omega2Lambda0DDK","Hlt2CharmHadD02HHXDst_BaryonhhX","Hlt2CharmHadD02HHXDst_BaryonhhXWideMass","Hlt2CharmHadD02HHXDst_BaryonhhXWithKSLL","Hlt2CharmHadD02HHXDst_BaryonhhXWithKSLLWideMass","Hlt2CharmHadD02HHXDst_BaryonhhXWithLambda0LL","Hlt2CharmHadD02HHXDst_BaryonhhXWithLambda0LLWideMass","Hlt2CharmHadD02HHXDst_BaryonhhXWithKSDD","Hlt2CharmHadD02HHXDst_BaryonhhXWithKSDDWideMass","Hlt2CharmHadD02HHXDst_BaryonhhXWithLambda0DD","Hlt2CharmHadD02HHXDst_BaryonhhXWithLambda0DDWideMass","Hlt2CharmHadD02HHXDst_LeptonhhX","Hlt2CharmHadD02HHXDst_LeptonhhXWideMass","Hlt2CharmHadD02HHXDst_LeptonhhXWithKSLL","Hlt2CharmHadD02HHXDst_LeptonhhXWithKSLLWideMass","Hlt2CharmHadD02HHXDst_LeptonhhXWithLambda0LL","Hlt2CharmHadD02HHXDst_LeptonhhXWithLambda0LLWideMass","Hlt2CharmHadD02HHXDst_LeptonhhXWithKSDD","Hlt2CharmHadD02HHXDst_LeptonhhXWithKSDDWideMass","Hlt2CharmHadD02HHXDst_LeptonhhXWithLambda0DD","Hlt2CharmHadD02HHXDst_LeptonhhXWithLambda0DDWideMass"] # ] from Configurables import LoKi__Hybrid__TupleTool LoKi_DTFMASS = LoKi__Hybrid__TupleTool("LoKi_DTFMASS") LoKi_DTFMASS.Variables = { "DTF_CHI2" : "DTF_CHI2( True )", "DTF_NDOF" : "DTF_NDOF( True )", "DTF_D_M" : "DTF_FUN ( M , True )", "DTF_D_MM" : "DTF_FUN ( MM , True )", "DTF_D_P" : "DTF_FUN ( P , True )", "DTF_D_PT" : "DTF_FUN ( PT , True )", "DTF_D_PE" : "DTF_FUN ( E , True )", "DTF_D_PX" : "DTF_FUN ( PX , True )", "DTF_D_PY" : "DTF_FUN ( PY , True )", "DTF_D_PZ" : "DTF_FUN ( PZ , True )", "DTF_x1_M" : "DTF_FUN ( CHILD(M,1) , True )", "DTF_x1_MM" : "DTF_FUN ( CHILD(MM,1) , True )", "DTF_x1_P" : "DTF_FUN ( CHILD(P,1) , True )", "DTF_x1_PT" : "DTF_FUN ( CHILD(PT,1) , True )", "DTF_x1_PE" : "DTF_FUN ( CHILD(E,1) , True )", "DTF_x1_PX" : "DTF_FUN ( CHILD(PX,1) , True )", "DTF_x1_PY" : "DTF_FUN ( CHILD(PY,1) , True )", "DTF_x1_PZ" : "DTF_FUN ( CHILD(PZ,1) , True )", "DTF_x2_M" : "DTF_FUN ( CHILD(M,2) , True )", "DTF_x2_MM" : "DTF_FUN ( CHILD(MM,2) , True )", "DTF_x2_P" : "DTF_FUN ( CHILD(P,2) , True )", "DTF_x2_PT" : "DTF_FUN ( CHILD(PT,2) , True )", "DTF_x2_PE" : "DTF_FUN ( CHILD(E,2) , True )", "DTF_x2_PX" : "DTF_FUN ( CHILD(PX,2) , True )", "DTF_x2_PY" : "DTF_FUN ( CHILD(PY,2) , True )", "DTF_x2_PZ" : "DTF_FUN ( CHILD(PZ,2) , True )", "DTF_x3_M" : "DTF_FUN ( CHILD(M,3) , True )", "DTF_x3_MM" : "DTF_FUN ( CHILD(MM,3) , True )", "DTF_x3_P" : "DTF_FUN ( CHILD(P,3) , True )", "DTF_x3_PT" : "DTF_FUN ( CHILD(PT,3) , True )", "DTF_x3_PE" : "DTF_FUN ( CHILD(E,3) , True )", "DTF_x3_PX" : "DTF_FUN ( CHILD(PX,3) , True )", "DTF_x3_PY" : "DTF_FUN ( CHILD(PY,3) , True )", "DTF_x3_PZ" : "DTF_FUN ( CHILD(PZ,3) , True )", } dttuple.D.ToolList+=["LoKi::Hybrid::TupleTool/LoKi_DTFMASS"] dttuple.D.addTool(LoKi_DTFMASS) if "MC" in dataType: from Configurables import TupleToolMCBackgroundInfo dttuple.addTool(TupleToolMCBackgroundInfo, name="TupleToolMCBackgroundInfo") dttuple.TupleToolMCBackgroundInfo.Verbose=True dttuple.addTool(TupleToolMCTruth, name="truth") dttuple.truth.ToolList += ["MCTupleToolHierarchy", "MCTupleToolKinematic"] dttuple.ToolList+=["TupleToolMCBackgroundInfo/TupleToolMCBackgroundInfo"] dttuple.ToolList+=["TupleToolMCTruth/truth"] DaVinci().appendToMainSequence( [ dttuple ] ) elif outputType == "dst": from Configurables import SelDSTWriter if stripRun: dst_Sel = AutomaticData(Location = stripOutputLoc) else: dst_Sel = AutomaticData(Location = "/Event/"+strippingStream+"/" + stripOutputLoc) dst_Filter = FilterDesktop('dst_Filter', Code = "ALL") dst_FilterSel = Selection(name = line.name().replace("Stripping",""), Algorithm = dst_Filter, RequiredSelections = [ dst_Sel ]) dst_Seq = SelectionSequence('lsdata', TopSelection = dst_FilterSel, ) dstw = SelDSTWriter("DSTWriter") dstw.OutputFileSuffix = "PiPiPi" #dstw.CopyProtoParticles = False dstw.SelectionSequences = [dst_Seq] #dstw.CopyL0DUReport = False #dstw.CopyHltDecReports = False #dstw.CopyMCTruth = True #dstw.CopyBTags = True DaVinci().appendToMainSequence( [ dstw.sequence() ] )
charmMicroDSTname = 'Charm' pidMicroDSTname = 'PID' bhadronMicroDSTname = 'Bhadron' mdstStreams = [ leptonicMicroDSTname,charmMicroDSTname,pidMicroDSTname,bhadronMicroDSTname ] dstStreams = [ "BhadronCompleteEvent", "CharmCompleteEvent", "Dimuon", "EW", "Semileptonic", "Calibration", "MiniBias", "Radiative" ] stripTESPrefix = 'Strip' from Configurables import ProcStatusCheck sc = StrippingConf( HDRLocation = "SomeLocation", Streams = streams, MaxCandidates = 2000, AcceptBadEvents = False, BadEventSelection = ProcStatusCheck(), TESPrefix = stripTESPrefix, ActiveMDSTStream = True, Verbose = True, DSTStreams = dstStreams, MicroDSTStreams = mdstStreams ) # # Configure the dst writers for the output # enablePacking = True from Configurables import DecayTreeTuple, FitDecayTrees, TupleToolRecoStats, TupleToolTrigger, TupleToolSubMass from Configurables import TupleToolTISTOS, CondDB, SelDSTWriter
from PhysSelPython.Wrappers import AutomaticData, Selection, SelectionSequence #from Configurables import DstConf, TurboConf B2XMuMuConf = B2XMuMuConf("B2XMuMu", B2XMuMu['CONFIG']) B2XMuMuLines = B2XMuMuConf.lines() for line in B2XMuMuLines: print "CL DEBUG", line print "CL DEBUG", line.name() stripline = B2XMuMuLines[0] sstream = StrippingStream("TestStream") sstream.appendLines([stripline]) sstream.OutputLevel = 2 sc = StrippingConf( Streams=[sstream], HDRLocation="DecReports", ) Strip_Location1 = stripline.outputLocation() print Strip_Location1 StripSel1 = AutomaticData(Location=Strip_Location1) print StripSel1 print StripSel1.outputLocation() print "ALL OK" ########################################################### decay = "[B+ -> ^( J/psi(1S) -> ^mu- ^mu+) ^pi+]CC" ############################################################ ## (1) read data from Turbo: from PhysConf.Selections import AutomaticData