diff --git a/productions/local_test_mc/Ds_eepi_mc_local.py b/productions/local_test_mc/Ds_eepi_mc_local.py index 461fd6f..91cbe6a 100644 --- a/productions/local_test_mc/Ds_eepi_mc_local.py +++ b/productions/local_test_mc/Ds_eepi_mc_local.py @@ -54,11 +54,13 @@ #decay_OSmumu = "[D+ -> ^pi+ ^mu+ ^mu-]CC" # find my own decay_tree_location using main_opt and make_decay_tree_tuples.py -decay_tree_location_Dplus_electrons = 'Phys/D2XMuMuSS_Pi_EE_OSLine/Particles' -#decay_tree_location_Dplus_muons = 'Phys/D2XMuMuSS_PiOSLine/Particles' +#Event/Allstreams + +decay_tree_location_Ds_electrons = 'Phys/D2XMuMuSS_Pi_EE_OSLine/Particles' + #ACCESSING TO THE DECAY DAUGHTERS -StrippingSel = AutomaticData(decay_tree_location_Dplus_electrons) +StrippingSel = AutomaticData(decay_tree_location_Ds_electrons) electron_from_Ds = FilterInTrees('electron_from_Ds', Code="('e-' == ABSID)") @@ -180,6 +182,7 @@ from Configurables import TupleToolGeometry from Configurables import TupleToolTrackIsolation from Configurables import TupleToolANNPID +from Configurables import TupleToolBremInfo # from Configurables import Rich__Rec__DetailedTrSegMakerFromRecoTracks # from Configurables import TupleToolRICHPid #from Configurables import TupleToolApplyIsolation @@ -195,21 +198,35 @@ "TupleToolRecoStats", "TupleToolANNPID", "TupleToolPid", - # "TupleToolMCTruth", + "TupleToolMCTruth", + "TupleToolMCBackgroundInfo", + "TupleToolBremInfo", # 'TupleToolTrigger', # 'TupleToolTISTOS', # 'TupleToolRICHPid', ] + # DTT.pi_plus.addTool(TupleToolANNPID,name='TupleToolANNPID') # DTT.pi_plus.ToolList+=['TupleToolANNPID'] # DTT.pi_plus.TupleToolANNPID.ANNPIDTunes = ['MC15TuneV1','MC15TuneDNNV1','MC15TuneFLAT4dV1','MC15TuneCatBoostV1'] # print 'PID tunes',DTT.pi_plus.TupleToolANNPID.ANNPIDTunes + + DTT.addTool( TupleToolMCTruth, name="TupleToolMCTruth" ) + DTT.TupleToolMCTruth.ToolList += ["MCTupleToolHierarchy","MCTupleToolHierarchy"] + + DTT.Ds.addTool(TupleToolBremInfo) + DTT.Ds.TupleToolBremInfo.Particle += ["e-", "e+"] + DTT.Ds.addTool(TupleToolTrigger, name='TupleToolTrigger') + DTT.Ds.TupleToolTrigger.Verbose = True DTT.Ds.TupleToolTrigger.TriggerList = trigger_list + DTT.Ds.addTool(TupleToolTISTOS, name='TupleToolTISTOS') + DTT.Ds.TupleToolTISTOS.Verbose = True DTT.Ds.TupleToolTISTOS.TriggerList = trigger_list + DTT.Ds.ToolList += ["TupleToolTISTOS"] #DTT.Lambda_b0.addTool(TupleToolSLTools, name='TupleToolSLTools') #DTT.Lambda_b0.ToolList += ["TupleToolSLTools"] @@ -241,13 +258,16 @@ ################################################## from Configurables import DaVinci # DaVinci().EventPreFilters = fltrs.filters('Filters') -DaVinci().EvtMax = 2000 # 200 # Number of events +DaVinci().EvtMax = -1 # 200 # Number of events DaVinci().SkipEvents = 0 # Events to skip DaVinci().PrintFreq = 10000 DaVinci().Simulation = True DaVinci().Lumi = True DaVinci().RootInTES = '/Event/AllStreams' +#not this + DaVinci().InputType = 'MDST' + #DaVinci().appendToMainSequence([muons_from_Lc_sel_seq.sequence(), # muons_from_Lc_sel_WC_seq.sequence()]) DaVinci().appendToMainSequence([Ds_phi_pi_sel_seq.sequence()]) diff --git a/productions/local_test_mc/Ds_mumupi_mc_local.py b/productions/local_test_mc/Ds_mumupi_mc_local.py index 0a54b19..28aab40 100644 --- a/productions/local_test_mc/Ds_mumupi_mc_local.py +++ b/productions/local_test_mc/Ds_mumupi_mc_local.py @@ -118,10 +118,6 @@ TopSelection=Ds_sel ) ############################################################################# -# Now WS: -# Lb_SL_WS = CombineParticles("Lb_SL_WS") -# Lb_SL_WS.DecayDescriptors = ["[Lambda_b0 -> Lambda_c(2595)+ mu+]cc"] -# Lb_SL_WS.MotherCut = "(M<6500) & (VFASPF(VCHI2/VDOF) < 6.0) & (BPVDIRA>0.999)" @@ -144,15 +140,32 @@ }) + + +#Ds_OfflineTree.Ds.addTupleTool('') Ds_OfflineTree.Ds.addTupleTool('TupleToolDecayTreeFitter/ConsD') + + #Ds_OfflineTree.Ds.ConsD.constrainToOriginVertex = True Ds_OfflineTree.Ds.ConsD.Verbose = True Ds_OfflineTree.Ds.ConsD.daughtersToConstrain = ['phi(1020)'] Ds_OfflineTree.Ds.ConsD.UpdateDaughters = True - decay_trees.append(Ds_OfflineTree) + +# LoKi_Cone = LoKi__Hybrid__TupleTool('LoKi_Cone') +# LoKi_Cone.Variables = { +# "VTXISONUMVTX" : "RELINFO('/Event/AllStreams/Phys/D2XMuMuSS_PiOSLine/RelInfoVertexIsolation', 'VTXISONUMVTX', -999.)", +# #"VTXISONUMVTX" : "RELINFO(Phys/D2XMuMuSS_PiOSLine/Particles/RelInfoVertexIsolation, VTXISONUMVTX, -1.)", +# #"VTXISODCHI2ONETRACK" : "RELINFO('Phys/D2XMuMuSS_PiOSLine/Particles/VertexIsoInfo', 'VTXISODCHI2ONETRACK', -1.)", +# #"VTXISODCHI2MASSONETRACK" : "RELINFO('Phys/D2XMuMuSS_PiOSLine/Particles/VertexIsoInfo', 'VTXISODCHI2MASSONETRACK', -1.)", +# #"VTXISODCHI2TWOTRACK" : "RELINFO('Phys/D2XMuMuSS_PiOSLine/Particles/VertexIsoInfo', 'VTXISODCHI2TWOTRACK', -1.)", +# #"VTXISODCHI2MASSTWOTRACK" : "RELINFO('Phys/D2XMuMuSS_PiOSLine/Particles/VertexIsoInfo', 'VTXISODCHI2MASSTWOTRACK', -1.)", +# } + +# Ds_OfflineTree.Ds.addTupleTool(LoKi_Cone) + # Lb_SL_OfflineTree_WS = DecayTreeTuple("Lb_SL_OfflineTree_WS") # Lb_SL_OfflineTree_WS.Inputs = ["Phys/Lb_SL_WS/Particles"] # Lb_SL_OfflineTree_WS.Decay = decay0_WS @@ -180,12 +193,16 @@ from Configurables import TupleToolGeometry from Configurables import TupleToolTrackIsolation from Configurables import TupleToolANNPID +from Configurables import TupleToolMCBackgroundInfo +from Configurables import TupleToolMCTruth +from Configurables import TupleToolBremInfo # from Configurables import Rich__Rec__DetailedTrSegMakerFromRecoTracks # from Configurables import TupleToolRICHPid #from Configurables import TupleToolApplyIsolation #from Configurables import TupleToolSLTools + for DTT in decay_trees: DTT.ToolList = [ "TupleToolKinematic", @@ -195,7 +212,10 @@ "TupleToolRecoStats", "TupleToolANNPID", "TupleToolPid", - # "TupleToolMCTruth", + "TupleToolMCTruth", + "TupleToolMCBackgroundInfo", + "TupleToolBremInfo", + # 'TupleToolTrigger', # 'TupleToolTISTOS', # 'TupleToolRICHPid', @@ -204,13 +224,23 @@ # DTT.pi_plus.ToolList+=['TupleToolANNPID'] # DTT.pi_plus.TupleToolANNPID.ANNPIDTunes = ['MC15TuneV1','MC15TuneDNNV1','MC15TuneFLAT4dV1','MC15TuneCatBoostV1'] # print 'PID tunes',DTT.pi_plus.TupleToolANNPID.ANNPIDTunes + + DTT.addTool( TupleToolMCTruth, name="TupleToolMCTruth" ) + DTT.TupleToolMCTruth.ToolList += ["MCTupleToolHierarchy","MCTupleToolHierarchy"] + DTT.Ds.addTool(TupleToolTrigger, name='TupleToolTrigger') + DTT.Ds.TupleToolTrigger.Verbose = True DTT.Ds.TupleToolTrigger.TriggerList = trigger_list + DTT.Ds.addTool(TupleToolTISTOS, name='TupleToolTISTOS') + DTT.Ds.TupleToolTISTOS.Verbose = True DTT.Ds.TupleToolTISTOS.TriggerList = trigger_list + DTT.Ds.ToolList += ["TupleToolTISTOS"] + + #DTT.Lambda_b0.addTool(TupleToolSLTools, name='TupleToolSLTools') #DTT.Lambda_b0.ToolList += ["TupleToolSLTools"] @@ -241,7 +271,7 @@ ################################################## from Configurables import DaVinci # DaVinci().EventPreFilters = fltrs.filters('Filters') -DaVinci().EvtMax = 2000 # # Number of events set to all of them +DaVinci().EvtMax = -1 # # Number of events set to all of them DaVinci().SkipEvents = 0 # Events to skip DaVinci().PrintFreq = 10000 DaVinci().Simulation = True diff --git a/productions/online_test_mc/Ds_eepi_mc_online.py b/productions/online_test_mc/Ds_eepi_mc_online.py index abea48c..df003b9 100644 --- a/productions/online_test_mc/Ds_eepi_mc_online.py +++ b/productions/online_test_mc/Ds_eepi_mc_online.py @@ -50,15 +50,17 @@ decay_OSee = "[D_s+ -> ^(phi(1020) -> ^e+ ^e-) ^pi+]CC" + #decay_OSmumu = "[D+ -> ^pi+ ^mu+ ^mu-]CC" +# find my own decay_tree_location using main_opt and make_decay_tree_tuples.py +#Event/Allstreams -#decay_tree_location_Dplus_muons = 'Phys/D2XMuMuSS_PiOSLine/Particles' -decay_tree_location_Dplus_electrons = 'Phys/D2XMuMuSS_Pi_EE_OSLine/Particles' +decay_tree_location_Ds_electrons = 'Phys/D2XMuMuSS_Pi_EE_OSLine/Particles' #ACCESSING TO THE DECAY DAUGHTERS -StrippingSel = AutomaticData(decay_tree_location_Dplus_electrons) +StrippingSel = AutomaticData(decay_tree_location_Ds_electrons) electron_from_Ds = FilterInTrees('electron_from_Ds', Code="('e-' == ABSID)") @@ -180,6 +182,7 @@ from Configurables import TupleToolGeometry from Configurables import TupleToolTrackIsolation from Configurables import TupleToolANNPID +from Configurables import TupleToolBremInfo # from Configurables import Rich__Rec__DetailedTrSegMakerFromRecoTracks # from Configurables import TupleToolRICHPid #from Configurables import TupleToolApplyIsolation @@ -195,21 +198,35 @@ "TupleToolRecoStats", "TupleToolANNPID", "TupleToolPid", - # "TupleToolMCTruth", + "TupleToolMCTruth", + "TupleToolMCBackgroundInfo", + "TupleToolBremInfo", # 'TupleToolTrigger', # 'TupleToolTISTOS', # 'TupleToolRICHPid', ] + # DTT.pi_plus.addTool(TupleToolANNPID,name='TupleToolANNPID') # DTT.pi_plus.ToolList+=['TupleToolANNPID'] # DTT.pi_plus.TupleToolANNPID.ANNPIDTunes = ['MC15TuneV1','MC15TuneDNNV1','MC15TuneFLAT4dV1','MC15TuneCatBoostV1'] # print 'PID tunes',DTT.pi_plus.TupleToolANNPID.ANNPIDTunes + + DTT.addTool( TupleToolMCTruth, name="TupleToolMCTruth" ) + DTT.TupleToolMCTruth.ToolList += ["MCTupleToolHierarchy","MCTupleToolHierarchy"] + + DTT.Ds.addTool(TupleToolBremInfo) + DTT.Ds.TupleToolBremInfo.Particle += ["e-", "e+"] + DTT.Ds.addTool(TupleToolTrigger, name='TupleToolTrigger') + DTT.Ds.TupleToolTrigger.Verbose = True DTT.Ds.TupleToolTrigger.TriggerList = trigger_list + DTT.Ds.addTool(TupleToolTISTOS, name='TupleToolTISTOS') + DTT.Ds.TupleToolTISTOS.Verbose = True DTT.Ds.TupleToolTISTOS.TriggerList = trigger_list + DTT.Ds.ToolList += ["TupleToolTISTOS"] #DTT.Lambda_b0.addTool(TupleToolSLTools, name='TupleToolSLTools') #DTT.Lambda_b0.ToolList += ["TupleToolSLTools"] @@ -247,7 +264,10 @@ DaVinci().Simulation = True DaVinci().Lumi = True DaVinci().RootInTES = '/Event/AllStreams' +#not this + DaVinci().InputType = 'MDST' + #DaVinci().appendToMainSequence([muons_from_Lc_sel_seq.sequence(), # muons_from_Lc_sel_WC_seq.sequence()]) DaVinci().appendToMainSequence([Ds_phi_pi_sel_seq.sequence()]) @@ -259,7 +279,7 @@ #DaVinci().UserAlgorithms.extend(decay_trees) DaVinci().TupleFile = "Ds_eepi.root" -#DaVinci().Input = ['PFN:/disk/gangadir/davide/workspace/davide/00071955_00000002_7.AllStreams.mdst'] +#DaVinci().Input = ['PFN:/disk/gangadir/davide/workspace/davide/local_MC/Ds_phipi_ee/00071955_00000002_7.AllStreams.mdst'] DaVinci().DataType = "2016" diff --git a/productions/online_test_mc/Ds_mumupi_mc_online.py b/productions/online_test_mc/Ds_mumupi_mc_online.py index a894ae5..3e011e3 100644 --- a/productions/online_test_mc/Ds_mumupi_mc_online.py +++ b/productions/online_test_mc/Ds_mumupi_mc_online.py @@ -52,12 +52,13 @@ decay_OSmumu = "[D_s+ -> ^(phi(1020) -> ^mu+ ^mu-) ^pi+]CC" #decay_OSmumu = "[D+ -> ^pi+ ^mu+ ^mu-]CC" - +#for mc /Event/ #decay_tree_location_Dplus_electrons = 'Phys/D2XMuMuSS_Pi_EE_OSLine/Particles' decay_tree_location_Dplus_muons = 'Phys/D2XMuMuSS_PiOSLine/Particles' -#ACCESSING TO THE DECAY DAUGHTERS + StrippingSel = AutomaticData(decay_tree_location_Dplus_muons) +#ACCESSING TO THE DECAY DAUGHTERS muon_from_Ds = FilterInTrees('muon_from_Ds', Code="('mu-' == ABSID)") muon_from_Ds_sel = Selection("muon_from_Ds_sel", @@ -80,6 +81,7 @@ # pion_Filter = FilterDesktop('pionFilter', Code="ALL") pion_Filter = FilterDesktop('pionFilter', Code="PPINFO(PROBNNpi)>0.2") + pion_Filter_sel = Selection("Filtered_pion_sel", Algorithm=pion_Filter, RequiredSelections=[pion_from_Ds_sel]) @@ -116,10 +118,6 @@ TopSelection=Ds_sel ) ############################################################################# -# Now WS: -# Lb_SL_WS = CombineParticles("Lb_SL_WS") -# Lb_SL_WS.DecayDescriptors = ["[Lambda_b0 -> Lambda_c(2595)+ mu+]cc"] -# Lb_SL_WS.MotherCut = "(M<6500) & (VFASPF(VCHI2/VDOF) < 6.0) & (BPVDIRA>0.999)" @@ -142,15 +140,32 @@ }) + + +#Ds_OfflineTree.Ds.addTupleTool('') Ds_OfflineTree.Ds.addTupleTool('TupleToolDecayTreeFitter/ConsD') + + #Ds_OfflineTree.Ds.ConsD.constrainToOriginVertex = True Ds_OfflineTree.Ds.ConsD.Verbose = True Ds_OfflineTree.Ds.ConsD.daughtersToConstrain = ['phi(1020)'] Ds_OfflineTree.Ds.ConsD.UpdateDaughters = True - decay_trees.append(Ds_OfflineTree) + +# LoKi_Cone = LoKi__Hybrid__TupleTool('LoKi_Cone') +# LoKi_Cone.Variables = { +# "VTXISONUMVTX" : "RELINFO('/Event/AllStreams/Phys/D2XMuMuSS_PiOSLine/RelInfoVertexIsolation', 'VTXISONUMVTX', -999.)", +# #"VTXISONUMVTX" : "RELINFO(Phys/D2XMuMuSS_PiOSLine/Particles/RelInfoVertexIsolation, VTXISONUMVTX, -1.)", +# #"VTXISODCHI2ONETRACK" : "RELINFO('Phys/D2XMuMuSS_PiOSLine/Particles/VertexIsoInfo', 'VTXISODCHI2ONETRACK', -1.)", +# #"VTXISODCHI2MASSONETRACK" : "RELINFO('Phys/D2XMuMuSS_PiOSLine/Particles/VertexIsoInfo', 'VTXISODCHI2MASSONETRACK', -1.)", +# #"VTXISODCHI2TWOTRACK" : "RELINFO('Phys/D2XMuMuSS_PiOSLine/Particles/VertexIsoInfo', 'VTXISODCHI2TWOTRACK', -1.)", +# #"VTXISODCHI2MASSTWOTRACK" : "RELINFO('Phys/D2XMuMuSS_PiOSLine/Particles/VertexIsoInfo', 'VTXISODCHI2MASSTWOTRACK', -1.)", +# } + +# Ds_OfflineTree.Ds.addTupleTool(LoKi_Cone) + # Lb_SL_OfflineTree_WS = DecayTreeTuple("Lb_SL_OfflineTree_WS") # Lb_SL_OfflineTree_WS.Inputs = ["Phys/Lb_SL_WS/Particles"] # Lb_SL_OfflineTree_WS.Decay = decay0_WS @@ -178,12 +193,16 @@ from Configurables import TupleToolGeometry from Configurables import TupleToolTrackIsolation from Configurables import TupleToolANNPID +from Configurables import TupleToolMCBackgroundInfo +from Configurables import TupleToolMCTruth +from Configurables import TupleToolBremInfo # from Configurables import Rich__Rec__DetailedTrSegMakerFromRecoTracks # from Configurables import TupleToolRICHPid #from Configurables import TupleToolApplyIsolation #from Configurables import TupleToolSLTools + for DTT in decay_trees: DTT.ToolList = [ "TupleToolKinematic", @@ -193,7 +212,10 @@ "TupleToolRecoStats", "TupleToolANNPID", "TupleToolPid", - # "TupleToolMCTruth", + "TupleToolMCTruth", + "TupleToolMCBackgroundInfo", + "TupleToolBremInfo", + # 'TupleToolTrigger', # 'TupleToolTISTOS', # 'TupleToolRICHPid', @@ -202,13 +224,23 @@ # DTT.pi_plus.ToolList+=['TupleToolANNPID'] # DTT.pi_plus.TupleToolANNPID.ANNPIDTunes = ['MC15TuneV1','MC15TuneDNNV1','MC15TuneFLAT4dV1','MC15TuneCatBoostV1'] # print 'PID tunes',DTT.pi_plus.TupleToolANNPID.ANNPIDTunes + + DTT.addTool( TupleToolMCTruth, name="TupleToolMCTruth" ) + DTT.TupleToolMCTruth.ToolList += ["MCTupleToolHierarchy","MCTupleToolHierarchy"] + DTT.Ds.addTool(TupleToolTrigger, name='TupleToolTrigger') + DTT.Ds.TupleToolTrigger.Verbose = True DTT.Ds.TupleToolTrigger.TriggerList = trigger_list + DTT.Ds.addTool(TupleToolTISTOS, name='TupleToolTISTOS') + DTT.Ds.TupleToolTISTOS.Verbose = True DTT.Ds.TupleToolTISTOS.TriggerList = trigger_list + DTT.Ds.ToolList += ["TupleToolTISTOS"] + + #DTT.Lambda_b0.addTool(TupleToolSLTools, name='TupleToolSLTools') #DTT.Lambda_b0.ToolList += ["TupleToolSLTools"] @@ -257,7 +289,7 @@ #DaVinci().UserAlgorithms.extend(decay_trees) DaVinci().TupleFile = "Ds_mumupi.root" -#DaVinci().Input = ['PFN:/disk/gangadir/davide/workspace/davide/00071953_00000001_7.AllStreams.mdst'] +#DaVinci().Input = ['PFN:/disk/gangadir/davide/workspace/davide/local_MC/Ds_phipi_mumu/00071953_00000001_7.AllStreams.mdst'] # DaVinci().DataType = "2016"