Skip to content
Snippets Groups Projects

Update BPHY13

Merged Xin Chen requested to merge xchen/athena:mytopic into 21.2
All threads resolved!
1 file
+ 85
22
Compare changes
  • Side-by-side
  • Inline
@@ -135,18 +135,74 @@ print BPHY13FourTrackSelectAndWrite
from DerivationFrameworkBPhys.DerivationFrameworkBPhysConf import DerivationFramework__Select_onia2mumu
BPHY13_Select_FourTrack = DerivationFramework__Select_onia2mumu(
name = "BPHY13_Select_FourTrack",
HypothesisName = "FourTracks",
InputVtxContainerName = "BPHY13FourTrack",
TrkMasses = [105.658, 105.658, 105.658, 105.658],
VtxMassHypo = 6900.0, # for decay time
MassMin = 0.,
MassMax = 25000.,
Chi2Max = 200.)
ToolSvc += BPHY13_Select_FourTrack
print BPHY13_Select_FourTrack
if 'doBlinding' in vars() and doBlinding==True and not isSimulation:
#
# select 4 regions (before unblinding)
#
BPHY13_Select1_FourTrack = DerivationFramework__Select_onia2mumu(
name = "BPHY13_Select1_FourTrack",
HypothesisName = "FourTracks1",
InputVtxContainerName = "BPHY13FourTrack",
TrkMasses = [105.658, 105.658, 105.658, 105.658],
VtxMassHypo = 6900.0, # for decay time
MassMin = 7500.,
MassMax = 9000.,
Chi2Max = 200.)
ToolSvc += BPHY13_Select1_FourTrack
print BPHY13_Select1_FourTrack
BPHY13_Select2_FourTrack = DerivationFramework__Select_onia2mumu(
name = "BPHY13_Select2_FourTrack",
HypothesisName = "FourTracks2",
InputVtxContainerName = "BPHY13FourTrack",
TrkMasses = [105.658, 105.658, 105.658, 105.658],
VtxMassHypo = 6900.0, # for decay time
MassMin = 10000.,
MassMax = 12000.,
Chi2Max = 200.)
ToolSvc += BPHY13_Select2_FourTrack
print BPHY13_Select2_FourTrack
BPHY13_Select3_FourTrack = DerivationFramework__Select_onia2mumu(
name = "BPHY13_Select3_FourTrack",
HypothesisName = "FourTracks3",
InputVtxContainerName = "BPHY13FourTrack",
TrkMasses = [105.658, 105.658, 105.658, 105.658],
VtxMassHypo = 6900.0, #for decay time
MassMin = 14000.,
MassMax = 17500.,
Chi2Max = 200.)
ToolSvc += BPHY13_Select3_FourTrack
print BPHY13_Select3_FourTrack
BPHY13_Select4_FourTrack = DerivationFramework__Select_onia2mumu(
name = "BPHY13_Select4_FourTrack",
HypothesisName = "FourTracks4",
InputVtxContainerName = "BPHY13FourTrack",
TrkMasses = [105.658, 105.658, 105.658, 105.658],
VtxMassHypo = 6900.0, #for decay time
MassMin = 19500.,
MassMax = 25000.,
Chi2Max = 200.)
ToolSvc += BPHY13_Select4_FourTrack
print BPHY13_Select4_FourTrack
else:
BPHY13_Select_FourTrack = DerivationFramework__Select_onia2mumu(
name = "BPHY13_Select_FourTrack",
HypothesisName = "FourTracks",
InputVtxContainerName = "BPHY13FourTrack",
TrkMasses = [105.658, 105.658, 105.658, 105.658],
VtxMassHypo = 6900.0, # for decay time
MassMin = 0.,
MassMax = 25000.,
Chi2Max = 200.)
ToolSvc += BPHY13_Select_FourTrack
print BPHY13_Select_FourTrack
#====================================================================
@@ -161,7 +217,7 @@ BPHY13TrackIsolationDecorator = DerivationFramework__VertexTrackIsolation(
TrackIsoTool = "xAOD::TrackIsolationTool",
TrackContainer = "InDetTrackParticles",
InputVertexContainer = "BPHY13FourTrack",
PassFlags = ["passed_FourTracks"],
PassFlags = ["passed_FourTracks","passed_FourTracks1","passed_FourTracks2","passed_FourTracks3","passed_FourTracks4"],
DoIsoPerTrk = True,
RemoveDuplicate = 2
)
@@ -354,12 +410,13 @@ print BPHY13_Select_TwoTrackMed
## where "ContainerName" is output container from some Reco_* tool, "HypoName" is the hypothesis name setup in some "Select_*"
## tool and "count" is the number of candidates passing the selection you want to keep.
#expression = "count(BPHY13FourTrack.passed_FourTracks) > 0"
expression = "count(BPHY13FourTrack.passed_FourTracks) > 0 && ( count(BPHY13TwoMuon.passed_TwoMuons) + count(BPHY13TwoTrack.passed_TwoTracks) > 1 || count(BPHY13TwoMuonMed.passed_TwoMuonsMed) + count(BPHY13TwoTrackMed.passed_TwoTracksMed) > 1 || count(BPHY13TwoMuon.passed_TwoMuons) + count(BPHY13TwoTrackMed.passed_TwoTracksMed) > 1 || count(BPHY13TwoMuonMed.passed_TwoMuonsMed) + count(BPHY13TwoTrack.passed_TwoTracks) > 1 || count(BPHY13TwoMuonHi.passed_TwoMuonsHi) + count(BPHY13TwoTrackHi.passed_TwoTracksHi) > 0 )"
if 'doBlinding' in vars() and doBlinding==True and not isSimulation:
expression = "count(BPHY13FourTrack.passed_FourTracks1)+count(BPHY13FourTrack.passed_FourTracks2)+count(BPHY13FourTrack.passed_FourTracks3)+count(BPHY13FourTrack.passed_FourTracks4) > 0 && ( count(BPHY13TwoMuon.passed_TwoMuons) + count(BPHY13TwoTrack.passed_TwoTracks) > 1 || count(BPHY13TwoMuonMed.passed_TwoMuonsMed) + count(BPHY13TwoTrackMed.passed_TwoTracksMed) > 1 || count(BPHY13TwoMuon.passed_TwoMuons) + count(BPHY13TwoTrackMed.passed_TwoTracksMed) > 1 || count(BPHY13TwoMuonMed.passed_TwoMuonsMed) + count(BPHY13TwoTrack.passed_TwoTracks) > 1 || count(BPHY13TwoMuonHi.passed_TwoMuonsHi) + count(BPHY13TwoTrackHi.passed_TwoTracksHi) > 0 )"
from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool
BPHY13_SelectEvent = DerivationFramework__xAODStringSkimmingTool(name = "BPHY13_SelectEvent",
expression = expression)
BPHY13_SelectEvent = DerivationFramework__xAODStringSkimmingTool(name = "BPHY13_SelectEvent", expression = expression)
ToolSvc += BPHY13_SelectEvent
print BPHY13_SelectEvent
@@ -386,11 +443,18 @@ print BPHY13_SelectEvent
# The name of the kernel (BPHY13Kernel in this case) must be unique to this derivation
from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel
DerivationFrameworkJob += CfgMgr.DerivationFramework__DerivationKernel(
"BPHY13Kernel",
AugmentationTools = [BPHY13_Reco_mumu, BPHY13FourTrackSelectAndWrite, BPHY13_Select_FourTrack, BPHY13TrackIsolationDecorator, BPHY13_Revertex_2mu, BPHY13_Select_TwoMuon, BPHY13_Revertex_2trk, BPHY13_Select_TwoTrack, BPHY13_Revertex_2muHi, BPHY13_Select_TwoMuonHi, BPHY13_Revertex_2trkHi, BPHY13_Select_TwoTrackHi, BPHY13_Revertex_2muMed, BPHY13_Select_TwoMuonMed, BPHY13_Revertex_2trkMed, BPHY13_Select_TwoTrackMed],
SkimmingTools = [BPHY13_SelectEvent]
)
if 'doBlinding' in vars() and doBlinding==True and not isSimulation:
DerivationFrameworkJob += CfgMgr.DerivationFramework__DerivationKernel(
"BPHY13Kernel",
AugmentationTools = [BPHY13_Reco_mumu, BPHY13FourTrackSelectAndWrite, BPHY13_Select1_FourTrack, BPHY13_Select2_FourTrack, BPHY13_Select3_FourTrack, BPHY13_Select4_FourTrack, BPHY13TrackIsolationDecorator, BPHY13_Revertex_2mu, BPHY13_Select_TwoMuon, BPHY13_Revertex_2trk, BPHY13_Select_TwoTrack, BPHY13_Revertex_2muHi, BPHY13_Select_TwoMuonHi, BPHY13_Revertex_2trkHi, BPHY13_Select_TwoTrackHi, BPHY13_Revertex_2muMed, BPHY13_Select_TwoMuonMed, BPHY13_Revertex_2trkMed, BPHY13_Select_TwoTrackMed],
SkimmingTools = [BPHY13_SelectEvent]
)
else:
DerivationFrameworkJob += CfgMgr.DerivationFramework__DerivationKernel(
"BPHY13Kernel",
AugmentationTools = [BPHY13_Reco_mumu, BPHY13FourTrackSelectAndWrite, BPHY13_Select_FourTrack, BPHY13TrackIsolationDecorator, BPHY13_Revertex_2mu, BPHY13_Select_TwoMuon, BPHY13_Revertex_2trk, BPHY13_Select_TwoTrack, BPHY13_Revertex_2muHi, BPHY13_Select_TwoMuonHi, BPHY13_Revertex_2trkHi, BPHY13_Select_TwoTrackHi, BPHY13_Revertex_2muMed, BPHY13_Select_TwoMuonMed, BPHY13_Revertex_2trkMed, BPHY13_Select_TwoTrackMed],
SkimmingTools = [BPHY13_SelectEvent]
)
#====================================================================
# SET UP STREAM
@@ -481,4 +545,3 @@ if isSimulation:
BPHY13SlimmingHelper.AllVariables = BPHY13_AllVariables
BPHY13SlimmingHelper.StaticContent = BPHY13_StaticContent
BPHY13SlimmingHelper.AppendContentToStream(BPHY13Stream)
Loading