diff --git a/B2DDs12460pRun2/dv_B02DmDspipi.py b/B2DDs12460pRun2/dv_B02DmDspipi.py
new file mode 100644
index 0000000000000000000000000000000000000000..0cbe514bd136ab694afd8dac32c5fc72c5b18956
--- /dev/null
+++ b/B2DDs12460pRun2/dv_B02DmDspipi.py
@@ -0,0 +1,244 @@
+###
+from Gaudi.Configuration import *
+from Configurables import GaudiSequencer
+from Configurables import DaVinci
+from Configurables import  DecayTreeTuple, CheckPV, SubstitutePID, SubPIDMMFilter, FilterInTrees
+from PhysSelPython.Wrappers import AutomaticData, Selection, SelectionSequence, DataOnDemand
+from Configurables import   CombineParticles, FilterDesktop,  OfflineVertexFitter
+from Configurables import DecayTreeTuple, LoKi__Hybrid__TupleTool, TupleToolDecay, TupleToolTrigger, TupleToolTISTOS, TupleToolTagging
+from Configurables import FitDecayTrees, TupleToolGeometry
+from Configurables import DecayTreeTuple, LoKi__Hybrid__TupleTool, TupleToolDecay, TupleToolTrigger, TupleToolTISTOS, TupleToolTagging, TupleToolRecoStats
+from Configurables import FitDecayTrees, TupleToolGeometry
+from Configurables import TupleToolDecayTreeFitter
+from Configurables import LoKi__Hybrid__EvtTupleTool as LoKiTool
+from Configurables import CondDB
+from Configurables import TupleToolMCTruth, TupleToolMCBackgroundInfo 
+
+the_year = DaVinci().DataType
+# get the latest conditions for momenum scale etc.
+CondDB ( LatestGlobalTagByDataType = the_year)
+
+#hlt filters
+from PhysConf.Filters import LoKi_Filters
+fltrs = LoKi_Filters(STRIP_Code = "(HLT_PASS_RE('StrippingB02DDs2460Beauty2CharmLineDecision'))")
+#make the candidates
+
+DaughtCutpi = "(MIPCHI2DV(PRIMARY)>4) & (TRCHI2DOF < 4.0) & (PT>100*MeV) &  (TRGHOSTPROB < 0.5) & (PIDpi>-10)"
+
+from Configurables import LHCb__ParticlePropertySvc as PPS 
+svc = PPS ()
+
+svc.Particles += [
+    "D_s1(2460)+           172       20433   1.0      2.45950000      1e-20                     D_s1+       20433      0.00000000",
+    "D_s1(2460)-           176      -20433  -1.0      2.45950000      1e-20                     D_s1-      -20433      0.00000000",
+]
+
+
+#----------selection D- and Ds+----------------
+location = "Phys/B02DDs2460Beauty2CharmLine/Particles"
+DmFromB = FilterInTrees('DmFromB', Code="('D-'==ABSID)")
+selDmFromB = Selection("selDmFromB",
+        Algorithm = DmFromB,
+        RequiredSelections = [DataOnDemand(location)])
+
+Ds12460FromB = FilterInTrees('Ds12460FromB', Code="('D_s1(2460)+'==ABSID)")
+selDs12460FromB = Selection("selDs12460FromB",
+        Algorithm = Ds12460FromB,
+        RequiredSelections = [DataOnDemand(location)])
+
+subDtoDs = SubstitutePID("subDtoDs",
+        Code="DECTREE('[D_s1(2460)+ -> D+ pi+ pi-]CC')",
+        MaxChi2PerDoF = -1,
+		Substitutions = {
+            'D_s1(2460)+ -> ^D+ pi+ pi-':'D_s+',
+            'D_s1(2460)- -> ^D- pi- pi+':'D_s-'}
+        );
+selDs1FromB = Selection("selDs1FromB",
+        Algorithm = subDtoDs,
+        RequiredSelections = [selDs12460FromB])
+
+
+
+#---- Selection psi(DDs) pi pi----------------------
+_B2DDs1 = CombineParticles( "_B2DDs1",
+	DecayDescriptor = "[B0 -> D- D_s1(2460)+]cc",
+	CombinationCut = "ADAMASS('B0') < 500 *MeV",
+	MotherCut       = "(BPVDIRA > 0.99) & (VFASPF(VCHI2PDOF) < 10) & (BPVVD > 1.5 *mm) & \
+(NINTREE( ISBASIC & HASTRACK & ('K+'==ABSID) & (PROBNNk < 0.1)) < 1) & \
+(NINTREE( ISBASIC & HASTRACK & ('pi+'==ABSID) & (PROBNNpi < 0.1)) < 1) & \
+(BPVLTIME()>0.2*ps) & (BPVIPCHI2()<50)",
+	ReFitPVs        = True )
+
+B2DDs1  = Selection( "B2DDs1",
+	Algorithm          = _B2DDs1 ,
+	RequiredSelections = [ selDmFromB, selDs1FromB ] )
+
+### Gaudi sequence
+SeqB2DDs1 = SelectionSequence("SeqB2DDs1", TopSelection = B2DDs1)
+seq = SeqB2DDs1.sequence()
+
+##DecayTree
+from DecayTreeTuple.Configuration import *
+#Dm Dsp pi pi
+tuple = DecayTreeTuple( "Bz" )
+tuple.Inputs = [ SeqB2DDs1.outputLocation() ]
+tuple.TupleName = "DecayTree"
+
+tuple.Decay = '[^(B0 -> ^(D- -> ^K+ ^pi- ^pi-) ^(D_s1(2460)+ -> ^(D_s+ -> ^K- ^K+ ^pi+) ^pi+ ^pi-))]CC'
+tuple.addBranches({
+   "B"        :  "[^(B0 -> (D- -> K+ pi- pi-) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-))]CC",
+   "D1"       :  "[B0 -> ^(D- -> K+ pi- pi-) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "Ds2460"   :  "[B0 -> (D- -> K+ pi- pi-) ^(D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "D2"       :  "[B0 -> (D- -> K+ pi- pi-) (D_s1(2460)+ -> ^(D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "D1_K"     :  "[B0 -> (D- -> ^K+ pi- pi-) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "D1_pi1"   :  "[B0 -> (D- -> K+ ^pi- pi-) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "D1_pi2"   :  "[B0 -> (D- -> K+ pi- ^pi-) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "D2_K1"    :  "[B0 -> (D- -> K+ pi- pi-) (D_s1(2460)+ -> (D_s+ -> ^K- K+ pi+) pi+ pi-)]CC",
+   "D2_K2"    :  "[B0 -> (D- -> K+ pi- pi-) (D_s1(2460)+ -> (D_s+ -> K- ^K+ pi+) pi+ pi-)]CC",
+   "D2_pi"    :  "[B0 -> (D- -> K+ pi- pi-) (D_s1(2460)+ -> (D_s+ -> K- K+ ^pi+) pi+ pi-)]CC",
+   "pi1"      :  "[B0 -> (D- -> K+ pi- pi-) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) ^pi+ pi-)]CC",
+   "pi2"      :  "[B0 -> (D- -> K+ pi- pi-) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ ^pi-)]CC",
+   })
+
+#add tools
+triglist = [
+        "L0DiMuonDecision","L0ElectronDecision","L0ElectronHiDecision",
+        "L0HadronDecision","L0MuonDecision",
+        "L0PhotonDecision","L0HadronDecision",
+        "Hlt1TrackAllL0Decision","Hlt1TrackMVADecision","Hlt1TwoTrackMVADecision",
+        "Hlt2Topo2BodyBBDTDecision","Hlt2Topo3BodyBBDTDecision","Hlt2Topo4BodyBBDTDecision","Hlt2IncPhiDecision","Hlt2PhiIncPhiDecision",
+        "Hlt2Topo2BodyDecision","Hlt2Topo3BodyDecision","Hlt2Topo4BodyDecision"
+	]
+tistos = TupleToolTISTOS('tistos')
+tistos.VerboseL0   = True
+tistos.VerboseHlt1 = True
+tistos.VerboseHlt2 = True
+tistos.TriggerList = triglist[:]
+
+tupletools = ["TupleToolGeometry",
+        "TupleToolKinematic",
+        "TupleToolEventInfo",
+        "TupleToolPid",
+        "TupleToolTrackInfo",
+        "TupleToolRecoStats",
+        "TupleToolMCTruth",
+        "TupleToolMCBackgroundInfo"
+        ]
+
+tuples = [tuple]
+
+for tup in tuples:
+    names = ['B','Ds2460','D1','D2', 'D1_K', 'D1_pi1', 'D1_pi2', 'D2_K1', 'D2_K2', 'D2_pi', 'pi1', 'pi2']
+    for part in names:
+        tup.addTupleTool(TupleToolDecay, name = part)
+    tup.ToolList+=tupletools
+    tup.B.ToolList = [ "TupleToolPropertime" ]
+    #TISTOS
+    tup.B.addTool(tistos)
+    tup.B.ToolList+=["TupleToolTISTOS/tistos"]
+    #loki
+    tup.ReFitPVs = True
+    LoKi_B=LoKi__Hybrid__TupleTool("LoKi_B")
+    LoKi_B.Variables =  { 
+        "ETA"                  : "ETA",
+	    "Y"                    : "Y",
+	    "LOKI_DTF_CTAU"        : "DTF_CTAU( 0, True )", 
+	    "LOKI_DTF_CHI2NDOF"    : "DTF_CHI2NDOF( True )", 
+	    "LOKI_DTF_CTAUERR"     : "DTF_CTAUERR( 0, True )", 
+        "DOCA12"               : "DOCA(1,2)",
+	} 
+    tup.B.addTool(LoKi_B)         
+    tup.B.ToolList+=["LoKi::Hybrid::TupleTool/LoKi_B"] 
+
+    LoKi_D=LoKi__Hybrid__TupleTool("LoKi_D")
+    LoKi_D.Variables =  { 
+        "ETA"                  : "ETA",
+	    "Y"                    : "Y",
+	    "LOKI_DTF_CTAU"        : "DTF_CTAU( 0, True )", 
+	    "LOKI_DTF_CHI2NDOF"    : "DTF_CHI2NDOF( True )", 
+	    "LOKI_DTF_CTAUERR"     : "DTF_CTAUERR( 0, True )", 
+        "DOCA12"               : "DOCA(1,2)",
+        "DOCA13"               : "DOCA(1,3)",
+        "DOCA23"               : "DOCA(2,3)",
+	} 
+    tup.D1.addTool(LoKi_D)         
+    tup.D1.ToolList+=["LoKi::Hybrid::TupleTool/LoKi_D"] 
+    tup.D2.addTool(LoKi_D)         
+    tup.D2.ToolList+=["LoKi::Hybrid::TupleTool/LoKi_D"] 
+    tup.Ds2460.addTool(LoKi_D)         
+    tup.Ds2460.ToolList+=["LoKi::Hybrid::TupleTool/LoKi_D"] 
+
+    #DTF
+    tup.B.addTupleTool('TupleToolDecayTreeFitter/PVALLFit')
+    tup.B.PVALLFit.UpdateDaughters = True
+    tup.B.PVALLFit.constrainToOriginVertex = True
+    tup.B.PVALLFit.daughtersToConstrain = [ "D-", "D_s+", 'B0' ]
+
+    tup.B.addTupleTool('TupleToolDecayTreeFitter/PVFit')
+    tup.B.PVFit.UpdateDaughters = True
+    tup.B.PVFit.constrainToOriginVertex = True
+
+    tup.B.addTupleTool('TupleToolDecayTreeFitter/PVDauFit')
+    tup.B.PVDauFit.UpdateDaughters = True
+    tup.B.PVDauFit.constrainToOriginVertex = True
+    tup.B.PVDauFit.daughtersToConstrain = [ "D-", "D_s+" ]
+
+    tup.B.addTupleTool('TupleToolDecayTreeFitter/NOPVFit')
+    tup.B.NOPVFit.UpdateDaughters = True
+    tup.B.NOPVFit.constrainToOriginVertex = False
+
+
+    tup.B.addTupleTool('TupleToolDecayTreeFitter/PVTotFit')
+    tup.B.PVTotFit.UpdateDaughters = True
+    tup.B.PVTotFit.constrainToOriginVertex = True
+    tup.B.PVTotFit.daughtersToConstrain = [ "D_s1(2460)+","D-", "D_s+", "B0"]
+
+    tup.B.addTupleTool('TupleToolDecayTreeFitter/PVAllFit')
+    tup.B.PVAllFit.UpdateDaughters = True
+    tup.B.PVAllFit.constrainToOriginVertex = True
+    tup.B.PVAllFit.daughtersToConstrain = [ "D_s1(2460)+","D-", "D_s+"]
+
+    #MC Truth
+    MCTruth = TupleToolMCTruth()
+    MCTruth.ToolList = [ "MCTupleToolKinematic" ,
+          "MCTupleToolHierarchy" ,
+          "MCTupleToolPID"   ]
+    tup.addTool(MCTruth)
+###
+
+
+from Configurables import CheckPV
+checkpv = CheckPV()
+from Configurables import TrackScaleState as SCALER
+scaler = SCALER('Scaler')
+from Configurables import TrackSmearState as SMEAR
+smear = SMEAR('Smear')
+
+###davinci
+DaVinci().EvtMax = -1                       # Number of events
+DaVinci().Simulation   = False
+DaVinci().Lumi = not DaVinci().Simulation
+DaVinci().EventPreFilters = fltrs.filters('Filter')
+DaVinci().UserAlgorithms = [ checkpv, seq, tuple]
+if(DaVinci().Simulation == False):
+    DaVinci().UserAlgorithms += [scaler];
+else:
+    DaVinci().UserAlgorithms += [smear]
+
+
+print("#"*35)
+print(the_year)
+DaVinci().TupleFile = "B02DmDspipi.root"
+DaVinci().PrintFreq = 1000
+locationRoot = "/Event/Bhadron"
+DaVinci().RootInTES = locationRoot
+DaVinci().InputType = 'MDST'
+
+########################################################################
+MessageSvc().Format = "% F%60W%S%7W%R%T %0W%M"
+from Configurables import  DaVinciInit, GetIntegratedLuminosity
+# DaVinciInit().OutputLevel = 6
+# MessageSvc().OutputLevel                  = 6
+GetIntegratedLuminosity().OutputLevel       = INFO
+ToolSvc().OutputLevel                     = 6
+NTupleSvc().OutputLevel                   = 6
diff --git a/B2DDs12460pRun2/dv_B02DstmDspipi.py b/B2DDs12460pRun2/dv_B02DstmDspipi.py
new file mode 100644
index 0000000000000000000000000000000000000000..2def90908da34993b41f1809b2909910eed3b239
--- /dev/null
+++ b/B2DDs12460pRun2/dv_B02DstmDspipi.py
@@ -0,0 +1,256 @@
+###
+from Gaudi.Configuration import *
+from Configurables import GaudiSequencer
+from Configurables import DaVinci
+from Configurables import  DecayTreeTuple, CheckPV, SubstitutePID, SubPIDMMFilter, FilterInTrees
+from PhysSelPython.Wrappers import AutomaticData, Selection, SelectionSequence, DataOnDemand
+from Configurables import   CombineParticles, FilterDesktop,  OfflineVertexFitter
+from Configurables import DecayTreeTuple, LoKi__Hybrid__TupleTool, TupleToolDecay, TupleToolTrigger, TupleToolTISTOS, TupleToolTagging
+from Configurables import FitDecayTrees, TupleToolGeometry
+from Configurables import DecayTreeTuple, LoKi__Hybrid__TupleTool, TupleToolDecay, TupleToolTrigger, TupleToolTISTOS, TupleToolTagging, TupleToolRecoStats
+from Configurables import FitDecayTrees, TupleToolGeometry
+from Configurables import TupleToolDecayTreeFitter
+from Configurables import LoKi__Hybrid__EvtTupleTool as LoKiTool
+from Configurables import CondDB
+from Configurables import TupleToolMCTruth, TupleToolMCBackgroundInfo 
+
+the_year = DaVinci().DataType
+# get the latest conditions for momenum scale etc.
+CondDB ( LatestGlobalTagByDataType = the_year)
+
+#hlt filters
+from PhysConf.Filters import LoKi_Filters
+fltrs = LoKi_Filters(STRIP_Code = "(HLT_PASS_RE('StrippingB02DstDs2460Beauty2CharmLineDecision'))")
+#make the candidates
+
+DaughtCutpi = "(MIPCHI2DV(PRIMARY)>4) & (TRCHI2DOF < 4.0) & (PT>100*MeV) &  (TRGHOSTPROB < 0.5) & (PIDpi>-10)"
+
+from Configurables import LHCb__ParticlePropertySvc as PPS 
+svc = PPS ()
+
+svc.Particles += [
+    "D_s1(2460)+           172       20433   1.0      2.45950000      1e-20                     D_s1+       20433      0.00000000",
+    "D_s1(2460)-           176      -20433  -1.0      2.45950000      1e-20                     D_s1-      -20433      0.00000000",
+]
+
+
+#----------selection D- and Ds+----------------
+location = "Phys/B02DstDs2460Beauty2CharmLine/Particles"
+DstFromB = FilterInTrees('DstFromB', Code="('D*(2010)+'==ABSID)")
+selDstFromB = Selection("selDstFromB",
+        Algorithm = DstFromB,
+        RequiredSelections = [DataOnDemand(location)])
+
+Ds12460FromB = FilterInTrees('Ds12460FromB', Code="('D_s1(2460)+'==ABSID)")
+selDs12460FromB = Selection("selDs12460FromB",
+        Algorithm = Ds12460FromB,
+        RequiredSelections = [DataOnDemand(location)])
+
+subDtoDs = SubstitutePID("subDtoDs",
+        Code="DECTREE('[D_s1(2460)+ -> D+ pi+ pi-]CC')",
+        MaxChi2PerDoF = -1,
+		Substitutions = {
+            'D_s1(2460)+ -> ^D+ pi+ pi-':'D_s+',
+            'D_s1(2460)- -> ^D- pi- pi+':'D_s-'}
+        );
+selDs1FromB = Selection("selDs1FromB",
+        Algorithm = subDtoDs,
+        RequiredSelections = [selDs12460FromB])
+
+
+
+#---- Selection psi(DDs) pi pi----------------------
+_B2DDs1 = CombineParticles( "_B2DDs1",
+	DecayDescriptor = "[B0 -> D*(2010)- D_s1(2460)+]cc",
+	CombinationCut = "ADAMASS('B0') < 500 *MeV",
+	MotherCut       = "(BPVDIRA > 0.99) & (VFASPF(VCHI2PDOF) < 10) & (BPVVD > 1.5 *mm) & \
+(NINTREE( ISBASIC & HASTRACK & ('K+'==ABSID) & (PROBNNk < 0.1)) < 1) & \
+(NINTREE( ISBASIC & HASTRACK & ('pi+'==ABSID) & (PROBNNpi < 0.1)) < 1) & \
+(BPVLTIME()>0.2*ps) & (BPVIPCHI2()<50)",
+	ReFitPVs        = True )
+
+B2DDs1  = Selection( "B2DDs1",
+	Algorithm          = _B2DDs1 ,
+	RequiredSelections = [ selDstFromB, selDs1FromB ] )
+
+### Gaudi sequence
+SeqB2DDs1 = SelectionSequence("SeqB2DDs1", TopSelection = B2DDs1)
+seq = SeqB2DDs1.sequence()
+
+##DecayTree
+from DecayTreeTuple.Configuration import *
+#Dm Dsp pi pi
+tuple = DecayTreeTuple( "Dst" )
+tuple.Inputs = [ SeqB2DDs1.outputLocation() ]
+tuple.TupleName = "DecayTree"
+
+tuple.Decay = '[^(B0 -> ^(D*(2010)- -> ^pi- ^([D0]CC -> ^K+ ^pi-)) ^(D_s1(2460)+ -> ^(D_s+ -> ^K- ^K+ ^pi+) ^pi+ ^pi-))]CC'
+tuple.addBranches({
+   "B"        :  "[^(B0 -> (D*(2010)- -> pi- ([D0]CC -> K+ pi-)) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-))]CC",
+   "D1"       :  "[B0 -> ^(D*(2010)- -> pi- ([D0]CC -> K+ pi-)) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "D1_D"     :  "[B0 -> (D*(2010)- -> pi- ^([D0]CC -> K+ pi-)) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "D1_pi"    :  "[B0 -> (D*(2010)- -> ^pi- ([D0]CC -> K+ pi-)) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "Ds2460"   :  "[B0 -> (D*(2010)- -> pi- ([D0]CC -> K+ pi-)) ^(D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "D2"       :  "[B0 -> (D*(2010)- -> pi- ([D0]CC -> K+ pi-)) (D_s1(2460)+ -> ^(D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "D1_D_K"   :  "[B0 -> (D*(2010)- -> pi- ([D0]CC -> ^K+ pi-)) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "D1_D_pi"  :  "[B0 -> (D*(2010)- -> pi- ([D0]CC -> K+ ^pi-)) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "D2_K1"    :  "[B0 -> (D*(2010)- -> pi- ([D0]CC -> K+ pi-)) (D_s1(2460)+ -> (D_s+ -> ^K- K+ pi+) pi+ pi-)]CC",
+   "D2_K2"    :  "[B0 -> (D*(2010)- -> pi- ([D0]CC -> K+ pi-)) (D_s1(2460)+ -> (D_s+ -> K- ^K+ pi+) pi+ pi-)]CC",
+   "D2_pi"    :  "[B0 -> (D*(2010)- -> pi- ([D0]CC -> K+ pi-)) (D_s1(2460)+ -> (D_s+ -> K- K+ ^pi+) pi+ pi-)]CC",
+   "pi1"      :  "[B0 -> (D*(2010)- -> pi- ([D0]CC -> K+ pi-)) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) ^pi+ pi-)]CC",
+   "pi2"      :  "[B0 -> (D*(2010)- -> pi- ([D0]CC -> K+ pi-)) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ ^pi-)]CC",
+   })
+
+#add tools
+triglist = [
+        "L0DiMuonDecision","L0ElectronDecision","L0ElectronHiDecision",
+        "L0HadronDecision","L0MuonDecision",
+        "L0PhotonDecision","L0HadronDecision",
+        "Hlt1TrackAllL0Decision","Hlt1TrackMVADecision","Hlt1TwoTrackMVADecision",
+        "Hlt2Topo2BodyBBDTDecision","Hlt2Topo3BodyBBDTDecision","Hlt2Topo4BodyBBDTDecision","Hlt2IncPhiDecision","Hlt2PhiIncPhiDecision",
+        "Hlt2Topo2BodyDecision","Hlt2Topo3BodyDecision","Hlt2Topo4BodyDecision"
+	]
+tistos = TupleToolTISTOS('tistos')
+tistos.VerboseL0   = True
+tistos.VerboseHlt1 = True
+tistos.VerboseHlt2 = True
+tistos.TriggerList = triglist[:]
+
+tupletools = ["TupleToolGeometry",
+        "TupleToolKinematic",
+        "TupleToolEventInfo",
+        "TupleToolPid",
+        "TupleToolTrackInfo",
+        "TupleToolRecoStats",
+        "TupleToolMCTruth",
+        "TupleToolMCBackgroundInfo"
+        ]
+
+tuples = [tuple]
+
+for tup in tuples:
+    names = ['B','D1', 'D1_D', 'D1_pi', 'Ds2460', 'D2', 'D1_D_K', 'D1_D_pi', 'D2_K1', 'D2_K2', 'D2_pi', 'pi1', 'pi2']
+    for part in names:
+        tup.addTupleTool(TupleToolDecay, name = part)
+    tup.ToolList+=tupletools
+    tup.B.ToolList = [ "TupleToolPropertime" ]
+    #TISTOS
+    tup.B.addTool(tistos)
+    tup.B.ToolList+=["TupleToolTISTOS/tistos"]
+    #loki
+    tup.ReFitPVs = True
+    LoKi_B=LoKi__Hybrid__TupleTool("LoKi_B")
+    LoKi_B.Variables =  { 
+        "ETA"                  : "ETA",
+	    "Y"                    : "Y",
+	    "LOKI_DTF_CTAU"        : "DTF_CTAU( 0, True )", 
+	    "LOKI_DTF_CHI2NDOF"    : "DTF_CHI2NDOF( True )", 
+	    "LOKI_DTF_CTAUERR"     : "DTF_CTAUERR( 0, True )", 
+        "DOCA12"               : "DOCA(1,2)",
+	} 
+    tup.B.addTool(LoKi_B)         
+    tup.B.ToolList+=["LoKi::Hybrid::TupleTool/LoKi_B"] 
+
+    LoKi_D=LoKi__Hybrid__TupleTool("LoKi_D")
+    LoKi_D.Variables =  { 
+        "ETA"                  : "ETA",
+	    "Y"                    : "Y",
+	    "LOKI_DTF_CTAU"        : "DTF_CTAU( 0, True )", 
+	    "LOKI_DTF_CHI2NDOF"    : "DTF_CHI2NDOF( True )", 
+	    "LOKI_DTF_CTAUERR"     : "DTF_CTAUERR( 0, True )", 
+        "DOCA12"               : "DOCA(1,2)",
+        "DOCA13"               : "DOCA(1,3)",
+        "DOCA23"               : "DOCA(2,3)",
+	} 
+    LoKi_D0=LoKi__Hybrid__TupleTool("LoKi_D0")
+    LoKi_D0.Variables =  { 
+        "ETA"                  : "ETA",
+	    "Y"                    : "Y",
+	    "LOKI_DTF_CTAU"        : "DTF_CTAU( 0, True )", 
+	    "LOKI_DTF_CHI2NDOF"    : "DTF_CHI2NDOF( True )", 
+	    "LOKI_DTF_CTAUERR"     : "DTF_CTAUERR( 0, True )", 
+        "DOCA12"               : "DOCA(1,2)",
+	} 
+
+    tup.D1.addTool(LoKi_D0)         
+    tup.D1.ToolList+=["LoKi::Hybrid::TupleTool/LoKi_D0"] 
+    tup.D1_D.addTool(LoKi_D0)         
+    tup.D1_D.ToolList+=["LoKi::Hybrid::TupleTool/LoKi_D0"] 
+    tup.D2.addTool(LoKi_D)         
+    tup.D2.ToolList+=["LoKi::Hybrid::TupleTool/LoKi_D"] 
+    tup.Ds2460.addTool(LoKi_D)         
+    tup.Ds2460.ToolList+=["LoKi::Hybrid::TupleTool/LoKi_D"] 
+
+    #DTF
+    tup.B.addTupleTool('TupleToolDecayTreeFitter/PVALLFit')
+    tup.B.PVALLFit.UpdateDaughters = True
+    tup.B.PVALLFit.constrainToOriginVertex = True
+    tup.B.PVALLFit.daughtersToConstrain = [ "D*(2010)+", "D0", "D_s+", "B0" ]
+
+    tup.B.addTupleTool('TupleToolDecayTreeFitter/PVFit')
+    tup.B.PVFit.UpdateDaughters = True
+    tup.B.PVFit.constrainToOriginVertex = True
+
+    tup.B.addTupleTool('TupleToolDecayTreeFitter/PVDauFit')
+    tup.B.PVDauFit.UpdateDaughters = True
+    tup.B.PVDauFit.constrainToOriginVertex = True
+    tup.B.PVDauFit.daughtersToConstrain = [ "D*(2010)+", "D0", "D_s+" ]
+
+    tup.B.addTupleTool('TupleToolDecayTreeFitter/NOPVFit')
+    tup.B.NOPVFit.UpdateDaughters = True
+    tup.B.NOPVFit.constrainToOriginVertex = False
+
+
+    tup.B.addTupleTool('TupleToolDecayTreeFitter/PVTotFit')
+    tup.B.PVTotFit.UpdateDaughters = True
+    tup.B.PVTotFit.constrainToOriginVertex = True
+    tup.B.PVTotFit.daughtersToConstrain = [ "D_s1(2460)+", "D*(2010)+", "D0", "D_s+", "B0"]
+
+    tup.B.addTupleTool('TupleToolDecayTreeFitter/PVAllFit')
+    tup.B.PVAllFit.UpdateDaughters = True
+    tup.B.PVAllFit.constrainToOriginVertex = True
+    tup.B.PVAllFit.daughtersToConstrain = [ "D_s1(2460)+", "D*(2010)+", "D0", "D_s+"]
+
+    #MC Truth
+    MCTruth = TupleToolMCTruth()
+    MCTruth.ToolList = [ "MCTupleToolKinematic" ,
+          "MCTupleToolHierarchy" ,
+          "MCTupleToolPID"   ]
+    tup.addTool(MCTruth)
+###
+
+
+from Configurables import CheckPV
+checkpv = CheckPV()
+from Configurables import TrackScaleState as SCALER
+scaler = SCALER('Scaler')
+from Configurables import TrackSmearState as SMEAR
+smear = SMEAR('Smear')
+
+###davinci
+DaVinci().EvtMax = -1                       # Number of events
+DaVinci().Simulation   = False
+DaVinci().Lumi = not DaVinci().Simulation
+DaVinci().EventPreFilters = fltrs.filters('Filter')
+DaVinci().UserAlgorithms = [ checkpv, seq, tuple]
+if(DaVinci().Simulation == False):
+    DaVinci().UserAlgorithms += [scaler];
+else:
+    DaVinci().UserAlgorithms += [smear]
+
+
+#CondDB.LatestGlobalTagsByDataType = '2011'
+DaVinci().TupleFile = "B02DstmDspipi.root"
+DaVinci().PrintFreq = 1000
+locationRoot = "/Event/Bhadron"
+DaVinci().RootInTES = locationRoot
+DaVinci().InputType = 'MDST'
+
+########################################################################
+MessageSvc().Format = "% F%60W%S%7W%R%T %0W%M"
+from Configurables import  DaVinciInit, GetIntegratedLuminosity
+# DaVinciInit().OutputLevel = 6
+# MessageSvc().OutputLevel                  = 6
+GetIntegratedLuminosity().OutputLevel       = INFO
+ToolSvc().OutputLevel                     = 6
+NTupleSvc().OutputLevel                   = 6
diff --git a/B2DDs12460pRun2/dv_B02DstmK3piDspipi.py b/B2DDs12460pRun2/dv_B02DstmK3piDspipi.py
new file mode 100644
index 0000000000000000000000000000000000000000..0617b67aff5debcef95d640497da9abfd2ac2183
--- /dev/null
+++ b/B2DDs12460pRun2/dv_B02DstmK3piDspipi.py
@@ -0,0 +1,273 @@
+###
+from Gaudi.Configuration import *
+from Configurables import GaudiSequencer
+from Configurables import DaVinci
+from Configurables import  DecayTreeTuple, CheckPV, SubstitutePID, SubPIDMMFilter, FilterInTrees
+from PhysSelPython.Wrappers import AutomaticData, Selection, SelectionSequence, DataOnDemand
+from Configurables import   CombineParticles, FilterDesktop,  OfflineVertexFitter
+from Configurables import DecayTreeTuple, LoKi__Hybrid__TupleTool, TupleToolDecay, TupleToolTrigger, TupleToolTISTOS, TupleToolTagging
+from Configurables import FitDecayTrees, TupleToolGeometry
+from Configurables import DecayTreeTuple, LoKi__Hybrid__TupleTool, TupleToolDecay, TupleToolTrigger, TupleToolTISTOS, TupleToolTagging, TupleToolRecoStats
+from Configurables import FitDecayTrees, TupleToolGeometry
+from Configurables import TupleToolDecayTreeFitter
+from Configurables import LoKi__Hybrid__EvtTupleTool as LoKiTool
+from Configurables import CondDB
+from Configurables import TupleToolMCTruth, TupleToolMCBackgroundInfo 
+
+the_year = DaVinci().DataType
+# get the latest conditions for momenum scale etc.
+CondDB ( LatestGlobalTagByDataType = the_year)
+
+#hlt filters
+from PhysConf.Filters import LoKi_Filters
+fltrs = LoKi_Filters(STRIP_Code = "(HLT_PASS_RE('StrippingB02DstDs2460DstarD02K3PiBeauty2CharmLineDecision'))")
+#make the candidates
+
+DaughtCutpi = "(MIPCHI2DV(PRIMARY)>4) & (TRCHI2DOF < 4.0) & (PT>100*MeV) &  (TRGHOSTPROB < 0.5) & (PIDpi>-10)"
+
+from Configurables import LHCb__ParticlePropertySvc as PPS 
+svc = PPS ()
+
+svc.Particles += [
+    "D_s1(2460)+           172       20433   1.0      2.45950000      1e-20                     D_s1+       20433      0.00000000",
+    "D_s1(2460)-           176      -20433  -1.0      2.45950000      1e-20                     D_s1-      -20433      0.00000000",
+]
+
+
+#----------selection D- and Ds+----------------
+location = "Phys/B02DstDs2460DstarD02K3PiBeauty2CharmLine/Particles"
+DstFromB = FilterInTrees('DstFromB', Code="('D*(2010)+'==ABSID)")
+selDstFromB = Selection("selDstFromB",
+        Algorithm = DstFromB,
+        RequiredSelections = [DataOnDemand(location)])
+
+Ds12460FromB = FilterInTrees('Ds12460FromB', Code="('D_s1(2460)+'==ABSID)")
+selDs12460FromB = Selection("selDs12460FromB",
+        Algorithm = Ds12460FromB,
+        RequiredSelections = [DataOnDemand(location)])
+
+subDtoDs = SubstitutePID("subDtoDs",
+        Code="DECTREE('[D_s1(2460)+ -> D+ pi+ pi-]CC')",
+        MaxChi2PerDoF = -1,
+		Substitutions = {
+            'D_s1(2460)+ -> ^D+ pi+ pi-':'D_s+',
+            'D_s1(2460)- -> ^D- pi- pi+':'D_s-'}
+        );
+selDs1FromB = Selection("selDs1FromB",
+        Algorithm = subDtoDs,
+        RequiredSelections = [selDs12460FromB])
+
+
+
+#---- Selection psi(DDs) pi pi----------------------
+_B2DDs1 = CombineParticles( "_B2DDs1",
+	DecayDescriptor = "[B0 -> D*(2010)- D_s1(2460)+]cc",
+	CombinationCut = "ADAMASS('B0') < 500 *MeV",
+	MotherCut       = "(BPVDIRA > 0.99) & (VFASPF(VCHI2PDOF) < 10) & (BPVVD > 1.5 *mm) & \
+(NINTREE( ISBASIC & HASTRACK & ('K+'==ABSID) & (PROBNNk < 0.1)) < 1) & \
+(NINTREE( ISBASIC & HASTRACK & ('pi+'==ABSID) & (PROBNNpi < 0.1)) < 1) & \
+(BPVLTIME()>0.2*ps) & (BPVIPCHI2()<50)",
+	ReFitPVs        = True )
+
+B2DDs1  = Selection( "B2DDs1",
+	Algorithm          = _B2DDs1 ,
+	RequiredSelections = [ selDstFromB, selDs1FromB ] )
+
+### Gaudi sequence
+SeqB2DDs1 = SelectionSequence("SeqB2DDs1", TopSelection = B2DDs1)
+seq = SeqB2DDs1.sequence()
+
+##DecayTree
+from DecayTreeTuple.Configuration import *
+#Dm Dsp pi pi
+tuple = DecayTreeTuple( "Dst" )
+tuple.Inputs = [ SeqB2DDs1.outputLocation() ]
+tuple.TupleName = "DecayTree"
+
+tuple.Decay = '[^(B0 -> ^(D*(2010)- -> ^pi- ^([D0]CC -> ^K+ ^pi- ^pi+ ^pi-)) ^(D_s1(2460)+ -> ^(D_s+ -> ^K- ^K+ ^pi+) ^pi+ ^pi-))]CC'
+tuple.addBranches({
+   "B"        :  "[^(B0 -> (D*(2010)- -> pi- ([D0]CC -> K+ pi- pi+ pi-)) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-))]CC",
+   "D1"       :  "[B0 -> ^(D*(2010)- -> pi- ([D0]CC -> K+ pi- pi+ pi-)) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "D1_D"     :  "[B0 -> (D*(2010)- -> pi- ^([D0]CC -> K+ pi- pi+ pi-)) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "D1_pi"    :  "[B0 -> (D*(2010)- -> ^pi- ([D0]CC -> K+ pi- pi+ pi-)) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "Ds2460"   :  "[B0 -> (D*(2010)- -> pi- ([D0]CC -> K+ pi- pi+ pi-)) ^(D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "D2"       :  "[B0 -> (D*(2010)- -> pi- ([D0]CC -> K+ pi- pi+ pi-)) (D_s1(2460)+ -> ^(D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "D1_D_K"   :  "[B0 -> (D*(2010)- -> pi- ([D0]CC -> ^K+ pi- pi+ pi-)) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "D1_D_pi1" :  "[B0 -> (D*(2010)- -> pi- ([D0]CC -> K+ ^pi- pi+ pi-)) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "D1_D_pi2" :  "[B0 -> (D*(2010)- -> pi- ([D0]CC -> K+ pi- ^pi+ pi-)) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "D1_D_pi3" :  "[B0 -> (D*(2010)- -> pi- ([D0]CC -> K+ pi- pi+ ^pi-)) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "D2_K1"    :  "[B0 -> (D*(2010)- -> pi- ([D0]CC -> K+ pi- pi+ pi-)) (D_s1(2460)+ -> (D_s+ -> ^K- K+ pi+) pi+ pi-)]CC",
+   "D2_K2"    :  "[B0 -> (D*(2010)- -> pi- ([D0]CC -> K+ pi- pi+ pi-)) (D_s1(2460)+ -> (D_s+ -> K- ^K+ pi+) pi+ pi-)]CC",
+   "D2_pi"    :  "[B0 -> (D*(2010)- -> pi- ([D0]CC -> K+ pi- pi+ pi-)) (D_s1(2460)+ -> (D_s+ -> K- K+ ^pi+) pi+ pi-)]CC",
+   "pi1"      :  "[B0 -> (D*(2010)- -> pi- ([D0]CC -> K+ pi- pi+ pi-)) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) ^pi+ pi-)]CC",
+   "pi2"      :  "[B0 -> (D*(2010)- -> pi- ([D0]CC -> K+ pi- pi+ pi-)) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ ^pi-)]CC",
+   })
+
+#add tools
+triglist = [
+        "L0DiMuonDecision","L0ElectronDecision","L0ElectronHiDecision",
+        "L0HadronDecision","L0MuonDecision",
+        "L0PhotonDecision","L0HadronDecision",
+        "Hlt1TrackAllL0Decision","Hlt1TrackMVADecision","Hlt1TwoTrackMVADecision",
+        "Hlt2Topo2BodyBBDTDecision","Hlt2Topo3BodyBBDTDecision","Hlt2Topo4BodyBBDTDecision","Hlt2IncPhiDecision","Hlt2PhiIncPhiDecision",
+        "Hlt2Topo2BodyDecision","Hlt2Topo3BodyDecision","Hlt2Topo4BodyDecision"
+	]
+tistos = TupleToolTISTOS('tistos')
+tistos.VerboseL0   = True
+tistos.VerboseHlt1 = True
+tistos.VerboseHlt2 = True
+tistos.TriggerList = triglist[:]
+
+tupletools = ["TupleToolGeometry",
+        "TupleToolKinematic",
+        "TupleToolEventInfo",
+        "TupleToolPid",
+        "TupleToolTrackInfo",
+        "TupleToolRecoStats",
+        "TupleToolMCTruth",
+        "TupleToolMCBackgroundInfo"
+        ]
+
+tuples = [tuple]
+
+for tup in tuples:
+    names = ['B','D1', 'D1_D', 'D1_pi', 'Ds2460', 'D2', 'D1_D_K', 'D1_D_pi', 'D2_K1', 'D2_K2', 'D2_pi', 'pi1', 'pi2']
+    for part in names:
+        tup.addTupleTool(TupleToolDecay, name = part)
+    tup.ToolList+=tupletools
+    tup.B.ToolList = [ "TupleToolPropertime" ]
+    #TISTOS
+    tup.B.addTool(tistos)
+    tup.B.ToolList+=["TupleToolTISTOS/tistos"]
+    #loki
+    tup.ReFitPVs = True
+    LoKi_B=LoKi__Hybrid__TupleTool("LoKi_B")
+    LoKi_B.Variables =  { 
+        "ETA"                  : "ETA",
+	    "Y"                    : "Y",
+	    "LOKI_DTF_CTAU"        : "DTF_CTAU( 0, True )", 
+	    "LOKI_DTF_CHI2NDOF"    : "DTF_CHI2NDOF( True )", 
+	    "LOKI_DTF_CTAUERR"     : "DTF_CTAUERR( 0, True )", 
+        "DOCA12"               : "DOCA(1,2)",
+	} 
+    tup.B.addTool(LoKi_B)         
+    tup.B.ToolList+=["LoKi::Hybrid::TupleTool/LoKi_B"] 
+
+    LoKi_D=LoKi__Hybrid__TupleTool("LoKi_D")
+    LoKi_D.Variables =  { 
+        "ETA"                  : "ETA",
+	    "Y"                    : "Y",
+	    "LOKI_DTF_CTAU"        : "DTF_CTAU( 0, True )", 
+	    "LOKI_DTF_CHI2NDOF"    : "DTF_CHI2NDOF( True )", 
+	    "LOKI_DTF_CTAUERR"     : "DTF_CTAUERR( 0, True )", 
+        "DOCA12"               : "DOCA(1,2)",
+        "DOCA13"               : "DOCA(1,3)",
+        "DOCA23"               : "DOCA(2,3)",
+	} 
+    LoKi_Dst=LoKi__Hybrid__TupleTool("LoKi_Dst")
+    LoKi_Dst.Variables =  { 
+        "ETA"                  : "ETA",
+	    "Y"                    : "Y",
+	    "LOKI_DTF_CTAU"        : "DTF_CTAU( 0, True )", 
+	    "LOKI_DTF_CHI2NDOF"    : "DTF_CHI2NDOF( True )", 
+	    "LOKI_DTF_CTAUERR"     : "DTF_CTAUERR( 0, True )", 
+        "DOCA12"               : "DOCA(1,2)",
+	} 
+    LoKi_D0=LoKi__Hybrid__TupleTool("LoKi_D0")
+    LoKi_D0.Variables =  { 
+        "ETA"                  : "ETA",
+	    "Y"                    : "Y",
+	    "LOKI_DTF_CTAU"        : "DTF_CTAU( 0, True )", 
+	    "LOKI_DTF_CHI2NDOF"    : "DTF_CHI2NDOF( True )", 
+	    "LOKI_DTF_CTAUERR"     : "DTF_CTAUERR( 0, True )", 
+        "DOCA12"               : "DOCA(1,2)",
+        "DOCA13"               : "DOCA(1,3)",
+        "DOCA14"               : "DOCA(1,4)",
+        "DOCA23"               : "DOCA(2,3)",
+        "DOCA24"               : "DOCA(2,4)",
+        "DOCA34"               : "DOCA(3,4)",
+	} 
+
+    tup.D1.addTool(LoKi_Dst)         
+    tup.D1.ToolList+=["LoKi::Hybrid::TupleTool/LoKi_Dst"] 
+    tup.D1_D.addTool(LoKi_D0)         
+    tup.D1_D.ToolList+=["LoKi::Hybrid::TupleTool/LoKi_D0"] 
+    tup.D2.addTool(LoKi_D)         
+    tup.D2.ToolList+=["LoKi::Hybrid::TupleTool/LoKi_D"] 
+    tup.Ds2460.addTool(LoKi_D)         
+    tup.Ds2460.ToolList+=["LoKi::Hybrid::TupleTool/LoKi_D"] 
+
+
+    #DTF
+    tup.B.addTupleTool('TupleToolDecayTreeFitter/PVALLFit')
+    tup.B.PVALLFit.UpdateDaughters = True
+    tup.B.PVALLFit.constrainToOriginVertex = True
+    tup.B.PVALLFit.daughtersToConstrain = [ "D*(2010)+", "D0", "D_s+", "B0" ]
+
+    tup.B.addTupleTool('TupleToolDecayTreeFitter/PVFit')
+    tup.B.PVFit.UpdateDaughters = True
+    tup.B.PVFit.constrainToOriginVertex = True
+
+    tup.B.addTupleTool('TupleToolDecayTreeFitter/PVDauFit')
+    tup.B.PVDauFit.UpdateDaughters = True
+    tup.B.PVDauFit.constrainToOriginVertex = True
+    tup.B.PVDauFit.daughtersToConstrain = [ "D*(2010)+", "D0", "D_s+" ]
+
+    tup.B.addTupleTool('TupleToolDecayTreeFitter/NOPVFit')
+    tup.B.NOPVFit.UpdateDaughters = True
+    tup.B.NOPVFit.constrainToOriginVertex = False
+
+
+    tup.B.addTupleTool('TupleToolDecayTreeFitter/PVTotFit')
+    tup.B.PVTotFit.UpdateDaughters = True
+    tup.B.PVTotFit.constrainToOriginVertex = True
+    tup.B.PVTotFit.daughtersToConstrain = [ "D_s1(2460)+", "D*(2010)+", "D0", "D_s+", "B0"]
+
+    tup.B.addTupleTool('TupleToolDecayTreeFitter/PVAllFit')
+    tup.B.PVAllFit.UpdateDaughters = True
+    tup.B.PVAllFit.constrainToOriginVertex = True
+    tup.B.PVAllFit.daughtersToConstrain = [ "D_s1(2460)+", "D*(2010)+", "D0", "D_s+"]
+
+    #MC Truth
+    MCTruth = TupleToolMCTruth()
+    MCTruth.ToolList = [ "MCTupleToolKinematic" ,
+          "MCTupleToolHierarchy" ,
+          "MCTupleToolPID"   ]
+    tup.addTool(MCTruth)
+###
+
+
+from Configurables import CheckPV
+checkpv = CheckPV()
+from Configurables import TrackScaleState as SCALER
+scaler = SCALER('Scaler')
+from Configurables import TrackSmearState as SMEAR
+smear = SMEAR('Smear')
+
+###davinci
+DaVinci().EvtMax = -1                       # Number of events
+DaVinci().Simulation   = False
+DaVinci().Lumi = not DaVinci().Simulation
+DaVinci().EventPreFilters = fltrs.filters('Filter')
+DaVinci().UserAlgorithms = [ checkpv, seq, tuple]
+if(DaVinci().Simulation == False):
+    DaVinci().UserAlgorithms += [scaler];
+else:
+    DaVinci().UserAlgorithms += [smear]
+
+
+#CondDB.LatestGlobalTagsByDataType = '2011'
+DaVinci().TupleFile = "B02DstmK3piDspipi.root"
+DaVinci().PrintFreq = 1000
+locationRoot = "/Event/Bhadron"
+DaVinci().RootInTES = locationRoot
+DaVinci().InputType = 'MDST'
+
+########################################################################
+MessageSvc().Format = "% F%60W%S%7W%R%T %0W%M"
+from Configurables import  DaVinciInit, GetIntegratedLuminosity
+# DaVinciInit().OutputLevel = 6
+# MessageSvc().OutputLevel                  = 6
+GetIntegratedLuminosity().OutputLevel       = INFO
+ToolSvc().OutputLevel                     = 6
+NTupleSvc().OutputLevel                   = 6
diff --git a/B2DDs12460pRun2/dv_Bp2D0Dspipi.py b/B2DDs12460pRun2/dv_Bp2D0Dspipi.py
new file mode 100644
index 0000000000000000000000000000000000000000..06d8ded5f8efa8e961241fb5e6b8de4983dc2a24
--- /dev/null
+++ b/B2DDs12460pRun2/dv_Bp2D0Dspipi.py
@@ -0,0 +1,264 @@
+###
+from Gaudi.Configuration import *
+from Configurables import GaudiSequencer
+from Configurables import DaVinci
+from Configurables import  DecayTreeTuple, CheckPV, SubstitutePID, SubPIDMMFilter, FilterInTrees
+from PhysSelPython.Wrappers import AutomaticData, Selection, SelectionSequence, DataOnDemand
+from Configurables import   CombineParticles, FilterDesktop,  OfflineVertexFitter
+from Configurables import DecayTreeTuple, LoKi__Hybrid__TupleTool, TupleToolDecay, TupleToolTrigger, TupleToolTISTOS, TupleToolTagging
+from Configurables import FitDecayTrees, TupleToolGeometry
+from Configurables import DecayTreeTuple, LoKi__Hybrid__TupleTool, TupleToolDecay, TupleToolTrigger, TupleToolTISTOS, TupleToolTagging, TupleToolRecoStats
+from Configurables import FitDecayTrees, TupleToolGeometry
+from Configurables import TupleToolDecayTreeFitter
+from Configurables import LoKi__Hybrid__EvtTupleTool as LoKiTool
+from Configurables import CondDB
+from Configurables import TupleToolMCTruth, TupleToolMCBackgroundInfo 
+
+the_year = DaVinci().DataType
+# get the latest conditions for momenum scale etc.
+CondDB ( LatestGlobalTagByDataType = the_year)
+
+#hlt filters
+from PhysConf.Filters import LoKi_Filters
+fltrs = LoKi_Filters(STRIP_Code = "(HLT_PASS_RE('StrippingB2D0Ds2460Beauty2CharmLineDecision'))")
+#make the candidates
+
+DaughtCutpi = "(MIPCHI2DV(PRIMARY)>4) & (TRCHI2DOF < 4.0) & (PT>100*MeV) &  (TRGHOSTPROB < 0.5) & (PIDpi>-10)"
+
+from Configurables import LHCb__ParticlePropertySvc as PPS 
+svc = PPS ()
+
+svc.Particles += [
+    "D_s1(2460)+           172       20433   1.0      2.45950000      1e-20                     D_s1+       20433      0.00000000",
+    "D_s1(2460)-           176      -20433  -1.0      2.45950000      1e-20                     D_s1-      -20433      0.00000000",
+]
+
+
+#----------selection D~0 and Ds+----------------
+location = "Phys/B2D0Ds2460Beauty2CharmLine/Particles"
+D0FromB = FilterInTrees('D0FromB', Code="('D0'==ABSID)")
+selD0FromB = Selection("selD0FromB",
+        Algorithm = D0FromB,
+        RequiredSelections = [DataOnDemand(location)])
+
+subDztoDzb = SubstitutePID("subDztoDzb",
+        Code="ALL",
+        MaxChi2PerDoF = -1,
+        Substitutions = {'D0':'D~0'}
+        );
+
+selD0bFromB = Selection("selD0bFromB",
+        Algorithm = subDztoDzb,
+        RequiredSelections = [selD0FromB])
+
+Ds12460FromB = FilterInTrees('Ds12460FromB', Code="('D_s1(2460)+'==ABSID)")
+selDs12460FromB = Selection("selDs12460FromB",
+        Algorithm = Ds12460FromB,
+        RequiredSelections = [DataOnDemand(location)])
+
+subDtoDs = SubstitutePID("subDtoDs",
+        Code="DECTREE('[D_s1(2460)+ -> D+ pi+ pi-]CC')",
+        MaxChi2PerDoF = -1,
+		Substitutions = {
+            'D_s1(2460)+ -> ^D+ pi+ pi-':'D_s+',
+            'D_s1(2460)- -> ^D- pi- pi+':'D_s-'}
+        );
+selDs1FromB = Selection("selDs1FromB",
+        Algorithm = subDtoDs,
+        RequiredSelections = [selDs12460FromB])
+
+
+
+#---- Selection psi(DDs) pi pi----------------------
+_B2DDs1 = CombineParticles( "_B2DDs1",
+	DecayDescriptor = "[B+ -> D~0 D_s1(2460)+]cc",
+	CombinationCut = "ADAMASS('B+') < 500 *MeV",
+	MotherCut       = "(BPVDIRA > 0.99) & (VFASPF(VCHI2PDOF) < 10) & (BPVVD > 1.5 *mm) & \
+(NINTREE( ISBASIC & HASTRACK & ('K+'==ABSID) & (PROBNNk < 0.1)) < 1) & \
+(NINTREE( ISBASIC & HASTRACK & ('pi+'==ABSID) & (PROBNNpi < 0.1)) < 1) & \
+(BPVLTIME()>0.2*ps) & (BPVIPCHI2()<50)",
+	ReFitPVs        = True )
+
+B2DDs1  = Selection( "B2DDs1",
+	Algorithm          = _B2DDs1 ,
+	RequiredSelections = [ selD0FromB, selD0bFromB, selDs1FromB ] )
+
+### Gaudi sequence
+SeqB2DDs1 = SelectionSequence("SeqB2DDs1", TopSelection = B2DDs1)
+seq = SeqB2DDs1.sequence()
+
+##DecayTree
+from DecayTreeTuple.Configuration import *
+#Dm Dsp pi pi
+tuple = DecayTreeTuple( "Bp" )
+tuple.Inputs = [ SeqB2DDs1.outputLocation() ]
+tuple.TupleName = "DecayTree"
+
+tuple.Decay = '[^(B+ -> ^([D~0]CC -> ^K+ ^pi-) ^(D_s1(2460)+ -> ^(D_s+ -> ^K- ^K+ ^pi+) ^pi+ ^pi-))]CC'
+tuple.addBranches({
+   "B"        :  "[^(B+ -> ([D~0]CC -> K+ pi-) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-))]CC",
+   "D1"       :  "[B+ -> ^([D~0]CC -> K+ pi-) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "Ds2460"   :  "[B+ -> ([D~0]CC -> K+ pi-) ^(D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "D2"       :  "[B+ -> ([D~0]CC -> K+ pi-) (D_s1(2460)+ -> ^(D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "D1_K"     :  "[B+ -> ([D~0]CC -> ^K+ pi-) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "D1_pi"    :  "[B+ -> ([D~0]CC -> K+ ^pi-) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "D2_K1"    :  "[B+ -> ([D~0]CC -> K+ pi-) (D_s1(2460)+ -> (D_s+ -> ^K- K+ pi+) pi+ pi-)]CC",
+   "D2_K2"    :  "[B+ -> ([D~0]CC -> K+ pi-) (D_s1(2460)+ -> (D_s+ -> K- ^K+ pi+) pi+ pi-)]CC",
+   "D2_pi"    :  "[B+ -> ([D~0]CC -> K+ pi-) (D_s1(2460)+ -> (D_s+ -> K- K+ ^pi+) pi+ pi-)]CC",
+   "pi1"      :  "[B+ -> ([D~0]CC -> K+ pi-) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) ^pi+ pi-)]CC",
+   "pi2"      :  "[B+ -> ([D~0]CC -> K+ pi-) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ ^pi-)]CC",
+   })
+
+#add tools
+triglist = [
+        "L0DiMuonDecision","L0ElectronDecision","L0ElectronHiDecision",
+        "L0HadronDecision","L0MuonDecision",
+        "L0PhotonDecision","L0HadronDecision",
+        "Hlt1TrackAllL0Decision","Hlt1TrackMVADecision","Hlt1TwoTrackMVADecision",
+        "Hlt2Topo2BodyBBDTDecision","Hlt2Topo3BodyBBDTDecision","Hlt2Topo4BodyBBDTDecision","Hlt2IncPhiDecision","Hlt2PhiIncPhiDecision",
+        "Hlt2Topo2BodyDecision","Hlt2Topo3BodyDecision","Hlt2Topo4BodyDecision"
+	]
+tistos = TupleToolTISTOS('tistos')
+tistos.VerboseL0   = True
+tistos.VerboseHlt1 = True
+tistos.VerboseHlt2 = True
+tistos.TriggerList = triglist[:]
+
+tupletools = ["TupleToolGeometry",
+        "TupleToolKinematic",
+        "TupleToolEventInfo",
+        "TupleToolPid",
+        "TupleToolTrackInfo",
+        "TupleToolRecoStats",
+        "TupleToolMCTruth",
+        "TupleToolMCBackgroundInfo"
+        ]
+
+tuples = [tuple]
+
+for tup in tuples:
+    names = ['B','Ds2460','D1','D2', 'D1_K', 'D1_pi', 'D2_K1', 'D2_K2', 'D2_pi', 'pi1', 'pi2']
+    for part in names:
+        tup.addTupleTool(TupleToolDecay, name = part)
+    tup.ToolList+=tupletools
+    tup.B.ToolList = [ "TupleToolPropertime" ]
+    #TISTOS
+    tup.B.addTool(tistos)
+    tup.B.ToolList+=["TupleToolTISTOS/tistos"]
+    #loki
+    tup.ReFitPVs = True
+    LoKi_B=LoKi__Hybrid__TupleTool("LoKi_B")
+    LoKi_B.Variables =  { 
+        "ETA"                  : "ETA",
+	    "Y"                    : "Y",
+	    "LOKI_DTF_CTAU"        : "DTF_CTAU( 0, True )", 
+	    "LOKI_DTF_CHI2NDOF"    : "DTF_CHI2NDOF( True )", 
+	    "LOKI_DTF_CTAUERR"     : "DTF_CTAUERR( 0, True )", 
+        "DOCA12"               : "DOCA(1,2)",
+	} 
+    tup.B.addTool(LoKi_B)         
+    tup.B.ToolList+=["LoKi::Hybrid::TupleTool/LoKi_B"] 
+
+    LoKi_D=LoKi__Hybrid__TupleTool("LoKi_D")
+    LoKi_D.Variables =  { 
+        "ETA"                  : "ETA",
+	    "Y"                    : "Y",
+	    "LOKI_DTF_CTAU"        : "DTF_CTAU( 0, True )", 
+	    "LOKI_DTF_CHI2NDOF"    : "DTF_CHI2NDOF( True )", 
+	    "LOKI_DTF_CTAUERR"     : "DTF_CTAUERR( 0, True )", 
+        "DOCA12"               : "DOCA(1,2)",
+        "DOCA13"               : "DOCA(1,3)",
+        "DOCA23"               : "DOCA(2,3)",
+	} 
+    LoKi_D0=LoKi__Hybrid__TupleTool("LoKi_D0")
+    LoKi_D0.Variables =  { 
+        "ETA"                  : "ETA",
+	    "Y"                    : "Y",
+	    "LOKI_DTF_CTAU"        : "DTF_CTAU( 0, True )", 
+	    "LOKI_DTF_CHI2NDOF"    : "DTF_CHI2NDOF( True )", 
+	    "LOKI_DTF_CTAUERR"     : "DTF_CTAUERR( 0, True )", 
+        "DOCA12"               : "DOCA(1,2)",
+	} 
+
+    tup.D1.addTool(LoKi_D0)         
+    tup.D1.ToolList+=["LoKi::Hybrid::TupleTool/LoKi_D0"] 
+    tup.D2.addTool(LoKi_D)         
+    tup.D2.ToolList+=["LoKi::Hybrid::TupleTool/LoKi_D"] 
+    tup.Ds2460.addTool(LoKi_D)         
+    tup.Ds2460.ToolList+=["LoKi::Hybrid::TupleTool/LoKi_D"] 
+
+    #DTF
+    tup.B.addTupleTool('TupleToolDecayTreeFitter/PVALLFit')
+    tup.B.PVALLFit.UpdateDaughters = True
+    tup.B.PVALLFit.constrainToOriginVertex = True
+    tup.B.PVALLFit.daughtersToConstrain = [ "D0", "D_s+", 'B+' ]
+
+    tup.B.addTupleTool('TupleToolDecayTreeFitter/PVFit')
+    tup.B.PVFit.UpdateDaughters = True
+    tup.B.PVFit.constrainToOriginVertex = True
+
+    tup.B.addTupleTool('TupleToolDecayTreeFitter/PVDauFit')
+    tup.B.PVDauFit.UpdateDaughters = True
+    tup.B.PVDauFit.constrainToOriginVertex = True
+    tup.B.PVDauFit.daughtersToConstrain = [ "D0", "D_s+" ]
+
+    tup.B.addTupleTool('TupleToolDecayTreeFitter/NOPVFit')
+    tup.B.NOPVFit.UpdateDaughters = True
+    tup.B.NOPVFit.constrainToOriginVertex = False
+
+
+    tup.B.addTupleTool('TupleToolDecayTreeFitter/PVTotFit')
+    tup.B.PVTotFit.UpdateDaughters = True
+    tup.B.PVTotFit.constrainToOriginVertex = True
+    tup.B.PVTotFit.daughtersToConstrain = [ "D_s1(2460)+","D0", "D_s+", "B+"]
+
+    tup.B.addTupleTool('TupleToolDecayTreeFitter/PVAllFit')
+    tup.B.PVAllFit.UpdateDaughters = True
+    tup.B.PVAllFit.constrainToOriginVertex = True
+    tup.B.PVAllFit.daughtersToConstrain = [ "D_s1(2460)+","D0", "D_s+"]
+
+
+
+    #MC Truth
+    MCTruth = TupleToolMCTruth()
+    MCTruth.ToolList = [ "MCTupleToolKinematic" ,
+          "MCTupleToolHierarchy" ,
+          "MCTupleToolPID"   ]
+    tup.addTool(MCTruth)
+###
+
+
+from Configurables import CheckPV
+checkpv = CheckPV()
+from Configurables import TrackScaleState as SCALER
+scaler = SCALER('Scaler')
+from Configurables import TrackSmearState as SMEAR
+smear = SMEAR('Smear')
+
+###davinci
+DaVinci().EvtMax = -1                       # Number of events
+DaVinci().Simulation   = False
+DaVinci().Lumi = not DaVinci().Simulation
+DaVinci().EventPreFilters = fltrs.filters('Filter')
+DaVinci().UserAlgorithms = [ checkpv, seq, tuple]
+if(DaVinci().Simulation == False):
+    DaVinci().UserAlgorithms += [scaler];
+else:
+    DaVinci().UserAlgorithms += [smear]
+
+
+#CondDB.LatestGlobalTagsByDataType = '2011'
+DaVinci().TupleFile = "Bp2D0Dspipi.root"
+DaVinci().PrintFreq = 1000
+locationRoot = "/Event/Bhadron"
+DaVinci().RootInTES = locationRoot
+DaVinci().InputType = 'MDST'
+
+########################################################################
+MessageSvc().Format = "% F%60W%S%7W%R%T %0W%M"
+from Configurables import  DaVinciInit, GetIntegratedLuminosity
+# DaVinciInit().OutputLevel = 6
+# MessageSvc().OutputLevel                  = 6
+GetIntegratedLuminosity().OutputLevel       = INFO
+ToolSvc().OutputLevel                     = 6
+NTupleSvc().OutputLevel                   = 6
diff --git a/B2DDs12460pRun2/dv_Bp2D0K3piDspipi.py b/B2DDs12460pRun2/dv_Bp2D0K3piDspipi.py
new file mode 100644
index 0000000000000000000000000000000000000000..28632bebfa940fcf0352a010244874879eaa54f8
--- /dev/null
+++ b/B2DDs12460pRun2/dv_Bp2D0K3piDspipi.py
@@ -0,0 +1,271 @@
+###
+from Gaudi.Configuration import *
+from Configurables import GaudiSequencer
+from Configurables import DaVinci
+from Configurables import  DecayTreeTuple, CheckPV, SubstitutePID, SubPIDMMFilter, FilterInTrees
+from PhysSelPython.Wrappers import AutomaticData, Selection, SelectionSequence, DataOnDemand
+from Configurables import   CombineParticles, FilterDesktop,  OfflineVertexFitter
+from Configurables import DecayTreeTuple, LoKi__Hybrid__TupleTool, TupleToolDecay, TupleToolTrigger, TupleToolTISTOS, TupleToolTagging
+from Configurables import FitDecayTrees, TupleToolGeometry
+from Configurables import DecayTreeTuple, LoKi__Hybrid__TupleTool, TupleToolDecay, TupleToolTrigger, TupleToolTISTOS, TupleToolTagging, TupleToolRecoStats
+from Configurables import FitDecayTrees, TupleToolGeometry
+from Configurables import TupleToolDecayTreeFitter
+from Configurables import LoKi__Hybrid__EvtTupleTool as LoKiTool
+from Configurables import CondDB
+from Configurables import TupleToolMCTruth, TupleToolMCBackgroundInfo 
+
+the_year = DaVinci().DataType
+# get the latest conditions for momenum scale etc.
+CondDB ( LatestGlobalTagByDataType = the_year)
+
+#hlt filters
+from PhysConf.Filters import LoKi_Filters
+fltrs = LoKi_Filters(STRIP_Code = "(HLT_PASS_RE('StrippingB2D0Ds2460D02K3PiBeauty2CharmLineDecision'))")
+#make the candidates
+
+DaughtCutpi = "(MIPCHI2DV(PRIMARY)>4) & (TRCHI2DOF < 4.0) & (PT>100*MeV) &  (TRGHOSTPROB < 0.5) & (PIDpi>-10)"
+
+from Configurables import LHCb__ParticlePropertySvc as PPS 
+svc = PPS ()
+
+svc.Particles += [
+    "D_s1(2460)+           172       20433   1.0      2.45950000      1e-20                     D_s1+       20433      0.00000000",
+    "D_s1(2460)-           176      -20433  -1.0      2.45950000      1e-20                     D_s1-      -20433      0.00000000",
+]
+
+
+#----------selection D~0 and Ds+----------------
+location = "Phys/B2D0Ds2460D02K3PiBeauty2CharmLine/Particles"
+D0FromB = FilterInTrees('D0FromB', Code="('D0'==ABSID)")
+selD0FromB = Selection("selD0FromB",
+        Algorithm = D0FromB,
+        RequiredSelections = [DataOnDemand(location)])
+
+subDztoDzb = SubstitutePID("subDztoDzb",
+        Code="ALL",
+        MaxChi2PerDoF = -1,
+        Substitutions = {'D0':'D~0'}
+        );
+
+selD0bFromB = Selection("selD0bFromB",
+        Algorithm = subDztoDzb,
+        RequiredSelections = [selD0FromB])
+
+Ds12460FromB = FilterInTrees('Ds12460FromB', Code="('D_s1(2460)+'==ABSID)")
+selDs12460FromB = Selection("selDs12460FromB",
+        Algorithm = Ds12460FromB,
+        RequiredSelections = [DataOnDemand(location)])
+
+subDtoDs = SubstitutePID("subDtoDs",
+        Code="DECTREE('[D_s1(2460)+ -> D+ pi+ pi-]CC')",
+        MaxChi2PerDoF = -1,
+		Substitutions = {
+            'D_s1(2460)+ -> ^D+ pi+ pi-':'D_s+',
+            'D_s1(2460)- -> ^D- pi- pi+':'D_s-'}
+        );
+selDs1FromB = Selection("selDs1FromB",
+        Algorithm = subDtoDs,
+        RequiredSelections = [selDs12460FromB])
+
+
+
+#---- Selection psi(DDs) pi pi----------------------
+_B2DDs1 = CombineParticles( "_B2DDs1",
+	DecayDescriptor = "[B+ -> D~0 D_s1(2460)+]cc",
+	CombinationCut = "ADAMASS('B+') < 500 *MeV",
+	MotherCut       = "(BPVDIRA > 0.99) & (VFASPF(VCHI2PDOF) < 10) & (BPVVD > 1.5 *mm) & \
+(NINTREE( ISBASIC & HASTRACK & ('K+'==ABSID) & (PROBNNk < 0.1)) < 1) & \
+(NINTREE( ISBASIC & HASTRACK & ('pi+'==ABSID) & (PROBNNpi < 0.1)) < 1) & \
+(BPVLTIME()>0.2*ps) & (BPVIPCHI2()<50)",
+	ReFitPVs        = True )
+
+B2DDs1  = Selection( "B2DDs1",
+	Algorithm          = _B2DDs1 ,
+	RequiredSelections = [ selD0FromB, selD0bFromB, selDs1FromB ] )
+
+### Gaudi sequence
+SeqB2DDs1 = SelectionSequence("SeqB2DDs1", TopSelection = B2DDs1)
+seq = SeqB2DDs1.sequence()
+
+##DecayTree
+from DecayTreeTuple.Configuration import *
+#Dm Dsp pi pi
+tuple = DecayTreeTuple( "Bp" )
+tuple.Inputs = [ SeqB2DDs1.outputLocation() ]
+tuple.TupleName = "DecayTree"
+
+tuple.Decay = '[^(B+ -> ^([D~0]CC -> ^K+ ^pi- ^pi+ ^pi-) ^(D_s1(2460)+ -> ^(D_s+ -> ^K- ^K+ ^pi+) ^pi+ ^pi-))]CC'
+tuple.addBranches({
+   "B"        :  "[^(B+ -> ([D~0]CC -> K+ pi- pi+ pi-) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-))]CC",
+   "D1"       :  "[B+ -> ^([D~0]CC -> K+ pi- pi+ pi-) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "Ds2460"   :  "[B+ -> ([D~0]CC -> K+ pi- pi+ pi-) ^(D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "D2"       :  "[B+ -> ([D~0]CC -> K+ pi- pi+ pi-) (D_s1(2460)+ -> ^(D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "D1_K"     :  "[B+ -> ([D~0]CC -> ^K+ pi- pi+ pi-) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "D1_pi1"   :  "[B+ -> ([D~0]CC -> K+ ^pi- pi+ pi-) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "D1_pi2"   :  "[B+ -> ([D~0]CC -> K+ pi- ^pi+ pi-) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "D1_pi3"   :  "[B+ -> ([D~0]CC -> K+ pi- pi+ ^pi-) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ pi-)]CC",
+   "D2_K1"    :  "[B+ -> ([D~0]CC -> K+ pi- pi+ pi-) (D_s1(2460)+ -> (D_s+ -> ^K- K+ pi+) pi+ pi-)]CC",
+   "D2_K2"    :  "[B+ -> ([D~0]CC -> K+ pi- pi+ pi-) (D_s1(2460)+ -> (D_s+ -> K- ^K+ pi+) pi+ pi-)]CC",
+   "D2_pi"    :  "[B+ -> ([D~0]CC -> K+ pi- pi+ pi-) (D_s1(2460)+ -> (D_s+ -> K- K+ ^pi+) pi+ pi-)]CC",
+   "pi1"      :  "[B+ -> ([D~0]CC -> K+ pi- pi+ pi-) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) ^pi+ pi-)]CC",
+   "pi2"      :  "[B+ -> ([D~0]CC -> K+ pi- pi+ pi-) (D_s1(2460)+ -> (D_s+ -> K- K+ pi+) pi+ ^pi-)]CC",
+   })
+
+#add tools
+triglist = [
+        "L0DiMuonDecision","L0ElectronDecision","L0ElectronHiDecision",
+        "L0HadronDecision","L0MuonDecision",
+        "L0PhotonDecision","L0HadronDecision",
+        "Hlt1TrackAllL0Decision","Hlt1TrackMVADecision","Hlt1TwoTrackMVADecision",
+        "Hlt2Topo2BodyBBDTDecision","Hlt2Topo3BodyBBDTDecision","Hlt2Topo4BodyBBDTDecision","Hlt2IncPhiDecision","Hlt2PhiIncPhiDecision",
+        "Hlt2Topo2BodyDecision","Hlt2Topo3BodyDecision","Hlt2Topo4BodyDecision"
+	]
+tistos = TupleToolTISTOS('tistos')
+tistos.VerboseL0   = True
+tistos.VerboseHlt1 = True
+tistos.VerboseHlt2 = True
+tistos.TriggerList = triglist[:]
+
+tupletools = ["TupleToolGeometry",
+        "TupleToolKinematic",
+        "TupleToolEventInfo",
+        "TupleToolPid",
+        "TupleToolTrackInfo",
+        "TupleToolRecoStats",
+        "TupleToolMCTruth",
+        "TupleToolMCBackgroundInfo"
+        ]
+
+tuples = [tuple]
+
+for tup in tuples:
+    names = ['B','Ds2460','D1','D2', 'D1_K', 'D1_pi1', 'D1_pi2', 'D1_pi3', 'D2_K1', 'D2_K2', 'D2_pi', 'pi1', 'pi2']
+    for part in names:
+        tup.addTupleTool(TupleToolDecay, name = part)
+    tup.ToolList+=tupletools
+    tup.B.ToolList = [ "TupleToolPropertime" ]
+    #TISTOS
+    tup.B.addTool(tistos)
+    tup.B.ToolList+=["TupleToolTISTOS/tistos"]
+    #loki
+    tup.ReFitPVs = True
+    LoKi_B=LoKi__Hybrid__TupleTool("LoKi_B")
+    LoKi_B.Variables =  { 
+        "ETA"                  : "ETA",
+	    "Y"                    : "Y",
+	    "LOKI_DTF_CTAU"        : "DTF_CTAU( 0, True )", 
+	    "LOKI_DTF_CHI2NDOF"    : "DTF_CHI2NDOF( True )", 
+	    "LOKI_DTF_CTAUERR"     : "DTF_CTAUERR( 0, True )", 
+        "DOCA12"               : "DOCA(1,2)",
+	} 
+    tup.B.addTool(LoKi_B)         
+    tup.B.ToolList+=["LoKi::Hybrid::TupleTool/LoKi_B"] 
+
+    LoKi_D=LoKi__Hybrid__TupleTool("LoKi_D")
+    LoKi_D.Variables =  { 
+        "ETA"                  : "ETA",
+	    "Y"                    : "Y",
+	    "LOKI_DTF_CTAU"        : "DTF_CTAU( 0, True )", 
+	    "LOKI_DTF_CHI2NDOF"    : "DTF_CHI2NDOF( True )", 
+	    "LOKI_DTF_CTAUERR"     : "DTF_CTAUERR( 0, True )", 
+        "DOCA12"               : "DOCA(1,2)",
+        "DOCA13"               : "DOCA(1,3)",
+        "DOCA23"               : "DOCA(2,3)",
+	} 
+    LoKi_D0=LoKi__Hybrid__TupleTool("LoKi_D0")
+    LoKi_D0.Variables =  { 
+        "ETA"                  : "ETA",
+	    "Y"                    : "Y",
+	    "LOKI_DTF_CTAU"        : "DTF_CTAU( 0, True )", 
+	    "LOKI_DTF_CHI2NDOF"    : "DTF_CHI2NDOF( True )", 
+	    "LOKI_DTF_CTAUERR"     : "DTF_CTAUERR( 0, True )", 
+        "DOCA12"               : "DOCA(1,2)",
+        "DOCA13"               : "DOCA(1,3)",
+        "DOCA14"               : "DOCA(1,4)",
+        "DOCA23"               : "DOCA(2,3)",
+        "DOCA24"               : "DOCA(2,4)",
+        "DOCA34"               : "DOCA(3,4)",
+	} 
+
+    tup.D1.addTool(LoKi_D0)         
+    tup.D1.ToolList+=["LoKi::Hybrid::TupleTool/LoKi_D0"] 
+    tup.D2.addTool(LoKi_D)         
+    tup.D2.ToolList+=["LoKi::Hybrid::TupleTool/LoKi_D"] 
+    tup.Ds2460.addTool(LoKi_D)         
+    tup.Ds2460.ToolList+=["LoKi::Hybrid::TupleTool/LoKi_D"] 
+
+    #DTF
+    tup.B.addTupleTool('TupleToolDecayTreeFitter/PVALLFit')
+    tup.B.PVALLFit.UpdateDaughters = True
+    tup.B.PVALLFit.constrainToOriginVertex = True
+    tup.B.PVALLFit.daughtersToConstrain = [ "D0", "D_s+", 'B+' ]
+
+    tup.B.addTupleTool('TupleToolDecayTreeFitter/PVFit')
+    tup.B.PVFit.UpdateDaughters = True
+    tup.B.PVFit.constrainToOriginVertex = True
+
+    tup.B.addTupleTool('TupleToolDecayTreeFitter/PVDauFit')
+    tup.B.PVDauFit.UpdateDaughters = True
+    tup.B.PVDauFit.constrainToOriginVertex = True
+    tup.B.PVDauFit.daughtersToConstrain = [ "D0", "D_s+" ]
+
+    tup.B.addTupleTool('TupleToolDecayTreeFitter/NOPVFit')
+    tup.B.NOPVFit.UpdateDaughters = True
+    tup.B.NOPVFit.constrainToOriginVertex = False
+
+
+    tup.B.addTupleTool('TupleToolDecayTreeFitter/PVTotFit')
+    tup.B.PVTotFit.UpdateDaughters = True
+    tup.B.PVTotFit.constrainToOriginVertex = True
+    tup.B.PVTotFit.daughtersToConstrain = [ "D_s1(2460)+","D0", "D_s+", "B+"]
+
+    tup.B.addTupleTool('TupleToolDecayTreeFitter/PVAllFit')
+    tup.B.PVAllFit.UpdateDaughters = True
+    tup.B.PVAllFit.constrainToOriginVertex = True
+    tup.B.PVAllFit.daughtersToConstrain = [ "D_s1(2460)+","D0", "D_s+"]
+
+
+
+    #MC Truth
+    MCTruth = TupleToolMCTruth()
+    MCTruth.ToolList = [ "MCTupleToolKinematic" ,
+          "MCTupleToolHierarchy" ,
+          "MCTupleToolPID"   ]
+    tup.addTool(MCTruth)
+###
+
+
+from Configurables import CheckPV
+checkpv = CheckPV()
+from Configurables import TrackScaleState as SCALER
+scaler = SCALER('Scaler')
+from Configurables import TrackSmearState as SMEAR
+smear = SMEAR('Smear')
+
+###davinci
+DaVinci().EvtMax = -1                       # Number of events
+DaVinci().Simulation   = False
+DaVinci().Lumi = not DaVinci().Simulation
+DaVinci().EventPreFilters = fltrs.filters('Filter')
+DaVinci().UserAlgorithms = [ checkpv, seq, tuple]
+if(DaVinci().Simulation == False):
+    DaVinci().UserAlgorithms += [scaler];
+else:
+    DaVinci().UserAlgorithms += [smear]
+
+
+#CondDB.LatestGlobalTagsByDataType = '2011'
+DaVinci().TupleFile = "Bp2D0K3piDspipi.root"
+DaVinci().PrintFreq = 1000
+locationRoot = "/Event/Bhadron"
+DaVinci().RootInTES = locationRoot
+DaVinci().InputType = 'MDST'
+
+########################################################################
+MessageSvc().Format = "% F%60W%S%7W%R%T %0W%M"
+from Configurables import  DaVinciInit, GetIntegratedLuminosity
+# DaVinciInit().OutputLevel = 6
+# MessageSvc().OutputLevel                  = 6
+GetIntegratedLuminosity().OutputLevel       = INFO
+ToolSvc().OutputLevel                     = 6
+NTupleSvc().OutputLevel                   = 6
diff --git a/B2DDs12460pRun2/info.yaml b/B2DDs12460pRun2/info.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..9bbfc1f4319572c94f7777d63ac1550980afd948
--- /dev/null
+++ b/B2DDs12460pRun2/info.yaml
@@ -0,0 +1,57 @@
+defaults:
+  application: DaVinci/v44r11p6
+  wg: B2OC
+  automatically_configure: true
+  turbo: false
+  inform:
+    - linxuan.zhu@cern.ch
+
+
+
+# Real data (collision)
+{%- set collision_datasets = [
+    ('16', '6500', '16',  '28r2p2'),
+    ('17', '6500', '17',  '29r2p3'),
+    ('18', '6500', '18',  '34r0p3'),
+]%}
+
+{%- for year, beam, reco, strip in collision_datasets %}
+  {%- for polarity in ['MagDown','MagUp'] %}
+
+20{{year}}_{{polarity}}_collision_B02DmDsPiPi:
+  input:
+    bk_query: /LHCb/Collision{{year}}/Beam{{beam}}GeV-VeloClosed-{{polarity}}/Real Data/Reco{{reco}}/Stripping{{strip}}/90000000/BHADRON.MDST
+  output: B02DmDsPiPi_Tuple.ROOT
+  options:
+    - dv_B02DmDspipi.py 
+
+20{{year}}_{{polarity}}_collision_Bp2D0DsPiPi:
+  input:
+    bk_query: /LHCb/Collision{{year}}/Beam{{beam}}GeV-VeloClosed-{{polarity}}/Real Data/Reco{{reco}}/Stripping{{strip}}/90000000/BHADRON.MDST
+  output: Bp2D0DsPiPi_Tuple.ROOT
+  options:
+    - dv_Bp2D0Dspipi.py 
+
+20{{year}}_{{polarity}}_collision_Bp2D0K3piDsPiPi:
+  input:
+    bk_query: /LHCb/Collision{{year}}/Beam{{beam}}GeV-VeloClosed-{{polarity}}/Real Data/Reco{{reco}}/Stripping{{strip}}/90000000/BHADRON.MDST
+  output: Bp2D0K3piDsPiPi_Tuple.ROOT
+  options:
+    - dv_Bp2D0K3piDspipi.py 
+
+20{{year}}_{{polarity}}_collision_B02DstmDsPiPi:
+  input:
+    bk_query: /LHCb/Collision{{year}}/Beam{{beam}}GeV-VeloClosed-{{polarity}}/Real Data/Reco{{reco}}/Stripping{{strip}}/90000000/BHADRON.MDST
+  output: B02DstmDsPiPi_Tuple.ROOT
+  options:
+    - dv_B02DstmDspipi.py 
+
+20{{year}}_{{polarity}}_collision_B02DstmK3piDsPiPi:
+  input:
+    bk_query: /LHCb/Collision{{year}}/Beam{{beam}}GeV-VeloClosed-{{polarity}}/Real Data/Reco{{reco}}/Stripping{{strip}}/90000000/BHADRON.MDST
+  output: B02DstmK3piDsPiPi_Tuple.ROOT
+  options:
+    - dv_B02DstmK3piDspipi.py 
+
+  {%- endfor %}
+{%- endfor %}