Beispiel #1
0
  ]

LoKi_Vars = LoKi__Hybrid__TupleTool("LoKi_Vars")
LoKi_Vars.Variables =  {

    "LoKi_BPVVDCHI2"    : "BPVVDCHI2"    
    , "LoKi_BPVIPCHI2"    : "BPVIPCHI2()"
    , "LoKi_DOCA"         : "DOCA(1,2)"
    , "LoKi_BPVLTIME"     : "BPVLTIME()"

    }

# "[D+ -> K+ mu+ mu-]cc"
# "[D- -> K+ mu- mu-]cc"

D2KmumuOSTuple = tuple.clone("D2KmumuOSTuple") #updated
D2KmumuOSTuple.Inputs = [ KMuMuOSlocation ] #updated
D2KmumuOSTuple.Decay = "[D+ -> ^K+ ^mu+ ^mu-]CC" #updated
D2KmumuOSTuple.Branches = { "D" :  "[D+ -> K+ mu+ mu-]CC"} #updated
# Instead of D+  
D2KmumuOSTuple.addTool(TupleToolDecay, name="D+") #updated
D2KmumuOSTuple.P2PVInputLocations = ["Phys/D2XMuMu_KOSLine/Particle2VertexRelations"]

D2KmumuSSTuple = tuple.clone("D2KmumuSSTuple") #updated
D2KmumuSSTuple.Inputs = [ KMuMuSSlocation ] #updated
D2KmumuSSTuple.Decay = "[D- -> ^K+ ^mu- ^mu-]CC" #updated
D2KmumuSSTuple.Branches = { "D" :  "[D- -> K+ mu- mu-]CC"} #updated
D2KmumuSSTuple.addTool(TupleToolDecay, name="D-") #updated
D2KmumuSSTuple.P2PVInputLocations = ["Phys/D2XMuMu_KSSLine/Particle2VertexRelations"]

    ,'Hlt2DiMuonDecision'
    ,'Hlt2CharmSemilepD2HMuMuDecision'
    ,'Hlt2CharmSemilepD2HMuMuWideMassDecision'
  ]

LoKi_Vars = LoKi__Hybrid__TupleTool("LoKi_Vars")
LoKi_Vars.Variables =  {

    "LoKi_BPVVDCHI2"    : "BPVVDCHI2"    
    , "LoKi_BPVIPCHI2"    : "BPVIPCHI2()"
    , "LoKi_DOCA"         : "DOCA(1,2)"
    , "LoKi_BPVLTIME"     : "BPVLTIME()"

    }

D2PimumuOSTuple = tuple.clone("D2PimumuOSTuple") 
D2PimumuOSTuple.Inputs = [ PiMuMuOSlocation ] 
D2PimumuOSTuple.Decay = "[D+ -> ^pi+ ^mu+ ^mu-]CC" 
D2PimumuOSTuple.Branches = { "D" :  "[D+ -> pi+ mu+ mu-]CC"} 

D2PimumuOSTuple.addTool(TupleToolDecay, name="D+") 
D2PimumuOSTuple.P2PVInputLocations = ["Phys/D2XMuMu_PiOSLine/Particle2VertexRelations"]

#----------------------------------------                                                                
# 2) Run within DaVinci                                                 
#----------------------------------------

magPol = "Down" 
year = "11" 

DaVinci().RootInTES = rootInTes
# define selection and sequence
from PhysSelPython.Wrappers import Selection, SelectionSequence
from Configurables import FilterDesktop, GaudiSequencer
sel_sub = Selection(name+'SubSel', Algorithm=sub, RequiredSelections=inputs)
filt    = FilterDesktop(name+'Filt', Code=filter)
sel_filt= Selection(name+'FiltSel', Algorithm=filt, RequiredSelections=[sel_sub])

sel_seq = SelectionSequence(name+'SelSeq', TopSelection=sel_filt)
seq     = GaudiSequencer(name+'Seq')
seq.Members += [sel_seq.sequence()]


##### Bs2KKpi0Gamma DTT ##########
decay = 'B_s0 -> ^(phi(1680) -> ^(phi(1020) -> ^K+  ^K-) ^(pi0 -> ^gamma ^gamma)) ^gamma'
dtt_pi0R = dtt.clone(name+'Tuple')
dtt_pi0R.Decay = decay
dtt_pi0R.Branches = { 'B'  : '^('+decay.replace('^','')+')' }

# DTF
dtf_BMFit = dtt_pi0R.addTupleTool("TupleToolDecayTreeFitter/BMassFit")
dtf_BMFit.Verbose = True
dtf_BMFit.UpdateDaughters = True
dtf_BMFit.constrainToOriginVertex = False
dtf_BMFit.daughtersToConstrain = ['B_s0']

dtf_MFit = dtt_pi0R.addTupleTool("TupleToolDecayTreeFitter/MassFit")
dtf_MFit.Verbose = True
dtf_MFit.UpdateDaughters = True
dtf_MFit.constrainToOriginVertex = False
dtf_MFit.daughtersToConstrain = ['pi0']
## Add DecayTreeFitter

from Configurables import TupleToolDecayTreeFitter
TupTmp.B.addTool( TupleToolDecayTreeFitter, name = "DTF" )
TupTmp.B.ToolList += [ "TupleToolDecayTreeFitter/DTF" ]
TupTmp.B.addTool( TupTmp.B.DTF.clone( "DTF_PV",
                                      Verbose = True,
                                      constrainToOriginVertex = True ) )
TupTmp.B.addTool( TupTmp.B.DTF.clone( "DTF_B_PV",
                                      Verbose = True,
                                      constrainToOriginVertex = True,
                                      daughtersToConstrain = [ "B+" ] ) )
