Skip to content
Snippets Groups Projects
Commit b2bc3342 authored by Miguel Fernandez Gomez's avatar Miguel Fernandez Gomez Committed by Chris Burr
Browse files

Adding Ds3PiPhi data samples after bug in AProds

parent 32f015af
No related branches found
No related tags found
1 merge request!2277Adding Ds3PiPhi data samples after bug in AProds
# Add n-tuples to EtaDecays for BDT systematic computations
Create the n-tuples for $D_s^+\to(\phi\to\mu\mu) \pi\pi\pi$ to compute the BDT systematics
of $\pi\pi\mu\mu$ channels.
\ No newline at end of file
from Configurables import DecayTreeTuple, GaudiSequencer, DaVinci
from Configurables import LoKi__Hybrid__DTFDict as DTFDict
from Configurables import LoKi__Hybrid__Dict2Tuple
from Configurables import LoKi__Hybrid__DictOfFunctors
from DecayTreeTuple.Configuration import addBranches
def add_dtf_branches(dtt):
DictTuple = dtt.Ds.addTupleTool(LoKi__Hybrid__Dict2Tuple, "DTFTuple")
DictTuple.addTool(DTFDict, "DTF")
DictTuple.Source = "LoKi::Hybrid::DTFDict/DTF"
DictTuple.NumVar = 10
DictTuple.DTF.constrainToOriginVertex = True
DictTuple.DTF.daughtersToConstrain = ["D_s+"]
DictTuple.DTF.addTool(LoKi__Hybrid__DictOfFunctors, "dict")
DictTuple.DTF.Source = "LoKi::Hybrid::DictOfFunctors/dict"
DictTuple.DTF.dict.Variables = {
"DTFDict_Ds_PT" : "PT",
"DTFDict_Ds_M" : "M",
"DTFDict_phi_PT": "CHILD(PT,1)",
"DTFDict_CHI2" : "DTF_CHI2(True)",
"DTFDict_NDOF" : "DTF_NDOF(True)"
}
for key in ["M", "PX", "PY", "PZ"]:
DictTuple.DTF.dict.Variables.update({
"DTFDict_phi_"+key: "CHILD({0}, 'D_s+ -> pi+ pi- pi+ ^(phi(1020) -> mu+ mu-)')"\
.format(key)})
def add_mother_branches(mother, LoKi_Ds, parname):
'''
Function to add branches to the mother particle
:ntuple: DecayTreeTuple, ntuple object to configure
:LoKi_Ds: dict, contains the tuple tools of all different particles
'''
LoKi_Ds[parname] = mother.addTupleTool("LoKi__Hybrid__TupleTool/LoKi_"+parname)
LoKi_Ds[parname].Variables = {"VCHI2PERDOF": "VFASPF(VCHI2/VDOF)",
"ETA" : "ETA", "PHI": "PHI",
"ADMASS" : "ADMASS('D_s+')",
"BPVIPCHI2" : "BPVIPCHI2()",
"BPVDIRA" : "BPVDIRA",
"BPVVDCHI2" : "BPVVDCHI2",
"DOCA" : "DOCAMAX",
"DOCACHI2" : "DOCACHI2MAX",
}
def add_particle_branches(par, LoKi_Ds, parname):
'''
Function to add branches to the daughter particles
:ntuple: DecayTreeTuple, ntuple object to configure
:LoKi_Ds: dict, contains the tuple tools of all different particles
'''
LoKi_Ds[parname] = par.addTupleTool("LoKi__Hybrid__TupleTool/LoKi_"+parname)
LoKi_Ds[parname].Variables = {"ETA": "ETA", "PHI": "PHI",
"PCOV11" : "PCOV2(1,1)",
"PCOV12" : "PCOV2(1,2)",
"PCOV13" : "PCOV2(1,3)",
"PCOV22" : "PCOV2(2,2)",
"PCOV23" : "PCOV2(2,3)",
"PCOV33" : "PCOV2(3,3)",
"PERR2" : "PERR2",
"PTERR2" : "PTERR2",
"M2ERR2" : "M2ERR2",
"TRCHI2DOF": "TRCHI2DOF",
"MIPCHI2DV": "MIPCHI2DV(PRIMARY)"}
def add_general_branches(ntuple):
'''
Function to add branches to all particles
:ntuple: DecayTreeTuple, ntuple object to configure
:strip: ConfigureStripping, object containing the stripping config info
'''
ntuple.ToolList = ["TupleToolEventInfo",
"TupleToolPropertime",
"TupleToolTrackInfo",
"TupleToolPid",
"TupleToolANNPID",
"TupleToolMuonPid",
"TupleToolGeometry",
"TupleToolKinematic",
"TupleToolRecoStats"]
LoKi_Ds = {}
for par in ["Ds", "phi"]:
add_mother_branches(getattr(ntuple, par), LoKi_Ds, par)
for par in ["pip", "pim", "pi", "mup", "mum"]:
add_particle_branches(getattr(ntuple, par), LoKi_Ds, par)
def add_trigger_branches(ntuple):
'''
Function to add trigger branches
:ntuple: DecayTreeTuple, ntuple object to configure
'''
mytriggerlist = ["L0HadronDecision", "L0MuonDecision",
"Hlt1TrackMVADecision", "Hlt1TwoTrackMVADecision",
"Hlt2TopoMu3BodyDecision", "Hlt2TopoMuMu2BodyDecision",
"Hlt2DiMuonDetachedDecision", "Hlt2TopoMu2BodyDecision"]
ntuple.addTupleTool("TupleToolTISTOS/TISTOSTool")
ntuple.TISTOSTool.VerboseL0 = True
ntuple.TISTOSTool.VerboseHlt1 = True
ntuple.TISTOSTool.VerboseHlt2 = True
ntuple.TISTOSTool.TriggerList = mytriggerlist
dtt = DecayTreeTuple("DTTDsPi3PhiStrip")
dtt.Decay = "D_s+ -> ^pi+ ^pi- ^pi+ ^(phi(1020) -> ^mu+ ^mu-)"
dtt.Inputs = ["Charm/Phys/Etap2pipimumuDs2PhiLine/Particles"]
dtt.addBranches({"Ds": "D_s+ -> pi+ pi- pi+ (phi(1020) -> mu+ mu-)",
"pip": "D_s+ -> ^pi+ pi- pi+ (phi(1020) -> mu+ mu-)",
"pim": "D_s+ -> pi+ ^pi- pi+ (phi(1020) -> mu+ mu-)",
"pi" : "D_s+ -> pi+ pi- ^pi+ (phi(1020) -> mu+ mu-)",
"phi": "D_s+ -> pi+ pi- pi+ ^(phi(1020) -> mu+ mu-)",
"mup": "D_s+ -> pi+ pi- pi+ (phi(1020) -> ^mu+ mu-)",
"mum": "D_s+ -> pi+ pi- pi+ (phi(1020) -> mu+ ^mu-)"})
add_dtf_branches(dtt)
add_general_branches(dtt)
add_trigger_branches(dtt)
gs = GaudiSequencer("myseq")
gs.Members += [dtt]
DaVinci().UserAlgorithms += [gs]
#DaVinci().DataType = "2016"
#DaVinci().Simulation = True
from Configurables import DecayTreeTuple, GaudiSequencer, DaVinci, MCDecayTreeTuple
from Configurables import LoKi__Hybrid__DTFDict as DTFDict
from Configurables import LoKi__Hybrid__Dict2Tuple
from Configurables import LoKi__Hybrid__DictOfFunctors
from DecayTreeTuple.Configuration import addBranches
def add_dtf_branches(dtt):
DictTuple = dtt.Ds.addTupleTool(LoKi__Hybrid__Dict2Tuple, "DTFTuple")
DictTuple.addTool(DTFDict, "DTF")
DictTuple.Source = "LoKi::Hybrid::DTFDict/DTF"
DictTuple.NumVar = 10
DictTuple.DTF.constrainToOriginVertex = True
DictTuple.DTF.daughtersToConstrain = ["D_s+"]
DictTuple.DTF.addTool(LoKi__Hybrid__DictOfFunctors, "dict")
DictTuple.DTF.Source = "LoKi::Hybrid::DictOfFunctors/dict"
DictTuple.DTF.dict.Variables = {
"DTFDict_Ds_PT" : "PT",
"DTFDict_Ds_M" : "M",
"DTFDict_phi_PT": "CHILD(PT,1)",
"DTFDict_CHI2" : "DTF_CHI2(True)",
"DTFDict_NDOF" : "DTF_NDOF(True)"
}
for key in ["M", "PX", "PY", "PZ"]:
DictTuple.DTF.dict.Variables.update({
"DTFDict_phi_"+key: "CHILD({0}, 'D_s+ -> pi+ pi- pi+ ^(phi(1020) -> mu+ mu-)')"\
.format(key)})
def add_mother_branches(mother, LoKi_Ds, parname):
'''
Function to add branches to the mother particle
:ntuple: DecayTreeTuple, ntuple object to configure
:LoKi_Ds: dict, contains the tuple tools of all different particles
'''
LoKi_Ds[parname] = mother.addTupleTool("LoKi__Hybrid__TupleTool/LoKi_"+parname)
LoKi_Ds[parname].Variables = {"VCHI2PERDOF": "VFASPF(VCHI2/VDOF)",
"ETA" : "ETA", "PHI": "PHI",
"ADMASS" : "ADMASS('D_s+')",
"BPVIPCHI2" : "BPVIPCHI2()",
"BPVDIRA" : "BPVDIRA",
"BPVVDCHI2" : "BPVVDCHI2",
"DOCA" : "DOCAMAX",
"DOCACHI2" : "DOCACHI2MAX",
}
def add_particle_branches(par, LoKi_Ds, parname):
'''
Function to add branches to the daughter particles
:ntuple: DecayTreeTuple, ntuple object to configure
:LoKi_Ds: dict, contains the tuple tools of all different particles
'''
LoKi_Ds[parname] = par.addTupleTool("LoKi__Hybrid__TupleTool/LoKi_"+parname)
LoKi_Ds[parname].Variables = {"ETA": "ETA", "PHI": "PHI",
"PCOV11" : "PCOV2(1,1)",
"PCOV12" : "PCOV2(1,2)",
"PCOV13" : "PCOV2(1,3)",
"PCOV22" : "PCOV2(2,2)",
"PCOV23" : "PCOV2(2,3)",
"PCOV33" : "PCOV2(3,3)",
"PERR2" : "PERR2",
"PTERR2" : "PTERR2",
"M2ERR2" : "M2ERR2",
"TRCHI2DOF": "TRCHI2DOF",
"MIPCHI2DV": "MIPCHI2DV(PRIMARY)"}
def add_general_branches(ntuple):
'''
Function to add branches to all particles
:ntuple: DecayTreeTuple, ntuple object to configure
:strip: ConfigureStripping, object containing the stripping config info
'''
ntuple.ToolList = ["TupleToolEventInfo",
"TupleToolPropertime",
"TupleToolTrackInfo",
"TupleToolPid",
"TupleToolANNPID",
"TupleToolMuonPid",
"TupleToolGeometry",
"TupleToolKinematic",
"TupleToolRecoStats"]
LoKi_Ds = {}
for par in ["Ds", "phi"]:
add_mother_branches(getattr(ntuple, par), LoKi_Ds, par)
for par in ["pip", "pim", "pi", "mup", "mum"]:
add_particle_branches(getattr(ntuple, par), LoKi_Ds, par)
def add_trigger_branches(ntuple):
'''
Function to add trigger branches
:ntuple: DecayTreeTuple, ntuple object to configure
'''
mytriggerlist = ["L0HadronDecision", "L0MuonDecision",
"Hlt1TrackMVADecision", "Hlt1TwoTrackMVADecision",
"Hlt2TopoMu3BodyDecision", "Hlt2TopoMuMu2BodyDecision",
"Hlt2DiMuonDetachedDecision", "Hlt2TopoMu2BodyDecision"]
ntuple.addTupleTool("TupleToolTISTOS/TISTOSTool")
ntuple.TISTOSTool.VerboseL0 = True
ntuple.TISTOSTool.VerboseHlt1 = True
ntuple.TISTOSTool.VerboseHlt2 = True
ntuple.TISTOSTool.TriggerList = mytriggerlist
mcdtt = MCDecayTreeTuple("MCDecayTreeTuple")
mcdtt.Decay = "D_s+ => ^pi+ ^pi- ^pi+ ^(phi(1020) ==> ^mu+ ^mu-)"
mcdtt.addBranches({"Ds": "D_s+ => pi+ pi- pi+ (phi(1020) ==> mu+ mu-)",
"pip": "D_s+ => ^pi+ pi- pi+ (phi(1020) ==> mu+ mu-)",
"pim": "D_s+ => pi+ ^pi- pi+ (phi(1020) ==> mu+ mu-)",
"pi" : "D_s+ => pi+ pi- ^pi+ (phi(1020) ==> mu+ mu-)",
"phi": "D_s+ => pi+ pi- pi+ ^(phi(1020) ==> mu+ mu-)",
"mup": "D_s+ => pi+ pi- pi+ (phi(1020) ==> ^mu+ mu-)",
"mum": "D_s+ => pi+ pi- pi+ (phi(1020) ==> mu+ ^mu-)"})
dtt = DecayTreeTuple("DTTDsPi3PhiStrip")
dtt.Decay = "D_s+ -> ^pi+ ^pi- ^pi+ ^(phi(1020) -> ^mu+ ^mu-)"
dtt.Inputs = ["AllStreams/Phys/Etap2pipimumuDs2PhiLine/Particles"]
dtt.addBranches({"Ds": "D_s+ -> pi+ pi- pi+ (phi(1020) -> mu+ mu-)",
"pip": "D_s+ -> ^pi+ pi- pi+ (phi(1020) -> mu+ mu-)",
"pim": "D_s+ -> pi+ ^pi- pi+ (phi(1020) -> mu+ mu-)",
"pi" : "D_s+ -> pi+ pi- ^pi+ (phi(1020) -> mu+ mu-)",
"phi": "D_s+ -> pi+ pi- pi+ ^(phi(1020) -> mu+ mu-)",
"mup": "D_s+ -> pi+ pi- pi+ (phi(1020) -> ^mu+ mu-)",
"mum": "D_s+ -> pi+ pi- pi+ (phi(1020) -> mu+ ^mu-)"})
add_dtf_branches(dtt)
add_general_branches(dtt)
add_trigger_branches(dtt)
gs = GaudiSequencer("myseq")
gs.Members += [mcdtt, dtt]
DaVinci().UserAlgorithms += [gs]
MCDs3PiPhi2016_Down:
application: DaVinci/v44r10p5
input:
bk_query: /MC/2016/Beam6500GeV-2016-MagDown-Nu1.6-25ns-Pythia8/Sim09h/Trig0x6139160F/Reco16/Turbo03a/Stripping28r2NoPrescalingFlagged/23175001/ALLSTREAMS.DST
options:
- ds3piphi_mc.py
output: MCDs3PiPhi.root
MCDs3PiPhi2016_Up:
application: DaVinci/v44r10p5
input:
bk_query: /MC/2016/Beam6500GeV-2016-MagUp-Nu1.6-25ns-Pythia8/Sim09h/Trig0x6139160F/Reco16/Turbo03a/Stripping28r2NoPrescalingFlagged/23175001/ALLSTREAMS.DST
options:
- ds3piphi_mc.py
output: MCDs3PiPhi.root
DataDs3PiPhi2016_Up:
application: DaVinci/v44r10p5
input:
bk_query: /LHCb/Collision16/Beam6500GeV-VeloClosed-MagUp/Real Data/Reco16/Stripping28r2/90000000/CHARM.MDST
options:
- ds3piphi_data.py
output: DataDs3PiPhi.root
DataDs3PiPhi2016_Down:
application: DaVinci/v44r10p5
input:
bk_query: /LHCb/Collision16/Beam6500GeV-VeloClosed-MagDown/Real Data/Reco16/Stripping28r2/90000000/CHARM.MDST
options:
- ds3piphi_data.py
output: DataDs3PiPhi.root
DataDs3PiPhi2017_Down:
application: DaVinci/v42r11p2
input:
bk_query: /LHCb/Collision17/Beam6500GeV-VeloClosed-MagDown/Real Data/Reco17/Stripping29r2p1/90000000/CHARM.MDST
options:
- ds3piphi_data.py
output: DataDs3PiPhi.root
DataDs3PiPhi2017_Up:
application: DaVinci/v42r11p2
input:
bk_query: /LHCb/Collision17/Beam6500GeV-VeloClosed-MagUp/Real Data/Reco17/Stripping29r2p1/90000000/CHARM.MDST
options:
- ds3piphi_data.py
output: DataDs3PiPhi.root
DataDs3PiPhi2018_Down:
application: DaVinci/v44r11p1
input:
bk_query: /LHCb/Collision18/Beam6500GeV-VeloClosed-MagDown/Real Data/Reco18/Stripping34r0p1/90000000/CHARM.MDST
options:
- ds3piphi_data.py
output: DataDs3PiPhi.root
DataDs3PiPhi2018_Up:
application: DaVinci/v44r11p1
input:
bk_query: /LHCb/Collision18/Beam6500GeV-VeloClosed-MagUp/Real Data/Reco18/Stripping34r0p1/90000000/CHARM.MDST
options:
- ds3piphi_data.py
output: DataDs3PiPhi.root
defaults:
inform: miguel.fernandez.gomez@cern.ch
wg: Charm
automatically_configure: true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment