def Tuples(): """ Simple class-like method to return DecayTreeTuple which can be used to do quick-check on the output DST. Usage: >> from StrippingSelections.StrippingQEE import StrippingDitau >> DaVinci().appendToMainSequence( StrippingDitau.Tuples() ) >> DaVinci().TupleFile = 'tuple.root' """ import re from DecayTreeTuple.Configuration import DecayTreeTuple, EventTuple seq = GaudiSequencer('TupleSeq') seq.ModeOR = True seq.ShortCircuit = False for lname, decays in lines_decays.iteritems(): for process, desc in decays.iteritems(): desc = re.sub(r' ([a-z])', r' ^\1', desc) # regex insert ^ desc = desc.replace('cc', 'CC') # different between CombineP & DTT # ## Extra complication for cand with RIF, such that the input location # after isolation filter is not at default line location, but on the # last algo's location. Otherwise the tuple will pick up candidates # before isolation filtering. root = 'Phys/Ditau%sLine' % lname # if 'noiso' not in root: # root = root.replace('Line','isoLine') # tup = DecayTreeTuple('Tup_' + process, NTupleDir='Ditau', TupleName=process) tup.Inputs = [root + '/Particles'] tup.Decay = desc tup.ToolList = [ 'TupleToolKinematic', ] tool = tup.addTupleTool('TupleToolConeIsolation') tool.MinConeSize = 0.5 tool.MaxConeSize = 0.5 tool = tup.addTupleTool('LoKi::Hybrid::TupleTool') tool.Variables = { 'CONEPX1': "RELINFO('%s/IsoPlus' , 'CONEPX')" % root, 'CONEPX2': "RELINFO('%s/IsoMinus', 'CONEPX')" % root, 'CONEPY1': "RELINFO('%s/IsoPlus' , 'CONEPY')" % root, 'CONEPY2': "RELINFO('%s/IsoMinus', 'CONEPY')" % root, 'CONEPT1': "RELINFO('%s/IsoPlus' , 'CONEPT')" % root, 'CONEPT2': "RELINFO('%s/IsoMinus', 'CONEPT')" % root, } seq.Members.append(tup) return [seq]
#BJpsiKS.addBranches({ # remove all "^" except where needed. # "Jpsi" : "^(J/psi(1S) -> mu- mu+)", # "muplus" : "J/psi -> mu- ^mu+", # "muminus" : "J/psi -> ^mu- mu+" # }) ### Bplus tools ### Jpsi tools #BJpsiKS.Jpsi.addTupleTool("TupleToolDownEff") ################################################################ ################################################################ Seq1 = GaudiSequencer("Seq1") Seq1.Members += [ SeqKsPiPi.sequence(), KsPiPiTuple ] Seq1.Members += [ SeqLambdaPPi.sequence(), LambdaPPiTuple ] Seq1.ShortCircuit = False Seq1.ModeOR = True # ###################################################################################################### DaVinci().MainOptions = "" DaVinci().UserAlgorithms = [Seq1] ######################################################################## DaVinci().EvtMax = -1 DaVinci().DataType = "2016" DaVinci().PrintFreq = 100 DaVinci().Lumi = False DaVinci().InputType = "DST" if simulation is True: DaVinci().Simulation = True DaVinci().Lumi = False
BuTuple.Branches = {"Bplus": "[B+]cc : [B+ -> (J/psi(1S) => mu+ mu-) K+]cc"} BuTuple.addTool(TupleToolDecay, name="Bplus") BuTuple.Bplus.ToolList += ["LoKi::Hybrid::TupleTool/LoKi_SpecificToB"] BuTuple.Bplus.addTool(LoKi_SpecificToB) BuTuple.addTool(TupleToolGeometry) BuTuple.Bplus.addTool(TupleToolTISTOS) BuTuple.Bplus.TupleToolTISTOS.addTool(TriggerTisTos, "TriggerTisTos") BuTuple.Bplus.TupleToolTISTOS.TriggerTisTos.TOSFracMuon = 0. BuTuple.Bplus.ToolList += ["TupleToolTISTOS"] ########################################################### ########################################################### TupleSeq.ModeOR = True TupleSeq.ShortCircuit = False ########################################################### seqB2JpsiX.Members += [TupleSeq] seqB2JpsiX.ModeOR = True seqB2JpsiX.ShortCircuit = False from Configurables import EventTuple, TupleToolTrigger evtTuple = EventTuple() evtTuple.ToolList += ["TupleToolEventInfo", "TupleToolTrigger"] #DaVinci().EvtMax = -1 DaVinci().EvtMax = 5000 DaVinci().SkipEvents = -1 DaVinci().DataType = '2011' from Configurables import CondDB