TupTmp.B.ToolList += [ "TupleToolDecayTreeFitter/DTF_B_PV" ]

TupTmpNorm = TupTmp.clone("Normalisation")

TupTmp.B.ToolList += [ "TupleToolDecayTreeFitter/DTF_PV" ]
TupTmp.B.addTool( TupTmp.B.DTF.clone( "DTF_Tau_PV",
                                      Verbose = True,
                                      constrainToOriginVertex = True,
                                      daughtersToConstrain = [ "tau+" ] ) )
TupTmp.B.ToolList += [ "TupleToolDecayTreeFitter/DTF_Tau_PV" ]


#### Normalisation tuple

TupTmpNorm.addTool(TupleToolDecay, name="D0")
#TupTmpNorm.addTool(TupleToolDecay, name="K")
TupTmpNorm.addTool(TupleToolDecay, name="pi")
TupTmpNorm.addTool(TupleToolDecay, name="D")
    'Hlt2DiMuonDY2Decision', 'Hlt2DiMuonDY3Decision', 'Hlt2DiMuonDY4Decision',
    'Hlt2DiMuonDetachedDecision', 'Hlt2DiMuonDetachedHeavyDecision',
    'Hlt2DiMuonBDecision', 'Hlt2DiMuonLowMassDecision', 'Hlt2DiMuonDecision',
    'Hlt2CharmSemilepD2HMuMuDecision',
    'Hlt2CharmSemilepD2HMuMuWideMassDecision'
]

LoKi_Vars = LoKi__Hybrid__TupleTool("LoKi_Vars")
LoKi_Vars.Variables = {
    "LoKi_BPVVDCHI2": "BPVVDCHI2",
    "LoKi_BPVIPCHI2": "BPVIPCHI2()",
    "LoKi_DOCA": "DOCA(1,2)",
    "LoKi_BPVLTIME": "BPVLTIME()"
}

D2KmumuOSTuple = tuple.clone("D2KmumuOSTuple")
D2KmumuOSTuple.Inputs = ['Phys/D2XMuMu_PiOSLine/Particles']
D2KmumuOSTuple.Decay = '[D+ -> K+ mu+ mu-]CC'
D2KmumuOSTuple.Branches = {"D": "[D+ -> K+ mu+ mu-]CC"}

D2KmumuOSTuple.addTool(TupleToolDecay, name="D+")
D2KmumuOSTuple.P2PVInputLocations = [
    "Phys/D2XMuMu_KOSLine/Particle2VertexRelations"
]

magPol = "Up"
year = "11"

DaVinci().RootInTES = rootInTes
DaVinci().TupleFile = "MC_D2KMuMu" + year + "_Mag" + magPol + "_NTuples.root"
#DaVinci().Lumi = not DaVinci().Simulation
    'Hlt2DiMuonBDecision',
    'Hlt2DiMuonLowMassDecision',
    'Hlt2DiMuonDecision',
    'Hlt2CharmSemilepD2HMuMuDecision',
    'Hlt2CharmSemilepD2HMuMuWideMassDecision'
]

LoKi_Vars = LoKi__Hybrid__TupleTool("LoKi_Vars")
LoKi_Vars.Variables = {
    "LoKi_BPVVDCHI2": "BPVVDCHI2",
    "LoKi_BPVIPCHI2": "BPVIPCHI2()",
    "LoKi_DOCA": "DOCA(1,2)",
    "LoKi_BPVLTIME": "BPVLTIME()"
}

D2PimumuOSTuple = tuple.clone("D2PimumuOSTuple")
D2PimumuOSTuple.Inputs = [PiMuMuOSlocation]
D2PimumuOSTuple.Decay = "[D+ -> ^pi+ ^mu+ ^mu-]CC"
D2PimumuOSTuple.Branches = {"D": "[D+ -> pi+ mu+ mu-]CC"}

D2PimumuOSTuple.addTool(TupleToolDecay, name="D+")
D2PimumuOSTuple.P2PVInputLocations = [
    "Phys/D2XMuMu_PiOSLine/Particle2VertexRelations"
]

#----------------------------------------
# 2) Run within DaVinci
#----------------------------------------

magPol = "Down"
year = "11"
Beispiel #7
0
myNTUPLE.addTool(TupleToolTISTOS)
myNTUPLE.TupleToolTISTOS.VerboseL0 = True
myNTUPLE.TupleToolTISTOS.VerboseHlt1 = True
myNTUPLE.TupleToolTISTOS.VerboseHlt2 = True
myNTUPLE.TupleToolTISTOS.OutputLevel = WARNING
myNTUPLE.TupleToolTISTOS.FillL0 = True
myNTUPLE.TupleToolTISTOS.FillHlt1 = True
myNTUPLE.TupleToolTISTOS.FillHlt2 = True
myNTUPLE.TupleToolTISTOS.TriggerList = triggerListF
myNTUPLE.TupleToolTISTOS.PIDList = [511, 521, 531, 443, 13, 11, 321]

############################
###     Make    ntuples  ###
############################

B2JpsiKTuple = myNTUPLE.clone("B2JpsiKTuple")
B2JpsiKTuple.Inputs = [B2JpsiKInput]
B2JpsiKTuple.Decay = myDecay

############################
###   DV configuration ####
############################

from Configurables import DaVinci
DaVinci().EvtMax = myEvents  
DaVinci().SkipEvents = 0
DaVinci().DataType = "2011"
DaVinci().Simulation   = True
DaVinci().Lumi   = False
DaVinci().UserAlgorithms = [ mySequencer ]
DaVinci().MoniSequence += [B2JpsiKTuple]