diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/CMakeLists.txt b/Trigger/TrigHypothesis/TrigBphysHypo/CMakeLists.txt index 7277228c79334fe456bf0e253ef1ae1e514812ca..03c5cbb59c79370ba6974bc32eec580c82c9412f 100644 --- a/Trigger/TrigHypothesis/TrigBphysHypo/CMakeLists.txt +++ b/Trigger/TrigHypothesis/TrigBphysHypo/CMakeLists.txt @@ -12,7 +12,7 @@ atlas_add_component( TrigBphysHypo src/*.cxx src/components/*.cxx INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} ${ROOT_LIBRARIES} AthLinks AthViews AthenaBaseComps AthenaKernel AthenaMonitoringKernelLib BeamSpotConditionsData DecisionHandlingLib ElectronPhotonSelectorToolsLib FourMomUtils InDetConversionFinderToolsLib ITrackToVertex LumiBlockCompsLib StoreGateLib TrigBphysicsEvent TrigCompositeUtilsLib TrigConfHLTData TrigInDetEvent TrigInDetToolInterfacesLib TrigInterfacesLib TrigNavigationLib TrigParticle TrigSteeringEvent TrigTimeAlgsLib TrkVKalVrtFitterLib xAODBase xAODEgamma xAODEventInfo xAODMuon xAODTracking xAODTrigBphys xAODTrigMuon xAODTrigger ) + LINK_LIBRARIES ${CLHEP_LIBRARIES} ${ROOT_LIBRARIES} AthLinks AthViews AthenaBaseComps AthenaKernel AthenaMonitoringKernelLib BeamSpotConditionsData DecisionHandlingLib InDetConversionFinderToolsLib ITrackToVertex TrigCompositeUtilsLib TrigConfHLTData TrkVKalVrtFitterLib xAODEgamma xAODEventInfo xAODMuon xAODTracking xAODTrigBphys xAODTrigger ) # Install files from the package: atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-extensions=ATL900,ATL901 ) diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigBphysElectronCounterConfig.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigBphysElectronCounterConfig.py deleted file mode 100644 index 3b33d86404cda4d1817661bd77d6317068c7bca8..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigBphysElectronCounterConfig.py +++ /dev/null @@ -1,97 +0,0 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration - -# include the python fragment to set up the default bphysics vertex fitter -from TrigBphysHypo import TrigBphysVertexingConfig # noqa: F401 - -from TrigBphysHypo.TrigBphysHypoConf import TrigBphysElectronCounter - -from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig -from TrigBphysHypo.TrigBphysElectronCounterMonitoring import TrigBphysElectronCounterValidationMonitoring -from TrigBphysHypo.TrigBphysElectronCounterMonitoring import TrigBphysElectronCounterOnlineMonitoring - -from AthenaCommon.Logging import logging -logging.getLogger().info("Importing %s",__name__) -log = logging.getLogger(__name__) - - -class TrigBphysElectronCounterPy (TrigBphysElectronCounter): - __slots__ = [] - def __init__(self, name = "MultiTrkFexPy"): - super( TrigBphysElectronCounterPy, self ).__init__( name ) - - def setEFElectronThresholds(self, thresholds, defaultThreshold = 4000.) : - self.ptElectronMin = [] # reset, use thresholds from trigger name - for thr in sorted(thresholds) : # should should have lowest pt first, which is what we want - if len(self.ptElectronMin) < self.nEfElectron : - self.ptElectronMin.append( thr ) - while len(self.ptElectronMin) < self.nEfElectron : - self.ptElectronMin.append(defaultThreshold) # lower pt cut makes no sense at trigger - - - -################################################################################### -class TrigBphysElectronCounter_bNe (TrigBphysElectronCounterPy): - __slots__ = [] - # lets force name setting, as it needs to match pt cuts - def __init__(self, name, ptElectronMin, pidKey ): - super( TrigBphysElectronCounter_bNe, self ).__init__( name ) - - self.nEfElectron = len(ptElectronMin) - self.ptElectronMin = [] - for thr in ptElectronMin : - self.ptElectronMin.append(thr) - - # set up PID - defined in TrigHypothesis/TrigEgammaHypo/python/TrigEgammaPidTools - from TrigEgammaHypo.TrigEgammaPidTools import (ElectronToolName,BLooseISEMBits) - if pidKey is None or pidKey not in ElectronToolName.keys() or pidKey not in BLooseISEMBits.keys() : - log.info(" Setting up bphys electron chain with no electron PID requirement") - self.ApplyIsEM = False - else : - self.ApplyIsEM = True - self.egammaElectronCutIDToolName = ElectronToolName[pidKey] - self.IsEMrequiredBits = BLooseISEMBits[pidKey] - - time = TrigTimeHistToolConfig("Time") - validation = TrigBphysElectronCounterValidationMonitoring() - online = TrigBphysElectronCounterOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -################################################################################### -class TrigBphysElectronCounter_bBee (TrigBphysElectronCounterPy): - __slots__ = [] - # lets force name setting, as it needs to match pt cuts - def __init__(self, name, ptElectronMin, pidKey , defaultThreshold = 4650.): - super( TrigBphysElectronCounter_bBee, self ).__init__( name ) - - self.nEfElectron = 2 - self.ptElectronMin = [] - self.setEFElectronThresholds( self.ptElectronMin, defaultThreshold ) - self.electronCollectionKey = "egamma_Electrons" - self.overlapdR = 0.005 - - # set up PID - defined in TrigHypothesis/TrigEgammaHypo/python/TrigEgammaPidTools - from TrigEgammaHypo.TrigEgammaPidTools import (ElectronToolName,BLooseISEMBits,ElectronIsEMBits) - if pidKey is None or pidKey not in ElectronToolName.keys() : - log.info(" Setting up bphys electron chain with no electron PID requirement") - self.ApplyIsEM = False - else : - self.ApplyIsEM = True - if "LH" in ElectronToolName[pidKey] : - self.AthenaElectronLHIDSelectorToolName='AsgElectronLikelihoodTool/'+ ElectronToolName[pidKey] - self.UseAthenaElectronLHIDSelectorTool = True - self.IsEMrequiredBits = 0 - else : - self.egammaElectronCutIDToolName = ElectronToolName[pidKey] - self.UseAthenaElectronLHIDSelectorTool = False - if pidKey in BLooseISEMBits.keys() : - self.IsEMrequiredBits = BLooseISEMBits[pidKey] - else : - self.IsEMrequiredBits = ElectronIsEMBits[pidKey] - - time = TrigTimeHistToolConfig("Time") - validation = TrigBphysElectronCounterValidationMonitoring() - online = TrigBphysElectronCounterOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigBphysElectronCounterMonitoring.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigBphysElectronCounterMonitoring.py deleted file mode 100644 index 0465d3e8f10e6076037afd7b5166c91f0304df5d..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigBphysElectronCounterMonitoring.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig - -ACCEPTANCE_labels = ' HltExecute : PassNElectrons : Pass elec PID : pass pt' -ACCEPTANCE_number = 4 - -class TrigBphysElectronCounterValidationMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigBphysElectronCounterValidationMonitoring"): - super(TrigBphysElectronCounterValidationMonitoring, self).__init__(name) - self.defineTarget("Validation") - self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - title = 'BphysElectronCounter - Reached steps - acceptance ; # Events ; step', - xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - labels = ACCEPTANCE_labels ) ] - self.Histograms += [ defineHistogram('nEFElectrons', type='TH1F', title="Number of EF electrons", - xbins=100, xmin=0., xmax=13.) ] - - - - -class TrigBphysElectronCounterOnlineMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigBphysElectronCounterOnlineMonitoring"): - super(TrigBphysElectronCounterOnlineMonitoring, self).__init__(name) - self.defineTarget("Online") - self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - title = 'BphysElectronCounter - Reached steps - acceptance ; # Events ; step', - xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - labels = ACCEPTANCE_labels ) ] - self.Histograms += [ defineHistogram('nEFElectrons', type='TH1F', title="Number of EF electrons", - xbins=100, xmin=0., xmax=13.) ] - diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigBphysMuonCounterConfig.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigBphysMuonCounterConfig.py deleted file mode 100644 index 6eecde65077971ca92a4970b0dc41482a8b26730..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigBphysMuonCounterConfig.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration - -# include the python fragment to set up the default bphysics vertex fitter -from TrigBphysHypo import TrigBphysVertexingConfig # noqa: F401 - -from TrigBphysHypo.TrigBphysHypoConf import TrigBphysMuonCounter - -from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig -from TrigBphysHypo.TrigBphysMuonCounterMonitoring import TrigBphysMuonCounterValidationMonitoring -from TrigBphysHypo.TrigBphysMuonCounterMonitoring import TrigBphysMuonCounterOnlineMonitoring - - -class TrigBphysMuonCounterPy (TrigBphysMuonCounter): - __slots__ = [] - def __init__(self, name = "MultiTrkFexPy"): - super( TrigBphysMuonCounterPy, self ).__init__( name ) - - def setEFMuonThresholds(self, thresholds) : - self.ptMuonMin = [] # reset, use thresholds from trigger name - for thr in sorted(thresholds) : # should should have lowest pt first, which is what we want - if len(self.ptMuonMin) < self.nEfMuon : - self.ptMuonMin.append( thr ) - while len(self.ptMuonMin) < self.nEfMuon : - self.ptMuonMin.append(2000.) # lower pt cut makes no sense at trigger - - - -################################################################################### -class TrigBphysMuonCounter_bNmu (TrigBphysMuonCounterPy): - __slots__ = [] - # lets force name setting, as it needs to match pt cuts - def __init__(self, name, ptMuonMin ): - super( TrigBphysMuonCounter_bNmu, self ).__init__( name ) - - self.nEfMuon = len(ptMuonMin) - self.ptMuonMin = [] - for thr in ptMuonMin : - self.ptMuonMin.append(thr) - - time = TrigTimeHistToolConfig("Time") - validation = TrigBphysMuonCounterValidationMonitoring() - online = TrigBphysMuonCounterOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigBphysMuonCounterMonitoring.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigBphysMuonCounterMonitoring.py deleted file mode 100644 index 82cd0f12e923e3ec0012bf9deac98a41cb170e7e..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigBphysMuonCounterMonitoring.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig - -ACCEPTANCE_labels = ' HltExecute : PassNEFMuons' -ACCEPTANCE_number = 2 - -class TrigBphysMuonCounterValidationMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigBphysMuonCounterValidationMonitoring"): - super(TrigBphysMuonCounterValidationMonitoring, self).__init__(name) - self.defineTarget("Validation") - self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - title = 'BphysMuonCounter - Reached steps - acceptance ; # Events ; step', - xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - labels = ACCEPTANCE_labels ) ] - self.Histograms += [ defineHistogram('nEFMuons', type='TH1F', title="Number of EF muons", - xbins=100, xmin=0., xmax=13.) ] - - - - -class TrigBphysMuonCounterOnlineMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigBphysMuonCounterOnlineMonitoring"): - super(TrigBphysMuonCounterOnlineMonitoring, self).__init__(name) - self.defineTarget("Online") - self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - title = 'BphysMuonCounter - Reached steps - acceptance ; # Events ; step', - xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - labels = ACCEPTANCE_labels ) ] - self.Histograms += [ defineHistogram('nEFMuons', type='TH1F', title="Number of EF muons", - xbins=100, xmin=0., xmax=13.) ] - diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigBphysVertexingConfig.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigBphysVertexingConfig.py deleted file mode 100644 index ca350f9b3452a09cfa5daf1dc98e3e935833f8f2..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigBphysVertexingConfig.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration - -# Avoid double inclusion: -#include.block( "TrigBphysHypo/TrigBphysVertexingConfig.py" ) - -# Set up the TrigBphysHelperUtils to use special configuration of VertexFitter -from TrkVKalVrtFitter.TrkVKalVrtFitterConf import Trk__TrkVKalVrtFitter -from TrigBphysHypo.TrigBphysHypoConf import TrigBphysHelperUtilsTool - -from AthenaCommon.AppMgr import ToolSvc -#from TrkExTools.AtlasExtrapolator import AtlasExtrapolator -#TrigBphysExtrapolator = AtlasExtrapolator() -#ToolSvc += TrigBphysExtrapolator -#print TrigBphysExtrapolator - -from InDetRecExample import TrackingCommon - -trigBphysFitter = Trk__TrkVKalVrtFitter("TrigBphysFitter", - FirstMeasuredPoint = False, - MakeExtendedVertex = True, - #OutputLevel = 2, - Extrapolator = TrackingCommon.getInDetExtrapolator(), - ) -ToolSvc += trigBphysFitter -ToolSvc += TrigBphysHelperUtilsTool(VertexFitterTool = ToolSvc.TrigBphysFitter, - #OutputLevel=2 - ) - -# fitter and helper tool with legacy configuration -trigBphysFitterLegacy = Trk__TrkVKalVrtFitter("TrigBphysFitterLegacy", - #OutputLevel = 2, - ) -ToolSvc += trigBphysFitterLegacy -trigBphysHelperUtilsToolLegacy = TrigBphysHelperUtilsTool("TrigBphysHelperUtilsToolLegacy", - VertexFitterTool = ToolSvc.TrigBphysFitterLegacy, - #OutputLevel = 2, - ) #, -ToolSvc += trigBphysHelperUtilsToolLegacy - -#print ToolSvc.TrigBphysFitter -#print ToolSvc.TrigBphysFitterLegacy -#print ToolSvc.TrigBphysHelperUtilsTool -#print ToolSvc.TrigBphysHelperUtilsToolLegacy - - diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFBEEXFexConfig.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFBEEXFexConfig.py deleted file mode 100644 index a4d529a2a5ccb498ea5cc1833c99f021808a1035..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFBEEXFexConfig.py +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration - -# vim: tabstop=4:shiftwidth=4:expandtab -# include the python fragment to set up the default bphysics vertex fitter -from TrigBphysHypo.TrigBphysHypoConf import TrigEFBEEXFex -from TrigBphysHypo import TrigBphysVertexingConfig # noqa: F401 - - -class EFBEEXFex_1 (TrigEFBEEXFex): - __slots__ = [] - def __init__(self, name = "EFBEEXFex_1"): - super( TrigEFBEEXFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # Timeout protection: maximum number of track combinations to try - self.MaxNcombinations = 40000 #JW arbitary reduction from 50000 in ncombinations for timeouts - # muon part - self.OppositeSign = True # if check opposite sign of muons - self.LowerEEMassCut = 100. - self.UpperEEMassCut = 5500. - self.VtxChi2Cut = 20. - # B{+/-} -> K{+/-} Mu Mu - self.DoB_KEEDecay = True - self.LowerKEEMassCut = 4400.-1000. # reduce B mass cut by 1 GeV to allow for bremstrahlung - self.UpperKEEMassCut = 5800. #5900. - self.DoB_KEEVertexing = True - self.BVtxChi2Cut = 60. # 300 in L2 - # Bd -> K*(892) Mu Mu - self.DoBd_KstarEEDecay = True - self.LowerKstar_KaonMassCut = 700. - self.UpperKstar_KaonMassCut = 1100. #1500. - self.LowerBd_KstarEEMassCut = 4600. -1000. # reduce B mass cut by 1 GeV to allow for bremstrahlung - self.UpperBd_KstarEEMassCut = 5900. - self.DoKstar_KPiVertexing = True - self.DoBd_KstarEEVertexing = True - self.KstarVtxChi2Cut = 400. - self.BdVtxChi2Cut = 60. - # Bs -> Phi(1020) Mu Mu - self.DoBs_Phi1020EEDecay = True - self.LowerPhi1020_KaonMassCut = 940. #990. - self.UpperPhi1020_KaonMassCut = 1100. #1050. - self.LowerBs_Phi1020EEMassCut = 4800. -1000. # reduce B mass cut by 1 GeV to allow for bremstrahlung - self.UpperBs_Phi1020EEMassCut = 5800. #5800. - self.DoPhi1020_KKVertexing = True - self.DoBs_Phi1020EEVertexing = True - self.Phi1020VtxChi2Cut = 400. - self.BsVtxChi2Cut = 60. - - from TrigBphysHypo.TrigEFBEEXFexMonitoring import EFBEEXFexValidationMonitoring - validation = EFBEEXFexValidationMonitoring() - - from TrigBphysHypo.TrigEFBEEXFexMonitoring import EFBEEXFexOnlineMonitoring - online = EFBEEXFexOnlineMonitoring() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [ validation, online, time ] - - diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFBEEXFexMonitoring.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFBEEXFexMonitoring.py deleted file mode 100644 index 301031de0f5ded9e716a6a1878288e849d448630..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFBEEXFexMonitoring.py +++ /dev/null @@ -1,380 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -# vim: tabstop=4:shiftwidth=4:expandtab -from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig - -ERROR_labels = ' No_EventInfo : Not_2_InputTEs : No_RoIs : No_ElectronEFInfoContainer : No_ElectronCandidate : SameElectron : DiEVtxFitFails : DiEVtxMass_Fails : No_TrackColl : BplusVtxFit_Fails : BplusVtxMass_Fails : WrongDecayID : XVtxFit_Fails : XVtxMass_Fails : XEEVtxFit_Fails : XEEVtxMass_Fails : BphysCollStore_Fails : No_ElectronTrackMatch : TooManyCom_Acc : TooManyComb_Rej : MaxNumBpReached : MaxNumBdReached : MaxNumBsReached : MaxNumLbReached : MaxNumBcReached' -ERROR_number = 25 - -#ACCEPTANCE_labels = ' Input : AcceptAll : Got_RoIs : Got_Electrons : Got_TrackColl : Full_TrackColl : Full_IDTracks : Pass_OppChargeC : ElectronTracks_Added : Electron_Vertexing : CalcInvMass : ElectronVtx_Part : EE_mass : MotherVtxCreated : BphysCollParticle ' -#ACCEPTANCE_number = 15 - -class EFBEEXFexValidationMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="EFBEEXFexValidationMonitoring"): - super(EFBEEXFexValidationMonitoring, self).__init__(name) - self.defineTarget("Validation") - # General - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'EFBEEXFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'nTriedCombinations', type = 'TH1F', - title = 'EFBEEXFex - Number of track combinations tried ; # combinations ; # Events', - xbins = 1000, xmin = 0., xmax = 100000. ) ] - #self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - #title = 'L2BEEXFex - Reached steps - acceptance ; ; # Events / Candidates', - #xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - #labels = ACCEPTANCE_labels ) ] - # Timing - self.Histograms += [ defineHistogram ( 'TotalRunTime', type = 'TH1F', - title = 'EFBEEXFex - Total processing time ; t_{tot} [ms] ; # Events', - xbins = 100, xmin = 0., xmax = 50. ) ] - self.Histograms += [ defineHistogram ( 'VertexingTime', type = 'TH1F', - title = 'EFBEEXFex - Vertex fit processing time ; t_{vtx} [ms] ; # Events', - xbins = 100, xmin = 0., xmax = 50. ) ] - self.Histograms += [ defineHistogram ( 'TotalRunTime, VertexingTime', type = 'TH2F', - title = 'EFBEEXFex - Total vs. vertex fit processing time ; t_{tot} [ms] ; t_{vtx} [ms] ; # Events', - xbins = 100, xmin = 0., xmax = 50., - ybins = 100, ymin = 0., ymax = 50. ) ] - # RoIs - self.Histograms += [ defineHistogram ( 'RoI_RoI1Eta, RoI_RoI1Phi', type = 'TH2F', - title = 'EFBEEXFex - ROI1 direction ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'RoI_RoI2Eta, RoI_RoI2Phi', type = 'TH2F', - title = 'EFBEEXFex - ROI2 direction ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'RoI_dEtaRoI, RoI_dPhiRoI', type = 'TH2F', - title = 'EFBEEXFex - ROIs direction difference ; d#eta ; d#phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - # Electrons - self.Histograms += [ defineHistogram ( 'DiE_n', type = 'TH1F', - title = 'EFBEEXFex - number of electrons in RoIs; n(#mu) ; # Events', - xbins = 10, xmin = -0.5, xmax = 10-0.5 ) ] - self.Histograms += [ defineHistogram ( 'DiE_Pt_Mu1', type = 'TH1F', - title = 'EFBEEXFex - Positive electrons p_{T} (no vertexing); p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'DiE_Pt_Mu2', type = 'TH1F', - title = 'EFBEEXFex - Negative electrons p_{T} (no vertexing); p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'DiE_pTsumEE', type = 'TH1F', - title = 'EFBEEXFex - sum of two electrons p_{T} (no vertexing); p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'DiE_Eta_Mu1, DiE_Phi_Mu1', type = 'TH2F', - title = 'EFBEEXFex - Eta vs. phi of electron1 tracks (no vertexing); #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'DiE_Eta_Mu2, DiE_Phi_Mu2', type = 'TH2F', - title = 'EFBEEXFex - Eta vs. phi of electron2 tracks (no vertexing); #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'DiE_dEtaEE, DiE_dPhiEE', type = 'TH2F', - title = 'EFBEEXFex - dEta vs. dPhi between electron tracks (no vertexing); d#eta ; d#phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'DiE_InvMassEE, DiE_VtxMassEE', type = 'TH2F', - title = 'EFBEEXFex - InvMass vs. VtxMass of electron pair ; InvMass [GeV] ; VtxMass [GeV] ; # Events', - xbins = 80, xmin = 0., xmax = 20., - ybins = 80, ymin = 0., ymax = 20. ) ] - self.Histograms += [ defineHistogram ( 'DiE_InvMassEE', type = 'TH1F', - title = 'EFBEEXFex - InvMass of electron pair ; InvMass [GeV] ; # Events', - xbins = 100, xmin = 0., xmax = 10. ) ] - self.Histograms += [ defineHistogram ( 'DiE_Chi2EE', type = 'TH1F', - title = 'EFBEEXFex - dielectron vertex chi2 ; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - # Tracks - self.Histograms += [ defineHistogram ( 'Tracks_n', type = 'TH1F', - title = 'EFBEEXFex - number of tracks in event ; n(trks) ; # Events', - xbins = 200, xmin = -0.5, xmax = 200-0.5 ) ] - self.Histograms += [ defineHistogram ( 'Tracks_Eta, Tracks_Phi', type = 'TH2F', - title = 'EFBEEXFex - Eta vs. phi of all tracks ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Tracks_Pt', type = 'TH1F', - title = 'EFBEEXFex - p_{T} of all tracks; p_{T} [GeV] ; # Events', - xbins = 100, xmin = 0., xmax = 100. ) ] - # B+ - self.Histograms += [ defineHistogram ( 'BEEK_n', type = 'TH1F', - title = 'EFBEEXFex - number of B^{+} candidates in event ; n(B^{+}) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - self.Histograms += [ defineHistogram ( 'BEEK_Pt_K', type = 'TH1F', - title = 'EFBEEXFex - p_{T} of K in B^{+} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BEEK_Eta_K, BEEK_Phi_K', type = 'TH2F', - title = 'EFBEEXFex - Eta vs. phi of K in B^{+} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - #self.Histograms += [ defineHistogram ( 'BEEK_InvMass_B, BEEK_VtxMass_B', type = 'TH2F', - #title = 'EFBEEXFex - InvMass vs. VtxMass of B^{+} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 60, xmin = 4., xmax = 7., - #ybins = 60, ymin = 4., ymax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BEEK_InvMass_B', type = 'TH1F', - title = 'EFBEEXFex - InvMass of B^{+} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BEEK_Chi2_B', type = 'TH1F', - title = 'EFBEEXFex - B^{+} vertex chi2 ; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - # Bd - self.Histograms += [ defineHistogram ( 'BdEEKs_n', type = 'TH1F', - title = 'EFBEEXFex - number of B_{d} candidates in event ; n(B_{d}) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - self.Histograms += [ defineHistogram ( 'BdEEKs_Pt_K', type = 'TH1F', - title = 'EFBEEXFex - p_{T} of K in B_{d} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BdEEKs_Eta_K, BdEEKs_Phi_K', type = 'TH2F', - title = 'EFBEEXFex - Eta vs. phi of K in B_{d} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BdEEKs_Pt_Pi', type = 'TH1F', - title = 'EFBEEXFex - p_{T} of #pi in B_{d} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BdEEKs_Eta_Pi, BdEEKs_Phi_Pi', type = 'TH2F', - title = 'EFBEEXFex - Eta vs. phi of #pi in B_{d} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - #self.Histograms += [ defineHistogram ( 'BdEEKs_InvMass_Kstar, BdEEKs_VtxMass_Kstar', type = 'TH2F', - #title = 'EFBEEXFex - InvMass vs. VtxMass of K^{*} in B_{d} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 60, xmin = 4., xmax = 7., - #ybins = 60, ymin = 4., ymax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BdEEKs_InvMass_Kstar', type = 'TH1F', - title = 'EFBEEXFex - InvMass of K^{*} in B_{d} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 0.5, xmax = 2. ) ] - #self.Histograms += [ defineHistogram ( 'BdEEKs_InvMass_Bd, BdEEKs_VtxMass_Bd', type = 'TH2F', - #title = 'EFBEEXFex - InvMass vs. VtxMass of B_{d} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 60, xmin = 4., xmax = 7., - #ybins = 60, ymin = 4., ymax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BdEEKs_InvMass_Bd', type = 'TH1F', - title = 'EFBEEXFex - InvMass of B_{d} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BdEEKs_Chi2_Kstar', type = 'TH1F', - title = 'EFBEEXFex - K^{*} vertex chi2 in B_{d}; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - self.Histograms += [ defineHistogram ( 'BdEEKs_Chi2_Bd', type = 'TH1F', - title = 'EFBEEXFex - B_{d} vertex chi2 ; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - # Bs - self.Histograms += [ defineHistogram ( 'BsEEPhi_n', type = 'TH1F', - title = 'EFBEEXFex - number of B_{s} candidates in event ; n(B_{s}) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - self.Histograms += [ defineHistogram ( 'BsEEPhi_Pt_K1', type = 'TH1F', - title = 'EFBEEXFex - p_{T} of first K in B_{s} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BsEEPhi_Eta_K1, BsEEPhi_Phi_K1', type = 'TH2F', - title = 'EFBEEXFex - Eta vs. phi of first K in B_{s} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BsEEPhi_Pt_K2', type = 'TH1F', - title = 'EFBEEXFex - p_{T} of second K in B_{s} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BsEEPhi_Eta_K2, BsEEPhi_Phi_K2', type = 'TH2F', - title = 'EFBEEXFex - Eta vs. phi of second K in B_{s} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - #self.Histograms += [ defineHistogram ( 'BsEEPhi_InvMass_Phi1020, BsEEPhi_VtxMass_Phi1020', type = 'TH2F', - #title = 'EFBEEXFex - InvMass vs. VtxMass of #phi(1020) in B_{s} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 60, xmin = 4., xmax = 7., - #ybins = 60, ymin = 4., ymax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BsEEPhi_InvMass_Phi1020', type = 'TH1F', - title = 'EFBEEXFex - InvMass of #phi(1020) in B_{s} ; InvMass [GeV] ; # Candidates', - xbins = 200, xmin = 0.9, xmax = 1.3 ) ] - #self.Histograms += [ defineHistogram ( 'BsEEPhi_InvMass_Bs, BsEEPhi_VtxMass_Bs', type = 'TH2F', - #title = 'EFBEEXFex - InvMass vs. VtxMass of B_{s} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 60, xmin = 4., xmax = 7., - #ybins = 60, ymin = 4., ymax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BsEEPhi_InvMass_Bs', type = 'TH1F', - title = 'EFBEEXFex - InvMass of B_{s} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BsEEPhi_Chi2_Phi1020', type = 'TH1F', - title = 'EFBEEXFex - #phi(1020) vertex chi2 in B_{s}; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - self.Histograms += [ defineHistogram ( 'BsEEPhi_Chi2_Bs', type = 'TH1F', - title = 'EFBEEXFex - B_{s} vertex chi2 ; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - - - -class EFBEEXFexOnlineMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="EFBEEXFexOnlineMonitoring"): - super(EFBEEXFexOnlineMonitoring, self).__init__(name) - self.defineTarget("Online") - # General - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'EFBEEXFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'nTriedCombinations', type = 'TH1F', - title = 'EFBEEXFex - Number of track combinations tried ; # combinations ; # Events', - xbins = 1000, xmin = 0., xmax = 100000. ) ] - #self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - #title = 'L2BEEXFex - Reached steps - acceptance ; ; # Events / Candidates', - #xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - #labels = ACCEPTANCE_labels ) ] - ## Timing - #self.Histograms += [ defineHistogram ( 'TotalRunTime', type = 'TH1F', - #title = 'EFBEEXFex - Total processing time ; t_{tot} [ms] ; # Events', - #xbins = 100, xmin = 0., xmax = 50. ) ] - #self.Histograms += [ defineHistogram ( 'VertexingTime', type = 'TH1F', - #title = 'EFBEEXFex - Vertex fit processing time ; t_{vtx} [ms] ; # Events', - #xbins = 100, xmin = 0., xmax = 50. ) ] - #self.Histograms += [ defineHistogram ( 'TotalRunTime, VertexingTime', type = 'TH2F', - #title = 'EFBEEXFex - Total vs. vertex fit processing time ; t_{tot} [ms] ; t_{vtx} [ms] ; # Events', - #xbins = 100, xmin = 0., xmax = 50., - #ybins = 100, ymin = 0., ymax = 50. ) ] - # RoIs - self.Histograms += [ defineHistogram ( 'RoI_RoI1Eta, RoI_RoI1Phi', type = 'TH2F', - title = 'EFBEEXFex - ROI1 direction ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'RoI_RoI2Eta, RoI_RoI2Phi', type = 'TH2F', - title = 'EFBEEXFex - ROI2 direction ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'RoI_dEtaRoI, RoI_dPhiRoI', type = 'TH2F', - title = 'EFBEEXFex - ROIs direction difference ; d#eta ; d#phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - # Electrons - self.Histograms += [ defineHistogram ( 'DiE_n', type = 'TH1F', - title = 'EFBEEXFex - number of electrons in RoIs; n(#mu) ; # Events', - xbins = 10, xmin = -0.5, xmax = 10-0.5 ) ] - self.Histograms += [ defineHistogram ( 'DiE_Pt_Mu1', type = 'TH1F', - title = 'EFBEEXFex - Positive electrons p_{T} (no vertexing); p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'DiE_Pt_Mu2', type = 'TH1F', - title = 'EFBEEXFex - Negative electrons p_{T} (no vertexing); p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'DiE_pTsumEE', type = 'TH1F', - title = 'EFBEEXFex - sum of two electrons p_{T} (no vertexing); p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'DiE_Eta_Mu1, DiE_Phi_Mu1', type = 'TH2F', - title = 'EFBEEXFex - Eta vs. phi of electron1 tracks (no vertexing); #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'DiE_Eta_Mu2, DiE_Phi_Mu2', type = 'TH2F', - title = 'EFBEEXFex - Eta vs. phi of electron2 tracks (no vertexing); #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'DiE_dEtaEE, DiE_dPhiEE', type = 'TH2F', - title = 'EFBEEXFex - dEta vs. dPhi between electron tracks (no vertexing); d#eta ; d#phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'DiE_InvMassEE, DiE_VtxMassEE', type = 'TH2F', - title = 'EFBEEXFex - InvMass vs. VtxMass of electron pair ; InvMass [GeV] ; VtxMass [GeV] ; # Events', - xbins = 80, xmin = 0., xmax = 20., - ybins = 80, ymin = 0., ymax = 20. ) ] - self.Histograms += [ defineHistogram ( 'DiE_InvMassEE', type = 'TH1F', - title = 'EFBEEXFex - InvMass of electron pair ; InvMass [GeV] ; # Events', - xbins = 100, xmin = 0., xmax = 10. ) ] - self.Histograms += [ defineHistogram ( 'DiE_Chi2EE', type = 'TH1F', - title = 'EFBEEXFex - dielectron vertex chi2 ; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - # Tracks - self.Histograms += [ defineHistogram ( 'Tracks_n', type = 'TH1F', - title = 'EFBEEXFex - number of tracks in event ; n(trks) ; # Events', - xbins = 200, xmin = -0.5, xmax = 200-0.5 ) ] - self.Histograms += [ defineHistogram ( 'Tracks_Eta, Tracks_Phi', type = 'TH2F', - title = 'EFBEEXFex - Eta vs. phi of all tracks ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Tracks_Pt', type = 'TH1F', - title = 'EFBEEXFex - p_{T} of all tracks; p_{T} [GeV] ; # Events', - xbins = 100, xmin = 0., xmax = 100. ) ] - # B+ - self.Histograms += [ defineHistogram ( 'BEEK_n', type = 'TH1F', - title = 'EFBEEXFex - number of B^{+} candidates in event ; n(B^{+}) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - self.Histograms += [ defineHistogram ( 'BEEK_Pt_K', type = 'TH1F', - title = 'EFBEEXFex - p_{T} of K in B^{+} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BEEK_Eta_K, BEEK_Phi_K', type = 'TH2F', - title = 'EFBEEXFex - Eta vs. phi of K in B^{+} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - #self.Histograms += [ defineHistogram ( 'BEEK_InvMass_B, BEEK_VtxMass_B', type = 'TH2F', - #title = 'EFBEEXFex - InvMass vs. VtxMass of B^{+} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 60, xmin = 4., xmax = 7., - #ybins = 60, ymin = 4., ymax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BEEK_InvMass_B', type = 'TH1F', - title = 'EFBEEXFex - InvMass of B^{+} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BEEK_Chi2_B', type = 'TH1F', - title = 'EFBEEXFex - B^{+} vertex chi2 ; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - # Bd - self.Histograms += [ defineHistogram ( 'BdEEKs_n', type = 'TH1F', - title = 'EFBEEXFex - number of B_{d} candidates in event ; n(B_{d}) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - self.Histograms += [ defineHistogram ( 'BdEEKs_Pt_K', type = 'TH1F', - title = 'EFBEEXFex - p_{T} of K in B_{d} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BdEEKs_Eta_K, BdEEKs_Phi_K', type = 'TH2F', - title = 'EFBEEXFex - Eta vs. phi of K in B_{d} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BdEEKs_Pt_Pi', type = 'TH1F', - title = 'EFBEEXFex - p_{T} of #pi in B_{d} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BdEEKs_Eta_Pi, BdEEKs_Phi_Pi', type = 'TH2F', - title = 'EFBEEXFex - Eta vs. phi of #pi in B_{d} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - #self.Histograms += [ defineHistogram ( 'BdEEKs_InvMass_Kstar, BdEEKs_VtxMass_Kstar', type = 'TH2F', - #title = 'EFBEEXFex - InvMass vs. VtxMass of K^{*} in B_{d} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 60, xmin = 4., xmax = 7., - #ybins = 60, ymin = 4., ymax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BdEEKs_InvMass_Kstar', type = 'TH1F', - title = 'EFBEEXFex - InvMass of K^{*} in B_{d} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 0.5, xmax = 2. ) ] - #self.Histograms += [ defineHistogram ( 'BdEEKs_InvMass_Bd, BdEEKs_VtxMass_Bd', type = 'TH2F', - #title = 'EFBEEXFex - InvMass vs. VtxMass of B_{d} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 60, xmin = 4., xmax = 7., - #ybins = 60, ymin = 4., ymax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BdEEKs_InvMass_Bd', type = 'TH1F', - title = 'EFBEEXFex - InvMass of B_{d} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BdEEKs_Chi2_Kstar', type = 'TH1F', - title = 'EFBEEXFex - K^{*} vertex chi2 in B_{d}; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - self.Histograms += [ defineHistogram ( 'BdEEKs_Chi2_Bd', type = 'TH1F', - title = 'EFBEEXFex - B_{d} vertex chi2 ; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - # Bs - self.Histograms += [ defineHistogram ( 'BsEEPhi_n', type = 'TH1F', - title = 'EFBEEXFex - number of B_{s} candidates in event ; n(B_{s}) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - self.Histograms += [ defineHistogram ( 'BsEEPhi_Pt_K1', type = 'TH1F', - title = 'EFBEEXFex - p_{T} of first K in B_{s} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BsEEPhi_Eta_K1, BsEEPhi_Phi_K1', type = 'TH2F', - title = 'EFBEEXFex - Eta vs. phi of first K in B_{s} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BsEEPhi_Pt_K2', type = 'TH1F', - title = 'EFBEEXFex - p_{T} of second K in B_{s} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BsEEPhi_Eta_K2, BsEEPhi_Phi_K2', type = 'TH2F', - title = 'EFBEEXFex - Eta vs. phi of second K in B_{s} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - #self.Histograms += [ defineHistogram ( 'BsEEPhi_InvMass_Phi1020, BsEEPhi_VtxMass_Phi1020', type = 'TH2F', - #title = 'EFBEEXFex - InvMass vs. VtxMass of #phi(1020) in B_{s} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 60, xmin = 4., xmax = 7., - #ybins = 60, ymin = 4., ymax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BsEEPhi_InvMass_Phi1020', type = 'TH1F', - title = 'EFBEEXFex - InvMass of #phi(1020) in B_{s} ; InvMass [GeV] ; # Candidates', - xbins = 200, xmin = 0.9, xmax = 1.3 ) ] - #self.Histograms += [ defineHistogram ( 'BsEEPhi_InvMass_Bs, BsEEPhi_VtxMass_Bs', type = 'TH2F', - #title = 'EFBEEXFex - InvMass vs. VtxMass of B_{s} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 60, xmin = 4., xmax = 7., - #ybins = 60, ymin = 4., ymax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BsEEPhi_InvMass_Bs', type = 'TH1F', - title = 'EFBEEXFex - InvMass of B_{s} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BsEEPhi_Chi2_Phi1020', type = 'TH1F', - title = 'EFBEEXFex - #phi(1020) vertex chi2 in B_{s}; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - self.Histograms += [ defineHistogram ( 'BsEEPhi_Chi2_Bs', type = 'TH1F', - title = 'EFBEEXFex - B_{s} vertex chi2 ; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFBMuMuFexConfig.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFBMuMuFexConfig.py deleted file mode 100644 index ef7a92dd721cdf0a020a1a4b8a8e14e9fbeaa204..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFBMuMuFexConfig.py +++ /dev/null @@ -1,592 +0,0 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration - -from TrigBphysHypo.TrigBphysHypoConf import TrigEFBMuMuFex -from TrigBphysHypo import TrigBphysVertexingConfig # noqa: F401 - -from AthenaCommon.AppMgr import ToolSvc - - -#class EFBMuMuFex_1 (TrigEFBMuMuFex): -# __slots__ = [] -# def __init__(self, name = "EFBMuMuFex_1"): -# super( TrigEFBMuMuFex, self ).__init__( name ) -# -# # AcceptAll flag: if true take events regardless of cuts -# self.AcceptAll = False -# -# # L2 Bmumu cuts -# self.LowerMassCut = 100. -# self.UpperMassCut = 13000. -# self.ApplyUpperMassCut = True -# self.MuonAlgo = "TrigMuSuperEF" -# -# from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig -# time = TrigTimeHistToolConfig("Time") -# from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexValidationMonitoring -# validation = TrigEFBMuMuFexValidationMonitoring() -# from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexOnlineMonitoring -# online = TrigEFBMuMuFexOnlineMonitoring() -# -# self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuFex_1 (TrigEFBMuMuFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuFex_1"): - super( EFBMuMuFex_1, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 100. - self.UpperMassCut = 13000. - self.ApplyUpperMassCut = True - self.MuonAlgo = "TrigMuSuperEF" - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexValidationMonitoring - validation = TrigEFBMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexOnlineMonitoring - online = TrigEFBMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuFex_Jpsi (TrigEFBMuMuFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuFex_Jpsi"): - super( EFBMuMuFex_Jpsi, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 2000. - self.UpperMassCut = 4800. - self.ApplyUpperMassCut = True - self.MuonAlgo = "TrigMuSuperEF" - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexValidationMonitoring - validation = TrigEFBMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexOnlineMonitoring - online = TrigEFBMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuFex_Jpsi_oneTE (EFBMuMuFex_Jpsi): - __slots__ = [] - def __init__(self, name = "EFBMuMuFex_Jpsi_oneTE"): - EFBMuMuFex_Jpsi.__init__( self, name ) - - self.NumberOfInputs = 1 - self.UseRoIs = False - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexValidationMonitoring - validation = TrigEFBMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexOnlineMonitoring - online = TrigEFBMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - - - -class EFBMuMuFex_Upsi (TrigEFBMuMuFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuFex_Upsi"): - super( EFBMuMuFex_Upsi, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 7000. - self.UpperMassCut = 13000. - self.ApplyUpperMassCut = True - self.MuonAlgo = "TrigMuSuperEF" - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexValidationMonitoring - validation = TrigEFBMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexOnlineMonitoring - online = TrigEFBMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuFex_B (TrigEFBMuMuFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuFex_B"): - super( EFBMuMuFex_B, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 4000. - self.UpperMassCut = 9000. - self.ApplyUpperMassCut = True - self.MuonAlgo = "TrigMuSuperEF" - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexValidationMonitoring - validation = TrigEFBMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexOnlineMonitoring - online = TrigEFBMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuFex_Z (TrigEFBMuMuFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuFex_Z"): - super( EFBMuMuFex_Z, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 60000. - self.UpperMassCut = 120000. - self.ApplyUpperMassCut = True - self.MuonAlgo = "TrigMuSuperEF" - self.noId = True - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexValidationMonitoring - validation = TrigEFBMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexOnlineMonitoring - online = TrigEFBMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuFex_muEF (TrigEFBMuMuFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuFex_muEF"): - super( EFBMuMuFex_muEF, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 100. - self.UpperMassCut = 13000. - self.ApplyUpperMassCut = True - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexValidationMonitoring - validation = TrigEFBMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexOnlineMonitoring - online = TrigEFBMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuFex_DiMu (TrigEFBMuMuFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuFex_DiMu"): - super( EFBMuMuFex_DiMu, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - ## L2 Bmumu cuts - self.LowerMassCut = 100. - self.UpperMassCut = 15000. - self.ApplyUpperMassCut = True - self.MuonAlgo = "TrigMuSuperEF" - self.UseRoIs = False - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexValidationMonitoring - validation = TrigEFBMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexOnlineMonitoring - online = TrigEFBMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuFex_DiMu2700 (TrigEFBMuMuFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuFex_DiMu"): - super( EFBMuMuFex_DiMu2700, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - ## L2 Bmumu cuts - self.LowerMassCut = 100. - self.UpperMassCut = 2700. - self.ApplyUpperMassCut = True - self.MuonAlgo = "TrigMuSuperEF" - self.UseRoIs = False - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexValidationMonitoring - validation = TrigEFBMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexOnlineMonitoring - online = TrigEFBMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuFex_DiMu_legacyVtx (EFBMuMuFex_DiMu): - __slots__ = [] - def __init__(self, name = "EFBMuMuFex_DiMu_legacyVtx"): - EFBMuMuFex_DiMu.__init__( self, name ) - - # set lecacy helper tool with 'broken' vertex fitter - self.TrigBphysHelperTool = ToolSvc.TrigBphysHelperUtilsToolLegacy - - -class EFBMuMuFex_DiMu_oneTE (EFBMuMuFex_DiMu): - __slots__ = [] - def __init__(self, name = "EFBMuMuFex_DiMu_oneTE"): - EFBMuMuFex_DiMu.__init__( self, name ) - - self.NumberOfInputs = 1 - self.UseRoIs = False - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexValidationMonitoring - validation = TrigEFBMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexOnlineMonitoring - online = TrigEFBMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - - -class EFBMuMuFex_DiMu_DY (TrigEFBMuMuFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuFex_DiMu_DY"): - super( EFBMuMuFex_DiMu_DY, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 10000. - self.UpperMassCut = 140000. - self.ApplyUpperMassCut = True - self.MuonAlgo = "TrigMuSuperEF" - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexValidationMonitoring - validation = TrigEFBMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexOnlineMonitoring - online = TrigEFBMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuFex_DiMu_DY25 (TrigEFBMuMuFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuFex_DiMu_DY25"): - super( EFBMuMuFex_DiMu_DY25, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 25000. - self.UpperMassCut = 140000. - self.ApplyUpperMassCut = True - self.MuonAlgo = "TrigMuSuperEF" - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexValidationMonitoring - validation = TrigEFBMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexOnlineMonitoring - online = TrigEFBMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuFex_DiMu_DY20 (TrigEFBMuMuFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuFex_DiMu_DY20"): - super( EFBMuMuFex_DiMu_DY20, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 20000. - self.UpperMassCut = 140000. - self.ApplyUpperMassCut = True - self.MuonAlgo = "TrigMuSuperEF" - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexValidationMonitoring - validation = TrigEFBMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexOnlineMonitoring - online = TrigEFBMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuFex_DiMu_DY14 (TrigEFBMuMuFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuFex_DiMu_DY14"): - super( EFBMuMuFex_DiMu_DY14, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 14000. - self.UpperMassCut = 140000. - self.ApplyUpperMassCut = True - self.MuonAlgo = "TrigMuSuperEF" - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexValidationMonitoring - validation = TrigEFBMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexOnlineMonitoring - online = TrigEFBMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuFex_DiMu_noOS (TrigEFBMuMuFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuFex_DiMu_noOS"): - super( EFBMuMuFex_DiMu_noOS, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 1000. - self.UpperMassCut = 15000. - self.OppositeSign = False - self.ApplyUpperMassCut = True - self.MuonAlgo = "TrigMuSuperEF" - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexValidationMonitoring - validation = TrigEFBMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexOnlineMonitoring - online = TrigEFBMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuFex_DiMu_DY_noOS (TrigEFBMuMuFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuFex_DiMu_DY_noOS"): - super( EFBMuMuFex_DiMu_DY_noOS, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 10000. - self.UpperMassCut = 140000. - self.OppositeSign = False - self.ApplyUpperMassCut = True - self.MuonAlgo = "TrigMuSuperEF" - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexValidationMonitoring - validation = TrigEFBMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexOnlineMonitoring - online = TrigEFBMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuFex_DiMu_DY14_noOS (TrigEFBMuMuFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuFex_DiMu_DY14_noOS"): - super( TrigEFBMuMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 14000. - self.UpperMassCut = 140000. - self.OppositeSign = False - self.ApplyUpperMassCut = True - self.MuonAlgo = "TrigMuSuperEF" - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexValidationMonitoring - validation = TrigEFBMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexOnlineMonitoring - online = TrigEFBMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuFex_DiMu_7invm9_noOS (TrigEFBMuMuFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuFex_DiMu_7invm9_noOS"): - super( TrigEFBMuMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 7000. - self.UpperMassCut = 9000. - self.OppositeSign = False - self.ApplyUpperMassCut = True - self.MuonAlgo = "TrigMuSuperEF" - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexValidationMonitoring - validation = TrigEFBMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexOnlineMonitoring - online = TrigEFBMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuFex_DiMu_11invm60_noOS (TrigEFBMuMuFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuFex_DiMu_11invm60_noOS"): - super( TrigEFBMuMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 11000. - self.UpperMassCut = 60000. - self.OppositeSign = False - self.ApplyUpperMassCut = True - self.MuonAlgo = "TrigMuSuperEF" - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexValidationMonitoring - validation = TrigEFBMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexOnlineMonitoring - online = TrigEFBMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuFex_DiMu_11invm24_noOS (EFBMuMuFex_DiMu_11invm60_noOS): - __slots__ = [] - def __init__(self, name = "EFBMuMuFex_DiMu_11invm24_noOS"): - super( EFBMuMuFex_DiMu_11invm24_noOS, self ).__init__( name ) - - # L2 Bmumu cuts - self.LowerMassCut = 11000. - self.UpperMassCut = 24000. - - -class EFBMuMuFex_DiMu_24invm60_noOS (EFBMuMuFex_DiMu_11invm60_noOS): - __slots__ = [] - def __init__(self, name = "EFBMuMuFex_DiMu_24invm60_noOS"): - super( EFBMuMuFex_DiMu_24invm60_noOS, self ).__init__( name ) - - # L2 Bmumu cuts - self.LowerMassCut = 24000. - self.UpperMassCut = 60000. - - -class EFBMuMuFex_DiMu_18invm60_noOS (TrigEFBMuMuFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuFex_DiMu_18invm60_noOS"): - super( TrigEFBMuMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 18000. - self.UpperMassCut = 60000. - self.OppositeSign = False - self.ApplyUpperMassCut = True - self.MuonAlgo = "TrigMuSuperEF" - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexValidationMonitoring - validation = TrigEFBMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexOnlineMonitoring - online = TrigEFBMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - - - -class EFBMuMuFex_noId (TrigEFBMuMuFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuFex_noId"): - super( EFBMuMuFex_noId, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 2000. - self.UpperMassCut = 4800. - self.ApplyUpperMassCut = True - self.MuonAlgo = "TrigMuSuperEF" - self.noId = True - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexValidationMonitoring - validation = TrigEFBMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexOnlineMonitoring - online = TrigEFBMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuFex_DiMu_noinvm_SS (TrigEFBMuMuFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuFex_DiMu_noinvm_SS"): - super( EFBMuMuFex_DiMu_noinvm_SS, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 0. - self.UpperMassCut = 15000. - self.OppositeSign = False - self.SameSign = True - self.ApplyUpperMassCut = False - self.MuonAlgo = "TrigMuSuperEF" - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexValidationMonitoring - validation = TrigEFBMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexOnlineMonitoring - online = TrigEFBMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuFex_passEF (TrigEFBMuMuFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuFex_passEF"): - super( EFBMuMuFex_passEF, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = True - - # L2 Bmumu cuts - self.LowerMassCut = 100. - self.UpperMassCut = 13000. - self.ApplyUpperMassCut = True - self.MuonAlgo = "TrigMuSuperEF" - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexValidationMonitoring - validation = TrigEFBMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigEFBMuMuFexMonitoring import TrigEFBMuMuFexOnlineMonitoring_passEF - online = TrigEFBMuMuFexOnlineMonitoring_passEF() - - self.AthenaMonTools = [ validation, online, time ] diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFBMuMuFexMonitoring.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFBMuMuFexMonitoring.py deleted file mode 100644 index 0068e180a11e6656b4e7ab8997dd21c63dbe8819..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFBMuMuFexMonitoring.py +++ /dev/null @@ -1,101 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig - -ERROR_labels = ' No_EventInfo : Not_2_Input_TE : No_RoI_1 : No_RoI_2 : MuonFeature_Fails : BphysColl_Fails ' -ERROR_number = 6 - -ACCEPTANCE_labels = ' Input : Got_RoIs : Mu1 : Mu2 : MuMu : MuMu_Unique : Opp_Charge : Dimuon_Built : InvMass_Cut : SEPARATOR : BphysColl_not_Empty ' -ACCEPTANCE_number = 11 - -class TrigEFBMuMuFexValidationMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigEFBMuMuFexValidationMonitoring"): - super(TrigEFBMuMuFexValidationMonitoring, self).__init__(name) - self.defineTarget("Validation") - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'EFBMuMuFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - title = 'EFBMuMuFex - Reached steps - acceptance ; ; # Events / Candidates', - xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - labels = ACCEPTANCE_labels ) ] - self.Histograms += [ defineHistogram('DeltaEtaRoIs', type='TH1F', title="DeltaEta_RoIs ", - xbins=50, xmin=0.0, xmax=3.0) ] - self.Histograms += [ defineHistogram('DeltaPhiRoIs', type='TH1F', title="DeltaPhi_RoIs ", - xbins=50, xmin=0.0, xmax=3.2) ] - self.Histograms += [ defineHistogram('DeltaEtaMuMu', type='TH1F', title="DeltaEta_MuMu ", - xbins=50, xmin=0.0, xmax=3.0) ] - self.Histograms += [ defineHistogram('DeltaPhiMuMu', type='TH1F', title="DeltaPhi_MuMu ", - xbins=50, xmin=0.0, xmax=3.2) ] - self.Histograms += [ defineHistogram('pTsumMuMu', type='TH1F', title="sumPtMu1Mu2 [GeV]", - xbins=50, xmin=0.0, xmax=50.0) ] - self.Histograms += [ defineHistogram('pTMu1', type='TH1F', title="PtMu1 [GeV]", - xbins=50, xmin=0.0, xmax=50.0) ] - self.Histograms += [ defineHistogram('pTMu2', type='TH1F', title="PtMu2 [GeV]", - xbins=50, xmin=0.0, xmax=50.0) ] - self.Histograms += [ defineHistogram('etaMu1, phiMu1', type = 'TH2F', title = 'Mu1 eta-phi map ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram('etaMu2, phiMu2', type = 'TH2F', title = 'Mu2 eta-phi map ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram('MuMumass', type='TH1F', title="Inv.mass(mumu) [GeV]", - xbins=100, xmin=0., xmax=13.) ] - self.Histograms += [ defineHistogram('BmassFit', type='TH1F', title=" FitBMass [GeV]", - xbins=100, xmin=0., xmax=13.) ] - self.Histograms += [ defineHistogram('VtxChi2', type='TH1F', title="Chi2 of vertex fit", - xbins=100, xmin=0., xmax=10.) ] - -class TrigEFBMuMuFexOnlineMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigEFBMuMuFexOnlineMonitoring"): - super(TrigEFBMuMuFexOnlineMonitoring, self).__init__(name) - self.defineTarget("Online") - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'EFBMuMuFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - title = 'EFMuMuFex - Reached steps - acceptance ; ; # Events / Candidates', - xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - labels = ACCEPTANCE_labels ) ] - self.Histograms += [ defineHistogram('DeltaEtaRoIs', type='TH1F', title="DeltaEta_RoIs ", - xbins=50, xmin=0.0, xmax=3.0) ] - self.Histograms += [ defineHistogram('DeltaPhiRoIs', type='TH1F', title="DeltaPhi_RoIs ", - xbins=50, xmin=0.0, xmax=3.2) ] - self.Histograms += [ defineHistogram('DeltaEtaMuMu', type='TH1F', title="DeltaEta_MuMu ", - xbins=50, xmin=0.0, xmax=3.0) ] - self.Histograms += [ defineHistogram('DeltaPhiMuMu', type='TH1F', title="DeltaPhi_MuMu ", - xbins=50, xmin=0.0, xmax=3.2) ] - self.Histograms += [ defineHistogram('pTsumMuMu', type='TH1F', title="sumPtMu1Mu2 [GeV]", - xbins=50, xmin=0.0, xmax=50.0) ] - self.Histograms += [ defineHistogram('pTMu1', type='TH1F', title="PtMu1 [GeV]", - xbins=50, xmin=0.0, xmax=50.0) ] - self.Histograms += [ defineHistogram('pTMu2', type='TH1F', title="PtMu2 [GeV]", - xbins=50, xmin=0.0, xmax=50.0) ] - self.Histograms += [ defineHistogram('etaMu1, phiMu1', type = 'TH2F', title = 'Mu1 eta-phi map ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram('etaMu2, phiMu2', type = 'TH2F', title = 'Mu2 eta-phi map ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram('MuMumass', type='TH1F', title="Inv.mass(mumu) [GeV]", - xbins=100, xmin=0., xmax=13.) ] - self.Histograms += [ defineHistogram('BmassFit', type='TH1F', title=" FitBMass [GeV]", - xbins=100, xmin=0., xmax=13.) ] - self.Histograms += [ defineHistogram('VtxChi2', type='TH1F', title="Chi2 of vertex fit", - xbins=100, xmin=0., xmax=10.) ] - - -class TrigEFBMuMuFexOnlineMonitoring_passEF(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigEFBMuMuFexOnlineMonitoring_passEF"): - super(TrigEFBMuMuFexOnlineMonitoring_passEF, self).__init__(name) - self.defineTarget("Online") - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'EFBMuMuFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - title = 'EFMuMuFex - Reached steps - acceptance ; ; # Events / Candidates', - xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - labels = ACCEPTANCE_labels ) ] diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFBMuMuHypoConfig.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFBMuMuHypoConfig.py deleted file mode 100644 index 44f75177fba828c17ad2ed418e22efd4340e7ea6..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFBMuMuHypoConfig.py +++ /dev/null @@ -1,614 +0,0 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration - -from TrigBphysHypo.TrigBphysHypoConf import TrigEFBMuMuHypo - -from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig - -class TrigEFBMuMuHypoValidationMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigEFBMuMuHypoValidationMonitoring"): - super(TrigEFBMuMuHypoValidationMonitoring, self).__init__(name) - self.defineTarget("Validation") -# self.defineTarget("Never") - self.Histograms += [ defineHistogram('CutCounter', type='TH1F', title= "EF cuts counter", xbins=8, xmin=-1.5, xmax=6.5) ] - self.Histograms += [ defineHistogram('MuMumass', type='TH1F', title="Inv.mass(mumu) [GeV]", - xbins=100, xmin=0., xmax=13.0) ] - -class TrigEFBMuMuHypoOnlineMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigEFBMuMuHypoOnlineMonitoring"): - super(TrigEFBMuMuHypoOnlineMonitoring, self).__init__(name) - self.defineTarget("Online") - self.Histograms += [ defineHistogram('CutCounter', type='TH1F', title= "EFBMuMu cuts counter", xbins=8, xmin=-1.5, xmax=6.5) ] - self.Histograms += [ defineHistogram('MuMumass', type='TH1F', title="EFBMuMu Inv.mass(mumu) [GeV]", - xbins=130, xmin=0., xmax=13.0) ] - -class EFBMuMuHypo_1 (TrigEFBMuMuHypo): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_1"): - super( EFBMuMuHypo_1, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF Bmumu cuts - self.LowerMassCut = 500. - self.UpperMassCut = 13000. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFBMuMuHypoValidationMonitoring() - online = TrigEFBMuMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuHypo_DiMu (TrigEFBMuMuHypo): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_DiMu"): - super( EFBMuMuHypo_DiMu, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF Bmumu cuts - self.LowerMassCut = 1500. - self.UpperMassCut = 14000. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFBMuMuHypoValidationMonitoring() - online = TrigEFBMuMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuHypo_DiMu_DY (TrigEFBMuMuHypo): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_DiMu_DY"): - super( EFBMuMuHypo_DiMu_DY, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF Bmumu cuts - self.LowerMassCut = 10000. - self.UpperMassCut = 120000. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFBMuMuHypoValidationMonitoring() - online = TrigEFBMuMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuHypo_DiMu_DY25 (TrigEFBMuMuHypo): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_DiMu_DY25"): - super( EFBMuMuHypo_DiMu_DY25, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF Bmumu cuts - self.LowerMassCut = 25000. - self.UpperMassCut = 120000. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFBMuMuHypoValidationMonitoring() - online = TrigEFBMuMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuHypo_DiMu_DY20 (TrigEFBMuMuHypo): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_DiMu_DY20"): - super( EFBMuMuHypo_DiMu_DY20, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF Bmumu cuts - self.LowerMassCut = 20000. - self.UpperMassCut = 120000. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFBMuMuHypoValidationMonitoring() - online = TrigEFBMuMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuHypo_DiMu_DY14 (TrigEFBMuMuHypo): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_DiMu_DY14"): - super( EFBMuMuHypo_DiMu_DY14, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF Bmumu cuts - self.LowerMassCut = 14000. - self.UpperMassCut = 120000. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFBMuMuHypoValidationMonitoring() - online = TrigEFBMuMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuHypo_Jpsi (TrigEFBMuMuHypo): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_Jpsi"): - super( EFBMuMuHypo_Jpsi, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF Bmumu cuts - self.LowerMassCut = 2500. - self.UpperMassCut = 4300. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFBMuMuHypoValidationMonitoring() - online = TrigEFBMuMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuHypo_Jpsi_noId (TrigEFBMuMuHypo): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_Jpsi_noId"): - super( EFBMuMuHypo_Jpsi_noId, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF Bmumu cuts - self.LowerMassCut = 2500. - self.UpperMassCut = 4300. - self.ApplyUpperMassCut = True - self.ApplyChi2Cut = False - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFBMuMuHypoValidationMonitoring() - online = TrigEFBMuMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuHypo_Upsi (TrigEFBMuMuHypo): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_Upsi"): - super( EFBMuMuHypo_Upsi, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF Bmumu cuts - self.LowerMassCut = 8000. - self.UpperMassCut = 12000. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFBMuMuHypoValidationMonitoring() - online = TrigEFBMuMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuHypo_B (TrigEFBMuMuHypo): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_B"): - super( EFBMuMuHypo_B, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF Bmumu cuts - self.LowerMassCut = 4000. - self.UpperMassCut = 8500. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFBMuMuHypoValidationMonitoring() - online = TrigEFBMuMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuHypo_B_Lxy0 (EFBMuMuHypo_B): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_B_Lxy0"): - super( EFBMuMuHypo_B_Lxy0, self ).__init__( name ) - - self.ApplyLxyCut = True - self.LxyCut = 0. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFBMuMuHypoValidationMonitoring() - online = TrigEFBMuMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuHypo_Jpsi_Lxy0 (EFBMuMuHypo_Jpsi): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_Jpsi_Lxy0"): - super( EFBMuMuHypo_Jpsi_Lxy0, self ).__init__( name ) - - self.ApplyLxyCut = True - self.LxyCut = 0. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFBMuMuHypoValidationMonitoring() - online = TrigEFBMuMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuHypo_DiMu_Lxy0 (EFBMuMuHypo_DiMu): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_DiMu_Lxy0"): - super( EFBMuMuHypo_DiMu_Lxy0, self ).__init__( name ) - - self.ApplyLxyCut = True - self.LxyCut = 0. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFBMuMuHypoValidationMonitoring() - online = TrigEFBMuMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuHypo_DiMu2700 (EFBMuMuHypo_DiMu): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_DiMu2700"): - super( EFBMuMuHypo_DiMu2700, self ).__init__( name ) - - self.ApplyLxyCut = True - self.UpperMassCut = 2700. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFBMuMuHypoValidationMonitoring() - online = TrigEFBMuMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuHypo_DiMu2700_Lxy0 (EFBMuMuHypo_DiMu): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_DiMu2700_Lxy0"): - super( EFBMuMuHypo_DiMu2700_Lxy0, self ).__init__( name ) - - self.ApplyLxyCut = True - self.LxyCut = 0. - self.UpperMassCut = 2700. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFBMuMuHypoValidationMonitoring() - online = TrigEFBMuMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuHypo_B_tightChi2 (EFBMuMuHypo_B): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_B_tightChi2"): - super( EFBMuMuHypo_B_tightChi2, self ).__init__( name ) - - self.Chi2VtxCut = 10. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFBMuMuHypoValidationMonitoring() - online = TrigEFBMuMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuHypo_Jpsi_tightChi2 (EFBMuMuHypo_Jpsi): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_Jpsi_tightChi2"): - super( EFBMuMuHypo_Jpsi_tightChi2, self ).__init__( name ) - - self.Chi2VtxCut = 10. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFBMuMuHypoValidationMonitoring() - online = TrigEFBMuMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuHypo_DiMu_tightChi2 (EFBMuMuHypo_DiMu): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_DiMu_tightChi2"): - super( EFBMuMuHypo_DiMu_tightChi2, self ).__init__( name ) - - self.Chi2VtxCut = 10. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFBMuMuHypoValidationMonitoring() - online = TrigEFBMuMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuHypo_Upsi_tightChi2 (EFBMuMuHypo_Upsi): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_Upsi_tightChi2"): - super( EFBMuMuHypo_Upsi_tightChi2, self ).__init__( name ) - - self.Chi2VtxCut = 10. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFBMuMuHypoValidationMonitoring() - online = TrigEFBMuMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuHypo_Z (TrigEFBMuMuHypo): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_Z"): - super( EFBMuMuHypo_Z, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF Bmumu cuts - self.LowerMassCut = 60000. - self.UpperMassCut = 120000. - self.ApplyUpperMassCut = True - self.ApplyChi2Cut = False - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFBMuMuHypoValidationMonitoring() - online = TrigEFBMuMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuHypo_DiMu_noVtx (TrigEFBMuMuHypo): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_DiMu_noVtx"): - super( EFBMuMuHypo_DiMu_noVtx, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF Bmumu cuts - self.LowerMassCut = 1500. - self.UpperMassCut = 14000. - self.ApplyUpperMassCut = True - self.ApplyChi2Cut = False - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFBMuMuHypoValidationMonitoring() - online = TrigEFBMuMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuHypo_DiMu_DY_noVtx (TrigEFBMuMuHypo): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_DiMu_DY_noVtx"): - super( EFBMuMuHypo_DiMu_DY_noVtx, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF Bmumu cuts - self.LowerMassCut = 10000. - self.UpperMassCut = 140000. - self.ApplyUpperMassCut = True - self.ApplyChi2Cut = False - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFBMuMuHypoValidationMonitoring() - online = TrigEFBMuMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuHypo_DiMu_DY14_noVtx (TrigEFBMuMuHypo): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_DiMu_DY14_noVtx"): - super( EFBMuMuHypo_DiMu_DY14_noVtx, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF Bmumu cuts - self.LowerMassCut = 14000. - self.UpperMassCut = 140000. - self.ApplyUpperMassCut = True - self.ApplyChi2Cut = False - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFBMuMuHypoValidationMonitoring() - online = TrigEFBMuMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuHypo_DiMu_7invm9_noVtx (TrigEFBMuMuHypo): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_DiMu_7invm9_noVtx"): - super( EFBMuMuHypo_DiMu_7invm9_noVtx, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF Bmumu cuts - self.LowerMassCut = 7000. - self.UpperMassCut = 9000. - self.ApplyUpperMassCut = True - self.ApplyChi2Cut = False - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFBMuMuHypoValidationMonitoring() - online = TrigEFBMuMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuHypo_DiMu_7invm9 (EFBMuMuHypo_DiMu_7invm9_noVtx): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_DiMu_7invm9"): - super( EFBMuMuHypo_DiMu_7invm9, self ).__init__( name ) - - # EF Bmumu cuts - self.ApplyChi2Cut = True - - -class EFBMuMuHypo_DiMu_11invm60_noVtx (TrigEFBMuMuHypo): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_DiMu_11invm60_noVtx"): - super( TrigEFBMuMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF Bmumu cuts - self.LowerMassCut = 11000. - self.UpperMassCut = 60000. - self.ApplyUpperMassCut = True - self.ApplyChi2Cut = False - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFBMuMuHypoValidationMonitoring() - online = TrigEFBMuMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuHypo_DiMu_11invm60 (EFBMuMuHypo_DiMu_11invm60_noVtx): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_DiMu_11invm60"): - super( EFBMuMuHypo_DiMu_11invm60, self ).__init__( name ) - - # EF Bmumu cuts - self.ApplyChi2Cut = True - - -class EFBMuMuHypo_DiMu_11invm24_noVtx (EFBMuMuHypo_DiMu_11invm60_noVtx): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_DiMu_11invm24_noVtx"): - super( EFBMuMuHypo_DiMu_11invm24_noVtx, self ).__init__( name ) - - # EF Bmumu cuts - self.LowerMassCut = 11000. - self.UpperMassCut = 24000. - -class EFBMuMuHypo_DiMu_11invm24 (EFBMuMuHypo_DiMu_11invm24_noVtx): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_DiMu_11invm24"): - super( EFBMuMuHypo_DiMu_11invm24, self ).__init__( name ) - - # EF Bmumu cuts - self.ApplyChi2Cut = True - - -class EFBMuMuHypo_DiMu_24invm60_noVtx (EFBMuMuHypo_DiMu_11invm60_noVtx): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_DiMu_24invm60_noVtx"): - super( EFBMuMuHypo_DiMu_24invm60_noVtx, self ).__init__( name ) - - # EF Bmumu cuts - self.LowerMassCut = 24000. - self.UpperMassCut = 60000. - -class EFBMuMuHypo_DiMu_24invm60 (EFBMuMuHypo_DiMu_24invm60_noVtx): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_DiMu_24invm60"): - super( EFBMuMuHypo_DiMu_24invm60, self ).__init__( name ) - - # EF Bmumu cuts - self.ApplyChi2Cut = True - - -class EFBMuMuHypo_DiMu_18invm60_noVtx (TrigEFBMuMuHypo): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_DiMu_18invm60_noVtx"): - super( TrigEFBMuMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF Bmumu cuts - self.LowerMassCut = 18000. - self.UpperMassCut = 60000. - self.ApplyUpperMassCut = True - self.ApplyChi2Cut = False - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFBMuMuHypoValidationMonitoring() - online = TrigEFBMuMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuHypo_DiMu_noinvm_noVtx (TrigEFBMuMuHypo): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_DiMu_noinvm_noVtx"): - super( EFBMuMuHypo_DiMu_noinvm_noVtx, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF Bmumu cuts - self.LowerMassCut = 0. - self.UpperMassCut = 14000. - self.ApplyUpperMassCut = False - self.ApplyChi2Cut = False - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFBMuMuHypoValidationMonitoring() - online = TrigEFBMuMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuHypo_passEF (TrigEFBMuMuHypo): - __slots__ = [] - def __init__(self, name = "EFBMuMuHypo_passEF"): - super( EFBMuMuHypo_passEF, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = True - - # EF Bmumu cuts - self.LowerMassCut = 500. - self.UpperMassCut = 13000. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFBMuMuHypoValidationMonitoring() - online = TrigEFBMuMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFBMuMuXFexConfig.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFBMuMuXFexConfig.py deleted file mode 100644 index 8754b10dd60e042354b20f0a5b93f8678deec09e..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFBMuMuXFexConfig.py +++ /dev/null @@ -1,1093 +0,0 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration - -# vim: tabstop=4:shiftwidth=4:expandtab -# include the python fragment to set up the default bphysics vertex fitter -from TrigBphysHypo.TrigBphysHypoConf import TrigEFBMuMuXFex -from TrigBphysHypo import TrigBphysVertexingConfig # noqa: F401 - - -from AthenaCommon.AppMgr import ToolSvc - -class EFBMuMuXFex_1 (TrigEFBMuMuXFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuXFex_1"): - super( TrigEFBMuMuXFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # Timeout protection: maximum number of track combinations to try - self.MaxNcombinations = 40000 #JW arbitary reduction from 50000 in ncombinations for timeouts - # muon part - self.OppositeSign = True # if check opposite sign of muons - self.LowerMuMuMassCut = 100. - self.UpperMuMuMassCut = 5500. - ##self.LowerMuVtxMassCut = 100. - ##self.UpperMuVtxMassCut = 5500. - self.MuVtxChi2Cut = 20. - # B{+/-} -> K{+/-} Mu Mu - self.DoB_KMuMuDecay = True - self.LowerKMuMuMassCut = 4400. - self.UpperKMuMuMassCut = 5800. #5900. - ##self.LowerB_KMuMuMassCutVtxOff = 4500. - ##self.UpperB_KMuMuMassCutVtxOff = 5900. - ##self.LowerBVtxMassCut = 4500. - ##self.UpperBVtxMassCut = 5900. - self.DoB_KMuMuVertexing = True - self.BVtxChi2Cut = 60. # 300 in L2 - # Bd -> K*(892) Mu Mu - self.DoBd_KstarMuMuDecay = True - self.LowerKstar_KaonMassCut = 700. - self.UpperKstar_KaonMassCut = 1100. #1500. - self.LowerBd_KstarMuMuMassCut = 4600. #4600. - self.UpperBd_KstarMuMuMassCut = 5900. - ##self.LowerBd_KstarMuMuMassCutVtxOff = 4600. - ##self.UpperBd_KstarMuMuMassCutVtxOff = 6300. - ##self.LowerKstarVtxMassCut = 600. - ##self.UpperKstarVtxMassCut = 1200. - ##self.LowerBdVtxMassCut = 4600. - ##self.UpperBdVtxMassCut = 6000. - self.DoKstar_KPiVertexing = True - self.DoBd_KstarMuMuVertexing = True - self.KstarVtxChi2Cut = 400. - self.BdVtxChi2Cut = 60. - # Bs -> Phi(1020) Mu Mu - self.DoBs_Phi1020MuMuDecay = True - self.LowerPhi1020_KaonMassCut = 940. #990. - self.UpperPhi1020_KaonMassCut = 1100. #1050. - self.LowerBs_Phi1020MuMuMassCut = 4800. #5000. - self.UpperBs_Phi1020MuMuMassCut = 5800. #5800. - ##self.LowerBs_Phi1020MuMuMassCutVtxOff = 5000. - ##self.UpperBs_Phi1020MuMuMassCutVtxOff = 5800. - ##self.LowerPhi1020VtxMassCut = 990. - ##self.UpperPhi1020VtxMassCut = 1060. - ##self.LowerBsVtxMassCut = 4600. - ##self.UpperBsVtxMassCut = 6000. - self.DoPhi1020_KKVertexing = True - self.DoBs_Phi1020MuMuVertexing = True - self.Phi1020VtxChi2Cut = 400. - self.BsVtxChi2Cut = 60. - # Lb -> L Mu Mu - self.DoLb_LambdaMuMuDecay = True - self.LowerLambda_PrPiMassCut = 1040. #1040. - self.UpperLambda_PrPiMassCut = 1200. #1220. - self.LowerLambda_PtCut = 0. - self.LowerLb_LambdaMuMuMassCut = 5100. #5090. - self.UpperLb_LambdaMuMuMassCut = 6100. #6270. - self.LowerLb_PtCut = 0. - self.UpperLambdaVtxMassCut = 1200. - self.LowerLbVtxMassCut = 3850. - self.UpperLbVtxMassCut = 6150. - self.DoLambda_PPiVertexing = True - self.DoLb_LambdaMuMuVertexing = False - self.DoLb_LambdaMuMuCascade = False - self.LambdaVtxChi2Cut = 400. #100. - self.LbVtxChi2Cut = 60. #100. - ##self.LbVtxDistanceCut = 0. - ##self.PiImpactCut = 0. - ##self.PrImpactCut = 0. - # vertexing off - ##self.LowerLb_LambdaMuMuMassCutVtxOff = 1080. - ##self.UpperLb_LambdaMuMuMassCutVtxOff = 1180. - # Bc -> D_s* Mu Mu - self.DoBc_DsMuMuDecay = False - self.LowerPhiDs_MassCut = 980. - self.UpperPhiDs_MassCut = 1080. - self.LowerDs_MassCut = 1600. - self.UpperDs_MassCut = 2400. - self.LowerDs_PtCut = 2000. - self.LowerBc_DsMuMuMassCut = 5450. - self.UpperBc_DsMuMuMassCut = 7050. - self.LowerBcDs_PtCut = 8000. - ##self.LowerDs_LxyCut = 0.15 - self.LowerDs_LxyCut = -999.3 - self.DoDs_Vertexing = True - self.DoBc_DsMuMuVertexing = True - self.DoBc_DsMuMuCascade = True - self.DsVtxChi2Cut = 90. - self.BcVtxChi2Cut = 120. - - # Bc -> D+ Mu Mu - self.DoBc_DplusMuMuDecay = False - ##self.LowerPhiDs_MassCut = 980. - ##self.UpperPhiDs_MassCut = 1080. - self.LowerDplus_MassCut = 1500. - self.UpperDplus_MassCut = 2300. - self.LowerDplus_PtCut = 2000. - ##self.LowerBc_DsMuMuMassCut = 1800. - self.LowerBc_DplusMuMuMassCut = 5450. - self.UpperBc_DplusMuMuMassCut = 7050. - self.LowerBcDplus_PtCut = 8000. - ##self.LowerDplus_LxyCut = 0.3 - self.LowerDplus_LxyCut = 0.01 - self.DoDplus_Vertexing = True - self.DoBc_DplusMuMuVertexing = True - self.DoBc_DplusMuMuCascade = True - self.DplusVtxChi2Cut = 90. - self.BcDplusVtxChi2Cut = 180. - - # Bc -> Dstar Mu Mu - self.DoBc_DstarMuMuDecay = False - self.LowerD0Dstar_MassCut = 1500. - self.UpperD0Dstar_MassCut = 2300. - self.UpperDstar_DMCut = 180. - self.LowerDstar_PtCut = 2000. - self.LowerDstarKpi_PtCut = 1800. - self.LowerBc_DstarMuMuMassCut = 5450. - self.UpperBc_DstarMuMuMassCut = 7050. - self.LowerBcDstar_PtCut = 8000. - ##self.LowerBcD0Dstar_LxyCut = 0.1 - self.DoBc_DstarMuMuVertexing = True - self.DoBc_DstarMuMuCascade = True - self.D0DstarVtxChi2Cut = 90. - self.BcDstarVtxChi2Cut = 120. - - # Bc -> D0 (Dstar with lost pi_s) Mu Mu - self.DoBc_D0MuMuDecay = False - self.LowerD0_MassCut = 1500. - self.UpperD0_MassCut = 2300. - self.LowerD0_PtCut = 2000. - self.LowerBc_D0MuMuMassCut = 5250. - self.UpperBc_D0MuMuMassCut = 6911. - self.LowerBcD0_PtCut = 8000. - self.LowerD0_LxyCut = 0.01 - self.DoD0_Vertexing = True - self.DoBc_D0MuMuVertexing = True - self.DoBc_D0MuMuCascade = True - self.D0VtxChi2Cut = 90. - self.BcD0VtxChi2Cut = 120. - self.MaxBcD0ToStore = 1000 - - from TrigBphysHypo.TrigEFBMuMuXFexMonitoring import EFBMuMuXFexValidationMonitoring - validation = EFBMuMuXFexValidationMonitoring() - - from TrigBphysHypo.TrigEFBMuMuXFexMonitoring import EFBMuMuXFexOnlineMonitoring - online = EFBMuMuXFexOnlineMonitoring() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [ validation, online, time ] - - -class EFBMuMuXFex_1_legacyVtx (EFBMuMuXFex_1): - __slots__ = [] - def __init__(self, name = "EFBMuMuXFex_1_legacyVtx"): - EFBMuMuXFex_1.__init__(self, name ) - - # set lecacy helper tool with 'broken' vertex fitter - self.TrigBphysHelperTool = ToolSvc.TrigBphysHelperUtilsToolLegacy - - -class EFBMuMuXFex_allModes (EFBMuMuXFex_1): - __slots__ = [] - def __init__(self, name = "EFBMuMuXFex_allModes"): - EFBMuMuXFex_1.__init__(self, name ) - - # Bc -> D_s* Mu Mu - self.DoBc_DsMuMuDecay = True - # Bc -> D+ Mu Mu - self.DoBc_DplusMuMuDecay = True - # Bc -> Dstar Mu Mu - self.DoBc_DstarMuMuDecay = True - # Bc -> D0 Mu Mu - self.DoBc_D0MuMuDecay = True - - from TrigBphysHypo.TrigEFBMuMuXFexMonitoring import EFBMuMuXFexValidationMonitoring - validation = EFBMuMuXFexValidationMonitoring() - - from TrigBphysHypo.TrigEFBMuMuXFexMonitoring import EFBMuMuXFexOnlineMonitoring_allModes - online = EFBMuMuXFexOnlineMonitoring_allModes() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [ validation, online, time ] - - - -class EFBMuMuXFex_allModes_tightBc (EFBMuMuXFex_allModes): - __slots__ = [] - def __init__(self, name = "EFBMuMuXFex_allModes_tightBc"): - EFBMuMuXFex_allModes.__init__(self, name ) - - # Bc -> D_s* Mu Mu - self.LowerBc_DsMuMuMassCut = 5450. - # Bc -> D+ Mu Mu - self.LowerBc_DplusMuMuMassCut = 5450. - # Bc -> D* Mu Mu - self.LowerBc_DstarMuMuMassCut = 5450. - # Bc -> D0 Mu Mu - self.LowerBc_D0MuMuMassCut = 5250. - - -class EFBMuMuXFex_noVtx (TrigEFBMuMuXFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuXFex_noVtx"): - super( TrigEFBMuMuXFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # muon part - self.OppositeSign = True # if check opposite sign of muons - self.LowerMuMuMassCut = 100. - self.UpperMuMuMassCut = 5500. - ##self.LowerMuVtxMassCut = 100. - ##self.UpperMuVtxMassCut = 5500. - self.MuVtxChi2Cut = 40. - # B{+/-} -> K{+/-} Mu Mu - self.DoB_KMuMuDecay = True - self.LowerKMuMuMassCut = 4500. - self.UpperKMuMuMassCut = 5900. - ##self.LowerB_KMuMuMassCutVtxOff = 4500. - ##self.UpperB_KMuMuMassCutVtxOff = 5900. - ##self.LowerBVtxMassCut = 4500. - ##self.UpperBVtxMassCut = 5900. - self.DoB_KMuMuVertexing = False - self.BVtxChi2Cut = 60. # 300 in L2 - # Bd -> K*(892) Mu Mu - self.DoBd_KstarMuMuDecay = True - self.LowerKstar_KaonMassCut = 600. - self.UpperKstar_KaonMassCut = 1500. - self.LowerBd_KstarMuMuMassCut = 4600. - self.UpperBd_KstarMuMuMassCut = 6300. - ##self.LowerBd_KstarMuMuMassCutVtxOff = 4600. - ##self.UpperBd_KstarMuMuMassCutVtxOff = 6300. - ##self.LowerKstarVtxMassCut = 600. - ##self.UpperKstarVtxMassCut = 1200. - ##self.LowerBdVtxMassCut = 4600. - ##self.UpperBdVtxMassCut = 6000. - self.DoKstar_KPiVertexing = False - self.DoBd_KstarMuMuVertexing = False - self.KstarVtxChi2Cut = 40. - self.BdVtxChi2Cut = 60. - # Bs -> Phi(1020) Mu Mu - self.DoBs_Phi1020MuMuDecay = True - self.LowerPhi1020_KaonMassCut = 990. - self.UpperPhi1020_KaonMassCut = 1050. - self.LowerBs_Phi1020MuMuMassCut = 5000. - self.UpperBs_Phi1020MuMuMassCut = 5800. - ##self.LowerBs_Phi1020MuMuMassCutVtxOff = 5000. - ##self.UpperBs_Phi1020MuMuMassCutVtxOff = 5800. - ##self.LowerPhi1020VtxMassCut = 990. - ##self.UpperPhi1020VtxMassCut = 1060. - ##self.LowerBsVtxMassCut = 4600. - ##self.UpperBsVtxMassCut = 6000. - self.DoPhi1020_KKVertexing = False - self.DoBs_Phi1020MuMuVertexing = False - self.Phi1020VtxChi2Cut = 40. - self.BsVtxChi2Cut = 60. - # Lb -> L Mu Mu - self.DoLb_LambdaMuMuDecay = True - self.LowerLambda_PrPiMassCut = 1040. #1040. - self.UpperLambda_PrPiMassCut = 1250. #1220. - self.LowerLambda_PtCut = 1200. - self.LowerLb_LambdaMuMuMassCut = 3700. #5090. - self.UpperLb_LambdaMuMuMassCut = 6600. #6270. - self.LowerLb_PtCut = 8000. - self.UpperLambdaVtxMassCut = 1200. - self.LowerLbVtxMassCut = 3850. - self.UpperLbVtxMassCut = 6150. - self.DoLambda_PPiVertexing = False - self.DoLb_LambdaMuMuVertexing = False - self.DoLb_LambdaMuMuCascade = False - self.LambdaVtxChi2Cut = 90. #100. - self.LbVtxChi2Cut = 180. #100. - ##self.LbVtxDistanceCut = 0. - ##self.PiImpactCut = 0. - ##self.PrImpactCut = 0. - # vertexing off - ##self.LowerLb_LambdaMuMuMassCutVtxOff = 1080. - ##self.UpperLb_LambdaMuMuMassCutVtxOff = 1180. - # Bc -> D_s* Mu Mu - self.DoBc_DsMuMuDecay = True - self.LowerPhiDs_MassCut = 980. - self.UpperPhiDs_MassCut = 1080. - self.LowerDs_MassCut = 1600. - self.UpperDs_MassCut = 2400. - self.LowerDs_PtCut = 2000. - self.LowerBc_DsMuMuMassCut = 5450. - self.UpperBc_DsMuMuMassCut = 7050. - self.LowerBcDs_PtCut = 8000. - ##self.LowerDs_LxyCut = 0.3 - self.LowerDs_LxyCut = -999.3 - self.DoDs_Vertexing = False - self.DoBc_DsMuMuVertexing = False - self.DoBc_DsMuMuCascade = False - self.DsVtxChi2Cut = 90. - self.BcVtxChi2Cut = 120. - - # Bc -> D+ Mu Mu - self.DoBc_DplusMuMuDecay = True - ##self.LowerPhiDs_MassCut = 980. - ##self.UpperPhiDs_MassCut = 1080. - self.LowerDplus_MassCut = 1500. - self.UpperDplus_MassCut = 2300. - self.LowerDplus_PtCut = 2000. - ##self.LowerBc_DsMuMuMassCut = 1800. - self.LowerBc_DplusMuMuMassCut = 5450. - self.UpperBc_DplusMuMuMassCut = 7050. - self.LowerBcDplus_PtCut = 8000. - ##self.LowerDplus_LxyCut = 0.3 - self.LowerDplus_LxyCut = 0.01 - self.DoDplus_Vertexing = False - self.DoBc_DplusMuMuVertexing = False - self.DoBc_DplusMuMuCascade = False - self.DplusVtxChi2Cut = 90. - self.BcDplusVtxChi2Cut = 180. - - # Bc -> Dstar Mu Mu - self.DoBc_DstarMuMuDecay = True - self.LowerD0Dstar_MassCut = 1500. - self.UpperD0Dstar_MassCut = 2300. - self.UpperDstar_DMCut = 180. - self.LowerDstar_PtCut = 2000. - self.LowerDstarKpi_PtCut = 1800. - self.LowerBc_DstarMuMuMassCut = 5450. - self.UpperBc_DstarMuMuMassCut = 7050. - self.LowerBcDstar_PtCut = 8000. - self.DoD0Dstar_Vertexing = False - self.DoBc_DstarMuMuVertexing = False - self.DoBc_DstarMuMuCascade = False - self.D0DstarVtxChi2Cut = 90. - self.BcDstarVtxChi2Cut = 120. - - # Bc -> D0 (Dstar with lost pi_s) Mu Mu - self.DoBc_D0MuMuDecay = True - self.LowerD0_MassCut = 1500. - self.UpperD0_MassCut = 2300. - self.LowerD0_PtCut = 2000. - self.LowerBc_D0MuMuMassCut = 5250. - self.UpperBc_D0MuMuMassCut = 6911. - self.LowerBcD0_PtCut = 8000. - self.LowerD0_LxyCut = 0.01 - self.DoD0_Vertexing = False - self.DoBc_D0MuMuVertexing = False - self.DoBc_D0MuMuCascade = False - self.D0VtxChi2Cut = 90. - self.BcD0VtxChi2Cut = 120. - self.MaxBcD0ToStore = 1000 - - from TrigBphysHypo.TrigEFBMuMuXFexMonitoring import EFBMuMuXFexValidationMonitoring - validation = EFBMuMuXFexValidationMonitoring() - - from TrigBphysHypo.TrigEFBMuMuXFexMonitoring import EFBMuMuXFexOnlineMonitoring - online = EFBMuMuXFexOnlineMonitoring() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuXFex_BplusMuMuKplus (TrigEFBMuMuXFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuXFex_BplusMuMuKplus"): - super( TrigEFBMuMuXFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # muon part - self.OppositeSign = True # if check opposite sign of muons - self.LowerMuMuMassCut = 2500. # JW update to loose jpsi mass range - self.UpperMuMuMassCut = 4200. - ##self.LowerMuVtxMassCut = 100. - ##self.UpperMuVtxMassCut = 5500. - self.MuVtxChi2Cut = 20. # JW tighten vertex requirement - # B{+/-} -> K{+/-} Mu Mu - self.DoB_KMuMuDecay = True - self.LowerKMuMuMassCut = 4500. - self.UpperKMuMuMassCut = 5900. - #self.LowerB_KMuMuMassCutVtxOff = 4500. - #self.UpperB_KMuMuMassCutVtxOff = 5900. - #self.LowerBVtxMassCut = 4500. - #self.UpperBVtxMassCut = 5900. - self.DoB_KMuMuVertexing = True - self.BVtxChi2Cut = 200. # JW reduce from - # Bd -> K*(892) Mu Mu - self.DoBd_KstarMuMuDecay = False - # Bs -> Phi(1020) Mu Mu - self.DoBs_Phi1020MuMuDecay = False - # Lb -> L Mu Mu - self.DoLb_LambdaMuMuDecay = False - # Bc -> D_s* Mu Mu - self.DoBc_DsMuMuDecay = False - # Bc -> D+ Mu Mu - self.DoBc_DplusMuMuDecay = False - # Bc -> D* Mu Mu - self.DoBc_DstarMuMuDecay = False - # Bc -> D0 Mu Mu - self.DoBc_D0MuMuDecay = False - - from TrigBphysHypo.TrigEFBMuMuXFexMonitoring import EFBMuMuXFexValidationMonitoring - validation = EFBMuMuXFexValidationMonitoring() - - from TrigBphysHypo.TrigEFBMuMuXFexMonitoring import EFBMuMuXFexOnlineMonitoring_BpMuMuKp - online = EFBMuMuXFexOnlineMonitoring_BpMuMuKp() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuXFex_TauMuMuX (TrigEFBMuMuXFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuXFex_TauMuMuX"): - super( TrigEFBMuMuXFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # muon part - self.OppositeSign = True # if check opposite sign of muons - self.LowerMuMuMassCut = 0. - self.UpperMuMuMassCut = 2700. - ##self.LowerMuVtxMassCut = 100. - ##self.UpperMuVtxMassCut = 5500. - self.MuVtxChi2Cut = 100. - # B{+/-} -> K{+/-} Mu Mu - self.DoB_KMuMuDecay = True - self.LowerKMuMuMassCut = 700. - self.UpperKMuMuMassCut = 2700. - #self.LowerB_KMuMuMassCutVtxOff = 4500. - #self.UpperB_KMuMuMassCutVtxOff = 5900. - #self.LowerBVtxMassCut = 4500. - #self.UpperBVtxMassCut = 5900. - self.DoB_KMuMuVertexing = True - self.BVtxChi2Cut = 100. - # Bd -> K*(892) Mu Mu - self.DoBd_KstarMuMuDecay = False - # Bs -> Phi(1020) Mu Mu - self.DoBs_Phi1020MuMuDecay = False - # Lb -> L Mu Mu - self.DoLb_LambdaMuMuDecay = False - # Bc -> D_s* Mu Mu - self.DoBc_DsMuMuDecay = False - - #from TrigBphysHypo.TrigEFBMuMuXFexMonitoring import EFBMuMuXFexValidationMonitoring - #validation = EFBMuMuXFexValidationMonitoring() - - #from TrigBphysHypo.TrigEFBMuMuXFexMonitoring import EFBMuMuXFexOnlineMonitoring_BpMuMuKp - #online = EFBMuMuXFexOnlineMonitoring_BpMuMuKp() - - #from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - #time = TrigTimeHistToolConfig("Time") - - #self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuXFex_BplusMuMuKplus_noVtx (TrigEFBMuMuXFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuXFex_BplusMuMuKplus_noVtx"): - super( TrigEFBMuMuXFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # muon part - self.OppositeSign = True # if check opposite sign of muons - self.LowerMuMuMassCut = 2500. - self.UpperMuMuMassCut = 4200. - ##self.LowerMuVtxMassCut = 100. - ##self.UpperMuVtxMassCut = 5500. - self.MuVtxChi2Cut = 20. - # B{+/-} -> K{+/-} Mu Mu - self.DoB_KMuMuDecay = True - self.LowerKMuMuMassCut = 4500. - self.UpperKMuMuMassCut = 5900. - #self.LowerB_KMuMuMassCutVtxOff = 4500. - #self.UpperB_KMuMuMassCutVtxOff = 5900. - #self.LowerBVtxMassCut = 4500. - #self.UpperBVtxMassCut = 5900. - self.DoB_KMuMuVertexing = False - self.BVtxChi2Cut = 200. - # Bd -> K*(892) Mu Mu - self.DoBd_KstarMuMuDecay = False - # Bs -> Phi(1020) Mu Mu - self.DoBs_Phi1020MuMuDecay = False - # Lb -> L Mu Mu - self.DoLb_LambdaMuMuDecay = False - # Bc -> D_s* Mu Mu - self.DoBc_DsMuMuDecay = False - # Bc -> D+ Mu Mu - self.DoBc_DplusMuMuDecay = False - # Bc -> D* Mu Mu - self.DoBc_DstarMuMuDecay = False - # Bc -> D0 Mu Mu - self.DoBc_D0MuMuDecay = False - - from TrigBphysHypo.TrigEFBMuMuXFexMonitoring import EFBMuMuXFexValidationMonitoring - validation = EFBMuMuXFexValidationMonitoring() - - from TrigBphysHypo.TrigEFBMuMuXFexMonitoring import EFBMuMuXFexOnlineMonitoring_BpMuMuKp - online = EFBMuMuXFexOnlineMonitoring_BpMuMuKp() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [ validation, online, time ] - - -class EFBMuMuXFex_BdMuMuKstar (TrigEFBMuMuXFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuXFex_BdMuMuKstar"): - super( TrigEFBMuMuXFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # muon part - self.OppositeSign = True # if check opposite sign of muons - self.LowerMuMuMassCut = 100. - self.UpperMuMuMassCut = 5500. - ##self.LowerMuVtxMassCut = 100. - ##self.UpperMuVtxMassCut = 5500. - self.MuVtxChi2Cut = 40. - # B{+/-} -> K{+/-} Mu Mu - self.DoB_KMuMuDecay = False - # Bd -> K*(892) Mu Mu - self.DoBd_KstarMuMuDecay = True - self.LowerKstar_KaonMassCut = 600. - self.UpperKstar_KaonMassCut = 1500. - self.LowerBd_KstarMuMuMassCut = 4600. - self.UpperBd_KstarMuMuMassCut = 6300. - ##self.LowerBd_KstarMuMuMassCutVtxOff = 4600. - ##self.UpperBd_KstarMuMuMassCutVtxOff = 6300. - ##self.LowerKstarVtxMassCut = 600. - ##self.UpperKstarVtxMassCut = 1200. - ##self.LowerBdVtxMassCut = 4600. - ##self.UpperBdVtxMassCut = 6000. - self.DoKstar_KPiVertexing = True - self.DoBd_KstarMuMuVertexing = True - self.KstarVtxChi2Cut = 40. - self.BdVtxChi2Cut = 60. - # Bs -> Phi(1020) Mu Mu - self.DoBs_Phi1020MuMuDecay = False - # Lb -> L Mu Mu - self.DoLb_LambdaMuMuDecay = False - # Bc -> D_s* Mu Mu - self.DoBc_DsMuMuDecay = False - # Bc -> D+ Mu Mu - self.DoBc_DplusMuMuDecay = False - # Bc -> D* Mu Mu - self.DoBc_DstarMuMuDecay = False - # Bc -> D0 Mu Mu - self.DoBc_D0MuMuDecay = False - - from TrigBphysHypo.TrigEFBMuMuXFexMonitoring import EFBMuMuXFexValidationMonitoring - validation = EFBMuMuXFexValidationMonitoring() - - from TrigBphysHypo.TrigEFBMuMuXFexMonitoring import EFBMuMuXFexOnlineMonitoring - online = EFBMuMuXFexOnlineMonitoring() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [ validation, online, time ] - - -class EFBMuMuXFex_BdMuMuKstar_noVtx (TrigEFBMuMuXFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuXFex_BdMuMuKstar_noVtx"): - super( TrigEFBMuMuXFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # muon part - self.OppositeSign = True # if check opposite sign of muons - self.LowerMuMuMassCut = 100. - self.UpperMuMuMassCut = 5500. - ##self.LowerMuVtxMassCut = 100. - ##self.UpperMuVtxMassCut = 5500. - self.MuVtxChi2Cut = 40. - # B{+/-} -> K{+/-} Mu Mu - self.DoB_KMuMuDecay = False - # Bd -> K*(892) Mu Mu - self.DoBd_KstarMuMuDecay = True - self.LowerKstar_KaonMassCut = 600. - self.UpperKstar_KaonMassCut = 1500. - self.LowerBd_KstarMuMuMassCut = 4600. - self.UpperBd_KstarMuMuMassCut = 6300. - ##self.LowerBd_KstarMuMuMassCutVtxOff = 4600. - ##self.UpperBd_KstarMuMuMassCutVtxOff = 6300. - ##self.LowerKstarVtxMassCut = 600. - ##self.UpperKstarVtxMassCut = 1200. - ##self.LowerBdVtxMassCut = 4600. - ##self.UpperBdVtxMassCut = 6000. - self.DoKstar_KPiVertexing = False - self.DoBd_KstarMuMuVertexing = False - self.KstarVtxChi2Cut = 40. - self.BdVtxChi2Cut = 60. - # Bs -> Phi(1020) Mu Mu - self.DoBs_Phi1020MuMuDecay = False - # Lb -> L Mu Mu - self.DoLb_LambdaMuMuDecay = False - # Bc -> D_s* Mu Mu - self.DoBc_DsMuMuDecay = False - # Bc -> D+ Mu Mu - self.DoBc_DplusMuMuDecay = False - # Bc -> D* Mu Mu - self.DoBc_DstarMuMuDecay = False - # Bc -> D0 Mu Mu - self.DoBc_D0MuMuDecay = False - - from TrigBphysHypo.TrigEFBMuMuXFexMonitoring import EFBMuMuXFexValidationMonitoring - validation = EFBMuMuXFexValidationMonitoring() - - from TrigBphysHypo.TrigEFBMuMuXFexMonitoring import EFBMuMuXFexOnlineMonitoring - online = EFBMuMuXFexOnlineMonitoring() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [ validation, online, time ] - - -class EFBMuMuXFex_BsMuMuPhi (TrigEFBMuMuXFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuXFex_BsMuMuPhi"): - super( TrigEFBMuMuXFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # muon part - self.OppositeSign = True # if check opposite sign of muons - self.LowerMuMuMassCut = 100. - self.UpperMuMuMassCut = 5500. - ##self.LowerMuVtxMassCut = 100. - ##self.UpperMuVtxMassCut = 5500. - self.MuVtxChi2Cut = 40. - # B{+/-} -> K{+/-} Mu Mu - self.DoB_KMuMuDecay = False - # Bd -> K*(892) Mu Mu - self.DoBd_KstarMuMuDecay = False - # Bs -> Phi(1020) Mu Mu - self.DoBs_Phi1020MuMuDecay = True - self.LowerPhi1020_KaonMassCut = 980. - self.UpperPhi1020_KaonMassCut = 1050. - self.LowerBs_Phi1020MuMuMassCut = 5000. - self.UpperBs_Phi1020MuMuMassCut = 5800. - ##self.LowerBs_Phi1020MuMuMassCutVtxOff = 5000. - ##self.UpperBs_Phi1020MuMuMassCutVtxOff = 5800. - ##self.LowerPhi1020VtxMassCut = 990. - ##self.UpperPhi1020VtxMassCut = 1060. - ##self.LowerBsVtxMassCut = 4600. - ##self.UpperBsVtxMassCut = 6000. - self.DoPhi1020_KKVertexing = True - self.DoBs_Phi1020MuMuVertexing = True - self.Phi1020VtxChi2Cut = 40. - self.BsVtxChi2Cut = 60. - # Lb -> L Mu Mu - self.DoLb_LambdaMuMuDecay = False - # Bc -> D_s* Mu Mu - self.DoBc_DsMuMuDecay = False - # Bc -> D+ Mu Mu - self.DoBc_DplusMuMuDecay = False - # Bc -> D* Mu Mu - self.DoBc_DstarMuMuDecay = False - # Bc -> D0 Mu Mu - self.DoBc_D0MuMuDecay = False - - from TrigBphysHypo.TrigEFBMuMuXFexMonitoring import EFBMuMuXFexValidationMonitoring - validation = EFBMuMuXFexValidationMonitoring() - - from TrigBphysHypo.TrigEFBMuMuXFexMonitoring import EFBMuMuXFexOnlineMonitoring - online = EFBMuMuXFexOnlineMonitoring() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [ validation, online, time ] - - -class EFBMuMuXFex_BsJpsiPhi (EFBMuMuXFex_BsMuMuPhi): - __slots__ = [] - def __init__(self, name = "EFBMuMuXFex_BsJpsiPhi"): - EFBMuMuXFex_BsMuMuPhi.__init__(self, name ) - - # user narrower Jpsi mass cut - self.LowerMuMuMassCut = 2500. - self.UpperMuMuMassCut = 4200. - - -class EFBMuMuXFex_BsMuMuPhi_noVtx (TrigEFBMuMuXFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuXFex_BsMuMuPhi_noVtx"): - super( TrigEFBMuMuXFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # muon part - self.OppositeSign = True # if check opposite sign of muons - self.LowerMuMuMassCut = 100. - self.UpperMuMuMassCut = 5500. - ##self.LowerMuVtxMassCut = 100. - ##self.UpperMuVtxMassCut = 5500. - self.MuVtxChi2Cut = 40. - # B{+/-} -> K{+/-} Mu Mu - self.DoB_KMuMuDecay = False - # Bd -> K*(892) Mu Mu - self.DoBd_KstarMuMuDecay = False - # Bs -> Phi(1020) Mu Mu - self.DoBs_Phi1020MuMuDecay = True - self.LowerPhi1020_KaonMassCut = 990. - self.UpperPhi1020_KaonMassCut = 1050. - self.LowerBs_Phi1020MuMuMassCut = 5000. - self.UpperBs_Phi1020MuMuMassCut = 5800. - ##self.LowerBs_Phi1020MuMuMassCutVtxOff = 5000. - ##self.UpperBs_Phi1020MuMuMassCutVtxOff = 5800. - ##self.LowerPhi1020VtxMassCut = 990. - ##self.UpperPhi1020VtxMassCut = 1060. - ##self.LowerBsVtxMassCut = 4600. - ##self.UpperBsVtxMassCut = 6000. - self.DoPhi1020_KKVertexing = False - self.DoBs_Phi1020MuMuVertexing = False - self.Phi1020VtxChi2Cut = 40. - self.BsVtxChi2Cut = 60. - # Lb -> L Mu Mu - self.DoLb_LambdaMuMuDecay = False - # Bc -> D_s* Mu Mu - self.DoBc_DsMuMuDecay = False - # Bc -> D+ Mu Mu - self.DoBc_DplusMuMuDecay = False - # Bc -> D* Mu Mu - self.DoBc_DstarMuMuDecay = False - # Bc -> D0 Mu Mu - self.DoBc_D0MuMuDecay = False - - from TrigBphysHypo.TrigEFBMuMuXFexMonitoring import EFBMuMuXFexValidationMonitoring - validation = EFBMuMuXFexValidationMonitoring() - - from TrigBphysHypo.TrigEFBMuMuXFexMonitoring import EFBMuMuXFexOnlineMonitoring - online = EFBMuMuXFexOnlineMonitoring() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [ validation, online, time ] - - -class EFBMuMuXFex_LbMuMuLambda (TrigEFBMuMuXFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuXFex_LbMuMuLambda"): - super( TrigEFBMuMuXFex, self ).__init__( name ) - - #self.VertexFitterTool = ToolSvc.TrigBphysFitter - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # muon part - self.OppositeSign = True # if check opposite sign of muons - self.LowerMuMuMassCut = 100. - self.UpperMuMuMassCut = 5500. - ##self.LowerMuVtxMassCut = 100. - ##self.UpperMuVtxMassCut = 5500. - self.MuVtxChi2Cut = 40. - # B{+/-} -> K{+/-} Mu Mu - self.DoB_KMuMuDecay = False - # Bd -> K*(892) Mu Mu - self.DoBd_KstarMuMuDecay = False - # Bs -> Phi(1020) Mu Mu - self.DoBs_Phi1020MuMuDecay = False - # Lb -> L Mu Mu - self.DoLb_LambdaMuMuDecay = True - self.LowerLambda_PrPiMassCut = 1040. #1040. - self.UpperLambda_PrPiMassCut = 1250. #1220. - self.LowerLambda_PtCut = 1200. - self.LowerLb_LambdaMuMuMassCut = 3700. #5090. - self.UpperLb_LambdaMuMuMassCut = 6600. #6270. - self.LowerLb_PtCut = 8000. - self.UpperLambdaVtxMassCut = 1200. - self.LowerLbVtxMassCut = 3850. - self.UpperLbVtxMassCut = 6150. - self.DoLambda_PPiVertexing = True - self.DoLb_LambdaMuMuVertexing = True - self.DoLb_LambdaMuMuCascade = True - self.LambdaVtxChi2Cut = 90. #100. - self.LbVtxChi2Cut = 180. #100. - self.LowerLambda_LxyCut = 5. - ##self.LbVtxDistanceCut = 0. - ##self.PiImpactCut = 0. - ##self.PrImpactCut = 0. - # Bc -> D_s* Mu Mu - self.DoBc_DsMuMuDecay = False - # Bc -> D+ Mu Mu - self.DoBc_DplusMuMuDecay = False - # Bc -> D* Mu Mu - self.DoBc_DstarMuMuDecay = False - # Bc -> D0 Mu Mu - self.DoBc_D0MuMuDecay = False - - from TrigBphysHypo.TrigEFBMuMuXFexMonitoring import EFBMuMuXFexValidationMonitoring - validation = EFBMuMuXFexValidationMonitoring() - - from TrigBphysHypo.TrigEFBMuMuXFexMonitoring import EFBMuMuXFexOnlineMonitoring - online = EFBMuMuXFexOnlineMonitoring() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [ validation, online, time ] - - -class EFBMuMuXFex_LbMuMuLambda_noVtx (TrigEFBMuMuXFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuXFex_LbMuMuLambda_noVtx"): - super( TrigEFBMuMuXFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # muon part - self.OppositeSign = True # if check opposite sign of muons - self.LowerMuMuMassCut = 100. - self.UpperMuMuMassCut = 5500. - ##self.LowerMuVtxMassCut = 100. - ##self.UpperMuVtxMassCut = 5500. - self.MuVtxChi2Cut = 40. - # B{+/-} -> K{+/-} Mu Mu - self.DoB_KMuMuDecay = False - # Bd -> K*(892) Mu Mu - self.DoBd_KstarMuMuDecay = False - # Bs -> Phi(1020) Mu Mu - self.DoBs_Phi1020MuMuDecay = False - # Lb -> L Mu Mu - self.DoLb_LambdaMuMuDecay = True - self.LowerLambda_PrPiMassCut = 1040. #1040. - self.UpperLambda_PrPiMassCut = 1250. #1220. - self.LowerLambda_PtCut = 1200. - self.LowerLb_LambdaMuMuMassCut = 3700. #5090. - self.UpperLb_LambdaMuMuMassCut = 6600. #6270. - self.LowerLb_PtCut = 8000. - self.UpperLambdaVtxMassCut = 1200. - self.LowerLbVtxMassCut = 3850. - self.UpperLbVtxMassCut = 6150. - self.DoLambda_PPiVertexing = False - self.DoLb_LambdaMuMuVertexing = False - self.DoLb_LambdaMuMuCascade = False - self.LambdaVtxChi2Cut = 90. #100. - self.LbVtxChi2Cut = 180. #100. - ##self.LbVtxDistanceCut = 0. - ##self.PiImpactCut = 0. - ##self.PrImpactCut = 0. - # Bc -> D_s* Mu Mu - self.DoBc_DsMuMuDecay = False - # Bc -> D+ Mu Mu - self.DoBc_DplusMuMuDecay = False - # Bc -> D* Mu Mu - self.DoBc_DstarMuMuDecay = False - # Bc -> D0 Mu Mu - self.DoBc_D0MuMuDecay = False - - from TrigBphysHypo.TrigEFBMuMuXFexMonitoring import EFBMuMuXFexValidationMonitoring - validation = EFBMuMuXFexValidationMonitoring() - - from TrigBphysHypo.TrigEFBMuMuXFexMonitoring import EFBMuMuXFexOnlineMonitoring - online = EFBMuMuXFexOnlineMonitoring() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [ validation, online, time ] - -class EFBMuMuXFex_BcMuMuDs (TrigEFBMuMuXFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuXFex_BcMuMuDs"): - super( TrigEFBMuMuXFex, self ).__init__( name ) - - #self.VertexFitterTool = ToolSvc.TrigBphysFitter - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # muon part - self.OppositeSign = True # if check opposite sign of muons - self.LowerMuMuMassCut = 100. - self.UpperMuMuMassCut = 5500. - ##self.LowerMuVtxMassCut = 100. - ##self.UpperMuVtxMassCut = 5500. - self.MuVtxChi2Cut = 40. - # B{+/-} -> K{+/-} Mu Mu - self.DoB_KMuMuDecay = False - # Bd -> K*(892) Mu Mu - self.DoBd_KstarMuMuDecay = False - # Bs -> Phi(1020) Mu Mu - self.DoBs_Phi1020MuMuDecay = False - # Lb -> L Mu Mu - self.DoLb_LambdaMuMuDecay = False - # Bc -> D_s* Mu Mu - self.DoBc_DsMuMuDecay = True - self.LowerPhiDs_MassCut = 980. - self.UpperPhiDs_MassCut = 1080. - self.LowerDs_MassCut = 1600. - self.UpperDs_MassCut = 2400. - self.LowerBc_DsMuMuMassCut = 5450. - self.UpperBc_DsMuMuMassCut = 7050. - self.DoDs_Vertexing = True - self.DoBc_DsMuMuVertexing = True - self.DoBc_DsMuMuCascade = True - self.DsVtxChi2Cut = 90. - self.BcVtxChi2Cut = 120. - self.MaxBcToStore = 1000 - - # Bc -> D+ Mu Mu - self.DoBc_DplusMuMuDecay = True - self.LowerDplus_MassCut = 1500. - self.UpperDplus_MassCut = 2300. - self.LowerDplus_PtCut = 2000. - self.LowerBc_DplusMuMuMassCut = 5450. - self.UpperBc_DplusMuMuMassCut = 7050. - self.LowerBcDplus_PtCut = 8000. - ##self.LowerDplus_LxyCut = 0.3 - self.LowerDplus_LxyCut = 0.01 - self.DoDplus_Vertexing = True - self.DoBc_DplusMuMuVertexing = True - self.DoBc_DplusMuMuCascade = True - self.DplusVtxChi2Cut = 90. - self.BcDplusVtxChi2Cut = 180. - self.MaxBcDplusToStore = 1000 - - # Bc -> Dstar Mu Mu - self.DoBc_DstarMuMuDecay = True - self.LowerD0Dstar_MassCut = 1500. - self.UpperD0Dstar_MassCut = 2300. - self.UpperDstar_DMCut = 180. - self.LowerDstar_PtCut = 2000. - self.LowerDstarKpi_PtCut = 1800. - self.LowerBc_DstarMuMuMassCut = 5450. - self.UpperBc_DstarMuMuMassCut = 7050. - self.LowerBcDstar_PtCut = 8000. - self.LowerD0Dstar_LxyCut = -999. - self.DoD0Dstar_Vertexing = True - self.DoBc_DstarMuMuVertexing = True - self.DoBc_DstarMuMuCascade = True - self.D0DstarVtxChi2Cut = 90. - self.BcDstarVtxChi2Cut = 120. - self.MaxBcDstarToStore = 1000 - - # Bc -> D0 (Dstar with lost pi_s) Mu Mu - self.DoBc_D0MuMuDecay = True - self.LowerD0_MassCut = 1500. - self.UpperD0_MassCut = 2300. - self.LowerD0_PtCut = 2000. - self.LowerBc_D0MuMuMassCut = 5250. - self.UpperBc_D0MuMuMassCut = 6911. - self.LowerBcD0_PtCut = 8000. - self.LowerD0_LxyCut = 0.01 - self.DoD0_Vertexing = True - self.DoBc_D0MuMuVertexing = True - self.DoBc_D0MuMuCascade = True - self.D0VtxChi2Cut = 90. - self.BcD0VtxChi2Cut = 120. - self.MaxBcD0ToStore = 1000 - - from TrigBphysHypo.TrigEFBMuMuXFexMonitoring import EFBMuMuXFexValidationMonitoring - validation = EFBMuMuXFexValidationMonitoring() - - from TrigBphysHypo.TrigEFBMuMuXFexMonitoring import EFBMuMuXFexOnlineMonitoring_BcMuMuDs - online = EFBMuMuXFexOnlineMonitoring_BcMuMuDs() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [ validation, online, time ] - - -class EFBMuMuXFex_BcMuMuDs_tight (EFBMuMuXFex_BcMuMuDs): - __slots__ = [] - def __init__(self, name = "EFBMuMuXFex_BcMuMuDs_tight"): - EFBMuMuXFex_BcMuMuDs.__init__(self, name ) - - # Bc -> D_s* Mu Mu - self.LowerBc_DsMuMuMassCut = 5450. - # Bc -> D+ Mu Mu - self.LowerBc_DplusMuMuMassCut = 5450. - # Bc -> D* Mu Mu - self.LowerBc_DstarMuMuMassCut = 5450. - # Bc -> D0 Mu Mu - self.LowerBc_D0MuMuMassCut = 5250. - - -class EFBMuMuXFex_BcMuMuDs_noVtx (TrigEFBMuMuXFex): - __slots__ = [] - def __init__(self, name = "EFBMuMuXFex_BcMuMuDs_noVtx"): - super( TrigEFBMuMuXFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # muon part - self.OppositeSign = True # if check opposite sign of muons - self.LowerMuMuMassCut = 100. - self.UpperMuMuMassCut = 5500. - ##self.LowerMuVtxMassCut = 100. - ##self.UpperMuVtxMassCut = 5500. - self.MuVtxChi2Cut = 40. - # B{+/-} -> K{+/-} Mu Mu - self.DoB_KMuMuDecay = False - # Bd -> K*(892) Mu Mu - self.DoBd_KstarMuMuDecay = False - # Bs -> Phi(1020) Mu Mu - self.DoBs_Phi1020MuMuDecay = False - # Lb -> L Mu Mu - self.DoLb_LambdaMuMuDecay = False - # Bc -> D_s* Mu Mu - self.DoBc_DsMuMuDecay = True - self.LowerPhiDs_MassCut = 980. - self.UpperPhiDs_MassCut = 1080. - self.LowerDs_MassCut = 1600. - self.UpperDs_MassCut = 2400. - self.LowerBc_DsMuMuMassCut = 5450. - self.UpperBc_DsMuMuMassCut = 7050. - self.DoDs_Vertexing = False - self.DoBc_DsMuMuVertexing = False - self.DoBc_DsMuMuCascade = False - self.DsVtxChi2Cut = 90. - self.BcVtxChi2Cut = 120. - - # Bc -> D+ Mu Mu - self.DoBc_DplusMuMuDecay = False - self.LowerDplus_MassCut = 1500. - self.UpperDplus_MassCut = 2300. - self.LowerDplus_PtCut = 2000. - self.LowerBc_DplusMuMuMassCut = 5450. - self.UpperBc_DplusMuMuMassCut = 7050. - self.LowerBcDplus_PtCut = 8000. - ##self.LowerDplus_LxyCut = 0.3 - self.LowerDplus_LxyCut = 0.01 - self.DoDplus_Vertexing = False - self.DoBc_DplusMuMuVertexing = False - self.DoBc_DplusMuMuCascade = False - self.DplusVtxChi2Cut = 90. - self.BcDplusVtxChi2Cut = 180. - - # Bc -> Dstar Mu Mu - self.DoBc_DstarMuMuDecay = False - self.LowerD0Dstar_MassCut = 1500. - self.UpperD0Dstar_MassCut = 2300. - self.UpperDstar_DMCut = 180. - self.LowerDstar_PtCut = 2000. - self.LowerDstarKpi_PtCut = 1800. - self.LowerBc_DstarMuMuMassCut = 5450. - self.UpperBc_DstarMuMuMassCut = 7050. - self.LowerBcDstar_PtCut = 8000. - self.DoBc_DstarMuMuVertexing = False - self.DoBc_DstarMuMuCascade = False - self.D0DstarVtxChi2Cut = 90. - self.BcDstarVtxChi2Cut = 120. - - # Bc -> D0 (Dstar with lost pi_s) Mu Mu - self.DoBc_D0MuMuDecay = False - self.LowerD0_MassCut = 1500. - self.UpperD0_MassCut = 2300. - self.LowerD0_PtCut = 2000. - self.LowerBc_D0MuMuMassCut = 5250. - self.UpperBc_D0MuMuMassCut = 6911. - self.LowerBcD0_PtCut = 8000. - self.LowerD0_LxyCut = 0.01 - self.DoD0_Vertexing = False - self.DoBc_D0MuMuVertexing = False - self.DoBc_D0MuMuCascade = False - self.D0VtxChi2Cut = 90. - self.BcD0VtxChi2Cut = 120. - self.MaxBcD0ToStore = 1000 - - from TrigBphysHypo.TrigEFBMuMuXFexMonitoring import EFBMuMuXFexValidationMonitoring - validation = EFBMuMuXFexValidationMonitoring() - - from TrigBphysHypo.TrigEFBMuMuXFexMonitoring import EFBMuMuXFexOnlineMonitoring_BcMuMuDs - online = EFBMuMuXFexOnlineMonitoring_BcMuMuDs() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [ validation, online, time ] diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFBMuMuXFexMonitoring.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFBMuMuXFexMonitoring.py deleted file mode 100644 index 85160c12583583e9facbe14f13fd910251b41ff2..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFBMuMuXFexMonitoring.py +++ /dev/null @@ -1,1229 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -# vim: tabstop=4:shiftwidth=4:expandtab -from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig - -ERROR_labels = ' No_EventInfo : Not_2_InputTEs : No_RoIs : No_MuonEFInfoContainer : No_MuonCandidate : SameMuon : DiMuVtxFitFails : DiMuVtxMass_Fails : No_TrackColl : BplusVtxFit_Fails : BplusVtxMass_Fails : WrongDecayID : XVtxFit_Fails : XVtxMass_Fails : XMuMuVtxFit_Fails : XMuMuVtxMass_Fails : BphysCollStore_Fails : No_MuonTrackMatch : TooManyCom_Acc : TooManyComb_Rej : MaxNumBpReached : MaxNumBdReached : MaxNumBsReached : MaxNumLbReached : MaxNumBcReached' -ERROR_number = 25 - -#ACCEPTANCE_labels = ' Input : AcceptAll : Got_RoIs : Got_Muons : Got_TrackColl : Full_TrackColl : Full_IDTracks : Pass_OppChargeC : MuonTracks_Added : Muon_Vertexing : CalcInvMass : MuonVtx_Part : MuMu_mass : MotherVtxCreated : BphysCollParticle ' -#ACCEPTANCE_number = 15 - -class EFBMuMuXFexValidationMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="EFBMuMuXFexValidationMonitoring"): - super(EFBMuMuXFexValidationMonitoring, self).__init__(name) - self.defineTarget("Validation") - # General - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'EFBMuMuXFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'nTriedCombinations', type = 'TH1F', - title = 'EFBMuMuXFex - Number of track combinations tried ; # combinations ; # Events', - xbins = 1000, xmin = 0., xmax = 100000. ) ] - #self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - #title = 'L2BMuMuXFex - Reached steps - acceptance ; ; # Events / Candidates', - #xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - #labels = ACCEPTANCE_labels ) ] - # Timing - self.Histograms += [ defineHistogram ( 'TotalRunTime', type = 'TH1F', - title = 'EFBMuMuXFex - Total processing time ; t_{tot} [ms] ; # Events', - xbins = 100, xmin = 0., xmax = 50. ) ] - self.Histograms += [ defineHistogram ( 'VertexingTime', type = 'TH1F', - title = 'EFBMuMuXFex - Vertex fit processing time ; t_{vtx} [ms] ; # Events', - xbins = 100, xmin = 0., xmax = 50. ) ] - self.Histograms += [ defineHistogram ( 'TotalRunTime, VertexingTime', type = 'TH2F', - title = 'EFBMuMuXFex - Total vs. vertex fit processing time ; t_{tot} [ms] ; t_{vtx} [ms] ; # Events', - xbins = 100, xmin = 0., xmax = 50., - ybins = 100, ymin = 0., ymax = 50. ) ] - # RoIs - self.Histograms += [ defineHistogram ( 'RoI_RoI1Eta, RoI_RoI1Phi', type = 'TH2F', - title = 'EFBMuMuXFex - ROI1 direction ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'RoI_RoI2Eta, RoI_RoI2Phi', type = 'TH2F', - title = 'EFBMuMuXFex - ROI2 direction ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'RoI_dEtaRoI, RoI_dPhiRoI', type = 'TH2F', - title = 'EFBMuMuXFex - ROIs direction difference ; d#eta ; d#phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - # Muons - self.Histograms += [ defineHistogram ( 'DiMu_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of muons in RoIs; n(#mu) ; # Events', - xbins = 10, xmin = -0.5, xmax = 10-0.5 ) ] - self.Histograms += [ defineHistogram ( 'DiMu_Pt_Mu1', type = 'TH1F', - title = 'EFBMuMuXFex - Positive muons p_{T} (no vertexing); p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'DiMu_Pt_Mu2', type = 'TH1F', - title = 'EFBMuMuXFex - Negative muons p_{T} (no vertexing); p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'DiMu_pTsumMuMu', type = 'TH1F', - title = 'EFBMuMuXFex - sum of two muons p_{T} (no vertexing); p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'DiMu_Eta_Mu1, DiMu_Phi_Mu1', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of muon1 tracks (no vertexing); #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'DiMu_Eta_Mu2, DiMu_Phi_Mu2', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of muon2 tracks (no vertexing); #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'DiMu_dEtaMuMu, DiMu_dPhiMuMu', type = 'TH2F', - title = 'EFBMuMuXFex - dEta vs. dPhi between muon tracks (no vertexing); d#eta ; d#phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'DiMu_InvMassMuMu, DiMu_VtxMassMuMu', type = 'TH2F', - title = 'EFBMuMuXFex - InvMass vs. VtxMass of muon pair ; InvMass [GeV] ; VtxMass [GeV] ; # Events', - xbins = 80, xmin = 0., xmax = 20., - ybins = 80, ymin = 0., ymax = 20. ) ] - self.Histograms += [ defineHistogram ( 'DiMu_InvMassMuMu', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of muon pair ; InvMass [GeV] ; # Events', - xbins = 100, xmin = 0., xmax = 10. ) ] - self.Histograms += [ defineHistogram ( 'DiMu_Chi2MuMu', type = 'TH1F', - title = 'EFBMuMuXFex - dimuon vertex chi2 ; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - # Tracks - self.Histograms += [ defineHistogram ( 'Tracks_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of tracks in event ; n(trks) ; # Events', - xbins = 200, xmin = -0.5, xmax = 200-0.5 ) ] - self.Histograms += [ defineHistogram ( 'Tracks_Eta, Tracks_Phi', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of all tracks ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Tracks_Pt', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of all tracks; p_{T} [GeV] ; # Events', - xbins = 100, xmin = 0., xmax = 100. ) ] - # B+ - self.Histograms += [ defineHistogram ( 'BMuMuK_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of B^{+} candidates in event ; n(B^{+}) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - self.Histograms += [ defineHistogram ( 'BMuMuK_Pt_K', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of K in B^{+} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BMuMuK_Eta_K, BMuMuK_Phi_K', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of K in B^{+} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - #self.Histograms += [ defineHistogram ( 'BMuMuK_InvMass_B, BMuMuK_VtxMass_B', type = 'TH2F', - #title = 'EFBMuMuXFex - InvMass vs. VtxMass of B^{+} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 60, xmin = 4., xmax = 7., - #ybins = 60, ymin = 4., ymax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BMuMuK_InvMass_B', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of B^{+} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BMuMuK_Chi2_B', type = 'TH1F', - title = 'EFBMuMuXFex - B^{+} vertex chi2 ; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - # Bd - self.Histograms += [ defineHistogram ( 'BdMuMuKs_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of B_{d} candidates in event ; n(B_{d}) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - self.Histograms += [ defineHistogram ( 'BdMuMuKs_Pt_K', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of K in B_{d} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BdMuMuKs_Eta_K, BdMuMuKs_Phi_K', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of K in B_{d} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BdMuMuKs_Pt_Pi', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of #pi in B_{d} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BdMuMuKs_Eta_Pi, BdMuMuKs_Phi_Pi', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of #pi in B_{d} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - #self.Histograms += [ defineHistogram ( 'BdMuMuKs_InvMass_Kstar, BdMuMuKs_VtxMass_Kstar', type = 'TH2F', - #title = 'EFBMuMuXFex - InvMass vs. VtxMass of K^{*} in B_{d} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 60, xmin = 4., xmax = 7., - #ybins = 60, ymin = 4., ymax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BdMuMuKs_InvMass_Kstar', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of K^{*} in B_{d} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 0.5, xmax = 2. ) ] - #self.Histograms += [ defineHistogram ( 'BdMuMuKs_InvMass_Bd, BdMuMuKs_VtxMass_Bd', type = 'TH2F', - #title = 'EFBMuMuXFex - InvMass vs. VtxMass of B_{d} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 60, xmin = 4., xmax = 7., - #ybins = 60, ymin = 4., ymax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BdMuMuKs_InvMass_Bd', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of B_{d} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BdMuMuKs_Chi2_Kstar', type = 'TH1F', - title = 'EFBMuMuXFex - K^{*} vertex chi2 in B_{d}; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - self.Histograms += [ defineHistogram ( 'BdMuMuKs_Chi2_Bd', type = 'TH1F', - title = 'EFBMuMuXFex - B_{d} vertex chi2 ; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - # Bs - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of B_{s} candidates in event ; n(B_{s}) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_Pt_K1', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of first K in B_{s} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_Eta_K1, BsMuMuPhi_Phi_K1', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of first K in B_{s} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_Pt_K2', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of second K in B_{s} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_Eta_K2, BsMuMuPhi_Phi_K2', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of second K in B_{s} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - #self.Histograms += [ defineHistogram ( 'BsMuMuPhi_InvMass_Phi1020, BsMuMuPhi_VtxMass_Phi1020', type = 'TH2F', - #title = 'EFBMuMuXFex - InvMass vs. VtxMass of #phi(1020) in B_{s} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 60, xmin = 4., xmax = 7., - #ybins = 60, ymin = 4., ymax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_InvMass_Phi1020', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of #phi(1020) in B_{s} ; InvMass [GeV] ; # Candidates', - xbins = 200, xmin = 0.9, xmax = 1.3 ) ] - #self.Histograms += [ defineHistogram ( 'BsMuMuPhi_InvMass_Bs, BsMuMuPhi_VtxMass_Bs', type = 'TH2F', - #title = 'EFBMuMuXFex - InvMass vs. VtxMass of B_{s} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 60, xmin = 4., xmax = 7., - #ybins = 60, ymin = 4., ymax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_InvMass_Bs', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of B_{s} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_Chi2_Phi1020', type = 'TH1F', - title = 'EFBMuMuXFex - #phi(1020) vertex chi2 in B_{s}; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_Chi2_Bs', type = 'TH1F', - title = 'EFBMuMuXFex - B_{s} vertex chi2 ; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - # Lb - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of #Lambda_{b} candidates in event ; n(#Lambda_{b}) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_Pt_P', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of proton in #Lambda_{b} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_Eta_P, LbMuMuLambda_Phi_P', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of proton in #Lambda_{b} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_Pt_Pi', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of #pi in #Lambda_{b} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_Eta_Pi, LbMuMuLambda_Phi_Pi', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of #pi in #Lambda_{b} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - #self.Histograms += [ defineHistogram ( 'LbMuMuLambda_InvMass_Lambda, LbMuMuLambda_VtxMass_Lambda', type = 'TH2F', - #title = 'EFBMuMuXFex - InvMass vs. VtxMass of #Lambda in #Lambda_{b} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 60, xmin = 4., xmax = 7., - #ybins = 60, ymin = 4., ymax = 7. ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_InvMass_Lambda', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of #Lambda in #Lambda_{b} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 1.0, xmax = 1.6 ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_VtxMass_Lambda', type = 'TH1F', - title = 'EFBMuMuXFex - VtxMass of #Lambda in #Lambda_{b} ; VtxMass [GeV] ; # Candidates', - xbins = 60, xmin = 1.0, xmax = 1.6 ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_FinMass_Lambda', type = 'TH1F', - title = 'EFBMuMuXFex - FinMass of #Lambda in #Lambda_{b} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 1.0, xmax = 1.6 ) ] - #self.Histograms += [ defineHistogram ( 'LbMuMuLambda_InvMass_Lb, LbMuMuLambda_VtxMass_Lb', type = 'TH2F', - #title = 'EFBMuMuXFex - InvMass vs. VtxMass of #Lambda_{b} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 60, xmin = 4., xmax = 7., - #ybins = 60, ymin = 4., ymax = 7. ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_InvMass_Lb', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of #Lambda_{b} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 3.6, xmax = 6.6 ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_VtxMass_Lb', type = 'TH1F', - title = 'EFBMuMuXFex - VtxMass of #Lambda_{b} ; VtxMass [GeV] ; # Candidates', - xbins = 60, xmin = 3.6, xmax = 6.6 ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_FinMass_Lb', type = 'TH1F', - title = 'EFBMuMuXFex - FinMass of #Lambda_{b} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 3.6, xmax = 6.6 ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_Chi2_Lambda', type = 'TH1F', - title = 'EFBMuMuXFex - #Lambda vertex chi2 in #Lambda_{b}; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_Chi2_Lb', type = 'TH1F', - title = 'EFBMuMuXFex - #Lambda_{b} vertex chi2 ; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_Lxy_Lambda', type = 'TH1F', - title = 'EFBMuMuXFex - Lambda vertex L_xy in Lb; L_xy ; # Candidates', - xbins = 100, xmin = -5., xmax = 95. ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_pT_Lambda', type = 'TH1F', - title = 'EFBMuMuXFex - pT(Lambda); pT(Lambda) ; # Candidates', - xbins = 100, xmin = 1.0, xmax = 51. ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_pT_Lb', type = 'TH1F', - title = 'EFBMuMuXFex - pT(Lb); pT(Lb) ; # Candidates', - xbins = 100, xmin = 7.5, xmax = 57.5 ) ] - # Bc -> Ds - self.Histograms += [ defineHistogram ( 'BcMuMuDs_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of B_{c} candidates in event ; n(B_{c}) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_Pt_K1', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of first K in B_{c} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_Eta_K1, BcMuMuDs_Phi_K1', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of first K in B_{c} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_Pt_K2', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of second K in B_{c} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_Eta_K2, BcMuMuDs_Phi_K2', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of second K in B_{c} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_Pt_pi', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of #pi in B_{c} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_Eta_pi, BcMuMuDs_Phi_pi', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of #pi in B_{c} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMass_PhiDs', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of #phi in B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 200, xmin = 0.9, xmax = 1.3 ) ] - #self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMass_Ds, BcMuMuDs_VtxMass_Ds', type = 'TH2F', - #title = 'EFBMuMuXFex - InvMass vs. VtxMass of D_{s} in B_{c} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 60, xmin = 1.4, xmax = 2.6, - #ybins = 60, ymin = 1.4, ymax = 2.6 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMass_Ds', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of D_{s} in B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 1.4, xmax = 2.6 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_VtxMass_Ds', type = 'TH1F', - title = 'EFBMuMuXFex - VtxMass of D_{s} in B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 1.4, xmax = 2.6 ) ] - #self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMass_Bc, BcMuMuDs_VtxMass_Bc', type = 'TH2F', - #title = 'EFBMuMuXFex - InvMass vs. VtxMass of B_{c} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 120, xmin = 1.5, xmax = 7.5, - #ybins = 120, ymin = 1.5, ymax = 7.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMass_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of B_{c} ; InvMass [GeV] ; # Candidates', - #xbins = 120, xmin = 1.5, xmax = 7.5 ) ] - xbins = 120, xmin = 5.1, xmax = 7.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_VtxMass_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - VtxMass of B_{c} ; InvMass [GeV] ; # Candidates', - #xbins = 120, xmin = 1.5, xmax = 7.5 ) ] - xbins = 120, xmin = 5.1, xmax = 7.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_Chi2_Ds', type = 'TH1F', - title = 'EFBMuMuXFex - D_{s} vertex chi2 in B_{c}; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_Lxy_Ds', type = 'TH1F', - title = 'EFBMuMuXFex - Ds vertex L_xy in B_{c}; L_xy ; # Candidates', - xbins = 100, xmin = -2.5, xmax = 2.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_pT_Ds', type = 'TH1F', - title = 'EFBMuMuXFex - pT(Ds); pT(Ds) ; # Candidates', - xbins = 100, xmin = 1.5, xmax = 51.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_pT_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - pT(Bc); pT(Bc) ; # Candidates', - xbins = 100, xmin = 7.5, xmax = 57.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_Chi2_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - B_{c} vertex chi2 ; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - # Bc -> Dplus - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of B_{c}->D+ candidates in event ; n(B_{c}->D+) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_Pt_K', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of K in B_{c}->D+ ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_Eta_K, BcMuMuDplus_Phi_K', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of K in B_{c}->D+ ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_Pt_pi1', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of first #pi in B_{c}->D+ ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_Eta_pi1, BcMuMuDplus_Phi_pi1', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of first #pi in B_{c}->D+ ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_Pt_pi2', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of second #pi in B_{c}->D+ ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_Eta_pi2, BcMuMuDplus_Phi_pi2', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of second #pi in B_{c}->D+ ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_InvMass_Dplus', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of D+ in B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 100, xmin = 1.4, xmax = 2.4 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_VtxMass_Dplus', type = 'TH1F', - title = 'EFBMuMuXFex - VtxMass of D+ in B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 100, xmin = 1.4, xmax = 2.4 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_InvMass_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of B_{c}->D+ ; InvMass [GeV] ; # Candidates', - xbins = 120, xmin = 5.1, xmax = 7.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_VtxMass_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - VtxMass of B_{c}->D+ ; InvMass [GeV] ; # Candidates', - xbins = 120, xmin = 5.1, xmax = 7.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_Chi2_Dplus', type = 'TH1F', - title = 'EFBMuMuXFex - D+ vertex chi2 in B_{c}; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_Lxy_Dplus', type = 'TH1F', - title = 'EFBMuMuXFex - D+ vertex L_xy in B_{c}; L_xy ; # Candidates', - xbins = 100, xmin = -2.5, xmax = 2.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_pT_Dplus', type = 'TH1F', - title = 'EFBMuMuXFex - pT(Dplus); pT(Dplus) ; # Candidates', - xbins = 100, xmin = 1.5, xmax = 51.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_pT_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - pT(Bc to D+); pT(Bc to D+) ; # Candidates', - xbins = 100, xmin = 7.5, xmax = 57.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_Chi2_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - B_{c}->D+ vertex chi2 ; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - # Bc -> Dstar - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of B_{c}->D* candidates in event ; n(B_{c}->D*) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_Pt_K', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of K in B_{c}->D* ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_Eta_K, BcMuMuDstar_Phi_K', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of K in B_{c}->D* ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_Pt_pi', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of #pi in B_{c}->D* ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_Eta_pi, BcMuMuDstar_Phi_pi', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of #pi in B_{c}->D* ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_Pt_pis', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of #pi_{s} in B_{c}->D* ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_Eta_pis, BcMuMuDstar_Phi_pis', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of #pi_{s} in B_{c}->D* ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_InvMass_D0Dstar', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of D0(D*) in B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 100, xmin = 1.4, xmax = 2.4 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_VtxMass_D0Dstar', type = 'TH1F', - title = 'EFBMuMuXFex - VtxMass of D0(D*) in B_{c} ; VtxMass [GeV] ; # Candidates', - xbins = 100, xmin = 1.4, xmax = 2.4 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_DelMass_Dstar', type = 'TH1F', - title = 'EFBMuMuXFex - DelMass of D* in B_{c} ; DelMass [GeV] ; # Candidates', - xbins = 170, xmin = 0.130, xmax = 0.300 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_VtxDelMass_Dstar', type = 'TH1F', - title = 'EFBMuMuXFex - VtxDelMass of D* in B_{c} ; VtxDelMass [GeV] ; # Candidates', - xbins = 170, xmin = 0.130, xmax = 0.300 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_InvMass_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of B_{c}->D* ; InvMass [GeV] ; # Candidates', - xbins = 120, xmin = 5.1, xmax = 7.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_VtxMass_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - VtxMass of B_{c}->D* ; InvMass [GeV] ; # Candidates', - xbins = 120, xmin = 5.1, xmax = 7.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_Chi2_D0Dstar', type = 'TH1F', - title = 'EFBMuMuXFex - D0(D*) vertex chi2 in B_{c}; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_Lxy_D0Dstar', type = 'TH1F', - title = 'EFBMuMuXFex - D0(D*) vertex L_xy in B_{c}; L_xy ; # Candidates', - xbins = 100, xmin = -2.5, xmax = 2.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_pT_Dstar', type = 'TH1F', - title = 'EFBMuMuXFex - pT(Dstar); pT(Dstar) ; # Candidates', - xbins = 100, xmin = 1.5, xmax = 51.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_pT_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - pT(Bc to Dstar); pT(Bc to Dstar) ; # Candidates', - xbins = 100, xmin = 7.5, xmax = 57.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_Chi2_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - B_{c}->D* vertex chi2 ; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - # Bc -> D0 (Dstar with lost pi_s) - self.Histograms += [ defineHistogram ( 'BcMuMuD0_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of B_{c}->D0 candidates in event ; n(B_{c}->D0) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuD0_Pt_K', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of K in B_{c}->D0 ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuD0_Eta_K, BcMuMuD0_Phi_K', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of K in B_{c}->D0 ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuD0_Pt_pi', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of #pi in B_{c}->D0 ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuD0_Eta_pi, BcMuMuD0_Phi_pi', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of #pi in B_{c}->D0 ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuD0_InvMass_D0', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of D0 in B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 100, xmin = 1.4, xmax = 2.4 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuD0_VtxMass_D0', type = 'TH1F', - title = 'EFBMuMuXFex - VtxMass of D0 in B_{c} ; VtxMass [GeV] ; # Candidates', - xbins = 100, xmin = 1.4, xmax = 2.4 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuD0_InvMass_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of B_{c}->D0 ; InvMass [GeV] ; # Candidates', - xbins = 120, xmin = 5.1, xmax = 7.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuD0_VtxMass_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - VtxMass of B_{c}->D0 ; InvMass [GeV] ; # Candidates', - xbins = 120, xmin = 5.1, xmax = 7.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuD0_Chi2_D0', type = 'TH1F', - title = 'EFBMuMuXFex - D0 vertex chi2 in B_{c}; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuD0_Lxy_D0', type = 'TH1F', - title = 'EFBMuMuXFex - D0 vertex L_xy in B_{c}; L_xy ; # Candidates', - xbins = 100, xmin = -2.5, xmax = 2.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuD0_pT_D0', type = 'TH1F', - title = 'EFBMuMuXFex - pT(D0); pT(D0) ; # Candidates', - xbins = 100, xmin = 1.5, xmax = 51.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuD0_pT_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - pT(Bc to D0); pT(Bc to D0) ; # Candidates', - xbins = 100, xmin = 7.5, xmax = 57.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuD0_Chi2_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - B_{c}->D0 vertex chi2 ; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - - - -class EFBMuMuXFexOnlineMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="EFBMuMuXFexOnlineMonitoring"): - super(EFBMuMuXFexOnlineMonitoring, self).__init__(name) - self.defineTarget("Online") - # General - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'EFBMuMuXFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'nTriedCombinations', type = 'TH1F', - title = 'EFBMuMuXFex - Number of track combinations tried ; # combinations ; # Events', - xbins = 1000, xmin = 0., xmax = 100000. ) ] - #self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - #title = 'L2BMuMuXFex - Reached steps - acceptance ; ; # Events / Candidates', - #xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - #labels = ACCEPTANCE_labels ) ] - ## Timing - #self.Histograms += [ defineHistogram ( 'TotalRunTime', type = 'TH1F', - #title = 'EFBMuMuXFex - Total processing time ; t_{tot} [ms] ; # Events', - #xbins = 100, xmin = 0., xmax = 50. ) ] - #self.Histograms += [ defineHistogram ( 'VertexingTime', type = 'TH1F', - #title = 'EFBMuMuXFex - Vertex fit processing time ; t_{vtx} [ms] ; # Events', - #xbins = 100, xmin = 0., xmax = 50. ) ] - #self.Histograms += [ defineHistogram ( 'TotalRunTime, VertexingTime', type = 'TH2F', - #title = 'EFBMuMuXFex - Total vs. vertex fit processing time ; t_{tot} [ms] ; t_{vtx} [ms] ; # Events', - #xbins = 100, xmin = 0., xmax = 50., - #ybins = 100, ymin = 0., ymax = 50. ) ] - # RoIs - self.Histograms += [ defineHistogram ( 'RoI_RoI1Eta, RoI_RoI1Phi', type = 'TH2F', - title = 'EFBMuMuXFex - ROI1 direction ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'RoI_RoI2Eta, RoI_RoI2Phi', type = 'TH2F', - title = 'EFBMuMuXFex - ROI2 direction ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'RoI_dEtaRoI, RoI_dPhiRoI', type = 'TH2F', - title = 'EFBMuMuXFex - ROIs direction difference ; d#eta ; d#phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - # Muons - self.Histograms += [ defineHistogram ( 'DiMu_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of muons in RoIs; n(#mu) ; # Events', - xbins = 10, xmin = -0.5, xmax = 10-0.5 ) ] - self.Histograms += [ defineHistogram ( 'DiMu_Pt_Mu1', type = 'TH1F', - title = 'EFBMuMuXFex - Positive muons p_{T} (no vertexing); p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'DiMu_Pt_Mu2', type = 'TH1F', - title = 'EFBMuMuXFex - Negative muons p_{T} (no vertexing); p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'DiMu_pTsumMuMu', type = 'TH1F', - title = 'EFBMuMuXFex - sum of two muons p_{T} (no vertexing); p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'DiMu_Eta_Mu1, DiMu_Phi_Mu1', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of muon1 tracks (no vertexing); #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'DiMu_Eta_Mu2, DiMu_Phi_Mu2', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of muon2 tracks (no vertexing); #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'DiMu_dEtaMuMu, DiMu_dPhiMuMu', type = 'TH2F', - title = 'EFBMuMuXFex - dEta vs. dPhi between muon tracks (no vertexing); d#eta ; d#phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'DiMu_InvMassMuMu, DiMu_VtxMassMuMu', type = 'TH2F', - title = 'EFBMuMuXFex - InvMass vs. VtxMass of muon pair ; InvMass [GeV] ; VtxMass [GeV] ; # Events', - xbins = 80, xmin = 0., xmax = 20., - ybins = 80, ymin = 0., ymax = 20. ) ] - self.Histograms += [ defineHistogram ( 'DiMu_InvMassMuMu', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of muon pair ; InvMass [GeV] ; # Events', - xbins = 100, xmin = 0., xmax = 10. ) ] - self.Histograms += [ defineHistogram ( 'DiMu_Chi2MuMu', type = 'TH1F', - title = 'EFBMuMuXFex - dimuon vertex chi2 ; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - # Tracks - self.Histograms += [ defineHistogram ( 'Tracks_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of tracks in event ; n(trks) ; # Events', - xbins = 200, xmin = -0.5, xmax = 200-0.5 ) ] - self.Histograms += [ defineHistogram ( 'Tracks_Eta, Tracks_Phi', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of all tracks ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Tracks_Pt', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of all tracks; p_{T} [GeV] ; # Events', - xbins = 100, xmin = 0., xmax = 100. ) ] - # B+ - self.Histograms += [ defineHistogram ( 'BMuMuK_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of B^{+} candidates in event ; n(B^{+}) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - self.Histograms += [ defineHistogram ( 'BMuMuK_Pt_K', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of K in B^{+} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BMuMuK_Eta_K, BMuMuK_Phi_K', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of K in B^{+} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - #self.Histograms += [ defineHistogram ( 'BMuMuK_InvMass_B, BMuMuK_VtxMass_B', type = 'TH2F', - #title = 'EFBMuMuXFex - InvMass vs. VtxMass of B^{+} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 60, xmin = 4., xmax = 7., - #ybins = 60, ymin = 4., ymax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BMuMuK_InvMass_B', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of B^{+} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BMuMuK_Chi2_B', type = 'TH1F', - title = 'EFBMuMuXFex - B^{+} vertex chi2 ; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - # Bd - self.Histograms += [ defineHistogram ( 'BdMuMuKs_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of B_{d} candidates in event ; n(B_{d}) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - self.Histograms += [ defineHistogram ( 'BdMuMuKs_Pt_K', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of K in B_{d} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BdMuMuKs_Eta_K, BdMuMuKs_Phi_K', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of K in B_{d} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BdMuMuKs_Pt_Pi', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of #pi in B_{d} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BdMuMuKs_Eta_Pi, BdMuMuKs_Phi_Pi', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of #pi in B_{d} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - #self.Histograms += [ defineHistogram ( 'BdMuMuKs_InvMass_Kstar, BdMuMuKs_VtxMass_Kstar', type = 'TH2F', - #title = 'EFBMuMuXFex - InvMass vs. VtxMass of K^{*} in B_{d} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 60, xmin = 4., xmax = 7., - #ybins = 60, ymin = 4., ymax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BdMuMuKs_InvMass_Kstar', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of K^{*} in B_{d} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 0.5, xmax = 2. ) ] - #self.Histograms += [ defineHistogram ( 'BdMuMuKs_InvMass_Bd, BdMuMuKs_VtxMass_Bd', type = 'TH2F', - #title = 'EFBMuMuXFex - InvMass vs. VtxMass of B_{d} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 60, xmin = 4., xmax = 7., - #ybins = 60, ymin = 4., ymax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BdMuMuKs_InvMass_Bd', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of B_{d} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BdMuMuKs_Chi2_Kstar', type = 'TH1F', - title = 'EFBMuMuXFex - K^{*} vertex chi2 in B_{d}; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - self.Histograms += [ defineHistogram ( 'BdMuMuKs_Chi2_Bd', type = 'TH1F', - title = 'EFBMuMuXFex - B_{d} vertex chi2 ; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - # Bs - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of B_{s} candidates in event ; n(B_{s}) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_Pt_K1', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of first K in B_{s} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_Eta_K1, BsMuMuPhi_Phi_K1', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of first K in B_{s} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_Pt_K2', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of second K in B_{s} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_Eta_K2, BsMuMuPhi_Phi_K2', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of second K in B_{s} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - #self.Histograms += [ defineHistogram ( 'BsMuMuPhi_InvMass_Phi1020, BsMuMuPhi_VtxMass_Phi1020', type = 'TH2F', - #title = 'EFBMuMuXFex - InvMass vs. VtxMass of #phi(1020) in B_{s} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 60, xmin = 4., xmax = 7., - #ybins = 60, ymin = 4., ymax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_InvMass_Phi1020', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of #phi(1020) in B_{s} ; InvMass [GeV] ; # Candidates', - xbins = 200, xmin = 0.9, xmax = 1.3 ) ] - #self.Histograms += [ defineHistogram ( 'BsMuMuPhi_InvMass_Bs, BsMuMuPhi_VtxMass_Bs', type = 'TH2F', - #title = 'EFBMuMuXFex - InvMass vs. VtxMass of B_{s} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 60, xmin = 4., xmax = 7., - #ybins = 60, ymin = 4., ymax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_InvMass_Bs', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of B_{s} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_Chi2_Phi1020', type = 'TH1F', - title = 'EFBMuMuXFex - #phi(1020) vertex chi2 in B_{s}; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_Chi2_Bs', type = 'TH1F', - title = 'EFBMuMuXFex - B_{s} vertex chi2 ; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - # Lb - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of #Lambda_{b} candidates in event ; n(#Lambda_{b}) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_Pt_P', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of proton in #Lambda_{b} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_Eta_P, LbMuMuLambda_Phi_P', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of proton in #Lambda_{b} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_Pt_Pi', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of #pi in #Lambda_{b} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_Eta_Pi, LbMuMuLambda_Phi_Pi', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of #pi in #Lambda_{b} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - #self.Histograms += [ defineHistogram ( 'LbMuMuLambda_InvMass_Lambda, LbMuMuLambda_VtxMass_Lambda', type = 'TH2F', - #title = 'EFBMuMuXFex - InvMass vs. VtxMass of #Lambda in #Lambda_{b} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 60, xmin = 4., xmax = 7., - #ybins = 60, ymin = 4., ymax = 7. ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_InvMass_Lambda', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of #Lambda in #Lambda_{b} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 1.0, xmax = 1.6 ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_VtxMass_Lambda', type = 'TH1F', - title = 'EFBMuMuXFex - VtxMass of #Lambda in #Lambda_{b} ; VtxMass [GeV] ; # Candidates', - xbins = 60, xmin = 1.0, xmax = 1.6 ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_FinMass_Lambda', type = 'TH1F', - title = 'EFBMuMuXFex - FinMass of #Lambda in #Lambda_{b} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 1.0, xmax = 1.6 ) ] - #self.Histograms += [ defineHistogram ( 'LbMuMuLambda_InvMass_Lb, LbMuMuLambda_VtxMass_Lb', type = 'TH2F', - #title = 'EFBMuMuXFex - InvMass vs. VtxMass of #Lambda_{b} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 60, xmin = 4., xmax = 7., - #ybins = 60, ymin = 4., ymax = 7. ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_InvMass_Lb', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of #Lambda_{b} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 3.6, xmax = 6.6 ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_VtxMass_Lb', type = 'TH1F', - title = 'EFBMuMuXFex - VtxMass of #Lambda_{b} ; VtxMass [GeV] ; # Candidates', - xbins = 60, xmin = 3.6, xmax = 6.6 ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_FinMass_Lb', type = 'TH1F', - title = 'EFBMuMuXFex - FinMass of #Lambda_{b} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 3.6, xmax = 6.6 ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_Chi2_Lambda', type = 'TH1F', - title = 'EFBMuMuXFex - #Lambda vertex chi2 in #Lambda_{b}; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_Chi2_Lb', type = 'TH1F', - title = 'EFBMuMuXFex - #Lambda_{b} vertex chi2 ; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_Lxy_Lambda', type = 'TH1F', - title = 'EFBMuMuXFex - Lambda vertex L_xy in Lb; L_xy ; # Candidates', - xbins = 100, xmin = -5., xmax = 95. ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_pT_Lambda', type = 'TH1F', - title = 'EFBMuMuXFex - pT(Lambda); pT(Lambda) ; # Candidates', - xbins = 100, xmin = 1.0, xmax = 51. ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_pT_Lb', type = 'TH1F', - title = 'EFBMuMuXFex - pT(Lb); pT(Lb) ; # Candidates', - xbins = 100, xmin = 7.5, xmax = 57.5 ) ] - # Bc -> Ds - self.Histograms += [ defineHistogram ( 'BcMuMuDs_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of B_{c} candidates in event ; n(B_{c}) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - # Bc -> Dplus - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of B_{c}->D+ candidates in event ; n(B_{c}->D+) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - # Bc -> Dstar - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of B_{c}->D* candidates in event ; n(B_{c}->D*) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - # Bc -> D0 (Dstar with lost pi_s) - self.Histograms += [ defineHistogram ( 'BcMuMuD0_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of B_{c}->D0 candidates in event ; n(B_{c}->D0) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - - -class EFBMuMuXFexOnlineMonitoring_allModes(EFBMuMuXFexOnlineMonitoring): - def __init__ (self, name="EFBMuMuXFexOnlineMonitoring_allModes"): - super(EFBMuMuXFexOnlineMonitoring_allModes, self).__init__(name) - self.defineTarget("Online") - # All general, B+, Bd, Bs, Lb histograms already there, and BcMuMuDs_n - - # Bc - #self.Histograms += [ defineHistogram ( 'BcMuMuDs_n', type = 'TH1F', - # title = 'EFBMuMuXFex - number of B_{c} candidates in event ; n(B_{c}) ; # Events', - # xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_Pt_K1', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of first K in B_{c} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_Eta_K1, BcMuMuDs_Phi_K1', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of first K in B_{c} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_Pt_K2', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of second K in B_{c} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_Eta_K2, BcMuMuDs_Phi_K2', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of second K in B_{c} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_Pt_pi', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of #pi in B_{c} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_Eta_pi, BcMuMuDs_Phi_pi', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of #pi in B_{c} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMass_PhiDs', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of #phi in B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 200, xmin = 0.9, xmax = 1.3 ) ] - #self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMass_Ds, BcMuMuDs_VtxMass_Ds', type = 'TH2F', - #title = 'EFBMuMuXFex - InvMass vs. VtxMass of D_{s} in B_{c} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 60, xmin = 1.4, xmax = 2.6, - #ybins = 60, ymin = 1.4, ymax = 2.6 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMass_Ds', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of D_{s} in B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 1.4, xmax = 2.6 ) ] - #self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMass_Bc, BcMuMuDs_VtxMass_Bc', type = 'TH2F', - #title = 'EFBMuMuXFex - InvMass vs. VtxMass of B_{c} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 120, xmin = 1.5, xmax = 7.5, - #ybins = 120, ymin = 1.5, ymax = 7.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMass_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 120, xmin = 1.5, xmax = 7.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_Chi2_Ds', type = 'TH1F', - title = 'EFBMuMuXFex - D_{s} vertex chi2 in B_{c}; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_Chi2_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - B_{c} vertex chi2 ; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - - -class EFBMuMuXFexOnlineMonitoring_BcMuMuDs(TrigGenericMonitoringToolConfig): - def __init__ (self, name="EFBMuMuXFexOnlineMonitoring_BcMuMuDs"): - super(EFBMuMuXFexOnlineMonitoring_BcMuMuDs, self).__init__(name) - self.defineTarget("Online") - # General - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'EFBMuMuXFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'nTriedCombinations', type = 'TH1F', - title = 'EFBMuMuXFex - Number of track combinations tried ; # combinations ; # Events', - xbins = 1000, xmin = 0., xmax = 100000. ) ] - #self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - #title = 'L2BMuMuXFex - Reached steps - acceptance ; ; # Events / Candidates', - #xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - #labels = ACCEPTANCE_labels ) ] - # RoIs - self.Histograms += [ defineHistogram ( 'RoI_RoI1Eta, RoI_RoI1Phi', type = 'TH2F', - title = 'EFBMuMuXFex - ROI1 direction ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'RoI_RoI2Eta, RoI_RoI2Phi', type = 'TH2F', - title = 'EFBMuMuXFex - ROI2 direction ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'RoI_dEtaRoI, RoI_dPhiRoI', type = 'TH2F', - title = 'EFBMuMuXFex - ROIs direction difference ; d#eta ; d#phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - # Muons - self.Histograms += [ defineHistogram ( 'DiMu_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of muons in RoIs; n(#mu) ; # Events', - xbins = 10, xmin = -0.5, xmax = 10-0.5 ) ] - self.Histograms += [ defineHistogram ( 'DiMu_Pt_Mu1', type = 'TH1F', - title = 'EFBMuMuXFex - Positive muons p_{T} (no vertexing); p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'DiMu_Pt_Mu2', type = 'TH1F', - title = 'EFBMuMuXFex - Negative muons p_{T} (no vertexing); p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'DiMu_pTsumMuMu', type = 'TH1F', - title = 'EFBMuMuXFex - sum of two muons p_{T} (no vertexing); p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'DiMu_Eta_Mu1, DiMu_Phi_Mu1', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of muon1 tracks (no vertexing); #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'DiMu_Eta_Mu2, DiMu_Phi_Mu2', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of muon2 tracks (no vertexing); #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'DiMu_dEtaMuMu, DiMu_dPhiMuMu', type = 'TH2F', - title = 'EFBMuMuXFex - dEta vs. dPhi between muon tracks (no vertexing); d#eta ; d#phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'DiMu_InvMassMuMu, DiMu_VtxMassMuMu', type = 'TH2F', - title = 'EFBMuMuXFex - InvMass vs. VtxMass of muon pair ; InvMass [GeV] ; VtxMass [GeV] ; # Events', - xbins = 80, xmin = 0., xmax = 20., - ybins = 80, ymin = 0., ymax = 20. ) ] - self.Histograms += [ defineHistogram ( 'DiMu_InvMassMuMu', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of muon pair ; InvMass [GeV] ; # Events', - xbins = 100, xmin = 0., xmax = 10. ) ] - self.Histograms += [ defineHistogram ( 'DiMu_Chi2MuMu', type = 'TH1F', - title = 'EFBMuMuXFex - dimuon vertex chi2 ; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - # Tracks - self.Histograms += [ defineHistogram ( 'Tracks_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of tracks in event ; n(trks) ; # Events', - xbins = 200, xmin = -0.5, xmax = 200-0.5 ) ] - self.Histograms += [ defineHistogram ( 'Tracks_Eta, Tracks_Phi', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of all tracks ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Tracks_Pt', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of all tracks; p_{T} [GeV] ; # Events', - xbins = 100, xmin = 0., xmax = 100. ) ] - # B+ - self.Histograms += [ defineHistogram ( 'BMuMuK_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of B^{+} candidates in event ; n(B^{+}) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - # Bd - self.Histograms += [ defineHistogram ( 'BdMuMuKs_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of B_{d} candidates in event ; n(B_{d}) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - # Bs - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of B_{s} candidates in event ; n(B_{s}) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - # Lb - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of #Lambda_{b} candidates in event ; n(#Lambda_{b}) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - # Bc -> Ds - self.Histograms += [ defineHistogram ( 'BcMuMuDs_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of B_{c} candidates in event ; n(B_{c}) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_Pt_K1', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of first K in B_{c} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_Eta_K1, BcMuMuDs_Phi_K1', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of first K in B_{c} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_Pt_K2', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of second K in B_{c} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_Eta_K2, BcMuMuDs_Phi_K2', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of second K in B_{c} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_Pt_pi', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of #pi in B_{c} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_Eta_pi, BcMuMuDs_Phi_pi', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of #pi in B_{c} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMass_PhiDs', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of #phi in B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 200, xmin = 0.9, xmax = 1.3 ) ] - #self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMass_Ds, BcMuMuDs_VtxMass_Ds', type = 'TH2F', - #title = 'EFBMuMuXFex - InvMass vs. VtxMass of D_{s} in B_{c} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 60, xmin = 1.4, xmax = 2.6, - #ybins = 60, ymin = 1.4, ymax = 2.6 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMass_Ds', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of D_{s} in B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 1.4, xmax = 2.6 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_VtxMass_Ds', type = 'TH1F', - title = 'EFBMuMuXFex - VtxMass of D_{s} in B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 1.4, xmax = 2.6 ) ] - #self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMass_Bc, BcMuMuDs_VtxMass_Bc', type = 'TH2F', - #title = 'EFBMuMuXFex - InvMass vs. VtxMass of B_{c} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 120, xmin = 1.5, xmax = 7.5, - #ybins = 120, ymin = 1.5, ymax = 7.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMass_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of B_{c} ; InvMass [GeV] ; # Candidates', - #xbins = 120, xmin = 1.5, xmax = 7.5 ) ] - xbins = 120, xmin = 5.1, xmax = 7.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_VtxMass_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - VtxMass of B_{c} ; InvMass [GeV] ; # Candidates', - #xbins = 120, xmin = 1.5, xmax = 7.5 ) ] - xbins = 120, xmin = 5.1, xmax = 7.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_Chi2_Ds', type = 'TH1F', - title = 'EFBMuMuXFex - D_{s} vertex chi2 in B_{c}; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_Lxy_Ds', type = 'TH1F', - title = 'EFBMuMuXFex - Ds vertex L_xy in B_{c}; L_xy ; # Candidates', - xbins = 100, xmin = -2.5, xmax = 2.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_pT_Ds', type = 'TH1F', - title = 'EFBMuMuXFex - pT(Ds); pT(Ds) ; # Candidates', - xbins = 100, xmin = 1.5, xmax = 51.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_pT_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - pT(Bc); pT(Bc) ; # Candidates', - xbins = 100, xmin = 7.5, xmax = 57.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_Chi2_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - B_{c} vertex chi2 ; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - # Bc -> Dplus - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of B_{c}->D+ candidates in event ; n(B_{c}->D+) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_Pt_K', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of K in B_{c}->D+ ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_Eta_K, BcMuMuDplus_Phi_K', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of K in B_{c}->D+ ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_Pt_pi1', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of first #pi in B_{c}->D+ ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_Eta_pi1, BcMuMuDplus_Phi_pi1', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of first #pi in B_{c}->D+ ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_Pt_pi2', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of second #pi in B_{c}->D+ ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_Eta_pi2, BcMuMuDplus_Phi_pi2', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of second #pi in B_{c}->D+ ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_InvMass_Dplus', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of D+ in B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 100, xmin = 1.4, xmax = 2.4 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_VtxMass_Dplus', type = 'TH1F', - title = 'EFBMuMuXFex - VtxMass of D+ in B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 100, xmin = 1.4, xmax = 2.4 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_InvMass_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of B_{c}->D+ ; InvMass [GeV] ; # Candidates', - xbins = 120, xmin = 5.1, xmax = 7.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_VtxMass_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - VtxMass of B_{c}->D+ ; InvMass [GeV] ; # Candidates', - xbins = 120, xmin = 5.1, xmax = 7.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_Chi2_Dplus', type = 'TH1F', - title = 'EFBMuMuXFex - D+ vertex chi2 in B_{c}; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_Lxy_Dplus', type = 'TH1F', - title = 'EFBMuMuXFex - D+ vertex L_xy in B_{c}; L_xy ; # Candidates', - xbins = 100, xmin = -2.5, xmax = 2.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_pT_Dplus', type = 'TH1F', - title = 'EFBMuMuXFex - pT(Dplus); pT(Dplus) ; # Candidates', - xbins = 100, xmin = 1.5, xmax = 51.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_pT_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - pT(Bc to D+); pT(Bc to D+) ; # Candidates', - xbins = 100, xmin = 7.5, xmax = 57.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_Chi2_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - B_{c}->D+ vertex chi2 ; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - # Bc -> Dstar - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of B_{c}->D* candidates in event ; n(B_{c}->D*) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_Pt_K', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of K in B_{c}->D* ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_Eta_K, BcMuMuDstar_Phi_K', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of K in B_{c}->D* ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_Pt_pi', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of #pi in B_{c}->D* ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_Eta_pi, BcMuMuDstar_Phi_pi', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of #pi in B_{c}->D* ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_Pt_pis', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of #pi_{s} in B_{c}->D* ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_Eta_pis, BcMuMuDstar_Phi_pis', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of #pi_{s} in B_{c}->D* ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_InvMass_D0Dstar', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of D0(D*) in B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 100, xmin = 1.4, xmax = 2.4 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_VtxMass_D0Dstar', type = 'TH1F', - title = 'EFBMuMuXFex - VtxMass of D0(D*) in B_{c} ; VtxMass [GeV] ; # Candidates', - xbins = 100, xmin = 1.4, xmax = 2.4 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_DelMass_Dstar', type = 'TH1F', - title = 'EFBMuMuXFex - DelMass of D* in B_{c} ; DelMass [GeV] ; # Candidates', - xbins = 170, xmin = 0.130, xmax = 0.300 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_VtxDelMass_Dstar', type = 'TH1F', - title = 'EFBMuMuXFex - VtxDelMass of D* in B_{c} ; VtxDelMass [GeV] ; # Candidates', - xbins = 170, xmin = 0.130, xmax = 0.300 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_InvMass_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of B_{c}->D* ; InvMass [GeV] ; # Candidates', - xbins = 120, xmin = 5.1, xmax = 7.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_VtxMass_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - VtxMass of B_{c}->D* ; InvMass [GeV] ; # Candidates', - xbins = 120, xmin = 5.1, xmax = 7.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_Chi2_D0Dstar', type = 'TH1F', - title = 'EFBMuMuXFex - D0(D*) vertex chi2 in B_{c}; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_Lxy_D0Dstar', type = 'TH1F', - title = 'EFBMuMuXFex - D0(D*) vertex L_xy in B_{c}; L_xy ; # Candidates', - xbins = 100, xmin = -2.5, xmax = 2.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_pT_Dstar', type = 'TH1F', - title = 'EFBMuMuXFex - pT(Dstar); pT(Dstar) ; # Candidates', - xbins = 100, xmin = 1.5, xmax = 51.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_pT_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - pT(Bc to Dstar); pT(Bc to Dstar) ; # Candidates', - xbins = 100, xmin = 7.5, xmax = 57.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_Chi2_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - B_{c}->D* vertex chi2 ; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - # Bc -> D0 (Dstar with lost pi_s) - self.Histograms += [ defineHistogram ( 'BcMuMuD0_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of B_{c}->D0 candidates in event ; n(B_{c}->D0) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuD0_Pt_K', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of K in B_{c}->D0 ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuD0_Eta_K, BcMuMuD0_Phi_K', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of K in B_{c}->D0 ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuD0_Pt_pi', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of #pi in B_{c}->D0 ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuD0_Eta_pi, BcMuMuD0_Phi_pi', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of #pi in B_{c}->D0 ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuD0_InvMass_D0', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of D0 in B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 100, xmin = 1.4, xmax = 2.4 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuD0_VtxMass_D0', type = 'TH1F', - title = 'EFBMuMuXFex - VtxMass of D0 in B_{c} ; VtxMass [GeV] ; # Candidates', - xbins = 100, xmin = 1.4, xmax = 2.4 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuD0_InvMass_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of B_{c}->D0 ; InvMass [GeV] ; # Candidates', - xbins = 120, xmin = 5.1, xmax = 7.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuD0_VtxMass_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - VtxMass of B_{c}->D0 ; InvMass [GeV] ; # Candidates', - xbins = 120, xmin = 5.1, xmax = 7.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuD0_Chi2_D0', type = 'TH1F', - title = 'EFBMuMuXFex - D0 vertex chi2 in B_{c}; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuD0_Lxy_D0', type = 'TH1F', - title = 'EFBMuMuXFex - D0 vertex L_xy in B_{c}; L_xy ; # Candidates', - xbins = 100, xmin = -2.5, xmax = 2.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuD0_pT_D0', type = 'TH1F', - title = 'EFBMuMuXFex - pT(D0); pT(D0) ; # Candidates', - xbins = 100, xmin = 1.5, xmax = 51.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuD0_pT_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - pT(Bc to D0); pT(Bc to D0) ; # Candidates', - xbins = 100, xmin = 7.5, xmax = 57.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuD0_Chi2_Bc', type = 'TH1F', - title = 'EFBMuMuXFex - B_{c}->D0 vertex chi2 ; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - - -class EFBMuMuXFexOnlineMonitoring_BpMuMuKp(TrigGenericMonitoringToolConfig): - def __init__ (self, name="EFBMuMuXFexOnlineMonitoring_BpMuMuKp"): - super(EFBMuMuXFexOnlineMonitoring_BpMuMuKp, self).__init__(name) - self.defineTarget("Online") - # General - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'EFBMuMuXFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'nTriedCombinations', type = 'TH1F', - title = 'EFBMuMuXFex - Number of track combinations tried ; # combinations ; # Events', - xbins = 1000, xmin = 0., xmax = 100000. ) ] - #self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - #title = 'L2BMuMuXFex - Reached steps - acceptance ; ; # Events / Candidates', - #xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - #labels = ACCEPTANCE_labels ) ] - # RoIs - self.Histograms += [ defineHistogram ( 'RoI_RoI1Eta, RoI_RoI1Phi', type = 'TH2F', - title = 'EFBMuMuXFex - ROI1 direction ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'RoI_RoI2Eta, RoI_RoI2Phi', type = 'TH2F', - title = 'EFBMuMuXFex - ROI2 direction ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'RoI_dEtaRoI, RoI_dPhiRoI', type = 'TH2F', - title = 'EFBMuMuXFex - ROIs direction difference ; d#eta ; d#phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - # Muons - self.Histograms += [ defineHistogram ( 'DiMu_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of muons in RoIs; n(#mu) ; # Events', - xbins = 10, xmin = -0.5, xmax = 10-0.5 ) ] - self.Histograms += [ defineHistogram ( 'DiMu_Pt_Mu1', type = 'TH1F', - title = 'EFBMuMuXFex - Positive muons p_{T} (no vertexing); p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'DiMu_Pt_Mu2', type = 'TH1F', - title = 'EFBMuMuXFex - Negative muons p_{T} (no vertexing); p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'DiMu_pTsumMuMu', type = 'TH1F', - title = 'EFBMuMuXFex - sum of two muons p_{T} (no vertexing); p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'DiMu_Eta_Mu1, DiMu_Phi_Mu1', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of muon1 tracks (no vertexing); #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'DiMu_Eta_Mu2, DiMu_Phi_Mu2', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of muon2 tracks (no vertexing); #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'DiMu_dEtaMuMu, DiMu_dPhiMuMu', type = 'TH2F', - title = 'EFBMuMuXFex - dEta vs. dPhi between muon tracks (no vertexing); d#eta ; d#phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'DiMu_InvMassMuMu, DiMu_VtxMassMuMu', type = 'TH2F', - title = 'EFBMuMuXFex - InvMass vs. VtxMass of muon pair ; InvMass [GeV] ; VtxMass [GeV] ; # Events', - xbins = 80, xmin = 0., xmax = 20., - ybins = 80, ymin = 0., ymax = 20. ) ] - self.Histograms += [ defineHistogram ( 'DiMu_InvMassMuMu', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of muon pair ; InvMass [GeV] ; # Events', - xbins = 100, xmin = 0., xmax = 10. ) ] - self.Histograms += [ defineHistogram ( 'DiMu_Chi2MuMu', type = 'TH1F', - title = 'EFBMuMuXFex - dimuon vertex chi2 ; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - # Tracks - self.Histograms += [ defineHistogram ( 'Tracks_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of tracks in event ; n(trks) ; # Events', - xbins = 200, xmin = -0.5, xmax = 200-0.5 ) ] - self.Histograms += [ defineHistogram ( 'Tracks_Eta, Tracks_Phi', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of all tracks ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Tracks_Pt', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of all tracks; p_{T} [GeV] ; # Events', - xbins = 100, xmin = 0., xmax = 100. ) ] - # B+ - self.Histograms += [ defineHistogram ( 'BMuMuK_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of B^{+} candidates in event ; n(B^{+}) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - self.Histograms += [ defineHistogram ( 'BMuMuK_Pt_K', type = 'TH1F', - title = 'EFBMuMuXFex - p_{T} of K in B^{+} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'BMuMuK_Eta_K, BMuMuK_Phi_K', type = 'TH2F', - title = 'EFBMuMuXFex - Eta vs. phi of K in B^{+} ; #eta ; #phi ; # Candidates', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - #self.Histograms += [ defineHistogram ( 'BMuMuK_InvMass_B, BMuMuK_VtxMass_B', type = 'TH2F', - #title = 'EFBMuMuXFex - InvMass vs. VtxMass of B^{+} ; InvMass [GeV] ; VtxMass [GeV] ; # Candidates', - #xbins = 60, xmin = 4., xmax = 7., - #ybins = 60, ymin = 4., ymax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BMuMuK_InvMass_B', type = 'TH1F', - title = 'EFBMuMuXFex - InvMass of B^{+} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - self.Histograms += [ defineHistogram ( 'BMuMuK_Chi2_B', type = 'TH1F', - title = 'EFBMuMuXFex - B^{+} vertex chi2 ; #chi^{2} ; # Candidates', - xbins = 300, xmin = 0., xmax = 300. ) ] - # Bd - self.Histograms += [ defineHistogram ( 'BdMuMuKs_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of B_{d} candidates in event ; n(B_{d}) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - # Bs - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of B_{s} candidates in event ; n(B_{s}) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - # Lb - self.Histograms += [ defineHistogram ( 'LbMuMuLambda_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of #Lambda_{b} candidates in event ; n(#Lambda_{b}) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - # Bc -> Ds - self.Histograms += [ defineHistogram ( 'BcMuMuDs_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of B_{c} candidates in event ; n(B_{c}) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - # Bc -> Dplus - self.Histograms += [ defineHistogram ( 'BcMuMuDplus_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of B_{c}->D+ candidates in event ; n(B_{c}->D+) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - # Bc -> Dstar - self.Histograms += [ defineHistogram ( 'BcMuMuDstar_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of B_{c}->D* candidates in event ; n(B_{c}->D*) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] - # Bc -> D0 (Dstar with lost pi_s) - self.Histograms += [ defineHistogram ( 'BcMuMuD0_n', type = 'TH1F', - title = 'EFBMuMuXFex - number of B_{c}->D0 candidates in event ; n(B_{c}->D0) ; # Events', - xbins = 30, xmin = -0.5, xmax = 30-0.5 ) ] diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFBMuMuXHypoConfig.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFBMuMuXHypoConfig.py deleted file mode 100644 index 949f046e76ab4332153bed5ab2b3538beff97e1c..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFBMuMuXHypoConfig.py +++ /dev/null @@ -1,241 +0,0 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration - -# vim: tabstop=4:shiftwidth=4:expandtab -from TrigBphysHypo.TrigBphysHypoConf import TrigEFBMuMuXHypo - - -class EFBMuMuXHypo_1 (TrigEFBMuMuXHypo): - __slots__ = [] - def __init__(self, name = "EFBMuMuXHypo_1"): - super( TrigEFBMuMuXHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # decay modes flags - self.AcceptBplus = True - self.AcceptBd = True - self.AcceptBs = True - self.AcceptLb = True - self.AcceptBc = False - self.AcceptBcDplus = False - self.AcceptBcDstar = False - self.AcceptBcD0 = False - # mass cuts - # B+ - self.LowerBplusMassCut = 4400. - self.UpperBplusMassCut = 5800. - self.BplusChi2Cut = 50. - # Bd - self.LowerBdMassCut = 4600. - self.UpperBdMassCut = 5900. - self.BdChi2Cut = 60. - self.LowerKstarMassCut = 700. - self.UpperKstarMassCut = 1100. - self.KstarChi2Cut = 400. - # Bs - self.LowerBsMassCut = 4800. - self.UpperBsMassCut = 5800. - self.BsChi2Cut = 60. - self.LowerPhi1020MassCut = 940. - self.UpperPhi1020MassCut = 1100. - self.Phi1020Chi2Cut = 400. - # Lb - self.LowerLbMassCut = 5100. - self.UpperLbMassCut = 6100. - self.LbChi2Cut = 100. - self.LowerLambdaMassCut = 1040. - self.UpperLambdaMassCut = 1200. - self.LambdaChi2Cut = 400. - # Bc - self.LowerBcMassCut = 5450. - self.UpperBcMassCut = 7050. - self.BcChi2Cut = 120. - self.LowerDsMassCut = 1600. - self.UpperDsMassCut = 2400. - self.DsChi2Cut = 90. - # BcDplus - self.LowerBcDplusMassCut = 5450. - self.UpperBcDplusMassCut = 7050. - self.BcDplusChi2Cut = 180. - self.LowerDplusMassCut = 1500. - self.UpperDplusMassCut = 2300. - self.DplusChi2Cut = 90. - # BcDstar - self.LowerBcDstarMassCut = 5450. - self.UpperBcDstarMassCut = 7050. - self.BcDstarChi2Cut = 120. - self.LowerDstarMassCut = 1500. - self.UpperDstarMassCut = 2500. - self.DstarChi2Cut = 90. - # BcD0 - self.LowerBcD0MassCut = 5250. - self.UpperBcD0MassCut = 6911. - self.BcD0Chi2Cut = 120. - self.LowerD0MassCut = 1500. - self.UpperD0MassCut = 2300. - self.D0Chi2Cut = 90. - - -class EFBMuMuXHypo_allModes (EFBMuMuXHypo_1): - __slots__ = [] - def __init__(self, name = "EFBMuMuXHypo_allModes"): - EFBMuMuXHypo_1.__init__(self, name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # decay modes flags - self.AcceptBplus = True - self.AcceptBd = True - self.AcceptBs = True - self.AcceptLb = True - self.AcceptBc = True - -class EFBMuMuXHypo_allModes_tightBc (EFBMuMuXHypo_allModes): - __slots__ = [] - def __init__(self, name = "EFBMuMuXHypo_allModes_tightBc"): - EFBMuMuXHypo_allModes.__init__(self, name ) - - # Bc - self.LowerBcMassCut = 5450. - - -class EFBMuMuXHypo_BplusMuMuKplus (EFBMuMuXHypo_1): - __slots__ = [] - def __init__(self, name = "EFBMuMuXHypo_BplusMuMuKplus"): - EFBMuMuXHypo_1.__init__(self, name) - #super( TrigEFBMuMuXHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # decay modes flags - self.AcceptBplus = True - self.AcceptBd = False - self.AcceptBs = False - self.AcceptLb = False - self.AcceptBc = False - -class EFBMuMuXHypo_TauMuMuX (EFBMuMuXHypo_1): - __slots__ = [] - def __init__(self, name = "EFBMuMuXHypo_TauMuMuX"): - EFBMuMuXHypo_1.__init__(self, name) - #super( TrigEFBMuMuXHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # decay modes flags - self.AcceptBplus = True - self.LowerBplusMassCut = 700. - self.UpperBplusMassCut = 2700. - self.BplusChi2Cut = 100. - self.AcceptBd = False - self.AcceptBs = False - self.AcceptLb = False - self.AcceptBc = False - -class EFBMuMuXHypo_BdMuMuKstar (EFBMuMuXHypo_1): - __slots__ = [] - def __init__(self, name = "EFBMuMuXHypo_BdMuMuKstar"): - EFBMuMuXHypo_1.__init__(self, name) - #super( TrigEFBMuMuXHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # decay modes flags - self.AcceptBplus = False - self.AcceptBd = True - self.AcceptBs = False - self.AcceptLb = False - self.AcceptBc = False - -class EFBMuMuXHypo_BsMuMuPhi (EFBMuMuXHypo_1): - __slots__ = [] - def __init__(self, name = "EFBMuMuXHypo_BsMuMuPhi"): - EFBMuMuXHypo_1.__init__(self, name) - #super( TrigEFBMuMuXHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # decay modes flags - self.AcceptBplus = False - self.AcceptBd = False - self.AcceptBs = True - self.AcceptLb = False - self.AcceptBc = False - # Bs - self.LowerBsMassCut = 5000. - self.UpperBsMassCut = 5800. - self.BsChi2Cut = 60. - self.LowerPhi1020MassCut = 980. - self.UpperPhi1020MassCut = 1050. - self.Phi1020Chi2Cut = 400. - -class EFBMuMuXHypo_BsJpsiPhi (EFBMuMuXHypo_BsMuMuPhi): - __slots__ = [] - def __init__(self, name = "EFBMuMuXHypo_BsJpsiPhi"): - EFBMuMuXHypo_BsMuMuPhi.__init__(self, name) - #super( TrigEFBMuMuXHypo, self ).__init__( name ) - - # Currently identical to EFBMuMuXHypo_BsMuMuPhi, - # as we don't re-check the dimuon mass in HYPO - # decay modes flags - self.AcceptBplus = False - self.AcceptBd = False - self.AcceptBs = True - self.AcceptLb = False - self.AcceptBc = False - # Bs - self.LowerBsMassCut = 5000. - self.UpperBsMassCut = 5800. - self.BsChi2Cut = 60. - self.LowerPhi1020MassCut = 980. - self.UpperPhi1020MassCut = 1050. - self.Phi1020Chi2Cut = 400. - -class EFBMuMuXHypo_LbMuMuLambda (EFBMuMuXHypo_1): - __slots__ = [] - def __init__(self, name = "EFBMuMuXHypo_LbMuMuLambda"): - EFBMuMuXHypo_1.__init__(self, name) - #super( TrigEFBMuMuXHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # decay modes flags - self.AcceptBplus = False - self.AcceptBd = False - self.AcceptBs = False - self.AcceptLb = True - self.LowerLbMassCut = 3700. - self.UpperLbMassCut = 6600. - self.LbChi2Cut = 180. - self.LowerLambdaMassCut = 1040. - self.UpperLambdaMassCut = 1250. - self.LambdaChi2Cut = 90. - self.AcceptBc = False - -class EFBMuMuXHypo_BcMuMuDs (EFBMuMuXHypo_1): - __slots__ = [] - def __init__(self, name = "EFBMuMuXHypo_BcMuMuDs"): - EFBMuMuXHypo_1.__init__(self, name) - #super( TrigEFBMuMuXHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # decay modes flags - self.AcceptBplus = False - self.AcceptBd = False - self.AcceptBs = False - self.AcceptLb = False - self.AcceptBc = True - self.AcceptBcDplus = True - self.AcceptBcDstar = True - self.AcceptBcD0 = True - -class EFBMuMuXHypo_BcMuMuDs_tight (EFBMuMuXHypo_BcMuMuDs): - __slots__ = [] - def __init__(self, name = "EFBMuMuXHypo_BcMuMuDs_tight"): - EFBMuMuXHypo_BcMuMuDs.__init__(self, name) - #super( TrigEFBMuMuXHypo, self ).__init__( name ) - - # Bc - self.LowerBcMassCut = 5450. - diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFMultiMuFexConfig.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFMultiMuFexConfig.py deleted file mode 100644 index 4721ab21832ab0056c87966746a0251a1dee9470..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFMultiMuFexConfig.py +++ /dev/null @@ -1,153 +0,0 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration - -# include the python fragment to set up the default bphysics vertex fitter -from TrigBphysHypo import TrigBphysVertexingConfig # noqa: F401 - -from TrigBphysHypo.TrigBphysHypoConf import TrigEFMultiMuFex - -class EFMultiMuFex_DiMu (TrigEFMultiMuFex): - __slots__ = [] - def __init__(self, name = "EFMultiMuFex_DiMu"): - super( EFMultiMuFex_DiMu, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 100. - self.UpperMassCut = 14000. - self.MuonAlgo = "TrigMuSuperEF" - self.CheckNinputTE = False - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigEFMultiMuFexMonitoring import TrigEFMultiMuFexValidationMonitoring - validation = TrigEFMultiMuFexValidationMonitoring() - from TrigBphysHypo.TrigEFMultiMuFexMonitoring import TrigEFMultiMuFexOnlineMonitoring - online = TrigEFMultiMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class EFMultiMuFex_Jpsi (TrigEFMultiMuFex): - __slots__ = [] - def __init__(self, name = "EFMultiMuFex_Jpsi"): - super( EFMultiMuFex_Jpsi, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 2000. - self.UpperMassCut = 4800. - self.MuonAlgo = "TrigMuSuperEF" - self.CheckNinputTE = False - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigEFMultiMuFexMonitoring import TrigEFMultiMuFexValidationMonitoring - validation = TrigEFMultiMuFexValidationMonitoring() - from TrigBphysHypo.TrigEFMultiMuFexMonitoring import TrigEFMultiMuFexOnlineMonitoring - online = TrigEFMultiMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class EFMultiMuFex_Upsi (TrigEFMultiMuFex): - __slots__ = [] - def __init__(self, name = "EFMultiMuFex_Upsi"): - super( EFMultiMuFex_Upsi, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 7000. - self.UpperMassCut = 13000. - self.MuonAlgo = "TrigMuSuperEF" - self.CheckNinputTE = False - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigEFMultiMuFexMonitoring import TrigEFMultiMuFexValidationMonitoring - validation = TrigEFMultiMuFexValidationMonitoring() - from TrigBphysHypo.TrigEFMultiMuFexMonitoring import TrigEFMultiMuFexOnlineMonitoring - online = TrigEFMultiMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -# this clas is identical to Tau3. In future we want to use Tau3 for clarity, but keep this one a bit for backward compatibility -class EFMultiMuFex_Tau (TrigEFMultiMuFex): - __slots__ = [] - def __init__(self, name = "EFMultiMuFex_Tau"): - super( EFMultiMuFex_Tau, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 0. - self.UpperMassCut = 2900. - self.OppositeSign = False - self.MuonAlgo = "TrigMuSuperEF" - self.NMassMuon = 3 - self.CheckNinputTE = False - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigEFMultiMuFexMonitoring import TrigEFMultiMuFexValidationMonitoring - validation = TrigEFMultiMuFexValidationMonitoring() - from TrigBphysHypo.TrigEFMultiMuFexMonitoring import TrigEFMultiMuFexOnlineMonitoring - online = TrigEFMultiMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class EFMultiMuFex_Tau3 (TrigEFMultiMuFex): - __slots__ = [] - def __init__(self, name = "EFMultiMuFex_Tau3"): - super( EFMultiMuFex_Tau3, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 0. - self.UpperMassCut = 2900. - self.OppositeSign = False - self.MuonAlgo = "TrigMuSuperEF" - self.NMassMuon = 3 - self.CheckNinputTE = False - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigEFMultiMuFexMonitoring import TrigEFMultiMuFexValidationMonitoring - validation = TrigEFMultiMuFexValidationMonitoring() - from TrigBphysHypo.TrigEFMultiMuFexMonitoring import TrigEFMultiMuFexOnlineMonitoring - online = TrigEFMultiMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - - -class EFMultiMuFex_Tau2 (TrigEFMultiMuFex): - __slots__ = [] - def __init__(self, name = "EFMultiMuFex_Tau2"): - super( EFMultiMuFex_Tau2 , self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.OppositeSign = False - self.LowerMassCut = 0. - self.UpperMassCut = 2900. - self.MuonAlgo = "TrigMuSuperEF" - self.NMassMuon = 2 - self.CheckNinputTE = False - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigEFMultiMuFexMonitoring import TrigEFMultiMuFexValidationMonitoring - validation = TrigEFMultiMuFexValidationMonitoring() - from TrigBphysHypo.TrigEFMultiMuFexMonitoring import TrigEFMultiMuFexOnlineMonitoring - online = TrigEFMultiMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFMultiMuFexMonitoring.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFMultiMuFexMonitoring.py deleted file mode 100644 index 0d27d46e3f4bdede2c758d5f0719a9031a3fc593..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFMultiMuFexMonitoring.py +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig - -ERROR_labels = ' No_EventInfo : WrongNum_Input_TE : GetMuonFailed : BphysColl_Fails ' -ERROR_number = 4 - -ACCEPTANCE_labels = ' Input : Got_Muons : InvMass_Cut ' -ACCEPTANCE_number = 3 - -class TrigEFMultiMuFexValidationMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigEFMultiMuFexValidationMonitoring"): - super(TrigEFMultiMuFexValidationMonitoring, self).__init__(name) - self.defineTarget("Validation") - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'EFMultiMuFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - title = 'EFMultiMuFex - Reached steps - acceptance ; ; # Events / Candidates', - xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - labels = ACCEPTANCE_labels ) ] - self.Histograms += [ defineHistogram('pTMu1', type='TH1F', title="PtMu1 [GeV]", - xbins=50, xmin=0.0, xmax=50.0) ] - self.Histograms += [ defineHistogram('pTMu2', type='TH1F', title="PtMu2 [GeV]", - xbins=50, xmin=0.0, xmax=50.0) ] - self.Histograms += [ defineHistogram('MuMumass', type='TH1F', title="Inv.mass(mumu) [GeV]", - xbins=100, xmin=0., xmax=13.) ] - self.Histograms += [ defineHistogram('FitMass', type='TH1F', title=" FitBMass [GeV]", - xbins=100, xmin=0., xmax=13.) ] - self.Histograms += [ defineHistogram('VtxChi2', type='TH1F', title="Chi2 of vertex fit", - xbins=100, xmin=0., xmax=10.) ] - - - -class TrigEFMultiMuFexOnlineMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigEFMultiMuFexOnlineMonitoring"): - super(TrigEFMultiMuFexOnlineMonitoring, self).__init__(name) - self.defineTarget("Online") - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'EFMultiMuFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - title = 'EFMultiMuFex - Reached steps - acceptance ; ; # Events / Candidates', - xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - labels = ACCEPTANCE_labels ) ] - self.Histograms += [ defineHistogram('pTMu1', type='TH1F', title="PtMu1 [GeV]", - xbins=50, xmin=0.0, xmax=50.0) ] - self.Histograms += [ defineHistogram('pTMu2', type='TH1F', title="PtMu2 [GeV]", - xbins=50, xmin=0.0, xmax=50.0) ] - self.Histograms += [ defineHistogram('MuMumass', type='TH1F', title="Inv.mass(mumu) [GeV]", - xbins=100, xmin=0., xmax=13.) ] - self.Histograms += [ defineHistogram('FitMass', type='TH1F', title=" FitBMass [GeV]", - xbins=100, xmin=0., xmax=13.) ] - self.Histograms += [ defineHistogram('VtxChi2', type='TH1F', title="Chi2 of vertex fit", - xbins=100, xmin=0., xmax=10.) ] diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFMultiMuHypoConfig.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFMultiMuHypoConfig.py deleted file mode 100644 index 0869e600532607e2201c786326efb99a874b58da..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFMultiMuHypoConfig.py +++ /dev/null @@ -1,299 +0,0 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration - -from TrigBphysHypo.TrigBphysHypoConf import TrigEFMultiMuHypo - -from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig - -class TrigEFMultiMuHypoValidationMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigEFMultiMuHypoValidationMonitoring"): - super(TrigEFMultiMuHypoValidationMonitoring, self).__init__(name) - self.defineTarget("Validation") -# self.defineTarget("Never") - self.Histograms += [ defineHistogram('CutCounter', type='TH1F', title= "EF cuts counter", xbins=8, xmin=-1.5, xmax=6.5) ] - self.Histograms += [ defineHistogram('MuMumass', type='TH1F', title="Inv.mass(mumu) [GeV]", - xbins=100, xmin=0., xmax=13.0) ] - self.Histograms += [ defineHistogram('FitChi2', type='TH1F', title="vertex chi2 (Nmu) ", - xbins=50, xmin=0., xmax=50.0) ] - -class TrigEFMultiMuHypoOnlineMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigEFMultiMuHypoOnlineMonitoring"): - super(TrigEFMultiMuHypoOnlineMonitoring, self).__init__(name) - self.defineTarget("Online") - self.Histograms += [ defineHistogram('CutCounter', type='TH1F', title= "EFMultiMu cuts counter", xbins=8, xmin=-1.5, xmax=6.5) ] - self.Histograms += [ defineHistogram('MuMumass', type='TH1F', title="EFMultiMu Inv.mass(mumu) [GeV]", - xbins=130, xmin=0., xmax=13.0) ] - self.Histograms += [ defineHistogram('FitChi2', type='TH1F', title="vertex chi2 (Nmu) ", - xbins=50, xmin=0., xmax=50.0) ] - -class EFMultiMuHypo_DiMu (TrigEFMultiMuHypo): - __slots__ = [] - def __init__(self, name = "EFMultiMuHypo_DiMu"): - super( EFMultiMuHypo_DiMu, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF Bmumu cuts - self.LowerMassCut = 1500. - self.UpperMassCut = 14000. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFMultiMuHypoValidationMonitoring() - online = TrigEFMultiMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFMultiMuHypo_DiMu2700 (TrigEFMultiMuHypo): - __slots__ = [] - def __init__(self, name = "EFMultiMuHypo_DiMu2700"): - super( EFMultiMuHypo_DiMu2700, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # - self.OppositeSign = True - self.LowerMassCut = 100. - self.UpperMassCut = 2700. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFMultiMuHypoValidationMonitoring() - online = TrigEFMultiMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFMultiMuHypo_DiMu6000 (TrigEFMultiMuHypo): - __slots__ = [] - def __init__(self, name = "EFMultiMuHypo_DiMu6000"): - super( EFMultiMuHypo_DiMu6000, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # - self.OppositeSign = True - self.LowerMassCut = 100. - self.UpperMassCut = 6000. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFMultiMuHypoValidationMonitoring() - online = TrigEFMultiMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFMultiMuHypo_DiMu_noCut (EFMultiMuHypo_DiMu): - __slots__ = [] - def __init__(self, name = "EFMultiMuHypo_DiMu_noCut"): - super( EFMultiMuHypo_DiMu_noCut, self ).__init__( name ) - self.ApplyChi2Cut = False - self.ApplyUpperMassCut = False - self.LowerMassCut = 0. - -class EFMultiMuHypo_DiMu_noVtx (EFMultiMuHypo_DiMu): - __slots__ = [] - def __init__(self, name = "EFMultiMuHypo_DiMu_noVtx"): - super( EFMultiMuHypo_DiMu_noVtx, self ).__init__( name ) - self.ApplyChi2Cut = False - self.ApplyUpperMassCut = False - -class EFMultiMuHypo_Vtx20 (TrigEFMultiMuHypo): - __slots__ = [] - def __init__(self, name = "EFMultiMuHypo_Vtx20"): - super( EFMultiMuHypo_Vtx20, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - self.LowerMassCut = -1. - self.UpperMassCut = 1e+10 - self.ApplyUpperMassCut = False - self.ApplyChi2Cut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFMultiMuHypoValidationMonitoring() - online = TrigEFMultiMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFMultiMuHypo_Vtx60 (EFMultiMuHypo_Vtx20): - __slots__ = [] - def __init__(self, name = "EFMultiMuHypo_Vtx60"): - super( EFMultiMuHypo_Vtx60, self ).__init__( name ) - self.ApplyChi2Cut = True - self.Chi2VtxCut = 60. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFMultiMuHypoValidationMonitoring() - online = TrigEFMultiMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - - -class EFMultiMuHypo_BMeson (TrigEFMultiMuHypo): - __slots__ = [] - def __init__(self, name = "EFMultiMuHypo_BMeson"): - super( EFMultiMuHypo_BMeson, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF Bmumu cuts - self.LowerMassCut = 4000. # put some loose mass cuts - self.UpperMassCut = 8500. # OI 6500? - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 60. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFMultiMuHypoValidationMonitoring() - online = TrigEFMultiMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFMultiMuHypo_Bmumux (TrigEFMultiMuHypo): - __slots__ = [] - def __init__(self, name = "EFMultiMuHypo_BMeson"): - super( EFMultiMuHypo_Bmumux, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF Bmumu cuts - self.LowerMassCut = 100. # put some loose mass cuts - self.UpperMassCut = 6500. # OI 6500? - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFMultiMuHypoValidationMonitoring() - online = TrigEFMultiMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFMultiMuHypo_Jpsi (TrigEFMultiMuHypo): - __slots__ = [] - def __init__(self, name = "EFMultiMuHypo_Jpsi"): - super( EFMultiMuHypo_Jpsi, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF Bmumu cuts - self.LowerMassCut = 2500. - self.UpperMassCut = 4300. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFMultiMuHypoValidationMonitoring() - online = TrigEFMultiMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFMultiMuHypo_Upsi (TrigEFMultiMuHypo): - __slots__ = [] - def __init__(self, name = "EFMultiMuHypo_Upsi"): - super( EFMultiMuHypo_Upsi, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF Bmumu cuts - self.LowerMassCut = 8000. - self.UpperMassCut = 12000. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFMultiMuHypoValidationMonitoring() - online = TrigEFMultiMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFMultiMuHypo_2700 (TrigEFMultiMuHypo): - __slots__ = [] - def __init__(self, name = "EFMultiMuHypo_2700"): - super( EFMultiMuHypo_2700, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF bTau cuts - self.OppositeSign = False - self.ApplyUpperMassCut = True - self.LowerMassCut = 0. - self.UpperMassCut = 2700. - self.ApplyChi2Cut = True - self.Chi2VtxCut = 50. - self.bphysCollectionKey = "MultiTrkFex" - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFMultiMuHypoValidationMonitoring() - online = TrigEFMultiMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - -class EFMultiMuHypo_L26000 (TrigEFMultiMuHypo): - __slots__ = [] - def __init__(self, name = "EFMultiMuHypo_L26000"): - super( EFMultiMuHypo_L26000, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF bTau cuts - self.OppositeSign = False - self.ApplyUpperMassCut = True - self.LowerMassCut = 0. - self.UpperMassCut = 6000. - self.ApplyChi2Cut = True - self.Chi2VtxCut = 50. - self.bphysCollectionKey = "MultiTrkFex" - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFMultiMuHypoValidationMonitoring() - online = TrigEFMultiMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - - - -class EFMultiMuHypo_Phi (TrigEFMultiMuHypo): - __slots__ = [] - def __init__(self, name = "EFMultiMuHypo_Phi"): - super( EFMultiMuHypo_Phi, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF bPhi cuts - self.OppositeSign = False - self.ApplyUpperMassCut = True - self.LowerMassCut = 940. - self.UpperMassCut = 1100. - self.ApplyChi2Cut = True - self.Chi2VtxCut = 10. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - validation = TrigEFMultiMuHypoValidationMonitoring() - online = TrigEFMultiMuHypoOnlineMonitoring() - self.AthenaMonTools = [ validation, online, time ] - diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFTrkMassFexConfig.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFTrkMassFexConfig.py deleted file mode 100644 index 53aa3bb9de496fe6a2b8f9e331d0d9f45f592f65..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFTrkMassFexConfig.py +++ /dev/null @@ -1,236 +0,0 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration - -# include the python fragment to set up the default bphysics vertex fitter -from TrigBphysHypo import TrigBphysVertexingConfig # noqa: F401 - -from TrigBphysHypo.TrigBphysHypoConf import TrigEFTrkMassFex - - -# basic cut -class EFTrkMassFex_Jpsimumu (TrigEFTrkMassFex): - __slots__ = [] - def __init__(self, name = "EFTrkMassFex_Jpsimumu"): - super( TrigEFTrkMassFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF TrkMass cuts - self.TrackPTthr = 4000 - self.dEtaTrackRoI = 0.1 - self.dPhiTrackRoI = 0.1 - self.Mass_low_cut = 2850. - self.Mass_high_cut = 3350. -# self.doVertexFit = True - self.DaughterMass = 105.658357 -# self.TrigEFVertexFitter = EFVFitTool -# self.TrigVertexFitter = VFitTool -# self.TrigVertexingTool = VertexTool - - from TrigBphysHypo.TrigEFTrkMassFexMonitoring import TrigEFTrkMassFexValidationMonitoring_RoI - validation = TrigEFTrkMassFexValidationMonitoring_RoI() - - from TrigBphysHypo.TrigEFTrkMassFexMonitoring import TrigEFTrkMassFexOnlineMonitoring_RoI - online = TrigEFTrkMassFexOnlineMonitoring_RoI() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [ validation, online, time ] - - -# loose cut -class EFTrkMassFex_Jpsimumu_loose (TrigEFTrkMassFex): - __slots__ = [] - def __init__(self, name = "EFTrkMassFex_Jpsimumu_loose"): - super( TrigEFTrkMassFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF TrkMass cuts - self.TrackPTthr = 3500. - self.dEtaTrackRoI = 0.1 - self.dPhiTrackRoI = 0.1 - self.Mass_low_cut = 2600. - self.Mass_high_cut = 3600. -# self.doVertexFit = True - self.DaughterMass = 105.658357 -# self.TrigEFVertexFitter = EFVFitTool -# self.TrigVertexFitter = VFitTool -# self.TrigVertexingTool = VertexTool - - from TrigBphysHypo.TrigEFTrkMassFexMonitoring import TrigEFTrkMassFexValidationMonitoring_RoI - validation = TrigEFTrkMassFexValidationMonitoring_RoI() - - from TrigBphysHypo.TrigEFTrkMassFexMonitoring import TrigEFTrkMassFexOnlineMonitoring_RoI - online = TrigEFTrkMassFexOnlineMonitoring_RoI() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [ validation, online, time ] - -# loose cut -class EFTrkMassFex_Jpsimumu_looser (TrigEFTrkMassFex): - __slots__ = [] - def __init__(self, name = "EFTrkMassFex_Jpsimumu_looser"): - super( TrigEFTrkMassFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF TrkMass cuts - self.TrackPTthr = 2000 - self.dEtaTrackRoI = 0.1 - self.dPhiTrackRoI = 0.1 - self.Mass_low_cut = 2600. - self.Mass_high_cut = 3600. -# self.doVertexFit = True - self.DaughterMass = 105.658357 -# self.TrigEFVertexFitter = EFVFitTool -# self.TrigVertexFitter = VFitTool -# self.TrigVertexingTool = VertexTool - - from TrigBphysHypo.TrigEFTrkMassFexMonitoring import TrigEFTrkMassFexValidationMonitoring_RoI - validation = TrigEFTrkMassFexValidationMonitoring_RoI() - - from TrigBphysHypo.TrigEFTrkMassFexMonitoring import TrigEFTrkMassFexOnlineMonitoring_RoI - online = TrigEFTrkMassFexOnlineMonitoring_RoI() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [ validation, online, time ] - - -# FS basic cut -class EFTrkMassFex_Jpsimumu_FS (TrigEFTrkMassFex): - __slots__ = [] - def __init__(self, name = "EFTrkMassFex_Jpsimumu_FS"): - super( TrigEFTrkMassFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF TrkMass cuts - self.TrackPTthr = 4000 - self.dEtaTrackRoI = 0.1 - self.dPhiTrackRoI = 0.1 - self.Mass_low_cut = 2800. - self.Mass_high_cut = 3350. - self.DaughterMass = 105.658357 -# self.doVertexFit = True -# self.TrigEFVertexFitter = EFVFitTool -# self.TrigVertexFitter = VFitTool -# self.TrigVertexingTool = VertexTool - - from TrigBphysHypo.TrigEFTrkMassFexMonitoring import TrigEFTrkMassFexValidationMonitoring_FS - validation = TrigEFTrkMassFexValidationMonitoring_FS() - - from TrigBphysHypo.TrigEFTrkMassFexMonitoring import TrigEFTrkMassFexOnlineMonitoring_FS - online = TrigEFTrkMassFexOnlineMonitoring_FS() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [ validation, online, time ] - - -# FS loose cut -class EFTrkMassFex_Jpsimumu_loose_FS (TrigEFTrkMassFex): - __slots__ = [] - def __init__(self, name = "EFTrkMassFex_Jpsimumu_loose_FS"): - super( TrigEFTrkMassFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF TrkMass cuts - self.TrackPTthr = 2000 - self.dEtaTrackRoI = 0.1 - self.dPhiTrackRoI = 0.1 - self.Mass_low_cut = 2500. - self.Mass_high_cut = 4000. - self.DaughterMass = 105.658357 -# self.doVertexFit = True -# self.TrigEFVertexFitter = EFVFitTool -# self.TrigVertexFitter = VFitTool -# self.TrigVertexingTool = VertexTool - - from TrigBphysHypo.TrigEFTrkMassFexMonitoring import TrigEFTrkMassFexValidationMonitoring_FS - validation = TrigEFTrkMassFexValidationMonitoring_FS() - - from TrigBphysHypo.TrigEFTrkMassFexMonitoring import TrigEFTrkMassFexOnlineMonitoring_FS - online = TrigEFTrkMassFexOnlineMonitoring_FS() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [ validation, online, time ] - -# FS Upsi basic cut -class EFTrkMassFex_Upsimumu_FS (TrigEFTrkMassFex): - __slots__ = [] - def __init__(self, name = "EFTrkMassFex_Upsimumu_FS"): - super( TrigEFTrkMassFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF TrkMass cuts - self.TrackPTthr = 4000 - self.dEtaTrackRoI = 0.1 - self.dPhiTrackRoI = 0.1 - self.Mass_low_cut = 8000. - self.Mass_high_cut = 12000. - self.DaughterMass = 105.658357 -# self.doVertexFit = True -# self.TrigEFVertexFitter = EFVFitTool -# self.TrigVertexFitter = VFitTool -# self.TrigVertexingTool = VertexTool - - from TrigBphysHypo.TrigEFTrkMassFexMonitoring import TrigEFTrkMassFexValidationMonitoring_Upsi_FS - validation = TrigEFTrkMassFexValidationMonitoring_Upsi_FS() - - from TrigBphysHypo.TrigEFTrkMassFexMonitoring import TrigEFTrkMassFexOnlineMonitoring_Upsi_FS - online = TrigEFTrkMassFexOnlineMonitoring_Upsi_FS() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [ validation, online, time ] - -# FS Upsi loose cut -class EFTrkMassFex_Upsimumu_loose_FS (TrigEFTrkMassFex): - __slots__ = [] - def __init__(self, name = "EFTrkMassFex_Upsimumu_loose_FS"): - super( TrigEFTrkMassFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # EF TrkMass cuts - self.TrackPTthr = 2000 - self.dEtaTrackRoI = 0.1 - self.dPhiTrackRoI = 0.1 - self.Mass_low_cut = 8000. - self.Mass_high_cut = 12000. - self.DaughterMass = 105.658357 -# self.doVertexFit = True -# self.TrigEFVertexFitter = EFVFitTool -# self.TrigVertexFitter = VFitTool -# self.TrigVertexingTool = VertexTool - - from TrigBphysHypo.TrigEFTrkMassFexMonitoring import TrigEFTrkMassFexValidationMonitoring_Upsi_FS - validation = TrigEFTrkMassFexValidationMonitoring_Upsi_FS() - - from TrigBphysHypo.TrigEFTrkMassFexMonitoring import TrigEFTrkMassFexOnlineMonitoring_Upsi_FS - online = TrigEFTrkMassFexOnlineMonitoring_Upsi_FS() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [ validation, online, time ] - - diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFTrkMassFexMonitoring.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFTrkMassFexMonitoring.py deleted file mode 100644 index 28220844ff2c7ee158c17de87b7dc06604293e0c..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFTrkMassFexMonitoring.py +++ /dev/null @@ -1,761 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig - -ERROR_labels = ' No_EventInfo : No_RoI : No_TrackColl : No_muon : Empty_TrackColl : More_TrackColl : AddTrack_Fails : Unique_AddTrack_Fails : CalcInvMass_Fails : CalcMother_Fails : CalcMassPull_Fails : BphysColl_Fails ' -ERROR_number = 11 - -ACCEPTANCE_labels = ' Input : AcceptAll : Got_RoI : Got_TrackColl : Full_TrackColl : NotUsed1 : Full_IDTracks : Mu1_Chi2_Cut : Mu1_pT_Cut : Mu1_Chi2Pt_Cut : Mu1_dEta_Cut : Mu1_dPhi_Cut : Mu1_dR_Cut : Mu2_Chi2_Cut : Mu2_pT_Cut : Mu2_Chi2Pt_Cut : Opp_Charge : InvMass_Cut : NotUsed2 : Vertexing : CalcInvMass : NotUsed3 : NotUsed4 : NotUsed5 : BphysColl_not_Empty : NotUsed6 : Each_Mu1_Chi2_Cut : Each_Mu1_pT_Cut : Each_Mu1_Chi2Pt_Cuts : Each_Mu1_dEta_Cut : Each_Mu1_dPhi_Cut : Each_Mu1_dR_Cut : NotUsed7 : Each_Mu2_Chi2_Cut : Each_Mu2_pT_Cut : Each_Mu2_Chi2Pt_Cuts : Each_Opp_Charge : Each_InvMass_Cut : NotUsed8 : NotUsed9 : NotUsed10 : NotUsed11 : NotUsed12 ' -ACCEPTANCE_labels = ACCEPTANCE_labels.replace(" ","") # remove spaces which confuse histogram labelling -ACCEPTANCE_number = 43 - -class TrigEFTrkMassFexValidationMonitoring_RoI(TrigGenericMonitoringToolConfig): - def __init__ (self, name="EFTrkMassFexValidation_RoI"): - super(TrigEFTrkMassFexValidationMonitoring_RoI, self).__init__(name) - self.defineTarget("Validation") - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'EFTrkMassFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - title = 'EFTrkMassFex - Reached steps - acceptance ; ; # Events / Candidates', - xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - labels = ACCEPTANCE_labels ) ] - self.Histograms += [ defineHistogram ( 'ROIEta, ROIPhi', type = 'TH2F', - title = 'EFTrkMassFex - ROI direction ; #eta ; #phi ; # Events', - xbins = 30, xmin = -3.0, xmax = 3.0, - ybins = 32, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'nTracks', type = 'TH1F', - title = 'EFTrkMassFex - Number of ID tracks ; # Tracks ; # Events', - xbins = 101, xmin = -1.5, xmax = 99.5 ) ] - self.Histograms += [ defineHistogram ( 'TrkPt', type = 'TH1F', - title = 'EFTrkMassFex - ID tracks p_{T} - low range ; p_{T} [GeV] ; # Tracks', - xbins = 50, xmin = 0., xmax = 25. ) ] - self.Histograms += [ defineHistogram ( 'TrkPt_wideRange', type = 'TH1F', - title = 'EFTrkMassFex - ID tracks p_{T} ; p_{T} [GeV] ; # Tracks', - xbins = 50, xmin = 0., xmax = 200. ) ] - self.Histograms += [ defineHistogram ( 'TrkEta, TrkPhi', type = 'TH2F', - title = 'EFTrkMassFex - Track direction ; #eta ; #phi ; # Events', - xbins = 30, xmin = -3.0, xmax = 3.0, - ybins = 32, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'TrkROIdEta, TrkROIdPhi', type = 'TH2F', - title = 'EFTrkMassFex - Track-ROI #Delta#eta#Delta#phi difference ; #Delta#eta ; #Delta#phi ; # Tracks', - xbins = 30, xmin = 0., xmax = 3.0, - ybins = 32, ymin = 0., ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'TrkROIdEta', type = 'TH1F', - title = 'EFTrkMassFex - Track-ROI #Delta#eta difference ; #Delta#eta ; # Tracks', - xbins = 60, xmin = 0., xmax = 3.0 ) ] - self.Histograms += [ defineHistogram ( 'TrkROIdPhi', type = 'TH1F', - title = 'EFTrkMassFex - Track-ROI #Delta#phi difference ; #Delta#phi ; # Tracks', - xbins = 64, xmin = 0., xmax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'TrkROIdR', type = 'TH1F', - title = 'EFTrkMassFex - Track-ROI #DeltaR difference ; #DeltaR ; # Tracks', - xbins = 50, xmin = 0., xmax = 5. ) ] - self.Histograms += [ defineHistogram ( 'InvMassNoTrkPtCut', type = 'TH1F', - title = 'EFTrkMassFex - Invariant mass - p_{T#mu2} > 2 GeV - low range ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 1., xmax = 6. ) ] - self.Histograms += [ defineHistogram ( 'InvMassNoTrkPtCut_wideRange', type = 'TH1F', - title = 'EFTrkMassFex - Invariant mass - p_{T#mu2} > 2 GeV ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'InvMass', type = 'TH1F', - title = 'EFTrkMassFex - Invariant mass - low range ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 1., xmax = 6. ) ] - self.Histograms += [ defineHistogram ( 'InvMass_wideRange', type = 'TH1F', - title = 'EFTrkMassFex - Invariant mass ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'Trk1Pt, Trk2Pt', type = 'TH2F', - title = 'EFTrkMassFex - Tracks p_{T} correlation ; p_{T#mu1} [GeV] ; p_{T#mu2} [GeV] ; # Candidates', - xbins = 50, xmin = 0., xmax = 50., - ybins = 50, ymin = 0., ymax = 50. ) ] - self.Histograms += [ defineHistogram ( 'Trk1Eta, Trk2Eta', type = 'TH2F', - title = 'EFTrkMassFex - Tracks #eta correlation ; #eta_{#mu1} ; #eta_{#mu2} ; # Candidates', - xbins = 30, xmin = -3.0, xmax = 3.0, - ybins = 30, ymin = -3.0, ymax = 3.0 ) ] - self.Histograms += [ defineHistogram ( 'Trk1Phi, Trk2Phi', type = 'TH2F', - title = 'EFTrkMassFex - Tracks #phi correlation ; #phi_{#mu1} ; #phi_{#mu2} ; # Candidates', - xbins = 32, xmin = -3.2, xmax = 3.2, - ybins = 32, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Trk1Trk2dEta, Trk1Trk2dPhi', type = 'TH2F', - title = 'EFTrkMassFex - Track1-Track2 #Delta#eta#Delta#phi difference ; #Delta#eta ; #Delta#phi ; # Candidates', - xbins = 30, xmin = 0., xmax = 3.0, - ybins = 32, ymin = 0., ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Trk1Trk2dEta', type = 'TH1F', - title = 'EFTrkMassFex - Track1-Track2 #Delta#eta difference ; #Delta#eta ; # Tracks', - xbins = 30, xmin = 0., xmax = 3.0 ) ] - self.Histograms += [ defineHistogram ( 'Trk1Trk2dPhi', type = 'TH1F', - title = 'EFTrkMassFex - Track1-Track2 #Delta#phi difference ; #Delta#phi ; # Tracks', - xbins = 32, xmin = 0., xmax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Trk1Trk2dR', type = 'TH1F', - title = 'EFTrkMassFex - Track1-Track2 #DeltaR difference ; #DeltaR ; # Tracks', - xbins = 50, xmin = 0., xmax = 5. ) ] - self.Histograms += [ defineHistogram ( 'SumPtTrk12', type = 'TH1F', - title = 'EFTrkMassFex - Track1+Track2 p_{T} ; p_{T#mu1}+p_{T#mu2} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'FitMass', type = 'TH1F', - title = 'EFTrkMassFex - Fitted mass - low range ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 1., xmax = 6. ) ] - self.Histograms += [ defineHistogram ( 'FitMass_wideRange', type = 'TH1F', - title = 'EFTrkMassFex - Fitted mass ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'FitMass, InvMass_okFit', type = 'TH2F', - title = 'EFTrkMassFex - Before vs. after vertex fit invariant mass ; Fitted mass [GeV] ; Invariant mass [GeV] ; # Candidates', - xbins = 25, xmin = 1., xmax = 6., - ybins = 25, ymin = 1., ymax = 6. ) ] - self.Histograms += [ defineHistogram ( 'Chi2toNDoF', type = 'TH1F', - title = 'EFTrkMassFex - Vertex fit #chi^{2}/_{NDoF} ; #chi^{2}/_{NDoF} ; # Candidates', - xbins = 100, xmin = 0., xmax = 25. ) ] - self.Histograms += [ defineHistogram ( 'Chi2toNDoFProb', type = 'TH1F', - title = 'EFTrkMassFex - Vertex fit #chi^{2}/_{NDoF}-probability ; prob(#chi^{2}/_{NDoF}) ; # Candidates', - xbins = 100, xmin = 0., xmax = 1. ) ] - self.Histograms += [ defineHistogram ( 'FitTotalPt', type = 'TH1F', - title = 'EFTrkMassFex - Fitted di-muon p_{T} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'FitTotalPt, SumPtTrk12_okFit', type = 'TH2F', - title = 'EFTrkMassFex - Fitted di-muon p_{T} vs. track1+track2 p_{T} ; p_{T} [GeV] ; (p_{T#mu1}+p_{T#mu2}) [GeV] ; # Candidates', - xbins = 25, xmin = 0., xmax = 50., - ybins = 25, ymin = 0., ymax = 50. ) ] - self.Histograms += [ defineHistogram ( 'FitVtxR', type = 'TH1F', - title = 'EFTrkMassFex - Fitted vertex R-position ; R [mm] ; # Candidates', - xbins = 100, xmin = 0., xmax = 10. ) ] - self.Histograms += [ defineHistogram ( 'FitVtxZ', type = 'TH1F', - title = 'EFTrkMassFex - Fitted vertex Z-position ; Z [mm] ; # Candidates', - xbins = 100, xmin = 0., xmax = 500. ) ] - self.Histograms += [ defineHistogram ( 'nBphys', type = 'TH1F', - title = 'EFTrkMassFex - Number of di-muon candidates ; # di-muons ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'TotalTime', type = 'TH1F', - title = 'EFTrkMassFex - Total processing time ; t_{tot} [ms] ; # Events', - xbins = 100, xmin = 0., xmax = 50. ) ] - self.Histograms += [ defineHistogram ( 'VertexingTime', type = 'TH1F', - title = 'EFTrkMassFex - Vertex fit processing time ; t_{vtx} [ms] ; # Events', - xbins = 100, xmin = 0., xmax = 50. ) ] - self.Histograms += [ defineHistogram ( 'TotalTime, VertexingTime', type = 'TH2F', - title = 'EFTrkMassFex - Total vs. vertex fit processing time ; t_{tot} [ms] ; t_{vtx} [ms] ; # Events', - xbins = 100, xmin = 0., xmax = 50., - ybins = 100, ymin = 0., ymax = 50. ) ] - -class TrigEFTrkMassFexOnlineMonitoring_RoI(TrigGenericMonitoringToolConfig): - def __init__ (self, name="EFTrkMassFexOnline_RoI"): - super(TrigEFTrkMassFexOnlineMonitoring_RoI, self).__init__(name) - self.defineTarget("Online") - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'EFTrkMassFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - title = 'EFTrkMassFex - Reached steps - acceptance ; ; # Events / Candidates', - xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - labels = ACCEPTANCE_labels ) ] - self.Histograms += [ defineHistogram ( 'ROIEta, ROIPhi', type = 'TH2F', - title = 'EFTrkMassFex - ROI direction ; #eta ; #phi ; # Events', - xbins = 30, xmin = -3.0, xmax = 3.0, - ybins = 32, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'nTracks', type = 'TH1F', - title = 'EFTrkMassFex - Number of ID tracks ; # Tracks ; # Events', - xbins = 101, xmin = -1.5, xmax = 99.5 ) ] - self.Histograms += [ defineHistogram ( 'TrkPt', type = 'TH1F', - title = 'EFTrkMassFex - ID tracks p_{T} - low range ; p_{T} [GeV] ; # Tracks', - xbins = 50, xmin = 0., xmax = 25. ) ] - self.Histograms += [ defineHistogram ( 'TrkPt_wideRange', type = 'TH1F', - title = 'EFTrkMassFex - ID tracks p_{T} ; p_{T} [GeV] ; # Tracks', - xbins = 50, xmin = 0., xmax = 200. ) ] - self.Histograms += [ defineHistogram ( 'TrkEta, TrkPhi', type = 'TH2F', - title = 'EFTrkMassFex - Track direction ; #eta ; #phi ; # Events', - xbins = 30, xmin = -3.0, xmax = 3.0, - ybins = 32, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'TrkROIdEta, TrkROIdPhi', type = 'TH2F', - title = 'EFTrkMassFex - Track-ROI #Delta#eta#Delta#phi difference ; #Delta#eta ; #Delta#phi ; # Tracks', - xbins = 30, xmin = 0., xmax = 3.0, - ybins = 32, ymin = 0., ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'TrkROIdEta', type = 'TH1F', - title = 'EFTrkMassFex - Track-ROI #Delta#eta difference ; #Delta#eta ; # Tracks', - xbins = 60, xmin = 0., xmax = 3.0 ) ] - self.Histograms += [ defineHistogram ( 'TrkROIdPhi', type = 'TH1F', - title = 'EFTrkMassFex - Track-ROI #Delta#phi difference ; #Delta#phi ; # Tracks', - xbins = 64, xmin = 0., xmax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'TrkROIdR', type = 'TH1F', - title = 'EFTrkMassFex - Track-ROI #DeltaR difference ; #DeltaR ; # Tracks', - xbins = 50, xmin = 0., xmax = 5. ) ] - self.Histograms += [ defineHistogram ( 'InvMassNoTrkPtCut', type = 'TH1F', - title = 'EFTrkMassFex - Invariant mass - p_{T#mu2} > 2 GeV - low range ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 1., xmax = 6. ) ] - self.Histograms += [ defineHistogram ( 'InvMassNoTrkPtCut_wideRange', type = 'TH1F', - title = 'EFTrkMassFex - Invariant mass - p_{T#mu2} > 2 GeV ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'InvMass', type = 'TH1F', - title = 'EFTrkMassFex - Invariant mass - low range ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 1., xmax = 6. ) ] - self.Histograms += [ defineHistogram ( 'InvMass_wideRange', type = 'TH1F', - title = 'EFTrkMassFex - Invariant mass ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'Trk1Pt, Trk2Pt', type = 'TH2F', - title = 'EFTrkMassFex - Tracks p_{T} correlation ; p_{T#mu1} [GeV] ; p_{T#mu2} [GeV] ; # Candidates', - xbins = 50, xmin = 0., xmax = 50., - ybins = 50, ymin = 0., ymax = 50. ) ] - self.Histograms += [ defineHistogram ( 'Trk1Eta, Trk2Eta', type = 'TH2F', - title = 'EFTrkMassFex - Tracks #eta correlation ; #eta_{#mu1} ; #eta_{#mu2} ; # Candidates', - xbins = 30, xmin = -3.0, xmax = 3.0, - ybins = 30, ymin = -3.0, ymax = 3.0 ) ] - self.Histograms += [ defineHistogram ( 'Trk1Phi, Trk2Phi', type = 'TH2F', - title = 'EFTrkMassFex - Tracks #phi correlation ; #phi_{#mu1} ; #phi_{#mu2} ; # Candidates', - xbins = 32, xmin = -3.2, xmax = 3.2, - ybins = 32, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Trk1Trk2dEta, Trk1Trk2dPhi', type = 'TH2F', - title = 'EFTrkMassFex - Track1-Track2 #Delta#eta#Delta#phi difference ; #Delta#eta ; #Delta#phi ; # Candidates', - xbins = 30, xmin = 0., xmax = 3.0, - ybins = 32, ymin = 0., ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Trk1Trk2dEta', type = 'TH1F', - title = 'EFTrkMassFex - Track1-Track2 #Delta#eta difference ; #Delta#eta ; # Tracks', - xbins = 30, xmin = 0., xmax = 3.0 ) ] - self.Histograms += [ defineHistogram ( 'Trk1Trk2dPhi', type = 'TH1F', - title = 'EFTrkMassFex - Track1-Track2 #Delta#phi difference ; #Delta#phi ; # Tracks', - xbins = 32, xmin = 0., xmax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Trk1Trk2dR', type = 'TH1F', - title = 'EFTrkMassFex - Track1-Track2 #DeltaR difference ; #DeltaR ; # Tracks', - xbins = 50, xmin = 0., xmax = 5. ) ] - self.Histograms += [ defineHistogram ( 'SumPtTrk12', type = 'TH1F', - title = 'EFTrkMassFex - Track1+Track2 p_{T} ; p_{T#mu1}+p_{T#mu2} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'FitMass', type = 'TH1F', - title = 'EFTrkMassFex - Fitted mass - low range ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 1., xmax = 6. ) ] - self.Histograms += [ defineHistogram ( 'FitMass_wideRange', type = 'TH1F', - title = 'EFTrkMassFex - Fitted mass ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'FitMass, InvMass_okFit', type = 'TH2F', - title = 'EFTrkMassFex - Before vs. after vertex fit invariant mass ; Fitted mass [GeV] ; Invariant mass [GeV] ; # Candidates', - xbins = 25, xmin = 1., xmax = 6., - ybins = 25, ymin = 1., ymax = 6. ) ] - self.Histograms += [ defineHistogram ( 'Chi2toNDoF', type = 'TH1F', - title = 'EFTrkMassFex - Vertex fit #chi^{2}/_{NDoF} ; #chi^{2}/_{NDoF} ; # Candidates', - xbins = 100, xmin = 0., xmax = 25. ) ] - self.Histograms += [ defineHistogram ( 'Chi2toNDoFProb', type = 'TH1F', - title = 'EFTrkMassFex - Vertex fit #chi^{2}/_{NDoF}-probability ; prob(#chi^{2}/_{NDoF}) ; # Candidates', - xbins = 100, xmin = 0., xmax = 1. ) ] - self.Histograms += [ defineHistogram ( 'FitTotalPt', type = 'TH1F', - title = 'EFTrkMassFex - Fitted di-muon p_{T} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'FitTotalPt, SumPtTrk12_okFit', type = 'TH2F', - title = 'EFTrkMassFex - Fitted di-muon p_{T} vs. track1+track2 p_{T} ; p_{T} [GeV] ; (p_{T#mu1}+p_{T#mu2}) [GeV] ; # Candidates', - xbins = 25, xmin = 0., xmax = 50., - ybins = 25, ymin = 0., ymax = 50. ) ] - self.Histograms += [ defineHistogram ( 'FitVtxR', type = 'TH1F', - title = 'EFTrkMassFex - Fitted vertex R-position ; R [mm] ; # Candidates', - xbins = 100, xmin = 0., xmax = 10. ) ] - self.Histograms += [ defineHistogram ( 'FitVtxZ', type = 'TH1F', - title = 'EFTrkMassFex - Fitted vertex Z-position ; Z [mm] ; # Candidates', - xbins = 100, xmin = 0., xmax = 500. ) ] - self.Histograms += [ defineHistogram ( 'nBphys', type = 'TH1F', - title = 'EFTrkMassFex - Number of di-muon candidates ; # di-muons ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] -# self.Histograms += [ defineHistogram ( 'TotalTime', type = 'TH1F', -# title = 'EFTrkMassFex - Total processing time ; t_{tot} [ms] ; # Events', -# xbins = 100, xmin = 0., xmax = 50. ) ] -# self.Histograms += [ defineHistogram ( 'VertexingTime', type = 'TH1F', -# title = 'EFTrkMassFex - Vertex fit processing time ; t_{vtx} [ms] ; # Events', -# xbins = 100, xmin = 0., xmax = 50. ) ] -# self.Histograms += [ defineHistogram ( 'TotalTime, VertexingTime', type = 'TH2F', -# title = 'EFTrkMassFex - Total vs. vertex fit processing time ; t_{tot} [ms] ; t_{vtx} [ms] ; # Events', -# xbins = 100, xmin = 0., xmax = 50., -# ybins = 100, ymin = 0., ymax = 50. ) ] - -class TrigEFTrkMassFexValidationMonitoring_FS(TrigGenericMonitoringToolConfig): - def __init__ (self, name="EFTrkMassFexValidation_FS"): - super(TrigEFTrkMassFexValidationMonitoring_FS, self).__init__(name) - self.defineTarget("Validation") - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'EFTrkMassFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - title = 'EFTrkMassFex - Reached steps - acceptance ; ; # Events / Candidates', - xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - labels = ACCEPTANCE_labels ) ] - self.Histograms += [ defineHistogram ( 'ROIEta, ROIPhi', type = 'TH2F', - title = 'EFTrkMassFex - ROI direction ; #eta ; #phi ; # Events', - xbins = 30, xmin = -3.0, xmax = 3.0, - ybins = 32, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'nTracks', type = 'TH1F', - title = 'EFTrkMassFex - Number of ID tracks ; # Tracks ; # Events', - xbins = 101, xmin = -1.5, xmax = 99.5 ) ] - self.Histograms += [ defineHistogram ( 'TrkPt', type = 'TH1F', - title = 'EFTrkMassFex - ID tracks p_{T} - low range ; p_{T} [GeV] ; # Tracks', - xbins = 100, xmin = 0., xmax = 25. ) ] - self.Histograms += [ defineHistogram ( 'TrkPt_wideRange', type = 'TH1F', - title = 'EFTrkMassFex - ID tracks p_{T} ; p_{T} [GeV] ; # Tracks', - xbins = 100, xmin = 0., xmax = 200. ) ] - self.Histograms += [ defineHistogram ( 'TrkEta, TrkPhi', type = 'TH2F', - title = 'EFTrkMassFex - Track direction ; #eta ; #phi ; # Events', - xbins = 30, xmin = -3.0, xmax = 3.0, - ybins = 32, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'TrkROIdEta, TrkROIdPhi', type = 'TH2F', - title = 'EFTrkMassFex - Track-ROI #Delta#eta#Delta#phi difference ; #Delta#eta ; #Delta#phi ; # Tracks', - xbins = 30, xmin = 0., xmax = 3.0, - ybins = 32, ymin = 0., ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'TrkROIdEta', type = 'TH1F', - title = 'EFTrkMassFex - Track-ROI #Delta#eta difference ; #Delta#eta ; # Tracks', - xbins = 30, xmin = 0., xmax = 3.0 ) ] - self.Histograms += [ defineHistogram ( 'TrkROIdPhi', type = 'TH1F', - title = 'EFTrkMassFex - Track-ROI #Delta#phi difference ; #Delta#phi ; # Tracks', - xbins = 32, xmin = 0., xmax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'TrkROIdR', type = 'TH1F', - title = 'EFTrkMassFex - Track-ROI #DeltaR difference ; #DeltaR ; # Tracks', - xbins = 50, xmin = 0., xmax = 5. ) ] - self.Histograms += [ defineHistogram ( 'InvMassNoTrkPtCut', type = 'TH1F', - title = 'EFTrkMassFex - Invariant mass - p_{T#mu2} > 2 GeV - low range ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 1., xmax = 6. ) ] - self.Histograms += [ defineHistogram ( 'InvMassNoTrkPtCut_wideRange', type = 'TH1F', - title = 'EFTrkMassFex - Invariant mass - p_{T#mu2} > 2 GeV ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'InvMass', type = 'TH1F', - title = 'EFTrkMassFex - Invariant mass - low range ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 1., xmax = 6. ) ] - self.Histograms += [ defineHistogram ( 'InvMass_wideRange', type = 'TH1F', - title = 'EFTrkMassFex - Invariant mass ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'Trk1Pt, Trk2Pt', type = 'TH2F', - title = 'EFTrkMassFex - Tracks p_{T} correlation ; p_{T#mu1} [GeV] ; p_{T#mu2} [GeV] ; # Candidates', - xbins = 25, xmin = 0., xmax = 50., - ybins = 25, ymin = 0., ymax = 50. ) ] - self.Histograms += [ defineHistogram ( 'Trk1Eta, Trk2Eta', type = 'TH2F', - title = 'EFTrkMassFex - Tracks #eta correlation ; #eta_{#mu1} ; #eta_{#mu2} ; # Candidates', - xbins = 30, xmin = -3.0, xmax = 3.0, - ybins = 30, ymin = -3.0, ymax = 3.0 ) ] - self.Histograms += [ defineHistogram ( 'Trk1Phi, Trk2Phi', type = 'TH2F', - title = 'EFTrkMassFex - Tracks #phi correlation ; #phi_{#mu1} ; #phi_{#mu2} ; # Candidates', - xbins = 32, xmin = -3.2, xmax = 3.2, - ybins = 32, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Trk1Trk2dEta, Trk1Trk2dPhi', type = 'TH2F', - title = 'EFTrkMassFex - Track1-Track2 #Delta#eta#Delta#phi difference ; #Delta#eta ; #Delta#phi ; # Candidates', - xbins = 30, xmin = 0., xmax = 3.0, - ybins = 32, ymin = 0., ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Trk1Trk2dEta', type = 'TH1F', - title = 'EFTrkMassFex - Track1-Track2 #Delta#eta difference ; #Delta#eta ; # Tracks', - xbins = 30, xmin = 0., xmax = 3.0 ) ] - self.Histograms += [ defineHistogram ( 'Trk1Trk2dPhi', type = 'TH1F', - title = 'EFTrkMassFex - Track1-Track2 #Delta#phi difference ; #Delta#phi ; # Tracks', - xbins = 32, xmin = 0., xmax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Trk1Trk2dR', type = 'TH1F', - title = 'EFTrkMassFex - Track1-Track2 #DeltaR difference ; #DeltaR ; # Tracks', - xbins = 50, xmin = 0., xmax = 5. ) ] - self.Histograms += [ defineHistogram ( 'SumPtTrk12', type = 'TH1F', - title = 'EFTrkMassFex - Track1+Track2 p_{T} ; p_{T#mu1}+p_{T#mu2} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'FitMass', type = 'TH1F', - title = 'EFTrkMassFex - Fitted mass - low range ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 1., xmax = 6. ) ] - self.Histograms += [ defineHistogram ( 'FitMass_wideRange', type = 'TH1F', - title = 'EFTrkMassFex - Fitted mass ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'FitMass, InvMass_okFit', type = 'TH2F', - title = 'EFTrkMassFex - Before vs. after vertex fit invariant mass ; Fitted mass [GeV] ; Invariant mass [GeV] ; # Candidates', - xbins = 25, xmin = 1., xmax = 6., - ybins = 25, ymin = 1., ymax = 6. ) ] - self.Histograms += [ defineHistogram ( 'Chi2toNDoF', type = 'TH1F', - title = 'EFTrkMassFex - Vertex fit #chi^{2}/_{NDoF} ; #chi^{2}/_{NDoF} ; # Candidates', - xbins = 100, xmin = 0., xmax = 25. ) ] - self.Histograms += [ defineHistogram ( 'Chi2toNDoFProb', type = 'TH1F', - title = 'EFTrkMassFex - Vertex fit #chi^{2}/_{NDoF}-probability ; prob(#chi^{2}/_{NDoF}) ; # Candidates', - xbins = 100, xmin = 0., xmax = 1. ) ] - self.Histograms += [ defineHistogram ( 'FitTotalPt', type = 'TH1F', - title = 'EFTrkMassFex - Fitted di-muon p_{T} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'FitTotalPt, SumPtTrk12_okFit', type = 'TH2F', - title = 'EFTrkMassFex - Fitted di-muon p_{T} vs. track1+track2 p_{T} ; p_{T} [GeV] ; (p_{T#mu1}+p_{T#mu2}) [GeV] ; # Candidates', - xbins = 25, xmin = 0., xmax = 50., - ybins = 25, ymin = 0., ymax = 50. ) ] - self.Histograms += [ defineHistogram ( 'FitVtxR', type = 'TH1F', - title = 'EFTrkMassFex - Fitted vertex R-position ; R [mm] ; # Candidates', - xbins = 100, xmin = 0., xmax = 10. ) ] - self.Histograms += [ defineHistogram ( 'FitVtxZ', type = 'TH1F', - title = 'EFTrkMassFex - Fitted vertex Z-position ; Z [mm] ; # Candidates', - xbins = 100, xmin = 0., xmax = 500. ) ] - self.Histograms += [ defineHistogram ( 'nBphys', type = 'TH1F', - title = 'EFTrkMassFex - Number of di-muon candidates ; # di-muons ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'TotalTime', type = 'TH1F', - title = 'EFTrkMassFex - Total processing time ; t_{tot} [ms] ; # Events', - xbins = 100, xmin = 0., xmax = 50. ) ] - self.Histograms += [ defineHistogram ( 'VertexingTime', type = 'TH1F', - title = 'EFTrkMassFex - Vertex fit processing time ; t_{vtx} [ms] ; # Events', - xbins = 100, xmin = 0., xmax = 50. ) ] - self.Histograms += [ defineHistogram ( 'TotalTime, VertexingTime', type = 'TH2F', - title = 'EFTrkMassFex - Total vs. vertex fit processing time ; t_{tot} [ms] ; t_{vtx} [ms] ; # Events', - xbins = 100, xmin = 0., xmax = 50., - ybins = 100, ymin = 0., ymax = 50. ) ] - -class TrigEFTrkMassFexOnlineMonitoring_FS(TrigGenericMonitoringToolConfig): - def __init__ (self, name="EFTrkMassFexOnline_FS"): - super(TrigEFTrkMassFexOnlineMonitoring_FS, self).__init__(name) - self.defineTarget("Online") - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'EFTrkMassFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - title = 'EFTrkMassFex - Reached steps - acceptance ; ; # Events / Candidates', - xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - labels = ACCEPTANCE_labels ) ] - self.Histograms += [ defineHistogram ( 'ROIEta, ROIPhi', type = 'TH2F', - title = 'EFTrkMassFex - ROI direction ; #eta ; #phi ; # Events', - xbins = 30, xmin = -3.0, xmax = 3.0, - ybins = 32, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'nTracks', type = 'TH1F', - title = 'EFTrkMassFex - Number of ID tracks ; # Tracks ; # Events', - xbins = 101, xmin = -1.5, xmax = 99.5 ) ] - self.Histograms += [ defineHistogram ( 'TrkPt', type = 'TH1F', - title = 'EFTrkMassFex - ID tracks p_{T} - low range ; p_{T} [GeV] ; # Tracks', - xbins = 100, xmin = 0., xmax = 25. ) ] - self.Histograms += [ defineHistogram ( 'TrkPt_wideRange', type = 'TH1F', - title = 'EFTrkMassFex - ID tracks p_{T} ; p_{T} [GeV] ; # Tracks', - xbins = 100, xmin = 0., xmax = 200. ) ] - self.Histograms += [ defineHistogram ( 'TrkEta, TrkPhi', type = 'TH2F', - title = 'EFTrkMassFex - Track direction ; #eta ; #phi ; # Events', - xbins = 30, xmin = -3.0, xmax = 3.0, - ybins = 32, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'TrkROIdEta, TrkROIdPhi', type = 'TH2F', - title = 'EFTrkMassFex - Track-ROI #Delta#eta#Delta#phi difference ; #Delta#eta ; #Delta#phi ; # Tracks', - xbins = 30, xmin = 0., xmax = 3.0, - ybins = 32, ymin = 0., ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'TrkROIdEta', type = 'TH1F', - title = 'EFTrkMassFex - Track-ROI #Delta#eta difference ; #Delta#eta ; # Tracks', - xbins = 30, xmin = 0., xmax = 3.0 ) ] - self.Histograms += [ defineHistogram ( 'TrkROIdPhi', type = 'TH1F', - title = 'EFTrkMassFex - Track-ROI #Delta#phi difference ; #Delta#phi ; # Tracks', - xbins = 32, xmin = 0., xmax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'TrkROIdR', type = 'TH1F', - title = 'EFTrkMassFex - Track-ROI #DeltaR difference ; #DeltaR ; # Tracks', - xbins = 50, xmin = 0., xmax = 5. ) ] - self.Histograms += [ defineHistogram ( 'InvMassNoTrkPtCut', type = 'TH1F', - title = 'EFTrkMassFex - Invariant mass - p_{T#mu2} > 2 GeV - low range ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 1., xmax = 6. ) ] - self.Histograms += [ defineHistogram ( 'InvMassNoTrkPtCut_wideRange', type = 'TH1F', - title = 'EFTrkMassFex - Invariant mass - p_{T#mu2} > 2 GeV ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'InvMass', type = 'TH1F', - title = 'EFTrkMassFex - Invariant mass - low range ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 1., xmax = 6. ) ] - self.Histograms += [ defineHistogram ( 'InvMass_wideRange', type = 'TH1F', - title = 'EFTrkMassFex - Invariant mass ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'Trk1Pt, Trk2Pt', type = 'TH2F', - title = 'EFTrkMassFex - Tracks p_{T} correlation ; p_{T#mu1} [GeV] ; p_{T#mu2} [GeV] ; # Candidates', - xbins = 25, xmin = 0., xmax = 50., - ybins = 25, ymin = 0., ymax = 50. ) ] - self.Histograms += [ defineHistogram ( 'Trk1Eta, Trk2Eta', type = 'TH2F', - title = 'EFTrkMassFex - Tracks #eta correlation ; #eta_{#mu1} ; #eta_{#mu2} ; # Candidates', - xbins = 30, xmin = -3.0, xmax = 3.0, - ybins = 30, ymin = -3.0, ymax = 3.0 ) ] - self.Histograms += [ defineHistogram ( 'Trk1Phi, Trk2Phi', type = 'TH2F', - title = 'EFTrkMassFex - Tracks #phi correlation ; #phi_{#mu1} ; #phi_{#mu2} ; # Candidates', - xbins = 32, xmin = -3.2, xmax = 3.2, - ybins = 32, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Trk1Trk2dEta, Trk1Trk2dPhi', type = 'TH2F', - title = 'EFTrkMassFex - Track1-Track2 #Delta#eta#Delta#phi difference ; #Delta#eta ; #Delta#phi ; # Candidates', - xbins = 30, xmin = 0., xmax = 3.0, - ybins = 32, ymin = 0., ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Trk1Trk2dEta', type = 'TH1F', - title = 'EFTrkMassFex - Track1-Track2 #Delta#eta difference ; #Delta#eta ; # Tracks', - xbins = 30, xmin = 0., xmax = 3.0 ) ] - self.Histograms += [ defineHistogram ( 'Trk1Trk2dPhi', type = 'TH1F', - title = 'EFTrkMassFex - Track1-Track2 #Delta#phi difference ; #Delta#phi ; # Tracks', - xbins = 32, xmin = 0., xmax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Trk1Trk2dR', type = 'TH1F', - title = 'EFTrkMassFex - Track1-Track2 #DeltaR difference ; #DeltaR ; # Tracks', - xbins = 50, xmin = 0., xmax = 5. ) ] - self.Histograms += [ defineHistogram ( 'SumPtTrk12', type = 'TH1F', - title = 'EFTrkMassFex - Track1+Track2 p_{T} ; p_{T#mu1}+p_{T#mu2} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'FitMass', type = 'TH1F', - title = 'EFTrkMassFex - Fitted mass - low range ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 1., xmax = 6. ) ] - self.Histograms += [ defineHistogram ( 'FitMass_wideRange', type = 'TH1F', - title = 'EFTrkMassFex - Fitted mass ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'FitMass, InvMass_okFit', type = 'TH2F', - title = 'EFTrkMassFex - Before vs. after vertex fit invariant mass ; Fitted mass [GeV] ; Invariant mass [GeV] ; # Candidates', - xbins = 25, xmin = 1., xmax = 6., - ybins = 25, ymin = 1., ymax = 6. ) ] - self.Histograms += [ defineHistogram ( 'Chi2toNDoF', type = 'TH1F', - title = 'EFTrkMassFex - Vertex fit #chi^{2}/_{NDoF} ; #chi^{2}/_{NDoF} ; # Candidates', - xbins = 100, xmin = 0., xmax = 25. ) ] - self.Histograms += [ defineHistogram ( 'Chi2toNDoFProb', type = 'TH1F', - title = 'EFTrkMassFex - Vertex fit #chi^{2}/_{NDoF}-probability ; prob(#chi^{2}/_{NDoF}) ; # Candidates', - xbins = 100, xmin = 0., xmax = 1. ) ] - self.Histograms += [ defineHistogram ( 'FitTotalPt', type = 'TH1F', - title = 'EFTrkMassFex - Fitted di-muon p_{T} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'FitTotalPt, SumPtTrk12_okFit', type = 'TH2F', - title = 'EFTrkMassFex - Fitted di-muon p_{T} vs. track1+track2 p_{T} ; p_{T} [GeV] ; (p_{T#mu1}+p_{T#mu2}) [GeV] ; # Candidates', - xbins = 25, xmin = 0., xmax = 50., - ybins = 25, ymin = 0., ymax = 50. ) ] - self.Histograms += [ defineHistogram ( 'FitVtxR', type = 'TH1F', - title = 'EFTrkMassFex - Fitted vertex R-position ; R [mm] ; # Candidates', - xbins = 100, xmin = 0., xmax = 10. ) ] - self.Histograms += [ defineHistogram ( 'FitVtxZ', type = 'TH1F', - title = 'EFTrkMassFex - Fitted vertex Z-position ; Z [mm] ; # Candidates', - xbins = 100, xmin = 0., xmax = 500. ) ] - self.Histograms += [ defineHistogram ( 'nBphys', type = 'TH1F', - title = 'EFTrkMassFex - Number of di-muon candidates ; # di-muons ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] -# self.Histograms += [ defineHistogram ( 'TotalTime', type = 'TH1F', -# title = 'EFTrkMassFex - Total processing time ; t_{tot} [ms] ; # Events', -# xbins = 100, xmin = 0., xmax = 50. ) ] -# self.Histograms += [ defineHistogram ( 'VertexingTime', type = 'TH1F', -# title = 'EFTrkMassFex - Vertex fit processing time ; t_{vtx} [ms] ; # Events', -# xbins = 100, xmin = 0., xmax = 50. ) ] -# self.Histograms += [ defineHistogram ( 'TotalTime, VertexingTime', type = 'TH2F', -# title = 'EFTrkMassFex - Total vs. vertex fit processing time ; t_{tot} [ms] ; t_{vtx} [ms] ; # Events', -# xbins = 100, xmin = 0., xmax = 50., -# ybins = 100, ymin = 0., ymax = 50. ) ] - -class TrigEFTrkMassFexValidationMonitoring_Upsi_FS(TrigGenericMonitoringToolConfig): - def __init__ (self, name="EFTrkMassFexValidation_Upsi_FS"): - super(TrigEFTrkMassFexValidationMonitoring_Upsi_FS, self).__init__(name) - self.defineTarget("Validation") - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'EFTrkMassFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - title = 'EFTrkMassFex - Reached steps - acceptance ; ; # Events / Candidates', - xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - labels = ACCEPTANCE_labels ) ] - self.Histograms += [ defineHistogram ( 'ROIEta, ROIPhi', type = 'TH2F', - title = 'EFTrkMassFex - ROI direction ; #eta ; #phi ; # Events', - xbins = 30, xmin = -3.0, xmax = 3.0, - ybins = 32, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'nTracks', type = 'TH1F', - title = 'EFTrkMassFex - Number of ID tracks ; # Tracks ; # Events', - xbins = 101, xmin = -1.5, xmax = 99.5 ) ] - self.Histograms += [ defineHistogram ( 'TrkPt', type = 'TH1F', - title = 'EFTrkMassFex - ID tracks p_{T} - low range ; p_{T} [GeV] ; # Tracks', - xbins = 100, xmin = 0., xmax = 25. ) ] - self.Histograms += [ defineHistogram ( 'TrkPt_wideRange', type = 'TH1F', - title = 'EFTrkMassFex - ID tracks p_{T} ; p_{T} [GeV] ; # Tracks', - xbins = 100, xmin = 0., xmax = 200. ) ] - self.Histograms += [ defineHistogram ( 'TrkEta, TrkPhi', type = 'TH2F', - title = 'EFTrkMassFex - Track direction ; #eta ; #phi ; # Events', - xbins = 30, xmin = -3.0, xmax = 3.0, - ybins = 32, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'TrkROIdEta, TrkROIdPhi', type = 'TH2F', - title = 'EFTrkMassFex - Track-ROI #Delta#eta#Delta#phi difference ; #Delta#eta ; #Delta#phi ; # Tracks', - xbins = 30, xmin = 0., xmax = 3.0, - ybins = 32, ymin = 0., ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'TrkROIdEta', type = 'TH1F', - title = 'EFTrkMassFex - Track-ROI #Delta#eta difference ; #Delta#eta ; # Tracks', - xbins = 30, xmin = 0., xmax = 3.0 ) ] - self.Histograms += [ defineHistogram ( 'TrkROIdPhi', type = 'TH1F', - title = 'EFTrkMassFex - Track-ROI #Delta#phi difference ; #Delta#phi ; # Tracks', - xbins = 32, xmin = 0., xmax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'TrkROIdR', type = 'TH1F', - title = 'EFTrkMassFex - Track-ROI #DeltaR difference ; #DeltaR ; # Tracks', - xbins = 50, xmin = 0., xmax = 5. ) ] - self.Histograms += [ defineHistogram ( 'InvMassNoTrkPtCut', type = 'TH1F', - title = 'EFTrkMassFex - Invariant mass - p_{T#mu2} > 2 GeV - low range ; Mass [GeV] ; # Candidates', - xbins = 140, xmin = 1., xmax = 15. ) ] - self.Histograms += [ defineHistogram ( 'InvMassNoTrkPtCut_wideRange', type = 'TH1F', - title = 'EFTrkMassFex - Invariant mass - p_{T#mu2} > 2 GeV ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'InvMass', type = 'TH1F', - title = 'EFTrkMassFex - Invariant mass - low range ; Mass [GeV] ; # Candidates', - xbins = 140, xmin = 1., xmax = 15. ) ] - self.Histograms += [ defineHistogram ( 'InvMass_wideRange', type = 'TH1F', - title = 'EFTrkMassFex - Invariant mass ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'Trk1Pt, Trk2Pt', type = 'TH2F', - title = 'EFTrkMassFex - Tracks p_{T} correlation ; p_{T#mu1} [GeV] ; p_{T#mu2} [GeV] ; # Candidates', - xbins = 25, xmin = 0., xmax = 50., - ybins = 25, ymin = 0., ymax = 50. ) ] - self.Histograms += [ defineHistogram ( 'Trk1Eta, Trk2Eta', type = 'TH2F', - title = 'EFTrkMassFex - Tracks #eta correlation ; #eta_{#mu1} ; #eta_{#mu2} ; # Candidates', - xbins = 30, xmin = -3.0, xmax = 3.0, - ybins = 30, ymin = -3.0, ymax = 3.0 ) ] - self.Histograms += [ defineHistogram ( 'Trk1Phi, Trk2Phi', type = 'TH2F', - title = 'EFTrkMassFex - Tracks #phi correlation ; #phi_{#mu1} ; #phi_{#mu2} ; # Candidates', - xbins = 32, xmin = -3.2, xmax = 3.2, - ybins = 32, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Trk1Trk2dEta, Trk1Trk2dPhi', type = 'TH2F', - title = 'EFTrkMassFex - Track1-Track2 #Delta#eta#Delta#phi difference ; #Delta#eta ; #Delta#phi ; # Candidates', - xbins = 30, xmin = 0., xmax = 3.0, - ybins = 32, ymin = 0., ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Trk1Trk2dEta', type = 'TH1F', - title = 'EFTrkMassFex - Track1-Track2 #Delta#eta difference ; #Delta#eta ; # Tracks', - xbins = 60, xmin = 0., xmax = 3.0 ) ] - self.Histograms += [ defineHistogram ( 'Trk1Trk2dPhi', type = 'TH1F', - title = 'EFTrkMassFex - Track1-Track2 #Delta#phi difference ; #Delta#phi ; # Tracks', - xbins = 64, xmin = 0., xmax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Trk1Trk2dR', type = 'TH1F', - title = 'EFTrkMassFex - Track1-Track2 #DeltaR difference ; #DeltaR ; # Tracks', - xbins = 50, xmin = 0., xmax = 5. ) ] - self.Histograms += [ defineHistogram ( 'SumPtTrk12', type = 'TH1F', - title = 'EFTrkMassFex - Track1+Track2 p_{T} ; p_{T#mu1}+p_{T#mu2} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'FitMass', type = 'TH1F', - title = 'EFTrkMassFex - Fitted mass - low range ; Mass [GeV] ; # Candidates', - xbins = 140, xmin = 1., xmax = 15. ) ] - self.Histograms += [ defineHistogram ( 'FitMass_wideRange', type = 'TH1F', - title = 'EFTrkMassFex - Fitted mass ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'FitMass, InvMass_okFit', type = 'TH2F', - title = 'EFTrkMassFex - Before vs. after vertex fit invariant mass ; Fitted mass [GeV] ; Invariant mass [GeV] ; # Candidates', - xbins = 28, xmin = 1., xmax = 15., - ybins = 28, ymin = 1., ymax = 15. ) ] - self.Histograms += [ defineHistogram ( 'Chi2toNDoF', type = 'TH1F', - title = 'EFTrkMassFex - Vertex fit #chi^{2}/_{NDoF} ; #chi^{2}/_{NDoF} ; # Candidates', - xbins = 100, xmin = 0., xmax = 25. ) ] - self.Histograms += [ defineHistogram ( 'Chi2toNDoFProb', type = 'TH1F', - title = 'EFTrkMassFex - Vertex fit #chi^{2}/_{NDoF}-probability ; prob(#chi^{2}/_{NDoF}) ; # Candidates', - xbins = 100, xmin = 0., xmax = 1. ) ] - self.Histograms += [ defineHistogram ( 'FitTotalPt', type = 'TH1F', - title = 'EFTrkMassFex - Fitted di-muon p_{T} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'FitTotalPt, SumPtTrk12_okFit', type = 'TH2F', - title = 'EFTrkMassFex - Fitted di-muon p_{T} vs. track1+track2 p_{T} ; p_{T} [GeV] ; (p_{T#mu1}+p_{T#mu2}) [GeV] ; # Candidates', - xbins = 25, xmin = 0., xmax = 50., - ybins = 25, ymin = 0., ymax = 50. ) ] - self.Histograms += [ defineHistogram ( 'FitVtxR', type = 'TH1F', - title = 'EFTrkMassFex - Fitted vertex R-position ; R [mm] ; # Candidates', - xbins = 100, xmin = 0., xmax = 10. ) ] - self.Histograms += [ defineHistogram ( 'FitVtxZ', type = 'TH1F', - title = 'EFTrkMassFex - Fitted vertex Z-position ; Z [mm] ; # Candidates', - xbins = 100, xmin = 0., xmax = 500. ) ] - self.Histograms += [ defineHistogram ( 'nBphys', type = 'TH1F', - title = 'EFTrkMassFex - Number of di-muon candidates ; # di-muons ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'TotalTime', type = 'TH1F', - title = 'EFTrkMassFex - Total processing time ; t_{tot} [ms] ; # Events', - xbins = 100, xmin = 0., xmax = 50. ) ] - self.Histograms += [ defineHistogram ( 'VertexingTime', type = 'TH1F', - title = 'EFTrkMassFex - Vertex fit processing time ; t_{vtx} [ms] ; # Events', - xbins = 100, xmin = 0., xmax = 50. ) ] - self.Histograms += [ defineHistogram ( 'TotalTime, VertexingTime', type = 'TH2F', - title = 'EFTrkMassFex - Total vs. vertex fit processing time ; t_{tot} [ms] ; t_{vtx} [ms] ; # Events', - xbins = 100, xmin = 0., xmax = 50., - ybins = 100, ymin = 0., ymax = 50. ) ] - -class TrigEFTrkMassFexOnlineMonitoring_Upsi_FS(TrigGenericMonitoringToolConfig): - def __init__ (self, name="EFTrkMassFexOnline_Upsi_FS"): - super(TrigEFTrkMassFexOnlineMonitoring_Upsi_FS, self).__init__(name) - self.defineTarget("Online") - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'EFTrkMassFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - title = 'EFTrkMassFex - Reached steps - acceptance ; ; # Events / Candidates', - xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - labels = ACCEPTANCE_labels ) ] - self.Histograms += [ defineHistogram ( 'ROIEta, ROIPhi', type = 'TH2F', - title = 'EFTrkMassFex - ROI direction ; #eta ; #phi ; # Events', - xbins = 30, xmin = -3.0, xmax = 3.0, - ybins = 32, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'nTracks', type = 'TH1F', - title = 'EFTrkMassFex - Number of ID tracks ; # Tracks ; # Events', - xbins = 101, xmin = -1.5, xmax = 99.5 ) ] - self.Histograms += [ defineHistogram ( 'TrkPt', type = 'TH1F', - title = 'EFTrkMassFex - ID tracks p_{T} - low range ; p_{T} [GeV] ; # Tracks', - xbins = 100, xmin = 0., xmax = 25. ) ] - self.Histograms += [ defineHistogram ( 'TrkPt_wideRange', type = 'TH1F', - title = 'EFTrkMassFex - ID tracks p_{T} ; p_{T} [GeV] ; # Tracks', - xbins = 100, xmin = 0., xmax = 200. ) ] - self.Histograms += [ defineHistogram ( 'TrkEta, TrkPhi', type = 'TH2F', - title = 'EFTrkMassFex - Track direction ; #eta ; #phi ; # Events', - xbins = 30, xmin = -3.0, xmax = 3.0, - ybins = 32, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'TrkROIdEta, TrkROIdPhi', type = 'TH2F', - title = 'EFTrkMassFex - Track-ROI #Delta#eta#Delta#phi difference ; #Delta#eta ; #Delta#phi ; # Tracks', - xbins = 30, xmin = 0., xmax = 3.0, - ybins = 32, ymin = 0., ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'TrkROIdEta', type = 'TH1F', - title = 'EFTrkMassFex - Track-ROI #Delta#eta difference ; #Delta#eta ; # Tracks', - xbins = 30, xmin = 0., xmax = 3.0 ) ] - self.Histograms += [ defineHistogram ( 'TrkROIdPhi', type = 'TH1F', - title = 'EFTrkMassFex - Track-ROI #Delta#phi difference ; #Delta#phi ; # Tracks', - xbins = 32, xmin = 0., xmax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'TrkROIdR', type = 'TH1F', - title = 'EFTrkMassFex - Track-ROI #DeltaR difference ; #DeltaR ; # Tracks', - xbins = 50, xmin = 0., xmax = 5. ) ] - self.Histograms += [ defineHistogram ( 'InvMassNoTrkPtCut', type = 'TH1F', - title = 'EFTrkMassFex - Invariant mass - p_{T#mu2} > 2 GeV - low range ; Mass [GeV] ; # Candidates', - xbins = 140, xmin = 1., xmax = 15. ) ] - self.Histograms += [ defineHistogram ( 'InvMassNoTrkPtCut_wideRange', type = 'TH1F', - title = 'EFTrkMassFex - Invariant mass - p_{T#mu2} > 2 GeV ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'InvMass', type = 'TH1F', - title = 'EFTrkMassFex - Invariant mass - low range ; Mass [GeV] ; # Candidates', - xbins = 140, xmin = 1., xmax = 15. ) ] - self.Histograms += [ defineHistogram ( 'InvMass_wideRange', type = 'TH1F', - title = 'EFTrkMassFex - Invariant mass ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'Trk1Pt, Trk2Pt', type = 'TH2F', - title = 'EFTrkMassFex - Tracks p_{T} correlation ; p_{T#mu1} [GeV] ; p_{T#mu2} [GeV] ; # Candidates', - xbins = 25, xmin = 0., xmax = 50., - ybins = 25, ymin = 0., ymax = 50. ) ] - self.Histograms += [ defineHistogram ( 'Trk1Eta, Trk2Eta', type = 'TH2F', - title = 'EFTrkMassFex - Tracks #eta correlation ; #eta_{#mu1} ; #eta_{#mu2} ; # Candidates', - xbins = 30, xmin = -3.0, xmax = 3.0, - ybins = 30, ymin = -3.0, ymax = 3.0 ) ] - self.Histograms += [ defineHistogram ( 'Trk1Phi, Trk2Phi', type = 'TH2F', - title = 'EFTrkMassFex - Tracks #phi correlation ; #phi_{#mu1} ; #phi_{#mu2} ; # Candidates', - xbins = 32, xmin = -3.2, xmax = 3.2, - ybins = 32, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Trk1Trk2dEta, Trk1Trk2dPhi', type = 'TH2F', - title = 'EFTrkMassFex - Track1-Track2 #Delta#eta#Delta#phi difference ; #Delta#eta ; #Delta#phi ; # Candidates', - xbins = 30, xmin = 0., xmax = 3.0, - ybins = 32, ymin = 0., ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Trk1Trk2dEta', type = 'TH1F', - title = 'EFTrkMassFex - Track1-Track2 #Delta#eta difference ; #Delta#eta ; # Tracks', - xbins = 60, xmin = 0., xmax = 3.0 ) ] - self.Histograms += [ defineHistogram ( 'Trk1Trk2dPhi', type = 'TH1F', - title = 'EFTrkMassFex - Track1-Track2 #Delta#phi difference ; #Delta#phi ; # Tracks', - xbins = 64, xmin = 0., xmax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Trk1Trk2dR', type = 'TH1F', - title = 'EFTrkMassFex - Track1-Track2 #DeltaR difference ; #DeltaR ; # Tracks', - xbins = 50, xmin = 0., xmax = 5. ) ] - self.Histograms += [ defineHistogram ( 'SumPtTrk12', type = 'TH1F', - title = 'EFTrkMassFex - Track1+Track2 p_{T} ; p_{T#mu1}+p_{T#mu2} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'FitMass', type = 'TH1F', - title = 'EFTrkMassFex - Fitted mass - low range ; Mass [GeV] ; # Candidates', - xbins = 140, xmin = 1., xmax = 15. ) ] - self.Histograms += [ defineHistogram ( 'FitMass_wideRange', type = 'TH1F', - title = 'EFTrkMassFex - Fitted mass ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'FitMass, InvMass_okFit', type = 'TH2F', - title = 'EFTrkMassFex - Before vs. after vertex fit invariant mass ; Fitted mass [GeV] ; Invariant mass [GeV] ; # Candidates', - xbins = 28, xmin = 1., xmax = 15., - ybins = 28, ymin = 1., ymax = 15. ) ] - self.Histograms += [ defineHistogram ( 'Chi2toNDoF', type = 'TH1F', - title = 'EFTrkMassFex - Vertex fit #chi^{2}/_{NDoF} ; #chi^{2}/_{NDoF} ; # Candidates', - xbins = 100, xmin = 0., xmax = 25. ) ] - self.Histograms += [ defineHistogram ( 'Chi2toNDoFProb', type = 'TH1F', - title = 'EFTrkMassFex - Vertex fit #chi^{2}/_{NDoF}-probability ; prob(#chi^{2}/_{NDoF}) ; # Candidates', - xbins = 100, xmin = 0., xmax = 1. ) ] - self.Histograms += [ defineHistogram ( 'FitTotalPt', type = 'TH1F', - title = 'EFTrkMassFex - Fitted di-muon p_{T} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'FitTotalPt, SumPtTrk12_okFit', type = 'TH2F', - title = 'EFTrkMassFex - Fitted di-muon p_{T} vs. track1+track2 p_{T} ; p_{T} [GeV] ; (p_{T#mu1}+p_{T#mu2}) [GeV] ; # Candidates', - xbins = 25, xmin = 0., xmax = 50., - ybins = 25, ymin = 0., ymax = 50. ) ] - self.Histograms += [ defineHistogram ( 'FitVtxR', type = 'TH1F', - title = 'EFTrkMassFex - Fitted vertex R-position ; R [mm] ; # Candidates', - xbins = 100, xmin = 0., xmax = 10. ) ] - self.Histograms += [ defineHistogram ( 'FitVtxZ', type = 'TH1F', - title = 'EFTrkMassFex - Fitted vertex Z-position ; Z [mm] ; # Candidates', - xbins = 100, xmin = 0., xmax = 500. ) ] - self.Histograms += [ defineHistogram ( 'nBphys', type = 'TH1F', - title = 'EFTrkMassFex - Number of di-muon candidates ; # di-muons ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] -# self.Histograms += [ defineHistogram ( 'TotalTime', type = 'TH1F', -# title = 'EFTrkMassFex - Total processing time ; t_{tot} [ms] ; # Events', -# xbins = 100, xmin = 0., xmax = 50. ) ] -# self.Histograms += [ defineHistogram ( 'VertexingTime', type = 'TH1F', -# title = 'EFTrkMassFex - Vertex fit processing time ; t_{vtx} [ms] ; # Events', -# xbins = 100, xmin = 0., xmax = 50. ) ] -# self.Histograms += [ defineHistogram ( 'TotalTime, VertexingTime', type = 'TH2F', -# title = 'EFTrkMassFex - Total vs. vertex fit processing time ; t_{tot} [ms] ; t_{vtx} [ms] ; # Events', -# xbins = 100, xmin = 0., xmax = 50., -# ybins = 100, ymin = 0., ymax = 50. ) ] - diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFTrkMassHypoConfig.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFTrkMassHypoConfig.py deleted file mode 100644 index 9b2e4088127b9fe1ad8edd46c946ff4d0be9a90b..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFTrkMassHypoConfig.py +++ /dev/null @@ -1,147 +0,0 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration - -from TrigBphysHypo.TrigBphysHypoConf import TrigEFTrkMassHypo - -# Jpsi -class EFTrkMassHypo_Jpsimumu (TrigEFTrkMassHypo): - __slots__ = [] - def __init__(self, name = "EFTrkMassHypo_Jpsimumu"): - super( TrigEFTrkMassHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # mass cuts - self.AcceptAll = False - from TrigBphysHypo.TrigEFTrkMassHypoMonitoring import TrigEFTrkMassHypoValidationMonitoring_RoI - validation = TrigEFTrkMassHypoValidationMonitoring_RoI() - - from TrigBphysHypo.TrigEFTrkMassHypoMonitoring import TrigEFTrkMassHypoOnlineMonitoring_RoI - online = TrigEFTrkMassHypoOnlineMonitoring_RoI() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [ validation, online, time ] -# Jpsi FS -class EFTrkMassHypo_Jpsimumu_FS (TrigEFTrkMassHypo): - __slots__ = [] - def __init__(self, name = "EFTrkMassHypo_Jpsimumu_FS"): - super( TrigEFTrkMassHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - from TrigBphysHypo.TrigEFTrkMassHypoMonitoring import TrigEFTrkMassHypoValidationMonitoring_FS - validation = TrigEFTrkMassHypoValidationMonitoring_FS() - - from TrigBphysHypo.TrigEFTrkMassHypoMonitoring import TrigEFTrkMassHypoOnlineMonitoring_FS - online = TrigEFTrkMassHypoOnlineMonitoring_FS() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [ validation, online, time ] - -# Jpsi loose -class EFTrkMassHypo_Jpsimumu_loose (TrigEFTrkMassHypo): - __slots__ = [] - def __init__(self, name = "EFTrkMassHypo_Jpsimumu_loose"): - super( TrigEFTrkMassHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # mass cuts - self.AcceptAll = False - from TrigBphysHypo.TrigEFTrkMassHypoMonitoring import TrigEFTrkMassHypoValidationMonitoring_RoI - validation = TrigEFTrkMassHypoValidationMonitoring_RoI() - - from TrigBphysHypo.TrigEFTrkMassHypoMonitoring import TrigEFTrkMassHypoOnlineMonitoring_RoI - online = TrigEFTrkMassHypoOnlineMonitoring_RoI() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [ validation, online, time ] -# Jpsi looser -class EFTrkMassHypo_Jpsimumu_looser (TrigEFTrkMassHypo): - __slots__ = [] - def __init__(self, name = "EFTrkMassHypo_Jpsimumu_looser"): - super( TrigEFTrkMassHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # mass cuts - self.AcceptAll = False - from TrigBphysHypo.TrigEFTrkMassHypoMonitoring import TrigEFTrkMassHypoValidationMonitoring_RoI - validation = TrigEFTrkMassHypoValidationMonitoring_RoI() - - from TrigBphysHypo.TrigEFTrkMassHypoMonitoring import TrigEFTrkMassHypoOnlineMonitoring_RoI - online = TrigEFTrkMassHypoOnlineMonitoring_RoI() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [ validation, online, time ] - -# Jpsi loose FS -class EFTrkMassHypo_Jpsimumu_loose_FS (TrigEFTrkMassHypo): - __slots__ = [] - def __init__(self, name = "EFTrkMassHypo_Jpsimumu_loose_FS"): - super( TrigEFTrkMassHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - from TrigBphysHypo.TrigEFTrkMassHypoMonitoring import TrigEFTrkMassHypoValidationMonitoring_FS - validation = TrigEFTrkMassHypoValidationMonitoring_FS() - - from TrigBphysHypo.TrigEFTrkMassHypoMonitoring import TrigEFTrkMassHypoOnlineMonitoring_FS - online = TrigEFTrkMassHypoOnlineMonitoring_FS() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [ validation, online, time ] - -# Upsi FS -class EFTrkMassHypo_Upsimumu_FS (TrigEFTrkMassHypo): - __slots__ = [] - def __init__(self, name = "EFTrkMassHypo_Upsimumu_FS"): - super( TrigEFTrkMassHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - from TrigBphysHypo.TrigEFTrkMassHypoMonitoring import TrigEFTrkMassHypoValidationMonitoring_Upsi_FS - validation = TrigEFTrkMassHypoValidationMonitoring_Upsi_FS() - - from TrigBphysHypo.TrigEFTrkMassHypoMonitoring import TrigEFTrkMassHypoOnlineMonitoring_Upsi_FS - online = TrigEFTrkMassHypoOnlineMonitoring_Upsi_FS() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [ validation, online, time ] - - -# Upsi loose FS -class EFTrkMassHypo_Upsimumu_loose_FS (TrigEFTrkMassHypo): - __slots__ = [] - def __init__(self, name = "EFTrkMassHypo_Upsimumu_loose_FS"): - super( TrigEFTrkMassHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - from TrigBphysHypo.TrigEFTrkMassHypoMonitoring import TrigEFTrkMassHypoValidationMonitoring_Upsi_FS - validation = TrigEFTrkMassHypoValidationMonitoring_Upsi_FS() - - from TrigBphysHypo.TrigEFTrkMassHypoMonitoring import TrigEFTrkMassHypoOnlineMonitoring_Upsi_FS - online = TrigEFTrkMassHypoOnlineMonitoring_Upsi_FS() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [ validation, online, time ] - - diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFTrkMassHypoMonitoring.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFTrkMassHypoMonitoring.py deleted file mode 100644 index fc625941cb1c3b98f66c2bd1f9466a4a73f4c99d..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFTrkMassHypoMonitoring.py +++ /dev/null @@ -1,108 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig - -class TrigEFTrkMassHypoValidationMonitoring_RoI(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigEFTrkMassHypoValidationMonitoring_RoI"): - super(TrigEFTrkMassHypoValidationMonitoring_RoI, self).__init__(name) - self.defineTarget("Validation") - self.Histograms += [ defineHistogram('CutCounter', type='TH1F', title="cut info", - xbins=10, xmin=-1.5, xmax=8.5) ] -# self.Histograms += [ defineHistogram('Mass', type='TH1F', title="EFTrkMassFex Mass; Mass[MeV]", -# xbins=100, xmin=1000., xmax=5000.) ] -# self.Histograms += [ defineHistogram('FitMass', type='TH1F', title="EFTrkMassFex FitMass; FitMass[MeV]", -# xbins=100, xmin=1000., xmax=5000.) ] -# self.Histograms += [ defineHistogram('Chi2', type='TH1F', title="EFTrkMassFex Chi2; Chi2", -# xbins=100, xmin=0., xmax=10.) ] -# self.Histograms += [ defineHistogram('Chi2Prob', type='TH1F', title="EFTrkMassFex Chi2Prob; Chi2Prob", -# xbins=100, xmin=0., xmax=1.) ] - self.Histograms += [ defineHistogram('NBphys', type='TH1F', title="EFTrkMassFex NBphys created", - xbins=50, xmin=0.0, xmax=50.0) ] - -class TrigEFTrkMassHypoOnlineMonitoring_RoI(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigEFTrkMassHypoOnlineMonitoring_RoI"): - super(TrigEFTrkMassHypoOnlineMonitoring_RoI, self).__init__(name) - self.defineTarget("Online") - self.Histograms += [ defineHistogram('CutCounter', type='TH1F', title="cut info", - xbins=10, xmin=-1.5, xmax=8.5) ] -# self.Histograms += [ defineHistogram('Mass', type='TH1F', title="EFTrkMassFex Mass; Mass[MeV]", -# xbins=100, xmin=1000., xmax=5000.) ] -# self.Histograms += [ defineHistogram('FitMass', type='TH1F', title="EFTrkMassFex FitMass; FitMass[MeV]", -# xbins=100, xmin=1000., xmax=5000.) ] -# self.Histograms += [ defineHistogram('Chi2', type='TH1F', title="EFTrkMassFex Chi2; Chi2", -# xbins=100, xmin=0., xmax=10.) ] -# self.Histograms += [ defineHistogram('Chi2Prob', type='TH1F', title="EFTrkMassFex Chi2Prob; Chi2Prob", -# xbins=100, xmin=0., xmax=1.) ] - self.Histograms += [ defineHistogram('NBphys', type='TH1F', title="EFTrkMassFex NBphys created", - xbins=50, xmin=0.0, xmax=50.0) ] - - -class TrigEFTrkMassHypoValidationMonitoring_FS(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigEFTrkMassHypoValidationMonitoring_FS"): - super(TrigEFTrkMassHypoValidationMonitoring_FS, self).__init__(name) - self.defineTarget("Validation") - self.Histograms += [ defineHistogram('CutCounter', type='TH1F', title="cut info", - xbins=10, xmin=-1.5, xmax=8.5) ] -# self.Histograms += [ defineHistogram('Mass', type='TH1F', title="EFTrkMassFex Mass; Mass[MeV]", -# xbins=100, xmin=1000., xmax=5000.) ] -# self.Histograms += [ defineHistogram('FitMass', type='TH1F', title="EFTrkMassFex FitMass; FitMass[MeV]", -# xbins=100, xmin=1000., xmax=5000.) ] -# self.Histograms += [ defineHistogram('Chi2', type='TH1F', title="EFTrkMassFex Chi2; Chi2", -# xbins=100, xmin=0., xmax=10.) ] -# self.Histograms += [ defineHistogram('Chi2Prob', type='TH1F', title="EFTrkMassFex Chi2Prob; Chi2Prob", -# xbins=100, xmin=0., xmax=1.) ] - self.Histograms += [ defineHistogram('NBphys', type='TH1F', title="EFTrkMassFex NBphys created", - xbins=50, xmin=0.0, xmax=50.0) ] - -class TrigEFTrkMassHypoOnlineMonitoring_FS(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigEFTrkMassHypoOnlineMonitoring_FS"): - super(TrigEFTrkMassHypoOnlineMonitoring_FS, self).__init__(name) - self.defineTarget("Online") - self.Histograms += [ defineHistogram('CutCounter', type='TH1F', title="cut info", - xbins=10, xmin=-1.5, xmax=8.5) ] -# self.Histograms += [ defineHistogram('Mass', type='TH1F', title="EFTrkMassFex Mass; Mass[MeV]", -# xbins=100, xmin=1000., xmax=5000.) ] -# self.Histograms += [ defineHistogram('FitMass', type='TH1F', title="EFTrkMassFex FitMass; FitMass[MeV]", -# xbins=100, xmin=1000., xmax=5000.) ] -# self.Histograms += [ defineHistogram('Chi2', type='TH1F', title="EFTrkMassFex Chi2; Chi2", -# xbins=100, xmin=0., xmax=10.) ] -# self.Histograms += [ defineHistogram('Chi2Prob', type='TH1F', title="EFTrkMassFex Chi2Prob; Chi2Prob", -# xbins=100, xmin=0., xmax=1.) ] - self.Histograms += [ defineHistogram('NBphys', type='TH1F', title="EFTrkMassFex NBphys created", - xbins=50, xmin=0.0, xmax=50.0) ] - -class TrigEFTrkMassHypoValidationMonitoring_Upsi_FS(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigEFTrkMassHypoValidationMonitoring_Upsi_FS"): - super(TrigEFTrkMassHypoValidationMonitoring_Upsi_FS, self).__init__(name) - self.defineTarget("Validation") - self.Histograms += [ defineHistogram('CutCounter', type='TH1F', title="cut info", - xbins=10, xmin=-1.5, xmax=8.5) ] -# self.Histograms += [ defineHistogram('Mass', type='TH1F', title="EFTrkMassFex Mass; Mass[MeV]", -# xbins=100, xmin=1000., xmax=5000.) ] -# self.Histograms += [ defineHistogram('FitMass', type='TH1F', title="EFTrkMassFex FitMass; FitMass[MeV]", -# xbins=100, xmin=1000., xmax=5000.) ] -# self.Histograms += [ defineHistogram('Chi2', type='TH1F', title="EFTrkMassFex Chi2; Chi2", -# xbins=100, xmin=0., xmax=10.) ] -# self.Histograms += [ defineHistogram('Chi2Prob', type='TH1F', title="EFTrkMassFex Chi2Prob; Chi2Prob", -# xbins=100, xmin=0., xmax=1.) ] - self.Histograms += [ defineHistogram('NBphys', type='TH1F', title="EFTrkMassFex NBphys created", - xbins=50, xmin=0.0, xmax=50.0) ] - -class TrigEFTrkMassHypoOnlineMonitoring_Upsi_FS(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigEFTrkMassHypoOnlineMonitoring_Upsi_FS"): - super(TrigEFTrkMassHypoOnlineMonitoring_Upsi_FS, self).__init__(name) - self.defineTarget("Online") - self.Histograms += [ defineHistogram('CutCounter', type='TH1F', title="cut info", - xbins=10, xmin=-1.5, xmax=8.5) ] -# self.Histograms += [ defineHistogram('Mass', type='TH1F', title="EFTrkMassFex Mass; Mass[MeV]", -# xbins=100, xmin=1000., xmax=5000.) ] -# self.Histograms += [ defineHistogram('FitMass', type='TH1F', title="EFTrkMassFex FitMass; FitMass[MeV]", -# xbins=100, xmin=1000., xmax=5000.) ] -# self.Histograms += [ defineHistogram('Chi2', type='TH1F', title="EFTrkMassFex Chi2; Chi2", -# xbins=100, xmin=0., xmax=10.) ] -# self.Histograms += [ defineHistogram('Chi2Prob', type='TH1F', title="EFTrkMassFex Chi2Prob; Chi2Prob", -# xbins=100, xmin=0., xmax=1.) ] - self.Histograms += [ defineHistogram('NBphys', type='TH1F', title="EFTrkMassFex NBphys created", - xbins=50, xmin=0.0, xmax=50.0) ] - - diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2BMuMuFexConfig.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2BMuMuFexConfig.py deleted file mode 100644 index aa498d398d8770c579e7e269f3b5cbd8f9fdb464..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2BMuMuFexConfig.py +++ /dev/null @@ -1,765 +0,0 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration - -from TrigBphysHypo.TrigBphysHypoConf import TrigL2BMuMuFex -from TrigVertexFitter.TrigVertexFitterConf import TrigL2VertexFitter -from TrigVertexFitter.TrigVertexFitterConf import TrigVertexFitter -from TrigVertexFitter.TrigVertexFitterConf import TrigVertexingTool - -L2VFitTool = TrigL2VertexFitter() -VFitTool = TrigVertexFitter() -VertexTool = TrigVertexingTool() - -from AthenaCommon.AppMgr import ToolSvc - -ToolSvc += L2VFitTool -ToolSvc += VFitTool -ToolSvc += VertexTool - -class L2BMuMuFex_1 (TrigL2BMuMuFex): - __slots__ = [] - def __init__(self, name = "L2BMuMuFex_1"): - super( TrigL2BMuMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - self.AcceptSameMuon = True - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.LowerMassCut = 100. - self.UpperMassCut = 13000. - self.ApplyUpperMassCut = True - self.doVertexFit = True - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexValidationMonitoring - validation = TrigL2BMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexOnlineMonitoring - online = TrigL2BMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuFex_Jpsi (TrigL2BMuMuFex): - __slots__ = [] - def __init__(self, name = "L2BMuMuFex_Jpsi"): - super( TrigL2BMuMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - self.AcceptSameMuon = True - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.LowerMassCut = 2000. - self.UpperMassCut = 4800. - self.ApplyUpperMassCut = True - self.doVertexFit = True - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexValidationMonitoring - validation = TrigL2BMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexOnlineMonitoring - online = TrigL2BMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuFex_Jpsi_noSameMu (L2BMuMuFex_Jpsi): - __slots__ = [] - def __init__(self, name = "L2BMuMuFex_Jpsi_noSameMu"): - L2BMuMuFex_Jpsi.__init__( self, name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptSameMuon = False - -class L2BMuMuFex_Upsi (TrigL2BMuMuFex): - __slots__ = [] - def __init__(self, name = "L2BMuMuFex_Upsi"): - super( TrigL2BMuMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - self.AcceptSameMuon = True - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.LowerMassCut = 7000. - self.UpperMassCut = 13000. - self.ApplyUpperMassCut = True - self.doVertexFit = True - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexValidationMonitoring - validation = TrigL2BMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexOnlineMonitoring - online = TrigL2BMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuFex_B (TrigL2BMuMuFex): - __slots__ = [] - def __init__(self, name = "L2BMuMuFex_B"): - super( TrigL2BMuMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - self.AcceptSameMuon = True - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.LowerMassCut = 4000. - self.UpperMassCut = 9000. - self.ApplyUpperMassCut = True - self.doVertexFit = True - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexValidationMonitoring - validation = TrigL2BMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexOnlineMonitoring - online = TrigL2BMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuFex_DiMu (TrigL2BMuMuFex): - __slots__ = [] - def __init__(self, name = "L2BMuMuFex_DiMu"): - super( TrigL2BMuMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - self.AcceptSameMuon = True - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.LowerMassCut = 1000. - self.UpperMassCut = 15000. - self.ApplyUpperMassCut = True - self.doVertexFit = True - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexValidationMonitoring - validation = TrigL2BMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexOnlineMonitoring - online = TrigL2BMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuFex_DiMu_DY (TrigL2BMuMuFex): - __slots__ = [] - def __init__(self, name = "L2BMuMuFex_DiMu_DY"): - super( TrigL2BMuMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.LowerMassCut = 10000. - self.UpperMassCut = 140000. - self.ApplyUpperMassCut = True - self.doVertexFit = True - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexValidationMonitoring - validation = TrigL2BMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexOnlineMonitoring - online = TrigL2BMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuFex_DiMu_DY25 (TrigL2BMuMuFex): - __slots__ = [] - def __init__(self, name = "L2BMuMuFex_DiMu_DY25"): - super( TrigL2BMuMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.LowerMassCut = 25000. - self.UpperMassCut = 140000. - self.ApplyUpperMassCut = True - self.doVertexFit = True - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexValidationMonitoring - validation = TrigL2BMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexOnlineMonitoring - online = TrigL2BMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuFex_DiMu_DY20 (TrigL2BMuMuFex): - __slots__ = [] - def __init__(self, name = "L2BMuMuFex_DiMu_DY20"): - super( TrigL2BMuMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.LowerMassCut = 20000. - self.UpperMassCut = 140000. - self.ApplyUpperMassCut = True - self.doVertexFit = True - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexValidationMonitoring - validation = TrigL2BMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexOnlineMonitoring - online = TrigL2BMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuFex_DiMu_DY14 (TrigL2BMuMuFex): - __slots__ = [] - def __init__(self, name = "L2BMuMuFex_DiMu_DY14"): - super( TrigL2BMuMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.LowerMassCut = 14000. - self.UpperMassCut = 140000. - self.ApplyUpperMassCut = True - self.doVertexFit = True - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexValidationMonitoring - validation = TrigL2BMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexOnlineMonitoring - online = TrigL2BMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuFex_DiMu_noOS (TrigL2BMuMuFex): - __slots__ = [] - def __init__(self, name = "L2BMuMuFex_DiMu_noOS"): - super( TrigL2BMuMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - self.AcceptSameMuon = True - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.OppositeSign = False - self.LowerMassCut = 1000. - self.UpperMassCut = 15000. - self.ApplyUpperMassCut = True - self.doVertexFit = True - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexValidationMonitoring - validation = TrigL2BMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexOnlineMonitoring - online = TrigL2BMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuFex_DiMu_DY_noOS (TrigL2BMuMuFex): - __slots__ = [] - def __init__(self, name = "L2BMuMuFex_DiMu_DY_noOS"): - super( TrigL2BMuMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.OppositeSign = False - self.LowerMassCut = 10000. - self.UpperMassCut = 140000. - self.ApplyUpperMassCut = True - self.doVertexFit = True - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexValidationMonitoring - validation = TrigL2BMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexOnlineMonitoring - online = TrigL2BMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuFex_DiMu_DY14_noOS (TrigL2BMuMuFex): - __slots__ = [] - def __init__(self, name = "L2BMuMuFex_DiMu_DY14_noOS"): - super( TrigL2BMuMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.OppositeSign = False - self.LowerMassCut = 14000. - self.UpperMassCut = 140000. - self.ApplyUpperMassCut = True - self.doVertexFit = True - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexValidationMonitoring - validation = TrigL2BMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexOnlineMonitoring - online = TrigL2BMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - - -class L2BMuMuFex_DiMu_7invm9_noOS (TrigL2BMuMuFex): - __slots__ = [] - def __init__(self, name = "L2BMuMuFex_DiMu_7invm_noOS"): - super( TrigL2BMuMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.OppositeSign = False - self.LowerMassCut = 7000. - self.UpperMassCut = 9000. - self.ApplyUpperMassCut = True - self.doVertexFit = True - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexValidationMonitoring - validation = TrigL2BMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexOnlineMonitoring - online = TrigL2BMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuFex_DiMu_11invm60_noOS (TrigL2BMuMuFex): - __slots__ = [] - def __init__(self, name = "L2BMuMuFex_DiMu_11invm60_noOS"): - super( TrigL2BMuMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.OppositeSign = False - self.LowerMassCut = 11000. - self.UpperMassCut = 60000. - self.ApplyUpperMassCut = True - self.doVertexFit = True - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexValidationMonitoring - validation = TrigL2BMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexOnlineMonitoring - online = TrigL2BMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuFex_DiMu_11invm24_noOS (L2BMuMuFex_DiMu_11invm60_noOS): - __slots__ = [] - def __init__(self, name = "L2BMuMuFex_DiMu_11invm24_noOS"): - super( L2BMuMuFex_DiMu_11invm24_noOS, self ).__init__( name ) - - # L2 Bmumu cuts - self.LowerMassCut = 11000. - self.UpperMassCut = 24000. - - -class L2BMuMuFex_DiMu_24invm60_noOS (L2BMuMuFex_DiMu_11invm60_noOS): - __slots__ = [] - def __init__(self, name = "L2BMuMuFex_DiMu_24invm60_noOS"): - super( L2BMuMuFex_DiMu_24invm60_noOS, self ).__init__( name ) - - # L2 Bmumu cuts - self.LowerMassCut = 24000. - self.UpperMassCut = 60000. - - -class L2BMuMuFex_DiMu_18invm60_noOS (TrigL2BMuMuFex): - __slots__ = [] - def __init__(self, name = "L2BMuMuFex_DiMu_18invm60_noOS"): - super( TrigL2BMuMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.OppositeSign = False - self.LowerMassCut = 18000. - self.UpperMassCut = 60000. - self.ApplyUpperMassCut = True - self.doVertexFit = True - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexValidationMonitoring - validation = TrigL2BMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexOnlineMonitoring - online = TrigL2BMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuFex_noId (TrigL2BMuMuFex): - __slots__ = [] - def __init__(self, name = "L2BMuMuFex_noId"): - super( TrigL2BMuMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.LowerMassCut = 2000. - self.UpperMassCut = 4800. - self.ApplyUpperMassCut = True - self.doVertexFit = True - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - self.noId = True - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexValidationMonitoring - validation = TrigL2BMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexOnlineMonitoring_noid - online = TrigL2BMuMuFexOnlineMonitoring_noid() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuFex_noId_Z (TrigL2BMuMuFex): - __slots__ = [] - def __init__(self, name = "L2BMuMuFex_noId_Z"): - super( TrigL2BMuMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.LowerMassCut = 60000. - self.UpperMassCut = 120000. - self.ApplyUpperMassCut = True - self.doVertexFit = True - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - self.noId = True - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexValidationMonitoring - validation = TrigL2BMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexOnlineMonitoring_noid - online = TrigL2BMuMuFexOnlineMonitoring_noid() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuFex_Jpsi_passL2 (TrigL2BMuMuFex): - __slots__ = [] - def __init__(self, name = "L2BMuMuFex_Jpsi_passL2"): - super( TrigL2BMuMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = True - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.LowerMassCut = 2000. - self.UpperMassCut = 4800. - self.ApplyUpperMassCut = True - self.doVertexFit = True - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexValidationMonitoring - validation = TrigL2BMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexOnlineMonitoring_passL2 - online = TrigL2BMuMuFexOnlineMonitoring_passL2() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuFex_Upsi_passL2 (TrigL2BMuMuFex): - __slots__ = [] - def __init__(self, name = "L2BMuMuFex_Upsi_passL2"): - super( TrigL2BMuMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = True - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.LowerMassCut = 7000. - self.UpperMassCut = 13000. - self.ApplyUpperMassCut = True - self.doVertexFit = True - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexValidationMonitoring - validation = TrigL2BMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexOnlineMonitoring_passL2 - online = TrigL2BMuMuFexOnlineMonitoring_passL2() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuFex_B_passL2 (TrigL2BMuMuFex): - __slots__ = [] - def __init__(self, name = "L2BMuMuFex_B_passL2"): - super( TrigL2BMuMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = True - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.LowerMassCut = 4000. - self.UpperMassCut = 9000. - self.ApplyUpperMassCut = True - self.doVertexFit = True - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexValidationMonitoring - validation = TrigL2BMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexOnlineMonitoring_passL2 - online = TrigL2BMuMuFexOnlineMonitoring_passL2() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuFex_DiMu_passL2 (TrigL2BMuMuFex): - __slots__ = [] - def __init__(self, name = "L2BMuMuFex_DiMu_passL2"): - super( TrigL2BMuMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = True - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.LowerMassCut = 1000. - self.UpperMassCut = 15000. - self.ApplyUpperMassCut = True - self.doVertexFit = True - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexValidationMonitoring - validation = TrigL2BMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexOnlineMonitoring_passL2 - online = TrigL2BMuMuFexOnlineMonitoring_passL2() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuFex_DiMu_noOS_passL2 (TrigL2BMuMuFex): - __slots__ = [] - def __init__(self, name = "L2BMuMuFex_DiMu_noOS_passL2"): - super( TrigL2BMuMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = True - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.OppositeSign = False - self.LowerMassCut = 1000. - self.UpperMassCut = 15000. - self.ApplyUpperMassCut = True - self.doVertexFit = True - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexValidationMonitoring - validation = TrigL2BMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexOnlineMonitoring_passL2 - online = TrigL2BMuMuFexOnlineMonitoring_passL2() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuFex_noId_passL2 (TrigL2BMuMuFex): - __slots__ = [] - def __init__(self, name = "L2BMuMuFex_noId_passL2"): - super( TrigL2BMuMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = True - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.LowerMassCut = 2000. - self.UpperMassCut = 4800. - self.ApplyUpperMassCut = True - self.doVertexFit = True - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - self.noId = True - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexValidationMonitoring - validation = TrigL2BMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexOnlineMonitoring_passL2 - online = TrigL2BMuMuFexOnlineMonitoring_passL2() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuFex_noId_Z_passL2 (TrigL2BMuMuFex): - __slots__ = [] - def __init__(self, name = "L2BMuMuFex_noId_Z_passL2"): - super( TrigL2BMuMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = True - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.LowerMassCut = 60000. - self.UpperMassCut = 120000. - self.ApplyUpperMassCut = True - self.doVertexFit = True - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - self.noId = True - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexValidationMonitoring - validation = TrigL2BMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexOnlineMonitoring - online = TrigL2BMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuFex_DiMu_noinvm_SS (TrigL2BMuMuFex): - __slots__ = [] - def __init__(self, name = "L2BMuMuFex_DiMu_noinvm_SS"): - super( TrigL2BMuMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - self.AcceptSameMuon = True - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.OppositeSign = False - self.SameSign = True - self.LowerMassCut = 0. - self.UpperMassCut = 15000. - self.ApplyUpperMassCut = False - self.doVertexFit = False # not effective - vertexing is done always - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexValidationMonitoring - validation = TrigL2BMuMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuFexMonitoring import TrigL2BMuMuFexOnlineMonitoring - online = TrigL2BMuMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2BMuMuFexMonitoring.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2BMuMuFexMonitoring.py deleted file mode 100644 index c92db04c59b4806ae7df4dee410068bb394eda7d..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2BMuMuFexMonitoring.py +++ /dev/null @@ -1,270 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig - -ERROR_labels = ' No_EventInfo : Not_2_Input_TE : No_RoI_1 : No_RoI_2 : Mu1_not_Combined : Mu1_not_Standalone : Mu1_Standalone_Invalid : Mu2_not_Combined : Mu2_not_Standalone : Mu2_Standalone_Invalid : MuMu_not_Both_Combined : MuMu_not_Comb_Standalone : AddTrack_Fails : CalcInvMass_Fails : CalcMother_Fails : CalcMassPull_Fails : BphysColl_Fails ' -ERROR_number = 17 - -ACCEPTANCE_labels = ' Input : Got_RoIs : Mu1_Combined : Mu1_Standalone : Mu2_Combined : Mu2_Standalone : MuMu_Both_Combined : MuMu_Comb_Standalone : Mu1_IDTrack : Mu2_IDTrack : MuMu_Both_IDTracks : CombMu_IDTrack : DiMuon_Pair : vtxpass_is_TRUE : mumuIDpass_is_TRUE : Opp_Charge : InvMass_Cut : AddTrack_Test : Vertexing : CalcInvMass : CalcMother : Vertex_not_NULL : SEPARATOR : BphysColl_not_Empty ' -ACCEPTANCE_number = 24 - -class TrigL2BMuMuFexValidationMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigL2BMuMuFexValidationMonitoring"): - super(TrigL2BMuMuFexValidationMonitoring, self).__init__(name) - self.defineTarget("Validation") - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'L2BMuMuFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - title = 'L2BMuMuFex - Reached steps - acceptance ; ; # Events / Candidates', - xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - labels = ACCEPTANCE_labels ) ] - self.Histograms += [ defineHistogram ( 'ROIEta, ROIPhi', type = 'TH2F', - title = 'L2BMuMuFex - ROIs direction ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Roi1Roi2dEta, Roi1Roi2dPhi', type = 'TH2F', - title = 'L2BMuMuFex - ROI_{1}-ROI_{2} #Delta#eta#Delta#phi difference ; #Delta#eta ; #Delta#phi ; # ROIs', - xbins = 30, xmin = 0., xmax = 3.0, - ybins = 32, ymin = 0., ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Roi1Roi2dEta', type = 'TH1F', - title = 'L2BMuMuFex - ROI_{1}-ROI_{2} #Delta#eta difference ; #Delta#eta ; # ROIs', - xbins = 30, xmin = 0., xmax = 3.0 ) ] - self.Histograms += [ defineHistogram ( 'Roi1Roi2dPhi', type = 'TH1F', - title = 'L2BMuMuFex - ROI_{1}-ROI_{2} #Delta#phi difference ; #Delta#phi ; # ROIs', - xbins = 32, xmin = 0., xmax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Roi1Roi2dR', type = 'TH1F', - title = 'L2BMuMuFex - ROI_{1}-ROI_{2} #DeltaR difference ; #DeltaR ; # ROIs', - xbins = 50, xmin = 0., xmax = 5. ) ] - self.Histograms += [ defineHistogram ( 'MucombROIdR', type = 'TH1F', - title = 'L2BMuMuFex - CombinedMuon-ROI #DeltaR difference ; #DeltaR ; # Combined muons', - xbins = 50, xmin = 0., xmax = 1. ) ] - self.Histograms += [ defineHistogram ( 'MucombTrkdR', type = 'TH1F', - title = 'L2BMuMuFex - CombinedMuon-IDTrack #DeltaR difference ; #DeltaR ; # Muons with ID tracks', - xbins = 50, xmin = 0., xmax = 0.1 ) ] - self.Histograms += [ defineHistogram ( 'MutrkPt', type = 'TH1F', - title = 'L2BMuMuFex - Muon ID-Track p_{T} - low range ; p_{T} [GeV] ; # Muons with ID tracks', - xbins = 50, xmin = 0., xmax = 25. ) ] - self.Histograms += [ defineHistogram ( 'MutrkPt_wideRange', type = 'TH1F', - title = 'L2BMuMuFex - Muon ID-Track p_{T} ; p_{T} [GeV] ; # Muons with ID tracks', - xbins = 50, xmin = 0., xmax = 200. ) ] - self.Histograms += [ defineHistogram ( 'MutrkEta, MutrkPhi', type = 'TH2F', - title = 'L2BMuMuFex - Muon ID-Track direction ; #eta ; #phi ; # Muons with ID tracks', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Mutrk1Mutrk2dEta', type = 'TH1F', - title = 'L2BMuMuFex - Muon ID-Tracks #Delta#eta difference ; #Delta#eta ; # Di-muons', - xbins = 30, xmin = 0., xmax = 3.0 ) ] - self.Histograms += [ defineHistogram ( 'Mutrk1Mutrk2dPhi', type = 'TH1F', - title = 'L2BMuMuFex - Muon ID-Tracks #Delta#phi difference ; #Delta#phi ; # Di-muons', - xbins = 32, xmin = 0., xmax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Mutrk1Mutrk2dR', type = 'TH1F', - title = 'L2BMuMuFex - Muon ID-Tracks #DeltaR difference ; #DeltaR ; # Di-muons', - xbins = 50, xmin = 0., xmax = 5. ) ] - self.Histograms += [ defineHistogram ( 'SumPtMutrk12', type = 'TH1F', - title = 'L2BMuMuFex - Muon ID-Tracks sum of p_{T} ; p_{Ttrk1}+p_{Ttrk2} [GeV] ; # Di-muons', - xbins = 50, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'InvMass_comb', type = 'TH1F', - title = 'L2BMuMuFex - Invariant mass of the Muon ID-Tracks - low range ; Mass [GeV] ; # Di-muons', - xbins = 120, xmin = 0., xmax = 13. ) ] - self.Histograms += [ defineHistogram ( 'InvMass_comb_wideRange', type = 'TH1F', - title = 'L2BMuMuFex - Invariant mass of the Muon ID-Tracks ; Mass [GeV] ; # Di-muons', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'FitMass', type = 'TH1F', - title = 'L2BMuMuFex - Fitted mass - low range ; Mass [GeV] ; # Candidates', - xbins = 120, xmin = 0., xmax = 13. ) ] - self.Histograms += [ defineHistogram ( 'FitMass_wideRange', type = 'TH1F', - title = 'L2BMuMuFex - Fitted mass ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'Chi2toNDoF', type = 'TH1F', - title = 'L2BMuMuFex - Vertex fit #chi^{2}/_{NDoF} ; #chi^{2}/_{NDoF} ; # Candidates', - xbins = 100, xmin = 0., xmax = 25. ) ] - self.Histograms += [ defineHistogram ( 'FitTotalPt', type = 'TH1F', - title = 'L2BMuMuFex - Fitted di-muon p_{T} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'FitVtxR', type = 'TH1F', - title = 'L2BMuMuFex - Fitted vertex R-position ; R [mm] ; # Candidates', - xbins = 100, xmin = 0., xmax = 10. ) ] - self.Histograms += [ defineHistogram ( 'FitVtxZ', type = 'TH1F', - title = 'L2BMuMuFex - Fitted vertex Z-position ; Z [mm] ; # Candidates', - xbins = 100, xmin = 0., xmax = 500. ) ] - -class TrigL2BMuMuFexOnlineMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigL2BMuMuFexOnlineMonitoring"): - super(TrigL2BMuMuFexOnlineMonitoring, self).__init__(name) - self.defineTarget("Online") - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'L2BMuMuFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - title = 'L2BMuMuFex - Reached steps - acceptance ; ; # Events / Candidates', - xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - labels = ACCEPTANCE_labels ) ] - self.Histograms += [ defineHistogram ( 'ROIEta, ROIPhi', type = 'TH2F', - title = 'L2BMuMuFex - ROIs direction ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Roi1Roi2dEta, Roi1Roi2dPhi', type = 'TH2F', - title = 'L2BMuMuFex - ROI_{1}-ROI_{2} #Delta#eta#Delta#phi difference ; #Delta#eta ; #Delta#phi ; # ROIs', - xbins = 30, xmin = 0., xmax = 3.0, - ybins = 32, ymin = 0., ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Roi1Roi2dEta', type = 'TH1F', - title = 'L2BMuMuFex - ROI_{1}-ROI_{2} #Delta#eta difference ; #Delta#eta ; # ROIs', - xbins = 30, xmin = 0., xmax = 3.0 ) ] - self.Histograms += [ defineHistogram ( 'Roi1Roi2dPhi', type = 'TH1F', - title = 'L2BMuMuFex - ROI_{1}-ROI_{2} #Delta#phi difference ; #Delta#phi ; # ROIs', - xbins = 32, xmin = 0., xmax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Roi1Roi2dR', type = 'TH1F', - title = 'L2BMuMuFex - ROI_{1}-ROI_{2} #DeltaR difference ; #DeltaR ; # ROIs', - xbins = 50, xmin = 0., xmax = 5. ) ] - self.Histograms += [ defineHistogram ( 'MucombROIdR', type = 'TH1F', - title = 'L2BMuMuFex - CombinedMuon-ROI #DeltaR difference ; #DeltaR ; # Combined muons', - xbins = 50, xmin = 0., xmax = 1. ) ] - self.Histograms += [ defineHistogram ( 'MucombTrkdR', type = 'TH1F', - title = 'L2BMuMuFex - CombinedMuon-IDTrack #DeltaR difference ; #DeltaR ; # Muons with ID tracks', - xbins = 50, xmin = 0., xmax = 0.1 ) ] - self.Histograms += [ defineHistogram ( 'MutrkPt', type = 'TH1F', - title = 'L2BMuMuFex - Muon ID-Track p_{T} - low range ; p_{T} [GeV] ; # Muons with ID tracks', - xbins = 50, xmin = 0., xmax = 25. ) ] - self.Histograms += [ defineHistogram ( 'MutrkPt_wideRange', type = 'TH1F', - title = 'L2BMuMuFex - Muon ID-Track p_{T} ; p_{T} [GeV] ; # Muons with ID tracks', - xbins = 50, xmin = 0., xmax = 200. ) ] - self.Histograms += [ defineHistogram ( 'MutrkEta, MutrkPhi', type = 'TH2F', - title = 'L2BMuMuFex - Muon ID-Track direction ; #eta ; #phi ; # Muons with ID tracks', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Mutrk1Mutrk2dEta', type = 'TH1F', - title = 'L2BMuMuFex - Muon ID-Tracks #Delta#eta difference ; #Delta#eta ; # Di-muons', - xbins = 30, xmin = 0., xmax = 3.0 ) ] - self.Histograms += [ defineHistogram ( 'Mutrk1Mutrk2dPhi', type = 'TH1F', - title = 'L2BMuMuFex - Muon ID-Tracks #Delta#phi difference ; #Delta#phi ; # Di-muons', - xbins = 32, xmin = 0., xmax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Mutrk1Mutrk2dR', type = 'TH1F', - title = 'L2BMuMuFex - Muon ID-Tracks #DeltaR difference ; #DeltaR ; # Di-muons', - xbins = 50, xmin = 0., xmax = 5. ) ] - self.Histograms += [ defineHistogram ( 'SumPtMutrk12', type = 'TH1F', - title = 'L2BMuMuFex - Muon ID-Tracks sum of p_{T} ; p_{Ttrk1}+p_{Ttrk2} [GeV] ; # Di-muons', - xbins = 50, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'InvMass_comb', type = 'TH1F', - title = 'L2BMuMuFex - Invariant mass of the Muon ID-Tracks - low range ; Mass [GeV] ; # Di-muons', - xbins = 120, xmin = 0., xmax = 13. ) ] - self.Histograms += [ defineHistogram ( 'InvMass_comb_wideRange', type = 'TH1F', - title = 'L2BMuMuFex - Invariant mass of the Muon ID-Tracks ; Mass [GeV] ; # Di-muons', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'FitMass', type = 'TH1F', - title = 'L2BMuMuFex - Fitted mass - low range ; Mass [GeV] ; # Candidates', - xbins = 120, xmin = 0., xmax = 13. ) ] - self.Histograms += [ defineHistogram ( 'FitMass_wideRange', type = 'TH1F', - title = 'L2BMuMuFex - Fitted mass ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'Chi2toNDoF', type = 'TH1F', - title = 'L2BMuMuFex - Vertex fit #chi^{2}/_{NDoF} ; #chi^{2}/_{NDoF} ; # Candidates', - xbins = 100, xmin = 0., xmax = 25. ) ] - self.Histograms += [ defineHistogram ( 'FitTotalPt', type = 'TH1F', - title = 'L2BMuMuFex - Fitted di-muon p_{T} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'FitVtxR', type = 'TH1F', - title = 'L2BMuMuFex - Fitted vertex R-position ; R [mm] ; # Candidates', - xbins = 100, xmin = 0., xmax = 10. ) ] - self.Histograms += [ defineHistogram ( 'FitVtxZ', type = 'TH1F', - title = 'L2BMuMuFex - Fitted vertex Z-position ; Z [mm] ; # Candidates', - xbins = 100, xmin = 0., xmax = 500. ) ] - - -class TrigL2BMuMuFexOnlineMonitoring_noid(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigL2BMuMuFexOnlineMonitoring_noid"): - super(TrigL2BMuMuFexOnlineMonitoring_noid, self).__init__(name) - self.defineTarget("Online") - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'L2BMuMuFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - title = 'L2BMuMuFex - Reached steps - acceptance ; ; # Events / Candidates', - xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - labels = ACCEPTANCE_labels ) ] - self.Histograms += [ defineHistogram ( 'ROIEta, ROIPhi', type = 'TH2F', - title = 'L2BMuMuFex - ROIs direction ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Roi1Roi2dEta, Roi1Roi2dPhi', type = 'TH2F', - title = 'L2BMuMuFex - ROI_{1}-ROI_{2} #Delta#eta#Delta#phi difference ; #Delta#eta ; #Delta#phi ; # ROIs', - xbins = 30, xmin = 0., xmax = 3.0, - ybins = 32, ymin = 0., ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Roi1Roi2dEta', type = 'TH1F', - title = 'L2BMuMuFex - ROI_{1}-ROI_{2} #Delta#eta difference ; #Delta#eta ; # ROIs', - xbins = 30, xmin = 0., xmax = 3.0 ) ] - self.Histograms += [ defineHistogram ( 'Roi1Roi2dPhi', type = 'TH1F', - title = 'L2BMuMuFex - ROI_{1}-ROI_{2} #Delta#phi difference ; #Delta#phi ; # ROIs', - xbins = 32, xmin = 0., xmax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Roi1Roi2dR', type = 'TH1F', - title = 'L2BMuMuFex - ROI_{1}-ROI_{2} #DeltaR difference ; #DeltaR ; # ROIs', - xbins = 50, xmin = 0., xmax = 5. ) ] - self.Histograms += [ defineHistogram ( 'MucombROIdR', type = 'TH1F', - title = 'L2BMuMuFex - CombinedMuon-ROI #DeltaR difference ; #DeltaR ; # Combined muons', - xbins = 50, xmin = 0., xmax = 1. ) ] - self.Histograms += [ defineHistogram ( 'MucombTrkdR', type = 'TH1F', - title = 'L2BMuMuFex - CombinedMuon-IDTrack #DeltaR difference ; #DeltaR ; # Muons with ID tracks', - xbins = 50, xmin = 0., xmax = 0.1 ) ] - self.Histograms += [ defineHistogram ( 'MutrkPt', type = 'TH1F', - title = 'L2BMuMuFex - Muon ID-Track p_{T} - low range ; p_{T} [GeV] ; # Muons with ID tracks', - xbins = 50, xmin = 0., xmax = 25. ) ] - self.Histograms += [ defineHistogram ( 'MutrkPt_wideRange', type = 'TH1F', - title = 'L2BMuMuFex - Muon ID-Track p_{T} ; p_{T} [GeV] ; # Muons with ID tracks', - xbins = 50, xmin = 0., xmax = 200. ) ] - self.Histograms += [ defineHistogram ( 'MutrkEta, MutrkPhi', type = 'TH2F', - title = 'L2BMuMuFex - Muon ID-Track direction ; #eta ; #phi ; # Muons with ID tracks', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - #self.Histograms += [ defineHistogram ( 'Mutrk1Mutrk2dEta', type = 'TH1F', - # title = 'L2BMuMuFex - Muon ID-Tracks #Delta#eta difference ; #Delta#eta ; # Di-muons', - # xbins = 30, xmin = 0., xmax = 3.0 ) ] - #self.Histograms += [ defineHistogram ( 'Mutrk1Mutrk2dPhi', type = 'TH1F', - # title = 'L2BMuMuFex - Muon ID-Tracks #Delta#phi difference ; #Delta#phi ; # Di-muons', - # xbins = 32, xmin = 0., xmax = 3.2 ) ] - #self.Histograms += [ defineHistogram ( 'Mutrk1Mutrk2dR', type = 'TH1F', - # title = 'L2BMuMuFex - Muon ID-Tracks #DeltaR difference ; #DeltaR ; # Di-muons', - # xbins = 50, xmin = 0., xmax = 5. ) ] - #self.Histograms += [ defineHistogram ( 'SumPtMutrk12', type = 'TH1F', - # title = 'L2BMuMuFex - Muon ID-Tracks sum of p_{T} ; p_{Ttrk1}+p_{Ttrk2} [GeV] ; # Di-muons', - # xbins = 50, xmin = 0., xmax = 100. ) ] - #self.Histograms += [ defineHistogram ( 'InvMass_comb', type = 'TH1F', - # title = 'L2BMuMuFex - Invariant mass of the Muon ID-Tracks - low range ; Mass [GeV] ; # Di-muons', - # xbins = 120, xmin = 0., xmax = 13. ) ] - #self.Histograms += [ defineHistogram ( 'InvMass_comb_wideRange', type = 'TH1F', - # title = 'L2BMuMuFex - Invariant mass of the Muon ID-Tracks ; Mass [GeV] ; # Di-muons', - # xbins = 100, xmin = 0., xmax = 100. ) ] - #self.Histograms += [ defineHistogram ( 'FitMass', type = 'TH1F', - # title = 'L2BMuMuFex - Fitted mass - low range ; Mass [GeV] ; # Candidates', - # xbins = 120, xmin = 0., xmax = 13. ) ] - #self.Histograms += [ defineHistogram ( 'FitMass_wideRange', type = 'TH1F', - # title = 'L2BMuMuFex - Fitted mass ; Mass [GeV] ; # Candidates', - # xbins = 100, xmin = 0., xmax = 100. ) ] - #self.Histograms += [ defineHistogram ( 'Chi2toNDoF', type = 'TH1F', - # title = 'L2BMuMuFex - Vertex fit #chi^{2}/_{NDoF} ; #chi^{2}/_{NDoF} ; # Candidates', - # xbins = 100, xmin = 0., xmax = 25. ) ] - #self.Histograms += [ defineHistogram ( 'FitTotalPt', type = 'TH1F', - # title = 'L2BMuMuFex - Fitted di-muon p_{T} ; p_{T} [GeV] ; # Candidates', - # xbins = 100, xmin = 0., xmax = 100. ) ] - #self.Histograms += [ defineHistogram ( 'FitVtxR', type = 'TH1F', - # title = 'L2BMuMuFex - Fitted vertex R-position ; R [mm] ; # Candidates', - # xbins = 100, xmin = 0., xmax = 10. ) ] - #self.Histograms += [ defineHistogram ( 'FitVtxZ', type = 'TH1F', - # title = 'L2BMuMuFex - Fitted vertex Z-position ; Z [mm] ; # Candidates', - # xbins = 100, xmin = 0., xmax = 500. ) ] - - -class TrigL2BMuMuFexOnlineMonitoring_passL2(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigL2BMuMuFexOnlineMonitoring_passL2"): - super(TrigL2BMuMuFexOnlineMonitoring_passL2, self).__init__(name) - self.defineTarget("Online") - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'L2BMuMuFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - title = 'L2BMuMuFex - Reached steps - acceptance ; ; # Events / Candidates', - xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - labels = ACCEPTANCE_labels ) ] \ No newline at end of file diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2BMuMuHypoConfig.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2BMuMuHypoConfig.py deleted file mode 100644 index b8f5435a380862faf1bf9f3cc0c3aa77363be0cb..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2BMuMuHypoConfig.py +++ /dev/null @@ -1,635 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from TrigBphysHypo.TrigBphysHypoConf import TrigL2BMuMuHypo - -class L2BMuMuHypo_1 (TrigL2BMuMuHypo): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_1"): - super( TrigL2BMuMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - self.AcceptSameMuon = True - - # L2 Bmumu cuts - self.LowerMassCut = 100. - self.UpperMassCut = 13000. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoValidationMonitoring - validation = TrigL2BMuMuHypoValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoOnlineMonitoring - online = TrigL2BMuMuHypoOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuHypo_Jpsi (TrigL2BMuMuHypo): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_Jpsi"): - super( TrigL2BMuMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - self.AcceptSameMuon = True - - # L2 Bmumu cuts - self.LowerMassCut = 2500. - self.UpperMassCut = 4300. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoValidationMonitoring - validation = TrigL2BMuMuHypoValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoOnlineMonitoring - online = TrigL2BMuMuHypoOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuHypo_Jpsi_noSameMu (L2BMuMuHypo_Jpsi): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_Jpsi_noSameMu"): - L2BMuMuHypo_Jpsi.__init__( self, name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptSameMuon = False - -class L2BMuMuHypo_Jpsi_noId (TrigL2BMuMuHypo): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_Jpsi_noId"): - super( TrigL2BMuMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 2500. - self.UpperMassCut = 4300. - self.ApplyUpperMassCut = True - self.ApplyChi2Cut = False - self.Chi2VtxCut = 0. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoValidationMonitoring - validation = TrigL2BMuMuHypoValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoOnlineMonitoring - online = TrigL2BMuMuHypoOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuHypo_Upsi (TrigL2BMuMuHypo): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_Upsi"): - super( TrigL2BMuMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - self.AcceptSameMuon = True - - # L2 Bmumu cuts - self.LowerMassCut = 8000. - self.UpperMassCut = 12000. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoValidationMonitoring - validation = TrigL2BMuMuHypoValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoOnlineMonitoring - online = TrigL2BMuMuHypoOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuHypo_B (TrigL2BMuMuHypo): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_B"): - super( TrigL2BMuMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - self.AcceptSameMuon = True - - # L2 Bmumu cuts - self.LowerMassCut = 4000. - self.UpperMassCut = 8500. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoValidationMonitoring - validation = TrigL2BMuMuHypoValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoOnlineMonitoring - online = TrigL2BMuMuHypoOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuHypo_Z (TrigL2BMuMuHypo): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_Z"): - super( TrigL2BMuMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 60000. - self.UpperMassCut = 120000. - self.ApplyUpperMassCut = True - self.ApplyChi2Cut = False - self.Chi2VtxCut = 0. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoValidationMonitoring - validation = TrigL2BMuMuHypoValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoOnlineMonitoring - online = TrigL2BMuMuHypoOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuHypo_DiMu (TrigL2BMuMuHypo): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_DiMu"): - super( TrigL2BMuMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - self.AcceptSameMuon = True - - # L2 Bmumu cuts - self.LowerMassCut = 1500. - self.UpperMassCut = 14000. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoValidationMonitoring - validation = TrigL2BMuMuHypoValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoOnlineMonitoring - online = TrigL2BMuMuHypoOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuHypo_DiMu_DY (TrigL2BMuMuHypo): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_DiMu_DY"): - super( TrigL2BMuMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 10000. - self.UpperMassCut = 120000. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoValidationMonitoring - validation = TrigL2BMuMuHypoValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoOnlineMonitoring - online = TrigL2BMuMuHypoOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuHypo_DiMu_DY25 (TrigL2BMuMuHypo): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_DiMu_DY25"): - super( TrigL2BMuMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 25000. - self.UpperMassCut = 120000. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoValidationMonitoring - validation = TrigL2BMuMuHypoValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoOnlineMonitoring - online = TrigL2BMuMuHypoOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuHypo_DiMu_DY20 (TrigL2BMuMuHypo): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_DiMu_DY20"): - super( TrigL2BMuMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 20000. - self.UpperMassCut = 120000. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoValidationMonitoring - validation = TrigL2BMuMuHypoValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoOnlineMonitoring - online = TrigL2BMuMuHypoOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuHypo_DiMu_DY14 (TrigL2BMuMuHypo): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_DiMu_DY14"): - super( TrigL2BMuMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 14000. - self.UpperMassCut = 120000. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoValidationMonitoring - validation = TrigL2BMuMuHypoValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoOnlineMonitoring - online = TrigL2BMuMuHypoOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuHypo_DiMu_noVtx (TrigL2BMuMuHypo): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_DiMu_noVtx"): - super( TrigL2BMuMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - self.AcceptSameMuon = True - - # L2 Bmumu cuts - self.LowerMassCut = 1500. - self.UpperMassCut = 14000. - self.ApplyUpperMassCut = True - self.ApplyChi2Cut = False - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoValidationMonitoring - validation = TrigL2BMuMuHypoValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoOnlineMonitoring - online = TrigL2BMuMuHypoOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuHypo_DiMu_DY_noVtx (TrigL2BMuMuHypo): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_DiMu_DY_noVtx"): - super( TrigL2BMuMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 10000. - self.UpperMassCut = 140000. - self.ApplyUpperMassCut = True - self.ApplyChi2Cut = False - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoValidationMonitoring - validation = TrigL2BMuMuHypoValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoOnlineMonitoring - online = TrigL2BMuMuHypoOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuHypo_DiMu_DY14_noVtx (TrigL2BMuMuHypo): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_DiMu_DY14_noVtx"): - super( TrigL2BMuMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 14000. - self.UpperMassCut = 140000. - self.ApplyUpperMassCut = True - self.ApplyChi2Cut = False - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoValidationMonitoring - validation = TrigL2BMuMuHypoValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoOnlineMonitoring - online = TrigL2BMuMuHypoOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuHypo_DiMu_7invm9_noVtx (TrigL2BMuMuHypo): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_DiMu_7invm9_noVtx"): - super( TrigL2BMuMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 7000. - self.UpperMassCut = 9000. - self.ApplyUpperMassCut = True - self.ApplyChi2Cut = False - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoValidationMonitoring - validation = TrigL2BMuMuHypoValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoOnlineMonitoring - online = TrigL2BMuMuHypoOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuHypo_DiMu_7invm9 (L2BMuMuHypo_DiMu_7invm9_noVtx): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_DiMu_7invm9"): - super( L2BMuMuHypo_DiMu_7invm9, self ).__init__( name ) - - # L2 Bmumu cuts - self.ApplyChi2Cut = True - - -class L2BMuMuHypo_DiMu_11invm60_noVtx (TrigL2BMuMuHypo): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_DiMu_11invm60_noVtx"): - super( TrigL2BMuMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 11000. - self.UpperMassCut = 60000. - self.ApplyUpperMassCut = True - self.ApplyChi2Cut = False - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoValidationMonitoring - validation = TrigL2BMuMuHypoValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoOnlineMonitoring - online = TrigL2BMuMuHypoOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuHypo_DiMu_11invm60 (L2BMuMuHypo_DiMu_11invm60_noVtx): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_DiMu_11invm60"): - super( L2BMuMuHypo_DiMu_11invm60, self ).__init__( name ) - - # L2 Bmumu cuts - self.ApplyChi2Cut = True - - -class L2BMuMuHypo_DiMu_11invm24_noVtx (L2BMuMuHypo_DiMu_11invm60_noVtx): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_DiMu_11invm24_noVtx"): - super( L2BMuMuHypo_DiMu_11invm24_noVtx, self ).__init__( name ) - - # L2 Bmumu cuts - self.LowerMassCut = 11000. - self.UpperMassCut = 24000. - -class L2BMuMuHypo_DiMu_11invm24 (L2BMuMuHypo_DiMu_11invm24_noVtx): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_DiMu_11invm24"): - super( L2BMuMuHypo_DiMu_11invm24, self ).__init__( name ) - - # L2 Bmumu cuts - self.ApplyChi2Cut = True - - -class L2BMuMuHypo_DiMu_24invm60_noVtx (L2BMuMuHypo_DiMu_11invm60_noVtx): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_DiMu_24invm60_noVtx"): - super( L2BMuMuHypo_DiMu_24invm60_noVtx, self ).__init__( name ) - - # L2 Bmumu cuts - self.LowerMassCut = 24000. - self.UpperMassCut = 60000. - -class L2BMuMuHypo_DiMu_24invm60 (L2BMuMuHypo_DiMu_24invm60_noVtx): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_DiMu_24invm60"): - super( L2BMuMuHypo_DiMu_24invm60, self ).__init__( name ) - - # L2 Bmumu cuts - self.ApplyChi2Cut = True - - -class L2BMuMuHypo_DiMu_18invm60_noVtx (TrigL2BMuMuHypo): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_DiMu_18invm60_noVtx"): - super( TrigL2BMuMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 18000. - self.UpperMassCut = 60000. - self.ApplyUpperMassCut = True - self.ApplyChi2Cut = False - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoValidationMonitoring - validation = TrigL2BMuMuHypoValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoOnlineMonitoring - online = TrigL2BMuMuHypoOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - - - -class L2BMuMuHypo_Jpsi_passL2 (TrigL2BMuMuHypo): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_Jpsi_passL2"): - super( TrigL2BMuMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = True - - # L2 Bmumu cuts - self.LowerMassCut = 2500. - self.UpperMassCut = 4300. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoValidationMonitoring - validation = TrigL2BMuMuHypoValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoOnlineMonitoring - online = TrigL2BMuMuHypoOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuHypo_Upsi_passL2 (TrigL2BMuMuHypo): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_Upsi_passL2"): - super( TrigL2BMuMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = True - - # L2 Bmumu cuts - self.LowerMassCut = 8000. - self.UpperMassCut = 12000. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoValidationMonitoring - validation = TrigL2BMuMuHypoValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoOnlineMonitoring - online = TrigL2BMuMuHypoOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuHypo_B_passL2 (TrigL2BMuMuHypo): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_B_passL2"): - super( TrigL2BMuMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = True - - # L2 Bmumu cuts - self.LowerMassCut = 4000. - self.UpperMassCut = 8500. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoValidationMonitoring - validation = TrigL2BMuMuHypoValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoOnlineMonitoring - online = TrigL2BMuMuHypoOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuHypo_DiMu_passL2 (TrigL2BMuMuHypo): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_DiMu_passL2"): - super( TrigL2BMuMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = True - - # L2 Bmumu cuts - self.LowerMassCut = 1500. - self.UpperMassCut = 14000. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoValidationMonitoring - validation = TrigL2BMuMuHypoValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoOnlineMonitoring - online = TrigL2BMuMuHypoOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuHypo_DiMu_noVtx_passL2 (TrigL2BMuMuHypo): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_DiMu_noVtx_passL2"): - super( TrigL2BMuMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = True - - # L2 Bmumu cuts - self.LowerMassCut = 1500. - self.UpperMassCut = 14000. - self.ApplyUpperMassCut = True - self.ApplyChi2Cut = False - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoValidationMonitoring - validation = TrigL2BMuMuHypoValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoOnlineMonitoring - online = TrigL2BMuMuHypoOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuHypo_Z_passL2 (TrigL2BMuMuHypo): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_Jpsi_passL2"): - super( TrigL2BMuMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = True - - # L2 Bmumu cuts - self.LowerMassCut = 60000. - self.UpperMassCut = 120000. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoValidationMonitoring - validation = TrigL2BMuMuHypoValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoOnlineMonitoring - online = TrigL2BMuMuHypoOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2BMuMuHypo_DiMu_noinvm_noVtx (TrigL2BMuMuHypo): - __slots__ = [] - def __init__(self, name = "L2BMuMuHypo_DiMu_noinvm_noVtx"): - super( TrigL2BMuMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 0. - self.UpperMassCut = 14000. - self.ApplyUpperMassCut = False - self.ApplyChi2Cut = False - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoValidationMonitoring - validation = TrigL2BMuMuHypoValidationMonitoring() - from TrigBphysHypo.TrigL2BMuMuHypoMonitoring import TrigL2BMuMuHypoOnlineMonitoring - online = TrigL2BMuMuHypoOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2BMuMuHypoMonitoring.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2BMuMuHypoMonitoring.py deleted file mode 100644 index ee7dabecc7a8116dcb66c43876063f91f7c41ed4..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2BMuMuHypoMonitoring.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig - -class TrigL2BMuMuHypoValidationMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigL2BMuMuHypoValidationMonitoring"): - super(TrigL2BMuMuHypoValidationMonitoring, self).__init__(name) - self.defineTarget("Validation") - self.Histograms = [ defineHistogram('CutCounter', type='TH1F', title= "cuts counter", xbins=8, xmin=-1.5, xmax=6.5) ] - self.Histograms += [ defineHistogram('MuMumass', type='TH1F', title="L2BMuMuHypo inv.mass(mumu) [GeV]", - xbins=100, xmin=0., xmax=13.) ] - -class TrigL2BMuMuHypoOnlineMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigL2BMuMuHypoOnlineMonitoring"): - super(TrigL2BMuMuHypoOnlineMonitoring, self).__init__(name) - self.defineTarget("Online") - self.Histograms = [ defineHistogram('CutCounter', type='TH1F', title= "cuts counter", xbins=8, xmin=-1.5, xmax=6.5) ] - self.Histograms += [ defineHistogram('MuMumass', type='TH1F', title="L2BMuMuHypo inv.mass(mumu) [GeV]", - xbins=100, xmin=0., xmax=13.) ] diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2BMuMuXFexConfig.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2BMuMuXFexConfig.py deleted file mode 100644 index 3df81c46a87b92634d015733e6ef895a4b0ae211..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2BMuMuXFexConfig.py +++ /dev/null @@ -1,599 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -# -*- coding: utf-8 -*- -from TrigBphysHypo.TrigBphysHypoConf import TrigL2BMuMuXFex - -from TrigVertexFitter.TrigVertexFitterConf import TrigVertexFitter -from TrigVertexFitter.TrigVertexFitterConf import TrigL2VertexFitter -from TrigVertexFitter.TrigVertexFitterConf import TrigVertexingTool - -VFitTool = TrigVertexFitter() -L2VFitTool = TrigL2VertexFitter() -VertexTool = TrigVertexingTool() - -from AthenaCommon.AppMgr import ToolSvc - -ToolSvc += L2VFitTool -ToolSvc += VFitTool -ToolSvc += VertexTool - -class L2BMuMuXFex_1 (TrigL2BMuMuXFex): - __slots__ = [] - def __init__(self, name = "L2BMuMuXFex_1"): - super( TrigL2BMuMuXFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # Timeout protection: maximum number of track combinations to try - self.MaxNcombinations = 10000 - # muon part - self.OppositeSign = True # if check opposite sign of muons - ##self.CutMuonTightness = 0.01 # how tight dR of muon and ID tracks have to be to eliminate it - self.LowerMuMuMassCut = 100. - self.UpperMuMuMassCut = 5500. - self.LowerMuVtxMassCut = 100. - self.UpperMuVtxMassCut = 5500. - self.MuVtxChi2Cut = 40. - # B{+/-} -> K{+/-} Mu Mu - self.DoB_KMuMuDecay = True - self.LowerKMuMuMassCut = 4400. - self.UpperKMuMuMassCut = 5900. - self.LowerB_KMuMuMassCutVtxOff = 4400. - self.UpperB_KMuMuMassCutVtxOff = 5900. - self.LowerBVtxMassCut = 4400. - self.UpperBVtxMassCut = 5900. - self.BVtxChi2Cut = 60. - # Bd -> K*(892) Mu Mu - self.DoBd_KstarMuMuDecay = True - self.LowerKstar_KaonMassCut = 650. - self.UpperKstar_KaonMassCut = 1150. - self.LowerBd_KstarMuMuMassCut = 4500. - self.UpperBd_KstarMuMuMassCut = 6000. - self.LowerBd_KstarMuMuMassCutVtxOff = 4500. - self.UpperBd_KstarMuMuMassCutVtxOff = 6000. - self.LowerKstarVtxMassCut = 700. - self.UpperKstarVtxMassCut = 1100. - self.LowerBdVtxMassCut = 4500. - self.UpperBdVtxMassCut = 6000. - self.KstarVtxChi2Cut = 400. - self.BdVtxChi2Cut = 60. - # Bs -> Phi(1020) Mu Mu - self.DoBs_Phi1020MuMuDecay = True - self.LowerPhi1020_KaonMassCut = 900.#990 - self.UpperPhi1020_KaonMassCut = 1140.#1050 - self.LowerBs_Phi1020MuMuMassCut = 4700. - self.UpperBs_Phi1020MuMuMassCut = 6000. - self.LowerBs_Phi1020MuMuMassCutVtxOff = 4700. - self.UpperBs_Phi1020MuMuMassCutVtxOff = 6000. - self.LowerPhi1020VtxMassCut = 900.#990 - self.UpperPhi1020VtxMassCut = 1140.#1050 - self.LowerBsVtxMassCut = 4700. - self.UpperBsVtxMassCut = 6000. - self.Phi1020VtxChi2Cut = 400. - self.BsVtxChi2Cut = 60. - # Lb -> L Mu Mu - self.DoLb_LambdaMuMuDecay = True - self.LowerLambda_PrPiMassCut = 1000. - self.UpperLambda_PrPiMassCut = 1240. - self.LowerLb_LambdaMuMuMassCut = 5000. - self.UpperLb_LambdaMuMuMassCut = 6200. - self.LowerLambdaVtxMassCut = 1000. - self.UpperLambdaVtxMassCut = 1240. - self.LowerLbVtxMassCut = 5000. - self.UpperLbVtxMassCut = 6200. - self.LambdaVtxChi2Cut = 400. - self.LbVtxChi2Cut = 60. - #self.LbVtxDistanceCut = 0. - #self.PiImpactCut = 0. - #self.PrImpactCut = 0. - # vertexing off - self.LowerLb_LambdaMuMuMassCutVtxOff = 5000. - self.UpperLb_LambdaMuMuMassCutVtxOff = 6200. - # Bc -> Ds* Mu Mu - self.DoBc_DsMuMuDecay = False - self.LowerPhiDs_MassCut = 980. - self.UpperPhiDs_MassCut = 1080. - self.LowerDs_MassCut = 1550. - self.UpperDs_MassCut = 2450. - self.LowerBc_DsMuMuMassCut = 1750. - self.UpperBc_DsMuMuMassCut = 7100. - self.LowerBc_DsMuMuMassCutVtxOff = 1800. - self.UpperBc_DsMuMuMassCutVtxOff = 7100. - self.LowerDsVtxMassCut = 1600. - self.UpperDsVtxMassCut = 2400. - self.LowerBcVtxMassCut = 1800. - self.UpperBcVtxMassCut = 7050. - self.DsVtxChi2Cut = 90. - self.BcVtxChi2Cut = 120. - # vertexing - #self.DoVertexFit = True - #self.DoMuMuVertexFit = True - #self.DoB_KMuMuVertexFit = True - #self.DoKstar_KaonPionVertexFit = True - #self.DoBd_KstarMuMuVertexFit = True - #self.DoPhi1020_KaonKaonVertexFit = True - #self.DoBs_Phi1020MuMuVertexFit = True - #self.DoLambda_ProtonPionVertexFit = True - #self.DoLb_LambdaMuMuVertexFit = True - #self.DoDs_PhiPionVertexFit = True - #self.DoBc_DsMuMuVertexFit = True - - from TrigBphysHypo.TrigL2BMuMuXFexMonitoring import TrigL2BMuMuXFexValidationMonitoring - validation = TrigL2BMuMuXFexValidationMonitoring() - - from TrigBphysHypo.TrigL2BMuMuXFexMonitoring import TrigL2BMuMuXFexOnlineMonitoring - online = TrigL2BMuMuXFexOnlineMonitoring() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [validation, online, time] - - -class L2BMuMuXFex_EF (TrigL2BMuMuXFex): - __slots__ = [] - def __init__(self, name = "L2BMuMuXFex_EF"): - super( TrigL2BMuMuXFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # Timeout protection: maximum number of track combinations to try - self.MaxNcombinations = 10000 - # muon part - self.OppositeSign = True # if check opposite sign of muons - ##self.CutMuonTightness = 0.01 # how tight dR of muon and ID tracks have to be to eliminate it - self.LowerMuMuMassCut = 100. - self.UpperMuMuMassCut = 5500. - self.LowerMuVtxMassCut = 100. - self.UpperMuVtxMassCut = 5500. - self.MuVtxChi2Cut = 40. - # B{+/-} -> K{+/-} Mu Mu - self.DoB_KMuMuDecay = True - self.LowerKMuMuMassCut = 4400. - self.UpperKMuMuMassCut = 5800. - self.LowerB_KMuMuMassCutVtxOff = 4400. - self.UpperB_KMuMuMassCutVtxOff = 5800. - self.LowerBVtxMassCut = 4400. - self.UpperBVtxMassCut = 5800. - self.BVtxChi2Cut = 60. - # Bd -> K*(892) Mu Mu - self.DoBd_KstarMuMuDecay = True - self.LowerKstar_KaonMassCut = 650. - self.UpperKstar_KaonMassCut = 1150. - self.LowerBd_KstarMuMuMassCut = 4600. - self.UpperBd_KstarMuMuMassCut = 5900. - self.LowerBd_KstarMuMuMassCutVtxOff = 4600. - self.UpperBd_KstarMuMuMassCutVtxOff = 5900. - self.LowerKstarVtxMassCut = 700. - self.UpperKstarVtxMassCut = 1100. - self.LowerBdVtxMassCut = 4600. - self.UpperBdVtxMassCut = 5900. - self.KstarVtxChi2Cut = 400. - self.BdVtxChi2Cut = 60. - # Bs -> Phi(1020) Mu Mu - self.DoBs_Phi1020MuMuDecay = True - self.LowerPhi1020_KaonMassCut = 940.#990 - self.UpperPhi1020_KaonMassCut = 1100.#1050 - self.LowerBs_Phi1020MuMuMassCut = 4700. - self.UpperBs_Phi1020MuMuMassCut = 5800. - self.LowerBs_Phi1020MuMuMassCutVtxOff = 4700. - self.UpperBs_Phi1020MuMuMassCutVtxOff = 5800. - self.LowerPhi1020VtxMassCut = 940.#990 - self.UpperPhi1020VtxMassCut = 1100.#1050 - self.LowerBsVtxMassCut = 4700. - self.UpperBsVtxMassCut = 5800. - self.Phi1020VtxChi2Cut = 400. - self.BsVtxChi2Cut = 60. - # Lb -> L Mu Mu - self.DoLb_LambdaMuMuDecay = True - self.LowerLambda_PrPiMassCut = 1040. - self.UpperLambda_PrPiMassCut = 1200. - self.LowerLb_LambdaMuMuMassCut = 5100. - self.UpperLb_LambdaMuMuMassCut = 6100. - self.LowerLambdaVtxMassCut = 1040. - self.UpperLambdaVtxMassCut = 1200. - self.LowerLbVtxMassCut = 5100. - self.UpperLbVtxMassCut = 6100. - self.LambdaVtxChi2Cut = 400. - self.LbVtxChi2Cut = 60. - #self.LbVtxDistanceCut = 0. - #self.PiImpactCut = 0. - #self.PrImpactCut = 0. - # vertexing off - self.LowerLb_LambdaMuMuMassCutVtxOff = 5000. - self.UpperLb_LambdaMuMuMassCutVtxOff = 6200. - # Bc -> Ds* Mu Mu - self.DoBc_DsMuMuDecay = False - self.LowerPhiDs_MassCut = 980. - self.UpperPhiDs_MassCut = 1080. - self.LowerDs_MassCut = 1600. - self.UpperDs_MassCut = 2400. - self.LowerBc_DsMuMuMassCut = 1800. - self.UpperBc_DsMuMuMassCut = 7050. - self.LowerBc_DsMuMuMassCutVtxOff = 1800. - self.UpperBc_DsMuMuMassCutVtxOff = 7050. - self.LowerDsVtxMassCut = 1600. - self.UpperDsVtxMassCut = 2400. - self.LowerBcVtxMassCut = 1800. - self.UpperBcVtxMassCut = 7050. - self.DsVtxChi2Cut = 90. - self.BcVtxChi2Cut = 120. - # vertexing - self.DoVertexFit = True - self.DoMuMuVertexFit = True - self.DoB_KMuMuVertexFit = True - self.DoKstar_KaonPionVertexFit = True - self.DoBd_KstarMuMuVertexFit = True - self.DoPhi1020_KaonKaonVertexFit = True - self.DoBs_Phi1020MuMuVertexFit = True - self.DoLambda_ProtonPionVertexFit = True - self.DoLb_LambdaMuMuVertexFit = False - self.DoDs_PhiPionVertexFit = True - self.DoBc_DsMuMuVertexFit = True - - from TrigBphysHypo.TrigL2BMuMuXFexMonitoring import TrigL2BMuMuXFexValidationMonitoring - validation = TrigL2BMuMuXFexValidationMonitoring() - - from TrigBphysHypo.TrigL2BMuMuXFexMonitoring import TrigL2BMuMuXFexOnlineMonitoring - online = TrigL2BMuMuXFexOnlineMonitoring() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [validation, online, time] - - -class L2BMuMuXFex_allModes (L2BMuMuXFex_1): - __slots__ = [] - def __init__(self, name = "L2BMuMuXFex_allModes"): - L2BMuMuXFex_1.__init__(self, name ) - - # Bc -> Ds* Mu Mu - self.DoBc_DsMuMuDecay = True - - -class L2BMuMuXFex_BplusMuMuKplus (L2BMuMuXFex_1): - __slots__ = [] - def __init__(self, name = "L2BMuMuXFex_BplusMuMuKplus"): - L2BMuMuXFex_1.__init__(self, name ) - - # B{+/-} -> K{+/-} Mu Mu - self.DoB_KMuMuDecay = True - # Bd -> K*(892) Mu Mu - self.DoBd_KstarMuMuDecay = False - # Bs -> Phi(1020) Mu Mu - self.DoBs_Phi1020MuMuDecay = False - # Lb -> L Mu Mu - self.DoLb_LambdaMuMuDecay = False - # Bc -> Ds* Mu Mu - self.DoBc_DsMuMuDecay = False - - -class L2BMuMuXFex_allModes_tightBc (L2BMuMuXFex_allModes): - __slots__ = [] - def __init__(self, name = "L2BMuMuXFex_allModes_tightBc"): - L2BMuMuXFex_allModes.__init__(self, name ) - - # Bc -> Ds* Mu Mu - self.LowerBc_DsMuMuMassCut = 5350. - self.LowerBc_DsMuMuMassCutVtxOff = 5400. - self.LowerBcVtxMassCut = 5400. - - -class L2BMuMuXFex_BcMuMuDs (TrigL2BMuMuXFex): - __slots__ = [] - def __init__(self, name = "L2BMuMuXFex_BcMuMuDs"): - super( TrigL2BMuMuXFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # Timeout protection: maximum number of track combinations to try - self.MaxNcombinations = 10000 - # muon part - self.OppositeSign = True # if check opposite sign of muons - ##self.CutMuonTightness = 0.01 # how tight dR of muon and ID tracks have to be to eliminate it - self.LowerMuMuMassCut = 100. - self.UpperMuMuMassCut = 5500. - self.LowerMuVtxMassCut = 100. - self.UpperMuVtxMassCut = 5500. - self.MuVtxChi2Cut = 40. - # B{+/-} -> K{+/-} Mu Mu - self.DoB_KMuMuDecay = False - # Bd -> K*(892) Mu Mu - self.DoBd_KstarMuMuDecay = False - # Bs -> Phi(1020) Mu Mu - self.DoBs_Phi1020MuMuDecay = False - # Lb -> L Mu Mu - self.DoLb_LambdaMuMuDecay = False - # Bc -> Ds* Mu Mu - self.DoBc_DsMuMuDecay = True - self.LowerPhiDs_MassCut = 980. - self.UpperPhiDs_MassCut = 1080. - self.LowerDs_MassCut = 1550. - self.UpperDs_MassCut = 2450. - self.LowerBc_DsMuMuMassCut = 1750. - self.UpperBc_DsMuMuMassCut = 7100. - self.LowerBc_DsMuMuMassCutVtxOff = 1800. - self.UpperBc_DsMuMuMassCutVtxOff = 7100. - self.LowerDsVtxMassCut = 1600. - self.UpperDsVtxMassCut = 2400. - self.LowerBcVtxMassCut = 1800. - self.UpperBcVtxMassCut = 7050. - self.DsVtxChi2Cut = 90. - self.BcVtxChi2Cut = 120. - # vertexing - #self.DoVertexFit = True - #self.DoMuMuVertexFit = True - #self.DoB_KMuMuVertexFit = True - #self.DoKstar_KaonPionVertexFit = True - #self.DoBd_KstarMuMuVertexFit = True - #self.DoPhi1020_KaonKaonVertexFit = True - #self.DoBs_Phi1020MuMuVertexFit = True - #self.DoLambda_ProtonPionVertexFit = True - #self.DoLb_LambdaMuMuVertexFit = True - #self.DoDs_PhiPionVertexFit = True - #self.DoBc_DsMuMuVertexFit = True - - from TrigBphysHypo.TrigL2BMuMuXFexMonitoring import TrigL2BMuMuXFexValidationMonitoring - validation = TrigL2BMuMuXFexValidationMonitoring() - - from TrigBphysHypo.TrigL2BMuMuXFexMonitoring import TrigL2BMuMuXFexOnlineMonitoring - online = TrigL2BMuMuXFexOnlineMonitoring() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [validation, online, time] - - -class L2BMuMuXFex_BcMuMuDs_tight (L2BMuMuXFex_BcMuMuDs): - __slots__ = [] - def __init__(self, name = "L2BMuMuXFex_BcMuMuDs_tight"): - L2BMuMuXFex_BcMuMuDs.__init__(self, name ) - - # Bc -> Ds* Mu Mu - self.LowerBc_DsMuMuMassCut = 5350. - self.LowerBc_DsMuMuMassCutVtxOff = 5400. - self.LowerBcVtxMassCut = 5400. - - -# self.TrigVertexFitter = VFitTool -class L2BMuMuXFex_noVtx (TrigL2BMuMuXFex): - __slots__ = [] - def __init__(self, name = "L2BMuMuXFex_noVtx"): - super( TrigL2BMuMuXFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # muon part - self.OppositeSign = True # if check opposite sign of muons - ##self.CutMuonTightness = 0.01 # how tight dR of muon and ID tracks have to be to eliminate it - self.LowerMuMuMassCut = 100. - self.UpperMuMuMassCut = 5500. - self.LowerMuVtxMassCut = 100. - self.UpperMuVtxMassCut = 5500. - self.MuVtxChi2Cut = 40. - # B{+/-} -> K{+/-} Mu Mu - self.DoB_KMuMuDecay = True - self.LowerKMuMuMassCut = 4500. - self.UpperKMuMuMassCut = 5900. - self.LowerKMuMuMassCutVtxOff = 4500. - self.UpperKMuMuMassCutVtxOff = 5900. - self.LowerBVtxMassCut = 4500. - self.UpperBVtxMassCut = 5900. - self.BVtxChi2Cut = 300. - # Bd -> K*(892) Mu Mu - self.DoBd_KstarMuMuDecay = True - self.LowerKstar_KaonMassCut = 600. - self.UpperKstar_KaonMassCut = 1500. - self.LowerBd_KstarMuMuMassCut = 4600. - self.UpperBd_KstarMuMuMassCut = 6300. - self.LowerBd_KstarMuMuMassCutVertexingOff = 4600. - self.UpperBd_KstarMuMuMassCutVertexingOff = 6300. - self.LowerKstarVtxMassCut = 600. - self.UpperKstarVtxMassCut = 1200. - self.LowerBdVtxMassCut = 4600. - self.UpperBdVtxMassCut = 6000. - self.KstarVtxChi2Cut = 40. - self.BdVtxChi2Cut = 60. - # Bs -> Phi(1020) Mu Mu - self.DoBs_Phi1020MuMuDecay = True - self.LowerPhi1020_KaonMassCut = 990. - self.UpperPhi1020_KaonMassCut = 1050. - self.LowerBs_Phi1020MuMuMassCut = 5000. - self.UpperBs_Phi1020MuMuMassCut = 5800. - self.LowerBs_Phi1020MuMuMassCutVertexingOff = 5000. - self.UpperBs_Phi1020MuMuMassCutVertexingOff = 5800. - self.LowerPhi1020VtxMassCut = 990. - self.UpperPhi1020VtxMassCut = 1060. - self.LowerBsVtxMassCut = 4600. - self.UpperBsVtxMassCut = 6000. - self.Phi1020VtxChi2Cut = 40. - self.BsVtxChi2Cut = 60. - # Lb -> L Mu Mu - self.DoLb_LambdaMuMuDecay = True - self.LowerLambda_PrPiMassCut = 1040. - self.UpperLambda_PrPiMassCut = 1220. - self.LowerLb_LambdaMuMuMassCut = 5090. - self.UpperLb_LambdaMuMuMassCut = 6270. - self.LowerLambdaVtxMassCut = 1070. - self.UpperLambdaVtxMassCut = 1160. - self.LowerLbVtxMassCut = 4800. - self.UpperLbVtxMassCut = 6100. - self.LambdaVtxChi2Cut = 100. - self.LbVtxChi2Cut = 100. - #self.LbVtxDistanceCut = 0. - #self.PiImpactCut = 0. - #self.PrImpactCut = 0. - # vertexing off - self.LowerLb_LambdaMuMuMassCutVtxOff = 2000. - self.UpperLb_LambdaMuMuMassCutVtxOff = 8000. - # Bc -> Ds* Mu Mu - self.DoBc_DsMuMuDecay = False - self.LowerPhiDs_MassCut = 980. - self.UpperPhiDs_MassCut = 1080. - self.LowerDs_MassCut = 1550. - self.UpperDs_MassCut = 2450. - self.LowerBc_DsMuMuMassCut = 1750. - self.UpperBc_DsMuMuMassCut = 7100. - self.LowerBc_DsMuMuMassCutVtxOff = 1800. - self.UpperBc_DsMuMuMassCutVtxOff = 7100. - self.LowerDsVtxMassCut = 1600. - self.UpperDsVtxMassCut = 2400. - self.LowerBcVtxMassCut = 1800. - self.UpperBcVtxMassCut = 7050. - self.DsVtxChi2Cut = 90. - self.BcVtxChi2Cut = 120. - #vertexing - #self.DoVertexFit = False - #self.DoMuMuVertexFit = False - #self.DoB_KMuMuVertexFit = False - #self.DoKstar_KaonPionVertexFit = False - #self.DoBd_KstarMuMuVertexFit = False - #self.DoPhi1020_KaonKaonVertexFit = False - #self.DoBs_Phi1020MuMuVertexFit = False - #self.DoLambda_ProtonPionVertexFit = False - #self.DoLb_LambdaMuMuVertexFit = False - #self.DoDs_PhiPionVertexFit = False - #self.DoBc_DsMuMuVertexFit = False - - from TrigBphysHypo.TrigL2BMuMuXFexMonitoring import TrigL2BMuMuXFexValidationMonitoring_noVtx - validation = TrigL2BMuMuXFexValidationMonitoring_noVtx() - - from TrigBphysHypo.TrigL2BMuMuXFexMonitoring import TrigL2BMuMuXFexOnlineMonitoring_noVtx - online = TrigL2BMuMuXFexOnlineMonitoring_noVtx() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [validation, online, time] - - -# self.TrigVertexFitter = VFitTool - - -class L2BMuMuXFex_noVtx_noOS (TrigL2BMuMuXFex): - __slots__ = [] - def __init__(self, name = "L2BMuMuXFex_noVtx_noOS"): - super( TrigL2BMuMuXFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # muon part - self.OppositeSign = False # if check opposite sign of muons - #self.CutMuonTightness = 0.01 # how tight dR of muon and ID tracks have to be to eliminate it - self.LowerMuMuMassCut = 100. - self.UpperMuMuMassCut = 5500. - self.LowerMuVtxMassCut = 100. - self.UpperMuVtxMassCut = 5500. - self.MuVtxChi2Cut = 40. - # B{+/-} -> K{+/-} Mu Mu - self.DoB_KMuMuDecay = True - self.LowerKMuMuMassCut = 4500. - self.UpperKMuMuMassCut = 5900. - self.LowerB_KMuMuMassCutVtxOff = 4500. - self.UpperB_KMuMuMassCutVtxOff = 5900. - self.LowerBVtxMassCut = 4500. - self.UpperBVtxMassCut = 5900. - self.BVtxChi2Cut = 300. - # Bd -> K*(892) Mu Mu - self.DoBd_KstarMuMuDecay = True - self.LowerKstar_KaonMassCut = 600. - self.UpperKstar_KaonMassCut = 1500. - self.LowerBd_KstarMuMuMassCut = 4600. - self.UpperBd_KstarMuMuMassCut = 6300. - self.LowerBd_KstarMuMuMassCutVtxOff = 4600. - self.UpperBd_KstarMuMuMassCutVtxOff = 6300. - self.LowerKstarVtxMassCut = 600. - self.UpperKstarVtxMassCut = 1200. - self.LowerBdVtxMassCut = 4600. - self.UpperBdVtxMassCut = 6000. - self.KstarVtxChi2Cut = 40. - self.BdVtxChi2Cut = 60. - # Bs -> Phi(1020) Mu Mu - self.DoBs_Phi1020MuMuDecay = True - self.LowerPhi1020_KaonMassCut = 990. - self.UpperPhi1020_KaonMassCut = 1050. - self.LowerBs_Phi1020MuMuMassCut = 5000. - self.UpperBs_Phi1020MuMuMassCut = 5800. - self.LowerBs_Phi1020MuMuMassCutVtxOff = 5000. - self.UpperBs_Phi1020MuMuMassCutVtxOff = 5800. - self.LowerPhi1020VtxMassCut = 990. - self.UpperPhi1020VtxMassCut = 1060. - self.LowerBsVtxMassCut = 4600. - self.UpperBsVtxMassCut = 6000. - self.Phi1020VtxChi2Cut = 40. - self.BsVtxChi2Cut = 60. - # Lb -> L Mu Mu - self.DoLb_LambdaMuMuDecay = True - self.LowerLambda_PrPiMassCut = 1040. - self.UpperLambda_PrPiMassCut = 1220. - self.LowerLb_LambdaMuMuMassCut = 5090. - self.UpperLb_LambdaMuMuMassCut = 6270. - self.LowerLambdaVtxMassCut = 1070. - self.UpperLambdaVtxMassCut = 1160. - self.LowerLbVtxMassCut = 4800. - self.UpperLbVtxMassCut = 6100. - self.LambdaVtxChi2Cut = 100. - self.LbVtxChi2Cut = 100. - #self.LbVtxDistanceCut = 0. - #self.PiImpactCut = 0. - #self.PrImpactCut = 0. - # vertexing off - self.LowerLb_LambdaMuMuMassCutVtxOff = 2000. - self.UpperLb_LambdaMuMuMassCutVtxOff = 8000. - # Bc -> Ds* Mu Mu - self.DoBc_DsMuMuDecay = False - self.LowerPhiDs_MassCut = 980. - self.UpperPhiDs_MassCut = 1080. - self.LowerDs_MassCut = 1550. - self.UpperDs_MassCut = 2450. - self.LowerBc_DsMuMuMassCut = 1750. - self.UpperBc_DsMuMuMassCut = 7100. - self.LowerBc_DsMuMuMassCutVtxOff = 1800. - self.UpperBc_DsMuMuMassCutVtxOff = 7100. - self.LowerDsVtxMassCut = 1600. - self.UpperDsVtxMassCut = 2400. - self.LowerBcVtxMassCut = 1800. - self.UpperBcVtxMassCut = 7050. - self.DsVtxChi2Cut = 90. - self.BcVtxChi2Cut = 120. - #vertexing - #self.DoVertexFit = False - #self.DoMuMuVertexFit = False - #self.DoB_KMuMuVertexFit = False - #self.DoKstar_KaonPionVertexFit = False - #self.DoBd_KstarMuMuVertexFit = False - #self.DoPhi1020_KaonKaonVertexFit = False - #self.DoBs_Phi1020MuMuVertexFit = False - #self.DoLambda_ProtonPionVertexFit = False - #self.DoLb_LambdaMuMuVertexFit = False - #self.DoDs_PhiPionVertexFit = False - #self.DoBc_DsMuMuVertexFit = False - - from TrigBphysHypo.TrigL2BMuMuXFexMonitoring import TrigL2BMuMuXFexValidationMonitoring_noVtx_noOS - validation = TrigL2BMuMuXFexValidationMonitoring_noVtx_noOS() - - from TrigBphysHypo.TrigL2BMuMuXFexMonitoring import TrigL2BMuMuXFexOnlineMonitoring_noVtx_noOS - online = TrigL2BMuMuXFexOnlineMonitoring_noVtx_noOS() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - - self.AthenaMonTools = [validation, online, time] - - -# self.TrigVertexFitter = VFitTool - -class L2BMuMuXFex_EF_BcMuMuDs (L2BMuMuXFex_EF): - __slots__ = [] - def __init__(self, name = "L2BMuMuXFex_allModes"): - L2BMuMuXFex_EF.__init__(self, name ) - - self.DoB_KMuMuDecay = False - self.DoBd_KstarMuMuDecay = False - self.DoBs_Phi1020MuMuDecay = False - self.DoLb_LambdaMuMuDecay = False - # Bc -> Ds* Mu Mu - self.DoBc_DsMuMuDecay = True - diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2BMuMuXFexMonitoring.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2BMuMuXFexMonitoring.py deleted file mode 100644 index 4bb63ef336c0408ed13fc297dfd25d396e8c691f..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2BMuMuXFexMonitoring.py +++ /dev/null @@ -1,628 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig - -ERROR_labels = ' No_EventInfo : No_RoIs : No_CombineMuon : No_TrackColl : Charge_Check : MuMu_MassCut : AddMuonTrack_Fails : MuonVtxFit_Fails : CalcMuonVtxMass_Fails : MuonVtx_MassCut : AddTrack_Fails : VtxFitFailed : MotherVtxFitFailed : TooManyComb_Acc : TooManyComb_Rej' -ERROR_number = 15 - -ACCEPTANCE_labels = ' Input : AcceptAll : Got_RoIs : Got_Muons :Got_Mu1Track : GotMu2Track : Got_TrackColl : Got_FirstTrackCol: Full_TrackColl : Full_IDTracks : Pass_OppChargeC : MuonTracks_Added : Muon_Vertexing : CalcInvMass : MuonVtx_Part : MuMu_mass : MotherVtxCreated : BphysCollParticle ' -ACCEPTANCE_number = 18 - -class TrigL2BMuMuXFexValidationMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="L2BMuMuXFexValidation"): - super(TrigL2BMuMuXFexValidationMonitoring, self).__init__(name) - self.defineTarget("Validation") - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'L2BMuMuXFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - title = 'L2BMuMuXFex - Reached steps - acceptance ; ; # Events / Candidates', - xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - labels = ACCEPTANCE_labels ) ] - self.Histograms += [ defineHistogram ( 'ROIsEta, ROIsPhi', type = 'TH2F', - title = 'L2BMuMuXFex - ROIs direction ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'TotalRunTime', type = 'TH1F', - title = 'L2BMuMuXFex - Total processing time ; t_{tot} [ms] ; # Events', - xbins = 100, xmin = 0., xmax = 50. ) ] - self.Histograms += [ defineHistogram ( 'VertexingTime', type = 'TH1F', - title = 'L2BMuMuXFex - Vertex fit processing time ; t_{vtx} [ms] ; # Events', - xbins = 100, xmin = 0., xmax = 50. ) ] - self.Histograms += [ defineHistogram ( 'TotalRunTime, VertexingTime', type = 'TH2F', - title = 'L2BMuMuXFex - Total vs. vertex fit processing time ; t_{tot} [ms] ; t_{vtx} [ms] ; # Events', - xbins = 100, xmin = 0., xmax = 50., - ybins = 100, ymin = 0., ymax = 50. ) ] - self.Histograms += [ defineHistogram ( 'EtaTracks, PhiTracks', type = 'TH2F', - title = 'L2BMuMuXFex - Eta vs. phi of all tracks ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Muon1Eta , Muon1Phi', type = 'TH2F', - title = 'L2BMuMuXFex - Eta vs. phi of muon+ tracks from Bphys decay (no vertexing); #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Muon2Eta , Muon2Phi', type = 'TH2F', - title = 'L2BMuMuXFex - Eta vs. phi of muon- tracks from Bphys decay (no vertexing); #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Muon1Pt', type = 'TH1F', - title = 'L2BMuMuXFex - Positive muons p_{T} (no vertexing); p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'Muon2Pt', type = 'TH1F', - title = 'L2BMuMuXFex - Negative muons p_{T} (no vertexing); p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'nTracks', type = 'TH1F', - title = 'L2BMuMuXFex - Number of tracks in RoI; # tracks ; # Events', - xbins = 120, xmin = -0.5, xmax = 119.5 ) ] - #B+ - self.Histograms += [ defineHistogram ( 'BMuMuK_InvMass_B', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of B^{+} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - #Bd - self.Histograms += [ defineHistogram ( 'BdMuMuKs_InvMassBd_Ks', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of K^{*} in B_{d} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 0.5, xmax = 2. ) ] - self.Histograms += [ defineHistogram ( 'BdMuMuKs_InvMass_Bd', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of B_{d} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - #Bs - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_InvMassBs_Phi', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of #phi(1020) in B_{s} ; InvMass [GeV] ; # Candidates', - xbins = 200, xmin = 0.9, xmax = 1.3 ) ] - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_InvMass_Bs', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of B_{s} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - #Lambda_b - self.Histograms += [ defineHistogram ( 'LbMuMuL_InvMassLb_L', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of #Lambda in #Lambda_{b} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 0.5, xmax = 2. ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuL_InvMass_Lb', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of #Lambda_{b} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - #Bc - self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMassBc_Phi', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of #phi in B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 200, xmin = 0.9, xmax = 1.3 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMassBc_Ds', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of D_{s} in B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 1.4, xmax = 2.6 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMass_Bc', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 120, xmin = 1.5, xmax = 7.5 ) ] - #B particles counters - self.Histograms += [ defineHistogram ( 'nTriedCombinations', type = 'TH1F', - title = 'L2BMuMuXFex - Number of track combinations tried ; # combinations ; # Events', - xbins = 500, xmin = 0., xmax = 25000. ) ] - self.Histograms += [ defineHistogram ( 'nBphys', type = 'TH1F', - title = 'L2BMuMuXFex - Number of rare B decay candidates ; # rare B ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'BMuMuK_n', type = 'TH1F', - title = 'L2BMuMuXFex - Number of B^{+} decay candidates ; # B^{+} ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'BdMuMuKs_n', type = 'TH1F', - title = 'L2BMuMuXFex - Number of B_{d} decay candidates ; # B_{d} ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_n', type = 'TH1F', - title = 'L2BMuMuXFex - Number of B_{s} decay candidates ; # B_{s} ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuL_n', type = 'TH1F', - title = 'L2BMuMuXFex - Number of #Lambda_{b} decay candidates ; # #Lambda_{b} ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_n', type = 'TH1F', - title = 'L2BMuMuXFex - Number of B_{c} decay candidates ; # B_{c} ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] -# self.Histograms += [ defineHistogram ( 'Chi2toNDoF_Bp', type = 'TH1F', -# title = 'L2BMuMuXFex - Vertex fit #chi^{2}/_{NDoF}-probability ; prob(#chi^{2}/_{NDoF}) ; # Candidates', -# xbins = 100, xmin = 0., xmax = 1. ) ] - -class TrigL2BMuMuXFexOnlineMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="L2BMuMuXFexOnline"): - super(TrigL2BMuMuXFexOnlineMonitoring, self).__init__(name) - self.defineTarget("Online") - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'L2BMuMuXFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - title = 'L2BMuMuXFex - Reached steps - acceptance ; ; # Events / Candidates', - xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - labels = ACCEPTANCE_labels ) ] - self.Histograms += [ defineHistogram ( 'ROIsEta, ROIsPhi', type = 'TH2F', - title = 'L2BMuMuXFex - ROIs direction ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'EtaTracks, PhiTracks', type = 'TH2F', - title = 'L2BMuMuXFex - Eta vs. phi of all tracks ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Muon1Eta , Muon1Phi', type = 'TH2F', - title = 'L2BMuMuXFex - Eta vs. phi of muon+ tracks from Bphys decay (no vertexing); #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Muon2Eta , Muon2Phi', type = 'TH2F', - title = 'L2BMuMuXFex - Eta vs. phi of muon- tracks from Bphys decay (no vertexing); #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Muon1Pt', type = 'TH1F', - title = 'L2BMuMuXFex - Positive muons p_{T} (no vertexing); p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'Muon2Pt', type = 'TH1F', - title = 'L2BMuMuXFex - Negative muons p_{T} (no vertexing); p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'nTracks', type = 'TH1F', - title = 'L2BMuMuXFex - Number of tracks in RoI; # tracks ; # Events', - xbins = 120, xmin = -0.5, xmax = 119.5 ) ] - #B+ - self.Histograms += [ defineHistogram ( 'BMuMuK_InvMass_B', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of B^{+} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - #Bd - self.Histograms += [ defineHistogram ( 'BdMuMuKs_InvMassBd_Ks', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of K^{*} in B_{d} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 0.5, xmax = 2. ) ] - self.Histograms += [ defineHistogram ( 'BdMuMuKs_InvMass_Bd', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of B_{d} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - #Bs - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_InvMassBs_Phi', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of #phi(1020) in B_{s} ; InvMass [GeV] ; # Candidates', - xbins = 200, xmin = 0.9, xmax = 1.3 ) ] - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_InvMass_Bs', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of B_{s} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - #Lambda_b - self.Histograms += [ defineHistogram ( 'LbMuMuL_InvMassLb_L', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of #Lambda in #Lambda_{b} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 0.5, xmax = 2. ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuL_InvMass_Lb', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of #Lambda_{b} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - #Bc - self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMassBc_Phi', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of #phi in B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 200, xmin = 0.9, xmax = 1.3 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMassBc_Ds', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of D_{s} in B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 1.4, xmax = 2.6 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMass_Bc', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 120, xmin = 1.5, xmax = 7.5 ) ] - #B particles counters - self.Histograms += [ defineHistogram ( 'nTriedCombinations', type = 'TH1F', - title = 'L2BMuMuXFex - Number of track combinations tried ; # combinations ; # Events', - xbins = 500, xmin = 0., xmax = 25000. ) ] - self.Histograms += [ defineHistogram ( 'nBphys', type = 'TH1F', - title = 'L2BMuMuXFex - Number of rare B decay candidates ; # rare B ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'BMuMuK_n', type = 'TH1F', - title = 'L2BMuMuXFex - Number of B^{+} decay candidates ; # B^{+} ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'BdMuMuKs_n', type = 'TH1F', - title = 'L2BMuMuXFex - Number of B_{d} decay candidates ; # B_{d} ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_n', type = 'TH1F', - title = 'L2BMuMuXFex - Number of B_{s} decay candidates ; # B_{s} ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuL_n', type = 'TH1F', - title = 'L2BMuMuXFex - Number of #Lambda_{b} decay candidates ; # #Lambda_{b} ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_n', type = 'TH1F', - title = 'L2BMuMuXFex - Number of B_{c} decay candidates ; # B_{c} ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] -# self.Histograms += [ defineHistogram ( 'Chi2toNDoF_Bp', type = 'TH1F', -# title = 'L2BMuMuXFex - Vertex fit #chi^{2}/_{NDoF}-probability ; prob(#chi^{2}/_{NDoF}) ; # Candidates', -# xbins = 100, xmin = 0., xmax = 1. ) ] - -class TrigL2BMuMuXFexValidationMonitoring_noVtx(TrigGenericMonitoringToolConfig): - def __init__ (self, name="L2BMuMuXFexValidation_noVtx"): - super(TrigL2BMuMuXFexValidationMonitoring_noVtx, self).__init__(name) - self.defineTarget("Validation") - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'L2BMuMuXFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - title = 'L2BMuMuXFex - Reached steps - acceptance ; ; # Events / Candidates', - xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - labels = ACCEPTANCE_labels ) ] - self.Histograms += [ defineHistogram ( 'ROIsEta, ROIsPhi', type = 'TH2F', - title = 'L2BMuMuXFex - ROIs direction ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'TotalRunTime', type = 'TH1F', - title = 'L2BMuMuXFex - Total processing time ; t_{tot} [ms] ; # Events', - xbins = 100, xmin = 0., xmax = 50. ) ] - self.Histograms += [ defineHistogram ( 'VertexingTime', type = 'TH1F', - title = 'L2BMuMuXFex - Vertex fit processing time ; t_{vtx} [ms] ; # Events', - xbins = 100, xmin = 0., xmax = 50. ) ] - self.Histograms += [ defineHistogram ( 'TotalRunTime, VertexingTime', type = 'TH2F', - title = 'L2BMuMuXFex - Total vs. vertex fit processing time ; t_{tot} [ms] ; t_{vtx} [ms] ; # Events', - xbins = 100, xmin = 0., xmax = 50., - ybins = 100, ymin = 0., ymax = 50. ) ] - self.Histograms += [ defineHistogram ( 'EtaTracks, PhiTracks', type = 'TH2F', - title = 'L2BMuMuXFex - Eta vs. phi of all tracks ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Muon1Eta , Muon1Phi', type = 'TH2F', - title = 'L2BMuMuXFex - Eta vs. phi of muon+ tracks from Bphys decay (no vertexing); #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Muon2Eta , Muon2Phi', type = 'TH2F', - title = 'L2BMuMuXFex - Eta vs. phi of muon- tracks from Bphys decay (no vertexing); #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Muon1Pt', type = 'TH1F', - title = 'L2BMuMuXFex - Positive muons p_{T} (no vertexing); p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'Muon2Pt', type = 'TH1F', - title = 'L2BMuMuXFex - Negative muons p_{T} (no vertexing); p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'nTracks', type = 'TH1F', - title = 'L2BMuMuXFex - Number of tracks in RoI; # tracks ; # Events', - xbins = 120, xmin = -0.5, xmax = 119.5 ) ] - #B+ - self.Histograms += [ defineHistogram ( 'BMuMuK_InvMass_B', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of B^{+} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - #Bd - self.Histograms += [ defineHistogram ( 'BdMuMuKs_InvMassBd_Ks', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of K^{*} in B_{d} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 0.5, xmax = 2. ) ] - self.Histograms += [ defineHistogram ( 'BdMuMuKs_InvMass_Bd', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of B_{d} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - #Bs - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_InvMassBs_Phi', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of #phi(1020) in B_{s} ; InvMass [GeV] ; # Candidates', - xbins = 200, xmin = 0.9, xmax = 1.3 ) ] - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_InvMass_Bs', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of B_{s} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - #Lambda_b - self.Histograms += [ defineHistogram ( 'LbMuMuL_InvMassLb_L', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of #Lambda in #Lambda_{b} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 0.5, xmax = 2. ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuL_InvMass_Lb', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of #Lambda_{b} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - #Bc - self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMassBc_Phi', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of #phi in B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 200, xmin = 0.9, xmax = 1.3 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMassBc_Ds', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of D_{s} in B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 1.4, xmax = 2.6 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMass_Bc', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 120, xmin = 1.5, xmax = 7.5 ) ] - #B particles counters - self.Histograms += [ defineHistogram ( 'nTriedCombinations', type = 'TH1F', - title = 'L2BMuMuXFex - Number of track combinations tried ; # combinations ; # Events', - xbins = 500, xmin = 0., xmax = 25000. ) ] - self.Histograms += [ defineHistogram ( 'nBphys', type = 'TH1F', - title = 'L2BMuMuXFex - Number of rare B decay candidates ; # rare B ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'BMuMuK_n', type = 'TH1F', - title = 'L2BMuMuXFex - Number of B^{+} decay candidates ; # B^{+} ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'BdMuMuKs_n', type = 'TH1F', - title = 'L2BMuMuXFex - Number of B_{d} decay candidates ; # B_{d} ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_n', type = 'TH1F', - title = 'L2BMuMuXFex - Number of B_{s} decay candidates ; # B_{s} ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuL_n', type = 'TH1F', - title = 'L2BMuMuXFex - Number of #Lambda_{b} decay candidates ; # #Lambda_{b} ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_n', type = 'TH1F', - title = 'L2BMuMuXFex - Number of B_{c} decay candidates ; # B_{c} ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] -# self.Histograms += [ defineHistogram ( 'Chi2toNDoF_Bp', type = 'TH1F', -# title = 'L2BMuMuXFex - Vertex fit #chi^{2}/_{NDoF}-probability ; prob(#chi^{2}/_{NDoF}) ; # Candidates', -# xbins = 100, xmin = 0., xmax = 1. ) ] - -class TrigL2BMuMuXFexOnlineMonitoring_noVtx(TrigGenericMonitoringToolConfig): - def __init__ (self, name="L2BMuMuXFexOnline_noVtx"): - super(TrigL2BMuMuXFexOnlineMonitoring_noVtx, self).__init__(name) - self.defineTarget("Online") - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'L2BMuMuXFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - title = 'L2BMuMuXFex - Reached steps - acceptance ; ; # Events / Candidates', - xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - labels = ACCEPTANCE_labels ) ] - self.Histograms += [ defineHistogram ( 'ROIsEta, ROIsPhi', type = 'TH2F', - title = 'L2BMuMuXFex - ROIs direction ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'EtaTracks, PhiTracks', type = 'TH2F', - title = 'L2BMuMuXFex - Eta vs. phi of all tracks ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Muon1Eta , Muon1Phi', type = 'TH2F', - title = 'L2BMuMuXFex - Eta vs. phi of muon+ tracks from Bphys decay (no vertexing); #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Muon2Eta , Muon2Phi', type = 'TH2F', - title = 'L2BMuMuXFex - Eta vs. phi of muon- tracks from Bphys decay (no vertexing); #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Muon1Pt', type = 'TH1F', - title = 'L2BMuMuXFex - Positive muons p_{T} (no vertexing); p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'Muon2Pt', type = 'TH1F', - title = 'L2BMuMuXFex - Negative muons p_{T} (no vertexing); p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'nTracks', type = 'TH1F', - title = 'L2BMuMuXFex - Number of tracks in RoI; # tracks ; # Events', - xbins = 120, xmin = -0.5, xmax = 119.5 ) ] - #B+ - self.Histograms += [ defineHistogram ( 'BMuMuK_InvMass_B', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of B^{+} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - #Bd - self.Histograms += [ defineHistogram ( 'BdMuMuKs_InvMassBd_Ks', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of K^{*} in B_{d} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 0.5, xmax = 2. ) ] - self.Histograms += [ defineHistogram ( 'BdMuMuKs_InvMass_Bd', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of B_{d} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - #Bs - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_InvMassBs_Phi', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of #phi(1020) in B_{s} ; InvMass [GeV] ; # Candidates', - xbins = 200, xmin = 0.9, xmax = 1.3 ) ] - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_InvMass_Bs', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of B_{s} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - #Lambda_b - self.Histograms += [ defineHistogram ( 'LbMuMuL_InvMassLb_L', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of #Lambda in #Lambda_{b} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 0.5, xmax = 2. ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuL_InvMass_Lb', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of #Lambda_{b} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - #Bc - self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMassBc_Phi', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of #phi in B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 200, xmin = 0.9, xmax = 1.3 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMassBc_Ds', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of D_{s} in B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 1.4, xmax = 2.6 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMass_Bc', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 120, xmin = 1.5, xmax = 7.5 ) ] - #B particles counters - self.Histograms += [ defineHistogram ( 'nTriedCombinations', type = 'TH1F', - title = 'L2BMuMuXFex - Number of track combinations tried ; # combinations ; # Events', - xbins = 500, xmin = 0., xmax = 25000. ) ] - self.Histograms += [ defineHistogram ( 'nBphys', type = 'TH1F', - title = 'L2BMuMuXFex - Number of rare B decay candidates ; # rare B ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'BMuMuK_n', type = 'TH1F', - title = 'L2BMuMuXFex - Number of B^{+} decay candidates ; # B^{+} ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'BdMuMuKs_n', type = 'TH1F', - title = 'L2BMuMuXFex - Number of B_{d} decay candidates ; # B_{d} ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_n', type = 'TH1F', - title = 'L2BMuMuXFex - Number of B_{s} decay candidates ; # B_{s} ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuL_n', type = 'TH1F', - title = 'L2BMuMuXFex - Number of #Lambda_{b} decay candidates ; # #Lambda_{b} ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_n', type = 'TH1F', - title = 'L2BMuMuXFex - Number of B_{c} decay candidates ; # B_{c} ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] -# self.Histograms += [ defineHistogram ( 'Chi2toNDoF_Bp', type = 'TH1F', -# title = 'L2BMuMuXFex - Vertex fit #chi^{2}/_{NDoF}-probability ; prob(#chi^{2}/_{NDoF}) ; # Candidates', -# xbins = 100, xmin = 0., xmax = 1. ) ] - -class TrigL2BMuMuXFexValidationMonitoring_noVtx_noOS(TrigGenericMonitoringToolConfig): - def __init__ (self, name="L2BMuMuXFexValidation_noVtx_noOS"): - super(TrigL2BMuMuXFexValidationMonitoring_noVtx_noOS, self).__init__(name) - self.defineTarget("Validation") - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'L2BMuMuXFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - title = 'L2BMuMuXFex - Reached steps - acceptance ; ; # Events / Candidates', - xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - labels = ACCEPTANCE_labels ) ] - self.Histograms += [ defineHistogram ( 'ROIsEta, ROIsPhi', type = 'TH2F', - title = 'L2BMuMuXFex - ROIs direction ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'TotalRunTime', type = 'TH1F', - title = 'L2BMuMuXFex - Total processing time ; t_{tot} [ms] ; # Events', - xbins = 100, xmin = 0., xmax = 50. ) ] - self.Histograms += [ defineHistogram ( 'VertexingTime', type = 'TH1F', - title = 'L2BMuMuXFex - Vertex fit processing time ; t_{vtx} [ms] ; # Events', - xbins = 100, xmin = 0., xmax = 50. ) ] - self.Histograms += [ defineHistogram ( 'TotalRunTime, VertexingTime', type = 'TH2F', - title = 'L2BMuMuXFex - Total vs. vertex fit processing time ; t_{tot} [ms] ; t_{vtx} [ms] ; # Events', - xbins = 100, xmin = 0., xmax = 50., - ybins = 100, ymin = 0., ymax = 50. ) ] - self.Histograms += [ defineHistogram ( 'EtaTracks, PhiTracks', type = 'TH2F', - title = 'L2BMuMuXFex - Eta vs. phi of all tracks ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Muon1Eta , Muon1Phi', type = 'TH2F', - title = 'L2BMuMuXFex - Eta vs. phi of muon+ tracks from Bphys decay (no vertexing); #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Muon2Eta , Muon2Phi', type = 'TH2F', - title = 'L2BMuMuXFex - Eta vs. phi of muon- tracks from Bphys decay (no vertexing); #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Muon1Pt', type = 'TH1F', - title = 'L2BMuMuXFex - Positive muons p_{T} (no vertexing); p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'Muon2Pt', type = 'TH1F', - title = 'L2BMuMuXFex - Negative muons p_{T} (no vertexing); p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'nTracks', type = 'TH1F', - title = 'L2BMuMuXFex - Number of tracks in RoI; # tracks ; # Events', - xbins = 120, xmin = -0.5, xmax = 119.5 ) ] - #B+ - self.Histograms += [ defineHistogram ( 'BMuMuK_InvMass_B', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of B^{+} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - #Bd - self.Histograms += [ defineHistogram ( 'BdMuMuKs_InvMassBd_Ks', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of K^{*} in B_{d} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 0.5, xmax = 2. ) ] - self.Histograms += [ defineHistogram ( 'BdMuMuKs_InvMass_Bd', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of B_{d} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - #Bs - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_InvMassBs_Phi', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of #phi(1020) in B_{s} ; InvMass [GeV] ; # Candidates', - xbins = 200, xmin = 0.9, xmax = 1.3 ) ] - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_InvMass_Bs', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of B_{s} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - #Lambda_b - self.Histograms += [ defineHistogram ( 'LbMuMuL_InvMassLb_L', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of #Lambda in #Lambda_{b} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 0.5, xmax = 2. ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuL_InvMass_Lb', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of #Lambda_{b} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - #Bc - self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMassBc_Phi', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of #phi in B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 200, xmin = 0.9, xmax = 1.3 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMassBc_Ds', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of D_{s} in B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 1.4, xmax = 2.6 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMass_Bc', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 120, xmin = 1.5, xmax = 7.5 ) ] - #B particles counters - self.Histograms += [ defineHistogram ( 'nTriedCombinations', type = 'TH1F', - title = 'L2BMuMuXFex - Number of track combinations tried ; # combinations ; # Events', - xbins = 500, xmin = 0., xmax = 25000. ) ] - self.Histograms += [ defineHistogram ( 'nBphys', type = 'TH1F', - title = 'L2BMuMuXFex - Number of rare B decay candidates ; # rare B ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'BMuMuK_n', type = 'TH1F', - title = 'L2BMuMuXFex - Number of B^{+} decay candidates ; # B^{+} ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'BdMuMuKs_n', type = 'TH1F', - title = 'L2BMuMuXFex - Number of B_{d} decay candidates ; # B_{d} ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_n', type = 'TH1F', - title = 'L2BMuMuXFex - Number of B_{s} decay candidates ; # B_{s} ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuL_n', type = 'TH1F', - title = 'L2BMuMuXFex - Number of #Lambda_{b} decay candidates ; # #Lambda_{b} ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_n', type = 'TH1F', - title = 'L2BMuMuXFex - Number of B_{c} decay candidates ; # B_{c} ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] -# self.Histograms += [ defineHistogram ( 'Chi2toNDoF_Bp', type = 'TH1F', -# title = 'L2BMuMuXFex - Vertex fit #chi^{2}/_{NDoF}-probability ; prob(#chi^{2}/_{NDoF}) ; # Candidates', -# xbins = 100, xmin = 0., xmax = 1. ) ] - -class TrigL2BMuMuXFexOnlineMonitoring_noVtx_noOS(TrigGenericMonitoringToolConfig): - def __init__ (self, name="L2BMuMuXFexOnline_noVtx_noOS"): - super(TrigL2BMuMuXFexOnlineMonitoring_noVtx_noOS, self).__init__(name) - self.defineTarget("Online") - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'L2BMuMuXFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - title = 'L2BMuMuXFex - Reached steps - acceptance ; ; # Events / Candidates', - xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - labels = ACCEPTANCE_labels ) ] - self.Histograms += [ defineHistogram ( 'ROIsEta, ROIsPhi', type = 'TH2F', - title = 'L2BMuMuXFex - ROIs direction ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'EtaTracks, PhiTracks', type = 'TH2F', - title = 'L2BMuMuXFex - Eta vs. phi of all tracks ; #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Muon1Eta , Muon1Phi', type = 'TH2F', - title = 'L2BMuMuXFex - Eta vs. phi of muon+ tracks from Bphys decay (no vertexing); #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Muon2Eta , Muon2Phi', type = 'TH2F', - title = 'L2BMuMuXFex - Eta vs. phi of muon- tracks from Bphys decay (no vertexing); #eta ; #phi ; # Events', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'Muon1Pt', type = 'TH1F', - title = 'L2BMuMuXFex - Positive muons p_{T} (no vertexing); p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'Muon2Pt', type = 'TH1F', - title = 'L2BMuMuXFex - Negative muons p_{T} (no vertexing); p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'nTracks', type = 'TH1F', - title = 'L2BMuMuXFex - Number of tracks in RoI; # tracks ; # Events', - xbins = 120, xmin = -0.5, xmax = 119.5 ) ] - #B+ - self.Histograms += [ defineHistogram ( 'BMuMuK_InvMass_B', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of B^{+} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - #Bd - self.Histograms += [ defineHistogram ( 'BdMuMuKs_InvMassBd_Ks', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of K^{*} in B_{d} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 0.5, xmax = 2. ) ] - self.Histograms += [ defineHistogram ( 'BdMuMuKs_InvMass_Bd', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of B_{d} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - #Bs - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_InvMassBs_Phi', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of #phi(1020) in B_{s} ; InvMass [GeV] ; # Candidates', - xbins = 200, xmin = 0.9, xmax = 1.3 ) ] - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_InvMass_Bs', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of B_{s} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - #Lambda_b - self.Histograms += [ defineHistogram ( 'LbMuMuL_InvMassLb_L', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of #Lambda in #Lambda_{b} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 0.5, xmax = 2. ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuL_InvMass_Lb', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of #Lambda_{b} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 4., xmax = 7. ) ] - #Bc - self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMassBc_Phi', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of #phi in B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 200, xmin = 0.9, xmax = 1.3 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMassBc_Ds', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of D_{s} in B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 60, xmin = 1.4, xmax = 2.6 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_InvMass_Bc', type = 'TH1F', - title = 'L2BMuMuXFex - InvMass of B_{c} ; InvMass [GeV] ; # Candidates', - xbins = 120, xmin = 1.5, xmax = 7.5 ) ] - #B particles counters - self.Histograms += [ defineHistogram ( 'nTriedCombinations', type = 'TH1F', - title = 'L2BMuMuXFex - Number of track combinations tried ; # combinations ; # Events', - xbins = 500, xmin = 0., xmax = 25000. ) ] - self.Histograms += [ defineHistogram ( 'nBphys', type = 'TH1F', - title = 'L2BMuMuXFex - Number of rare B decay candidates ; # rare B ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'BMuMuK_n', type = 'TH1F', - title = 'L2BMuMuXFex - Number of B^{+} decay candidates ; # B^{+} ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'BdMuMuKs_n', type = 'TH1F', - title = 'L2BMuMuXFex - Number of B_{d} decay candidates ; # B_{d} ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'BsMuMuPhi_n', type = 'TH1F', - title = 'L2BMuMuXFex - Number of B_{s} decay candidates ; # B_{s} ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'LbMuMuL_n', type = 'TH1F', - title = 'L2BMuMuXFex - Number of #Lambda_{b} decay candidates ; # #Lambda_{b} ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] - self.Histograms += [ defineHistogram ( 'BcMuMuDs_n', type = 'TH1F', - title = 'L2BMuMuXFex - Number of B_{c} decay candidates ; # B_{c} ; # Events', - xbins = 50, xmin = -0.5, xmax = 49.5 ) ] -# self.Histograms += [ defineHistogram ( 'Chi2toNDoF_Bp', type = 'TH1F', -# title = 'L2BMuMuXFex - Vertex fit #chi^{2}/_{NDoF}-probability ; prob(#chi^{2}/_{NDoF}) ; # Candidates', -# xbins = 100, xmin = 0., xmax = 1. ) ] - diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2BMuMuXHypoConfig.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2BMuMuXHypoConfig.py deleted file mode 100644 index a570bef4fb22a62d5a1b5c76c8fbf05569707497..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2BMuMuXHypoConfig.py +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration - -# -*- coding: utf-8 -*- -from TrigBphysHypo.TrigBphysHypoConf import TrigL2BMuMuXHypo - - -class L2BMuMuXHypo_1 (TrigL2BMuMuXHypo): - __slots__ = [] - def __init__(self, name = "L2BMuMuXHypo_1"): - super( TrigL2BMuMuXHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # mass cuts - # B+ - self.LowerBMassCut = 4400. - self.UpperBMassCut = 5800. - # Bd - self.LowerBdMassCut = 4600. - self.UpperBdMassCut = 5900. - self.LowerKstarMassCut = 700. - self.UpperKstarMassCut = 1100. - # Bs - self.LowerBsMassCut = 4700. - self.UpperBsMassCut = 5800. - self.LowerPhi1020MassCut = 940. - self.UpperPhi1020MassCut = 1100. - # Lb - self.LowerLbMassCut = 5100. - self.UpperLbMassCut = 6100. - self.LowerLambdaMassCut = 1040. - self.UpperLambdaMassCut = 1200. - # Bc - self.LowerBcMassCut = 1800. - self.UpperBcMassCut = 7100. - self.LowerDsMassCut = 1600. - self.UpperDsMassCut = 2400. - - -class L2BMuMuXHypo_EF (TrigL2BMuMuXHypo): - __slots__ = [] - def __init__(self, name = "L2BMuMuXHypo_EF"): - super( TrigL2BMuMuXHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - # mass cuts - # B+ - self.LowerBMassCut = 4400. - self.UpperBMassCut = 5900. - # Bd - self.LowerBdMassCut = 4500. - self.UpperBdMassCut = 6000. - self.LowerKstarMassCut = 650. - self.UpperKstarMassCut = 1150. - # Bs - self.LowerBsMassCut = 4700. - self.UpperBsMassCut = 6000. - self.LowerPhi1020MassCut = 900. - self.UpperPhi1020MassCut = 1140. - # Lb - self.LowerLbMassCut = 5000. - self.UpperLbMassCut = 6200. - self.LowerLambdaMassCut = 1000. - self.UpperLambdaMassCut = 1240. - # Bc - self.LowerBcMassCut = 1800. - self.UpperBcMassCut = 7050. - self.LowerDsMassCut = 1600. - self.UpperDsMassCut = 2400. diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2MultiMuFexConfig.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2MultiMuFexConfig.py deleted file mode 100644 index 81f4a2ef8deb92c372290510352fca4b5716130b..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2MultiMuFexConfig.py +++ /dev/null @@ -1,191 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from TrigBphysHypo.TrigBphysHypoConf import TrigL2MultiMuFex -from TrigVertexFitter.TrigVertexFitterConf import TrigL2VertexFitter -from TrigVertexFitter.TrigVertexFitterConf import TrigVertexFitter -from TrigVertexFitter.TrigVertexFitterConf import TrigVertexingTool - -L2VFitTool = TrigL2VertexFitter() -VFitTool = TrigVertexFitter() -VertexTool = TrigVertexingTool() - -from AthenaCommon.AppMgr import ToolSvc - -ToolSvc += L2VFitTool -ToolSvc += VFitTool -ToolSvc += VertexTool - -class L2MultiMuFex_DiMu (TrigL2MultiMuFex): - __slots__ = [] - def __init__(self, name = "L2MultiMuFex_DiMu"): - super( TrigL2MultiMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.LowerMassCut = 1000. - self.UpperMassCut = 14000. - self.doVertexFit = True - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2MultiMuFexMonitoring import TrigL2MultiMuFexValidationMonitoring - validation = TrigL2MultiMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2MultiMuFexMonitoring import TrigL2MultiMuFexOnlineMonitoring - online = TrigL2MultiMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2MultiMuFex_Jpsi (TrigL2MultiMuFex): - __slots__ = [] - def __init__(self, name = "L2MultiMuFex_Jpsi"): - super( TrigL2MultiMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.LowerMassCut = 2000. - self.UpperMassCut = 4800. - self.doVertexFit = True - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2MultiMuFexMonitoring import TrigL2MultiMuFexValidationMonitoring - validation = TrigL2MultiMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2MultiMuFexMonitoring import TrigL2MultiMuFexOnlineMonitoring - online = TrigL2MultiMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2MultiMuFex_Upsi (TrigL2MultiMuFex): - __slots__ = [] - def __init__(self, name = "L2MultiMuFex_Upsi"): - super( TrigL2MultiMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.LowerMassCut = 7000. - self.UpperMassCut = 13000. - self.doVertexFit = True - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2MultiMuFexMonitoring import TrigL2MultiMuFexValidationMonitoring - validation = TrigL2MultiMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2MultiMuFexMonitoring import TrigL2MultiMuFexOnlineMonitoring - online = TrigL2MultiMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2MultiMuFex_Tau (TrigL2MultiMuFex): - __slots__ = [] - def __init__(self, name = "L2MultiMuFex_Tau"): - super( TrigL2MultiMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.LowerMassCut = 0. - self.UpperMassCut = 2900. - self.NMassMuon =3 - self.CheckNinputTE = False - self.doVertexFit = True - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2MultiMuFexMonitoring import TrigL2MultiMuFexValidationMonitoring - validation = TrigL2MultiMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2MultiMuFexMonitoring import TrigL2MultiMuFexOnlineMonitoring - online = TrigL2MultiMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2MultiMuFex_Tau2 (TrigL2MultiMuFex): - __slots__ = [] - def __init__(self, name = "L2MultiMuFex_Tau2"): - super( TrigL2MultiMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.LowerMassCut = 0. - self.UpperMassCut = 2900. - self.NMassMuon =2 - self.CheckNinputTE = False - self.doVertexFit = True - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2MultiMuFexMonitoring import TrigL2MultiMuFexValidationMonitoring - validation = TrigL2MultiMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2MultiMuFexMonitoring import TrigL2MultiMuFexOnlineMonitoring - online = TrigL2MultiMuFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2MultiMuFex_Tau_passL2 (TrigL2MultiMuFex): - __slots__ = [] - def __init__(self, name = "L2MultiMuFex_Tau_passL2"): - super( TrigL2MultiMuFex, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = True - - # L2 Bmumu cuts - # self.TrackPTthr = 1.4 - # self.TrackAlgoId = 2 - # self.pTsumTrackPair = 0. - self.LowerMassCut = 0. - self.UpperMassCut = 2900. - self.NMassMuon =3 - self.CheckNinputTE = False - self.doVertexFit = True - self.TrigL2VertexFitter = L2VFitTool - self.TrigVertexingTool = VertexTool - - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2MultiMuFexMonitoring import TrigL2MultiMuFexValidationMonitoring - validation = TrigL2MultiMuFexValidationMonitoring() - from TrigBphysHypo.TrigL2MultiMuFexMonitoring import TrigL2MultiMuFexOnlineMonitoring_passL2 - online = TrigL2MultiMuFexOnlineMonitoring_passL2() - - self.AthenaMonTools = [ validation, online, time ] - diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2MultiMuFexMonitoring.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2MultiMuFexMonitoring.py deleted file mode 100644 index 118f5c90f2450bb0b6ab691226cc63ffd5a359d9..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2MultiMuFexMonitoring.py +++ /dev/null @@ -1,110 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig - -ERROR_labels = ' No_EventInfo : WrongNum_Input_TE :GetMuonFailed : AddTrack_Fails : CalcInvMass_Fails : BphysColl_Fails ' -ERROR_number = 6 - -ACCEPTANCE_labels = ' Input : Got_Muons : InvMass_Cut ' -ACCEPTANCE_number = 3 - -class TrigL2MultiMuFexValidationMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigL2MultiMuFexValidationMonitoring"): - super(TrigL2MultiMuFexValidationMonitoring, self).__init__(name) - self.defineTarget("Validation") - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'L2MultiMuFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - title = 'L2MultiMuFex - Reached steps - acceptance ; ; # Events / Candidates', - xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - labels = ACCEPTANCE_labels ) ] - self.Histograms += [ defineHistogram ( 'MutrkPt', type = 'TH1F', - title = 'L2MultiMuFex - Muon ID-Track p_{T} - low range ; p_{T} [GeV] ; # Muons with ID tracks', - xbins = 50, xmin = 0., xmax = 25. ) ] - self.Histograms += [ defineHistogram ( 'MutrkEta, MutrkPhi', type = 'TH2F', - title = 'L2MultiMuFex - Muon ID-Track direction ; #eta ; #phi ; # Muons with ID tracks', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'InvMass_comb', type = 'TH1F', - title = 'L2MultiMuFex - Invariant mass of the Muon ID-Tracks - low range ; Mass [GeV] ; # Di-muons', - xbins = 120, xmin = 0., xmax = 13. ) ] - self.Histograms += [ defineHistogram ( 'InvMass_comb_wideRange', type = 'TH1F', - title = 'L2MultiMuFex - Invariant mass of the Muon ID-Tracks ; Mass [GeV] ; # Di-muons', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'FitMass', type = 'TH1F', - title = 'L2MultiMuFex - Fitted mass - low range ; Mass [GeV] ; # Candidates', - xbins = 120, xmin = 0., xmax = 13. ) ] - self.Histograms += [ defineHistogram ( 'FitMass_wideRange', type = 'TH1F', - title = 'L2MultiMuFex - Fitted mass ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'Chi2toNDoF', type = 'TH1F', - title = 'L2MultiMuFex - Vertex fit #chi^{2}/_{NDoF} ; #chi^{2}/_{NDoF} ; # Candidates', - xbins = 100, xmin = 0., xmax = 25. ) ] - self.Histograms += [ defineHistogram ( 'FitTotalPt', type = 'TH1F', - title = 'L2MultiMuFex - Fitted di-muon p_{T} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'FitVtxR', type = 'TH1F', - title = 'L2MultiMuFex - Fitted vertex R-position ; R [mm] ; # Candidates', - xbins = 100, xmin = 0., xmax = 10. ) ] - self.Histograms += [ defineHistogram ( 'FitVtxZ', type = 'TH1F', - title = 'L2MultiMuFex - Fitted vertex Z-position ; Z [mm] ; # Candidates', - xbins = 100, xmin = -500., xmax = 500. ) ] - -class TrigL2MultiMuFexOnlineMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigL2MultiMuFexOnlineMonitoring"): - super(TrigL2MultiMuFexOnlineMonitoring, self).__init__(name) - self.defineTarget("Online") - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'L2MultiMuFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - title = 'L2MultiMuFex - Reached steps - acceptance ; ; # Events / Candidates', - xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - labels = ACCEPTANCE_labels ) ] - self.Histograms += [ defineHistogram ( 'MutrkPt', type = 'TH1F', - title = 'L2MultiMuFex - Muon ID-Track p_{T} - low range ; p_{T} [GeV] ; # Muons with ID tracks', - xbins = 50, xmin = 0., xmax = 25. ) ] - self.Histograms += [ defineHistogram ( 'MutrkEta, MutrkPhi', type = 'TH2F', - title = 'L2MultiMuFex - Muon ID-Track direction ; #eta ; #phi ; # Muons with ID tracks', - xbins = 60, xmin = -3.0, xmax = 3.0, - ybins = 64, ymin = -3.2, ymax = 3.2 ) ] - self.Histograms += [ defineHistogram ( 'InvMass_comb', type = 'TH1F', - title = 'L2MultiMuFex - Invariant mass of the Muon ID-Tracks - low range ; Mass [GeV] ; # Di-muons', - xbins = 120, xmin = 0., xmax = 13. ) ] - self.Histograms += [ defineHistogram ( 'InvMass_comb_wideRange', type = 'TH1F', - title = 'L2MultiMuFex - Invariant mass of the Muon ID-Tracks ; Mass [GeV] ; # Di-muons', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'FitMass', type = 'TH1F', - title = 'L2MultiMuFex - Fitted mass - low range ; Mass [GeV] ; # Candidates', - xbins = 120, xmin = 0., xmax = 13. ) ] - self.Histograms += [ defineHistogram ( 'FitMass_wideRange', type = 'TH1F', - title = 'L2MultiMuFex - Fitted mass ; Mass [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'Chi2toNDoF', type = 'TH1F', - title = 'L2MultiMuFex - Vertex fit #chi^{2}/_{NDoF} ; #chi^{2}/_{NDoF} ; # Candidates', - xbins = 100, xmin = 0., xmax = 25. ) ] - self.Histograms += [ defineHistogram ( 'FitTotalPt', type = 'TH1F', - title = 'L2MultiMuFex - Fitted di-muon p_{T} ; p_{T} [GeV] ; # Candidates', - xbins = 100, xmin = 0., xmax = 100. ) ] - self.Histograms += [ defineHistogram ( 'FitVtxR', type = 'TH1F', - title = 'L2MultiMuFex - Fitted vertex R-position ; R [mm] ; # Candidates', - xbins = 100, xmin = 0., xmax = 10. ) ] - self.Histograms += [ defineHistogram ( 'FitVtxZ', type = 'TH1F', - title = 'L2MultiMuFex - Fitted vertex Z-position ; Z [mm] ; # Candidates', - xbins = 100, xmin = -500., xmax = 500. ) ] - -class TrigL2MultiMuFexOnlineMonitoring_passL2(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigL2MultiMuFexOnlineMonitoring_passL2"): - super(TrigL2MultiMuFexOnlineMonitoring_passL2, self).__init__(name) - self.defineTarget("Online") - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'L2MultiMuFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - title = 'L2MultiMuFex - Reached steps - acceptance ; ; # Events / Candidates', - xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - labels = ACCEPTANCE_labels ) ] diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2MultiMuHypoConfig.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2MultiMuHypoConfig.py deleted file mode 100644 index 4855e354a1d2a7907d9b167d2c643b5aea4f7cbf..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2MultiMuHypoConfig.py +++ /dev/null @@ -1,119 +0,0 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration - -from TrigBphysHypo.TrigBphysHypoConf import TrigL2MultiMuHypo - -class L2MultiMuHypo_DiMu (TrigL2MultiMuHypo): - __slots__ = [] - def __init__(self, name = "L2MultiMuHypo_DiMu"): - super( TrigL2MultiMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 1500. - self.UpperMassCut = 14000. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2MultiMuHypoMonitoring import TrigL2MultiMuHypoValidationMonitoring - validation = TrigL2MultiMuHypoValidationMonitoring() - from TrigBphysHypo.TrigL2MultiMuHypoMonitoring import TrigL2MultiMuHypoOnlineMonitoring - online = TrigL2MultiMuHypoOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2MultiMuHypo_Jpsi (TrigL2MultiMuHypo): - __slots__ = [] - def __init__(self, name = "L2MultiMuHypo_Jpsi"): - super( TrigL2MultiMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 2500. - self.UpperMassCut = 4300. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2MultiMuHypoMonitoring import TrigL2MultiMuHypoValidationMonitoring - validation = TrigL2MultiMuHypoValidationMonitoring() - from TrigBphysHypo.TrigL2MultiMuHypoMonitoring import TrigL2MultiMuHypoOnlineMonitoring - online = TrigL2MultiMuHypoOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2MultiMuHypo_Upsi (TrigL2MultiMuHypo): - __slots__ = [] - def __init__(self, name = "L2MultiMuHypo_Upsi"): - super( TrigL2MultiMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 8000. - self.UpperMassCut = 12000. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 20. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2MultiMuHypoMonitoring import TrigL2MultiMuHypoValidationMonitoring - validation = TrigL2MultiMuHypoValidationMonitoring() - from TrigBphysHypo.TrigL2MultiMuHypoMonitoring import TrigL2MultiMuHypoOnlineMonitoring - online = TrigL2MultiMuHypoOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2MultiMuHypo_Tau (TrigL2MultiMuHypo): - __slots__ = [] - def __init__(self, name = "L2MultiMuHypo_Tau"): - super( TrigL2MultiMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - # L2 Bmumu cuts - self.LowerMassCut = 0. - self.UpperMassCut = 2900. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 150. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2MultiMuHypoMonitoring import TrigL2MultiMuHypoValidationMonitoring - validation = TrigL2MultiMuHypoValidationMonitoring() - from TrigBphysHypo.TrigL2MultiMuHypoMonitoring import TrigL2MultiMuHypoOnlineMonitoring - online = TrigL2MultiMuHypoOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class L2MultiMuHypo_Tau_passL2 (TrigL2MultiMuHypo): - __slots__ = [] - def __init__(self, name = "L2MultiMuHypo_Tau_passL2"): - super( TrigL2MultiMuHypo, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = True - - # L2 Bmumu cuts - self.LowerMassCut = 0. - self.UpperMassCut = 2900. - self.ApplyUpperMassCut = True - self.Chi2VtxCut = 150. - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - from TrigBphysHypo.TrigL2MultiMuHypoMonitoring import TrigL2MultiMuHypoValidationMonitoring - validation = TrigL2MultiMuHypoValidationMonitoring() - from TrigBphysHypo.TrigL2MultiMuHypoMonitoring import TrigL2MultiMuHypoOnlineMonitoring - online = TrigL2MultiMuHypoOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2MultiMuHypoMonitoring.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2MultiMuHypoMonitoring.py deleted file mode 100644 index c2c66e569b5c41ba6bd0fcee072d5e8aea1cfeff..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigL2MultiMuHypoMonitoring.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig - -class TrigL2MultiMuHypoValidationMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigL2MultiMuHypoValidationMonitoring"): - super(TrigL2MultiMuHypoValidationMonitoring, self).__init__(name) - self.defineTarget("Validation") - self.Histograms = [ defineHistogram('CutCounter', type='TH1F', title= "cuts counter", xbins=8, xmin=-1.5, xmax=6.5) ] - self.Histograms += [ defineHistogram('MuMumass', type='TH1F', title="L2MultiMuHypo inv.mass(mumu) [GeV]", - xbins=100, xmin=0., xmax=13.) ] - -class TrigL2MultiMuHypoOnlineMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigL2MultiMuHypoOnlineMonitoring"): - super(TrigL2MultiMuHypoOnlineMonitoring, self).__init__(name) - self.defineTarget("Online") - self.Histograms = [ defineHistogram('CutCounter', type='TH1F', title= "cuts counter", xbins=8, xmin=-1.5, xmax=6.5) ] - self.Histograms += [ defineHistogram('MuMumass', type='TH1F', title="L2MultiMuHypo inv.mass(mumu) [GeV]", - xbins=100, xmin=0., xmax=13.) ] diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigMultiTrkFexConfig.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigMultiTrkFexConfig.py deleted file mode 100644 index cfbe86cdbd1e968dfbe1d8d70f36ce80d3f9915a..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigMultiTrkFexConfig.py +++ /dev/null @@ -1,502 +0,0 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration - -# include the python fragment to set up the default bphysics vertex fitter -from TrigBphysHypo import TrigBphysVertexingConfig # noqa: F401 - -from TrigBphysHypo.TrigBphysHypoConf import TrigMultiTrkFex - -from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig -from TrigBphysHypo.TrigMultiTrkFexMonitoring import TrigMultiTrkFexValidationMonitoring -from TrigBphysHypo.TrigMultiTrkFexMonitoring import TrigMultiTrkFexOnlineMonitoring - - -class TrigMultiTrkFexPy (TrigMultiTrkFex): - __slots__ = [] - def __init__(self, name = "MultiTrkFexPy"): - super( TrigMultiTrkFexPy, self ).__init__( name ) - # AcceptAll flag: if true take events regardless of cuts - - self.AcceptAll = False - - - def setTrackThresholds(self, thresholds) : - self.ptTrkMin = [] # reset, use thresholds from trigger name - for thr in sorted(thresholds) : # should should have lowest pt first, which is what we want - if len(self.ptTrkMin) < self.nTrk : - self.ptTrkMin.append( thr ) - while len(self.ptTrkMin) < self.nTrk : - self.ptTrkMin.append(900.) - - def setNumberAndTrackThresholds(self, nTrk, thresholds) : - self.ptTrkMin = [] # reset, use thresholds from trigger name - self.nTrk = nTrk - for thr in sorted(thresholds) : # should should have lowest pt first, which is what we want - if len(self.ptTrkMin) < self.nTrk : - self.ptTrkMin.append( thr ) - while len(self.ptTrkMin) < self.nTrk : - self.ptTrkMin.append(900.) - - def setEFMuonThresholds(self, thresholds) : - self.ptMuonMin = [] # reset, use thresholds from trigger name - for thr in sorted(thresholds) : # should should have lowest pt first, which is what we want - if len(self.ptMuonMin) < self.nEfMuon : - self.ptMuonMin.append( thr ) - while len(self.ptMuonMin) < self.nEfMuon : - self.ptMuonMin.append(2000.) # lower pt cut makes no sense at trigger - - def setElectronTrackThresholds(self, thresholds) : - self.ptTrkMin = [] # reset, use thresholds from trigger name - for thr in sorted(thresholds) : # should should have lowest pt first, which is what we want - if len(self.ptTrkMin) < self.nTrk : - self.ptTrkMin.append( thr ) - while len(self.ptTrkMin) < self.nTrk : - self.ptTrkMin.append(4500.) - - def setL2CombMuonThresholds(self, thresholds) : - self.ptMuonMin = [] # reset, use thresholds from trigger name - for thr in sorted(thresholds) : # should should have lowest pt first, which is what we want - if len(self.ptMuonMin) < self.nL2CombMuon : - self.ptMuonMin.append( thr ) - while len(self.ptMuonMin) < self.nL2CombMuon : - self.ptMuonMin.append(2000.) # lower pt cut makes no sense at trigger - - def setL2SAMuonThresholds(self, thresholds) : - # in case of L2SA limits, take only 1 muon with lowest threshold - self.ptMuonMin = [] # reset, use thresholds from trigger name - for thr in sorted(thresholds) : # should should have lowest pt first, which is what we want - if len(self.ptMuonMin) < self.nL2SAMuon : - self.ptMuonMin.append( thr ) - while len(self.ptMuonMin) < self.nL2SAMuon : - self.ptMuonMin.append(2000.) # lower pt cut makes no sense at trigger - - -###################################### -# trkPhi selects 2 OS tracks pt>X,X GeV with M in [0.840,1.240] GeV -###################################### -class TrigMultiTrkFex_trkPhi (TrigMultiTrkFexPy): - __slots__ = [] - def __init__(self, name = "MultiTrkFex_trkPhi"): - super( TrigMultiTrkFex_trkPhi, self ).__init__( name ) - - #self.trackCollectionKey = "' - self.nTrk = 2 - self.trkMass = 105.6583745 # looking for di-muon resonances - self.nTrkCharge = 0 - self.nTrkMassMin = [840.] - self.nTrkMassMax = [1240.] - self.ptTrkMin = [3600., 3600. ] # set minimal pt of tracks for Phi+Pi - self.diTrkMassMin = [] # phi window - self.diTrkMassMax = [] - self.diTrkCharge = -1 - # muons are not matched to tracks, but still require to be present in TE - self.nEfMuon = 0 - self.nL2CombMuon = 0 - self.nL2SAMuon = 0 # as we run on muon RoIs all necessary muons are already requested. - self.ptMuonMin = [] #[3600.] - #self.overlapdR = 0.005 - - time = TrigTimeHistToolConfig("Time") - validation = TrigMultiTrkFexValidationMonitoring() - online = TrigMultiTrkFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -################################################################################### -# trkPhiX selects 3 tracks pt>X,X,1 GeV M<2.9GeV and OS pair, M in [0.840,1.240] GeV -##################################################################################### -class TrigMultiTrkFex_trkPhiX (TrigMultiTrkFexPy): - __slots__ = [] - def __init__(self, name = "MultiTrkFex_trkPhiX"): - super( TrigMultiTrkFex_trkPhiX, self ).__init__( name ) - - #self.trackCollectionKey = "' - self.nTrk = 3 - self.trkMass = 105.6583745 # looking for di-muon resonances - self.nTrkCharge = 1 - self.ptTrkMin = [3600., 3600., 1000. ] # set minimal pt of tracks for Phi+Pi - self.diTrkMassMin = [840.] # phi window - self.diTrkMassMax = [1240.] - self.diTrkCharge = 0 - self.nTrkMassMin = [0.] - self.nTrkMassMax = [2900.] # cut away J/psi - # muons are not matched to tracks, but still require to be present in TE - self.nEfMuon = 0 - self.nL2CombMuon = 0 - self.nL2SAMuon = 0 # as we run on muon RoIs all necessary muons are already requested. - self.ptMuonMin = [] #[3600.] - #self.overlapdR = 0.005 - - time = TrigTimeHistToolConfig("Time") - validation = TrigMultiTrkFexValidationMonitoring() - online = TrigMultiTrkFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -################################################################################### -# trkPhiXTight selects 3 tracks pt>X,X,1 GeV M [1.5,2.5]GeV and OS pair, M in [0.840,1.240] GeV -##################################################################################### - -class TrigMultiTrkFex_trkPhiXTight (TrigMultiTrkFexPy): - __slots__ = [] - def __init__(self, name = "MultiTrkFex_trkPhiXTight"): - super( TrigMultiTrkFex_trkPhiXTight, self ).__init__( name ) - self.nTrk = 3 - self.trkMass = 105.6583745 # looking for di-muon resonances - self.nTrkCharge = 1 - self.nTrkMassMin = [1500.] - self.nTrkMassMax = [2500.] - self.ptTrkMin = [3600., 3600., 1000. ] # set minimal pt of tracks for Phi+Pi - self.diTrkMassMin = [840.] # phi window - self.diTrkMassMax = [1240.] - self.diTrkCharge = 0 - - # muons are not matched to tracks, but still require to be present in TE - self.nEfMuon = 0 - self.nL2CombMuon = 0 - self.nL2SAMuon = 0 # as we run on muon RoIs all necessary muons are already requested. - self.ptMuonMin = [] #[3600.] - #self.overlapdR = 0.005 - - time = TrigTimeHistToolConfig("Time") - validation = TrigMultiTrkFexValidationMonitoring() - online = TrigMultiTrkFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -################################################################################### - -class TrigMultiTrkFex_trkTau (TrigMultiTrkFexPy): - __slots__ = [] - def __init__(self, name = "MultiTrkFex_trkTau"): - super( TrigMultiTrkFex_trkTau, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - #self.trackCollectionKey = "' - self.maxNOutputObject = -1 - self.trkMass = 105.6583745 # looking for di-muon - self.nTrk = 2 - self.nTrkMassMin = [0.] - self.nTrkMassMax = [2900.] # cut away J/psi - self.nTrkCharge = -1 - self.ptTrkMin = [3600., 3600. ] # set minimal pt of tracks for Phi+Pi - self.diTrkMassMin = [] # no sub-resonances - self.diTrkMassMax = [] - # muons are not matched to tracks, but still require to be present in TE - self.nEfMuon = 0 - self.nL2CombMuon = 0 - self.nL2SAMuon = 0 - self.ptMuonMin = [] #3600., 3600.] - self.overlapdR = 0.005 - - - time = TrigTimeHistToolConfig("Time") - validation = TrigMultiTrkFexValidationMonitoring() - online = TrigMultiTrkFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -################################################################################### -class TrigMultiTrkFex_bNmu (TrigMultiTrkFexPy): - __slots__ = [] - # lets force name setting, as it needs to match pt cuts - def __init__(self, name, ptMuonMin ): - super( TrigMultiTrkFex_bNmu, self ).__init__( name ) - - # AcceptAll flag: if true take events regardless of cuts - self.AcceptAll = False - - #self.trackCollectionKey = "' - self.trkMass = 105.6583745 # looking for di-muon resonances - self.nTrk = -1 # no cut - self.nTrkMassMin = [] - self.nTrkMassMax = [] # cut away J/psi - self.nTrkCharge = -1 - self.ptTrkMin = [] # set minimal pt of tracks for Phi+Pi - self.diTrkMassMin = [] # no sub-resonances - self.diTrkMassMax = [] - # muons are not matched to tracks, but still could be required to be present in TE - self.nL2CombMuon = 0 - self.nL2SAMuon = 0 - - # these are 2 cuts that matters. Set to the softest - self.nEfMuon = len(ptMuonMin) - self.ptMuonMin = [] - for thr in ptMuonMin : - self.ptMuonMin.append(thr) - - time = TrigTimeHistToolConfig("Time") - validation = TrigMultiTrkFexValidationMonitoring() - online = TrigMultiTrkFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - - - -################################################################################### - -# B+ -> mu mu K+ -# Bd -> mu mu K*(K+ Pi-) -# Bs -> mu mu Phi(K+ K-) -# Lambda_b -> mu mu Lambda(P Pi) -# Bc -> mu mu Ds(Phi pi) -# Bc -> mu mu D+(K pi pi) -# Bc -> mu mu D*(D0 pi), D0 -> K- pi+ -# Bc -> mu mu D0(K pi) - - -# BcD selects following channels -# - B_c+ -> J/psi D_s+, D_s+ -> phi pi+, phi -> K+ K- -# - B_c+ -> J/psi D+, D_+ -> K- pi+ pi+ -# - B_c+ -> J/psi D*+, D*+ -> D0 pi+_s, D0 -> K- pi+ -# - the same decay without reconstruction of pi+_s - -##################################################################################### -class TrigMultiTrkFex_B_2mu1trk (TrigMultiTrkFexPy): - __slots__ = [] - def __init__(self, name = "MultiTrkFex_B_2mu1trk"): - super( TrigMultiTrkFex_B_2mu1trk, self ).__init__( name ) - - #self.trackCollectionKey = "' - # disable any parameter by setting it to -1 or giving an empty list - self.trkMass = 139.57018 # take pion mass for all tracks, adjust mass accordingly, if you need Kaons - self.nTrk = 3 - self.nTrkCharge = 1 - self.nTrkVertexChi2 = 20 - self.ptTrkMin = [1000., 1000., 1000. ] # set minimal pt of tracks; first 2 thresholds will be replaced by muon thresholds in the menu - self.diTrkMassMin = [100.] # di-muon - self.diTrkMassMax = [5500.] # - self.diTrkCharge = 0 # set to -1 to disable - self.nTrkMassMin = [4040] # lower as we replaced Kaon with pion mass - self.nTrkMassMax = [5440.] # default cut is - # muons are not matched to tracks, but still could be required to be present in TE - self.nEfMuon = 0 - self.nL2CombMuon = 0 - self.nL2SAMuon = 0 # as we run on muon RoIs all necessary muons are already requested. - self.ptMuonMin = [] #[3600.] - #self.overlapdR = 0.005 - - time = TrigTimeHistToolConfig("Time") - validation = TrigMultiTrkFexValidationMonitoring() - online = TrigMultiTrkFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -##################################################################################### -# K*mumu -class TrigMultiTrkFex_B_2mu2trk (TrigMultiTrkFexPy): - __slots__ = [] - def __init__(self, name = "MultiTrkFex_B_2mu2trk"): - super( TrigMultiTrkFex_B_2mu2trk, self ).__init__( name ) - - #self.trackCollectionKey = "' - # disable any parameter by setting it to -1 or giving an empty list - self.trkMass = 139.57018 # take pion mass for all tracks, adjust mass accordingly, if you need Kaons - self.nTrk = 4 - self.nTrkCharge = 0 - self.nTrkVertexChi2 = 60 - self.ptTrkMin = [1000., 1000., 1000. ] # set minimal pt of tracks; first 2 thresholds will be replaced by muon thresholds in the menu - #self.diTrkMassMin = [100., 359] # di-muon , K* (600-1500) using pion hypo - #self.diTrkMassMax = [5500., 1421.] # - self.diTrkMassMin = [100., 300] # di-muon , K* (600-1500) using pion hypo - self.diTrkMassMax = [5500., 1400.] # - self.diTrkCharge = 0 # set to -1 to disable - self.nTrkMassMin = [4500] # 4600-6300 if we would use Kaon mass - self.nTrkMassMax = [6280.] # - # muons are not matched to tracks, but still could be required to be present in TE - self.nEfMuon = 0 - self.nL2CombMuon = 0 - self.nL2SAMuon = 0 # as we run on muon RoIs all necessary muons are already requested. - self.ptMuonMin = [] #[3600.] - #self.overlapdR = 0.005 - - time = TrigTimeHistToolConfig("Time") - validation = TrigMultiTrkFexValidationMonitoring() - online = TrigMultiTrkFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - - -############################################################################# -class TrigMultiTrkFex_DiMu (TrigMultiTrkFexPy): - __slots__ = [] - def __init__(self, name = "MultiTrkFex_DiMu"): - super( TrigMultiTrkFex_DiMu, self ).__init__( name ) - self.nTrk = 2 - self.trkMass = 105.6583745 # looking for di-muon resonances - self.nTrkVertexChi2 = 20 - self.nTrkCharge = 0 - self.nTrkMassMin = [100.] - self.nTrkMassMax = [15000.] - self.ptTrkMin = [3600., 3600. ] # set minimal pt of tracks for 2mu passing L1 - self.diTrkMassMin = [] # phi window - self.diTrkMassMax = [] - self.diTrkCharge = -1 - - # muons are not matched to tracks, but still require to be present in TE - self.nEfMuon = 0 - self.nL2CombMuon = 0 - self.nL2SAMuon = 0 # as we run on muon RoIs all necessary muons are already requested. - self.ptMuonMin = [] #[3600.] - #self.overlapdR = 0.005 - - time = TrigTimeHistToolConfig("Time") - validation = TrigMultiTrkFexValidationMonitoring() - online = TrigMultiTrkFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - - -class TrigMultiTrkFex_DiMu_noCut (TrigMultiTrkFex_DiMu): - __slots__ = [] - def __init__(self, name = "MultiTrkFex_DiMu_noCut"): - super( TrigMultiTrkFex_DiMu_noCut, self ).__init__( name ) - self.nTrkCharge = -1 - self.nTrkVertexChi2 = -1 - self.nTrkMassMin = [0.] - self.nTrkMassMax = [1e+8] # should be safe at LHC, no? - -class TrigMultiTrkFex_DiMu_noVtx_noOS (TrigMultiTrkFex_DiMu): - __slots__ = [] - def __init__(self, name = "MultiTrkFex_DiMu_noVtx_noOS"): - super( TrigMultiTrkFex_DiMu_noVtx_noOS, self ).__init__( name ) - self.nTrkCharge = -1 - self.nTrkVertexChi2 = -1 - - -class TrigMultiTrkFex_DiMu_noVtx_noM_SS (TrigMultiTrkFex_DiMu): - __slots__ = [] - def __init__(self, name = "MultiTrkFex_DiMu_noVtx_noM_SS"): - super( TrigMultiTrkFex_DiMu_noVtx_noM_SS, self ).__init__( name ) - self.nTrkCharge = 2 - self.nTrkVertexChi2 = -1 - self.nTrkMassMin = [0.] # OI not sure if this will work... - self.nTrkMassMax = [1e+8] # should be safe at LHC, no? - -############################################################################# -class TrigMultiTrkFex_Vtx2 (TrigMultiTrkFexPy): - __slots__ = [] - def __init__(self, name = "TrigMultiTrkFex_Vtx2"): - super( TrigMultiTrkFex_Vtx2, self ).__init__( name ) - self.nTrk = 2 - self.trkMass = 105.6583745 # looking for di-muon resonances - self.nTrkVertexChi2 = 100 # very loose here, tighter at Hypo - self.nTrkCharge = -1 - self.nTrkMassMin = [0.] - self.nTrkMassMax = [1e+8] # should be safe at LHC, no? - self.ptTrkMin = [3600., 3600. ] # set minimal pt of tracks for 2mu passing L1 - self.diTrkMassMin = [] # phi window - self.diTrkMassMax = [] - self.diTrkCharge = -1 - - # muons are not matched to tracks, but still require to be present in TE - self.nEfMuon = 0 - self.nL2CombMuon = 0 - self.nL2SAMuon = 0 # as we run on muon RoIs all necessary muons are already requested. - self.ptMuonMin = [] #[3600.] - #self.overlapdR = 0.005 - - time = TrigTimeHistToolConfig("Time") - validation = TrigMultiTrkFexValidationMonitoring() - online = TrigMultiTrkFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -class TrigMultiTrkFex_Vtx3 (TrigMultiTrkFexPy): - __slots__ = [] - def __init__(self, name = "TrigMultiTrkFex_Vtx3"): - super( TrigMultiTrkFex_Vtx3, self ).__init__( name ) - self.nTrk = 3 - self.ptTrkMin = [3600., 3600., 3600. ] # set minimal pt of tracks for 3mu passing L1 - -############################################################################# -class TrigMultiTrkFex_Jpsi (TrigMultiTrkFexPy): - __slots__ = [] - def __init__(self, name = "MultiTrkFex_Jpsi"): - super( TrigMultiTrkFex_Jpsi, self ).__init__( name ) - self.nTrk = 2 - self.trkMass = 105.6583745 # looking for di-muon resonances - self.nTrkVertexChi2 = 20 - self.nTrkCharge = 0 - self.nTrkMassMin = [2600.] - self.nTrkMassMax = [3600.] - self.ptTrkMin = [3500., 3500. ] # set minimal pt of tracks for 2mu passing L1 - self.diTrkMassMin = [] # phi window - self.diTrkMassMax = [] - self.diTrkCharge = -1 - - # muons are not matched to tracks, but still require to be present in TE - self.nEfMuon = 0 - self.nL2CombMuon = 0 - self.nL2SAMuon = 0 # as we run on muon RoIs all necessary muons are already requested. - self.ptMuonMin = [] #[3600.] - #self.overlapdR = 0.005 - - time = TrigTimeHistToolConfig("Time") - validation = TrigMultiTrkFexValidationMonitoring() - online = TrigMultiTrkFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - - -class TrigMultiTrkFex_EMu (TrigMultiTrkFexPy): - __slots__ = [] - def __init__(self, name = "MultiTrkFex_EMu"): - super( TrigMultiTrkFex_EMu, self ).__init__( name ) - self.nTrk = 2 - self.trkMass = 0.5 # looking for electron-muon resonances ; ignore muon mass - self.nTrkVertexChi2 = 20 - self.nTrkCharge = 0 - self.nTrkMassMin = [100.] - self.nTrkMassMax = [7000.] - self.ptTrkMin = [3600., 3600. ] # set minimal pt of tracks for 2mu passing L1 - self.diTrkMassMin = [] # phi window - self.diTrkMassMax = [] - self.diTrkCharge = 0 - - # muons are not matched to tracks, but still require to be present in TE - self.nEfMuon = 0 - self.nL2CombMuon = 0 - self.nL2SAMuon = 0 # as we run on muon RoIs all necessary muons are already requested. - self.ptMuonMin = [] #[3600.] - #self.overlapdR = 0.005 - - time = TrigTimeHistToolConfig("Time") - validation = TrigMultiTrkFexValidationMonitoring() - online = TrigMultiTrkFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - -############################################################################# -class TrigMultiTrkFex_DiE (TrigMultiTrkFexPy): - __slots__ = [] - def __init__(self, name = "MultiTrkFex_DiE"): - super( TrigMultiTrkFex_DiE, self ).__init__( name ) - self.nTrk = 2 - self.trkMass = 0.511 # looking for di-electron resonances - self.nTrkVertexChi2 = 20 # set twice worse than for muons - self.nTrkCharge = 0 - self.nTrkMassMin = [10.] - self.nTrkMassMax = [9000.] - self.ptTrkMin = [3600., 3600. ] # set minimal pt of tracks for 2mu passing L1 - changed in generateBphysicsChainDefs - self.diTrkMassMin = [] # phi window - self.diTrkMassMax = [] - self.diTrkCharge = -1 - self.outputTrackCollectionKey = "MultiTrkFex_DiE" - self.bphysCollectionKey = "MultiTrkFex_DiE" - self.maxNOutputObject = 10 - - # muons are not matched to tracks, but still require to be present in TE - self.nEfMuon = 0 - self.nL2CombMuon = 0 - self.nL2SAMuon = 0 # as we run on muon RoIs all necessary muons are already requested. - self.ptMuonMin = [] #[3600.] - self.overlapdR = 0.005 - - time = TrigTimeHistToolConfig("Time") - validation = TrigMultiTrkFexValidationMonitoring() - online = TrigMultiTrkFexOnlineMonitoring() - - self.AthenaMonTools = [ validation, online, time ] - diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigMultiTrkFexMonitoring.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigMultiTrkFexMonitoring.py deleted file mode 100644 index 825a6ad348b0bd7a673960f147f3e56570c9262a..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigMultiTrkFexMonitoring.py +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig - -ERROR_labels = ' AlgorithmProblem : BphysColl_Fails ' -ERROR_number = 2 - -ACCEPTANCE_labels = ' Input : HltExecute : PassNL2SAMuons : PassNL2CombMuons : PassNEFMuons : PassNTracks : HighPtTrack : NTrkCharge : NTrkMass : PairCharge : PairMass : RecordedCollection ' -ACCEPTANCE_number = 13 - -class TrigMultiTrkFexValidationMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigMultiTrkFexValidationMonitoring"): - super(TrigMultiTrkFexValidationMonitoring, self).__init__(name) - self.defineTarget("Validation") - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'MultiTrkFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - title = 'MultiTrkFex - Reached steps - acceptance ; ; # Events / Candidates', - xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - labels = ACCEPTANCE_labels ) ] - self.Histograms += [ defineHistogram('NTrkMass', type='TH1F', title="Inv.mass(mumu) [GeV]", - xbins=100, xmin=0., xmax=13.) ] - self.Histograms += [ defineHistogram('NTrkFitMass', type='TH1F', title=" FitBMass [GeV]", - xbins=100, xmin=0., xmax=13.) ] - self.Histograms += [ defineHistogram('NTrkChi2', type='TH1F', title="Chi2 of vertex fit", - xbins=100, xmin=0., xmax=10.) ] - self.Histograms += [ defineHistogram('PairMass', type='TH1F', title="Inv.mass(mumu) [GeV]", - xbins=100, xmin=0., xmax=13.) ] - self.Histograms += [ defineHistogram('NTrk_all', type='TH1F', title="Number of tracks", - xbins=100, xmin=0., xmax=100.) ] - self.Histograms += [ defineHistogram('NTrk_highpt', type='TH1F', title="Number of high pt tracks", - xbins=100, xmin=0., xmax=100.) ] - self.Histograms += [ defineHistogram('NTrkHighPt_accepted', type='TH1F', title="Number of high pt tracks in accepted events", - xbins=100, xmin=0., xmax=100.) ] - self.Histograms += [ defineHistogram('NPair_all', type='TH1F', title="Number of hight pt pairs", - xbins=100, xmin=0., xmax=100.) ] - self.Histograms += [ defineHistogram('NPair_accepted', type='TH1F', title="Number of hight pt pairs (accepted)", - xbins=100, xmin=0., xmax=100.) ] - self.Histograms += [ defineHistogram('logNCombinations_processed', type='TH1F', title="Log10 (Number of combinations processed)", - xbins=50, xmin=0., xmax=5.) ] - self.Histograms += [ defineHistogram('logNCombinations_accepted', type='TH1F', title=" Log10 (Number of combinations accepted)", - xbins=50, xmin=0., xmax=5.) ] - - - -class TrigMultiTrkFexOnlineMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="TrigMultiTrkFexOnlineMonitoring"): - super(TrigMultiTrkFexOnlineMonitoring, self).__init__(name) - self.defineTarget("Online") - - self.Histograms = [ defineHistogram ( 'Errors', type = 'TH1F', - title = 'MultiTrkFex - Algorithm errors ; ; # Events / Candidates', - xbins = ERROR_number , xmin = -0.5, xmax = ERROR_number - 0.5, - labels = ERROR_labels ) ] - self.Histograms += [ defineHistogram ( 'Acceptance', type = 'TH1F', - title = 'MultiTrkFex - Reached steps - acceptance ; ; # Events / Candidates', - xbins = ACCEPTANCE_number , xmin = -0.5, xmax = ACCEPTANCE_number - 0.5, - labels = ACCEPTANCE_labels ) ] - self.Histograms += [ defineHistogram('NTrkMass', type='TH1F', title="Inv.mass(mumu) [GeV]", - xbins=100, xmin=0., xmax=13.) ] - self.Histograms += [ defineHistogram('NTrkFitMass', type='TH1F', title=" FitBMass [GeV]", - xbins=100, xmin=0., xmax=13.) ] - self.Histograms += [ defineHistogram('NTrkChi2', type='TH1F', title="Chi2 of vertex fit", - xbins=100, xmin=0., xmax=10.) ] - self.Histograms += [ defineHistogram('PairMass', type='TH1F', title="Inv.mass(mumu) [GeV]", - xbins=100, xmin=0., xmax=13.) ] - self.Histograms += [ defineHistogram('NTrk_all', type='TH1F', title="Number of tracks", - xbins=100, xmin=0., xmax=100.) ] - self.Histograms += [ defineHistogram('NTrk_highpt', type='TH1F', title="Number of high pt tracks", - xbins=100, xmin=0., xmax=100.) ] - self.Histograms += [ defineHistogram('NTrkHighPt_accepted', type='TH1F', title="Number of high pt tracks (accepted)", - xbins=100, xmin=0., xmax=100.) ] - #self.Histograms += [ defineHistogram('NPair_all', type='TH1F', title="Number of hight pt pairs", - # xbins=100, xmin=0., xmax=100.) ] - #self.Histograms += [ defineHistogram('NPair_accepted', type='TH1F', title="Number of hight pt pairs (accepted)", - # xbins=100, xmin=0., xmax=100.) ] - self.Histograms += [ defineHistogram('logNCombinations_processed', type='TH1F', title="Log10 (Number of combinations processed)", - xbins=50, xmin=0., xmax=5.) ] - self.Histograms += [ defineHistogram('logNCombinations_accepted', type='TH1F', title=" Log10 (Number of combinations accepted)", - xbins=50, xmin=0., xmax=5.) ] diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysElectronCounter.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysElectronCounter.cxx deleted file mode 100644 index 1b5661332416dbe45a08c0d1436f3510d48be46e..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysElectronCounter.cxx +++ /dev/null @@ -1,241 +0,0 @@ -// -*- C++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/************************************************************************** - ** - ** File: Trigger/TrigHypothesis/TrigBphysHypo/TrigBphysElectronCounter - ** - ** Description: algo to count electrons in whole event - ** - ** author Olya Igonkina (Nikhef) - ** - **************************************************************************/ - -#include "TrigBphysElectronCounter.h" - -#include "xAODEgamma/ElectronContainer.h" -#include "TrigTimeAlgs/TrigTimer.h" // for TrigTimer - -// Define the bins for acceptance-monitoring histogram -#define ACCEPT_hltExecute 0 -#define ACCEPT_PassNElectrons 1 -#define ACCEPT_PassPtcut 3 -#define ACCEPT_PassIsEM 2 - - -TrigBphysElectronCounter::TrigBphysElectronCounter(const std::string & name, ISvcLocator* pSvcLocator): - HLT::AllTEAlgo(name, pSvcLocator) - ,m_BmmHypTot(0) - - , m_nEfElectron(0) - , m_ptElectronMin() - , m_mindR(0.005) - , m_electronCollectionKey() - , m_outputTrackCollectionKey() - , m_IsEMrequiredBits(0xF2) - , m_applyIsEM(true) - , m_lumiBlockMuTool("LumiBlockMuTool/LumiBlockMuTool") - //counters - , m_countTotalEvents(0) - , m_countPassedEvents(0) -{ - -// Read cuts - - declareProperty("nEfElectron" , m_nEfElectron = 0 ); - declareProperty("ptElectronMin" , m_ptElectronMin ); - declareProperty("overlapdR" , m_mindR = 0.01 ); - declareProperty("electronCollectionKey", m_electronCollectionKey = "" ); - declareProperty("outputTrackCollectionKey", m_outputTrackCollectionKey = "BphysElectronCounter" ); - declareProperty("ApplyIsEM", m_applyIsEM = true); - declareProperty("IsEMrequiredBits", m_IsEMrequiredBits = 0xF2); - - declareProperty("egammaElectronCutIDToolName",m_egammaElectronCutIDToolName=""); - declareProperty("AthenaElectronLHIDSelectorToolName", m_athElectronLHIDSelectorToolName=""); - declareProperty("UseAthenaElectronLHIDSelectorTool", m_useAthElectronLHIDSelector=false); - declareProperty("LuminosityTool", m_lumiBlockMuTool, "Luminosity Tool"); - - declareMonitoredStdContainer("Acceptance" , m_mon_Acceptance , AutoClear); - declareMonitoredVariable( "nEFElectrons", m_mon_nEFElectrons); -} - -TrigBphysElectronCounter::~TrigBphysElectronCounter() -{ } - - - - -HLT::ErrorCode TrigBphysElectronCounter::hltInitialize() -{ - m_countTotalEvents = 0; - m_countPassedEvents = 0; - - // sort both list in decreasing pt - //std::sort(IsEMrequiredBits.begin(), IsEMrequiredBits.end(), [&m_ptElectronMin](size_t i, size_t j) {return m_ptElectronMin[i] > m_ptElectronMin[j];}); - std::sort(m_ptElectronMin.begin(), m_ptElectronMin.end(), std::greater<float>()); - - - - if (m_egammaElectronCutIDToolName=="") { - ATH_MSG_DEBUG("Electron IsEM PID is disabled, no tool specified "); - m_egammaElectronCutIDTool=ToolHandle<IAsgElectronIsEMSelector>(); - m_applyIsEM = false; - } - else { - m_egammaElectronCutIDTool=ToolHandle<IAsgElectronIsEMSelector>(m_egammaElectronCutIDToolName); - if(m_egammaElectronCutIDTool.retrieve().isFailure()) { - ATH_MSG_ERROR("Unable to retrieve " << m_egammaElectronCutIDTool<< " tool "); - return HLT::BAD_JOB_SETUP; - } - else { - ATH_MSG_DEBUG("Tool " << m_egammaElectronCutIDTool << " retrieved"); - } - } - - if (m_athElectronLHIDSelectorToolName=="") { - ATH_MSG_DEBUG("Electron LH PID is disabled, no tool specified "); - m_athElectronLHIDSelectorTool=ToolHandle<IAsgElectronLikelihoodTool>(); - } - else { - m_athElectronLHIDSelectorTool=ToolHandle<IAsgElectronLikelihoodTool>(m_athElectronLHIDSelectorToolName); - if(m_athElectronLHIDSelectorTool.retrieve().isFailure()) { - ATH_MSG_ERROR("Unable to retrieve " << m_athElectronLHIDSelectorTool); - return HLT::BAD_JOB_SETUP; - - // For now, just try to retrieve the lumi tool, It is used only in LH, so retrieve only if needed - if (m_lumiBlockMuTool.retrieve().isFailure()) { - ATH_MSG_WARNING("Unable to retrieve Luminosity Tool"); - } else { - ATH_MSG_DEBUG("Successfully retrieved Luminosity Tool"); - } - } - else{ - ATH_MSG_DEBUG("Tool " << m_athElectronLHIDSelectorTool << " retrieved"); - } - } - - - ATH_MSG_INFO("require at least "<< m_nEfElectron <<" EF Electrons from collection " << m_electronCollectionKey << ", with pts: "); - if(msgLvl() <= MSG::INFO){ - for(float pt : m_ptElectronMin){ msg() << MSG::INFO << pt <<", ";} - msg() << MSG::INFO << endmsg; - } - if( m_applyIsEM ) { - ATH_MSG_INFO(" Electrons should have isEM bits " << std::hex << "0x" << m_IsEMrequiredBits << std::dec); - }else{ - ATH_MSG_INFO(" no isEM PID cuts are applied "); - } - - ATH_MSG_INFO(" Overlap removal dR<"<<m_mindR); - - if ( timerSvc() ) { - m_BmmHypTot = addTimer("TrigBphysElectronCounter"); - } - - - - - return HLT::OK; -} - -HLT::ErrorCode TrigBphysElectronCounter::hltFinalize() -{ - ATH_MSG_INFO("in finalize()"); - MsgStream log(msgSvc(), name()); - - ATH_MSG_INFO("|----------------------- SUMMARY FROM TrigBphysElectronCounter -------------|"); - ATH_MSG_INFO("Run on events " << m_countTotalEvents ); - ATH_MSG_INFO("Passed events " << m_countPassedEvents); - - return HLT::OK; -} - - - -HLT::ErrorCode TrigBphysElectronCounter::hltExecute(std::vector<std::vector<HLT::TriggerElement*> >& inputTE, unsigned int output) -{ - // start monitoring - beforeExecMonitors().ignore(); - m_countTotalEvents++; - m_mon_Acceptance.clear(); - - m_mon_Acceptance.push_back( ACCEPT_hltExecute ); - ATH_MSG_DEBUG(" In TrigBphysElectronCounter hltExecute"); - - - //======== check if we have enough EF electrons : ===================== - std::vector<ElementLink<xAOD::ElectronContainer> > efelectrons; // just a collection of pointers, not copies - int failedCut = passNObjects<xAOD::ElectronContainer, - std::vector<ElementLink<xAOD::ElectronContainer> > >( m_nEfElectron, m_ptElectronMin, m_IsEMrequiredBits, - inputTE, efelectrons, m_electronCollectionKey, m_mindR); - if( failedCut != 0 ){ - if ( timerSvc() ) m_BmmHypTot->stop(); - if( failedCut == 1 ){ - ATH_MSG_DEBUG("Found "<<efelectrons.size() <<" EF electrons - fail N object cut "); - }else if( failedCut == 2 ){ - ATH_MSG_DEBUG(" fail pt cuts "); - m_mon_Acceptance.push_back( ACCEPT_PassNElectrons ); - }else if( failedCut == 3 ){ - ATH_MSG_DEBUG(" fail isEM cuts "); - m_mon_Acceptance.push_back( ACCEPT_PassNElectrons ); - m_mon_Acceptance.push_back( ACCEPT_PassPtcut ); - }else { - ATH_MSG_WARNING(" unknown return code!! Please contact developers "); - } - afterExecMonitors().ignore(); - return HLT::OK; - }else{ - ATH_MSG_DEBUG("Found "<<efelectrons.size() <<" EF electrons, require "<<m_nEfElectron<<" - accept "); - } - m_mon_Acceptance.push_back( ACCEPT_PassNElectrons ); - m_mon_Acceptance.push_back( ACCEPT_PassPtcut ); - m_mon_Acceptance.push_back( ACCEPT_PassIsEM ); - m_mon_nEFElectrons = m_nEfElectron; - - - xAOD::TrackParticleContainer* outputTrackColl = new xAOD::TrackParticleContainer(); - xAOD::TrackParticleAuxContainer outputTrackCollAuxCont; - outputTrackColl->setStore( &outputTrackCollAuxCont ); - outputTrackColl->reserve(m_nEfElectron); - for( const auto& elec : efelectrons ){ - xAOD::TrackParticle *trk1 = new xAOD::TrackParticle(); - trk1->makePrivateStore( (*elec)->trackParticle()); - outputTrackColl->push_back(trk1); - } - ATH_MSG_DEBUG("size of output Track collection " << outputTrackColl->size() ); - - - // record collection now - if ( timerSvc() ) m_BmmHypTot->stop(); - - HLT::TriggerElement* outputTE = addRoI(output); - outputTE->setActiveState(true); - - m_countPassedEvents++; - // add also containter with tracks for seeded EF Muon - if (m_outputTrackCollectionKey!= "" && outputTrackColl && outputTrackColl->size()) { - ATH_MSG_DEBUG("REGTEST: Store Bphys track Collection size: " << outputTrackColl->size() ); - HLT::ErrorCode sc = attachFeature(outputTE, outputTrackColl, m_outputTrackCollectionKey ); - if(sc != HLT::OK) { - ATH_MSG_ERROR("Failed to store bphys track Collection" ); - delete outputTrackColl; outputTrackColl = nullptr; // assume deletion responsibility - afterExecMonitors().ignore(); - return HLT::ERROR; - } - } else { - ATH_MSG_DEBUG("REGTEST: no bphys track collection to store " ); - delete outputTrackColl; outputTrackColl = nullptr; - } - - - // stop monitoring - afterExecMonitors().ignore(); - return HLT::OK; -} - - - - diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysElectronCounter.h b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysElectronCounter.h deleted file mode 100644 index eb481292c9d6ff40d9985f262e0e0eef13d99eff..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysElectronCounter.h +++ /dev/null @@ -1,224 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -/************************************************************************** - ** - ** File: Trigger/TrigHypothesis/TrigBphysHypo/TrigBphysElectronCounter.h - ** - ** this algo just counts number of (EF) electrons in the whole event and rejects if insufficient - ** - ** Author:Olya Igonkina (Nikhef) - ** - ** Created: 28/03/2017 - ** Modified: - ** - **************************************************************************/ - -#ifndef TRIG_TrigBphysElectronCounter_H -#define TRIG_TrigBphysElectronCounter_H - -// standard stuff -#include <string> -#include <algorithm> - -#include "TrigInterfaces/AllTEAlgo.h" -#include "ElectronPhotonSelectorTools/AsgElectronIsEMSelector.h" -#include "ElectronPhotonSelectorTools/AsgElectronLikelihoodTool.h" -#include "LumiBlockComps/ILumiBlockMuTool.h" -//#include "PATCore/TAccept.h" // for TAccept -//#include "PATCore/TResult.h" // for TResult - -class TrigTimer; - -class TrigBphysElectronCounter: public HLT::AllTEAlgo { - - public: - TrigBphysElectronCounter(const std::string & name, ISvcLocator* pSvcLocator); - ~TrigBphysElectronCounter(); - HLT::ErrorCode hltInitialize(); - HLT::ErrorCode hltFinalize(); - - HLT::ErrorCode hltExecute(std::vector<std::vector<HLT::TriggerElement*> >& inputTEs, unsigned int output); - - private: - - - - template<class Tin, class Tout> int passNObjects(int nObjMin, - const std::vector<float>& ptObjMin, - unsigned int isEMBitCuts, - std::vector<std::vector<HLT::TriggerElement*> >& inputTE , - Tout & outVec, - //std::string printTag, - const std::string& collectionKey, - float mindR) ; - - - TrigTimer* m_BmmHypTot; - - int m_nEfElectron ; // electrons have to be present in TE, but are not required to match to tracks - std::vector<float> m_ptElectronMin; - float m_mindR; - // OI: should we check for CB flag? - std::string m_egammaElectronCutIDToolName; - std::string m_athElectronLHIDSelectorToolName; - std::string m_electronCollectionKey; - std::string m_outputTrackCollectionKey; - bool m_useAthElectronLHIDSelector; - unsigned int m_IsEMrequiredBits; //!< isem flag bits required per electron, matches pt cuts - bool m_applyIsEM; //!< true if isem flag required - ToolHandle<IAsgElectronIsEMSelector> m_egammaElectronCutIDTool; - ToolHandle<IAsgElectronLikelihoodTool> m_athElectronLHIDSelectorTool; - /** Luminosity Tool */ - ToolHandle<ILumiBlockMuTool> m_lumiBlockMuTool; // used by LH selector - - //Counters - uint32_t m_countTotalEvents; - uint32_t m_countPassedEvents; - - - //Monitored variables - std::vector<int> m_mon_Acceptance; - float m_mon_nEFElectrons; - std::vector<unsigned int> m_IsEMRequiredBits; - std::vector<unsigned int> m_IsEMRequiredBitsAfterCut; -}; - - -template<class Tin, class Tout> int TrigBphysElectronCounter::passNObjects(int nObjMin, - const std::vector<float>& ptObjMin, - unsigned int isEMBitCuts, - std::vector<std::vector<HLT::TriggerElement*> >& inputTE , - Tout & outVec, - //std::string printTag, - const std::string& collectionKey, - float mindR) -{ - if( nObjMin <= 0 ) return 1; - ElementLinkVector<Tin> inVecColl; - outVec.clear(); - std::vector<float> pts; - - float mindR2 = mindR*mindR; - - bool useLumiTool=false; - double avg_mu = 0.; - if(m_useAthElectronLHIDSelector && m_lumiBlockMuTool){ - useLumiTool=true; - double mu = m_lumiBlockMuTool->actualInteractionsPerCrossing(); // (retrieve mu for the current BCID) - avg_mu = m_lumiBlockMuTool->averageInteractionsPerCrossing(); - ATH_MSG_DEBUG("REGTEST: Retrieved Mu Value : " << mu << ", Average Mu Value : " << avg_mu); - } - - // first get all candidates with suitable pt - Tout outVecTmp; - - float lowestPt = ptObjMin.back(); - ATH_MSG_DEBUG("REGTEST: asking for pt cut " << lowestPt); - - unsigned int nTEs = inputTE.size(); - for ( unsigned int i=0; i < nTEs; ++i) { - unsigned int mTEs = inputTE[i].size(); - for ( unsigned int j=0; j < mTEs; ++j) { - if(getFeaturesLinks<Tin,Tin>(inputTE[i][j], inVecColl, collectionKey)==HLT::OK ) { - for( const auto& efmu : inVecColl){ - // check for overlap - bool found = false; - for(const auto& part : outVecTmp ){ - ATH_MSG_DEBUG(" found pt " << (*part)->pt() << " lowestPt "<< lowestPt ); - if( (*part)->pt() < lowestPt ) continue; - double deta = (*part)->eta() - (*efmu)->eta(); - double dphi = (*part)->phi() - (*efmu)->phi(); - double deltaR2 = deta*deta +dphi*dphi; - if( deltaR2 <= mindR2) found = true; - } - if( !found ) outVecTmp.push_back(efmu); - } // loop over inVecColl - }}} // end loop over TE - - //=== check if it is enough electrons - if( (int)outVecTmp.size() < nObjMin ) { - ATH_MSG_DEBUG("Rejecting: " <<" #electrons before PID = " << outVecTmp.size() << " while need "<< nObjMin ); - return 1; - } - - // now check isEM and keep only relevant electrons - outVec.clear(); - for(const auto & efmu : outVecTmp ){ - // calculate isEM - unsigned int isEMTrig = 0; - bool isLHAcceptTrig = false; - //float lhval=0; - - if( m_applyIsEM ) { - if(m_useAthElectronLHIDSelector){ - if( m_athElectronLHIDSelectorTool != 0){ - if(useLumiTool){ - const asg::AcceptData& acc = m_athElectronLHIDSelectorTool->accept( Gaudi::Hive::currentContext(), dynamic_cast<const xAOD::Electron*>(*efmu) , avg_mu ); -// lhval=m_athElectronLHIDSelectorTool->getTResult().getResult(0); -// ATH_MSG_DEBUG("LHValue with mu " << lhval); - isLHAcceptTrig = (bool) (acc); - }else { - ATH_MSG_DEBUG("Lumi tool returns mu = 0, do not pass mu"); - const asg::AcceptData& acc = m_athElectronLHIDSelectorTool->accept(*efmu); -// lhval=m_athElectronLHIDSelectorTool->getTResult().getResult(0); -// ATH_MSG_DEBUG("LHValue without mu " << lhval); - isLHAcceptTrig = (bool) (acc); - } - } // end of m_athElectronLHIDSelectorTool != 0 - }else{ - if( m_egammaElectronCutIDTool != 0 ){ - if( m_egammaElectronCutIDTool->execute( Gaudi::Hive::currentContext(), dynamic_cast<const xAOD::Egamma*>(*efmu), isEMTrig ).isFailure() ) - ATH_MSG_DEBUG(" can not calculate isEM on electron " << (*efmu)->pt() ); - //isEMTrig = m_egammaElectronCutIDTool->IsemValue(); - ATH_MSG_DEBUG(" set isEM Trig " << std::hex << isEMTrig << " on electron " << (*efmu)->pt() ); - - if( (isEMTrig & isEMBitCuts)==0 ) isLHAcceptTrig = true; - } - } // end of m_egammaElectronCutIDTool != 0 - }else{ - ATH_MSG_DEBUG(" No check of isEM is done " ); - isLHAcceptTrig = true; - } // end of if( m_applyIsEM ) - - if( isLHAcceptTrig ){ // good candidate - outVec.push_back(efmu); - float pt = fabs((*efmu)->pt()) ; - // check if value in GeV or MeV, if it was >350 GeV and multiplied by 1000, it does not matter - if( pt < 350. && pt>0.01 ) pt *= 1000.; - pts.push_back(pt); - ATH_MSG_DEBUG("Found electron, pt= " << pt << ", isEMTrig= 0x"<< std::hex << isEMTrig - << " (required isEM= 0x"<< std::hex << isEMBitCuts << std::dec<< ")" - << ", isLHAccept = " << isLHAcceptTrig ); - unsigned int isEMbit=0; - ATH_MSG_DEBUG(" passing isEMLoose = " << (*efmu)->selectionisEM(isEMbit,"isEMLoose") << " 0x" << std::hex << isEMbit ); - } - } // end loop over electrons passing pt cuts - - if( (int)outVec.size() < nObjMin ) { - ATH_MSG_DEBUG("Rejecting: " <<" #electrons after PID = " << outVec.size() << " while need "<< nObjMin ); - return 2; - } - - // now check pts cuts - std::sort(pts.begin(), pts.end(), std::greater<float>()); - - //== check that electrons have correct pts and isEM - unsigned int Ncheck = std::min( nObjMin, int(ptObjMin.size()) ); - bool failElectronPt = false; - for ( unsigned int ipt=0; ipt < Ncheck; ++ipt) { - if( pts[ipt] < ptObjMin[ipt] ) - failElectronPt = true; - } - if( failElectronPt ){ - ATH_MSG_DEBUG("Fail electron pt cut" ); - return 3; - } - - return 0; - -} - - -#endif diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysHelperUtilsTool.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysHelperUtilsTool.cxx deleted file mode 100644 index b1a4a4fe510a7d3620c1644f5601c3ada713ae19..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysHelperUtilsTool.cxx +++ /dev/null @@ -1,667 +0,0 @@ -///////////////////////// -*- C++ -*- ///////////////////////////// - -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -// TrigBphysHelperUtilsTool.cxx -// Implementation file for class TrigBphysHelperUtilsTool -// Author: S.Binet<binet@cern.ch> -/////////////////////////////////////////////////////////////////// - -// TrigBphysHypo includes -#include "TrigBphysHelperUtilsTool.h" - -// STL includes - -// FrameWork includes - -#include "xAODTrigMuon/L2StandAloneMuon.h" - - -/////////////////////////////////////////////////////////////////// -// Public methods: -/////////////////////////////////////////////////////////////////// - -// Constructors -//////////////// -TrigBphysHelperUtilsTool::TrigBphysHelperUtilsTool( const std::string& type, - const std::string& name, - const IInterface* parent ) : - ::AthAlgTool ( type, name, parent ) -, m_fitterSvc("Trk::TrkVKalVrtFitter/VertexFitterTool",this), m_VKVFitter(nullptr) -{ - declareInterface< TrigBphysHelperUtilsTool >(this); - // - // Property declaration - // - //declareProperty( "Property", m_nProperty ); - declareProperty("VertexFitterTool", m_fitterSvc); -} - -// Destructor -/////////////// -TrigBphysHelperUtilsTool::~TrigBphysHelperUtilsTool() -{} - -// Athena algtool's Hooks -//////////////////////////// -StatusCode TrigBphysHelperUtilsTool::initialize() -{ - ATH_MSG_DEBUG ("Initializing " << name() << "..."); - - if (m_fitterSvc.retrieve().isFailure()) { - ATH_MSG_ERROR("Can't find Trk::TrkVKalVrtFitter" ); - return StatusCode::FAILURE; - } else { - ATH_MSG_DEBUG("Trk::TrkVKalVrtFitter found" ); - m_VKVFitter = dynamic_cast<Trk::TrkVKalVrtFitter*>(&(*m_fitterSvc)); - } - if(m_beamSpotKey.initialize().isFailure()){ - msg() << MSG::ERROR << "Beamspot error" << endmsg; - return StatusCode::FAILURE; - } - return StatusCode::SUCCESS; -} - -StatusCode TrigBphysHelperUtilsTool::finalize() -{ - ATH_MSG_DEBUG ("Finalizing " << name() << "..."); - - return StatusCode::SUCCESS; -} - -/////////////////////////////////////////////////////////////////// -// Const methods: -/////////////////////////////////////////////////////////////////// - -int TrigBphysHelperUtilsTool::sumCharge(const xAOD::TrackParticle *p1, const xAOD::TrackParticle* p2){ - int q1 = (p1->qOverP() > 0) ? 1 : ((p1->qOverP() < 0) ? -1 : 0); - int q2 = (p2->qOverP() > 0) ? 1 : ((p2->qOverP() < 0) ? -1 : 0); - return q1+q2; -} - -double TrigBphysHelperUtilsTool::deltaPhi( double phi1, double phi2) const { - double dphi = phi1 - phi2; - while ( dphi > M_PI ) dphi -= 2*M_PI; - while ( dphi < -M_PI ) dphi += 2*M_PI; - return dphi; -} - -double TrigBphysHelperUtilsTool::deltaEta( double eta1, double eta2) const { - return eta1 - eta2; -} - -double TrigBphysHelperUtilsTool::deltaR(double eta1, double phi1, double eta2, double phi2) const { - return deltaR( deltaEta(eta1,eta2),deltaPhi(phi1,phi2)); -} - -double TrigBphysHelperUtilsTool::deltaR(double deta, double dphi) const { - return sqrt(deta*deta + dphi*dphi); -} - - -bool TrigBphysHelperUtilsTool::areUnique(const xAOD::TrackParticle* t0, const xAOD::TrackParticle* t1, double dEtaCut , double dPhiCut, double dPtCut) const { - if (!t0 || !t1) { - ATH_MSG_DEBUG("nullptr for inputs " << t0 << " " << t1 ); - return false; // if nullptr then return false - } - double pt0 = t0->pt(); - double eta0 = t0->eta(); - double phi0 = t0->phi(); - double pt1 = t1->pt(); - double eta1 = t1->eta(); - double phi1 = t1->phi(); - ATH_MSG_DEBUG("Test Uniqueness of: pT1/pT2, eta1/eta2, phi1/phi2: " - << pt0 << " / " << pt1 << ", " << eta0 << " / " << eta1 << ", " << phi0 << " / " << phi1 ); - double dphi = absDeltaPhi(phi0, phi1); - double deta = absDeltaEta(eta0, eta1); - double dpt = fabs( pt0 - pt1); - - if (dphi < dPhiCut && - deta < dEtaCut && - (dPtCut < 0 && dpt < dPtCut) - ) { - ATH_MSG_DEBUG(" is a Match" ); - return false; // consider tracks to be unique - } else { - ATH_MSG_DEBUG("Tracks are diferent" ); - } - // if here then the tracks are unique - return true; -} // areUnique - - -void TrigBphysHelperUtilsTool::addUnique(const xAOD::Muon* muon, std::vector<const xAOD::Muon*> & output, - double dEtaCut, double dPhiCut, double dPtCut, - xAOD::Muon::TrackParticleType ptype ) const { - if (!muon) { - ATH_MSG_DEBUG("Muon has nullptr " ); - return; - } - - const xAOD::TrackParticle* muontp = muon->trackParticle(ptype); - if (!muontp) { - ATH_MSG_DEBUG("Muon does nove tp of type: " << ptype ); - return; - } - - - double pt = muontp->pt(); - double eta = muontp->eta(); - double phi = muontp->phi(); - - ATH_MSG_DEBUG("to Match: " << muon << " " << muontp << " " - << pt << " " << eta << " " << phi ); - - if (!output.size()) { - ATH_MSG_DEBUG("No previous muons - is unique" << ptype ); - output.push_back(muon); // if no entries, then by definition, unique - return; // done - } - - - for (const auto muin : output) { - const xAOD::TrackParticle* muintp = muin->trackParticle(ptype); - if (!muintp) continue; // shouldn't really happen - - double ptin = muintp->pt(); - double etain = muintp->eta(); - double phiin = muintp->phi(); - - double dphi = absDeltaPhi(phiin, phi); - double deta = absDeltaEta(etain, eta); - double dpt = fabs( pt - ptin); - - ATH_MSG_DEBUG(" against: " << muin << " " << muintp << " " - << ptin << " " << etain << " " << phiin ); - - if (dphi < dPhiCut && - deta < dEtaCut && - (dPtCut < 0 || dpt < dPtCut) - ) { - ATH_MSG_DEBUG(" is a Match" ); - return; // found a matching track, so return out of the function - } - - } // loop over already unoique muons - - ATH_MSG_DEBUG("No match - is unique" ); - // if here, have found no match amongst > 0 possibles - output.push_back(muon); - -} //addUnique - - - -const xAOD::EventInfo* TrigBphysHelperUtilsTool::getEventInfo() const { - // get the event info; return nullptr if not there - const xAOD::EventInfo *evtInfo(0); - if ( evtStore()->retrieve(evtInfo).isFailure() ) { - ATH_MSG_DEBUG("Failed to get xAOD::EventInfo " ); - return nullptr; - } - return evtInfo; -} - -StatusCode TrigBphysHelperUtilsTool::getRunEvtLb(uint32_t & run, uint32_t & evt,uint32_t & lb) const { - run = ~0; - evt = ~0; - lb = ~0; - // JW - Try to get the xAOD event info - const xAOD::EventInfo *evtInfo(0); - if ( evtStore()->retrieve(evtInfo).isFailure() ) { - ATH_MSG_WARNING("Failed to get xAOD::EventInfo " ); - // now try the old event ifo - }else { // found the xAOD event info - run = evtInfo->runNumber(); - evt = evtInfo->eventNumber(); - lb = evtInfo->lumiBlock(); - ATH_MSG_DEBUG(" Run " << run << " Event " << evt ); - } // get event ifo - - return StatusCode::SUCCESS; -} - - -StatusCode TrigBphysHelperUtilsTool::buildDiMu(const std::vector<ElementLink<xAOD::TrackParticleContainer> > & particles, - xAOD::TrigBphys *& result, - xAOD::TrigBphys::pType ptype, - xAOD::TrigBphys::levelType plevel) { - ///Note - if sucess, then caller is responsible for the memory created in result - ATH_MSG_DEBUG("In buildDiMu" ); - result = nullptr; - - if (particles.size() != 2) { - ATH_MSG_DEBUG("Found " << particles.size() << " inputs. Needed 2" ); - return StatusCode::FAILURE; - } - if (!particles[0].isValid() | !particles[1].isValid() ) { - ATH_MSG_DEBUG("Invalid inputs" ); - return StatusCode::FAILURE; - } - - - xAOD::TrackParticle::FourMom_t fourMom = (*particles[0])->p4() + (*particles[1])->p4(); - double massMuMu = invariantMass( *particles[0], *particles[1], s_massMuon,s_massMuon); - - double rap = fourMom.Rapidity(); - double phi = fourMom.Phi(); - double pt = fourMom.Pt(); - - result = new xAOD::TrigBphys; - result->makePrivateStore(); - - result->initialise(0, rap, phi, pt,ptype, massMuMu, plevel ); - bool doFit(true); // set false if problematic TP - - // check the TrackParticles for a covariance matrix - if ((*particles[0])->definingParametersCovMatrixVec().size() == 0) { - doFit = false; - ATH_MSG_DEBUG("Fit not allowed, Problems with TP0" ); - } - if ((*particles[1])->definingParametersCovMatrixVec().size() == 0) { - doFit = false; - ATH_MSG_DEBUG("Fit not allowed, Problems with TP1" ); - } - - const Amg::Vector3D startingPoint(0.,0.,0.); - std::vector<const xAOD::TrackParticle*> trks; - trks.push_back(*particles[0]); - trks.push_back(*particles[1]); - xAOD::Vertex * vx(0); - std::unique_ptr<Trk::IVKalState> state = m_VKVFitter->makeState(); - std::vector<double> masses(particles.size(), s_massMuon); - m_VKVFitter->setMassInputParticles(masses, *state); // give input tracks muon mass - if (doFit) vx = m_VKVFitter->fit(trks,startingPoint,*state); - - if (!vx){ - ATH_MSG_DEBUG("No Vertex returned from fit / fitting not allowed" ); - - result->setFitmass (-9999); - result->setFitchi2 (-9999); - result->setFitndof (-9999); - result->setFitx (-9999); - result->setFity (-9999); - result->setFitz (-9999); - - } else { - double invariantMass(0.), invariantMassError(0.); // #FIXME what about the input masses? - if (!(m_VKVFitter->VKalGetMassError(invariantMass,invariantMassError,*state).isSuccess())) { - ATH_MSG_DEBUG("Warning from VKaVrt - cannot calculate uncertainties!"); - } // if - - result->setFitmass (invariantMass); - result->setFitmassError(invariantMassError); - result->setFitchi2 (vx->chiSquared()); - result->setFitndof (vx->numberDoF()); - result->setFitx (vx->x()); - result->setFity (vx->y()); - result->setFitz (vx->z()); - - delete vx; vx = 0; - } // if vx - - // now add in the element links - note that they need the reshuffling applied - - - ATH_MSG_DEBUG("Print for obj: " << result << "\n\t " << - "roiId: " << result->roiId() << "\n\t " << - "particleType: " << result->particleType() << "\n\t " << - "level: " << result->level() << "\n\t " << - "eta: " << result->eta() << "\n\t " << - "phi: " << result->phi() << "\n\t " << - "mass: " << result->mass() << "\n\t " << - "fitmass: " << result->fitmass() << "\n\t " << - "fitchi2: " << result->fitchi2() << "\n\t " << - "fitndof: " << result->fitndof() << "\n\t " << - "fitx: " << result->fitx() << "\n\t " << - "fity: " << result->fity() << "\n\t " << - "fitz: " << result->fitz() << "\n\t " ); - - result->addTrackParticleLink(particles[0]); - result->addTrackParticleLink(particles[1]); - - - - return StatusCode::SUCCESS; -} //buildDiMu - -StatusCode TrigBphysHelperUtilsTool::vertexFit(xAOD::TrigBphys * result, - const std::vector<ElementLink<xAOD::TrackParticleContainer> > &particles, - const std::vector<double>& inputMasses) const -{ - std::unique_ptr<Trk::IVKalState> state = m_VKVFitter->makeState(); - return vertexFit (result, particles, inputMasses, *state); -} -StatusCode TrigBphysHelperUtilsTool::vertexFit(xAOD::TrigBphys * result, - const std::vector<ElementLink<xAOD::TrackParticleContainer> > &particles, - const std::vector<double>& inputMasses, - Trk::IVKalState& istate) const -{ - ATH_MSG_DEBUG("In vertexFit" ); - if (!result) { - ATH_MSG_DEBUG("Need to provide valid TrigBphys object" ); - return StatusCode::FAILURE; - } - if (particles.size() != inputMasses.size()) { - ATH_MSG_WARNING("Mismatch in particle and mass vector sizes" ); - return StatusCode::FAILURE; - } - bool doFit(true); // set false if problematic TP - std::vector<const xAOD::TrackParticle*> trks; - - for ( const auto& ptlEL : particles) { - if (!ptlEL.isValid()) { - ATH_MSG_DEBUG("Non valid TPEL" ); - doFit = false; - } - if ((*ptlEL)->definingParametersCovMatrixVec().size() == 0) { - doFit = false; - ATH_MSG_DEBUG("Fit not allowed, Problems with TP in vertexFit" ); - } - trks.push_back(*ptlEL); - } // loop over particle ELs - - const Amg::Vector3D startingPoint(0.,0.,0.); // #FIXME use beamline for starting point? - //const Trk::Vertex startingPoint(Amg::Vector3D(0.,0.,0.)); // #FIXME use beamline for starting point? - xAOD::Vertex * vx(0); - m_VKVFitter->setMassInputParticles( inputMasses, istate); // give input tracks muon mass - if (doFit) vx = m_VKVFitter->fit(trks,startingPoint,istate); - TLorentzVector tracks_p; - - if (!vx){ - ATH_MSG_DEBUG("No Vertex returned from fit / fitting not allowed" ); - - result->setFitmass (-9999); - result->setFitchi2 (-9999); - result->setFitndof (-9999); - result->setFitx (-9999); - result->setFity (-9999); - result->setFitz (-9999); - result->setEta (-9999); - result->setPhi (-9999); - - } else { - //std::vector<int> trkIndices(particles.size(),1); - double invariantMass(0.), invariantMassError(0.); // #FIXME what about the input masses? - if (!(m_VKVFitter->VKalGetMassError(invariantMass,invariantMassError,istate).isSuccess())) { - ATH_MSG_DEBUG("Warning from VKaVrt - cannot calculate uncertainties!"); - invariantMass = -9999.; - } // if - - for (unsigned int i_track =0; i_track < vx->nTrackParticles(); i_track++) - tracks_p = vx->trackParticle(i_track)->p4() + tracks_p; - - result->setFitmass (invariantMass); - result->setFitchi2 (vx->chiSquared()); - result->setFitndof (vx->numberDoF()); - result->setFitx (vx->x()); - result->setFity (vx->y()); - result->setFitz (vx->z()); - result->setEta (tracks_p.Eta()); - result->setPhi (tracks_p.Phi()); - - delete vx; vx = 0; - } // if vx - ATH_MSG_DEBUG( - "Print for obj: " << result << "\n\t " << - "roiId: " << result->roiId() << "\n\t " << - "particleType: " << result->particleType() << "\n\t " << - "level: " << result->level() << "\n\t " << - "eta: " << result->eta() << "\n\t " << - "phi: " << result->phi() << "\n\t " << - "mass: " << result->mass() << "\n\t " << - "fitmass: " << result->fitmass() << "\n\t " << - "fitchi2: " << result->fitchi2() << "\n\t " << - "fitndof: " << result->fitndof() << "\n\t " << - "fitx: " << result->fitx() << "\n\t " << - "fity: " << result->fity() << "\n\t " << - "fitz: " << result->fitz() << "\n\t " ); - - for ( const auto& ptlEL : particles) { - result->addTrackParticleLink(ptlEL); - } - return StatusCode::SUCCESS; -} //vertexFit - -StatusCode TrigBphysHelperUtilsTool::vertexFit(xAOD::TrigBphys * result, - const std::vector<const xAOD::TrackParticle*> &trks, - const std::vector<double>& inputMasses) const { - ATH_MSG_DEBUG("In vertexFit" ); - if (!result) { - ATH_MSG_DEBUG("Need to provide valid TrigBphys object" ); - return StatusCode::FAILURE; - } - if (trks.size() != inputMasses.size()) { - ATH_MSG_WARNING("Mismatch in particle and mass vector sizes" ); - return StatusCode::FAILURE; - } - bool doFit(true); // set false if problematic TP - - const Amg::Vector3D startingPoint(0.,0.,0.); // #FIXME use beamline for starting point? - //const Trk::Vertex startingPoint(Amg::Vector3D(0.,0.,0.)); // #FIXME use beamline for starting point? - xAOD::Vertex * vx(0); - std::unique_ptr<Trk::IVKalState> state = m_VKVFitter->makeState(); - m_VKVFitter->setMassInputParticles( inputMasses, *state); // give input tracks muon mass - if (doFit) vx = m_VKVFitter->fit(trks,startingPoint,*state); - TLorentzVector tracks_p; - - if (!vx){ - ATH_MSG_DEBUG("No Vertex returned from fit / fitting not allowed" ); - - result->setFitmass (-9999); - result->setFitchi2 (-9999); - result->setFitndof (-9999); - result->setFitx (-9999); - result->setFity (-9999); - result->setFitz (-9999); - result->setEta (-9999); - result->setPhi (-9999); - - } else { - std::vector<int> trkIndices(trks.size(),1); - double invariantMass(0.), invariantMassError(0.); // #FIXME what about the input masses? - if (!(m_VKVFitter->VKalGetMassError(invariantMass,invariantMassError,*state).isSuccess())) { - ATH_MSG_DEBUG("Warning from VKaVrt - cannot calculate uncertainties!"); - invariantMass = -9999.; - } // if - - for (unsigned int i_track =0; i_track < vx->nTrackParticles(); i_track++) - tracks_p = vx->trackParticle(i_track)->p4() + tracks_p; - - result->setFitmass (invariantMass); - result->setFitchi2 (vx->chiSquared()); - result->setFitndof (vx->numberDoF()); - result->setFitx (vx->x()); - result->setFity (vx->y()); - result->setFitz (vx->z()); - result->setEta (tracks_p.Eta()); - result->setPhi (tracks_p.Phi()); - - delete vx; vx = 0; - } // if vx - ATH_MSG_DEBUG( - "Print for obj: " << result << "\n\t " << - "roiId: " << result->roiId() << "\n\t " << - "particleType: " << result->particleType() << "\n\t " << - "level: " << result->level() << "\n\t " << - "eta: " << result->eta() << "\n\t " << - "phi: " << result->phi() << "\n\t " << - "mass: " << result->mass() << "\n\t " << - "fitmass: " << result->fitmass() << "\n\t " << - "fitchi2: " << result->fitchi2() << "\n\t " << - "fitndof: " << result->fitndof() << "\n\t " << - "fitx: " << result->fitx() << "\n\t " << - "fity: " << result->fity() << "\n\t " << - "fitz: " << result->fitz() << "\n\t " ); - - return StatusCode::SUCCESS; -} //vertexFit - - - -double TrigBphysHelperUtilsTool::invariantMass(const xAOD::IParticle *p1, const xAOD::IParticle* p2, double m1, double m2) const { - return invariantMassIP( {p1,p2},{m1,m2}); -} // invariantMass - -double TrigBphysHelperUtilsTool::invariantMass(const xAOD::TrackParticle *p1, const xAOD::TrackParticle* p2, double mi1, double mi2) const { - static_assert(!std::is_base_of<xAOD::L2StandAloneMuon, xAOD::TrackParticle>::value, "Types have become ambiguous, units may be wrong" ); - static_assert(!std::is_base_of<xAOD::TrackParticle, xAOD::L2StandAloneMuon>::value, "Types have become ambiguous, units may be wrong" ); - assert(p1!=nullptr); - assert(p2!=nullptr); - const std::array<const xAOD::TrackParticle*, 2> &tracks{p1, p2}; - const std::array<double, 2> &masses{mi1, mi2}; - return invariantMassInternal(tracks.data(), masses.data(), 2); -} // invariantMass - - -double TrigBphysHelperUtilsTool::invariantMass(const std::vector<const xAOD::TrackParticle*>&ptls, const std::vector<double> & masses) const { - assert(ptls.size() == masses.size()); - return invariantMassInternal(ptls.data(), masses.data(), masses.size()); -} - - -double TrigBphysHelperUtilsTool::invariantMassIP(const std::vector<const xAOD::IParticle*>&ptls, const std::vector<double> & masses) const { - if (ptls.size() != masses.size()) { - ATH_MSG_DEBUG("Mismatch of vector sizes in invariantMass" ); - return -1; - } - - - double px(0.),py(0.),pz(0.),E(0.); - const unsigned int nPtls(ptls.size()); - for (unsigned int i =0; i < nPtls; ++i) { - if (!ptls[i]) { - ATH_MSG_DEBUG("Null ptr in invariantMass; return -1" ); - return -1.; - } - // mass correction factors (i.e to turn from GeV to MeV - // if l2 standalone muon, pt is in GeV, convert to MeV - double cFactor(1.); - if ( dynamic_cast<const xAOD::L2StandAloneMuon*>(ptls[i]) ) { - cFactor = 1000.; - ATH_MSG_DEBUG("Found L2StandAlone muon for IParticle: " << i << " Treating as having units of GeV" ); - } // if L2 muon - - const auto &pv4 = ptls[i]->p4(); - px += pv4.Px()*cFactor; - py += pv4.Py()*cFactor; - pz += pv4.Pz()*cFactor; - E += sqrt(masses[i]*masses[i] + - pv4.Px()*pv4.Px()*cFactor*cFactor + - pv4.Py()*pv4.Py()*cFactor*cFactor + - pv4.Pz()*pv4.Pz()*cFactor*cFactor - ); - - } // for - double m2 = E*E - px*px - py*py -pz*pz; - if (m2 < 0) return 0.; - else return sqrt(m2); -} // invariantMass - - -void TrigBphysHelperUtilsTool::fillTrigObjectKinematics(xAOD::TrigBphys* bphys, - const std::vector<const xAOD::TrackParticle*>& ptls) - { - if (!bphys) { - ATH_MSG_WARNING("Null pointer of trigger object provided." ); - return; - } - - xAOD::TrackParticle::FourMom_t fourMom; - - for (const auto& ptl : ptls) { - fourMom += ptl->p4(); - }// add fourVectors - - - double rap = fourMom.Rapidity(); - double phi = fourMom.Phi(); - double pt = fourMom.Pt(); - - bphys->setEta (rap); - bphys->setPhi (phi); - bphys->setPt (pt); - - } // fillTrigObjectKinematics - -Amg::Vector3D TrigBphysHelperUtilsTool::getBeamSpot(const EventContext& ctx) const { - Amg::Vector3D beamSpot(0.,0.,0.); - SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey, ctx }; - if ( !beamSpotHandle.isValid() ) - { - ATH_MSG_DEBUG("Could not retrieve Beam Conditions Service. " ); - }else { - beamSpot = beamSpotHandle->beamPos(); - int beamSpotBitMap = beamSpotHandle->beamStatus(); - //* Check if beam spot is from online algorithms *// - int beamSpotStatus = ((beamSpotBitMap & 0x4) == 0x4); - ATH_MSG_DEBUG(" beamSpotBitMap= "<< beamSpotBitMap<<" beamSpotStatus= "<<beamSpotStatus); - } - return beamSpot; -} - -void TrigBphysHelperUtilsTool::setBeamlineDisplacement(xAOD::TrigBphys* bphys, - const std::vector<const xAOD::TrackParticle*> &ptls, const Amg::Vector3D& beamSpot) { - - if (!bphys) { - ATH_MSG_WARNING("Null pointer of trigger object provided." ); - return; - } - - - constexpr double CONST = 1000./299.792; // unit conversion for lifetime - - - double Dx = bphys->fitx() - beamSpot.x(); - double Dy = bphys->fity() - beamSpot.y(); - double BsMass = bphys->mass(); - - double sumPx(0.), sumPy(0.), sumPt(0.); - for (const auto& ptl: ptls) { - const auto &pv4 = ptl->p4(); - sumPx += pv4.Px(); // FIXME - is there a more optimal way - sumPy += pv4.Py(); - } - sumPt = sqrt(sumPx*sumPx + sumPy*sumPy); - double BsLxy(-9999.); - double BsTau(-9999.); - if (sumPt != 0.0) { - BsLxy = (sumPx*Dx+sumPy*Dy)/sumPt; - BsTau = BsLxy * BsMass/sumPt * CONST; - } - double BsLxyError(-1.); - double BsTauError(-1.); - - bphys->setLxy (BsLxy); - bphys->setLxyError(BsLxyError); - bphys->setTau (BsTau); - bphys->setTauError(BsTauError); -} // setBeamlineDisplacement - -double TrigBphysHelperUtilsTool::invariantMassInternal(const xAOD::TrackParticle* const* tracks, const double* masses, size_t N) -{ - double px(0.),py(0.),pz(0.),E(0.); - for(size_t i=0; i<N; i++){ - const auto &pv1 = tracks[i]->p4(); - double mi1 = masses[i]; - px += pv1.Px(); - py += pv1.Py(); - pz += pv1.Pz(); - E += sqrt(mi1*mi1 + - pv1.Px()*pv1.Px() + - pv1.Py()*pv1.Py() + - pv1.Pz()*pv1.Pz() - ); - } - double m2 = E*E - px*px - py*py -pz*pz; - if (m2 < 0) return 0.; - else return std::sqrt(m2); -} - -std::unique_ptr<Trk::IVKalState> -TrigBphysHelperUtilsTool::makeVKalState() const -{ - return m_VKVFitter->makeState(); -} diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysHelperUtilsTool.h b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysHelperUtilsTool.h deleted file mode 100644 index 8ce0f2412f18e623fd9919ffc657237a63cf7f95..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysHelperUtilsTool.h +++ /dev/null @@ -1,158 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - - -///////////////////////// -*- C++ -*- ///////////////////////////// -// TrigBphysHelperUtilsTool.h -// Header file for class TrigBphysHelperUtilsTool -// Author: S.Binet<binet@cern.ch> -/////////////////////////////////////////////////////////////////// -#ifndef TRIGBPHYSHYPO_TRIGBPHYSHELPERUTILSTOOL_H -#define TRIGBPHYSHYPO_TRIGBPHYSHELPERUTILSTOOL_H 1 - -// STL includes -#include <string> -#include <vector> - -// FrameWork includes -#include "AthenaBaseComps/AthAlgTool.h" -#include "xAODEventInfo/EventInfo.h" -#include "xAODMuon/Muon.h" -#include "xAODTrigBphys/TrigBphys.h" -#include "TrkVKalVrtFitter/TrkVKalVrtFitter.h" -#include "xAODTracking/TrackParticleContainer.h" -#include "BeamSpotConditionsData/BeamSpotData.h" - -// Forward declaration -namespace Trk { - class Track; -} - -static const InterfaceID IID_TrigBphysHelperUtilsTool("TrigBphysHelperUtilsTool", 1 , 0); - -class TrigBphysHelperUtilsTool: virtual public ::AthAlgTool -{ - - /////////////////////////////////////////////////////////////////// - // Public methods: - /////////////////////////////////////////////////////////////////// - public: - - // Copy constructor: - - /// Constructor with parameters: - TrigBphysHelperUtilsTool( const std::string& type, - const std::string& name, - const IInterface* parent ); - - /// Destructor: - virtual ~TrigBphysHelperUtilsTool(); - - // Athena algtool's Hooks - virtual StatusCode initialize(); - virtual StatusCode finalize(); - - static const InterfaceID& interfaceID() {return IID_TrigBphysHelperUtilsTool;} - - /////////////////////////////////////////////////////////////////// - // Const methods: - /////////////////////////////////////////////////////////////////// - - static int sumCharge(const xAOD::TrackParticle *p1, const xAOD::TrackParticle* p2); - - double deltaPhi( double phi1, double phi2) const; - double deltaEta( double eta1, double eta2) const; - - double absDeltaPhi( double phi1, double phi2) const { return fabs( deltaPhi(phi1,phi2)); } - double absDeltaEta( double eta1, double eta2) const { return fabs( deltaEta(eta1,eta2)); } - - double deltaR(double eta1, double phi1, double eta2, double phi2) const; - double deltaR(double deta, double dphi) const; - - const xAOD::EventInfo* getEventInfo() const; - StatusCode getRunEvtLb(uint32_t & run, uint32_t & evt,uint32_t & lb) const; - - - /////////////////////////////////////////////////////////////////// - // Non-const methods: - /////////////////////////////////////////////////////////////////// - void addUnique(const xAOD::Muon* muon, std::vector<const xAOD::Muon*> & output, - double dEtaCut = 0.005, double dPhiCut=0.005, double dPtCut =-1, - xAOD::Muon::TrackParticleType ptype= xAOD::Muon::InnerDetectorTrackParticle) const; /// - - bool areUnique(const xAOD::TrackParticle* t0, const xAOD::TrackParticle* t1, double dEtaCut = 0.005, double dPhiCut=0.005, double dPtCut =-1) const; - - StatusCode buildDiMu(const std::vector<ElementLink<xAOD::TrackParticleContainer> > & particles, - xAOD::TrigBphys *& result, - xAOD::TrigBphys::pType ptype, - xAOD::TrigBphys::levelType plevel); - - StatusCode vertexFit(xAOD::TrigBphys * result, - const std::vector<ElementLink<xAOD::TrackParticleContainer> > &particles, - const std::vector<double>& inputMasses) const; - - StatusCode vertexFit(xAOD::TrigBphys * result, - const std::vector<ElementLink<xAOD::TrackParticleContainer> > &particles, - const std::vector<double>& inputMasses, - Trk::IVKalState& istate) const; - - - StatusCode vertexFit(xAOD::TrigBphys * result, - const std::vector<const xAOD::TrackParticle*> &trks, - const std::vector<double>& inputMasses) const; - - // simplify this using templates perhaps? - double invariantMass(const xAOD::IParticle *p1, const xAOD::IParticle* p2, double m1, double m2) const; - double invariantMass(const xAOD::TrackParticle *p1, const xAOD::TrackParticle* p2, double m1, double m2) const; - double invariantMassIP(const std::vector<const xAOD::IParticle*>&ptls, const std::vector<double> & masses) const; - double invariantMass(const std::vector<const xAOD::TrackParticle*>&ptls, const std::vector<double> & masses) const; - - template<size_t N> - static double invariantMass(const std::array<const xAOD::TrackParticle*, N> &tracks, const std::array<double, N> &masses); - - /// Fill an xAOD object with pt, rap,phi - void fillTrigObjectKinematics(xAOD::TrigBphys* bphys, const std::vector<const xAOD::TrackParticle*> &ptls); - - Amg::Vector3D getBeamSpot(const EventContext& ctx) const; - - /// Use the fitted position and the beamline to determine lxy, tau, etc. - /// call after setting the kinematic values, to do ok. - /// Try to factor getBeamSpot outside of loop. - void setBeamlineDisplacement(xAOD::TrigBphys* bphys,const std::vector<const xAOD::TrackParticle*> &ptls, - const Amg::Vector3D& beamSpot); - - std::unique_ptr<Trk::IVKalState> makeVKalState() const; - - - /////////////////////////////////////////////////////////////////// - // Private data: - /////////////////////////////////////////////////////////////////// - private: - static double invariantMassInternal(const xAOD::TrackParticle* const* tracks , const double* masses , size_t N); - /// Default constructor: - TrigBphysHelperUtilsTool(); - - // Containers - - // tools - ToolHandle < Trk::IVertexFitter > m_fitterSvc; - Trk::TrkVKalVrtFitter* m_VKVFitter; - SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" }; - static constexpr double s_massMuon = 105.6583715; -}; - -// I/O operators -////////////////////// - -/////////////////////////////////////////////////////////////////// -// Inline methods: -/////////////////////////////////////////////////////////////////// - -template<size_t N> -double TrigBphysHelperUtilsTool::invariantMass(const std::array<const xAOD::TrackParticle*, N> &tracks, const std::array<double, N> &masses){ - return invariantMassInternal(tracks.data(), masses.data(), N); -} - - -#endif //> !TRIGBPHYSHYPO_TRIGBPHYSHELPERUTILSTOOL_H diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysMuonCounter.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysMuonCounter.cxx deleted file mode 100644 index 566f41056a765563c57bb91a1ebf6207fad4ade9..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysMuonCounter.cxx +++ /dev/null @@ -1,133 +0,0 @@ -// -*- C++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/************************************************************************** - ** - ** File: Trigger/TrigHypothesis/TrigBphysHypo/TrigBphysMuonCounter - ** - ** Description: algo to count muons in whole event - ** - ** author Olya Igonkina - ** - **************************************************************************/ - -#include "TrigBphysMuonCounter.h" -#include "TrigTimeAlgs/TrigTimer.h" // for TrigTimer -#include "xAODMuon/MuonContainer.h" - - -// Define the bins for acceptance-monitoring histogram -#define ACCEPT_hltExecute 0 -#define ACCEPT_PassNEFMuons 1 - - -TrigBphysMuonCounter::TrigBphysMuonCounter(const std::string & name, ISvcLocator* pSvcLocator): - HLT::AllTEAlgo(name, pSvcLocator) - ,m_BmmHypTot(0) - - , m_nEfMuon(0) - , m_ptMuonMin() - , m_mindR(0.005) - , m_muonCollectionKey() - //counters - , m_countTotalEvents(0) - , m_countPassedEvents(0) - -{ - - // Read cuts - - declareProperty("nEfMuon" , m_nEfMuon = 0 ); - declareProperty("ptMuonMin" , m_ptMuonMin ); - declareProperty("overlapdR" , m_mindR = 0.01 ); - declareProperty("muonCollectionKey", m_muonCollectionKey = "" ); - - declareMonitoredStdContainer("Acceptance" , m_mon_Acceptance , AutoClear); - declareMonitoredVariable( "nEFMuons", m_mon_nEFMuons); -} - -TrigBphysMuonCounter::~TrigBphysMuonCounter() -{ } - - - - -HLT::ErrorCode TrigBphysMuonCounter::hltInitialize() -{ - m_countTotalEvents = 0; - m_countPassedEvents = 0; - - std::sort(m_ptMuonMin.begin(),m_ptMuonMin.end(), std::greater<float>()); - - ATH_MSG_INFO("require at least "<< m_nEfMuon <<" EF Muons from with collectionKey m_muonCollectionKey \"" << m_muonCollectionKey << "\" "); - if(msgLvl() <= MSG::INFO){ - msg() << MSG::INFO << " Muons should have pts "; - for(float pt : m_ptMuonMin) msg() << MSG::INFO << pt <<", "; - msg() << MSG::INFO << endmsg; - msg() << " Overlap removal dR<"<<m_mindR << endmsg; - } - - if ( timerSvc() ) { - m_BmmHypTot = addTimer("TrigBphysMuonCounter"); - } - - return HLT::OK; -} - -HLT::ErrorCode TrigBphysMuonCounter::hltFinalize() -{ - ATH_MSG_INFO("in finalize()" ); - MsgStream log(msgSvc(), name()); - - ATH_MSG_INFO("|----------------------- SUMMARY FROM TrigBphysMuonCounter -------------|" ); - ATH_MSG_INFO("Run on events " << m_countTotalEvents ); - ATH_MSG_INFO("Passed events " << m_countPassedEvents); - - return HLT::OK; -} - - - -HLT::ErrorCode TrigBphysMuonCounter::hltExecute(std::vector<std::vector<HLT::TriggerElement*> >& inputTE, unsigned int output) -{ - // start monitoring - beforeExecMonitors().ignore(); - m_countTotalEvents++; - m_mon_Acceptance.clear(); - - m_mon_Acceptance.push_back( ACCEPT_hltExecute ); - ATH_MSG_DEBUG(" In TrigBphysMuonCounter hltExecute" ); - - - //======== check if we have enough EF muons : ===================== - std::vector<ElementLink<xAOD::MuonContainer> > efmuons; // just a collection of pointers, not copies - bool passMuon = passNObjects<xAOD::MuonContainer, - std::vector<ElementLink<xAOD::MuonContainer> > >( m_nEfMuon, m_ptMuonMin, - inputTE, efmuons, m_muonCollectionKey, m_mindR); - if( !passMuon ){ - if ( timerSvc() ) m_BmmHypTot->stop(); - ATH_MSG_DEBUG("Found "<<efmuons.size() <<" EF muons - fail (either number or pts are insufficient)"); - afterExecMonitors().ignore(); - return HLT::OK; - }else{ - ATH_MSG_DEBUG("Found "<<efmuons.size() <<" EF muons, require "<<m_nEfMuon<<" - accept "); - } - m_mon_Acceptance.push_back( ACCEPT_PassNEFMuons ); - m_mon_nEFMuons = m_nEfMuon; - - - // record collection now - if ( timerSvc() ) m_BmmHypTot->stop(); - - HLT::TriggerElement* outputTE = addRoI(output); - outputTE->setActiveState(true); - m_countPassedEvents++; - - - // stop monitoring - afterExecMonitors().ignore(); - return HLT::OK; -} \ No newline at end of file diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysMuonCounter.h b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysMuonCounter.h deleted file mode 100644 index 727f6ab0085f46f57717863ba83d50ed6a5a93d6..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysMuonCounter.h +++ /dev/null @@ -1,139 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/************************************************************************** - ** - ** File: Trigger/TrigHypothesis/TrigBphysHypo/TrigBphysMuonCounter.h - ** - ** this algo just counts number of (EF) muons in the whole event and rejects if insufficient - ** - ** Author:Olya Igonkina (Nikhef) - ** - ** Created: 28/03/2017 - ** Modified: - ** - **************************************************************************/ - -#ifndef TRIG_TrigBphysMuonCounter_H -#define TRIG_TrigBphysMuonCounter_H - -// standard stuff -#include <string> -#include <algorithm> - -#include "TrigInterfaces/AllTEAlgo.h" - -class TrigTimer; - -class TrigBphysMuonCounter: public HLT::AllTEAlgo { - - public: - TrigBphysMuonCounter(const std::string & name, ISvcLocator* pSvcLocator); - ~TrigBphysMuonCounter(); - HLT::ErrorCode hltInitialize(); - HLT::ErrorCode hltFinalize(); - - HLT::ErrorCode hltExecute(std::vector<std::vector<HLT::TriggerElement*> >& inputTEs, unsigned int output); - - private: - - - - template<class Tin, class Tout> bool passNObjects(int nObjMin, - const std::vector<float>& ptObjMin, - std::vector<std::vector<HLT::TriggerElement*> >& inputTE , - Tout & outVec, - //std::string printTag, - const std::string& collectionKey, - float mindR) ; - - - TrigTimer* m_BmmHypTot; - - int m_nEfMuon ; // muons have to be present in TE, but are not required to match to tracks - std::vector<float> m_ptMuonMin; - float m_mindR; - // OI: should we check for CB flag? - std::string m_muonCollectionKey; - - //Counters - uint32_t m_countTotalEvents; - uint32_t m_countPassedEvents; - - - //Monitored variables - std::vector<int> m_mon_Acceptance; - float m_mon_nEFMuons; -}; - - -template<class Tin, class Tout> bool TrigBphysMuonCounter::passNObjects(int nObjMin, - const std::vector<float>& ptObjMin, - std::vector<std::vector<HLT::TriggerElement*> >& inputTE , - Tout & outVec, - //std::string printTag, - const std::string& collectionKey, - float mindR) -{ - if( nObjMin <= 0 ) return true; - ElementLinkVector<Tin> inVecColl; - outVec.clear(); - std::vector<float> pts; - - float mindR2 = mindR*mindR; - - unsigned int nTEs = inputTE.size(); - for ( unsigned int i=0; i < nTEs; ++i) { - unsigned int mTEs = inputTE[i].size(); - for ( unsigned int j=0; j < mTEs; ++j) { - if(getFeaturesLinks<Tin,Tin>(inputTE[i][j], inVecColl, collectionKey)==HLT::OK ) { - for( const auto& efmu : inVecColl){ - // check for overlap - bool found = false; - for(const auto& part : outVec ){ - double deta = (*part)->eta() - (*efmu)->eta(); - double dphi = (*part)->phi() - (*efmu)->phi(); - double deltaR2 = deta*deta +dphi*dphi; - if( deltaR2 <= mindR2) found = true; - } - if( !found ){ - float pt = fabs((*efmu)->pt()) ; - // check if value in GeV or MeV, if it was >350 GeV and multiplied by 1000, it does not matter - if( pt < 350. && pt>0.01 ) pt *= 1000.; - pts.push_back(pt); - outVec.push_back(efmu); - if ( msgLvl() <= MSG::DEBUG ) msg() << MSG::DEBUG << "Found muon, pt= " << pt << endmsg; - } - }//}// end loop over muons in one TE - } // end getFeaturesLinks - }} // end loop over all TEs - - //=== check if it is enough muons - if( (int)outVec.size() < nObjMin ) { - if ( msgLvl() <= MSG::DEBUG ) msg() << MSG::DEBUG << "Rejecting: " - <<" #muons= " << outVec.size() - << " while need "<< nObjMin << endmsg; - return false; - } - //== check that muons have correct pts - std::sort(pts.begin(), pts.end(), std::greater<float>()); - - unsigned int Ncheck = std::min( nObjMin, int(ptObjMin.size()) ); - bool failMuonPt = false; - for ( unsigned int ipt=0; ipt < Ncheck; ++ipt) { - if( pts[ipt] < ptObjMin[ipt] ) - failMuonPt = true; - } - if( failMuonPt ){ - if ( msgLvl() <= MSG::DEBUG ) msg() << MSG::DEBUG << "Fail muon pt cut" << endmsg; - return false; - } - // here would be good to limit number of objects to the minimum - - return true; - -} - - -#endif diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysTrackRoiMaker.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysTrackRoiMaker.cxx deleted file mode 100644 index 83f54c5c44df0c67ad814d03a21ceb0cd4572d06..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysTrackRoiMaker.cxx +++ /dev/null @@ -1,190 +0,0 @@ -/* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -*/ - -#include "TrigBphysTrackRoiMaker.h" - -// RoI include -#include "TrigSteeringEvent/TrigRoiDescriptor.h" - -/** - * Standard constructor for the algorithm - */ -TrigBphysTrackRoiMaker::TrigBphysTrackRoiMaker(const std::string& name, ISvcLocator* pSvcLocator) : - FexAlgo(name, pSvcLocator), - m_inputTrackCollectionKey("MultiTrkFex") - -{ - - declareProperty("InputRoiName",m_inputTrackCollectionKey="MultiTrkFex"); - - declareMonitoredVariable("nTrksIn", m_nTrksIn, IMonitoredAlgo::AutoClear); - declareMonitoredVariable("nRoiOut", m_nRoiOut, IMonitoredAlgo::AutoClear); - declareMonitoredVariable("nRoiToTrkRatio", m_nRoiToTrkRatio, IMonitoredAlgo::AutoClear); - - declareMonitoredStdContainer("ptTrkIn", m_ptTrkIn, IMonitoredAlgo::AutoClear); - declareMonitoredStdContainer("etaTrkIn", m_etaTrkIn, IMonitoredAlgo::AutoClear); - declareMonitoredStdContainer("phiTrkIn", m_phiTrkIn, IMonitoredAlgo::AutoClear); - declareMonitoredStdContainer("ptRoiOut", m_ptRoiOut, IMonitoredAlgo::AutoClear); - declareMonitoredStdContainer("etaRoiOut", m_etaRoiOut, IMonitoredAlgo::AutoClear); - declareMonitoredStdContainer("phiRoiOut", m_phiRoiOut, IMonitoredAlgo::AutoClear); - declareMonitoredStdContainer("dEtaTrkSel", m_dEtaTrkSel, IMonitoredAlgo::AutoClear); - declareMonitoredStdContainer("dPhiTrkSel", m_dPhiTrkSel, IMonitoredAlgo::AutoClear); - declareMonitoredStdContainer("dRTrkSel", m_dRTrkSel, IMonitoredAlgo::AutoClear); - declareMonitoredStdContainer("logdRTrkSel", m_logdRTrkSel, IMonitoredAlgo::AutoClear); - - -} - -/** - * Destructor - */ -TrigBphysTrackRoiMaker::~TrigBphysTrackRoiMaker() -{ - -} - -/** - * Initialize the algo - */ -HLT::ErrorCode TrigBphysTrackRoiMaker::hltInitialize() { - // print out the configuration - ATH_MSG_DEBUG("Initializing TrigBphysTrackRoiMaker[" << name() << "]"); - ATH_MSG_DEBUG("inputTrackCollectionKey = " << m_inputTrackCollectionKey); - - return HLT::OK; -}//hltInitialize - -/** - * Finalise the algo - nothing to do yet - */ -HLT::ErrorCode TrigBphysTrackRoiMaker::hltFinalize() { - return HLT::OK; -} - -/** - * Execute function - called for each roi - */ -HLT::ErrorCode TrigBphysTrackRoiMaker::hltExecute(const HLT::TriggerElement* inputTE, HLT::TriggerElement* outputTE) { - - ATH_MSG_DEBUG("Executing TrigBphysTrackRoiMaker::hltExecute"); - beforeExecMonitors().ignore(); - outputTE->setActiveState(true); - - // get the RoI for the ID tracking - const xAOD::TrackParticleContainer* tracks = 0; - if (HLT::OK != getFeature(inputTE, tracks, m_inputTrackCollectionKey) ) { - ATH_MSG_WARNING("Could not get " << m_inputTrackCollectionKey << " trackParticles"); - return HLT::OK; - } - - - TrigRoiDescriptor* superRoI = new TrigRoiDescriptor(true); // create fullscan RoI - superRoI->setComposite(true); - int nIDtracks(0); - int nFound = 0; - for( auto track : *tracks){ - - //if (!(track->perigeeParameters())) continue; //Must have helix parameters - double pt_id = track->pt(); //perigeeParameters()->momentum().perp()*0.001; //in GeV/c - double phi_id = track->phi();//perigeeParameters()->parameters()[Trk::phi0]; - //double theta = track->perigeeParameters()->parameters()[Trk::theta] ; - double eta_id = track->eta();//-log(fabs(tan(theta*0.5))); - - // FIXME: MS what are the eta and phi resolutions? are these set correctly? - // Use these for the roi sizes - // double deta_id = track->perigeeParameters()->parameters()[Trk::eeta]; - - //double zPos_id = track->perigeeParameters()->parameters()[Trk::z0]; - //double chi2_id = track->fitQuality()->chiSquared(); - - double dphi_id = 0.1; - double deta_id = 0.1; - - ATH_MSG_DEBUG( "Found track: " - << " with pt= " << pt_id - << ", eta=" << eta_id - << ", phi=" << phi_id - //<< ", Zid=" << zPos_id - // << ", Chi2=" << chi2_id - ); - - // monitoring - m_ptTrkIn.push_back( std::abs(pt_id) ); - m_etaTrkIn.push_back( eta_id ); - m_phiTrkIn.push_back( phi_id ); - - ++nFound; - - TrigRoiDescriptor* newRoi = createSingleTrigRoiDescriptor( eta_id, phi_id, deta_id, dphi_id, superRoI->roiId() + nFound ); - superRoI->push_back( newRoi ); - ATH_MSG_DEBUG("Added RoI from selected track: " << *newRoi ); - - // difference w.r.t already found tracks - int n = m_etaRoiOut.size(); - for ( int i = 0; i < n; ++i ) { - double dEta = eta_id - m_etaRoiOut[i]; - double dPhi = phi_id - m_phiRoiOut[i]; - // put phi in range -PI,PI - while ( dPhi > M_PI ) dPhi -= 2*M_PI; - while ( dPhi <= -M_PI ) dPhi += 2*M_PI; - double dR = std::sqrt( dEta*dEta + dPhi*dPhi ); - m_dEtaTrkSel.push_back( dEta ); - m_dPhiTrkSel.push_back( dPhi ); - m_dRTrkSel.push_back( dR ); - if ( dR > 0.0 ) m_logdRTrkSel.push_back( std::log10(dR) ); - } - - // monitoring - m_ptRoiOut.push_back( std::abs(pt_id) ); - m_etaRoiOut.push_back( eta_id ); - m_phiRoiOut.push_back( phi_id ); - - - } - nIDtracks = tracks->size(); - m_nTrksIn = nIDtracks; - - if ( m_nTrksIn > 0 ) { - m_nRoiToTrkRatio = (double)m_nRoiOut/(double)m_nTrksIn; - } else { - m_nRoiToTrkRatio = 0.0; - } - - ATH_MSG_DEBUG("Made " << nFound << " ROIs from " << tracks->size() << " tracks."); - attachFeature(outputTE,superRoI,"forMSFS");// forMS"); - outputTE->setActiveState(true); - // fill monitor variables "by hand" because this is an allTE algo - afterExecMonitors().ignore(); - return HLT::OK; - - - - return HLT::OK; - -}//hltExecute - - -TrigRoiDescriptor* TrigBphysTrackRoiMaker::createSingleTrigRoiDescriptor( double eta, double phi, double etaWidth, double phiWidth, int roiNum ) { - double minphi = phi - std::abs(phiWidth); - double maxphi = phi + std::abs(phiWidth); - if(minphi < -M_PI) minphi += 2.0*M_PI; - if(minphi >= M_PI) minphi -= 2.0*M_PI; - if(maxphi <= -M_PI) maxphi += 2.0*M_PI; - if(maxphi > M_PI) maxphi -= 2.0*M_PI; - double minEta = eta - std::abs(etaWidth); - double maxEta = eta + std::abs(etaWidth); - - /// Oh no!! will setting the roiword and the l1id to 0 have any serious consequences? - /// do we really need these identifiers? Does anything actually ever use them for - /// anything except printout? I guess not, since by default they are set to 0 anyhow. - TrigRoiDescriptor* trigRoI = new TrigRoiDescriptor( unsigned(0), unsigned(roiNum), eta, minEta, maxEta, phi, minphi, maxphi); - // trigRoI->set_roiId(roiNum); - - ATH_MSG_DEBUG( "createSingleTrigRoiDescriptor: Creating Roi with center " << " (eta,phi) = (" << eta << "," << phi << - ") and size (dEta,dPhi) = (" << etaWidth << "," << phiWidth << ")\n" << - " createSingleTrigRoiDescriptor: Roi num = " << roiNum << " etaRange = " << minEta << " -> " << maxEta << - " phiRange = " << minphi << " -> " << maxphi ); - - return trigRoI; -} diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysTrackRoiMaker.h b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysTrackRoiMaker.h deleted file mode 100644 index a8dbc49067a7d0e0c277a401adc65c99c65a16ab..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysTrackRoiMaker.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TRIGBPHYSTRACKROIMAKER_H__ -#define TRIGBPHYSTRACKROIMAKER_H__ - -// ************************************************ -// -// NAME: TrigBphysTrackRoiMaker.h -// PACKAGE: Trigger/TrigHypothesis/TrigBphysHypo -// -// AUTHOR: Olya Igonkina, Nikhef -// -// ************************************************ - -#include "TrigInterfaces/FexAlgo.h" -#include <string> - -#include <vector> // for vector -#include "TrigSteeringEvent/Enums.h" // for ErrorCode - -// fwd declare TrigRoiDescriptor class -class TrigRoiDescriptor; - -/** - * @brief Algorithm to create RoIs from ID tracks. - * - */ -class TrigBphysTrackRoiMaker : public virtual HLT::FexAlgo -{ - public: - - /// Constructor - TrigBphysTrackRoiMaker(const std::string & name, ISvcLocator* pSvcLocator); - - /// Destructor - ~TrigBphysTrackRoiMaker(); - - /// Initialize - HLT::ErrorCode hltInitialize(); - - /// Execute for each RoI - HLT::ErrorCode hltExecute(const HLT::TriggerElement* inputTE, HLT::TriggerElement* outputTE); - - /// Finalize - HLT::ErrorCode hltFinalize(); - - TrigRoiDescriptor* createSingleTrigRoiDescriptor( double eta, double phi, double etaWidth, double phiWidth, int roiNum ); - protected: - - /// input track Collection label - std::string m_inputTrackCollectionKey; - - - // Monitoring variables - // - int m_nTrksIn; - int m_nRoiOut; - double m_nRoiToTrkRatio; - std::vector<double> m_ptTrkIn; - std::vector<double> m_etaTrkIn; - std::vector<double> m_phiTrkIn; - std::vector<double> m_ptRoiOut; - std::vector<double> m_etaRoiOut; - std::vector<double> m_phiRoiOut; - std::vector<double> m_dEtaTrkSel; - std::vector<double> m_dPhiTrkSel; - std::vector<double> m_dRTrkSel; - std::vector<double> m_logdRTrkSel; - - - - -}; // class TrigBphysTrackRoiMaker - -#endif //TRIGBPHYSTRACKROIMAKER_H__ diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBEEXFex.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBEEXFex.cxx deleted file mode 100644 index d9b1e1004016fee2c584e1d1514ee3a6cd2ae06b..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBEEXFex.cxx +++ /dev/null @@ -1,1639 +0,0 @@ -/* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -*/ - -// vim: tabstop=2:shiftwidth=2:expandtab -// -*- C++ -*-// -/************************************************************************** - ** - ** File: Trigger/TrigHypothesis/TrigBPhysHypo/TrigEFBEEXFex.cxx - ** - ** Description: EF hypothesis algorithms for - ** B^0_{s,d} \to X e^+ e^- - ** - ** - ** Authors: O.Igonkina and H.Russell - ** - ** Created: 25.09.2017 - ** - ** - ***************************************************************************/ - - -#include "TrigEFBEEXFex.h" - -#include <math.h> - -#include "TrigTimeAlgs/TrigTimerSvc.h" -#include "AthenaKernel/Timeout.h" -#include "Constants.h" // for BSMASS -#include "TrigSteeringEvent/TrigRoiDescriptor.h" // for TrigRoiDescriptor -// additions of xAOD objects -#include "xAODEventInfo/EventInfo.h" -#include <memory> - -/*----------------------------------------------------------------------------*/ -TrigEFBEEXFex::TrigEFBEEXFex(const std::string & name, ISvcLocator* pSvcLocator): -HLT::ComboAlgo(name, pSvcLocator) -,m_bphysHelperTool("TrigBphysHelperUtilsTool") -,m_TrigBphysColl_b(NULL) -,m_TrigBphysColl_X(NULL) - -,m_TotTimer(0) -,m_VtxFitTimer(0) -// counters -,m_lastEvent(-1) -,m_lastEventPassed(-1) -,m_countTotalEvents(0) -,m_countTotalRoI(0) -,m_countPassedEvents(0) -,m_countPassedRoIs(0) - -,m_lastEventPassedBplus(-1) -,m_lastEventPassedBd(-1) -,m_lastEventPassedBs(-1) -,m_countPassedEventsBplus(0) - -,m_countPassedEEID(0) -,m_countPassedEEOS(0) -,m_countPassedEEMass(0) -,m_countPassedEEVtx(0) -,m_countPassedEEVtxChi2(0) - -,m_countPassedBplusMass(0) -,m_countPassedBplusVtx(0) -,m_countPassedBplusVtxChi2(0) -,m_countBpToStore(0) - -,m_countPassedKstarMass(0) -,m_countPassedBdMass(0) -,m_countPassedKstarVtx(0) -,m_countPassedKstarVtxChi2(0) -,m_countPassedBdVtx(0) -,m_countPassedBdVtxChi2(0) -,m_countBdToStore(0) - -,m_countPassedPhi1020Mass(0) -,m_countPassedBsMass(0) -,m_countPassedPhi1020Vtx(0) -,m_countPassedPhi1020VtxChi2(0) -,m_countPassedBsVtx(0) -,m_countPassedBsVtxChi2(0) -,m_countBsToStore(0) - - -{ - declareProperty("TrigBphysHelperTool", m_bphysHelperTool); - - declareProperty("bphysCollectionKey", m_bphysCollectionKey = "EFBEEXFex" ); - declareProperty("AcceptAll", m_acceptAll=true); // Should we just accept all events - - declareProperty("TrackCollection",m_input_trackCollectionKey="InDetTrigTrackingxAODCnv_Bphysics_IDTrig"); - - // sign & mass cuts - declareProperty("OppositeSign", m_oppositeCharge = true); // deafult = true - declareProperty("LowerEEMassCut", m_lowerEEMassCut = 100.); // default = 100.0 MeV - declareProperty("UpperEEMassCut", m_upperEEMassCut = 5500.); // default = 5500.0 MeV - declareProperty("VtxChi2Cut", m_VtxChi2Cut = 40.); // default = 40.0 - - // Maximum number of decay candidates (2 mu + 1 or 2 tracks) to test - protection against TimeOuts - declareProperty("MaxNcombinations", m_maxNcombinations = 50000); - - // B+->K+EE cuts - declareProperty("DoB_KEEDecay", m_doB_KEEDecay = true); //Proceed B->KEE part of algorithm - declareProperty("LowerKEEMassCut", m_lowerKEEMassCut = 4500.); // default = 4500.0 MeV - declareProperty("UpperKEEMassCut", m_upperKEEMassCut = 5900.); // default = 5900.0 MeV - declareProperty("DoB_KEEVertexing", m_doB_KEEVertexing = true); - declareProperty("BVtxChi2Cut", m_bVtxChi2Cut = 300.); // default = 300.0 - declareProperty("MaxBpToStore", m_maxBpToStore = -1); - - // Bd->K*EE cuts - declareProperty("DoBd_KstarEEDecay", m_doBd_KstarEEDecay = true); //Proceed Bd->K*EE part of algorithm - declareProperty("LowerKstar_KaonMassCut", m_lowerKstar_KaonMassCut = 600.); // default = 600.0 MeV - declareProperty("UpperKstar_KaonMassCut", m_upperKstar_KaonMassCut = 1500.); // default = 1500.0 MeV - declareProperty("LowerBd_KstarEEMassCut", m_lowerBd_KstarEEMassCut= 4300.); // default = 4600.0 MeV - declareProperty("UpperBd_KstarEEMassCut", m_upperBd_KstarEEMassCut =6300.); // default = 6300.0 MeV - declareProperty("DoKstar_KPiVertexing", m_doKstar_KPiVertexing = true); - declareProperty("DoBd_KstarEEVertexing", m_doBd_KstarEEVertexing = true); - declareProperty("KstarVtxChi2Cut", m_kStarVtxChi2Cut = 60.); // default = 60.0 - declareProperty("BdVtxChi2Cut", m_bDVtxChi2Cut = 60.); // default = 60.0 - declareProperty("MaxBdToStore", m_maxBdToStore = -1); - - // Bs->PhiEE cuts - declareProperty("DoBs_Phi1020EEDecay", m_doBs_Phi1020EEDecay = true); //Proceed Bs->PhiEE part of algorithm - declareProperty("LowerPhi1020_KaonMassCut", m_lowerPhi1020_KaonMassCut = 990.); // default = 990.0 MeV - declareProperty("UpperPhi1020_KaonMassCut", m_upperPhi1020_KaonMassCut = 1050.); // default = 1050.0 MeV - declareProperty("LowerBs_Phi1020EEMassCut", m_lowerBs_Phi1020EEMassCut = 5000.); // default = 5000.0 MeV - declareProperty("UpperBs_Phi1020EEMassCut", m_upperBs_Phi1020EEMassCut = 5800.); // default = 5800.0 MeV - declareProperty("DoPhi1020_KKVertexing", m_doPhi1020_KKVertexing = true); - declareProperty("DoBs_Phi1020EEVertexing", m_doBs_Phi1020EEVertexing = true); - declareProperty("Phi1020VtxChi2Cut", m_phi1020VtxChi2Cut = 60.); // default = 60.0 - declareProperty("BsVtxChi2Cut", m_bSVtxChi2Cut = 60.); // default = 60.0 - declareProperty("MaxBsToStore", m_maxBsToStore = -1); - - - // Monitoring variables - // General - declareMonitoredStdContainer("Errors", m_mon_Errors, AutoClear); - declareMonitoredStdContainer("Acceptance", m_mon_Acceptance, AutoClear); - declareMonitoredVariable("nTriedCombinations", m_mon_nTriedCombinations ); - // Timing - declareMonitoredVariable("TotalRunTime", m_mon_TotalRunTime); - declareMonitoredVariable("VertexingTime", m_mon_VertexingTime); - // RoIs - declareMonitoredStdContainer("RoI_RoI1Eta", m_mon_RoI_RoI1Eta, AutoClear); - declareMonitoredStdContainer("RoI_RoI2Eta", m_mon_RoI_RoI2Eta, AutoClear); - declareMonitoredStdContainer("RoI_RoI1Phi", m_mon_RoI_RoI1Phi, AutoClear); - declareMonitoredStdContainer("RoI_RoI2Phi", m_mon_RoI_RoI2Phi, AutoClear); - declareMonitoredStdContainer("RoI_dEtaRoI", m_mon_RoI_dEtaRoI, AutoClear); - declareMonitoredStdContainer("RoI_dPhiRoI", m_mon_RoI_dPhiRoI, AutoClear); - // DiEon - declareMonitoredVariable("DiE_n", m_mon_DiE_n); - declareMonitoredStdContainer("DiE_Pt_Lep1", m_mon_DiE_Pt_Lep1, AutoClear); - declareMonitoredStdContainer("DiE_Pt_Lep2", m_mon_DiE_Pt_Lep2, AutoClear); - declareMonitoredStdContainer("DiE_Eta_Lep1", m_mon_DiE_Eta_Lep1, AutoClear); - declareMonitoredStdContainer("DiE_Eta_Lep2", m_mon_DiE_Eta_Lep2, AutoClear); - declareMonitoredStdContainer("DiE_Phi_Lep1", m_mon_DiE_Phi_Lep1, AutoClear); - declareMonitoredStdContainer("DiE_Phi_Lep2", m_mon_DiE_Phi_Lep2, AutoClear); - declareMonitoredStdContainer("DiE_dEtaEE", m_mon_DiE_dEtaEE, AutoClear); - declareMonitoredStdContainer("DiE_dPhiEE", m_mon_DiE_dPhiEE, AutoClear); - declareMonitoredStdContainer("DiE_pTsumEE", m_mon_DiE_pTsumEE, AutoClear); - declareMonitoredStdContainer("DiE_InvMassEE", m_mon_DiE_InvMassEE, AutoClear); - declareMonitoredStdContainer("DiE_VtxMassEE", m_mon_DiE_VtxMassEE, AutoClear); - declareMonitoredStdContainer("DiE_Chi2EE", m_mon_DiE_Chi2EE, AutoClear); - // Tracks - declareMonitoredVariable("Tracks_n", m_mon_Tracks_n); - declareMonitoredStdContainer("Tracks_Eta", m_mon_Tracks_Eta, AutoClear); - declareMonitoredStdContainer("Tracks_Pt", m_mon_Tracks_Pt, AutoClear); - declareMonitoredStdContainer("Tracks_Phi", m_mon_Tracks_Phi, AutoClear); - // B+ - declareMonitoredVariable("BEEK_n", m_mon_BEEK_n); - declareMonitoredStdContainer("BEEK_Pt_K", m_mon_BEEK_Pt_K, AutoClear); - declareMonitoredStdContainer("BEEK_Eta_K", m_mon_BEEK_Eta_K, AutoClear); - declareMonitoredStdContainer("BEEK_Phi_K", m_mon_BEEK_Phi_K, AutoClear); - declareMonitoredStdContainer("BEEK_InvMass_B", m_mon_BEEK_InvMass_B, AutoClear); - declareMonitoredStdContainer("BEEK_VtxMass_B", m_mon_BEEK_VtxMass_B, AutoClear); - declareMonitoredStdContainer("BEEK_Chi2_B", m_mon_BEEK_Chi2_B, AutoClear); - // Bd - declareMonitoredVariable("BdEEKs_n", m_mon_BdEEKs_n); - declareMonitoredStdContainer("BdEEKs_Pt_K", m_mon_BdEEKs_Pt_K, AutoClear); - declareMonitoredStdContainer("BdEEKs_Eta_K", m_mon_BdEEKs_Eta_K, AutoClear); - declareMonitoredStdContainer("BdEEKs_Phi_K", m_mon_BdEEKs_Phi_K, AutoClear); - declareMonitoredStdContainer("BdEEKs_Pt_Pi", m_mon_BdEEKs_Pt_Pi, AutoClear); - declareMonitoredStdContainer("BdEEKs_Eta_Pi", m_mon_BdEEKs_Eta_Pi, AutoClear); - declareMonitoredStdContainer("BdEEKs_Phi_Pi", m_mon_BdEEKs_Phi_Pi, AutoClear); - declareMonitoredStdContainer("BdEEKs_InvMass_Kstar", m_mon_BdEEKs_InvMass_Kstar, AutoClear); - declareMonitoredStdContainer("BdEEKs_VtxMass_Kstar", m_mon_BdEEKs_VtxMass_Kstar, AutoClear); - declareMonitoredStdContainer("BdEEKs_Chi2_Kstar", m_mon_BdEEKs_Chi2_Kstar, AutoClear); - declareMonitoredStdContainer("BdEEKs_InvMass_Bd", m_mon_BdEEKs_InvMass_Bd, AutoClear); - declareMonitoredStdContainer("BdEEKs_VtxMass_Bd", m_mon_BdEEKs_VtxMass_Bd, AutoClear); - declareMonitoredStdContainer("BdEEKs_Chi2_Bd", m_mon_BdEEKs_Chi2_Bd, AutoClear); - // Bs - declareMonitoredVariable("BsEEPhi_n", m_mon_BsEEPhi_n); - declareMonitoredStdContainer("BsEEPhi_Pt_K1", m_mon_BsEEPhi_Pt_K1, AutoClear); - declareMonitoredStdContainer("BsEEPhi_Eta_K1", m_mon_BsEEPhi_Eta_K1, AutoClear); - declareMonitoredStdContainer("BsEEPhi_Phi_K1", m_mon_BsEEPhi_Phi_K1, AutoClear); - declareMonitoredStdContainer("BsEEPhi_Pt_K2", m_mon_BsEEPhi_Pt_K2, AutoClear); - declareMonitoredStdContainer("BsEEPhi_Eta_K2", m_mon_BsEEPhi_Eta_K2, AutoClear); - declareMonitoredStdContainer("BsEEPhi_Phi_K2", m_mon_BsEEPhi_Phi_K2, AutoClear); - declareMonitoredStdContainer("BsEEPhi_InvMass_Phi1020", m_mon_BsEEPhi_InvMass_Phi1020, AutoClear); - declareMonitoredStdContainer("BsEEPhi_VtxMass_Phi1020", m_mon_BsEEPhi_VtxMass_Phi1020, AutoClear); - declareMonitoredStdContainer("BsEEPhi_Chi2_Phi1020", m_mon_BsEEPhi_Chi2_Phi1020, AutoClear); - declareMonitoredStdContainer("BsEEPhi_InvMass_Bs", m_mon_BsEEPhi_InvMass_Bs, AutoClear); - declareMonitoredStdContainer("BsEEPhi_VtxMass_Bs", m_mon_BsEEPhi_VtxMass_Bs, AutoClear); - declareMonitoredStdContainer("BsEEPhi_Chi2_Bs", m_mon_BsEEPhi_Chi2_Bs, AutoClear); - - -} - - -/*----------------------------------------------------------------------------*/ -TrigEFBEEXFex::~TrigEFBEEXFex() -{ } - - -/*----------------------------------------------------------------------------*/ -HLT::ErrorCode TrigEFBEEXFex::hltInitialize() -{ - ATH_MSG_INFO("Running TrigEFBEEXFex::hltInitialize" ); - - ATH_MSG_DEBUG("Initialization completed successfully:" ); - ATH_MSG_DEBUG("AcceptAll = " << (m_acceptAll==true ? "True" : "False") ); - ATH_MSG_DEBUG("MaxNcombinations = " << m_maxNcombinations ); - - ATH_MSG_DEBUG("Activated decays:" ); - ATH_MSG_DEBUG(" B+ -> e e K+ : " << (m_doB_KEEDecay==true ? "True" : "False") ); - ATH_MSG_DEBUG(" Bd -> e e K*(K+ Pi-) : " << (m_doBd_KstarEEDecay==true ? "True" : "False") ); - ATH_MSG_DEBUG(" Bs -> e e Phi(K+ K-) : " << (m_doBs_Phi1020EEDecay==true ? "True" : "False") ); - - ATH_MSG_DEBUG("OppositeCharge = " << (m_oppositeCharge==true ? "True" : "False") ); - - // setting up timers - if ( timerSvc() ) { - m_TotTimer = addTimer("EFBEEXFexTot"); - m_VtxFitTimer = addTimer("EFBEEXFexVtxFit"); - } - - // retrieving BphysHelperUtilsTool - if (m_bphysHelperTool.retrieve().isFailure()) { - ATH_MSG_ERROR("Can't find TrigBphysHelperUtilsTool" ); - return HLT::OK; - } else { - ATH_MSG_DEBUG("TrigBphysHelperUtilsTool found" ); - } - - // set counters - m_lastEvent=-1; - m_lastEventPassed=-1; - m_countTotalEvents=0; - m_countTotalRoI=0; - m_countPassedEvents=0; - m_countPassedRoIs=0; - - m_lastEventPassedBplus=-1; - m_lastEventPassedBd=-1; - m_lastEventPassedBs=-1; - - m_countPassedEventsBplus=0; - - m_countPassedEEID=0; - m_countPassedEEOS=0; - m_countPassedEEMass=0; - m_countPassedEEVtx=0; - m_countPassedEEVtxChi2=0; - - m_countPassedBplusMass=0; - m_countPassedBplusVtx=0; - m_countPassedBplusVtxChi2=0; - - m_countPassedKstarMass=0; - m_countPassedBdMass=0; - m_countPassedKstarVtx=0; - m_countPassedKstarVtxChi2=0; - m_countPassedBdVtx=0; - m_countPassedBdVtxChi2=0; - - m_countPassedPhi1020Mass=0; - m_countPassedBsMass=0; - m_countPassedPhi1020Vtx=0; - m_countPassedPhi1020VtxChi2=0; - m_countPassedBsVtx=0; - m_countPassedBsVtxChi2=0; - return HLT::OK; -} - - -/*----------------------------------------------------------------------------*/ -HLT::ErrorCode TrigEFBEEXFex::hltFinalize() -{ - - ATH_MSG_INFO("Running TrigEFBEEXFex::hltFinalize" ); - - ATH_MSG_INFO("|----------------------- SUMMARY FROM TrigEFBEEXFex -------------|" ); - ATH_MSG_INFO("Run on events/RoIs " << m_countTotalEvents << "/" << m_countTotalRoI ); - ATH_MSG_INFO("Passed events/RoIs " << m_countPassedEvents << "/" << m_countPassedRoIs ); - ATH_MSG_INFO("Evts Passed B+: " << m_countPassedEventsBplus ); - ATH_MSG_INFO(std::endl ); - ATH_MSG_INFO("PassedEEID: " << m_countPassedEEID ); - ATH_MSG_INFO("PassedEEOS: " << m_countPassedEEOS ); - ATH_MSG_INFO("PassedEEMass: " << m_countPassedEEMass ); - ATH_MSG_INFO("PassedEEVtx: " << m_countPassedEEVtx ); - ATH_MSG_INFO("PassedEEVtxChi2: " << m_countPassedEEVtxChi2 ); - ATH_MSG_INFO("PassedBplusMass: " << m_countPassedBplusMass ); - ATH_MSG_INFO("PassedBplusVtx: " << m_countPassedBplusVtx ); - ATH_MSG_INFO("PassedBplusVtxChi2: " << m_countPassedBplusVtxChi2 ); - ATH_MSG_INFO("PassedKstarMass: " << m_countPassedKstarMass ); - ATH_MSG_INFO("PassedKstarVtx: " << m_countPassedKstarVtx ); - ATH_MSG_INFO("PassedKstarVtxChi2: " << m_countPassedKstarVtxChi2 ); - ATH_MSG_INFO("PassedBdMass: " << m_countPassedBdMass ); - ATH_MSG_INFO("PassedBdVtx: " << m_countPassedBdVtx ); - ATH_MSG_INFO("PassedBdVtxChi2: " << m_countPassedBdVtxChi2 ); - ATH_MSG_INFO("PassedPhi1020Mass: " << m_countPassedPhi1020Mass ); - ATH_MSG_INFO("PassedPhi1020Vtx: " << m_countPassedPhi1020Vtx ); - ATH_MSG_INFO("PassedPhi1020VtxChi2: " << m_countPassedPhi1020VtxChi2 ); - ATH_MSG_INFO("PassedBsMass: " << m_countPassedBsMass ); - ATH_MSG_INFO("PassedBsVtx: " << m_countPassedBsVtx ); - ATH_MSG_INFO("PassedBsVtxChi2: " << m_countPassedBsVtxChi2 ); - - return HLT::OK; -} - - -/*----------------------------------------------------------------------------*/ -HLT::ErrorCode TrigEFBEEXFex::acceptInputs(HLT::TEConstVec& , bool& pass) -{ - ATH_MSG_DEBUG("Running TrigEFBEEXFex::acceptInputs" ); - pass = true; - - return HLT::OK; -} - - -/*----------------------------------------------------------------------------*/ -HLT::ErrorCode TrigEFBEEXFex::hltExecute(HLT::TEConstVec& inputTE, HLT::TriggerElement* outputTE ) -{ - ATH_MSG_DEBUG("Running TrigEFBEEXFex::hltExecute" ); - - if ( timerSvc() ) m_TotTimer->start(); - - if ( timerSvc() ) { - m_VtxFitTimer->start(); - m_VtxFitTimer->pause(); - } - - bool result(false); - - // Set monitoring counters to zeroes - m_mon_nTriedCombinations = 0; - m_mon_DiE_n = 0; - m_mon_Tracks_n = 0; - m_mon_BEEK_n = 0; - m_mon_BdEEKs_n = 0; - m_mon_BsEEPhi_n = 0; - m_mon_TotalRunTime = 0.; - m_mon_VertexingTime = 0.; - - ATH_MSG_VERBOSE("AcceptAll is set to : " << (m_acceptAll ? "True, taking all events " : "False, applying selection" )); - // Retrieve event info -// int IdRun = 0; - int IdEvent = 0; - - // JW - Try to get the xAOD event info - const xAOD::EventInfo *evtInfo(0); - if ( store()->retrieve(evtInfo).isFailure() ) { - ATH_MSG_WARNING("Failed to get xAOD::EventInfo " ); - }else { // found the xAOD event info - ATH_MSG_DEBUG(" Run " << evtInfo->runNumber() << " Event " << evtInfo->eventNumber() << " using algo m_lepAlgo" ); - IdEvent = evtInfo->eventNumber(); - } // get event info - - - //Check that we got 2 input TEs - int lep1_TE=-1; - int lep2_TE=-1; - if ( inputTE.size() != 2 ) { - ATH_MSG_DEBUG("Got different than 2 number of input TEs: " << inputTE.size() ); - lep1_TE=0; - lep2_TE=0; - }else{ - lep1_TE=0; - lep2_TE=1; - } - - - if(IdEvent!=m_lastEvent) { - m_countTotalEvents++; - m_lastEvent = IdEvent; - m_countBpToStore = 0; - m_countBdToStore = 0; - m_countBsToStore = 0; - } - m_countTotalRoI++; - - - // JK DEBUG input TEs - - for (unsigned int iTE=0; iTE<inputTE.size(); ++iTE) { - ATH_MSG_DEBUG("Input TE " << iTE << " " << inputTE[iTE] << " ID " << inputTE[iTE]->getId()); - } - - - //Retrieve ROIs - const TrigRoiDescriptor *roiDescriptor1(0); - const TrigRoiDescriptor *roiDescriptor2(0); - - // get them from the navigation - - if ( getFeature(inputTE[lep1_TE], roiDescriptor1) != HLT::OK ) { - ATH_MSG_ERROR("Navigation error while getting RoI descriptor 1" ); - m_mon_Errors.push_back(ERROR_No_RoIs); - if ( timerSvc() ) m_TotTimer->stop(); - return HLT::NAV_ERROR; - } - if ( !roiDescriptor1 ) { - ATH_MSG_ERROR("roiDescriptor1 is NULL" ); - return HLT::NAV_ERROR; - } - - if ( getFeature(inputTE[lep2_TE], roiDescriptor2) != HLT::OK ) { - ATH_MSG_ERROR("Navigation error while getting RoI descriptor 2" ); - m_mon_Errors.push_back(ERROR_No_RoIs); - if ( timerSvc() ) m_TotTimer->stop(); - return HLT::NAV_ERROR; - } - if ( !roiDescriptor2 ) { - ATH_MSG_ERROR("roiDescriptor2 is NULL" ); - return HLT::NAV_ERROR; - } - - ATH_MSG_DEBUG("Using inputTEs: "<< inputTE[lep1_TE] << " and " << inputTE[lep2_TE] << " with Ids " << inputTE[lep1_TE]->getId()<< " AND "<< inputTE[lep2_TE]->getId()); - ATH_MSG_DEBUG("; RoI IDs = " << roiDescriptor1->roiId()<< " AND " <<roiDescriptor2->roiId()); - ATH_MSG_DEBUG(": Eta1 = " << roiDescriptor1->eta() << " Eta2= " <<roiDescriptor2->eta() << ", Phi1 = " << roiDescriptor1->phi() << " Phi2= " <<roiDescriptor2->phi()); - - - // Fill RoIs monitoring containers - m_mon_RoI_RoI1Eta.push_back(roiDescriptor1->eta()); - m_mon_RoI_RoI1Phi.push_back(roiDescriptor1->phi()); - m_mon_RoI_RoI2Eta.push_back(roiDescriptor2->eta()); - m_mon_RoI_RoI2Phi.push_back(roiDescriptor2->phi()); - m_mon_RoI_dEtaRoI.push_back( fabs(roiDescriptor1->eta() - roiDescriptor2->eta()) ); - float tmp_RoI_dPhiRoI = roiDescriptor1->phi() - roiDescriptor2->phi(); - while (tmp_RoI_dPhiRoI > M_PI) tmp_RoI_dPhiRoI -= 2*M_PI; - while (tmp_RoI_dPhiRoI < -M_PI) tmp_RoI_dPhiRoI += 2*M_PI; - m_mon_RoI_dPhiRoI.push_back( fabs(tmp_RoI_dPhiRoI) ); - - // Retrieve leps - std::vector<ElementLink<xAOD::TrackParticleContainer> > lepTPELtracks1; - std::vector<ElementLink<xAOD::TrackParticleContainer> > lepTPELtracks2; - std::vector<ElementLink<xAOD::TrackParticleContainer> > lepTPELtracksMerged; // combined unique tracks from roi 1 and 2 - - // Get the lepton container from the outputTE - ElementLinkVector<xAOD::ElectronContainer> lepContainerEF1; - ATH_MSG_DEBUG("Try to retrieve EFInfo container of lep 1" ); - if(getFeaturesLinks<xAOD::ElectronContainer,xAOD::ElectronContainer>(inputTE[lep1_TE], lepContainerEF1)!=HLT::OK ) { - ATH_MSG_DEBUG("Failed to get EFInfo feature of lep 1, exiting" ); - m_mon_Errors.push_back(ERROR_No_ElectronContainer); - if ( timerSvc() ) m_TotTimer->stop(); - return HLT::OK; - } - ATH_MSG_DEBUG("Found ElectronContainer, Got LepEF (1) Feature, size = " << lepContainerEF1.size()); - - - // OI : here we probably should check that electron object has passed identification at the previous step - for ( const ElementLink<xAOD::ElectronContainer> muel : lepContainerEF1 ) { - - //if ( (*muel)->lepType() != xAOD::Lep::Combined && (*muel)->lepType() != xAOD::Lep::SegmentTagged) { - // ATH_MSG_DEBUG("Lep from roi1 is neither Combined or SegmentTagged - reject" ); - // continue; - //} - const xAOD::Electron* lep = *muel; - if(!lep) continue; - ATH_MSG_DEBUG("electron! " << lep->pt() << ", " << lep->eta() << ", " << lep->phi()); - if ( lep->pt() < 5000.) continue; - - const xAOD::TrackParticle* idtp(0); - const ElementLink<xAOD::TrackParticleContainer> & idtpEl = lep->trackParticleLink(); - if( idtpEl.isValid() ) idtp = *idtpEl; - if (!idtp) { - ATH_MSG_DEBUG("No innerdetector lep1 TrackParticle found" ); - continue; - } - addUnique(lepTPELtracks1,idtpEl); - addUnique(lepTPELtracksMerged,idtpEl); - - ATH_MSG_DEBUG(" Comb lep 1 pt/eta/phi " << idtp->pt()<< " / " << idtp->eta() << " / " << idtp->phi()); - - } // for - - // second - - ElementLinkVector<xAOD::ElectronContainer> lepContainerEF2; - ATH_MSG_DEBUG("Try to retrieve EFInfo container of lep 2" ); - if(getFeaturesLinks<xAOD::ElectronContainer,xAOD::ElectronContainer>(inputTE[lep2_TE], lepContainerEF2)!=HLT::OK ) { - ATH_MSG_DEBUG("Failed to get EFInfo feature of lep 2, exiting" ); - m_mon_Errors.push_back(ERROR_No_ElectronContainer); - if ( timerSvc() ) m_TotTimer->stop(); - return HLT::OK; - } - ATH_MSG_DEBUG("Found LepContainer, Got LepEF (2) Feature, size = " << lepContainerEF2.size()); - - for ( const ElementLink<xAOD::ElectronContainer> muel : lepContainerEF2 ) { - //if ( (*muel)->lepType() != xAOD::Electron::Combined && (*muel)->lepType() != xAOD::Electron::SegmentTagged) { - // ATH_MSG_DEBUG("Lep from roi2 is neither Combined or SegmentTagged - reject" ); - // continue; - //} - const xAOD::Electron* lep = *muel; - if(!lep) continue; - const xAOD::TrackParticle* idtp(0); - const ElementLink<xAOD::TrackParticleContainer> & idtpEl = lep->trackParticleLink(); - if( idtpEl.isValid() ) idtp = *idtpEl; - if (!idtp) { - ATH_MSG_DEBUG("No innerdetector lep2 TrackParticle found" ); - continue; - } - addUnique(lepTPELtracks2,idtpEl); - addUnique(lepTPELtracksMerged,idtpEl); - ATH_MSG_DEBUG(" Comb lep 1 pt/eta/phi " << idtp->pt() << " / " << idtp->eta() << " / " << idtp->phi()); - - } // for loop over leps - - // build a map of the tracks and corresponding leps - std::map<const xAOD::TrackParticle*, ElementLink<xAOD::ElectronContainer> > mapTrkToLeps; - for (const ElementLink<xAOD::ElectronContainer> mu : lepContainerEF1) { - auto idtp = (*mu)->trackParticleLink(); - if (!idtp.isValid()) continue; - if (!*idtp) continue; - //if (!(*idtp)->track()) continue; - mapTrkToLeps[(*idtp)] = mu; - } // lepContainerEF1 - for (const ElementLink<xAOD::ElectronContainer> mu : lepContainerEF2) { - auto idtp = (*mu)->trackParticleLink(); - if (!idtp.isValid()) continue; - if (!*idtp) continue; - //if (!(*idtp)->track()) continue; - mapTrkToLeps[(*idtp)] = mu; - } // muContlepContainerEF2 - - if(msgLvl() <= MSG::DEBUG){ - msg() << MSG::DEBUG << "lepContainerEF1.size()= " << lepContainerEF1.size() << "lepContainerEF2.size()= " << lepContainerEF2.size() - << "lepTPELtracks1.size()= " << lepTPELtracks1.size() << "lepTPELtracks2.size()= " << lepTPELtracks2.size() << "lepTPELtracksMerged.size()= " << lepTPELtracksMerged.size()<< endmsg; - for (const auto& muel: lepTPELtracks1) { - msg() << MSG::DEBUG << "lepTPELtracks1: " << *muel << " " << (*muel)->pt() << " , " << (*muel)->eta() << " , " << (*muel)->phi() << " , " << (*muel)->charge() << endmsg; - } - for (const auto& muel: lepTPELtracks2) { - msg() << MSG::DEBUG << "lepTPELtracks2: " << *muel << " " << (*muel)->pt() << " , " << (*muel)->eta() << " , " << (*muel)->phi() << " , " << (*muel)->charge() << endmsg; - } - for (const auto& muel: lepTPELtracksMerged) { - msg() << MSG::DEBUG << "lepTPELtracksMerged: " << *muel << " " << (*muel)->pt() << " , " << (*muel)->eta() << " , " << (*muel)->phi() << " , " << (*muel)->charge() << endmsg; - } - } // if debug - - - m_TrigBphysColl_b = new xAOD::TrigBphysContainer(); - xAOD::TrigBphysAuxContainer xAODTrigBphysAuxColl_b; - m_TrigBphysColl_b->setStore(&xAODTrigBphysAuxColl_b); - - m_TrigBphysColl_X = new xAOD::TrigBphysContainer(); - xAOD::TrigBphysAuxContainer xAODTrigBphysAuxColl_X; - m_TrigBphysColl_X->setStore(&xAODTrigBphysAuxColl_X); - - // Tried combinations counter - protection against timeouts - int nTriedCombinations(0); - - if( !(lepTPELtracks1.size()> 0 && lepTPELtracks2.size() > 0) ) - { - ATH_MSG_DEBUG("No lep candidate found for one or both TEs" ); - m_mon_Errors.push_back(ERROR_No_ElectronCandidate); - delete m_TrigBphysColl_b; - delete m_TrigBphysColl_X; - m_TrigBphysColl_b = 0; - m_TrigBphysColl_X = 0; - if ( timerSvc() ) m_TotTimer->stop(); - return HLT::OK; - } else { - const Amg::Vector3D beamspot = m_bphysHelperTool->getBeamSpot(Gaudi::Hive::currentContext()); - // Loop over leps - std::vector<ElementLink<xAOD::TrackParticleContainer> >::iterator pElItr=lepTPELtracksMerged.begin(); - std::vector<ElementLink<xAOD::TrackParticleContainer> >::iterator mElItr=lepTPELtracksMerged.begin(); - - for(pElItr=lepTPELtracksMerged.begin(); pElItr != lepTPELtracksMerged.end(); ++pElItr) { - for(mElItr=pElItr+1; mElItr != lepTPELtracksMerged.end(); ++mElItr) { - auto pTp = **pElItr; - auto mTp = **mElItr; - ATH_MSG_DEBUG("Try to build lep pair from lep1 " << *(*pElItr) << ", lep2 " << *(*mElItr) ); - - // check that we have two different lep tracks - if (pTp==mTp) { - ATH_MSG_DEBUG("Lep tracks are same" ); - m_mon_Errors.push_back(ERROR_SameLep); - continue; - } - m_countPassedEEID++; - - // check if leps have opposite signs - if( m_oppositeCharge && (mTp->charge())*(pTp->charge()) > 0) { - ATH_MSG_DEBUG("Lep pair rejected by opposite change check: lep1 " << pTp->charge() << ", lep2 " << mTp->charge() ); - continue; - } - m_countPassedEEOS++; - - // check if dilep mass within the range - //float massEE = XMass(*pItr,*mItr,di_to_leps); - float massEE = XMass(pTp,mTp,di_to_electrons); - if( massEE < m_lowerEEMassCut || massEE > m_upperEEMassCut ) { - ATH_MSG_DEBUG("Lep pair rejected by mass cut: m = " << massEE ); - continue; - } - m_countPassedEEMass++; - ATH_MSG_DEBUG("Lep pair accepted by mass cut: m = " << massEE ); - - if ( timerSvc() ) m_VtxFitTimer->resume(); - //xAOD::TrigBphys * trigEEObj = new xAOD::TrigBphys; - std::unique_ptr<xAOD::TrigBphys> trigEEUniquePtr(new xAOD::TrigBphys); - trigEEUniquePtr->makePrivateStore(); - trigEEUniquePtr->initialise(0,0.,0.,0., - xAOD::TrigBphys::BMUMUX, massEE, xAOD::TrigBphys::EF); - std::vector<ElementLink<xAOD::TrackParticleContainer> > vec_mumu_tracks = {*pElItr,*mElItr}; - std::vector<double> masses_mumu = {EMASS,EMASS}; - if (!m_bphysHelperTool->vertexFit(trigEEUniquePtr.get(), - vec_mumu_tracks,masses_mumu).isSuccess()) { - ATH_MSG_DEBUG(" Vertex fitting failed." ); - if ( timerSvc() ) m_VtxFitTimer->pause(); - continue; - } - if ( timerSvc() ) m_VtxFitTimer->pause(); - - - m_countPassedEEVtx++; - - float chi2EE = trigEEUniquePtr->fitchi2(); - if(chi2EE > m_VtxChi2Cut || chi2EE < 0) { - ATH_MSG_DEBUG("Lep pair rejected by chi2 cut: chi2 = " << chi2EE ); - continue; - } - m_countPassedEEVtxChi2++; - - - // Fill leps monitoring containers - m_mon_DiE_Pt_Lep1.push_back (pTp->pt()/1000.); - m_mon_DiE_Pt_Lep2.push_back (mTp->pt()/1000.); - m_mon_DiE_Eta_Lep1.push_back(pTp->eta()); - m_mon_DiE_Eta_Lep2.push_back(mTp->eta()); - m_mon_DiE_Phi_Lep1.push_back(pTp->phi()); - m_mon_DiE_Phi_Lep2.push_back(mTp->phi()); - - m_mon_DiE_dEtaEE.push_back( fabs(pTp->eta() - mTp->eta()) ); - float tmp_DiE_dPhiEE = roiDescriptor1->phi() - roiDescriptor2->phi(); - while (tmp_DiE_dPhiEE > M_PI) tmp_DiE_dPhiEE -= 2*M_PI; - while (tmp_DiE_dPhiEE < -M_PI) tmp_DiE_dPhiEE += 2*M_PI; - m_mon_DiE_dPhiEE.push_back( fabs(tmp_DiE_dPhiEE) ); - m_mon_DiE_pTsumEE.push_back( (pTp->pt() + mTp->pt())/1000. ); - m_mon_DiE_InvMassEE.push_back(massEE/1000.); - m_mon_DiE_VtxMassEE.push_back(trigEEUniquePtr->fitmass()/1000.); - m_mon_DiE_Chi2EE.push_back(chi2EE); - - m_mon_DiE_n++; - - ATH_MSG_DEBUG(" Dilep Sec Vtx at (" << trigEEUniquePtr->fitx() << " , " << trigEEUniquePtr->fity() << " , " << trigEEUniquePtr->fitz() - << ") with chi2 = " << trigEEUniquePtr->fitchi2() << " (" << trigEEUniquePtr->fitndof() << " dof)" << " Mass= "<< massEE ); - - // JK look for tracks in TrackParticle containers and add to TrigEFBphys - // - // TODO - // Doesn't work now: track pointers *pItr, *mItr are not the same as in vectorTrkParticleCollections elements - // - bool Found1Track=false; - bool Found2Track=false; - - // test for new method of track retrieval - //const xAOD::TrackParticleContainer *tracksRoiI1(nullptr); - //const xAOD::TrackParticleContainer *tracksRoiI2(nullptr); - // Sergey S.: Retrieve tracks as ELs - ElementLinkVector<xAOD::TrackParticleContainer> tracksRoiI1; - ElementLinkVector<xAOD::TrackParticleContainer> tracksRoiI2; - //get the tracks for each roi - //HLT::ErrorCode status = getFeature(inputTE.front(), tracksRoiI1); // Need to insert the correct label - HLT::ErrorCode status = getFeaturesLinks< xAOD::TrackParticleContainer, xAOD::TrackParticleContainer > (inputTE.front(), tracksRoiI1, m_input_trackCollectionKey); - if(status != HLT::OK) { - ATH_MSG_WARNING("Failed to get xAOD::TrackParticleCollection from the 1st trigger element" ); - m_mon_Errors.push_back(ERROR_No_TrackColl); - delete m_TrigBphysColl_b; - delete m_TrigBphysColl_X; - m_TrigBphysColl_b = NULL; - m_TrigBphysColl_X = NULL; - return HLT::MISSING_FEATURE; - } - //status = getFeature(inputTE.back() , tracksRoiI2); // Need to insert the correct label - status = getFeaturesLinks< xAOD::TrackParticleContainer, xAOD::TrackParticleContainer > (inputTE.back(), tracksRoiI2, m_input_trackCollectionKey); - if(status != HLT::OK) { - ATH_MSG_WARNING("Failed to get xAOD::TrackParticleCollection from the 2nd trigger element" ); - m_mon_Errors.push_back(ERROR_No_TrackColl); - delete m_TrigBphysColl_b; - delete m_TrigBphysColl_X; - m_TrigBphysColl_b = NULL; - m_TrigBphysColl_X = NULL; - if ( timerSvc() ) m_TotTimer->stop(); - return HLT::MISSING_FEATURE; - } - ATH_MSG_DEBUG("Ntracks RoI1: " << ( tracksRoiI1.empty() ? -1 : tracksRoiI1.size() ) << ", Ntracks RoI2: " << ( tracksRoiI2.empty() ? -1 : tracksRoiI2.size() ) ); - // JW if containers are empty - it's not necessarily an issue; right? - - std::vector<const xAOD::TrackParticle*> merged_tracks; - merged_tracks.reserve(tracksRoiI1.size() + tracksRoiI2.size()); - - // in order to use the element links, create a map of the particle pointer, and the corresponding container, and index - struct ElIndex{ - int roi; - int index; - ElementLink<xAOD::TrackParticleContainer> elLink; - }; - std::map<const xAOD::TrackParticle*, ElIndex> mapTrackToIndex; - std::map<const xAOD::TrackParticle*, ElementLink<xAOD::TrackParticleContainer> > mapTrackToEL; - - int idCounter(0); - for (const ElementLink<xAOD::TrackParticleContainer> trk: tracksRoiI1) { - // merged_tracks.push_back(trk); - addUnique(merged_tracks,*trk); - ElIndex tmp; - tmp.roi = 1; - tmp.index = idCounter; - tmp.elLink = trk; - mapTrackToIndex.insert( std::make_pair(*trk,tmp)); - ++idCounter; - } - idCounter = 0; - for (const ElementLink<xAOD::TrackParticleContainer> trk: tracksRoiI2) { - // merged_tracks.push_back(trk); - addUnique(merged_tracks,*trk); - ElIndex tmp; - tmp.roi = 2; - tmp.index = idCounter; - tmp.elLink = trk; - mapTrackToIndex.insert(std::make_pair(*trk,tmp)); - ++idCounter; - } - - if(msgLvl() <= MSG::DEBUG) { - msg() << MSG::DEBUG << "Merged Counts: " << merged_tracks.size() << "With merged tracks:\n"; - for (auto trk: merged_tracks) { - msg() << MSG::DEBUG << trk << " TrackParticle: pt/eta/phi/q/d0/z0: " - << trk->pt() << " , " << trk->eta() << " , " << trk->phi() << " , " << trk->charge() << " , " - << trk->d0() << " , " << trk->z0()<< "\n"; - if (trk->track()) { - if(trk->track()->perigeeParameters()) { - int qsign = (trk->track()->perigeeParameters()->parameters()[Trk::qOverP] > 0 ? +1 : -1); - msg() << MSG::DEBUG << trk->track() << " and Trk::Track: pt/eta/phi/q/d0/z0: " - << trk->track()->perigeeParameters()->pT() << " , " - << trk->track()->perigeeParameters()->eta() << " , " - << trk->track()->perigeeParameters()->parameters()[Trk::phi0] << " , " - << qsign << " , " - << trk->track()->perigeeParameters()->parameters()[Trk::d0] << " , " - << trk->track()->perigeeParameters()->parameters()[Trk::z0] << "\n"; - } else { - msg() << MSG::DEBUG << "Trk::Track with no perigeeParameters\n"; - } - } else { - msg() << MSG::DEBUG << " no Trk::Track\n" ; - } - } - msg() << MSG::DEBUG << endmsg; - } // if debug - - - // loop to find the lep associated withthe trk::track. can be optimised - // int piTrk(-1),miTrk(-1); - // JW just make a reference to the El-link, for simplicity of code updation. - ElementLink<xAOD::TrackParticleContainer> &trackELlep1 = *pElItr; - ElementLink<xAOD::TrackParticleContainer> &trackELlep2 = *mElItr; - ElementLink<xAOD::IParticleContainer> ELlep1; - ElementLink<xAOD::IParticleContainer> ELlep2; - auto trkmuit = mapTrkToLeps.find(*trackELlep1); - if (trkmuit != mapTrkToLeps.end()) { - //trackELlep1 = (*(trkmuit->second))->inDetTrackParticleLink(); - ELlep1.resetWithKeyAndIndex(trkmuit->second.dataID(),trkmuit->second.index()); - Found1Track = true; - } // if - trkmuit = mapTrkToLeps.find(*trackELlep2); - if (trkmuit != mapTrkToLeps.end()) { - //trackELlep2 = (*(trkmuit->second))->inDetTrackParticleLink(); - ELlep2.resetWithKeyAndIndex(trkmuit->second.dataID(),trkmuit->second.index()); - Found2Track = true; - } // if - - ATH_MSG_DEBUG("Matching summary: " << Found1Track<<Found2Track << ", Now loop over TrackParticles to find tracks " ); - // xAOD::TrackParticleContainer::const_iterator trkIt = merged_tracks.begin(); - // xAOD::TrackParticleContainer::const_iterator lastTrkIt = merged_tracks.end(); - //std::vector<const xAOD::TrackParticle*>::const_iterator trkIt = merged_tracks.begin(); - std::vector<const xAOD::TrackParticle*>::const_iterator lastTrkIt = merged_tracks.end(); - - ATH_MSG_DEBUG("Found tracks, ntrack= " << merged_tracks.size() ); - - - // Main outer loop over tracks - //xAOD::TrackParticleContainer::const_iterator trkIt1 = merged_tracks.begin(); - std::vector<const xAOD::TrackParticle*>::const_iterator trkIt1 = merged_tracks.begin(); - - for (int itrk1=0 ; trkIt1 != lastTrkIt; itrk1++, trkIt1++) - { - const xAOD::TrackParticle* track1 = (*trkIt1); - - ElementLink<xAOD::TrackParticleContainer> & trackEL3 = mapTrackToIndex[*trkIt1].elLink; - ElementLink<xAOD::IParticleContainer> ItrackEL3; - ItrackEL3.resetWithKeyAndIndex(trackEL3.dataID(), trackEL3.index()); - - if (*trackEL3 != track1) { - ATH_MSG_FATAL("Track 1 doesn't match dereferenced elementlink: " << track1 << " " << *trackEL3 ); - if ( timerSvc() ) m_TotTimer->stop(); - return HLT::MISSING_FEATURE; - } - - // Check that it is not lep track - // if(itrk1==piTrk || itrk1==miTrk) { - // ATH_MSG_DEBUG("Track " << track1 << " was matched to a lep, skip it" ); - // continue; - // } - - // ST: EL comparison does not work -- they appear to be always different - // if(trackEL3 == trackELlep1 || trackEL3 == trackELlep2 ) { - // ATH_MSG_DEBUG("Track " << track1 << " was matched to a lep, skip it" ); - // continue; - // } - if( !(Found1Track && isUnique(*trkIt1,*trackELlep1)) || !(Found2Track &&isUnique(*trkIt1,*trackELlep2)) ) { - ATH_MSG_DEBUG("Track " << track1 << " was matched to a lep, skip it" ); - continue; - } - - // Fill tracks monitoring containers - m_mon_Tracks_Pt.push_back (track1->pt()/1000.); - m_mon_Tracks_Eta.push_back(track1->eta()); - m_mon_Tracks_Phi.push_back(track1->phi()); - - m_mon_Tracks_n++; - - // - // B+ -> mu mu K+ part - // - if(m_doB_KEEDecay) { - xAOD::TrigBphys* trigPartBplusEEKplus = checkBplusEEKplus(trackEL3,trackELlep1,trackELlep2); - ++nTriedCombinations; - if (trigPartBplusEEKplus) { - m_bphysHelperTool->setBeamlineDisplacement(trigPartBplusEEKplus,{*trackEL3,*trackELlep1,*trackELlep2}, beamspot); - if(m_maxBpToStore >= 0 && m_countBpToStore >= m_maxBpToStore) { - if(m_countBpToStore == m_maxBpToStore) { - ATH_MSG_WARNING("Reached maximum number of B+ candidates to store " << m_maxBpToStore << "; following candidates won't be written out" ); - m_mon_Errors.push_back(ERROR_MaxNumBpReached); - } - else - ATH_MSG_DEBUG("Do not write out " << m_countBpToStore+1 << "th B+ candidate" ); - delete trigPartBplusEEKplus; - } - else { - m_TrigBphysColl_b->push_back(trigPartBplusEEKplus); - // trackParticleLinks are set by the vertexing method - trigPartBplusEEKplus->addParticleLink(ItrackEL3); // Sergey S. - if(Found1Track) trigPartBplusEEKplus->addParticleLink(ELlep1); - if(Found2Track) trigPartBplusEEKplus->addParticleLink(ELlep2); - } - result=true; - m_mon_BEEK_n++; - m_countBpToStore++; - if(IdEvent!=m_lastEventPassedBplus) { - m_countPassedEventsBplus++; - m_lastEventPassedBplus = IdEvent; - } - - } - } // end if(m_doB_KEEDecay) - - - // Protection - if( nTriedCombinations > m_maxNcombinations ) { - ATH_MSG_DEBUG("Too many track combinations: nTried = " << nTriedCombinations << ", while Max= " << m_maxNcombinations - << ". Terminate the loop." << " (BphysColl size=" << m_TrigBphysColl_b->size() << ")" ); - if(m_TrigBphysColl_b->size() > 0){ - m_mon_Errors.push_back(ERROR_TooManyComb_Acc); - } else { - m_mon_Errors.push_back(ERROR_TooManyComb_Rej); - } - break; - } - - // Inner loop over tracks - //xAOD::TrackParticleContainer::const_iterator trkIt2 = trkIt1 + 1; - std::vector<const xAOD::TrackParticle*>::const_iterator trkIt2 = trkIt1 + 1; - for (int itrk2=itrk1+1 ; trkIt2 != lastTrkIt; itrk2++, trkIt2++) - { - //If timeout has happened in spite of the protection - if ( Athena::Timeout::instance().reached() ) { - return HLT::ErrorCode(HLT::Action::ABORT_EVENT, HLT::Reason::TIMEOUT); - } - - if(m_doBd_KstarEEDecay || m_doBs_Phi1020EEDecay ) { - const xAOD::TrackParticle* track2 = (*trkIt2); - - // Sergey S. - // ElementLink<xAOD::TrackParticleContainer> trackEL4( mapTrackToIndex[*trkIt2].roi == 1 ? tracksRoiI1[0].dataID() : tracksRoiI2[0].dataID(), mapTrackToIndex[*trkIt2].index); - // ElementLink<xAOD::IParticleContainer> ItrackEL4; - // ItrackEL4.resetWithKeyAndIndex(mapTrackToIndex[*trkIt2].roi == 1 ? tracksRoiI1[0].dataID() : tracksRoiI2[0].dataID(), mapTrackToIndex[*trkIt2].index); - - ElementLink<xAOD::TrackParticleContainer> & trackEL4 = mapTrackToIndex[*trkIt2].elLink; - ElementLink<xAOD::IParticleContainer> ItrackEL4; - ItrackEL4.resetWithKeyAndIndex(trackEL4.dataID(), trackEL4.index()); - - - if (*trackEL4 != track2) { - ATH_MSG_FATAL("Track 2 doesn't match dereferenced elementlink: " << track2 << " " << *trackEL4 ); - if ( timerSvc() ) m_TotTimer->stop(); - return HLT::MISSING_FEATURE; - } - - - // Check that it is not lep track -// if(itrk2==piTrk || itrk2==miTrk) { -// ATH_MSG_DEBUG("Track " << track2 << " was matched to a lep, skip it" ); -// continue; -// } - if( !(Found1Track && isUnique(*trkIt2,*trackELlep1)) || !(Found2Track &&isUnique(*trkIt2,*trackELlep2)) ) { - ATH_MSG_DEBUG("Track " << track2 << " was matched to a lep, skip it" ); - continue; - } - - // check that track1 and track2 have opposite charges - // if( (track1->charge())*(track2->charge()) > 0) { - // ATH_MSG_DEBUG("Track pair rejected by opposite charge check: " - // << track1 << " = " << track1->charge() << ", " - // << track2 << " = " << track2->charge() ); - // continue; - // } - - // - // Bd -> mu mu K0* (K+ pi-) part - // - if(m_doBd_KstarEEDecay) { - - // check that track1 and track2 have opposite charges - if( (track1->charge())*(track2->charge()) > 0) { - ATH_MSG_DEBUG("Track pair rejected by opposie charge check: " - << track1 << " = " << track1->charge() << ", " - << track2 << " = " << track2->charge() ); - } else { - - // Mass hypothesis 1: track1 = kaon, track2 = pion - xAOD::TrigBphys* xaod_trigPartKstar(nullptr); - xAOD::TrigBphys* xaod_trigPartBdEEKstar = checkBEE2X(trackEL3,trackEL4,trackELlep1,trackELlep2, - bD_to_Kstar,xaod_trigPartKstar); - ++nTriedCombinations; - if (xaod_trigPartBdEEKstar) { - m_bphysHelperTool->setBeamlineDisplacement(xaod_trigPartBdEEKstar,{*trackEL3,*trackEL4,*trackELlep1,*trackELlep2}, beamspot); - m_bphysHelperTool->setBeamlineDisplacement(xaod_trigPartKstar, {*trackEL3,*trackEL4}, beamspot); - - if(m_maxBdToStore >= 0 && m_countBdToStore >= m_maxBdToStore) { - if(m_countBdToStore == m_maxBdToStore) { - ATH_MSG_WARNING("Reached maximum number of Bd candidates to store " << m_maxBdToStore << "; following candidates won't be written out" ); - m_mon_Errors.push_back(ERROR_MaxNumBdReached); - } - else - ATH_MSG_DEBUG("Do not write out " << m_countBdToStore+1 << "th Bd candidate" ); - delete xaod_trigPartBdEEKstar; - delete xaod_trigPartKstar; - } - else { - m_TrigBphysColl_b->push_back(xaod_trigPartBdEEKstar); - m_TrigBphysColl_X->push_back(xaod_trigPartKstar ); - // trackParticleLinks are set by the vertexing method - xaod_trigPartBdEEKstar->addParticleLink(ItrackEL3); // Sergey S. - xaod_trigPartBdEEKstar->addParticleLink(ItrackEL4); - if(Found1Track) xaod_trigPartBdEEKstar->addParticleLink(ELlep1); - if(Found2Track) xaod_trigPartBdEEKstar->addParticleLink(ELlep2); - - xaod_trigPartKstar->addParticleLink(ItrackEL3); // Sergey S. - xaod_trigPartKstar->addParticleLink(ItrackEL4); - - // set the secondary link; note, does not set correctly for persistified data. - // see code further down for the re-setting of these links - int iKstar = m_TrigBphysColl_X->size() - 1; - ElementLink<xAOD::TrigBphysContainer> trigPartXEL(*m_TrigBphysColl_X,iKstar); - xaod_trigPartBdEEKstar->setSecondaryDecayLink(trigPartXEL); - } - result=true; - m_mon_BdEEKs_n++; - m_countBdToStore++; - if(IdEvent!=m_lastEventPassedBplus) { - m_countPassedEventsBplus++; - m_lastEventPassedBplus = IdEvent; - } - - } // if hypo1 - xaod_trigPartKstar = nullptr; //hypo 1 added to SG(if exists), so reuse the pointer - - // Mass hypothesis 2: track1 = pion, track2 = kaon - xaod_trigPartBdEEKstar = checkBEE2X(trackEL4,trackEL3,trackELlep1,trackELlep2, - bD_to_Kstar,xaod_trigPartKstar); - ++nTriedCombinations; - if (xaod_trigPartBdEEKstar) { - m_bphysHelperTool->setBeamlineDisplacement(xaod_trigPartBdEEKstar,{*trackEL4,*trackEL3,*trackELlep1,*trackELlep2}, beamspot); - m_bphysHelperTool->setBeamlineDisplacement(xaod_trigPartKstar, {*trackEL4,*trackEL3}, beamspot); - if(m_maxBdToStore >= 0 && m_countBdToStore >= m_maxBdToStore) { - if(m_countBdToStore == m_maxBdToStore) { - ATH_MSG_WARNING("Reached maximum number of Bd candidates to store " << m_maxBdToStore << "; following candidates won't be written out" ); - m_mon_Errors.push_back(ERROR_MaxNumBdReached); - } - else - ATH_MSG_DEBUG("Do not write out " << m_countBdToStore+1 << "th Bd candidate" ); - delete xaod_trigPartBdEEKstar; - delete xaod_trigPartKstar; - } - else { - m_TrigBphysColl_b->push_back(xaod_trigPartBdEEKstar); - m_TrigBphysColl_X->push_back(xaod_trigPartKstar ); - // trackParticleLinks are set by the vertexing method - xaod_trigPartBdEEKstar->addParticleLink(ItrackEL4); // Sergey S. - xaod_trigPartBdEEKstar->addParticleLink(ItrackEL3); - if(Found1Track) xaod_trigPartBdEEKstar->addParticleLink(ELlep1); - if(Found2Track) xaod_trigPartBdEEKstar->addParticleLink(ELlep2); - - xaod_trigPartKstar->addParticleLink(ItrackEL4); // Sergey S. - xaod_trigPartKstar->addParticleLink(ItrackEL3); - - // set the secondary link; note, does not set correctly for persistified data. - // see code further down for the re-setting of these links - int iKstar = m_TrigBphysColl_X->size() - 1; - ElementLink<xAOD::TrigBphysContainer> trigPartXEL(*m_TrigBphysColl_X,iKstar); - xaod_trigPartBdEEKstar->setSecondaryDecayLink(trigPartXEL); - } - result=true; - m_mon_BdEEKs_n++; - m_countBdToStore++; - if(IdEvent!=m_lastEventPassedBplus) { - m_countPassedEventsBplus++; - m_lastEventPassedBplus = IdEvent; - } - - } // if hypo2 - } // end check that track1 and track2 have opposite charges - } // if m_doBd_KstarEEDecay - - - // - // Bs -> mu mu Phi (K K) part - // - if(m_doBs_Phi1020EEDecay) { - - // check that track1 and track2 have opposite charges - if( (track1->charge())*(track2->charge()) > 0) { - ATH_MSG_DEBUG("Track pair rejected by opposie charge check: " - << track1 << " = " << track1->charge() << ", " - << track2 << " = " << track2->charge() ); - } else { - - xAOD::TrigBphys* xaod_trigPartPhi(nullptr); - xAOD::TrigBphys* xaod_trigPartBsEEPhi = checkBEE2X(trackEL3,trackEL4,trackELlep1,trackELlep2, - bS_to_Phi,xaod_trigPartPhi); - - ++nTriedCombinations; - if (xaod_trigPartBsEEPhi) { - m_bphysHelperTool->setBeamlineDisplacement(xaod_trigPartBsEEPhi,{*trackEL3,*trackEL4,*trackELlep1,*trackELlep2}, beamspot); - m_bphysHelperTool->setBeamlineDisplacement(xaod_trigPartPhi, {*trackEL3,*trackEL4}, beamspot); - - if(m_maxBsToStore >= 0 && m_countBsToStore >= m_maxBsToStore) { - if(m_countBsToStore == m_maxBsToStore) { - ATH_MSG_WARNING("Reached maximum number of Bs candidates to store " << m_maxBsToStore << "; following candidates won't be written out" ); - m_mon_Errors.push_back(ERROR_MaxNumBsReached); - } - else - ATH_MSG_DEBUG("Do not write out " << m_countBsToStore+1 << "th Bs candidate" ); - delete xaod_trigPartBsEEPhi; - delete xaod_trigPartPhi; - } - else { - m_TrigBphysColl_b->push_back(xaod_trigPartBsEEPhi); - m_TrigBphysColl_X->push_back(xaod_trigPartPhi ); - // trackParticleLinks are set by the vertexing method - xaod_trigPartBsEEPhi->addParticleLink(ItrackEL3); // Sergey S. - xaod_trigPartBsEEPhi->addParticleLink(ItrackEL4); - if(Found1Track) xaod_trigPartBsEEPhi->addParticleLink(ELlep1); - if(Found2Track) xaod_trigPartBsEEPhi->addParticleLink(ELlep2); - - xaod_trigPartPhi->addParticleLink(ItrackEL3); // Sergey S. - xaod_trigPartPhi->addParticleLink(ItrackEL4); - - // set the secondary link; note, does not set correctly for persistified data. - // see code further down for the re-setting of these links - int iPhi = m_TrigBphysColl_X->size() - 1; - ElementLink<xAOD::TrigBphysContainer> trigPartXEL(*m_TrigBphysColl_X,iPhi); - xaod_trigPartBsEEPhi->setSecondaryDecayLink(trigPartXEL); - } - result=true; - m_mon_BsEEPhi_n++; - m_countBsToStore++; - if(IdEvent!=m_lastEventPassedBplus) { - m_countPassedEventsBplus++; - m_lastEventPassedBplus = IdEvent; - } - - - } - } // end check that track1 and track2 have opposite charges - } // m_doBs_Phi1020EEDecay - - - } // end if(m_doBd_KstarEEDecay || m_doBs_Phi1020EEDecay || m_doLb_LambdaEEDecay) - } // end of inner loop over tracks 2 - - } // end of outer loop over tracks 1 - } // end of inner lep loop - } // end of outer lep loop - } // end if muidIDtracks1,2 sizes >= 0 - - ATH_MSG_DEBUG("Totally tried to build " << nTriedCombinations << " tracks cobinations" ); - m_mon_nTriedCombinations = nTriedCombinations; - -// std::string KEY; //sivokl - - if(m_TrigBphysColl_b!=0 && m_TrigBphysColl_b->size()>0) { - ATH_MSG_DEBUG("REGTEST: Store Bphys Collection size: " << m_TrigBphysColl_b->size() ); - HLT::ErrorCode sc = attachFeature(outputTE, m_TrigBphysColl_X, "EFBEEXFex_X" ); - if(sc != HLT::OK) { - ATH_MSG_WARNING("Failed to store trigBphys_X Collection in outputTE" ); - m_mon_Errors.push_back(ERROR_BphysCollStore_Fails); - delete m_TrigBphysColl_b; - delete m_TrigBphysColl_X; - if ( timerSvc() ) m_TotTimer->stop(); - return HLT::ERROR; - } - // Sergey S.: get persistified TrigBphysContainer of X decays - ElementLinkVector<xAOD::TrigBphysContainer> ELvecTBPh; - sc = getFeaturesLinks< xAOD::TrigBphysContainer, xAOD::TrigBphysContainer > (outputTE, ELvecTBPh, "EFBEEXFex_X"); -// const xAOD::TrigBphysContainer * TrigBphysColl_X_persist(0); -// sc = getFeature(outputTE, TrigBphysColl_X_persist, "EFBEEXFex_X"); - if(sc != HLT::OK) { - ATH_MSG_WARNING("Failed to getFeaturesLinks trigBphys_X Collection in outputTE" ); - } else { - if(msgLvl() <= MSG::DEBUG) - for ( const ElementLink<xAOD::TrigBphysContainer> eltp: ELvecTBPh) { - msg() << MSG::DEBUG << " ===== TrigBphys Container ElementLinks : " - << " index: " << eltp.index() - << " sgkey: " << eltp.dataID() - << " hashkey: "<< eltp.key() - << " valid: " << eltp.isValid() - << " ptr: " << (eltp.isValid() ? *eltp : nullptr) - << endmsg; -// KEY = eltp.dataID(); - } - } - // Sergey S.: reset the secondary decay links to persistified container - for( xAOD::TrigBphysContainer::iterator BPobj = m_TrigBphysColl_b->begin(); BPobj != m_TrigBphysColl_b->end(); ++BPobj) { - if ((*BPobj)->secondaryDecayLink().isValid() ) { - ElementLink<xAOD::TrigBphysContainer> secEL; -// secEL.resetWithKeyAndIndex(KEY,(*BPobj)->secondaryDecayLink().index()); - // match transient secondary decay ELs with those from persistified container - for(const ElementLink<xAOD::TrigBphysContainer> persistentSecEL : ELvecTBPh ) { - if(*persistentSecEL == *(*BPobj)->secondaryDecayLink()) - secEL = persistentSecEL; - } - if(!secEL.isValid()){ - ATH_MSG_WARNING("Failed to find persistified secondary decay EL" ); - } else { - (*BPobj)->setSecondaryDecayLink(secEL); - } - ATH_MSG_DEBUG(" ===== TrigBphys secondaryDecay ElementLinks AFTER reset: Slink " - << "isValid = " << (*BPobj)->secondaryDecayLink().isValid() - << ", dataID = " << (*BPobj)->secondaryDecayLink().dataID() - << ", index = " << (*BPobj)->secondaryDecayLink().index() - << ", key = " << (*BPobj)->secondaryDecayLink().key() - << ", cptr = " << (*BPobj)->secondaryDecayLink().cptr() ); - } - } - - sc = attachFeature(outputTE, m_TrigBphysColl_b, m_bphysCollectionKey ); - if(sc != HLT::OK) { - ATH_MSG_WARNING("Failed to store trigBphys Collection in outputTE" ); - m_mon_Errors.push_back(ERROR_BphysCollStore_Fails); - delete m_TrigBphysColl_b; - delete m_TrigBphysColl_X; - if ( timerSvc() ) m_TotTimer->stop(); - return HLT::ERROR; - } - } else { - ATH_MSG_DEBUG("REGTEST: no bphys collection to store " ); - delete m_TrigBphysColl_b; - delete m_TrigBphysColl_X; - } - - if(result) { - if(IdEvent!=m_lastEventPassed) { - m_countPassedEvents++; - m_lastEventPassed = IdEvent; - } - m_countPassedRoIs++; - } - - if ( timerSvc() ) { - m_TotTimer->stop(); - m_VtxFitTimer->resume(); - m_VtxFitTimer->stop(); - m_mon_TotalRunTime = m_TotTimer->elapsed(); - m_mon_VertexingTime = m_VtxFitTimer->elapsed(); - } - - if ( timerSvc() ) { - ATH_MSG_DEBUG("m_TotTimer->elapsed() = " << m_TotTimer->elapsed() ); - ATH_MSG_DEBUG("m_VtxFitTimer->elapsed() = " << m_VtxFitTimer->elapsed() ); - } - - return HLT::OK; - -} - - -xAOD::TrigBphys* TrigEFBEEXFex::checkBplusEEKplus(const ElementLink<xAOD::TrackParticleContainer> & eltrack1, - const ElementLink<xAOD::TrackParticleContainer> & ellep1, - const ElementLink<xAOD::TrackParticleContainer> & ellep2) { - - ATH_MSG_DEBUG("Try to build B+ -> mu mu K+ with track " << *eltrack1 ); - float massKEE = KEEMass(*ellep1,*ellep2,*eltrack1); - - static const std::vector<double> masses = {KPLUSMASS,EMASS,EMASS}; - - if( !(massKEE > m_lowerKEEMassCut && massKEE < m_upperKEEMassCut) ) { - ATH_MSG_DEBUG(" B+ -> mu mu K+ candidate rejected by mass cut: m = " << massKEE ); - return nullptr; - } - ++m_countPassedBplusMass; - auto track1 = *eltrack1; - - // Fill BEEK monitoring containers - m_mon_BEEK_Pt_K.push_back(track1->pt()*0.001); - m_mon_BEEK_Eta_K.push_back(track1->eta()); - m_mon_BEEK_Phi_K.push_back(track1->phi()); - m_mon_BEEK_InvMass_B.push_back(massKEE*0.001); - - // create initial object - xAOD::TrigBphys * result = new xAOD::TrigBphys; - result->makePrivateStore(); - result->initialise(0,0.,0.,0., - xAOD::TrigBphys::BKMUMU, massKEE, xAOD::TrigBphys::EF); - - std::vector<ElementLink<xAOD::TrackParticleContainer> > vec_tracks = {eltrack1,ellep1, ellep2}; - - if (m_doB_KEEVertexing) { - - if ( timerSvc() ) m_VtxFitTimer->resume(); - if (!m_bphysHelperTool->vertexFit(result,vec_tracks,masses).isSuccess()) { - ATH_MSG_DEBUG(" Vertex fitting failed." ); - if ( timerSvc() ) m_VtxFitTimer->pause(); - delete result; - return nullptr; - } - m_countPassedBplusVtx++; - - double chi2val(result->fitchi2()); - - if (chi2val > m_bVtxChi2Cut || chi2val < 0) { - ATH_MSG_DEBUG(" B+ -> mu mu K+ candidate rejected by chi2 cut: chi2 = " << chi2val ); - delete result; - return nullptr; - } - m_mon_BEEK_Chi2_B.push_back(chi2val); - ++m_countPassedBplusVtxChi2; - ATH_MSG_DEBUG("Good B+->mumuK+ found! m= " << result->mass() << ", " << "chi2 = " << result->fitchi2() - << ", vertex (" << result->fitx() << ", " << result->fity() << ", " << result->fitz() << ")" ); - } // if m_doB_KEEVertexing - else { - // if vertexting is not done - just attach trackParticle links - for(const auto& tpel : vec_tracks) { - result->addTrackParticleLink(tpel); - } - } - - return result; -} // checkBplusEEKplus - -xAOD::TrigBphys* TrigEFBEEXFex::checkBEE2X(const ElementLink<xAOD::TrackParticleContainer> & eltrack1, - const ElementLink<xAOD::TrackParticleContainer> & eltrack2, - const ElementLink<xAOD::TrackParticleContainer> & ellep1, - const ElementLink<xAOD::TrackParticleContainer> & ellep2, - int decay, xAOD::TrigBphys* & trigPartX) { - trigPartX = nullptr; - xAOD::TrigBphys * fitVtx_X(nullptr); - xAOD::TrigBphys * fitVtx(nullptr); - - std::vector<double> massHypoX; - std::vector<double> massHypo; - double lowerXMassCut, upperXMassCut; - double lowerXEEMassCut, upperXEEMassCut; - double chi2XCut; - double chi2XEECut; - std::string decayName; - xAOD::TrigBphys::pType decayType(xAOD::TrigBphys::UNKNOWNPTYPE); - unsigned int *countPassedXMass; - unsigned int *countPassedXEEMass; - unsigned int *countPassedXVtx; - unsigned int *countPassedXVtxChi2; - unsigned int *countPassedXEEVtx; - unsigned int *countPassedXEEVtxChi2; - - bool do2XVertexing; - bool doBEE2XVertexing; - - std::vector<float> *pMon_BEE2X_Pt_X1; - std::vector<float> *pMon_BEE2X_Eta_X1; - std::vector<float> *pMon_BEE2X_Phi_X1; - std::vector<float> *pMon_BEE2X_Pt_X2; - std::vector<float> *pMon_BEE2X_Eta_X2; - std::vector<float> *pMon_BEE2X_Phi_X2; - std::vector<float> *pMon_BEE2X_InvMass_2X; - std::vector<float> *pMon_BEE2X_VtxMass_2X; - std::vector<float> *pMon_BEE2X_Chi2_2X; - std::vector<float> *pMon_BEE2X_InvMass_B; - std::vector<float> *pMon_BEE2X_VtxMass_B; - std::vector<float> *pMon_BEE2X_Chi2_B; - - // Fix silly warning messages - // (void)pMon_BEE2X_VtxMass_2X; - // (void)pMon_BEE2X_VtxMass_B; - - if(decay == bD_to_Kstar) { - massHypoX = {KPLUSMASS,PIMASS}; - massHypo = {KPLUSMASS,PIMASS,EMASS,EMASS}; - lowerXMassCut = m_lowerKstar_KaonMassCut; - upperXMassCut = m_upperKstar_KaonMassCut; - chi2XCut = m_kStarVtxChi2Cut; - lowerXEEMassCut = m_lowerBd_KstarEEMassCut; - upperXEEMassCut = m_upperBd_KstarEEMassCut; - chi2XEECut = m_bDVtxChi2Cut; - decayName = "Bd -> mu mu K*"; - decayType = xAOD::TrigBphys::BDKSTMUMU; - countPassedXMass = &m_countPassedKstarMass; - countPassedXEEMass = &m_countPassedBdMass; - countPassedXVtx = &m_countPassedKstarVtx; - countPassedXVtxChi2 = &m_countPassedKstarVtxChi2; - countPassedXEEVtx = &m_countPassedBdVtx; - countPassedXEEVtxChi2 = &m_countPassedBdVtxChi2; - do2XVertexing = m_doKstar_KPiVertexing; - doBEE2XVertexing = m_doBd_KstarEEVertexing; - pMon_BEE2X_Pt_X1 = &m_mon_BdEEKs_Pt_K; - pMon_BEE2X_Eta_X1 = &m_mon_BdEEKs_Eta_K; - pMon_BEE2X_Phi_X1 = &m_mon_BdEEKs_Phi_K; - pMon_BEE2X_Pt_X2 = &m_mon_BdEEKs_Pt_Pi; - pMon_BEE2X_Eta_X2 = &m_mon_BdEEKs_Eta_Pi; - pMon_BEE2X_Phi_X2 = &m_mon_BdEEKs_Phi_Pi; - pMon_BEE2X_InvMass_2X = &m_mon_BdEEKs_InvMass_Kstar; - pMon_BEE2X_VtxMass_2X = &m_mon_BdEEKs_VtxMass_Kstar; - pMon_BEE2X_Chi2_2X = &m_mon_BdEEKs_Chi2_Kstar; - pMon_BEE2X_InvMass_B = &m_mon_BdEEKs_InvMass_Bd; - pMon_BEE2X_VtxMass_B = &m_mon_BdEEKs_VtxMass_Bd; - pMon_BEE2X_Chi2_B = &m_mon_BdEEKs_Chi2_Bd; - } else if(decay == bS_to_Phi) { - massHypoX = {KPLUSMASS,KPLUSMASS}; - massHypo = {KPLUSMASS,KPLUSMASS,EMASS,EMASS}; - lowerXMassCut = m_lowerPhi1020_KaonMassCut; - upperXMassCut = m_upperPhi1020_KaonMassCut; - chi2XCut = m_phi1020VtxChi2Cut; - lowerXEEMassCut = m_lowerBs_Phi1020EEMassCut; - upperXEEMassCut = m_upperBs_Phi1020EEMassCut; - chi2XEECut = m_bSVtxChi2Cut; - decayName = "Bs -> mu mu phi"; - decayType = xAOD::TrigBphys::BSPHIMUMU; - countPassedXMass = &m_countPassedPhi1020Mass; - countPassedXEEMass = &m_countPassedBsMass; - countPassedXVtx = &m_countPassedPhi1020Vtx; - countPassedXVtxChi2 = &m_countPassedPhi1020VtxChi2; - countPassedXEEVtx = &m_countPassedBsVtx; - countPassedXEEVtxChi2 = &m_countPassedBsVtxChi2; - do2XVertexing = m_doPhi1020_KKVertexing; - doBEE2XVertexing = m_doBs_Phi1020EEVertexing; - pMon_BEE2X_Pt_X1 = &m_mon_BsEEPhi_Pt_K1; - pMon_BEE2X_Eta_X1 = &m_mon_BsEEPhi_Eta_K1; - pMon_BEE2X_Phi_X1 = &m_mon_BsEEPhi_Phi_K1; - pMon_BEE2X_Pt_X2 = &m_mon_BsEEPhi_Pt_K2; - pMon_BEE2X_Eta_X2 = &m_mon_BsEEPhi_Eta_K2; - pMon_BEE2X_Phi_X2 = &m_mon_BsEEPhi_Phi_K2; - pMon_BEE2X_InvMass_2X = &m_mon_BsEEPhi_InvMass_Phi1020; - pMon_BEE2X_VtxMass_2X = &m_mon_BsEEPhi_VtxMass_Phi1020; - pMon_BEE2X_Chi2_2X = &m_mon_BsEEPhi_Chi2_Phi1020; - pMon_BEE2X_InvMass_B = &m_mon_BsEEPhi_InvMass_Bs; - pMon_BEE2X_VtxMass_B = &m_mon_BsEEPhi_VtxMass_Bs; - pMon_BEE2X_Chi2_B = &m_mon_BsEEPhi_Chi2_Bs; - } else { - ATH_MSG_DEBUG("Wrong decay identifier passed to checkBEE2X: decay = " << decay ); - m_mon_Errors.push_back(ERROR_WrongDecayID); - return nullptr; - } - - ATH_MSG_DEBUG("Try to build " << decayName << " with tracks " << *eltrack1 << ", " << *eltrack2 ); - - float massX = XMass(*eltrack1, *eltrack2, decay); - if( !(massX > lowerXMassCut && massX < upperXMassCut) ) { - ATH_MSG_DEBUG(" " << decayName << " candidate rejected by X mass cut: m = " << massX ); - trigPartX = nullptr; - return nullptr; - } - - ++(*countPassedXMass); - - float massXEE = XEEMass(*ellep1, *ellep2, *eltrack1, *eltrack2, decay); - if( !(massXEE > lowerXEEMassCut && massXEE < upperXEEMassCut) ) { - ATH_MSG_DEBUG(" " << decayName << " candidate rejected by XEE mass cut: m = " << massXEE ); - trigPartX = nullptr; - return nullptr; - } - - ++(*countPassedXEEMass); - - // create initial object - fitVtx_X = new xAOD::TrigBphys; - fitVtx_X->makePrivateStore(); - fitVtx_X->initialise(0,0.,0.,0., - decayType, massX, xAOD::TrigBphys::EF); - fitVtx = new xAOD::TrigBphys; - fitVtx->makePrivateStore(); - fitVtx->initialise(0,0.,0.,0., - decayType, massXEE, xAOD::TrigBphys::EF); - - - std::vector<ElementLink<xAOD::TrackParticleContainer> > vec_tracksX = {eltrack1,eltrack2}; - std::vector<ElementLink<xAOD::TrackParticleContainer> > vec_tracks = {eltrack1,eltrack2,ellep1,ellep2}; - - - pMon_BEE2X_Pt_X1->push_back ((*eltrack1)->pt()*0.001); - pMon_BEE2X_Eta_X1->push_back((*eltrack1)->eta()); - pMon_BEE2X_Phi_X1->push_back((*eltrack1)->phi()); - pMon_BEE2X_Pt_X2->push_back ((*eltrack2)->pt()*0.001); - pMon_BEE2X_Eta_X2->push_back((*eltrack2)->eta()); - pMon_BEE2X_Phi_X2->push_back((*eltrack2)->phi()); - pMon_BEE2X_InvMass_2X->push_back(massX*0.001); - pMon_BEE2X_InvMass_B->push_back(massXEE/1000.); - - - - if(do2XVertexing) { - if ( timerSvc() ) m_VtxFitTimer->resume(); - if (!m_bphysHelperTool->vertexFit(fitVtx_X,vec_tracksX,massHypoX).isSuccess()) { - ATH_MSG_DEBUG(" Vertex fitting of X failed." << decayName ); - } - if ( timerSvc() ) m_VtxFitTimer->pause(); - - ++(*countPassedXVtx); - double chi2X(fitVtx_X->fitchi2()); - if( chi2X > chi2XCut || chi2X < 0 ) { - ATH_MSG_DEBUG(" " << decayName << " candidate rejected by X vertex chi2 cut: chi2 = " << chi2X ); - delete fitVtx_X; - delete fitVtx; - return nullptr; - } - (*countPassedXVtxChi2)++; - pMon_BEE2X_VtxMass_2X->push_back(fitVtx_X->fitmass()*0.001); - pMon_BEE2X_Chi2_2X->push_back(chi2X); - } // do2XVertexing - else { - // if vertexting is not done - just attach trackParticle links - for(const auto& tpel : vec_tracksX) { - fitVtx_X->addTrackParticleLink(tpel); - } - } - - if(doBEE2XVertexing) { - if ( timerSvc() ) m_VtxFitTimer->resume(); - if (!m_bphysHelperTool->vertexFit(fitVtx,vec_tracks,massHypo).isSuccess()) { - ATH_MSG_DEBUG(" Vertex fitting of EEX failed for " << decayName ); - } - if ( timerSvc() ) m_VtxFitTimer->pause(); - (*countPassedXEEVtx)++; - double chi2EEX(fitVtx->fitchi2()); - if( chi2EEX > chi2XEECut || chi2EEX < 0 ) { - ATH_MSG_DEBUG(" " << decayName << " candidate rejected by XEE vertex chi2 cut: chi2 = " << chi2EEX ); - delete fitVtx_X; - delete fitVtx; - return nullptr; - } - (*countPassedXEEVtxChi2)++; - pMon_BEE2X_VtxMass_B->push_back(fitVtx->fitmass()*0.001); - pMon_BEE2X_Chi2_B->push_back(chi2EEX); - - } // doBEE2XVertexing - else { - // if vertexting is not done - just attach trackParticle links - for(const auto& tpel : vec_tracks) { - fitVtx->addTrackParticleLink(tpel); - } - } - - trigPartX = fitVtx_X; - return fitVtx; - -} // checkBEE2X - - -/*----------------------------------------------------------------------------*/ -void TrigEFBEEXFex::addUnique(std::vector<const xAOD::TrackParticle*>& tps, const xAOD::TrackParticle* tpIn) -{ - // std::cout<<" in addUnique : tpIn pT= "<<tpIn->pt()<<std::endl; - std::vector<const xAOD::TrackParticle*>::iterator tpItr; - for( tpItr = tps.begin(); tpItr != tps.end(); tpItr++) - { - double dPhi=fabs((*tpItr)->phi() - - tpIn->phi()); - if (dPhi > M_PI) dPhi = 2.*M_PI - dPhi; - - if( fabs(dPhi) < 0.02 && - fabs((*tpItr)->eta() - - tpIn->eta()) < 0.02 && - tpIn->charge() * (*tpItr)->charge() > 0) - { //std::cout<<" TrigEFBEEFex addUnique: the SAME tps! pT= "<< - //tpIn->pt()<<" and "<< - //(*tpItr)->pt()<<std::endl; - return; - } - } - tps.push_back(tpIn); -} - -void TrigEFBEEXFex::addUnique(std::vector<ElementLink<xAOD::TrackParticleContainer> >& tps, const ElementLink<xAOD::TrackParticleContainer>&tpIn) { - if (!tpIn.isValid()) { - return; - } - for (auto itr = tps.begin(); itr != tps.end(); ++itr) { - auto tpel = *itr; - double dPhi = fabs( (*tpel)->phi() - (*tpIn)->phi() ); - if (dPhi > M_PI) dPhi = 2.*M_PI - dPhi; - - if( fabs(dPhi) < 0.02 && - fabs((*tpel)->eta() - - (*tpIn)->eta()) < 0.02 && - (*tpIn)->charge() * (*tpel)->charge() > 0) { - // same parameters - return; - } - } // for - - // if here then its unique - tps.push_back(tpIn); -} // addUnique - - -/*----------------------------------------------------------------------------*/ -bool TrigEFBEEXFex::isUnique(const xAOD::TrackParticle* id1, const xAOD::TrackParticle* id2) const { - if (!id1 || !id2) return false; - float dEta = fabs( id1->eta() - id2->eta() ); - float dPhi = id1->phi() - id2->phi(); - while (dPhi > M_PI) dPhi -= 2*M_PI; - while (dPhi < -M_PI) dPhi += 2*M_PI; - - if( dEta < 0.02 && fabs(dPhi) < 0.02 && id1->charge() * id2->charge() > 0 ) return false; - else return true; - -} - -double TrigEFBEEXFex::XMass(const xAOD::TrackParticle* particle1, const xAOD::TrackParticle* particle2, int decay) { /// checking the mass - - std::array<double, 2> massHypo; - if(decay == di_to_electrons){ - massHypo[0] = EMASS; - massHypo[1] = EMASS; - } - else if(decay == bD_to_Kstar){ - massHypo[0] = KPLUSMASS; - massHypo[1] = PIMASS; - } - else if(decay == bS_to_Phi){ - massHypo[0] = KPLUSMASS; - massHypo[1] = KPLUSMASS; - } - else if(decay == bC_to_PiPi){ - massHypo[0] = PIMASS; - massHypo[1] = PIMASS; - } - else if(decay == lB_to_L){ - massHypo[0] = PROTONMASS; - massHypo[1] = PIMASS; - } - else{ - throw std::runtime_error("unknown decay TrigEFBEEXFex::XEEMass"); - } - const std::array<const xAOD::TrackParticle*, 2> bTracks{particle1, particle2}; - return m_bphysHelperTool->invariantMass(bTracks, massHypo); - -} - -double TrigEFBEEXFex::X3Mass(const xAOD::TrackParticle* particle1, const xAOD::TrackParticle* particle2, const xAOD::TrackParticle* particle3 ) { - static const std::array<double, 3> massHypo{KPLUSMASS, KPLUSMASS, PIMASS}; - const std::array<const xAOD::TrackParticle*, 3> bTracks{particle1, particle2, particle3}; - return m_bphysHelperTool->invariantMass(bTracks, massHypo); - -} - -double TrigEFBEEXFex::XKPiPiMass(const xAOD::TrackParticle* particle1, const xAOD::TrackParticle* particle2, const xAOD::TrackParticle* particle3 ) { - static const std::array<double, 3> massHypo{ KPLUSMASS, PIMASS, PIMASS}; - const std::array<const xAOD::TrackParticle*, 3> bTracks{ particle1, particle2, particle3}; - return m_bphysHelperTool->invariantMass(bTracks, massHypo); - -} - -double TrigEFBEEXFex::KEEMass( const xAOD::TrackParticle* lep1, const xAOD::TrackParticle* lep2, const xAOD::TrackParticle* kaon) { - static const std::array<double, 3> massHypo{ EMASS, EMASS, KPLUSMASS}; - const std::array<const xAOD::TrackParticle*, 3> bTracks{lep1, lep2, kaon}; - return m_bphysHelperTool->invariantMass(bTracks, massHypo); -} - -double TrigEFBEEXFex::XEEMass(const xAOD::TrackParticle* lep1, const xAOD::TrackParticle* lep2, const xAOD::TrackParticle* particle1, - const xAOD::TrackParticle* particle2, int decay){ - std::array<double, 4> massHypo; - massHypo[0] = EMASS; - massHypo[1] = EMASS; - if(decay == bD_to_Kstar){ - massHypo[2] = KPLUSMASS; - massHypo[3] = PIMASS; - } - else if(decay == bS_to_Phi){ - massHypo[2] = KPLUSMASS; - massHypo[3] = KPLUSMASS; - } - else if(decay == bC_to_PiPi){ - massHypo[2] = PIMASS; - massHypo[3] = PIMASS; - } - else if(decay == lB_to_L){ - massHypo[2] = PROTONMASS; - massHypo[3] = PIMASS; - }else{ - throw std::runtime_error("unknown decay TrigEFBEEXFex::XEEMass"); - } - std::array<const xAOD::TrackParticle*, 4> bTracks{ lep1, lep2, particle1, particle2 }; - return m_bphysHelperTool->invariantMass(bTracks, massHypo); -} - -double TrigEFBEEXFex::X3EEMass(const xAOD::TrackParticle* lep1, const xAOD::TrackParticle* lep2, const xAOD::TrackParticle* particle1, - const xAOD::TrackParticle* particle2, const xAOD::TrackParticle* particle3 ) { - static constexpr std::array<double, 5> massHypo{ EMASS, EMASS, KPLUSMASS, KPLUSMASS, PIMASS}; - const std::array<const xAOD::TrackParticle*, 5> bTracks{lep1, lep2, particle1, particle2, particle3}; - return m_bphysHelperTool->invariantMass(bTracks, massHypo); - -} - -double TrigEFBEEXFex::XKPiPiEEMass(const xAOD::TrackParticle* lep1, const xAOD::TrackParticle* lep2, const xAOD::TrackParticle* particle1, - const xAOD::TrackParticle* particle2, const xAOD::TrackParticle* particle3 ) { - static constexpr std::array<double, 5> massHypo{EMASS, EMASS, KPLUSMASS, PIMASS, PIMASS}; - const std::array<const xAOD::TrackParticle*, 5> bTracks{ lep1, lep2, particle1, particle2, particle3}; - return m_bphysHelperTool->invariantMass(bTracks, massHypo); -} diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBEEXFex.h b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBEEXFex.h deleted file mode 100644 index d093122e281cdf551dce1998949016086b6bc3cd..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBEEXFex.h +++ /dev/null @@ -1,305 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -// vim: tabstop=2:shiftwidth=2:expandtab -/************************************************************************** -** -** File: Trigger/TrigHypothesis/TrigBphysHypo/TrigEFBEEXFex.h -** -** Description: EF hypothesis algorithms for -** B^0_{d,s},\Lambda_b \to X \mu^+ \mu^- -** -** -** Authors: O. Igonkina and H.Russell -** -** Created: 25.09.2017 -** -***************************************************************************/ - -#ifndef TRIG_TrigEFBEEXFex_H -#define TRIG_TrigEFBEEXFex_H - -// standard stuff -#include <string> -// trigger includes -#include "TrigInterfaces/ComboAlgo.h" - -#include "TrigBphysHelperUtilsTool.h" - -#include "xAODEventInfo/EventInfo.h" -#include "xAODTracking/TrackParticle.h" -#include "xAODEgamma/Electron.h" -#include "xAODEgamma/ElectronContainer.h" - -class TriggerElement; -class Electron; - -class TrigBphysHelperUtilsTool; - -class TrigEFBEEXFex: public HLT::ComboAlgo { - - public: - TrigEFBEEXFex(const std::string & name, ISvcLocator* pSvcLocator); - ~TrigEFBEEXFex(); - HLT::ErrorCode hltInitialize(); - HLT::ErrorCode hltFinalize(); - HLT::ErrorCode acceptInputs(HLT::TEConstVec& inputTE, bool& pass ); - HLT::ErrorCode hltExecute(HLT::TEConstVec& inputTE, HLT::TriggerElement* outputTE); - - private: - - ToolHandle <TrigBphysHelperUtilsTool> m_bphysHelperTool; - - // container inputs names - std::string m_bphysCollectionKey; - std::string m_input_trackCollectionKey; - - // Cuts and properties - bool m_oppositeCharge; - float m_lowerEEMassCut; - float m_upperEEMassCut; - float m_VtxChi2Cut; - - // Maximum number of track combinations to try -- protection against TimeOuts - int m_maxNcombinations; - - bool m_doB_KEEDecay; - float m_lowerKEEMassCut; - float m_upperKEEMassCut; - bool m_doB_KEEVertexing; - float m_bVtxChi2Cut; - int m_maxBpToStore; - - bool m_doBd_KstarEEDecay; - float m_lowerKstar_KaonMassCut; - float m_upperKstar_KaonMassCut; - float m_lowerBd_KstarEEMassCut; - float m_upperBd_KstarEEMassCut; - bool m_doKstar_KPiVertexing; - bool m_doBd_KstarEEVertexing; - float m_kStarVtxChi2Cut; - float m_bDVtxChi2Cut; - int m_maxBdToStore; - - bool m_doBs_Phi1020EEDecay; - float m_lowerPhi1020_KaonMassCut; - float m_upperPhi1020_KaonMassCut; - float m_lowerBs_Phi1020EEMassCut; - float m_upperBs_Phi1020EEMassCut; - bool m_doPhi1020_KKVertexing; - bool m_doBs_Phi1020EEVertexing; - float m_phi1020VtxChi2Cut; - float m_bSVtxChi2Cut; - int m_maxBsToStore; - - // Monitoring variables and containers - // General - std::vector<int> m_mon_Errors; - std::vector<int> m_mon_Acceptance; - int m_mon_nTriedCombinations; - // Timing - float m_mon_TotalRunTime; - float m_mon_VertexingTime; - // RoIs - std::vector<float> m_mon_RoI_RoI1Eta; - std::vector<float> m_mon_RoI_RoI2Eta; - std::vector<float> m_mon_RoI_RoI1Phi; - std::vector<float> m_mon_RoI_RoI2Phi; - std::vector<float> m_mon_RoI_dEtaRoI; - std::vector<float> m_mon_RoI_dPhiRoI; - // DiEon - int m_mon_DiE_n; - std::vector<float> m_mon_DiE_Pt_Lep1; - std::vector<float> m_mon_DiE_Pt_Lep2; - std::vector<float> m_mon_DiE_Eta_Lep1; - std::vector<float> m_mon_DiE_Eta_Lep2; - std::vector<float> m_mon_DiE_Phi_Lep1; - std::vector<float> m_mon_DiE_Phi_Lep2; - std::vector<float> m_mon_DiE_dEtaEE; - std::vector<float> m_mon_DiE_dPhiEE; - std::vector<float> m_mon_DiE_pTsumEE; - std::vector<float> m_mon_DiE_InvMassEE; - std::vector<float> m_mon_DiE_VtxMassEE; - std::vector<float> m_mon_DiE_Chi2EE; - // Tracks - int m_mon_Tracks_n; - std::vector<float> m_mon_Tracks_Eta; - std::vector<float> m_mon_Tracks_Pt; - std::vector<float> m_mon_Tracks_Phi; - // B+ - int m_mon_BEEK_n; - std::vector<float> m_mon_BEEK_Pt_K; - std::vector<float> m_mon_BEEK_Eta_K; - std::vector<float> m_mon_BEEK_Phi_K; - std::vector<float> m_mon_BEEK_InvMass_B; - std::vector<float> m_mon_BEEK_VtxMass_B; - std::vector<float> m_mon_BEEK_Chi2_B; - // Bd - int m_mon_BdEEKs_n; - std::vector<float> m_mon_BdEEKs_Pt_K; - std::vector<float> m_mon_BdEEKs_Eta_K; - std::vector<float> m_mon_BdEEKs_Phi_K; - std::vector<float> m_mon_BdEEKs_Pt_Pi; - std::vector<float> m_mon_BdEEKs_Eta_Pi; - std::vector<float> m_mon_BdEEKs_Phi_Pi; - std::vector<float> m_mon_BdEEKs_InvMass_Kstar; - std::vector<float> m_mon_BdEEKs_VtxMass_Kstar; - std::vector<float> m_mon_BdEEKs_Chi2_Kstar; - std::vector<float> m_mon_BdEEKs_InvMass_Bd; - std::vector<float> m_mon_BdEEKs_VtxMass_Bd; - std::vector<float> m_mon_BdEEKs_Chi2_Bd; - // Bs - int m_mon_BsEEPhi_n; - std::vector<float> m_mon_BsEEPhi_Pt_K1; - std::vector<float> m_mon_BsEEPhi_Eta_K1; - std::vector<float> m_mon_BsEEPhi_Phi_K1; - std::vector<float> m_mon_BsEEPhi_Pt_K2; - std::vector<float> m_mon_BsEEPhi_Eta_K2; - std::vector<float> m_mon_BsEEPhi_Phi_K2; - std::vector<float> m_mon_BsEEPhi_InvMass_Phi1020; - std::vector<float> m_mon_BsEEPhi_VtxMass_Phi1020; - std::vector<float> m_mon_BsEEPhi_Chi2_Phi1020; - std::vector<float> m_mon_BsEEPhi_InvMass_Bs; - std::vector<float> m_mon_BsEEPhi_VtxMass_Bs; - std::vector<float> m_mon_BsEEPhi_Chi2_Bs; - - - // to set Accept-All mode: should be done with force-accept when possible - bool m_acceptAll; - - xAOD::TrigBphysContainer * m_TrigBphysColl_b; - xAOD::TrigBphysContainer * m_TrigBphysColl_X; - - // Timers - TrigTimer* m_TotTimer; - TrigTimer* m_VtxFitTimer; - - //Counters - int m_lastEvent; - int m_lastEventPassed; - unsigned int m_countTotalEvents; - unsigned int m_countTotalRoI; - unsigned int m_countPassedEvents; - unsigned int m_countPassedRoIs; - - int m_lastEventPassedBplus; - int m_lastEventPassedBd; - int m_lastEventPassedBs; - unsigned int m_countPassedEventsBplus; - - unsigned int m_countPassedEEID; - unsigned int m_countPassedEEOS; - unsigned int m_countPassedEEMass; - unsigned int m_countPassedEEVtx; - unsigned int m_countPassedEEVtxChi2; - - unsigned int m_countPassedBplusMass; - unsigned int m_countPassedBplusVtx; - unsigned int m_countPassedBplusVtxChi2; - int m_countBpToStore; - - unsigned int m_countPassedKstarMass; - unsigned int m_countPassedBdMass; - unsigned int m_countPassedKstarVtx; - unsigned int m_countPassedKstarVtxChi2; - unsigned int m_countPassedBdVtx; - unsigned int m_countPassedBdVtxChi2; - int m_countBdToStore; - - unsigned int m_countPassedPhi1020Mass; - unsigned int m_countPassedBsMass; - unsigned int m_countPassedPhi1020Vtx; - unsigned int m_countPassedPhi1020VtxChi2; - unsigned int m_countPassedBsVtx; - unsigned int m_countPassedBsVtxChi2; - int m_countBsToStore; - - - - void addUnique(std::vector<const xAOD::TrackParticle*>&, const xAOD::TrackParticle*); - void addUnique(std::vector<ElementLink<xAOD::TrackParticleContainer> >&, const ElementLink<xAOD::TrackParticleContainer>&); - bool isUnique(const xAOD::TrackParticle* id1, const xAOD::TrackParticle* id2) const; - - - double XMass(const xAOD::TrackParticle* particle1, const xAOD::TrackParticle* particle2, int decay); /// checking the mass - double X3Mass(const xAOD::TrackParticle* particle1, const xAOD::TrackParticle* particle2, const xAOD::TrackParticle* particle3 ); - double XKPiPiMass(const xAOD::TrackParticle* particle1, const xAOD::TrackParticle* particle2, const xAOD::TrackParticle* particle3 ); - - double KEEMass( const xAOD::TrackParticle* lep1, const xAOD::TrackParticle* lep2, const xAOD::TrackParticle* kaon); - double XEEMass( const xAOD::TrackParticle* lep1, const xAOD::TrackParticle* lep2, const xAOD::TrackParticle* particle1, - const xAOD::TrackParticle* particle2, int decay); - double X3EEMass(const xAOD::TrackParticle* lep1, const xAOD::TrackParticle* lep2, const xAOD::TrackParticle* particle1, - const xAOD::TrackParticle* particle2, const xAOD::TrackParticle* particle3 ); - double XKPiPiEEMass(const xAOD::TrackParticle* lep1, const xAOD::TrackParticle* lep2, const xAOD::TrackParticle* particle1, - const xAOD::TrackParticle* particle2, const xAOD::TrackParticle* particle3 ); - - xAOD::TrigBphys* checkBplusEEKplus(const ElementLink<xAOD::TrackParticleContainer> & eltrack1, - const ElementLink<xAOD::TrackParticleContainer> & ellep1, - const ElementLink<xAOD::TrackParticleContainer> & ellep2); - - xAOD::TrigBphys* checkBEE2X(const ElementLink<xAOD::TrackParticleContainer> & eltrack1, - const ElementLink<xAOD::TrackParticleContainer> & eltrack2, - const ElementLink<xAOD::TrackParticleContainer> & ellep1, - const ElementLink<xAOD::TrackParticleContainer> & ellep2, - int decay, xAOD::TrigBphys* & trigPartX); - - - -}; - -// Define the bins for error-monitoring histogram -#define ERROR_No_EventInfo 0 -#define ERROR_Not_2_InputTEs 1 -#define ERROR_No_RoIs 2 -#define ERROR_No_ElectronContainer 3 -#define ERROR_No_ElectronCandidate 4 - -#define ERROR_SameLep 5 -#define ERROR_DiEVtxFit_Fails 6 -#define ERROR_DiEVtxMass_Fails 7 - -#define ERROR_No_TrackColl 8 -#define ERROR_No_LepTrackMatch 17 - -#define ERROR_BplusVtxFit_Fails 9 -#define ERROR_BplusVtxMass_Fails 10 -#define ERROR_WrongDecayID 11 -#define ERROR_XVtxFit_Fails 12 -#define ERROR_XVtxMass_Fails 13 -#define ERROR_XEEVtxFit_Fails 14 -#define ERROR_XEEVtxMass_Fails 15 - -#define ERROR_BphysCollStore_Fails 16 - -#define ERROR_TooManyComb_Acc 18 -#define ERROR_TooManyComb_Rej 19 - -#define ERROR_MaxNumBpReached 20 -#define ERROR_MaxNumBdReached 21 -#define ERROR_MaxNumBsReached 22 -#define ERROR_MaxNumLbReached 23 -#define ERROR_MaxNumBcReached 24 -#define ERROR_MaxNumBcDplusReached 24 -#define ERROR_MaxNumBcDstarReached 24 -#define ERROR_MaxNumBcD0Reached 24 - -// // Define the bins for acceptance-monitoring histogram -// #define ACCEPT_Input 0 -// #define ACCEPT_AcceptAll 1 -// #define ACCEPT_Got_RoIs 2 -// #define ACCEPT_Got_Muons 3 -// #define ACCEPT_Got_TrackColl 4 -// #define ACCEPT_First_TrackColl 5 -// #define ACCEPT_Both_TrackColls 6 -// #define ACCEPT_Full_IDTracks 7 -// #define ACCEPT_Pass_OppChargeC 8 -// #define ACCEPT_MuonTracks_Added 8 -// #define ACCEPT_Muon_Vertexing 9 -// #define ACCEPT_CalcInvMass 10 -// #define ACCEPT_MuonVtx_Part 11 -// #define ACCEPT_EE_Mass 12 -// #define ACCEPT_MotherVtxCreated 13 -// #define ACCEPT_BphysCollParticle 14 - -#endif diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBMuMuFex.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBMuMuFex.cxx deleted file mode 100644 index c402da9a5849d5dac2d407d0fa730b23761b6931..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBMuMuFex.cxx +++ /dev/null @@ -1,694 +0,0 @@ -// -*- C++ -*- - -/* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -*/ - -/************************************************************************** - ** - ** File: Trigger/TrigHypothesis/TrigBPhysHypo/TrigEFBMuMuFex.cxx - ** - ** Description: EF hypothesis algorithms for B0_s -> mu+ mu- - ** - **************************************************************************/ - -#include "TrigEFBMuMuFex.h" -#include "TrigBphysHelperUtilsTool.h" - -#include "TrigTimeAlgs/TrigTimerSvc.h" - - -// additions of xAOD objects -#include "xAODMuon/MuonContainer.h" -#include "xAODTracking/TrackParticle.h" -#include "xAODTracking/TrackParticleContainer.h" - -#include "TrigSteeringEvent/TrigRoiDescriptor.h" - - -TrigEFBMuMuFex::TrigEFBMuMuFex(const std::string & name, ISvcLocator* pSvcLocator): -HLT::ComboAlgo(name, pSvcLocator) -,m_bphysHelperTool("TrigBphysHelperUtilsTool") -,m_BmmHypTot(0),m_BmmHypVtx(0) -,m_expectNumberOfInputTE(2) -,m_massMuon(105.6583715) -,m_muonParticleType(xAOD::Muon::InnerDetectorTrackParticle) -,m_oppositeCharge(true) -,m_sameCharge(false) -,m_lowerMassCut(1000) -,m_upperMassCut(1e6) -,m_ApplyupperMassCut(false) -,m_muonAlgo("TrigMuSuperEF") -,m_SAMuonLabel("MuonEFInfo_ExtrapTrackParticles") -,m_acceptAll(false) -,m_noId(false) -,m_useCombinedTP(false) -,m_considerSameRoiCombinations(true) -//Counters -,m_lastEvent(0) -,m_lastEventPassed(0) -,m_vtxpass(false) -,m_PassedBsMass(false) -,m_countTotalEvents(0) -,m_countTotalRoI(0) -,m_countPassedEvents(0) -,m_countPassedRoIs(0) -,m_countPassedmumuPairsEv(0) -,m_countPassedBsMassEv(0) -,m_countPassedVtxFitEv(0) -,m_countPassedmumuPairs2R(0) -,m_countPassedBsMass2R(0) -,m_countPassedVtxFit2R(0) -{ - declareProperty("TrigBphysHelperTool", m_bphysHelperTool); - - // Read cuts - declareProperty("NumberOfInputs",m_expectNumberOfInputTE = 2); // expect two muons by default - declareProperty("UseRoIs",m_useRoIs = true); // expect two muons by default - - declareProperty("AcceptAll", m_acceptAll=true); - declareProperty("OppositeSign", m_oppositeCharge=true); - declareProperty("SameSign", m_sameCharge=false); - declareProperty("LowerMassCut", m_lowerMassCut=2000.0); - declareProperty("UpperMassCut", m_upperMassCut=10000.0); - declareProperty("ApplyUpperMassCut", m_ApplyupperMassCut=true); - declareProperty("MuonAlgo" , m_muonAlgo="TrigMuSuperEF"); - declareProperty("ExtrapolatedTrackParticleContName", m_SAMuonLabel="MuonEFInfo_ExtrapTrackParticles"); - declareProperty("noId" , m_noId = false); - declareProperty("UseCombinedMuonParameters", m_useCombinedTP = false); - declareProperty("ConsiderSameRoiCombinations", m_considerSameRoiCombinations = true); - // - declareMonitoredStdContainer("Errors", m_mon_Errors, AutoClear); - declareMonitoredStdContainer("Acceptance", m_mon_Acceptance, AutoClear); - declareMonitoredVariable("DeltaEtaRoIs", m_mon_dEtaRoI ); - declareMonitoredVariable("DeltaPhiRoIs", m_mon_dPhiRoI ); - declareMonitoredVariable("DeltaEtaMuMu", m_mon_dEtaMuMu ); - declareMonitoredVariable("DeltaPhiMuMu", m_mon_dPhiMuMu ); - declareMonitoredVariable("pTsumMuMu", m_mon_pTsum ); - declareMonitoredVariable("pTMu1", m_mon_mu1pT ); - declareMonitoredVariable("pTMu2", m_mon_mu2pT ); - declareMonitoredVariable("etaMu1", m_mon_mu1eta ); - declareMonitoredVariable("etaMu2", m_mon_mu2eta ); - declareMonitoredVariable("phiMu1", m_mon_mu1phi ); - declareMonitoredVariable("phiMu2", m_mon_mu2phi ); - declareMonitoredVariable("MuMumass", m_mon_MuMumass ); - declareMonitoredVariable("BmassFit", m_mon_BmassFit ); - declareMonitoredVariable("VtxChi2", m_mon_Chi2 ); - -} - -TrigEFBMuMuFex::~TrigEFBMuMuFex() -{ } - -HLT::ErrorCode TrigEFBMuMuFex::hltInitialize() -{ - ATH_MSG_DEBUG("Initialization ..." ); - ATH_MSG_DEBUG("AcceptAll = " << (m_acceptAll==true ? "True" : "False") ); - ATH_MSG_DEBUG("noId = " << (m_noId==true ? "True" : "False") ); - ATH_MSG_DEBUG("OppositeCharge = " << (m_oppositeCharge==true ? "True" : "False") ); - ATH_MSG_DEBUG("SameCharge = " << (m_sameCharge==true ? "True" : "False") ); - ATH_MSG_DEBUG("LowerMassCut = " << m_lowerMassCut ); - ATH_MSG_DEBUG("UpperMassCut = " << m_upperMassCut ); - ATH_MSG_DEBUG("ApplyUpperMassCut = " << m_ApplyupperMassCut ); - - if ( timerSvc() ) { - m_BmmHypTot = addTimer("EFBmmHypTot"); - m_BmmHypVtx = addTimer("EFBmmHypVtxFit"); - } - - // Consistency check of charge requirements - if( m_oppositeCharge && m_sameCharge ) { - ATH_MSG_ERROR("Bad configuration: OppositeCharge and SameCharge are required together" ); - return HLT::BAD_JOB_SETUP; - } - - if (m_muonAlgo != "TrigMuSuperEF" ) { - ATH_MSG_INFO(" Expected algorithm name: TrigMuSuperEF, but got: " << m_muonAlgo ); - return HLT::BAD_JOB_SETUP; - } - - // which muon TP information do we want - m_muonParticleType = (m_useCombinedTP ? xAOD::Muon::CombinedTrackParticle : xAOD::Muon::InnerDetectorTrackParticle); - ATH_MSG_INFO(" Using Muon TrackParameter information from: " << (m_useCombinedTP ? "CombinedTrackParticle" : "InnerDetectorTrackParticle") ); - - if (m_bphysHelperTool.retrieve().isFailure()) { - ATH_MSG_ERROR("Can't find TrigBphysHelperUtilsTool" ); - return HLT::BAD_JOB_SETUP; - } else { - ATH_MSG_DEBUG("TrigBphysHelperUtilsTool found" ); - } - - - m_mon_dEtaRoI = -10.; - m_mon_dPhiRoI = -10.; - m_mon_dEtaMuMu = -10.; - m_mon_dPhiMuMu = -10.; - m_mon_pTsum = -10.; - m_mon_mu1pT = -10.; - m_mon_mu2pT = -10.; - m_mon_mu1eta = -10.; - m_mon_mu2eta = -10.; - m_mon_mu1phi = -10.; - m_mon_mu2phi = -10.; - m_mon_MuMumass = -1.; - m_mon_BmassFit = -1; - m_mon_Chi2 = -1.; - - // counters - m_lastEvent=-1; - m_lastEventPassed=-1; - m_countTotalEvents=0; - m_countTotalRoI=0; - m_countPassedEvents=0; - m_countPassedRoIs=0; - m_countPassedmumuPairsEv=0; - m_countPassedBsMassEv=0; - m_countPassedVtxFitEv=0; - m_countPassedmumuPairs2R=0; - m_countPassedBsMass2R=0; - m_countPassedVtxFit2R=0; - - - return HLT::OK; -} - -HLT::ErrorCode TrigEFBMuMuFex::hltFinalize() -{ - ATH_MSG_INFO("in finalize()" ); - ATH_MSG_INFO("|----------------------- SUMMARY FROM TrigEFBMuMuFex -------------|" ); - ATH_MSG_INFO("Run on events/2xRoIs " << m_countTotalEvents << "/" << m_countTotalRoI ); - ATH_MSG_INFO("Passed events/2xRoIs " << m_countPassedEvents << "/" << m_countPassedRoIs ); - ATH_MSG_INFO("Passed MuMu pairs:events/2xRoIs " << m_countPassedmumuPairsEv<<"/"<<m_countPassedmumuPairs2R ); - ATH_MSG_INFO("Passed BsMass: events/2xRoIs "<< m_countPassedBsMassEv<<"/"<<m_countPassedBsMass2R); - ATH_MSG_INFO("Passed Vtx Fit: events/2xRoIs "<<m_countPassedVtxFitEv<< "/"<<m_countPassedVtxFit2R); - - return HLT::OK; -} - -// Define the bins for error-monitoring histogram -#define ERROR_No_EventInfo 0 -#define ERROR_Not_2_Input_TE 1 -#define ERROR_No_RoI_1 2 -#define ERROR_No_RoI_2 3 -#define ERROR_MuonFeature_Fails 4 -// #define ERROR_Mu1_not_Combined 4 -// #define ERROR_Mu1_not_Standalone 5 -// #define ERROR_Mu1_Standalone_Invalid 6 -// #define ERROR_Mu2_not_Combined 7 -// #define ERROR_Mu2_not_Standalone 8 -// #define ERROR_Mu2_Standalone_Invalid 9 -// #define ERROR_MuMu_not_Both_Combined 10 -// #define ERROR_MuMu_not_Comb_Standalone 11 -// #define ERROR_AddTrack_Fails 12 -// #define ERROR_CalcInvMass_Fails 13 -// #define ERROR_CalcMother_Fails 14 -// #define ERROR_CalcMassPull_Fails 15 -#define ERROR_BphysColl_Fails 5 - -// Define the bins for acceptance-monitoring histogram -#define ACCEPT_Input 0 -#define ACCEPT_Got_RoIs 1 -#define ACCEPT_Mu1 2 -#define ACCEPT_Mu2 3 -#define ACCEPT_MuMu 4 -#define ACCEPT_MuMu_Unique 5 -#define ACCEPT_Opp_Charge 6 -#define ACCEPT_Dimuon_Built 7 -#define ACCEPT_InvMass_Cut 8 -// Separator 9 -#define ACCEPT_BphysColl_not_Empty 10 - - -//------------------------------------------------------------------------------------- -HLT::ErrorCode TrigEFBMuMuFex::acceptInputs(HLT::TEConstVec& inputTE, bool& pass) { - - ATH_MSG_DEBUG("Running TrigEFBMuMuFex::acceptInputs" ); - if (m_resultsHolder.size()) { - ATH_MSG_WARNING("Why is m_resultsHolder not empty!" ); - } - m_resultsHolder.clear(); // make sure vector is cleared - - m_vtxpass=false; - bool mumuIDpass=false; - m_PassedBsMass=false; - m_mon_dEtaRoI = -10.; - m_mon_dPhiRoI = -10.; - m_mon_dEtaMuMu = -10.; - m_mon_dPhiMuMu = -10.; - m_mon_pTsum = -10.; - m_mon_mu1pT = -10.; - m_mon_mu2pT = -10.; - m_mon_mu1eta = -10.; - m_mon_mu2eta = -10.; - m_mon_mu1phi = -10.; - m_mon_mu2phi = -10.; - m_mon_MuMumass = -1.; - m_mon_BmassFit = -1; - m_mon_Chi2 = -1.; - if ( timerSvc() ) m_BmmHypTot->start(); - - m_mon_Acceptance.push_back( ACCEPT_Input ); - - - // check the right number of inputTEs - // if !m_useRoIs -- allow +1 number of TEs, for nscan chains - if (m_expectNumberOfInputTE != inputTE.size() && (m_useRoIs || m_expectNumberOfInputTE != inputTE.size()-1) ) { - ATH_MSG_ERROR("Got different than " << m_expectNumberOfInputTE << " number of input TEs, found " << inputTE.size() ); - m_mon_Errors.push_back( ERROR_Not_2_Input_TE ); - if ( timerSvc() ) m_BmmHypTot->stop(); - return HLT::BAD_JOB_SETUP; - } else { - ATH_MSG_DEBUG("Found Expected " << m_expectNumberOfInputTE << " inputTEs" ); - } - // event info - uint32_t runNumber(0), evtNumber(0), lbBlock(0); - if (m_bphysHelperTool->getRunEvtLb( runNumber, evtNumber, lbBlock).isFailure()) { - ATH_MSG_ERROR("Error retriving EventInfo" ); - } - - // get the TrigRoiDescriptors - if(m_useRoIs) { - std::vector<const TrigRoiDescriptor*> vecTrigRoiDescriptor(m_expectNumberOfInputTE); - for (unsigned int i =0; i < m_expectNumberOfInputTE; ++i) { - if ( getFeature(inputTE[i], vecTrigRoiDescriptor[i]) != HLT::OK ) { - ATH_MSG_ERROR("Navigation error while getting RoI descriptor " << i ); - if ( timerSvc() ) m_BmmHypTot->stop(); - if ( !i ) m_mon_Errors.push_back( ERROR_No_RoI_1 ); - else m_mon_Errors.push_back( ERROR_No_RoI_2 ); - return HLT::NAV_ERROR; - } - if (vecTrigRoiDescriptor[i] == nullptr) { - ATH_MSG_ERROR("Navigation error while getting RoI descriptor " << i << " (retrieved null pointer)" ); - if ( timerSvc() ) m_BmmHypTot->stop(); - if ( !i ) m_mon_Errors.push_back( ERROR_No_RoI_1 ); - else m_mon_Errors.push_back( ERROR_No_RoI_2 ); - return HLT::NAV_ERROR; - } - } // for - - m_mon_Acceptance.push_back( ACCEPT_Got_RoIs ); - - const TrigRoiDescriptor* roi1(vecTrigRoiDescriptor[0]), *roi2(vecTrigRoiDescriptor[1]); - // debug for ROI info - ATH_MSG_DEBUG("Using inputTEs: "<< inputTE.front() << " and " << inputTE.back() << " with Ids " << inputTE.front()->getId()<<" AND "<<inputTE.back()->getId() - << "; RoI IDs = " << roi1->roiId()<<" AND "<<roi2->roiId() << ": Eta1 = " << roi1->eta()<<" Eta2= "<<roi2->eta() - << ", Phi1 = " << roi1->phi()<<" Phi2= "<<roi2->phi()); - m_mon_dEtaRoI = m_bphysHelperTool->absDeltaEta(roi1->eta(), roi2->eta()); - m_mon_dPhiRoI = m_bphysHelperTool->absDeltaPhi(roi1->phi(), roi2->phi()); - } - else { - ATH_MSG_DEBUG("Not using input TrigRoiDescriptors. For nscan chains." ); - } - - typedef ElementLinkVector<xAOD::MuonContainer> ELVMuons; - typedef ElementLinkVector<xAOD::TrackParticleContainer> ELVTrackParticles; - - std::vector<ELVMuons> vec_elv_muons; // for muons, - std::vector<ELVTrackParticles> vec_elv_tps; // for tp - const Amg::Vector3D beamspot = m_bphysHelperTool->getBeamSpot(Gaudi::Hive::currentContext()); - - for ( unsigned int i=0; i < m_expectNumberOfInputTE; ++i) { - ELVMuons elvmuon; - ATH_MSG_DEBUG("Try to retrieve EFInfo container of muon " << i ); - if(getFeaturesLinks<xAOD::MuonContainer,xAOD::MuonContainer>(inputTE[i], elvmuon)!=HLT::OK ) { - ATH_MSG_DEBUG("Failed to get EFInfo feature of muon " << i << ", exiting" ); - m_mon_Errors.push_back( ERROR_MuonFeature_Fails ); - return HLT::MISSING_FEATURE; // was HLT::OK - } - ATH_MSG_DEBUG("Found MuonContainer, Got MuonEF " << i << " Feature, size = " << elvmuon.size() ); - vec_elv_muons.push_back(elvmuon); - }// for loop over muon rois - - // print debug info - if(msgLvl() <= MSG::DEBUG) { - int ic(0); - for ( const auto& muelv : vec_elv_muons) { - // loop over the vector of muon containers - msg() << MSG::DEBUG << "MuonContainer, Got MuonEF " << ic << " Feature, size = " << muelv.size() << endmsg; - int i(0); - for ( const ElementLink<xAOD::MuonContainer> muel: muelv) { - msg() << MSG::DEBUG << "ELLink: " << i++ - << " index: " << muel.index() - << " sgkey: " << muel.dataID() - << " hashkey: "<< muel.key() - << " valid: " << muel.isValid() - << " ptr: " << (muel.isValid() ? *muel : nullptr) - << endmsg; - if (!muel.isValid()) {continue;} - msg() << MSG::DEBUG << "Muon: " << i - << " pt: " << (*muel)->pt() - << " eta: " << (*muel)->eta() - << " phi: " << (*muel)->phi() - << " q: " << (*muel)->charge() - << " mutype: " << (*muel)->muonType() - << " author: " << (*muel)->author() - << " id/ms/cb: " << (*muel)->trackParticle(xAOD::Muon::InnerDetectorTrackParticle) - << " " << (*muel)->trackParticle(xAOD::Muon::MuonSpectrometerTrackParticle) - << " " << (*muel)->trackParticle(xAOD::Muon::CombinedTrackParticle) - << endmsg; - } // for - // http://acode-browser.usatlas.bnl.gov/lxr/source/atlas/Event/xAOD/xAODMuon/xAODMuon/versions/Muon_v1.h - ++ic; - } // for muons - ic =0; - for ( const auto& tpelv : vec_elv_tps) { - msg() << MSG::DEBUG << "SATrackParticleContainer, Got MUSA " << ic << " Feature, size = " << tpelv.size() << endmsg; - int i(0); - for ( const ElementLink<xAOD::TrackParticleContainer> tpel: tpelv) { - msg() << MSG::DEBUG << "ELLink: " << i++ - << " index: " << tpel.index() - << " sgkey: " << tpel.dataID() - << " hashkey: "<< tpel.key() - << " valid: " << tpel.isValid() - << " ptr: " << (tpel.isValid() ? *tpel : nullptr) - << endmsg; - } // fo tps - } // for - } // if debug - - - // for each of the two roi's make muons selection (not roi2 has m_noID complexity) - std::vector<const xAOD::Muon*> muons0, muons1, muonsAll; - for (const ElementLink<xAOD::MuonContainer> muel: vec_elv_muons[0]){ - if ( (*muel)->muonType() != xAOD::Muon::Combined && (*muel)->muonType() != xAOD::Muon::SegmentTagged) { - ATH_MSG_DEBUG("Muon from roi1 is neither Combined or SegmentTagged - reject" ); - continue; - } - m_mon_Acceptance.push_back( ACCEPT_Mu1 ); - m_bphysHelperTool->addUnique(*muel, muons0,0.005,0.005,10, m_muonParticleType); - m_bphysHelperTool->addUnique(*muel, muonsAll,0.005,0.005,10, m_muonParticleType); - } // roi1 - if(vec_elv_muons.size() > 1) { - for (const ElementLink<xAOD::MuonContainer> muel: vec_elv_muons[1]){ - // special case if noId set - if (m_noId) { - // no check needed for the noID - /* - if ( (*muel)->muonType() != xAOD::Muon::MuonStandAlone) { - ATH_MSG_DEBUG("noID set and Muon from roi2 is not StandAlone - reject" ); - continue; - } - */ - } else { - if ( (*muel)->muonType() != xAOD::Muon::Combined && (*muel)->muonType() != xAOD::Muon::SegmentTagged) { - ATH_MSG_DEBUG("noID not set and Muon from roi2 is neither Combined or SegmentTagged - reject" ); - continue; - } - } // if noid - m_mon_Acceptance.push_back( ACCEPT_Mu2 ); - m_bphysHelperTool->addUnique(*muel, muons1,0.005,0.005,10, (!m_noId ? m_muonParticleType : xAOD::Muon::MuonSpectrometerTrackParticle)); - m_bphysHelperTool->addUnique(*muel, muonsAll,0.005,0.005,10, (!m_noId ? m_muonParticleType : xAOD::Muon::MuonSpectrometerTrackParticle)); - } // roi2 - } - - - ATH_MSG_DEBUG("Muons in roi1: " << muons0.size() << ", roi2: " << muons1.size() ); - if ( muonsAll.size()) mumuIDpass = true; - - - if (m_noId || !m_considerSameRoiCombinations) { - std::vector<const xAOD::Muon*>::const_iterator itmu0 = muons0.begin(); - std::vector<const xAOD::Muon*>::const_iterator itmu0_end = muons0.end(); - std::vector<const xAOD::Muon*>::const_iterator itmu1 = muons1.begin(); - std::vector<const xAOD::Muon*>::const_iterator itmu1_end = muons1.end(); - - for (; itmu0 != itmu0_end; ++itmu0) { - const xAOD::Muon* mu0 = *itmu0; - if (!mu0) continue; - for (; itmu1 != itmu1_end; ++itmu1) { - const xAOD::Muon* mu1 = *itmu1; - if (!mu1) continue; - if (mu0 == mu1) continue; // avoid same pointers (shouldn't happen?) - //unsightly hack to add the muon element links: - auto nresults = m_resultsHolder.size(); - buildCombination(mu0,mu1,beamspot); // Main method to build the muons - auto nresults_new = m_resultsHolder.size(); - if (nresults == nresults_new) continue; // no new - // if here then append muons to the objects - xAOD::TrigBphys * bphys = m_resultsHolder.back(); - ElementLink<xAOD::IParticleContainer> ptl1EL,ptl2EL; - bool foundMu0(false), foundMu1(false); - for ( const ElementLink<xAOD::MuonContainer> muel: vec_elv_muons[0] ) { - if ( *muel == mu0) { - ptl1EL.resetWithKeyAndIndex(muel.dataID(),muel.index()); - foundMu0 = true; - } - if ( *muel == mu1) { - ptl2EL.resetWithKeyAndIndex(muel.dataID(),muel.index()); - foundMu1 = true; - } - if (foundMu0 && foundMu1) break; // found both links - } - if(vec_elv_muons.size() > 1) { - for ( const ElementLink<xAOD::MuonContainer> muel: vec_elv_muons[1] ) { - if ( *muel == mu0) { - ptl1EL.resetWithKeyAndIndex(muel.dataID(),muel.index()); - foundMu0 = true; - } - if ( *muel == mu1) { - ptl2EL.resetWithKeyAndIndex(muel.dataID(),muel.index()); - foundMu1 = true; - } - if (foundMu0 && foundMu1) break; // found both links - } - } - - bphys->addParticleLink(ptl1EL); // - bphys->addParticleLink(ptl2EL); // - - - } // itmu1 - } // itmu0 - } // noId - else { - // use combined muons, and avoid double counting - std::vector<const xAOD::Muon*>::const_iterator itmu0 = muonsAll.begin(); - std::vector<const xAOD::Muon*>::const_iterator itmu1 = muonsAll.begin(); - std::vector<const xAOD::Muon*>::const_iterator itmu_end = muonsAll.end(); - for (; itmu0 != itmu_end; ++itmu0) { - const xAOD::Muon* mu0 = *itmu0; - if (!mu0) continue; - for (itmu1 = itmu0+1; itmu1 != itmu_end; ++itmu1) { - const xAOD::Muon* mu1 = *itmu1; - if (!mu1) continue; - if (mu0 == mu1) continue; // avoid same pointers (shouldn't happen?) - //unsightly hack to add the muon element links: - auto nresults = m_resultsHolder.size(); - buildCombination(mu0,mu1,beamspot); // Main method to build the muons - auto nresults_new = m_resultsHolder.size(); - if (nresults == nresults_new) continue; // no new - // if here then append muons to the objects - xAOD::TrigBphys * bphys = m_resultsHolder.back(); - ElementLink<xAOD::IParticleContainer> ptl1EL,ptl2EL; - bool foundMu0(false), foundMu1(false); - for ( const ElementLink<xAOD::MuonContainer> muel: vec_elv_muons[0] ) { - if ( *muel == mu0) { - ptl1EL.resetWithKeyAndIndex(muel.dataID(),muel.index()); - foundMu0 = true; - } - if ( *muel == mu1) { - ptl2EL.resetWithKeyAndIndex(muel.dataID(),muel.index()); - foundMu1 = true; - } - if (foundMu0 && foundMu1) break; // found both links - } - if(vec_elv_muons.size() > 1) { - for ( const ElementLink<xAOD::MuonContainer> muel: vec_elv_muons[1] ) { - if ( *muel == mu0) { - ptl1EL.resetWithKeyAndIndex(muel.dataID(),muel.index()); - foundMu0 = true; - } - if ( *muel == mu1) { - ptl2EL.resetWithKeyAndIndex(muel.dataID(),muel.index()); - foundMu1 = true; - } - if (foundMu0 && foundMu1) break; // found both links - } - } - - bphys->addParticleLink(ptl1EL); // - bphys->addParticleLink(ptl2EL); // - } // mu1 - } //mu0 - } // !m_noId - - // if (m_noId || !m_considerSameRoiCombinations) { - // buildCombinations(muons0,muons1); // treat each RoI separately here - // } else { - // // both good muons, and treat them all together - // buildCombinations(muonsAll); - // - // } - // - // // if set, also look at same roi combinations - // if (m_considerSameRoiCombinations && (muons0.size() >1 || muons1.size() >1 )) { - // ATH_MSG_DEBUG("Looking now at Same-ROI combinations"); - // ATH_MSG_DEBUG(" muons0: muons0"); - // buildCombinations(muons0,muons0); - // ATH_MSG_DEBUG(" muons1: muons1"); - // buildCombinations(muons1,muons1); - // ATH_MSG_DEBUG("Finished looking at Same-ROI combinations"); - // } // if - - - if (evtNumber != m_lastEvent) { - m_countTotalEvents++; - m_lastEvent=evtNumber; - } - m_countTotalRoI++; - - pass = true; // carry on with processing - - if(m_vtxpass) m_countPassedVtxFit2R++; - if(mumuIDpass) m_countPassedmumuPairs2R++; - if (m_PassedBsMass) m_countPassedBsMass2R++; - m_countPassedRoIs++; - if(evtNumber != m_lastEventPassed) { - m_countPassedEvents++; - m_lastEventPassed = evtNumber; - if(m_vtxpass) m_countPassedVtxFitEv++; - if(mumuIDpass) m_countPassedmumuPairsEv++; - if (m_PassedBsMass) m_countPassedBsMassEv++; - } - if ( timerSvc() ) m_BmmHypTot->stop(); - return HLT::OK; -} - -void TrigEFBMuMuFex::buildCombination(const xAOD::Muon *mu0, const xAOD::Muon *mu1, const Amg::Vector3D& beamSpot) { - if (!mu0 || !mu1) return; - if ( mu0 == mu1) { - ATH_MSG_DEBUG("Same Muon pointers" ); - return; - } - const ElementLink< xAOD::TrackParticleContainer > & tpel0 = mu0->trackParticleLink( m_muonParticleType); - const ElementLink< xAOD::TrackParticleContainer > & tpel1 = mu1->trackParticleLink( m_noId ? - xAOD::Muon::MuonSpectrometerTrackParticle : - m_muonParticleType); - - m_mon_Acceptance.push_back( ACCEPT_MuMu ); - if(msgLvl() <= MSG::DEBUG) { - ATH_MSG_DEBUG("Track1 from muon: " << m_muonParticleType << " " << tpel0.isValid() << " " << ( tpel0.dataID() == "" ? "<empty string>" : tpel0.dataID()) << " " << tpel0.index() ); - ATH_MSG_DEBUG("Track2 from muon: " << (m_noId? "noid" :"id") << " " << tpel1.isValid() << " " << ( tpel1.dataID() == "" ? "<empty string>" : tpel1.dataID()) << " " << tpel1.index() ); - } // end debug - - const xAOD::TrackParticle* tp0 = mu0->trackParticle(m_muonParticleType); - const xAOD::TrackParticle* tp1 = mu1->trackParticle(m_noId ? xAOD::Muon::MuonSpectrometerTrackParticle : m_muonParticleType); - if (!tp0) return; - if (!tp1) return; - if (tp0 == tp1) { - ATH_MSG_DEBUG("Same xAOD::TrackParticle pointers" ); - return; - } // if tracks the same - - if ( !m_bphysHelperTool->areUnique(tp0,tp1, 0.005,0.005,10)) { - ATH_MSG_DEBUG("Reject tracks as failed uniqueness test: " ); - return; - } // track uniqueness - m_mon_Acceptance.push_back( ACCEPT_MuMu_Unique ); - // opposite charge requirement - ATH_MSG_VERBOSE("Charges combination: " << mu0 << ": " << mu0->charge() << " " << tp0->qOverP() << " " << tp0->charge() - << " , " << mu1 << ": " << mu1->charge() << " " << tp1->qOverP() << " " << tp1->charge()); - - if (m_oppositeCharge && (tp0->charge() * tp1->charge() > 0)) { - ATH_MSG_DEBUG("Reject permutation due to opposite charge requirement: " << mu0->charge() << " " << mu1->charge() ); - return; - }// opposite charge - if (m_sameCharge && (tp0->charge() * tp1->charge() < 0)) { - ATH_MSG_DEBUG("Reject permutation due to same charge requirement: " << mu0->charge() << " " << mu1->charge() ); - return; - }// same charge - m_mon_Acceptance.push_back( ACCEPT_Opp_Charge ); - - // Fill monitoring histograms for muons - m_mon_mu1eta = mu0->eta(); m_mon_mu2eta = mu1->eta(); - m_mon_mu1phi = mu0->phi(); m_mon_mu2phi = mu1->phi(); - m_mon_mu1pT = mu0->pt()*0.001; m_mon_mu2pT = mu1->pt()*0.001; - m_mon_dEtaMuMu = m_bphysHelperTool->absDeltaEta(m_mon_mu1eta, m_mon_mu2eta); - m_mon_dPhiMuMu = m_bphysHelperTool->absDeltaPhi(m_mon_mu1phi, m_mon_mu2phi); - m_mon_pTsum = m_mon_mu1pT + m_mon_mu2pT; - - // simple mass - double tp_mass = m_bphysHelperTool->invariantMass(tp0,tp1,m_massMuon,m_massMuon); - ATH_MSG_DEBUG("Mass combination: " << tp_mass ); - - xAOD::TrigBphys* result(0); - ATH_MSG_DEBUG("Calling fitting code:" ); - - if (m_bphysHelperTool->buildDiMu({tpel0,tpel1}, result, xAOD::TrigBphys::BMUMU, xAOD::TrigBphys::EF).isFailure() || !result) { - ATH_MSG_DEBUG("Problem with Fit code" ); - } - m_bphysHelperTool->setBeamlineDisplacement(result,{tp0,tp1}, beamSpot); - - if (result) { - m_mon_Acceptance.push_back( ACCEPT_Dimuon_Built ); - ATH_MSG_DEBUG("Including result" ); - double massMuMu = result->mass(); - - // apply loosened mass cut here to avoid too large containers - if(massMuMu < m_lowerMassCut - 5000.) { - ATH_MSG_DEBUG("Reject due to lower mass cut" ); - delete result; - return; - } - if(m_ApplyupperMassCut && massMuMu > m_upperMassCut + 5000.) { - ATH_MSG_DEBUG("Reject due to upper mass cut" ); - delete result; - return; - } - - m_resultsHolder.push_back(result); - m_mon_MuMumass = massMuMu * 0.001; - m_mon_BmassFit = result->fitmass() * 0.001; - m_mon_Chi2 = result->fitchi2(); - m_vtxpass = true; // may not be strictly true now, if vx was null (maybe use chi2 / ndf value as a test?) - if(m_lowerMassCut < massMuMu && ((massMuMu < m_upperMassCut) || (!m_ApplyupperMassCut) )) { - m_mon_Acceptance.push_back( ACCEPT_InvMass_Cut ); - m_PassedBsMass = true; - } - - - } else { - // no valid output - ATH_MSG_DEBUG("No result found" ); - } - - -} - - - -HLT::ErrorCode TrigEFBMuMuFex::hltExecute(HLT::TEConstVec&, HLT::TriggerElement* outputTE) -{ - ATH_MSG_DEBUG(" In TrigEFBMuMu hltExecute" ); - - xAOD::TrigBphysContainer * xAODTrigBphysColl = new xAOD::TrigBphysContainer; - xAOD::TrigBphysAuxContainer xAODTrigBphysAuxColl; - xAODTrigBphysColl->setStore(&xAODTrigBphysAuxColl); - - // move results across to final area - for ( auto xaodobj : m_resultsHolder) { - xAODTrigBphysColl->push_back( xaodobj ); - } - m_resultsHolder.clear(); - - - if (xAODTrigBphysColl && xAODTrigBphysColl->size()) { - ATH_MSG_DEBUG("REGTEST: Store Bphys Collection size: " << xAODTrigBphysColl->size() ); - m_mon_Acceptance.push_back( ACCEPT_BphysColl_not_Empty ); - - HLT::ErrorCode sc = attachFeature(outputTE, xAODTrigBphysColl, "EFBMuMuFex" ); - if(sc != HLT::OK) { - ATH_MSG_WARNING("Failed to store trigBphys Collection" ); - delete xAODTrigBphysColl; xAODTrigBphysColl = nullptr; // assume deletion responsibility - m_mon_Errors.push_back( ERROR_BphysColl_Fails ); - return HLT::ERROR; - } - } else { - ATH_MSG_DEBUG("REGTEST: no bphys collection to store " ); - delete xAODTrigBphysColl; xAODTrigBphysColl = nullptr; - } - - return HLT::OK; -} - - diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBMuMuFex.h b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBMuMuFex.h deleted file mode 100644 index 394e87a74198454d05637d3d73459a2f15973468..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBMuMuFex.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/************************************************************************** - ** - ** File: Trigger/TrigHypothesis/TrigBphysHypo/TrigEFBMuMuFex.h - ** - ** Description: EF hypothesis algorithms for B0_s -> mu+ mu- - ** Currently a dummy algorithm - ** - ** Author: J.Kirk - ** - ** Created: 12.09.07 - ** Modified: - ** - **************************************************************************/ - -#ifndef TRIG_TrigEFBMuMuFex_H -#define TRIG_TrigEFBMuMuFex_H - -// standard stuff -#include <string> -// general athena stuff -//// trigger includes -#include "TrigInterfaces/ComboAlgo.h" -#include "xAODMuon/Muon.h" - -// forward includes -class TrigBphysHelperUtilsTool; -class TrigTimer; - -// class -class TrigEFBMuMuFex: public HLT::ComboAlgo { - - public: - TrigEFBMuMuFex(const std::string & name, ISvcLocator* pSvcLocator); - ~TrigEFBMuMuFex(); - HLT::ErrorCode hltInitialize(); - HLT::ErrorCode hltFinalize(); - - HLT::ErrorCode acceptInputs(HLT::TEConstVec& inputTE, bool& pass ); - HLT::ErrorCode hltExecute(HLT::TEConstVec& inputTE, HLT::TriggerElement* outputTE); - - private: - - void buildCombination(const xAOD::Muon *mu0, const xAOD::Muon *mu1, const Amg::Vector3D& beamSpot); // does the combination and calls the fitter - - ToolHandle <TrigBphysHelperUtilsTool> m_bphysHelperTool; - - std::vector<xAOD::TrigBphys*> m_resultsHolder; // transient holder for results - - TrigTimer* m_BmmHypTot, *m_BmmHypVtx; - - - unsigned int m_expectNumberOfInputTE; - bool m_useRoIs; - - double m_massMuon; - xAOD::Muon::TrackParticleType m_muonParticleType; - - bool m_oppositeCharge; - bool m_sameCharge; - float m_lowerMassCut; - float m_upperMassCut; - bool m_ApplyupperMassCut; - std::string m_muonAlgo; - std::string m_SAMuonLabel; - // to set Accept-All mode: should be done with force-accept when possible - bool m_acceptAll; - bool m_noId; // use SA muon tracks in second roi - bool m_useCombinedTP; // use ID-only or Combined muon info - bool m_considerSameRoiCombinations; // look also at muon pairs within same roi - - //Monitored variables - std::vector<int> m_mon_Errors; - std::vector<int> m_mon_Acceptance; - double m_mon_dEtaRoI; - double m_mon_dPhiRoI; - double m_mon_dEtaMuMu; - double m_mon_dPhiMuMu; - double m_mon_pTsum; - double m_mon_mu1pT; - double m_mon_mu2pT; - double m_mon_mu1eta; - double m_mon_mu2eta; - double m_mon_mu1phi; - double m_mon_mu2phi; - double m_mon_MuMumass; - double m_mon_BmassFit; - double m_mon_Chi2; - - //Counters - uint32_t m_lastEvent; - uint32_t m_lastEventPassed; - bool m_vtxpass, m_PassedBsMass; - unsigned int m_countTotalEvents; - unsigned int m_countTotalRoI; - unsigned int m_countPassedEvents; - unsigned int m_countPassedRoIs; - unsigned int m_countPassedmumuPairsEv; - unsigned int m_countPassedBsMassEv; - unsigned int m_countPassedVtxFitEv; - unsigned int m_countPassedmumuPairs2R; - unsigned int m_countPassedBsMass2R; - unsigned int m_countPassedVtxFit2R; - - -}; - - -#endif diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBMuMuHypo.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBMuMuHypo.cxx deleted file mode 100644 index 76bdfc96cee05d0546b4369b35493fcc0e7ebd32..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBMuMuHypo.cxx +++ /dev/null @@ -1,337 +0,0 @@ -// -*- C++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/************************************************************************** - ** - ** File: Trigger/TrigHypothesis/TrigBPhysHypo/TrigEFBMuMuHypo.cxx - ** - ** Description: EF hypothesis algorithms for B0_s -> mu+ mu- - ** Dummy algo for now - ** - ** Author: S.Sivoklokov (on the base of Carlo Schiavi example) - ** - ** Created: 12.09.07 - ** Modified: - ** - **************************************************************************/ - -#include "TrigEFBMuMuHypo.h" - -#include <math.h> -#include "xAODTrigger/TrigPassBits.h" - - -// additions of xAOD objects -#include "xAODEventInfo/EventInfo.h" -#include "xAODTracking/TrackParticle.h" -#include "xAODTrigBphys/TrigBphys.h" -#include "xAODTrigBphys/TrigBphysContainer.h" - -class ISvcLocator; - -TrigEFBMuMuHypo::TrigEFBMuMuHypo(const std::string & name, ISvcLocator* pSvcLocator): - HLT::HypoAlgo(name, pSvcLocator) -// counters -,m_lastEvent(-1) -,m_lastEventPassed(-1) -,m_countTotalEvents(0) -,m_countTotalRoI(0) -,m_countPassedEvents(0) -,m_countPassedRoIs(0) -,m_countPassedBsMass(0) -,m_countPassedChi2Cut(0) -,m_countPassedLxyCut(0) -{ - - // Read cuts - - declareProperty("AcceptAll", m_acceptAll=true); - declareProperty("OppositeSign", m_oppositeCharge=true); - declareProperty("LowerMassCut", m_lowerMassCut=4000.0); - declareProperty("UpperMassCut", m_upperMassCut=6000.0); - declareProperty("ApplyUpperMassCut", m_ApplyupperMassCut=true); - declareProperty("ApplyChi2Cut", m_ApplyChi2Cut=true); - declareProperty("Chi2VtxCut", m_Chi2VtxCut=20.0); - - declareProperty("ApplyLxyCut", m_ApplyLxyCut=false); - declareProperty("LxyCut", m_LxyCut=0.0); - - declareMonitoredVariable("CutCounter", m_mon_cutCounter); - declareMonitoredVariable("MuMumass", m_mon_MuMumass ); - -} - -TrigEFBMuMuHypo::~TrigEFBMuMuHypo() -{ } - -HLT::ErrorCode TrigEFBMuMuHypo::hltInitialize() -{ - ATH_MSG_DEBUG("AcceptAll = " << (m_acceptAll==true ? "True" : "False") ); - ATH_MSG_DEBUG("OppositeCharge = " << (m_oppositeCharge==true ? "True" : "False") ); - ATH_MSG_DEBUG("LowerMassCut = " << m_lowerMassCut ); - ATH_MSG_DEBUG("UpperMassCut = " << m_upperMassCut ); - ATH_MSG_DEBUG("ApplyUpperMassCut = " << m_ApplyupperMassCut ); - - if(m_beamSpotKey.initialize().isFailure()){ - ATH_MSG_ERROR("Beamspot error"); - return HLT::BAD_JOB_SETUP; - } - - m_lastEvent = -1; - m_lastEventPassed = -1; - m_countTotalEvents =0; - m_countTotalRoI =0; - m_countPassedEvents =0; - m_countPassedRoIs =0; - m_countPassedBsMass =0; - m_countPassedChi2Cut =0; - m_countPassedLxyCut =0; - - return HLT::OK; -} - -HLT::ErrorCode TrigEFBMuMuHypo::hltFinalize() -{ - ATH_MSG_INFO("in finalize()" ); - ATH_MSG_INFO("|----------------------- SUMMARY FROM TrigEFBMuMuHypo -------------|" ); - ATH_MSG_INFO("Run on events/2xRoIs " << m_countTotalEvents << "/" << m_countTotalRoI ); - ATH_MSG_INFO("Passed events/2xRoIs " << m_countPassedEvents << "/" << m_countPassedRoIs ); - ATH_MSG_INFO("RoIs Passed BsMass: " << m_countPassedBsMass ); - ATH_MSG_INFO("RoIs Passed Chi2 cut: " << m_countPassedChi2Cut ); - ATH_MSG_INFO("RoIs Passed Lxy cut: " << m_countPassedLxyCut ); - - return HLT::OK; -} - -//------------------------------------------------------------------------------------- -HLT::ErrorCode TrigEFBMuMuHypo::hltExecute(const HLT::TriggerElement* outputTE, bool& pass) -{ - - bool PassedBsMass=false; - bool PassedChi2Cut=false; - bool PassedLxyCut=false; - bool result = false; - m_mon_cutCounter = -1; - // Retrieve event info - int IdRun = 0; - int IdEvent = 0; - - // JW - Try to get the xAOD event info - const xAOD::EventInfo *evtInfo(0); - if ( store()->retrieve(evtInfo).isFailure() ) { - ATH_MSG_WARNING("Failed to get xAOD::EventInfo " ); - }else { // found the xAOD event info - ATH_MSG_DEBUG(" Run " << evtInfo->runNumber() << " Event " << evtInfo->eventNumber() ); - IdRun = evtInfo->runNumber(); - IdEvent = evtInfo->eventNumber(); - } // get event ifo - - if (IdEvent != m_lastEvent) { - m_countTotalEvents++; - m_lastEvent=IdEvent; - } - m_countTotalRoI++; - - // Accept-All mode: temporary patch; should be done with force-accept - if (m_acceptAll) { - pass = true; - //return HLT::OK; - } - ATH_MSG_DEBUG("AcceptAll is set to : " << (m_acceptAll ? "True, taking all events " : "False, applying selection" )); - - // create vector for TrigEFBphys particles - const xAOD::TrigBphysContainer* trigBphysColl(0); - - HLT::ErrorCode status = getFeature(outputTE, trigBphysColl, "EFBMuMuFex"); - - if ( status != HLT::OK ) { - ATH_MSG_WARNING("Failed to get xAOD::TrigBphysics collection" ); - return HLT::OK; - } - - ATH_MSG_DEBUG(" Retrieved Bphys collection trigBphysColl = " << trigBphysColl ); - if ( trigBphysColl == 0 ) { - ATH_MSG_DEBUG("No Bphys particles to analyse, leaving!" ); - return HLT::OK; - } - - ATH_MSG_DEBUG("Got TrigBphys collection with " << trigBphysColl->size() - << " TrigBphys particles " ); - - // if no Bphys particles were found, just leave TrigBphysColl. empty and leave - if ( trigBphysColl->size() == 0 ) { - ATH_MSG_DEBUG("No Bphys particles to analyse, leaving!" ); - return HLT::OK; - } - -// Beam spot - SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey }; - //JW EDM HepGeom::Point3D<double> m_beamSpot_CLHEP; - Amg::Vector3D beamSpot(0.,0.,0.); - if ( !beamSpotHandle.isValid() ) { - ATH_MSG_DEBUG("Could not retrieve Beam Conditions Service. "); - } else { - beamSpot = beamSpotHandle->beamPos(); - int beamSpotBitMap = beamSpotHandle->beamStatus(); -//* Check if beam spot is from online algorithms *// - int beamSpotStatus = ((beamSpotBitMap & 0x4) == 0x4); - ATH_MSG_DEBUG(" beamSpotBitMap= "<< beamSpotBitMap<<" beamSpotStatus= "<<beamSpotStatus); -//std::cout<<" BBBBBBB: beamSpot.x()= "<< beamSpot.x()<<" beamSpot.y()= "<<beamSpot.y()<<std::endl; - } - - - m_mon_cutCounter = 0; - //TrigPassBits *bits = HLT::makeTrigPassBits(trigBphysColl); - std::unique_ptr<xAOD::TrigPassBits> xBits = xAOD::makeTrigPassBits<xAOD::TrigBphysContainer>(trigBphysColl); - - // now loop over Bphys particles to see if one passes cuts - for (xAOD::TrigBphysContainer::const_iterator bphysIter = trigBphysColl->begin(); bphysIter != trigBphysColl->end(); ++bphysIter) { - - if ((*bphysIter)->particleType() == xAOD::TrigBphys::BMUMU ) { - // if ((*bphysIter)->particleType() == TrigEFB::BMUMU ) { - - double BsMass = (*bphysIter)->mass(); - - double Dx = (*bphysIter)->fitx() - beamSpot.x(); - double Dy = (*bphysIter)->fity() - beamSpot.y(); - double BsLxy = -99999.; - - - //const ElementLinkVector<Rec::TrackParticleContainer> trackVector = (*bphysIter)->trackVector(); - //const ElementLinkVector<xAOD::TrackParticleContainer> trackVector = (*bphysIter)->trackParticleLinks(); - const std::vector<ElementLink<xAOD::TrackParticleContainer> > trackVector = (*bphysIter)->trackParticleLinks(); - - if (trackVector.size() != 0) { - ATH_MSG_DEBUG(" got track vector size: " << trackVector.size() ); - std::vector<ElementLink<xAOD::TrackParticleContainer> >::const_iterator trkIt=trackVector.begin(); - double pBx = 0, pBy=0; - for (int itrk=0 ; trkIt!= trackVector.end(); ++itrk, ++trkIt) { - // // JW EDM const Trk::MeasuredPerigee* trackPerigee=(*(*trkIt))->measuredPerigee(); - // const Trk::Perigee* trackPerigee=(*(*trkIt))->measuredPerigee(); - // ATH_MSG_VERBOSE("track, iterator, pointer " << itrk << " " << *trkIt << " " << *(*trkIt) ); - // //double phi = trackPerigee->parameters()[Trk::phi]; - // //double theta = trackPerigee->parameters()[Trk::theta]; - // pBx += trackPerigee->momentum()[Trk::px]; - // pBy += trackPerigee->momentum()[Trk::py]; - // ATH_MSG_DEBUG("track " << itrk << " px=" <<trackPerigee->momentum()[Trk::px]<< - // " py= "<< trackPerigee->momentum()[Trk::py] ); - ATH_MSG_VERBOSE("track, iterator, pointer " << itrk << " " << *trkIt << " " << *(*trkIt) ); - auto vp4 = (*(*trkIt))->p4(); - pBx += vp4.Px(); // FIXME - is there a more optimal way - pBy += vp4.Py(); - - ATH_MSG_DEBUG("track " << itrk << " px=" << (*(*trkIt))->p4().Px() << " py= "<< (*(*trkIt))->p4().Py() ); - - } // for loop - double pBt = sqrt(pBx*pBx + pBy*pBy); - - BsLxy = (pBx*Dx+pBy*Dy)/pBt; - } else { - ATH_MSG_DEBUG(" no track vector!!! " ); - } - - ATH_MSG_DEBUG("EFBphys with mass: " << BsMass <<" GeV" << " chi2 " << (*bphysIter)->fitchi2() << - " Lxy "<<BsLxy<<" lxy= "<<sqrt(Dx*Dx+Dy*Dy)); - bool thisPassedBsMass = (m_lowerMassCut < BsMass && ((BsMass < m_upperMassCut) || (!m_ApplyupperMassCut) )); - // PassedBsMass |= thisPassedBsMass; - bool thisPassedChi2Cut = ((!m_ApplyChi2Cut) || ((*bphysIter)->fitchi2() < m_Chi2VtxCut && (*bphysIter)->fitchi2() >= -1e-10) ); - // PassedChi2Cut |= thisPassedChi2Cut; - bool thisPassedLxyCut = ((!m_ApplyLxyCut) || ( BsLxy > m_LxyCut) ); - // PassedLxyCut |= thisPassedLxyCut; - - if(thisPassedBsMass){ - ATH_MSG_DEBUG("Passed mass cut " << BsMass <<" GeV" ); - } - m_mon_MuMumass = ((BsMass*0.001)); - if(thisPassedChi2Cut){ - ATH_MSG_DEBUG("Apply chi2 cut : " << m_ApplyChi2Cut << " Passed Chi2 cut < "<< m_Chi2VtxCut ); - } - if(thisPassedLxyCut){ - ATH_MSG_DEBUG("Apply Lxy cut : " << m_ApplyLxyCut << " Passed Lxy cut "<< m_LxyCut ); - } - if(!thisPassedBsMass && !thisPassedChi2Cut){ - ATH_MSG_DEBUG("Did not pass mass & chi2 cuts < "); - } - if(!thisPassedLxyCut){ - ATH_MSG_DEBUG("Did not pass Lxy cuts "<< BsLxy << " < Lxy cut "<< m_LxyCut); - } - if (thisPassedBsMass) { m_countPassedBsMass++; m_mon_cutCounter++; - if (thisPassedChi2Cut) { m_countPassedChi2Cut++; m_mon_cutCounter++; - if (thisPassedLxyCut) { m_countPassedLxyCut++; m_mon_cutCounter++; } - } - } - - if( thisPassedBsMass && thisPassedChi2Cut && thisPassedLxyCut ) - { - PassedBsMass = true; - PassedChi2Cut = true; - PassedLxyCut = true; - //HLT::markPassing(bits, *bphysIter, trigBphysColl); - xBits->markPassing((*bphysIter),trigBphysColl,true); - } - - } - - - // JK check tracks, for debugging only - /* - const ElementLinkVector<Rec::TrackParticleContainer> trackVector = (*bphysIter)->trackVector(); - if (trackVector.size() != 0) { - ATH_MSG_DEBUG(" got track vector size: " << trackVector.size() ); - } else { - if(msgLvl() <= MSG::DEBUG)ATH_MSG_DEBUG(" no track vector!!! " ); - } - ElementLinkVector<Rec::TrackParticleContainer>::const_iterator trkIt=trackVector.begin(); - for (int itrk=0 ; trkIt!= trackVector.end(); ++itrk, ++trkIt) { - const Trk::MeasuredPerigee* trackPerigee=(*(*trkIt))->measuredPerigee(); - ATH_MSG_VERBOSE("track, iterator, pointer " << itrk << " " << *trkIt << " " << *(*trkIt) ); - double phi = trackPerigee->parameters()[Trk::phi]; - double theta = trackPerigee->parameters()[Trk::theta]; - double px = trackPerigee->momentum()[Trk::px]; - double py = trackPerigee->momentum()[Trk::py]; - double pt = sqrt(px*px + py*py); - double eta = -std::log(tan(theta/2)); - - ATH_MSG_DEBUG("track " << itrk << " pt phi eta " << pt << " " << - phi << " " << eta ); - } - */ - // end JK debug printout - } - - - - /* - if (PassedBsMass) { m_countPassedBsMass++; m_mon_cutCounter++; - if (PassedChi2Cut) { m_countPassedChi2Cut++; m_mon_cutCounter++; - if (PassedLxyCut) { m_countPassedLxyCut++; m_mon_cutCounter++; } - } - } - */ - - if ( PassedBsMass && PassedChi2Cut && PassedLxyCut ) { - result = true; - } - - if (result) { - m_countPassedRoIs++; - if (IdEvent!= m_lastEventPassed) { - m_countPassedEvents++; - m_lastEventPassed=IdEvent; - } - pass=true; - } - ATH_MSG_DEBUG(" Run " << IdRun << " Event " << IdEvent << " TrigEFBMuMuHypo result : " << pass ); - // store result - //if ( attachBits(outputTE, bits) != HLT::OK ) { - // msg() << MSG::ERROR << "Problem attaching TrigPassBits! " ); - //} - if(attachFeature(outputTE, xBits.release(),"passbits") != HLT::OK){ - ATH_MSG_ERROR("Could not store TrigPassBits! "); - } - - return HLT::OK; -} diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBMuMuHypo.h b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBMuMuHypo.h deleted file mode 100644 index f8c69638592de7738bf2ac38f0ed505577df90c6..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBMuMuHypo.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/************************************************************************** - ** - ** File: Trigger/TrigHypothesis/TrigBphysHypo/TrigEFBMuMuFex.h - ** - ** Description: EF hypothesis algorithms for B0_s -> mu+ mu- - ** currently a dummy algorithm - ** - ** Author: J.Kirk - ** - ** Created: 12.09.07 - ** Modified: - ** - **************************************************************************/ - -#ifndef TRIG_TrigEFBMuMuHypo_H -#define TRIG_TrigEFBMuMuHypo_H - -// standard stuff -#include <string> -// general athena stuff -#include "TrigInterfaces/HypoAlgo.h" - -#include "BeamSpotConditionsData/BeamSpotData.h" - -class TrigEFBMuMuHypo: public HLT::HypoAlgo { - - public: - TrigEFBMuMuHypo(const std::string & name, ISvcLocator* pSvcLocator); - ~TrigEFBMuMuHypo(); - HLT::ErrorCode hltInitialize(); - //StatusCode execute(); - HLT::ErrorCode hltFinalize(); - HLT::ErrorCode hltExecute(const HLT::TriggerElement* outputTE, bool& pass); - - private: - - - // Mass window cuts - bool m_oppositeCharge; - float m_lowerMassCut; - float m_upperMassCut; - float m_LxyCut; - bool m_ApplyupperMassCut; - bool m_ApplyChi2Cut; - bool m_ApplyLxyCut; - float m_Chi2VtxCut; - - // to set Accept-All mode: should be done with force-accept when possible - bool m_acceptAll; - - - //Counters - int m_lastEvent; - int m_lastEventPassed; - unsigned int m_countTotalEvents; - unsigned int m_countTotalRoI; - unsigned int m_countPassedEvents; - unsigned int m_countPassedRoIs; - unsigned int m_countPassedBsMass; - unsigned int m_countPassedChi2Cut; - unsigned int m_countPassedLxyCut; - - - int m_mon_cutCounter; - double m_mon_MuMumass; - - SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" }; - -}; - -#endif diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBMuMuXFex.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBMuMuXFex.cxx deleted file mode 100644 index 02c4c102422bb674286d45ccc50134afa8962d60..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBMuMuXFex.cxx +++ /dev/null @@ -1,4195 +0,0 @@ -/* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -*/ - -// vim: tabstop=2:shiftwidth=2:expandtab -// -*- C++ -*-// -/************************************************************************** - ** - ** File: Trigger/TrigHypothesis/TrigBPhysHypo/TrigEFBMuMuXFex.cxx - ** - ** Description: EF hypothesis algorithms for - ** B^0_{s,d},\Lambda_b \to X \mu^+ \mu^- - ** - ** - ** Author: J.Kirk - ** Author: Semen Turchikhin <Semen.Turchikhin@cern.ch> - ** - ** Created: 12.09.2007 - ** Modified: 08.04.2012 - ** - ** Modified: 26.09.2012 : "B_c -> D_s(*) (->Phi(->K+K-) pi) mu+mu-" added (Leonid Gladilin <gladilin@mail.cern.ch>) - ** - ** 30.06.2016 : "B_c -> Dplus (->K pi pi) mu+mu-" added (Leonid Gladilin <gladilin@mail.cern.ch>) - ** : "B_c -> Dstar (->D0 (->K pi) pi) mu+mu-" added - ** : "B_c -> D0 (->K pi) mu+mu-" (pi_s lost)" added - ** - ** 30.06.2016 : Cascade fit added to 4 B_c and Lambda_b modes (Leonid Gladilin <gladilin@mail.cern.ch>) - ** - ** - ***************************************************************************/ - -#include "TrigEFBMuMuXFex.h" - - -#include <math.h> - - -#include "TrigTimeAlgs/TrigTimerSvc.h" -#include "AthenaKernel/Timeout.h" - - -// additions of xAOD objects -#include "xAODEventInfo/EventInfo.h" -#include <memory> - -/*----------------------------------------------------------------------------*/ -TrigEFBMuMuXFex::TrigEFBMuMuXFex(const std::string & name, ISvcLocator* pSvcLocator): -HLT::ComboAlgo(name, pSvcLocator) -,m_fitterSvc("Trk::TrkVKalVrtFitter/VertexFitterTool",this) -,m_bphysHelperTool("TrigBphysHelperUtilsTool") -//,m_trigBphysColl_b(NULL) -//,m_trigBphysColl_X(NULL) -,m_TrigBphysColl_b(NULL) -,m_TrigBphysColl_X(NULL) - -,m_TotTimer(0) -,m_VtxFitTimer(0) -,m_VKVFitter(0) - -// counters -,m_lastEvent(-1) -,m_lastEventPassed(-1) -,m_countTotalEvents(0) -,m_countTotalRoI(0) -,m_countPassedEvents(0) -,m_countPassedRoIs(0) - -,m_lastEventPassedBplus(-1) -,m_lastEventPassedBd(-1) -,m_lastEventPassedBs(-1) -,m_lastEventPassedLb(-1) -,m_lastEventPassedBc(-1) -,m_lastEventPassedBcDplus(-1) -,m_lastEventPassedBcDstar(-1) -,m_lastEventPassedBcD0(-1) -,m_countPassedEventsBplus(0) -,m_countPassedEventsBs(0) -,m_countPassedEventsBd(0) -,m_countPassedEventsLb(0) -,m_countPassedEventsBc(0) -,m_countPassedEventsBcDplus(0) -,m_countPassedEventsBcDstar(0) -,m_countPassedEventsBcD0(0) - -,m_countPassedMuMuID(0) -,m_countPassedMuMuOS(0) -,m_countPassedMuMuMass(0) -,m_countPassedMuMuVtx(0) -,m_countPassedMuMuVtxChi2(0) - -,m_countPassedBplusMass(0) -,m_countPassedBplusVtx(0) -,m_countPassedBplusVtxChi2(0) -,m_countBpToStore(0) - -,m_countPassedKstarMass(0) -,m_countPassedBdMass(0) -,m_countPassedKstarVtx(0) -,m_countPassedKstarVtxChi2(0) -,m_countPassedBdVtx(0) -,m_countPassedBdVtxChi2(0) -,m_countBdToStore(0) - -,m_countPassedPhi1020Mass(0) -,m_countPassedBsMass(0) -,m_countPassedPhi1020Vtx(0) -,m_countPassedPhi1020VtxChi2(0) -,m_countPassedBsVtx(0) -,m_countPassedBsVtxChi2(0) -,m_countBsToStore(0) - -,m_countPassedLambdaMass(0) -,m_countPassedLambdaVtxMass(0) -,m_countPassedLbMass(0) -,m_countPassedLbVtxMass(0) -,m_countPassedLambdaVtx(0) -,m_countPassedLambdaVtxChi2(0) -,m_countPassedLbVtx(0) -,m_countPassedLbVtxChi2(0) -,m_countPassedLbLambdaLxy(0) -,m_countLbToStore(0) - -,m_countPassedPhiDsMass(0) -,m_countPassedDsMass(0) -,m_countPassedBcMass(0) -,m_countPassedDsVtx(0) -,m_countPassedDsVtxChi2(0) -,m_countPassedBcVtx(0) -,m_countPassedBcVtxChi2(0) -,m_countPassedBcDsLxy(0) -,m_countBcToStore(0) - -,m_countPassedDplusMass(0) -,m_countPassedBcDplusMass(0) -,m_countPassedDplusVtx(0) -,m_countPassedDplusVtxChi2(0) -,m_countPassedBcDplusVtx(0) -,m_countPassedBcDplusVtxChi2(0) -,m_countPassedBcDplusLxy(0) -,m_countBcDplusToStore(0) - -,m_countPassedD0DstarMass(0) -,m_countPassedDstarMass(0) -,m_countPassedBcDstarMass(0) -,m_countPassedD0DstarVtx(0) -,m_countPassedD0DstarVtxChi2(0) -,m_countPassedBcDstarVtx(0) -,m_countPassedBcDstarVtxChi2(0) -,m_countPassedBcD0DstarLxy(0) -,m_countBcDstarToStore(0) - -,m_countPassedD0Mass(0) -,m_countPassedBcD0Mass(0) -,m_countPassedD0Vtx(0) -,m_countPassedD0VtxChi2(0) -,m_countPassedBcD0Vtx(0) -,m_countPassedBcD0VtxChi2(0) -,m_countPassedBcD0Lxy(0) -,m_countBcD0ToStore(0) -{ - declareProperty("TrigBphysHelperTool", m_bphysHelperTool); - declareProperty("VertexFitterTool", m_fitterSvc); - - declareProperty("bphysCollectionKey", m_bphysCollectionKey = "EFBMuMuXFex" ); - declareProperty("AcceptAll", m_acceptAll=true); // Should we just accept all events - - declareProperty("TrackCollection",m_input_trackCollectionKey="InDetTrigTrackingxAODCnv_Bphysics_IDTrig"); - - // sign & mass cuts - // declareProperty("CutMuonTightness", m_cutMuon = 0.01); // default = 0.01 - declareProperty("OppositeSign", m_oppositeCharge = true); // deafult = true - declareProperty("LowerMuMuMassCut", m_lowerMuMuMassCut = 100.); // default = 100.0 MeV - declareProperty("UpperMuMuMassCut", m_upperMuMuMassCut = 5500.); // default = 5500.0 MeV - // declareProperty("LowerMuVtxMassCut", m_lowerMuVtxMassCut =100.); // default = 100.0 MeV - // declareProperty("UpperMuVtxMassCut", m_upperMuVtxMassCut = 5500.); // default = 5500.0 MeV - declareProperty("MuVtxChi2Cut", m_muVtxChi2Cut = 40.); // default = 40.0 - - // Maximum number of decay candidates (2 mu + 1 or 2 tracks) to test - protection against TimeOuts - declareProperty("MaxNcombinations", m_maxNcombinations = 50000); - - // B+->K+MuMu cuts - declareProperty("DoB_KMuMuDecay", m_doB_KMuMuDecay = true); //Proceed B->KMuMu part of algorithm - declareProperty("LowerKMuMuMassCut", m_lowerKMuMuMassCut = 4500.); // default = 4500.0 MeV - declareProperty("UpperKMuMuMassCut", m_upperKMuMuMassCut = 5900.); // default = 5900.0 MeV - // declareProperty("LowerB_KMuMuMassCutVtxOff", m_lowerB_KMuMuMassCutVtxOff = 4500.); // default = 4500.0 MeV - // declareProperty("UpperB_KMuMuMassCutVtxOff", m_upperB_KMuMuMassCutVtxOff= 5900.); // default = 5900.0 MeV - // declareProperty("LowerBVtxMassCut", m_lowerBVtxMassCut = 4500.); // default = 4500.0 MeV - // declareProperty("UpperBVtxMassCut", m_upperBVtxMassCut = 5900.); // default = 5900.0 MeV - declareProperty("DoB_KMuMuVertexing", m_doB_KMuMuVertexing = true); - declareProperty("BVtxChi2Cut", m_bVtxChi2Cut = 300.); // default = 300.0 - declareProperty("MaxBpToStore", m_maxBpToStore = -1); - - // Bd->K*MuMu cuts - declareProperty("DoBd_KstarMuMuDecay", m_doBd_KstarMuMuDecay = true); //Proceed Bd->K*MuMu part of algorithm - declareProperty("LowerKstar_KaonMassCut", m_lowerKstar_KaonMassCut = 600.); // default = 600.0 MeV - declareProperty("UpperKstar_KaonMassCut", m_upperKstar_KaonMassCut = 1500.); // default = 1500.0 MeV - declareProperty("LowerBd_KstarMuMuMassCut", m_lowerBd_KstarMuMuMassCut= 4300.); // default = 4600.0 MeV - declareProperty("UpperBd_KstarMuMuMassCut", m_upperBd_KstarMuMuMassCut =6300.); // default = 6300.0 MeV - // declareProperty("LowerBd_KstarMuMuMassCutVtxOff", m_lowerBd_KstarMuMuMassCutVtxOff = 4600.); // default = 4600.0 MeV - // declareProperty("UpperBd_KstarMuMuMassCutVtxOff", m_upperBd_KstarMuMuMassCutVtxOff= 6300.); // default = 6300.0 MeV - // declareProperty("LowerKstarVtxMassCut", m_lowerKstarVtxMassCut = 600.); // default = 600.0 MeV - // declareProperty("UpperKstarVtxMassCut", m_upperKstarVtxMassCut= 1200.); // default = 1200.0 MeV - // declareProperty("LowerBdVtxMassCut", m_lowerBdVtxMassCut = 4600.); // default = 4600.0 MeV - // declareProperty("UpperBdVtxMassCut", m_upperBdVtxMassCut = 6000.); // default = 6000.0 MeV - declareProperty("DoKstar_KPiVertexing", m_doKstar_KPiVertexing = true); - declareProperty("DoBd_KstarMuMuVertexing", m_doBd_KstarMuMuVertexing = true); - declareProperty("KstarVtxChi2Cut", m_kStarVtxChi2Cut = 60.); // default = 60.0 - declareProperty("BdVtxChi2Cut", m_bDVtxChi2Cut = 60.); // default = 60.0 - declareProperty("MaxBdToStore", m_maxBdToStore = -1); - - // Bs->PhiMuMu cuts - declareProperty("DoBs_Phi1020MuMuDecay", m_doBs_Phi1020MuMuDecay = true); //Proceed Bs->PhiMuMu part of algorithm - declareProperty("LowerPhi1020_KaonMassCut", m_lowerPhi1020_KaonMassCut = 990.); // default = 990.0 MeV - declareProperty("UpperPhi1020_KaonMassCut", m_upperPhi1020_KaonMassCut = 1050.); // default = 1050.0 MeV - declareProperty("LowerBs_Phi1020MuMuMassCut", m_lowerBs_Phi1020MuMuMassCut = 5000.); // default = 5000.0 MeV - declareProperty("UpperBs_Phi1020MuMuMassCut", m_upperBs_Phi1020MuMuMassCut = 5800.); // default = 5800.0 MeV - // declareProperty("LowerBs_Phi1020MuMuMassCutVtxOff", m_lowerBs_Phi1020MuMuMassCutVtxOff = 5000.); // default = 5000.0 MeV - // declareProperty("UpperBs_Phi1020MuMuMassCutVtxOff", m_upperBs_Phi1020MuMuMassCutVtxOff = 5800.); // default = 5800.0 MeV - // declareProperty("LowerPhi1020VtxMassCut", m_lowerPhi1020VtxMassCut = 990.); // default = 990.0 MeV - // declareProperty("UpperPhi1020VtxMassCut", m_upperPhi1020VtxMassCut = 1060.); // default = 1060.0 MeV - // declareProperty("LowerBsVtxMassCut", m_lowerBsVtxMassCut = 5000.); // default = 5000.0 MeV - // declareProperty("UpperBsVtxMassCut", m_upperBsVtxMassCut = 5800.); // default = 5800.0 MeV - declareProperty("DoPhi1020_KKVertexing", m_doPhi1020_KKVertexing = true); - declareProperty("DoBs_Phi1020MuMuVertexing", m_doBs_Phi1020MuMuVertexing = true); - declareProperty("Phi1020VtxChi2Cut", m_phi1020VtxChi2Cut = 60.); // default = 60.0 - declareProperty("BsVtxChi2Cut", m_bSVtxChi2Cut = 60.); // default = 60.0 - declareProperty("MaxBsToStore", m_maxBsToStore = -1); - - // Lb->LMuMu cuts // cuts optimalization in progress - declareProperty("DoLb_LambdaMuMuDecay", m_doLb_LambdaMuMuDecay = true); //Proceed Lb->LMuMu part of algorithm - declareProperty("LowerLambda_PrPiMassCut", m_lowerLambda_PrPiMassCut = 1040.); // optimal = 1080.0 MeV - declareProperty("UpperLambda_PrPiMassCut", m_upperLambda_PrPiMassCut = 1250.); // default = 2 500.0 MeV - declareProperty("LowerLambda_PtCut", m_lowerLambda_PtCut = 1200.); - declareProperty("LowerLb_PtCut", m_lowerLb_PtCut = 8000.); - declareProperty("LowerLb_LambdaMuMuMassCut", m_lowerLb_LambdaMuMuMassCut = 3800.); // default = 1 000.0 MeV - declareProperty("UpperLb_LambdaMuMuMassCut", m_upperLb_LambdaMuMuMassCut = 6270.); // default = 10 000.0 MeV - // declareProperty("LowerLb_LambdaMuMuMassCutVtxOff", m_lowerLb_LambdaMuMuMassCutVtxOff = 1080.); // default = 2 000.0 MeV - // declareProperty("UpperLb_LambdaMuMuMassCutVtxOff", m_upperLb_LambdaMuMuMassCutVtxOff = 1180.); // default = 8 000.0 MeV - // declareProperty("LowerLambdaVtxMassCut", m_lowerLambdaVtxMassCut = 1070.); // default = 200.0 MeV - declareProperty("UpperLambdaVtxMassCut", m_upperLambdaVtxMassCut = 1200.); // default = 2 000.0 MeV - declareProperty("LowerLambda_LxyCut", m_lowerLambda_LxyCut = 0.5); // default = 0.5 mm - declareProperty("DoLambda_PPiVertexing", m_doLambda_PPiVertexing = true); - declareProperty("DoLb_LambdaMuMuVertexing", m_doLb_LambdaMuMuVertexing = true); - declareProperty("DoLb_LambdaMuMuCascade", m_doLb_LambdaMuMuCascade = true); - declareProperty("LambdaVtxChi2Cut", m_lambdaVtxChi2Cut = 90.); // default = 500.0 MeV - declareProperty("LowerLbVtxMassCut", m_lowerLb_LambdaMuMuVtxMassCut = 3950.); // default = 1 000.0 MeV - declareProperty("UpperLbVtxMassCut", m_upperLb_LambdaMuMuVtxMassCut = 6100.); // default = 10 000.0 MeV - declareProperty("LbVtxChi2Cut", m_lBVtxChi2Cut = 180.); // default = 500.0 - // declareProperty("LbVtxDistanceCut", m_lBVtxDistanceCut = 0.); // default = 0.0 - // declareProperty("PiImpactCut", m_piImpactCut = 0.); // default = 0.0 - // declareProperty("PrImpactCut", m_prImpactCut = 0.); // default = 0.0 - declareProperty("MaxLbToStore", m_maxLbToStore = -1); - - // Bc->DsMuMu cuts - declareProperty("DoBc_DsMuMuDecay", m_doBc_DsMuMuDecay = false); // Proceed Bc->DsMuMu part of algorithm - declareProperty("LowerPhiDs_MassCut", m_lowerPhiDs_MassCut = 980.); // default = 980.0 MeV - declareProperty("UpperPhiDs_MassCut", m_upperPhiDs_MassCut = 1080.); // default = 1080.0 MeV - declareProperty("LowerDs_MassCut", m_lowerDs_MassCut = 1600.); // default = 1600.0 MeV - declareProperty("UpperDs_MassCut", m_upperDs_MassCut = 2400.); // default = 2400.0 MeV - declareProperty("LowerDs_PtCut", m_lowerDs_PtCut = 2000.); // default = 2000.0 MeV - declareProperty("LowerDs_LxyCut", m_lowerDs_LxyCut = -999.3); // default = 0.3 mm - declareProperty("LowerBc_DsMuMuMassCut", m_lowerBc_DsMuMuMassCut = 5450.); // default = 1800.0 MeV - declareProperty("UpperBc_DsMuMuMassCut", m_upperBc_DsMuMuMassCut = 7050.); // default = 7050.0 MeV - declareProperty("LowerBcDs_PtCut", m_lowerBcDs_PtCut = 8000.); // default = 8000.0 MeV - declareProperty("DoDs_Vertexing", m_doDs_Vertexing = true); - declareProperty("DoBc_DsMuMuVertexing", m_doBc_DsMuMuVertexing = true); - declareProperty("DoBc_DsMuMuCascade", m_doBc_DsMuMuCascade = true); - declareProperty("DsVtxChi2Cut", m_DsVtxChi2Cut = 90.); // default = 90.0 - declareProperty("BcVtxChi2Cut", m_bCVtxChi2Cut = 120.); // default = 120.0 - declareProperty("MaxBcToStore", m_maxBcToStore = -1); - - // Bc->DplusMuMu cuts - declareProperty("DoBc_DplusMuMuDecay", m_doBc_DplusMuMuDecay = false); // Proceed Bc->DplusMuMu part of algorithm - declareProperty("LowerDplus_MassCut", m_lowerDplus_MassCut = 1500.); // default = 1500.0 MeV - declareProperty("UpperDplus_MassCut", m_upperDplus_MassCut = 2300.); // default = 2300.0 MeV - declareProperty("LowerDplus_PtCut", m_lowerDplus_PtCut = 2000.); // default = 2000.0 MeV - declareProperty("LowerDplus_LxyCut", m_lowerDplus_LxyCut = -990.3); // default = 0.3 mm - declareProperty("LowerBc_DplusMuMuMassCut", m_lowerBc_DplusMuMuMassCut = 5450.); // default = 5450.0 MeV - declareProperty("UpperBc_DplusMuMuMassCut", m_upperBc_DplusMuMuMassCut = 7050.); // default = 7050.0 MeV - declareProperty("LowerBcDplus_PtCut", m_lowerBcDplus_PtCut = 8000.); // default = 8000.0 MeV - declareProperty("DoDplus_Vertexing", m_doDplus_Vertexing = true); - declareProperty("DoBc_DplusMuMuVertexing", m_doBc_DplusMuMuVertexing = true); - declareProperty("DoBc_DplusMuMuCascade", m_doBc_DplusMuMuCascade = true); - declareProperty("DplusVtxChi2Cut", m_DplusVtxChi2Cut = 90.); // default = 90.0 - // declareProperty("BcDplusVtxChi2Cut", m_bCDplusVtxChi2Cut = 120.); // default = 120.0 - declareProperty("BcDplusVtxChi2Cut", m_bCDplusVtxChi2Cut = 180.); // default = 180.0 - declareProperty("MaxBcDplusToStore", m_maxBcDplusToStore = -1); - - // Bc->DstarMuMu cuts - declareProperty("DoBc_DstarMuMuDecay", m_doBc_DstarMuMuDecay = false); // Proceed Bc->DstarMuMu part of algorithm - declareProperty("LowerD0Dstar_MassCut", m_lowerD0Dstar_MassCut = 1500.); // default = 1500.0 MeV - declareProperty("UpperD0Dstar_MassCut", m_upperD0Dstar_MassCut = 2300.); // default = 2300.0 MeV - declareProperty("UpperDstar_DMCut", m_upperDstar_DMCut = 180.); // default = 180.0 MeV - declareProperty("LowerDstar_PtCut", m_lowerDstar_PtCut = 2000.); // default = 2000.0 MeV - declareProperty("LowerDstarKpi_PtCut", m_lowerDstarKpi_PtCut = 1800.); // default = 1800.0 MeV - declareProperty("LowerD0Dstar_LxyCut", m_lowerD0Dstar_LxyCut = -9999999.); // default = -9999999. mm - declareProperty("LowerBc_DstarMuMuMassCut", m_lowerBc_DstarMuMuMassCut = 5450.); // default = 5450.0 MeV - declareProperty("UpperBc_DstarMuMuMassCut", m_upperBc_DstarMuMuMassCut = 7050.); // default = 7050.0 MeV - declareProperty("LowerBcDstar_PtCut", m_lowerBcDstar_PtCut = 8000.); // default = 8000.0 MeV - declareProperty("DoD0Dstar_Vertexing", m_doD0Dstar_Vertexing = true); - declareProperty("DoBc_DstarMuMuVertexing", m_doBc_DstarMuMuVertexing = true); - declareProperty("DoBc_DstarMuMuCascade", m_doBc_DstarMuMuCascade = true); - declareProperty("D0DstarVtxChi2Cut", m_D0DstarVtxChi2Cut = 90.); // default = 90.0 - declareProperty("BcDstarVtxChi2Cut", m_bCDstarVtxChi2Cut = 120.); // default = 120.0 - declareProperty("MaxBcDstarToStore", m_maxBcDstarToStore = -1); - - // Bc->D0MuMu cuts - declareProperty("DoBc_D0MuMuDecay", m_doBc_D0MuMuDecay = false); // Proceed Bc->D0MuMu part of algorithm - declareProperty("LowerD0_MassCut", m_lowerD0_MassCut = 1500.); // default = 1500.0 MeV - declareProperty("UpperD0_MassCut", m_upperD0_MassCut = 2300.); // default = 2300.0 MeV - declareProperty("LowerD0_PtCut", m_lowerD0_PtCut = 2000.); // default = 2000.0 MeV - declareProperty("LowerD0_LxyCut", m_lowerD0_LxyCut = 0.01); // default = 0.01 mm - declareProperty("LowerBc_D0MuMuMassCut", m_lowerBc_D0MuMuMassCut = 5250.); // default = 5250.0 MeV - declareProperty("UpperBc_D0MuMuMassCut", m_upperBc_D0MuMuMassCut = 6911.); // default = 6911.0 MeV - declareProperty("LowerBcD0_PtCut", m_lowerBcD0_PtCut = 8000.); // default = 8000.0 MeV - declareProperty("DoD0_Vertexing", m_doD0_Vertexing = true); - declareProperty("DoBc_D0MuMuVertexing", m_doBc_D0MuMuVertexing = true); - declareProperty("DoBc_D0MuMuCascade", m_doBc_D0MuMuCascade = true); - declareProperty("D0VtxChi2Cut", m_D0VtxChi2Cut = 90.); // default = 90.0 - declareProperty("BcD0VtxChi2Cut", m_bCD0VtxChi2Cut = 120.); // default = 120.0 - declareProperty("MaxBcD0ToStore", m_maxBcD0ToStore = -1); - - // Monitoring variables - // General - declareMonitoredStdContainer("Errors", m_mon_Errors, AutoClear); - declareMonitoredStdContainer("Acceptance", m_mon_Acceptance, AutoClear); - declareMonitoredVariable("nTriedCombinations", m_mon_nTriedCombinations ); - // Timing - declareMonitoredVariable("TotalRunTime", m_mon_TotalRunTime); - declareMonitoredVariable("VertexingTime", m_mon_VertexingTime); - // RoIs - declareMonitoredStdContainer("RoI_RoI1Eta", m_mon_RoI_RoI1Eta, AutoClear); - declareMonitoredStdContainer("RoI_RoI2Eta", m_mon_RoI_RoI2Eta, AutoClear); - declareMonitoredStdContainer("RoI_RoI1Phi", m_mon_RoI_RoI1Phi, AutoClear); - declareMonitoredStdContainer("RoI_RoI2Phi", m_mon_RoI_RoI2Phi, AutoClear); - declareMonitoredStdContainer("RoI_dEtaRoI", m_mon_RoI_dEtaRoI, AutoClear); - declareMonitoredStdContainer("RoI_dPhiRoI", m_mon_RoI_dPhiRoI, AutoClear); - // DiMuon - declareMonitoredVariable("DiMu_n", m_mon_DiMu_n); - declareMonitoredStdContainer("DiMu_Pt_Mu1", m_mon_DiMu_Pt_Mu1, AutoClear); - declareMonitoredStdContainer("DiMu_Pt_Mu2", m_mon_DiMu_Pt_Mu2, AutoClear); - declareMonitoredStdContainer("DiMu_Eta_Mu1", m_mon_DiMu_Eta_Mu1, AutoClear); - declareMonitoredStdContainer("DiMu_Eta_Mu2", m_mon_DiMu_Eta_Mu2, AutoClear); - declareMonitoredStdContainer("DiMu_Phi_Mu1", m_mon_DiMu_Phi_Mu1, AutoClear); - declareMonitoredStdContainer("DiMu_Phi_Mu2", m_mon_DiMu_Phi_Mu2, AutoClear); - declareMonitoredStdContainer("DiMu_dEtaMuMu", m_mon_DiMu_dEtaMuMu, AutoClear); - declareMonitoredStdContainer("DiMu_dPhiMuMu", m_mon_DiMu_dPhiMuMu, AutoClear); - declareMonitoredStdContainer("DiMu_pTsumMuMu", m_mon_DiMu_pTsumMuMu, AutoClear); - declareMonitoredStdContainer("DiMu_InvMassMuMu", m_mon_DiMu_InvMassMuMu, AutoClear); - declareMonitoredStdContainer("DiMu_VtxMassMuMu", m_mon_DiMu_VtxMassMuMu, AutoClear); - declareMonitoredStdContainer("DiMu_Chi2MuMu", m_mon_DiMu_Chi2MuMu, AutoClear); - // Tracks - declareMonitoredVariable("Tracks_n", m_mon_Tracks_n); - declareMonitoredStdContainer("Tracks_Eta", m_mon_Tracks_Eta, AutoClear); - declareMonitoredStdContainer("Tracks_Pt", m_mon_Tracks_Pt, AutoClear); - declareMonitoredStdContainer("Tracks_Phi", m_mon_Tracks_Phi, AutoClear); - // B+ - declareMonitoredVariable("BMuMuK_n", m_mon_BMuMuK_n); - declareMonitoredStdContainer("BMuMuK_Pt_K", m_mon_BMuMuK_Pt_K, AutoClear); - declareMonitoredStdContainer("BMuMuK_Eta_K", m_mon_BMuMuK_Eta_K, AutoClear); - declareMonitoredStdContainer("BMuMuK_Phi_K", m_mon_BMuMuK_Phi_K, AutoClear); - declareMonitoredStdContainer("BMuMuK_InvMass_B", m_mon_BMuMuK_InvMass_B, AutoClear); - declareMonitoredStdContainer("BMuMuK_VtxMass_B", m_mon_BMuMuK_VtxMass_B, AutoClear); - declareMonitoredStdContainer("BMuMuK_Chi2_B", m_mon_BMuMuK_Chi2_B, AutoClear); - // Bd - declareMonitoredVariable("BdMuMuKs_n", m_mon_BdMuMuKs_n); - declareMonitoredStdContainer("BdMuMuKs_Pt_K", m_mon_BdMuMuKs_Pt_K, AutoClear); - declareMonitoredStdContainer("BdMuMuKs_Eta_K", m_mon_BdMuMuKs_Eta_K, AutoClear); - declareMonitoredStdContainer("BdMuMuKs_Phi_K", m_mon_BdMuMuKs_Phi_K, AutoClear); - declareMonitoredStdContainer("BdMuMuKs_Pt_Pi", m_mon_BdMuMuKs_Pt_Pi, AutoClear); - declareMonitoredStdContainer("BdMuMuKs_Eta_Pi", m_mon_BdMuMuKs_Eta_Pi, AutoClear); - declareMonitoredStdContainer("BdMuMuKs_Phi_Pi", m_mon_BdMuMuKs_Phi_Pi, AutoClear); - declareMonitoredStdContainer("BdMuMuKs_InvMass_Kstar", m_mon_BdMuMuKs_InvMass_Kstar, AutoClear); - declareMonitoredStdContainer("BdMuMuKs_VtxMass_Kstar", m_mon_BdMuMuKs_VtxMass_Kstar, AutoClear); - declareMonitoredStdContainer("BdMuMuKs_Chi2_Kstar", m_mon_BdMuMuKs_Chi2_Kstar, AutoClear); - declareMonitoredStdContainer("BdMuMuKs_InvMass_Bd", m_mon_BdMuMuKs_InvMass_Bd, AutoClear); - declareMonitoredStdContainer("BdMuMuKs_VtxMass_Bd", m_mon_BdMuMuKs_VtxMass_Bd, AutoClear); - declareMonitoredStdContainer("BdMuMuKs_Chi2_Bd", m_mon_BdMuMuKs_Chi2_Bd, AutoClear); - // Bs - declareMonitoredVariable("BsMuMuPhi_n", m_mon_BsMuMuPhi_n); - declareMonitoredStdContainer("BsMuMuPhi_Pt_K1", m_mon_BsMuMuPhi_Pt_K1, AutoClear); - declareMonitoredStdContainer("BsMuMuPhi_Eta_K1", m_mon_BsMuMuPhi_Eta_K1, AutoClear); - declareMonitoredStdContainer("BsMuMuPhi_Phi_K1", m_mon_BsMuMuPhi_Phi_K1, AutoClear); - declareMonitoredStdContainer("BsMuMuPhi_Pt_K2", m_mon_BsMuMuPhi_Pt_K2, AutoClear); - declareMonitoredStdContainer("BsMuMuPhi_Eta_K2", m_mon_BsMuMuPhi_Eta_K2, AutoClear); - declareMonitoredStdContainer("BsMuMuPhi_Phi_K2", m_mon_BsMuMuPhi_Phi_K2, AutoClear); - declareMonitoredStdContainer("BsMuMuPhi_InvMass_Phi1020", m_mon_BsMuMuPhi_InvMass_Phi1020, AutoClear); - declareMonitoredStdContainer("BsMuMuPhi_VtxMass_Phi1020", m_mon_BsMuMuPhi_VtxMass_Phi1020, AutoClear); - declareMonitoredStdContainer("BsMuMuPhi_Chi2_Phi1020", m_mon_BsMuMuPhi_Chi2_Phi1020, AutoClear); - declareMonitoredStdContainer("BsMuMuPhi_InvMass_Bs", m_mon_BsMuMuPhi_InvMass_Bs, AutoClear); - declareMonitoredStdContainer("BsMuMuPhi_VtxMass_Bs", m_mon_BsMuMuPhi_VtxMass_Bs, AutoClear); - declareMonitoredStdContainer("BsMuMuPhi_Chi2_Bs", m_mon_BsMuMuPhi_Chi2_Bs, AutoClear); - // Lambda_b - declareMonitoredVariable("LbMuMuLambda_n", m_mon_LbMuMuLambda_n); - declareMonitoredStdContainer("LbMuMuLambda_Pt_P", m_mon_LbMuMuLambda_Pt_P, AutoClear); - declareMonitoredStdContainer("LbMuMuLambda_Eta_P", m_mon_LbMuMuLambda_Eta_P, AutoClear); - declareMonitoredStdContainer("LbMuMuLambda_Phi_P", m_mon_LbMuMuLambda_Phi_P, AutoClear); - declareMonitoredStdContainer("LbMuMuLambda_Pt_Pi", m_mon_LbMuMuLambda_Pt_Pi, AutoClear); - declareMonitoredStdContainer("LbMuMuLambda_Eta_Pi", m_mon_LbMuMuLambda_Eta_Pi, AutoClear); - declareMonitoredStdContainer("LbMuMuLambda_Phi_Pi", m_mon_LbMuMuLambda_Phi_Pi, AutoClear); - declareMonitoredStdContainer("LbMuMuLambda_InvMass_Lambda", m_mon_LbMuMuLambda_InvMass_Lambda, AutoClear); - declareMonitoredStdContainer("LbMuMuLambda_VtxMass_Lambda", m_mon_LbMuMuLambda_VtxMass_Lambda, AutoClear); - declareMonitoredStdContainer("LbMuMuLambda_FinMass_Lambda", m_mon_LbMuMuLambda_FinMass_Lambda, AutoClear); - declareMonitoredStdContainer("LbMuMuLambda_Chi2_Lambda", m_mon_LbMuMuLambda_Chi2_Lambda, AutoClear); - declareMonitoredStdContainer("LbMuMuLambda_InvMass_Lb", m_mon_LbMuMuLambda_InvMass_Lb, AutoClear); - declareMonitoredStdContainer("LbMuMuLambda_VtxMass_Lb", m_mon_LbMuMuLambda_VtxMass_Lb, AutoClear); - declareMonitoredStdContainer("LbMuMuLambda_FinMass_Lb", m_mon_LbMuMuLambda_FinMass_Lb, AutoClear); - declareMonitoredStdContainer("LbMuMuLambda_Chi2_Lb", m_mon_LbMuMuLambda_Chi2_Lb, AutoClear); - declareMonitoredStdContainer("LbMuMuLambda_pT_Lambda", m_mon_LbMuMuLambda_pT_Lambda, AutoClear); - declareMonitoredStdContainer("LbMuMuLambda_pT_Lb", m_mon_LbMuMuLambda_pT_Lb, AutoClear); - declareMonitoredStdContainer("LbMuMuLambda_Lxy_Lambda", m_mon_LbMuMuLambda_Lxy_Lambda, AutoClear); - // Bc - declareMonitoredVariable("BcMuMuDs_n", m_mon_BcMuMuDs_n); - declareMonitoredStdContainer("BcMuMuDs_Pt_K1", m_mon_BcMuMuDs_Pt_K1, AutoClear); - declareMonitoredStdContainer("BcMuMuDs_Eta_K1", m_mon_BcMuMuDs_Eta_K1, AutoClear); - declareMonitoredStdContainer("BcMuMuDs_Phi_K1", m_mon_BcMuMuDs_Phi_K1, AutoClear); - declareMonitoredStdContainer("BcMuMuDs_Pt_K2", m_mon_BcMuMuDs_Pt_K2, AutoClear); - declareMonitoredStdContainer("BcMuMuDs_Eta_K2", m_mon_BcMuMuDs_Eta_K2, AutoClear); - declareMonitoredStdContainer("BcMuMuDs_Phi_K2", m_mon_BcMuMuDs_Phi_K2, AutoClear); - declareMonitoredStdContainer("BcMuMuDs_Pt_pi", m_mon_BcMuMuDs_Pt_pi, AutoClear); - declareMonitoredStdContainer("BcMuMuDs_Eta_pi", m_mon_BcMuMuDs_Eta_pi, AutoClear); - declareMonitoredStdContainer("BcMuMuDs_Phi_pi", m_mon_BcMuMuDs_Phi_pi, AutoClear); - declareMonitoredStdContainer("BcMuMuDs_InvMass_PhiDs", m_mon_BcMuMuDs_InvMass_PhiDs, AutoClear); - declareMonitoredStdContainer("BcMuMuDs_InvMass_Ds", m_mon_BcMuMuDs_InvMass_Ds, AutoClear); - declareMonitoredStdContainer("BcMuMuDs_VtxMass_Ds", m_mon_BcMuMuDs_VtxMass_Ds, AutoClear); - declareMonitoredStdContainer("BcMuMuDs_Chi2_Ds", m_mon_BcMuMuDs_Chi2_Ds, AutoClear); - declareMonitoredStdContainer("BcMuMuDs_InvMass_Bc", m_mon_BcMuMuDs_InvMass_Bc, AutoClear); - declareMonitoredStdContainer("BcMuMuDs_VtxMass_Bc", m_mon_BcMuMuDs_VtxMass_Bc, AutoClear); - declareMonitoredStdContainer("BcMuMuDs_Chi2_Bc", m_mon_BcMuMuDs_Chi2_Bc, AutoClear); - declareMonitoredStdContainer("BcMuMuDs_pT_Ds", m_mon_BcMuMuDs_pT_Ds, AutoClear); - declareMonitoredStdContainer("BcMuMuDs_pT_Bc", m_mon_BcMuMuDs_pT_Bc, AutoClear); - declareMonitoredStdContainer("BcMuMuDs_Lxy_Ds", m_mon_BcMuMuDs_Lxy_Ds, AutoClear); - // Bc -> Dplus - declareMonitoredVariable("BcMuMuDplus_n", m_mon_BcMuMuDplus_n); - declareMonitoredStdContainer("BcMuMuDplus_Pt_K", m_mon_BcMuMuDplus_Pt_K, AutoClear); - declareMonitoredStdContainer("BcMuMuDplus_Eta_K", m_mon_BcMuMuDplus_Eta_K, AutoClear); - declareMonitoredStdContainer("BcMuMuDplus_Phi_K", m_mon_BcMuMuDplus_Phi_K, AutoClear); - declareMonitoredStdContainer("BcMuMuDplus_Pt_pi1", m_mon_BcMuMuDplus_Pt_pi1, AutoClear); - declareMonitoredStdContainer("BcMuMuDplus_Eta_pi1", m_mon_BcMuMuDplus_Eta_pi1, AutoClear); - declareMonitoredStdContainer("BcMuMuDplus_Phi_pi1", m_mon_BcMuMuDplus_Phi_pi1, AutoClear); - declareMonitoredStdContainer("BcMuMuDplus_Pt_pi2", m_mon_BcMuMuDplus_Pt_pi2, AutoClear); - declareMonitoredStdContainer("BcMuMuDplus_Eta_pi2", m_mon_BcMuMuDplus_Eta_pi2, AutoClear); - declareMonitoredStdContainer("BcMuMuDplus_Phi_pi2", m_mon_BcMuMuDplus_Phi_pi2, AutoClear); - declareMonitoredStdContainer("BcMuMuDplus_InvMass_Dplus", m_mon_BcMuMuDplus_InvMass_Dplus, AutoClear); - declareMonitoredStdContainer("BcMuMuDplus_VtxMass_Dplus", m_mon_BcMuMuDplus_VtxMass_Dplus, AutoClear); - declareMonitoredStdContainer("BcMuMuDplus_Chi2_Dplus", m_mon_BcMuMuDplus_Chi2_Dplus, AutoClear); - declareMonitoredStdContainer("BcMuMuDplus_Lxy_Dplus", m_mon_BcMuMuDplus_Lxy_Dplus, AutoClear); - declareMonitoredStdContainer("BcMuMuDplus_InvMass_Bc", m_mon_BcMuMuDplus_InvMass_Bc, AutoClear); - declareMonitoredStdContainer("BcMuMuDplus_VtxMass_Bc", m_mon_BcMuMuDplus_VtxMass_Bc, AutoClear); - declareMonitoredStdContainer("BcMuMuDplus_Chi2_Bc", m_mon_BcMuMuDplus_Chi2_Bc, AutoClear); - declareMonitoredStdContainer("BcMuMuDplus_pT_Dplus", m_mon_BcMuMuDplus_pT_Dplus, AutoClear); - declareMonitoredStdContainer("BcMuMuDplus_pT_Bc", m_mon_BcMuMuDplus_pT_Bc, AutoClear); - // Bc -> Dstar - declareMonitoredVariable("BcMuMuDstar_n", m_mon_BcMuMuDstar_n); - declareMonitoredStdContainer("BcMuMuDstar_Pt_K", m_mon_BcMuMuDstar_Pt_K, AutoClear); - declareMonitoredStdContainer("BcMuMuDstar_Eta_K", m_mon_BcMuMuDstar_Eta_K, AutoClear); - declareMonitoredStdContainer("BcMuMuDstar_Phi_K", m_mon_BcMuMuDstar_Phi_K, AutoClear); - declareMonitoredStdContainer("BcMuMuDstar_Pt_pi", m_mon_BcMuMuDstar_Pt_pi, AutoClear); - declareMonitoredStdContainer("BcMuMuDstar_Eta_pi", m_mon_BcMuMuDstar_Eta_pi, AutoClear); - declareMonitoredStdContainer("BcMuMuDstar_Phi_pi", m_mon_BcMuMuDstar_Phi_pi, AutoClear); - declareMonitoredStdContainer("BcMuMuDstar_Pt_pis", m_mon_BcMuMuDstar_Pt_pis, AutoClear); - declareMonitoredStdContainer("BcMuMuDstar_Eta_pis", m_mon_BcMuMuDstar_Eta_pis, AutoClear); - declareMonitoredStdContainer("BcMuMuDstar_Phi_pis", m_mon_BcMuMuDstar_Phi_pis, AutoClear); - declareMonitoredStdContainer("BcMuMuDstar_InvMass_D0Dstar", m_mon_BcMuMuDstar_InvMass_D0Dstar, AutoClear); - declareMonitoredStdContainer("BcMuMuDstar_VtxMass_D0Dstar", m_mon_BcMuMuDstar_VtxMass_D0Dstar, AutoClear); - declareMonitoredStdContainer("BcMuMuDstar_DelMass_Dstar", m_mon_BcMuMuDstar_DelMass_Dstar, AutoClear); - declareMonitoredStdContainer("BcMuMuDstar_VtxDelMass_Dstar", m_mon_BcMuMuDstar_VtxDelMass_Dstar, AutoClear); - declareMonitoredStdContainer("BcMuMuDstar_Chi2_D0Dstar", m_mon_BcMuMuDstar_Chi2_D0Dstar, AutoClear); - declareMonitoredStdContainer("BcMuMuDstar_InvMass_Bc", m_mon_BcMuMuDstar_InvMass_Bc, AutoClear); - declareMonitoredStdContainer("BcMuMuDstar_VtxMass_Bc", m_mon_BcMuMuDstar_VtxMass_Bc, AutoClear); - declareMonitoredStdContainer("BcMuMuDstar_Chi2_Bc", m_mon_BcMuMuDstar_Chi2_Bc, AutoClear); - declareMonitoredStdContainer("BcMuMuDstar_pT_Dstar", m_mon_BcMuMuDstar_pT_Dstar, AutoClear); - declareMonitoredStdContainer("BcMuMuDstar_pT_Bc", m_mon_BcMuMuDstar_pT_Bc, AutoClear); - declareMonitoredStdContainer("BcMuMuDstar_Lxy_D0Dstar", m_mon_BcMuMuDstar_Lxy_D0Dstar, AutoClear); - // Bc -> D0 - declareMonitoredVariable("BcMuMuD0_n", m_mon_BcMuMuD0_n); - declareMonitoredStdContainer("BcMuMuD0_Pt_K", m_mon_BcMuMuD0_Pt_K, AutoClear); - declareMonitoredStdContainer("BcMuMuD0_Eta_K", m_mon_BcMuMuD0_Eta_K, AutoClear); - declareMonitoredStdContainer("BcMuMuD0_Phi_K", m_mon_BcMuMuD0_Phi_K, AutoClear); - declareMonitoredStdContainer("BcMuMuD0_Pt_pi", m_mon_BcMuMuD0_Pt_pi, AutoClear); - declareMonitoredStdContainer("BcMuMuD0_Eta_pi", m_mon_BcMuMuD0_Eta_pi, AutoClear); - declareMonitoredStdContainer("BcMuMuD0_Phi_pi", m_mon_BcMuMuD0_Phi_pi, AutoClear); - declareMonitoredStdContainer("BcMuMuD0_InvMass_D0", m_mon_BcMuMuD0_InvMass_D0, AutoClear); - declareMonitoredStdContainer("BcMuMuD0_VtxMass_D0", m_mon_BcMuMuD0_VtxMass_D0, AutoClear); - declareMonitoredStdContainer("BcMuMuD0_Chi2_D0", m_mon_BcMuMuD0_Chi2_D0, AutoClear); - declareMonitoredStdContainer("BcMuMuD0_InvMass_Bc", m_mon_BcMuMuD0_InvMass_Bc, AutoClear); - declareMonitoredStdContainer("BcMuMuD0_VtxMass_Bc", m_mon_BcMuMuD0_VtxMass_Bc, AutoClear); - declareMonitoredStdContainer("BcMuMuD0_Chi2_Bc", m_mon_BcMuMuD0_Chi2_Bc, AutoClear); - declareMonitoredStdContainer("BcMuMuD0_pT_D0", m_mon_BcMuMuD0_pT_D0, AutoClear); - declareMonitoredStdContainer("BcMuMuD0_pT_Bc", m_mon_BcMuMuD0_pT_Bc, AutoClear); - declareMonitoredStdContainer("BcMuMuD0_Lxy_D0", m_mon_BcMuMuD0_Lxy_D0, AutoClear); - - -} - - -/*----------------------------------------------------------------------------*/ -TrigEFBMuMuXFex::~TrigEFBMuMuXFex() -{ } - - -/*----------------------------------------------------------------------------*/ -HLT::ErrorCode TrigEFBMuMuXFex::hltInitialize() -{ - ATH_MSG_INFO("Running TrigEFBMuMuXFex::hltInitialize" ); - - ATH_MSG_DEBUG("Initialization completed successfully:" ); - ATH_MSG_DEBUG("AcceptAll = " << (m_acceptAll==true ? "True" : "False") ); - ATH_MSG_DEBUG("MaxNcombinations = " << m_maxNcombinations ); - ATH_MSG_DEBUG("Activated decays:" ); - ATH_MSG_DEBUG(" B+ -> mu mu K+ : " << (m_doB_KMuMuDecay==true ? "True" : "False") ); - ATH_MSG_DEBUG(" Bd -> mu mu K*(K+ Pi-) : " << (m_doBd_KstarMuMuDecay==true ? "True" : "False") ); - ATH_MSG_DEBUG(" Bs -> mu mu Phi(K+ K-) : " << (m_doBs_Phi1020MuMuDecay==true ? "True" : "False") ); - ATH_MSG_DEBUG(" Lambda_b -> mu mu Lambda(P Pi) : " << (m_doLb_LambdaMuMuDecay==true ? "True" : "False") ); - ATH_MSG_DEBUG(" Bc -> mu mu Ds(Phi pi) : " << (m_doBc_DsMuMuDecay==true ? "True" : "False") ); - ATH_MSG_DEBUG(" Bc -> mu mu D+(K pi pi) : " << (m_doBc_DplusMuMuDecay==true ? "True" : "False") ); - ATH_MSG_DEBUG(" Bc -> mu mu D*(D0 pi) : " << (m_doBc_DstarMuMuDecay==true ? "True" : "False") ); - ATH_MSG_DEBUG(" Bc -> mu mu D0(K pi) : " << (m_doBc_D0MuMuDecay==true ? "True" : "False") ); - ATH_MSG_DEBUG("OppositeCharge = " << (m_oppositeCharge==true ? "True" : "False") ); - - // setting up timers - if ( timerSvc() ) { - m_TotTimer = addTimer("EFBMuMuXFexTot"); - m_VtxFitTimer = addTimer("EFBMuMuXFexVtxFit"); - } - - // retrieving the vertex fitting tool - if (m_fitterSvc.retrieve().isFailure()) { - ATH_MSG_ERROR("Can't find Trk::TrkVKalVrtFitter" ); - return HLT::BAD_JOB_SETUP; - } else { - ATH_MSG_DEBUG("Trk::TrkVKalVrtFitter found" ); - m_VKVFitter = dynamic_cast< Trk::TrkVKalVrtFitter* > (&(*m_fitterSvc)); - } - - // retrieving BphysHelperUtilsTool - if (m_bphysHelperTool.retrieve().isFailure()) { - ATH_MSG_ERROR("Can't find TrigBphysHelperUtilsTool" ); - return HLT::BAD_JOB_SETUP; - } else { - ATH_MSG_DEBUG("TrigBphysHelperUtilsTool found" ); - } - - // set counters - m_lastEvent=-1; - m_lastEventPassed=-1; - m_countTotalEvents=0; - m_countTotalRoI=0; - m_countPassedEvents=0; - m_countPassedRoIs=0; - - m_lastEventPassedBplus=-1; - m_lastEventPassedBd=-1; - m_lastEventPassedBs=-1; - m_lastEventPassedLb=-1; - - m_countPassedEventsBplus=0; - m_countPassedEventsBs=0; - m_countPassedEventsBd=0; - m_countPassedEventsLb=0; - m_countPassedEventsBc=0; - - m_countPassedMuMuID=0; - m_countPassedMuMuOS=0; - m_countPassedMuMuMass=0; - m_countPassedMuMuVtx=0; - m_countPassedMuMuVtxChi2=0; - - m_countPassedBplusMass=0; - m_countPassedBplusVtx=0; - m_countPassedBplusVtxChi2=0; - - m_countPassedKstarMass=0; - m_countPassedBdMass=0; - m_countPassedKstarVtx=0; - m_countPassedKstarVtxChi2=0; - m_countPassedBdVtx=0; - m_countPassedBdVtxChi2=0; - - m_countPassedPhi1020Mass=0; - m_countPassedBsMass=0; - m_countPassedPhi1020Vtx=0; - m_countPassedPhi1020VtxChi2=0; - m_countPassedBsVtx=0; - m_countPassedBsVtxChi2=0; - - m_countPassedLambdaMass=0; - m_countPassedLambdaVtxMass=0; - m_countPassedLbMass=0; - m_countPassedLbVtxMass=0; - m_countPassedLambdaVtx=0; - m_countPassedLambdaVtxChi2=0; - m_countPassedLbVtx=0; - m_countPassedLbVtxChi2=0; - m_countPassedLbLambdaLxy=0; - - m_countPassedPhiDsMass=0; - m_countPassedDsMass=0; - m_countPassedBcMass=0; - m_countPassedDsVtx=0; - m_countPassedDsVtxChi2=0; - m_countPassedBcVtx=0; - m_countPassedBcVtxChi2=0; - m_countPassedBcDsLxy=0; - - m_countPassedDplusMass=0; - m_countPassedBcDplusMass=0; - m_countPassedDplusVtx=0; - m_countPassedDplusVtxChi2=0; - m_countPassedBcDplusVtx=0; - m_countPassedBcDplusVtxChi2=0; - m_countPassedBcDplusLxy=0; - - m_countPassedD0DstarMass=0; - m_countPassedDstarMass=0; - m_countPassedBcDstarMass=0; - m_countPassedD0DstarVtx=0; - m_countPassedD0DstarVtxChi2=0; - m_countPassedBcDstarVtx=0; - m_countPassedBcDstarVtxChi2=0; - m_countPassedBcD0DstarLxy=0; - - m_countPassedD0Mass=0; - m_countPassedBcD0Mass=0; - m_countPassedD0Vtx=0; - m_countPassedD0VtxChi2=0; - m_countPassedBcD0Vtx=0; - m_countPassedBcD0VtxChi2=0; - m_countPassedBcD0Lxy=0; - - - return HLT::OK; -} - - -/*----------------------------------------------------------------------------*/ -HLT::ErrorCode TrigEFBMuMuXFex::hltFinalize() -{ - - ATH_MSG_INFO("Running TrigEFBMuMuXFex::hltFinalize" ); - - ATH_MSG_INFO("|----------------------- SUMMARY FROM TrigEFBMuMuXFex -------------|" ); - ATH_MSG_INFO("Run on events/RoIs " << m_countTotalEvents << "/" << m_countTotalRoI ); - ATH_MSG_INFO("Passed events/RoIs " << m_countPassedEvents << "/" << m_countPassedRoIs ); - ATH_MSG_INFO("Evts Passed B+: " << m_countPassedEventsBplus ); - ATH_MSG_INFO("Evts Passed Bd: " << m_countPassedEventsBd ); - ATH_MSG_INFO("Evts Passed Bs: " << m_countPassedEventsBs ); - ATH_MSG_INFO("Evts Passed Lambda_b: " << m_countPassedEventsLb ); - ATH_MSG_INFO("Evts Passed Bc: " << m_countPassedEventsBc ); - ATH_MSG_INFO("Evts Passed Bc Dplus: " << m_countPassedEventsBcDplus ); - ATH_MSG_INFO("Evts Passed Bc Dstar: " << m_countPassedEventsBcDstar ); - ATH_MSG_INFO("Evts Passed Bc D0: " << m_countPassedEventsBcD0 ); - ATH_MSG_INFO(std::endl ); - ATH_MSG_INFO("PassedMuMuID: " << m_countPassedMuMuID ); - ATH_MSG_INFO("PassedMuMuOS: " << m_countPassedMuMuOS ); - ATH_MSG_INFO("PassedMuMuMass: " << m_countPassedMuMuMass ); - ATH_MSG_INFO("PassedMuMuVtx: " << m_countPassedMuMuVtx ); - ATH_MSG_INFO("PassedMuMuVtxChi2: " << m_countPassedMuMuVtxChi2 ); - ATH_MSG_INFO("PassedBplusMass: " << m_countPassedBplusMass ); - ATH_MSG_INFO("PassedBplusVtx: " << m_countPassedBplusVtx ); - ATH_MSG_INFO("PassedBplusVtxChi2: " << m_countPassedBplusVtxChi2 ); - ATH_MSG_INFO("PassedKstarMass: " << m_countPassedKstarMass ); - ATH_MSG_INFO("PassedKstarVtx: " << m_countPassedKstarVtx ); - ATH_MSG_INFO("PassedKstarVtxChi2: " << m_countPassedKstarVtxChi2 ); - ATH_MSG_INFO("PassedBdMass: " << m_countPassedBdMass ); - ATH_MSG_INFO("PassedBdVtx: " << m_countPassedBdVtx ); - ATH_MSG_INFO("PassedBdVtxChi2: " << m_countPassedBdVtxChi2 ); - ATH_MSG_INFO("PassedPhi1020Mass: " << m_countPassedPhi1020Mass ); - ATH_MSG_INFO("PassedPhi1020Vtx: " << m_countPassedPhi1020Vtx ); - ATH_MSG_INFO("PassedPhi1020VtxChi2: " << m_countPassedPhi1020VtxChi2 ); - ATH_MSG_INFO("PassedBsMass: " << m_countPassedBsMass ); - ATH_MSG_INFO("PassedBsVtx: " << m_countPassedBsVtx ); - ATH_MSG_INFO("PassedBsVtxChi2: " << m_countPassedBsVtxChi2 ); - ATH_MSG_INFO("PassedLambdaMass: " << m_countPassedLambdaMass ); - ATH_MSG_INFO("PassedLambdaVtxMass: " << m_countPassedLambdaVtxMass ); - ATH_MSG_INFO("PassedLambdaVtx: " << m_countPassedLambdaVtx ); - ATH_MSG_INFO("PassedLambdaVtxChi2: " << m_countPassedLambdaVtxChi2 ); - ATH_MSG_INFO("PassedLbMass: " << m_countPassedLbMass ); - ATH_MSG_INFO("PassedLbVtxMass: " << m_countPassedLbVtxMass ); - ATH_MSG_INFO("PassedLbVtx: " << m_countPassedLbVtx ); - ATH_MSG_INFO("PassedLbVtxChi2: " << m_countPassedLbVtxChi2 ); - ATH_MSG_INFO("PassedPhiDsMass: " << m_countPassedPhiDsMass ); - ATH_MSG_INFO("PassedDsMass: " << m_countPassedDsMass ); - ATH_MSG_INFO("PassedDsVtx: " << m_countPassedDsVtx ); - ATH_MSG_INFO("PassedDsVtxChi2: " << m_countPassedDsVtxChi2 ); - ATH_MSG_INFO("PassedBcMass: " << m_countPassedBcMass ); - ATH_MSG_INFO("PassedBcVtx: " << m_countPassedBcVtx ); - ATH_MSG_INFO("PassedBcVtxChi2: " << m_countPassedBcVtxChi2 ); - ATH_MSG_INFO("PassedBcDsLxy: " << m_countPassedBcDsLxy ); - ATH_MSG_INFO("PassedDplusMass: " << m_countPassedDplusMass ); - ATH_MSG_INFO("PassedDplusVtx: " << m_countPassedDplusVtx ); - ATH_MSG_INFO("PassedDplusVtxChi2: " << m_countPassedDplusVtxChi2 ); - ATH_MSG_INFO("PassedBcDplusMass: " << m_countPassedBcDplusMass ); - ATH_MSG_INFO("PassedBcDplusVtx: " << m_countPassedBcDplusVtx ); - ATH_MSG_INFO("PassedBcDplusVtxChi2: " << m_countPassedBcDplusVtxChi2 ); - ATH_MSG_INFO("PassedBcDplusLxy: " << m_countPassedBcDplusLxy ); - ATH_MSG_INFO("PassedD0DstarMass: " << m_countPassedD0DstarMass ); - ATH_MSG_INFO("PassedDstarMass: " << m_countPassedDstarMass ); - ATH_MSG_INFO("PassedD0DstarVtx: " << m_countPassedD0DstarVtx ); - ATH_MSG_INFO("PassedD0DstarVtxChi2: " << m_countPassedD0DstarVtxChi2 ); - ATH_MSG_INFO("PassedBcDstarMass: " << m_countPassedBcDstarMass ); - ATH_MSG_INFO("PassedBcDstarVtx: " << m_countPassedBcDstarVtx ); - ATH_MSG_INFO("PassedBcDstarVtxChi2: " << m_countPassedBcDstarVtxChi2 ); - ATH_MSG_INFO("PassedBcD0DstarLxy: " << m_countPassedBcD0DstarLxy ); - ATH_MSG_INFO("PassedD0Mass: " << m_countPassedD0Mass ); - ATH_MSG_INFO("PassedD0Vtx: " << m_countPassedD0Vtx ); - ATH_MSG_INFO("PassedD0VtxChi2: " << m_countPassedD0VtxChi2 ); - ATH_MSG_INFO("PassedBcD0Mass: " << m_countPassedBcD0Mass ); - ATH_MSG_INFO("PassedBcD0Vtx: " << m_countPassedBcD0Vtx ); - ATH_MSG_INFO("PassedBcD0VtxChi2: " << m_countPassedBcD0VtxChi2 ); - ATH_MSG_INFO("PassedBcD0Lxy: " << m_countPassedBcD0Lxy ); - - return HLT::OK; -} - - -/*----------------------------------------------------------------------------*/ -HLT::ErrorCode TrigEFBMuMuXFex::acceptInputs(HLT::TEConstVec& , bool& pass) -{ - ATH_MSG_DEBUG("Running TrigEFBMuMuXFex::acceptInputs" ); - pass = true; - - return HLT::OK; -} - - -/*----------------------------------------------------------------------------*/ -HLT::ErrorCode TrigEFBMuMuXFex::hltExecute(HLT::TEConstVec& inputTE, HLT::TriggerElement* outputTE ) -{ - ATH_MSG_DEBUG("Running TrigEFBMuMuXFex::hltExecute" ); - - if ( timerSvc() ) m_TotTimer->start(); - - if ( timerSvc() ) { - m_VtxFitTimer->start(); - m_VtxFitTimer->pause(); - } - - bool result(false); - - // Set monitoring counters to zeroes - m_mon_nTriedCombinations = 0; - m_mon_DiMu_n = 0; - m_mon_Tracks_n = 0; - m_mon_BMuMuK_n = 0; - m_mon_BdMuMuKs_n = 0; - m_mon_BsMuMuPhi_n = 0; - m_mon_LbMuMuLambda_n = 0; - m_mon_BcMuMuDs_n = 0; - m_mon_BcMuMuDplus_n = 0; - m_mon_BcMuMuDstar_n = 0; - m_mon_BcMuMuD0_n = 0; - m_mon_TotalRunTime = 0.; - m_mon_VertexingTime = 0.; - - ATH_MSG_VERBOSE("AcceptAll is set to : " << (m_acceptAll ? "True, taking all events " : "False, applying selection" )); - - // Retrieve event info -// int IdRun = 0; - int IdEvent = 0; - - // JW - Try to get the xAOD event info - const xAOD::EventInfo *evtInfo(0); - if ( store()->retrieve(evtInfo).isFailure() ) { - ATH_MSG_WARNING("Failed to get xAOD::EventInfo " ); - }else { // found the xAOD event info - ATH_MSG_DEBUG(" Run " << evtInfo->runNumber() << " Event " << evtInfo->eventNumber() << " using algo m_muonAlgo" ); -// IdRun = evtInfo->runNumber(); - IdEvent = evtInfo->eventNumber(); - } // get event info - - - //Check that we got 2 input TEs - int mu1_TE=-1; - int mu2_TE=-1; - if ( inputTE.size() != 2 ) { - ATH_MSG_DEBUG("Got different than 2 number of input TEs: " << inputTE.size() ); - mu1_TE=0; - mu2_TE=0; - }else{ - mu1_TE=0; - mu2_TE=1; - } - - - - if(IdEvent!=m_lastEvent) { - m_countTotalEvents++; - m_lastEvent = IdEvent; - m_countBpToStore = 0; - m_countBdToStore = 0; - m_countBsToStore = 0; - m_countLbToStore = 0; - m_countBcToStore = 0; - } - m_countTotalRoI++; - - - // JK DEBUG input TEs - - for (unsigned int iTE=0; iTE<inputTE.size(); ++iTE) { - ATH_MSG_DEBUG("Input TE " << iTE << " " << inputTE[iTE] << " ID " << inputTE[iTE]->getId() ); - } - - - //Retrieve ROIs - const TrigRoiDescriptor *roiDescriptor1(0); - const TrigRoiDescriptor *roiDescriptor2(0); - - // get them from the navigation - - if ( getFeature(inputTE[mu1_TE], roiDescriptor1) != HLT::OK ) { - ATH_MSG_ERROR("Navigation error while getting RoI descriptor 1" ); - m_mon_Errors.push_back(ERROR_No_RoIs); - if ( timerSvc() ) m_TotTimer->stop(); - return HLT::NAV_ERROR; - } - if ( !roiDescriptor1 ) { - ATH_MSG_ERROR("roiDescriptor1 is NULL" ); - return HLT::NAV_ERROR; - } - - if ( getFeature(inputTE[mu2_TE], roiDescriptor2) != HLT::OK ) { - ATH_MSG_ERROR("Navigation error while getting RoI descriptor 2" ); - m_mon_Errors.push_back(ERROR_No_RoIs); - if ( timerSvc() ) m_TotTimer->stop(); - return HLT::NAV_ERROR; - } - if ( !roiDescriptor2 ) { - ATH_MSG_ERROR("roiDescriptor2 is NULL" ); - return HLT::NAV_ERROR; - } - - - ATH_MSG_DEBUG("Using inputTEs: "<< inputTE[mu1_TE] << " and " << inputTE[mu2_TE] << " with Ids " << inputTE[mu1_TE]->getId()<< " AND "<< inputTE[mu2_TE]->getId() - << "; RoI IDs = " << roiDescriptor1->roiId()<< " AND " <<roiDescriptor2->roiId() << ": Eta1 = " << roiDescriptor1->eta() << " Eta2= " <<roiDescriptor2->eta() - << ", Phi1 = " << roiDescriptor1->phi() << " Phi2= " <<roiDescriptor2->phi() ); - - // Fill RoIs monitoring containers - m_mon_RoI_RoI1Eta.push_back(roiDescriptor1->eta()); - m_mon_RoI_RoI1Phi.push_back(roiDescriptor1->phi()); - m_mon_RoI_RoI2Eta.push_back(roiDescriptor2->eta()); - m_mon_RoI_RoI2Phi.push_back(roiDescriptor2->phi()); - m_mon_RoI_dEtaRoI.push_back( fabs(roiDescriptor1->eta() - roiDescriptor2->eta()) ); - float tmp_RoI_dPhiRoI = roiDescriptor1->phi() - roiDescriptor2->phi(); - while (tmp_RoI_dPhiRoI > M_PI) tmp_RoI_dPhiRoI -= 2*M_PI; - while (tmp_RoI_dPhiRoI < -M_PI) tmp_RoI_dPhiRoI += 2*M_PI; - m_mon_RoI_dPhiRoI.push_back( fabs(tmp_RoI_dPhiRoI) ); - - // Retrieve muons - //JW - std::vector<ElementLink<xAOD::TrackParticleContainer> > muonTPELtracks1; - std::vector<ElementLink<xAOD::TrackParticleContainer> > muonTPELtracks2; - std::vector<ElementLink<xAOD::TrackParticleContainer> > muonTPELtracksMerged; // combined unique tracks from roi 1 and 2 - - // const DataHandle<MuidTrackContainer> MuidTracksEF1, MuidTracksEF2; - //const MuidTrackContainer* MuEFTracksEF1; - //const MuidTrackContainer* MuEFTracksEF2; - - // Get the muon container from the outputTE - //std::vector<const xAOD::MuonContainer*> muonContainerEF1; - ElementLinkVector<xAOD::MuonContainer> muonContainerEF1; - ATH_MSG_DEBUG("Try to retrieve EFInfo container of muon 1" ); - //if(getFeatures(inputTE[mu1_TE], muonContainerEF1)!=HLT::OK ) { - if(getFeaturesLinks<xAOD::MuonContainer,xAOD::MuonContainer>(inputTE[mu1_TE], muonContainerEF1)!=HLT::OK ) { - ATH_MSG_DEBUG("Failed to get EFInfo feature of muon 1, exiting" ); - m_mon_Errors.push_back(ERROR_No_MuonEFInfoContainer); - if ( timerSvc() ) m_TotTimer->stop(); - return HLT::OK; // FIXME should be HLT::MISSING_FEATURE ?? - } - ATH_MSG_DEBUG("Found MuonContainer, Got MuonEF (1) Feature, size = " << muonContainerEF1.size()); - - for ( const ElementLink<xAOD::MuonContainer> muel : muonContainerEF1 ) { - if ( (*muel)->muonType() != xAOD::Muon::Combined && (*muel)->muonType() != xAOD::Muon::SegmentTagged) { - ATH_MSG_DEBUG("Muon from roi1 is neither Combined or SegmentTagged - reject" ); - continue; - } - const xAOD::Muon* mu = *muel; - if(!mu) continue; - const xAOD::TrackParticle* idtp(0); - const ElementLink<xAOD::TrackParticleContainer> & idtpEl = mu->inDetTrackParticleLink(); - if( idtpEl.isValid() ) idtp = *idtpEl; - if (!idtp) { - ATH_MSG_DEBUG("No innerdetector muon1 TrackParticle found" ); - continue; - } - addUnique(muonTPELtracks1,idtpEl); - addUnique(muonTPELtracksMerged,idtpEl); - - ATH_MSG_DEBUG(" Comb muon 1 pt/eta/phi " << idtp->pt() << " / " << idtp->eta() << " / " << idtp->phi()); - } // for - - // second - - //std::vector<const xAOD::MuonContainer*> muonContainerEF2; - ElementLinkVector<xAOD::MuonContainer> muonContainerEF2; - ATH_MSG_DEBUG("Try to retrieve EFInfo container of muon 2" ); - //if(getFeatures(inputTE[mu2_TE], muonContainerEF2)!=HLT::OK ) { - if(getFeaturesLinks<xAOD::MuonContainer,xAOD::MuonContainer>(inputTE[mu2_TE], muonContainerEF2)!=HLT::OK ) { - ATH_MSG_DEBUG("Failed to get EFInfo feature of muon 2, exiting" ); - m_mon_Errors.push_back(ERROR_No_MuonEFInfoContainer); - if ( timerSvc() ) m_TotTimer->stop(); - return HLT::OK; // FIXME - should be - // return HLT::MISSING_FEATURE; // was HLT::OK - } - ATH_MSG_DEBUG("Found MuonContainer, Got MuonEF (2) Feature, size = " << muonContainerEF2.size()); - - for ( const ElementLink<xAOD::MuonContainer> muel : muonContainerEF2 ) { - if ( (*muel)->muonType() != xAOD::Muon::Combined && (*muel)->muonType() != xAOD::Muon::SegmentTagged) { - ATH_MSG_DEBUG("Muon from roi2 is neither Combined or SegmentTagged - reject" ); - continue; - } - const xAOD::Muon* mu = *muel; - if(!mu) continue; - const xAOD::TrackParticle* idtp(0); - const ElementLink<xAOD::TrackParticleContainer> & idtpEl = mu->inDetTrackParticleLink(); - if( idtpEl.isValid() ) idtp = *idtpEl; - if (!idtp) { - ATH_MSG_DEBUG("No innerdetector muon2 TrackParticle found" ); - continue; - } - addUnique(muonTPELtracks2,idtpEl); - addUnique(muonTPELtracksMerged,idtpEl); - ATH_MSG_DEBUG("Comb muon 1 pt/eta/phi " << idtp->pt() << " / " << idtp->eta() << " / " << idtp->phi()); - - } // for loop over muons - - // build a map of the tracks and corresponding muons - std::map<const xAOD::TrackParticle*, ElementLink<xAOD::MuonContainer> > mapTrkToMuons; - //for (auto& muCont: muonContainerEF1) { - for (const ElementLink<xAOD::MuonContainer> mu : muonContainerEF1) { - auto idtp = (*mu)->inDetTrackParticleLink(); - if (!idtp.isValid()) continue; - if (!*idtp) continue; - //if (!(*idtp)->track()) continue; - mapTrkToMuons[(*idtp)] = mu; - } // muCont - //} // muonContainerEF1 - //for (auto& muCont: muonContainerEF2) { - for (const ElementLink<xAOD::MuonContainer> mu : muonContainerEF2) { - auto idtp = (*mu)->inDetTrackParticleLink(); - if (!idtp.isValid()) continue; - if (!*idtp) continue; - //if (!(*idtp)->track()) continue; - mapTrkToMuons[(*idtp)] = mu; - } // muCont - //} // muonContainerEF2 - - if(msgLvl() <= MSG::DEBUG) { - msg() << MSG::DEBUG << "muonContainerEF1.size()= " << muonContainerEF1.size()<< " muonContainerEF2.size()= " << muonContainerEF2.size() - << " uonTPELtracks1.size()= " << muonTPELtracks1.size() << " muonTPELtracks2.size()= " << muonTPELtracks2.size() << " muonTPELtracksMerged.size()= " << muonTPELtracksMerged.size() <<endmsg; - - for (const auto& muel: muonTPELtracks1) { - msg() << MSG::DEBUG << "muonTPELtracks1: " << *muel << " " << (*muel)->pt() << " , " << (*muel)->eta() << " , " << (*muel)->phi() << " , " << (*muel)->charge() << endmsg; - } - for (const auto& muel: muonTPELtracks2) { - msg() << MSG::DEBUG << "muonTPELtracks2: " << *muel << " " << (*muel)->pt() << " , " << (*muel)->eta() << " , " << (*muel)->phi() << " , " << (*muel)->charge() << endmsg; - } - for (const auto& muel: muonTPELtracksMerged) { - msg() << MSG::DEBUG << "muonTPELtracksMerged: " << *muel << " " << (*muel)->pt() << " , " << (*muel)->eta() << " , " << (*muel)->phi() << " , " << (*muel)->charge() << endmsg; - } - } // if debug - - m_TrigBphysColl_b = new xAOD::TrigBphysContainer(); - xAOD::TrigBphysAuxContainer xAODTrigBphysAuxColl_b; - m_TrigBphysColl_b->setStore(&xAODTrigBphysAuxColl_b); - - m_TrigBphysColl_X = new xAOD::TrigBphysContainer(); - xAOD::TrigBphysAuxContainer xAODTrigBphysAuxColl_X; - m_TrigBphysColl_X->setStore(&xAODTrigBphysAuxColl_X); - - // Tried combinations counter - protection against timeouts - int nTriedCombinations(0); - - if( !(muonTPELtracks1.size()> 0 && muonTPELtracks2.size() > 0) ) - { - ATH_MSG_DEBUG("No muon candidate found for one or both TEs" ); - m_mon_Errors.push_back(ERROR_No_MuonCandidate); - //delete m_trigBphysColl_b; - //delete m_trigBphysColl_X; - delete m_TrigBphysColl_b; - delete m_TrigBphysColl_X; - m_TrigBphysColl_b = 0; - m_TrigBphysColl_X = 0; - if ( timerSvc() ) m_TotTimer->stop(); - return HLT::OK; - } else { - - // Loop over muons - const Amg::Vector3D beamspot = m_bphysHelperTool->getBeamSpot(Gaudi::Hive::currentContext()); - - for(auto pElItr=muonTPELtracksMerged.begin(); pElItr != muonTPELtracksMerged.end(); ++pElItr) { - for(auto mElItr=pElItr+1; mElItr != muonTPELtracksMerged.end(); ++mElItr) { - auto pTp = **pElItr; - auto mTp = **mElItr; - ATH_MSG_DEBUG("Try to build muon pair from mu1 " << *(*pElItr) << ", mu2 " << *(*mElItr) ); - - // check that we have two different muon tracks - if (pTp==mTp) { - ATH_MSG_DEBUG("Muon tracks are same" ); - m_mon_Errors.push_back(ERROR_SameMuon); - continue; - } - m_countPassedMuMuID++; - - // check if muons have opposite signs - if( m_oppositeCharge && (mTp->charge())*(pTp->charge()) > 0) { - ATH_MSG_DEBUG("Muon pair rejected by opposite change check: mu1 " << pTp->charge() << ", mu2 " << mTp->charge() ); - continue; - } - m_countPassedMuMuOS++; - - // check if dimuon mass within the range - //float massMuMu = XMass(*pItr,*mItr,di_to_muons); - float massMuMu = XMass(pTp,mTp,di_to_muons); - if( massMuMu < m_lowerMuMuMassCut || massMuMu > m_upperMuMuMassCut ) { - ATH_MSG_DEBUG("Muon pair rejected by mass cut: m = " << massMuMu ); - continue; - } - m_countPassedMuMuMass++; - ATH_MSG_DEBUG("Muon pair accepted by mass cut: m = " << massMuMu ); - - if ( timerSvc() ) m_VtxFitTimer->resume(); - //xAOD::TrigBphys * trigMuMuObj = new xAOD::TrigBphys; - std::unique_ptr<xAOD::TrigBphys> trigMuMuUniquePtr(new xAOD::TrigBphys); - trigMuMuUniquePtr->makePrivateStore(); - trigMuMuUniquePtr->initialise(0,0.,0.,0., - xAOD::TrigBphys::BMUMUX, massMuMu, xAOD::TrigBphys::EF); - std::vector<ElementLink<xAOD::TrackParticleContainer> > vec_mumu_tracks = {*pElItr,*mElItr}; - std::vector<double> masses_mumu = {MUMASS,MUMASS}; - if (!m_bphysHelperTool->vertexFit(trigMuMuUniquePtr.get(), - vec_mumu_tracks,masses_mumu).isSuccess()) { - ATH_MSG_DEBUG(" Vertex fitting failed." ); - if ( timerSvc() ) m_VtxFitTimer->pause(); - continue; - } - if ( timerSvc() ) m_VtxFitTimer->pause(); - - - m_countPassedMuMuVtx++; - - float chi2MuMu = trigMuMuUniquePtr->fitchi2(); - if(chi2MuMu > m_muVtxChi2Cut || chi2MuMu < 0) { - ATH_MSG_DEBUG("Muon pair rejected by chi2 cut: chi2 = " << chi2MuMu ); - continue; - } - m_countPassedMuMuVtxChi2++; - - - // Fill muons monitoring containers - m_mon_DiMu_Pt_Mu1.push_back (pTp->pt()/1000.); - m_mon_DiMu_Pt_Mu2.push_back (mTp->pt()/1000.); - m_mon_DiMu_Eta_Mu1.push_back(pTp->eta()); - m_mon_DiMu_Eta_Mu2.push_back(mTp->eta()); - m_mon_DiMu_Phi_Mu1.push_back(pTp->phi()); - m_mon_DiMu_Phi_Mu2.push_back(mTp->phi()); - - m_mon_DiMu_dEtaMuMu.push_back( fabs(pTp->eta() - mTp->eta()) ); - float tmp_DiMu_dPhiMuMu = roiDescriptor1->phi() - roiDescriptor2->phi(); - while (tmp_DiMu_dPhiMuMu > M_PI) tmp_DiMu_dPhiMuMu -= 2*M_PI; - while (tmp_DiMu_dPhiMuMu < -M_PI) tmp_DiMu_dPhiMuMu += 2*M_PI; - m_mon_DiMu_dPhiMuMu.push_back( fabs(tmp_DiMu_dPhiMuMu) ); - m_mon_DiMu_pTsumMuMu.push_back( (pTp->pt() + mTp->pt())/1000. ); - m_mon_DiMu_InvMassMuMu.push_back(massMuMu/1000.); - m_mon_DiMu_VtxMassMuMu.push_back(trigMuMuUniquePtr->fitmass()/1000.); - m_mon_DiMu_Chi2MuMu.push_back(chi2MuMu); - - m_mon_DiMu_n++; - - ATH_MSG_DEBUG(" Dimuon Sec Vtx at (" << trigMuMuUniquePtr->fitx() << " , " << trigMuMuUniquePtr->fity() << " , " - << trigMuMuUniquePtr->fitz() << ") with chi2 = " << trigMuMuUniquePtr->fitchi2() << " (" - << trigMuMuUniquePtr->fitndof() << " dof)" << " Mass= "<< massMuMu ); - - // JK look for tracks in TrackParticle containers and add to TrigEFBphys - // - // TODO - // Doesn't work now: track pointers *pItr, *mItr are not the same as in vectorTrkParticleCollections elements - // - bool Found1Track=false; - bool Found2Track=false; - - // test for new method of track retrieval - //const xAOD::TrackParticleContainer *tracksRoiI1(nullptr); - //const xAOD::TrackParticleContainer *tracksRoiI2(nullptr); - // Sergey S.: Retrieve tracks as ELs - ElementLinkVector<xAOD::TrackParticleContainer> tracksRoiI1; - ElementLinkVector<xAOD::TrackParticleContainer> tracksRoiI2; - //get the tracks for each roi - //HLT::ErrorCode status = getFeature(inputTE.front(), tracksRoiI1); // Need to insert the correct label - HLT::ErrorCode status = getFeaturesLinks< xAOD::TrackParticleContainer, xAOD::TrackParticleContainer > (inputTE.front(), tracksRoiI1, m_input_trackCollectionKey); - if(status != HLT::OK) { - ATH_MSG_WARNING( "Failed to get xAOD::TrackParticleCollection from the 1st trigger element" ); - m_mon_Errors.push_back(ERROR_No_TrackColl); - delete m_TrigBphysColl_b; - delete m_TrigBphysColl_X; - m_TrigBphysColl_b = NULL; - m_TrigBphysColl_X = NULL; - return HLT::MISSING_FEATURE; - } - //status = getFeature(inputTE.back() , tracksRoiI2); // Need to insert the correct label - status = getFeaturesLinks< xAOD::TrackParticleContainer, xAOD::TrackParticleContainer > (inputTE.back(), tracksRoiI2, m_input_trackCollectionKey); - if(status != HLT::OK) { - ATH_MSG_WARNING( "Failed to get xAOD::TrackParticleCollection from the 2nd trigger element" ); - m_mon_Errors.push_back(ERROR_No_TrackColl); - delete m_TrigBphysColl_b; - delete m_TrigBphysColl_X; - m_TrigBphysColl_b = NULL; - m_TrigBphysColl_X = NULL; - if ( timerSvc() ) m_TotTimer->stop(); - return HLT::MISSING_FEATURE; - } - ATH_MSG_DEBUG("Ntracks RoI1: " << ( tracksRoiI1.empty() ? -1 : tracksRoiI1.size()) << ", Ntracks RoI2: " << ( tracksRoiI2.empty() ? -1 : tracksRoiI2.size() ) ); - // JW if containers are empty - it's not necessarily an issue; right? - // if ( tracksRoiI1.empty() || tracksRoiI2.empty()) { - // ATH_MSG_WARNING( "Null track pointer" ); - // m_mon_Errors.push_back(ERROR_No_TrackColl); - // delete m_TrigBphysColl_b; - // delete m_TrigBphysColl_X; - // m_TrigBphysColl_b = NULL; - // m_TrigBphysColl_X = NULL; - // if ( timerSvc() ) m_TotTimer->stop(); - // return HLT::MISSING_FEATURE; - // } - - std::vector<const xAOD::TrackParticle*> merged_tracks; - merged_tracks.reserve(tracksRoiI1.size() + tracksRoiI2.size()); - - // in order to use the element links, create a map of the particle pointer, and the corresponding container, and index - struct ElIndex{ - int roi; - int index; - ElementLink<xAOD::TrackParticleContainer> elLink; - }; - std::map<const xAOD::TrackParticle*, ElIndex> mapTrackToIndex; - std::map<const xAOD::TrackParticle*, ElementLink<xAOD::TrackParticleContainer> > mapTrackToEL; - - int idCounter(0); - for (const ElementLink<xAOD::TrackParticleContainer> trk: tracksRoiI1) { - // merged_tracks.push_back(trk); - addUnique(merged_tracks,*trk); - ElIndex tmp; - tmp.roi = 1; - tmp.index = idCounter; - tmp.elLink = trk; - mapTrackToIndex.insert( std::make_pair(*trk,tmp)); - ++idCounter; - } - idCounter = 0; - for (const ElementLink<xAOD::TrackParticleContainer> trk: tracksRoiI2) { - // merged_tracks.push_back(trk); - addUnique(merged_tracks,*trk); - ElIndex tmp; - tmp.roi = 2; - tmp.index = idCounter; - tmp.elLink = trk; - mapTrackToIndex.insert(std::make_pair(*trk,tmp)); - ++idCounter; - } - - if(msgLvl() <= MSG::DEBUG) { - msg() << MSG::DEBUG << "Merged Counts: " << merged_tracks.size() << "With merged tracks:\n"; - for (auto trk: merged_tracks) { - msg() << MSG::DEBUG << trk << " TrackParticle: pt/eta/phi/q/d0/z0: " - << trk->pt() << " , " << trk->eta() << " , " << trk->phi() << " , " << trk->charge() << " , " - << trk->d0() << " , " << trk->z0()<< "\n"; - if (trk->track()) { - if(trk->track()->perigeeParameters()) { - int qsign = (trk->track()->perigeeParameters()->parameters()[Trk::qOverP] > 0 ? +1 : -1); - msg() << MSG::DEBUG << trk->track() << " and Trk::Track: pt/eta/phi/q/d0/z0: " - << trk->track()->perigeeParameters()->pT() << " , " - << trk->track()->perigeeParameters()->eta() << " , " - << trk->track()->perigeeParameters()->parameters()[Trk::phi0] << " , " - << qsign << " , " - << trk->track()->perigeeParameters()->parameters()[Trk::d0] << " , " - << trk->track()->perigeeParameters()->parameters()[Trk::z0] << "\n"; - } else { - msg() << MSG::DEBUG << "Trk::Track with no perigeeParameters\n"; - } - } else { - msg() << MSG::DEBUG << " no Trk::Track\n" ; - } - } - msg() << MSG::DEBUG << endmsg; - } // if debug - - - // loop to find the muon associated withthe trk::track. can be optimised - // int piTrk(-1),miTrk(-1); - // JW just make a reference to the El-link, for simplicity of code updation. - ElementLink<xAOD::TrackParticleContainer> &trackELmu1 = *pElItr; - ElementLink<xAOD::TrackParticleContainer> &trackELmu2 = *mElItr; - ElementLink<xAOD::IParticleContainer> ELmu1; - ElementLink<xAOD::IParticleContainer> ELmu2; - auto trkmuit = mapTrkToMuons.find(*trackELmu1); - if (trkmuit != mapTrkToMuons.end()) { - //trackELmu1 = (*(trkmuit->second))->inDetTrackParticleLink(); - ELmu1.resetWithKeyAndIndex(trkmuit->second.dataID(),trkmuit->second.index()); - Found1Track = true; - } // if - trkmuit = mapTrkToMuons.find(*trackELmu2); - if (trkmuit != mapTrkToMuons.end()) { - //trackELmu2 = (*(trkmuit->second))->inDetTrackParticleLink(); - ELmu2.resetWithKeyAndIndex(trkmuit->second.dataID(),trkmuit->second.index()); - Found2Track = true; - } // if - // ELmu1.resetWithKeyAndIndex(pTp->dataID(),pTp->index()); - // Found1Track = true; - // ELmu2.resetWithKeyAndIndex(mTp->dataID(),mTp->index()); - // Found2Track = true; - - ATH_MSG_DEBUG("Matching summary: " << Found1Track<<Found2Track ); - - - ATH_MSG_DEBUG(" Now loop over TrackParticles to find tracks " ); - // xAOD::TrackParticleContainer::const_iterator trkIt = merged_tracks.begin(); - // xAOD::TrackParticleContainer::const_iterator lastTrkIt = merged_tracks.end(); - //std::vector<const xAOD::TrackParticle*>::const_iterator trkIt = merged_tracks.begin(); - std::vector<const xAOD::TrackParticle*>::const_iterator lastTrkIt = merged_tracks.end(); - - ATH_MSG_DEBUG("Found tracks, ntrack= " << merged_tracks.size() ); - - - // Main outer loop over tracks - //xAOD::TrackParticleContainer::const_iterator trkIt1 = merged_tracks.begin(); - std::vector<const xAOD::TrackParticle*>::const_iterator trkIt1 = merged_tracks.begin(); - - for (int itrk1=0 ; trkIt1 != lastTrkIt; itrk1++, trkIt1++) - { - const xAOD::TrackParticle* track1 = (*trkIt1); - -// ElementLink<xAOD::TrackParticleContainer> trackEL3( mapTrackToIndex[*trkIt1].roi == 1 ? tracksRoiI1[0].dataID() : tracksRoiI2[0].dataID(), mapTrackToIndex[*trkIt1].index); -// ElementLink<xAOD::IParticleContainer> ItrackEL3; -// ItrackEL3.resetWithKeyAndIndex(mapTrackToIndex[*trkIt1].roi == 1 ? tracksRoiI1[0].dataID() : tracksRoiI2[0].dataID(), mapTrackToIndex[*trkIt1].index); - - ElementLink<xAOD::TrackParticleContainer> & trackEL3 = mapTrackToIndex[*trkIt1].elLink; - ElementLink<xAOD::IParticleContainer> ItrackEL3; - ItrackEL3.resetWithKeyAndIndex(trackEL3.dataID(), trackEL3.index()); - - if (*trackEL3 != track1) { - ATH_MSG_FATAL("Track 1 doesn't match dereferenced elementlink: " << track1 << " " << *trackEL3 ); - if ( timerSvc() ) m_TotTimer->stop(); - return HLT::MISSING_FEATURE; - } - - // Check that it is not muon track - // if(itrk1==piTrk || itrk1==miTrk) { - // ATH_MSG_DEBUG("Track " << track1 << " was matched to a muon, skip it" ); - // continue; - // } - - // ST: EL comparison does not work -- they appear to be always different - // if(trackEL3 == trackELmu1 || trackEL3 == trackELmu2 ) { - // ATH_MSG_DEBUG("Track " << track1 << " was matched to a muon, skip it" ); - // continue; - // } - if( !(Found1Track && isUnique(*trkIt1,*trackELmu1)) || !(Found2Track &&isUnique(*trkIt1,*trackELmu2)) ) { - ATH_MSG_DEBUG("Track " << track1 << " was matched to a muon, skip it" ); - continue; - } - - // Fill tracks monitoring containers - m_mon_Tracks_Pt.push_back (track1->pt()/1000.); - m_mon_Tracks_Eta.push_back(track1->eta()); - m_mon_Tracks_Phi.push_back(track1->phi()); - - m_mon_Tracks_n++; - - // - // B+ -> mu mu K+ part - // - if(m_doB_KMuMuDecay) { - xAOD::TrigBphys* trigPartBplusMuMuKplus = checkBplusMuMuKplus(trackEL3,trackELmu1,trackELmu2); - ++nTriedCombinations; - if (trigPartBplusMuMuKplus) { - m_bphysHelperTool->setBeamlineDisplacement(trigPartBplusMuMuKplus,{*trackEL3,*trackELmu1,*trackELmu2}, beamspot); - if(m_maxBpToStore >= 0 && m_countBpToStore >= m_maxBpToStore) { - if(m_countBpToStore == m_maxBpToStore) { - ATH_MSG_WARNING("Reached maximum number of B+ candidates to store " << m_maxBpToStore << "; following candidates won't be written out" ); - m_mon_Errors.push_back(ERROR_MaxNumBpReached); - } - else - ATH_MSG_DEBUG("Do not write out " << m_countBpToStore+1 << "th B+ candidate" ); - } - else { - m_TrigBphysColl_b->push_back(trigPartBplusMuMuKplus); - // trackParticleLinks are set by the vertexing method - trigPartBplusMuMuKplus->addParticleLink(ItrackEL3); // Sergey S. - if(Found1Track) trigPartBplusMuMuKplus->addParticleLink(ELmu1); - if(Found2Track) trigPartBplusMuMuKplus->addParticleLink(ELmu2); - } - result=true; - m_mon_BMuMuK_n++; - m_countBpToStore++; - if(IdEvent!=m_lastEventPassedBplus) { - m_countPassedEventsBplus++; - m_lastEventPassedBplus = IdEvent; - } - - } - } // end if(m_doB_KMuMuDecay) - - - // Protection - if( nTriedCombinations > m_maxNcombinations ) { - ATH_MSG_DEBUG("Too many track combinations: nTried = " << nTriedCombinations << ", while Max= " << m_maxNcombinations - << ". Terminate the loop." << " (BphysColl size=" << m_TrigBphysColl_b->size() << ")" ); - if(m_TrigBphysColl_b->size() > 0) - m_mon_Errors.push_back(ERROR_TooManyComb_Acc); - else - m_mon_Errors.push_back(ERROR_TooManyComb_Rej); - break; - } - - // Inner loop over tracks - //xAOD::TrackParticleContainer::const_iterator trkIt2 = trkIt1 + 1; - std::vector<const xAOD::TrackParticle*>::const_iterator trkIt2 = trkIt1 + 1; - for (int itrk2=itrk1+1 ; trkIt2 != lastTrkIt; itrk2++, trkIt2++) - { - //If timeout has happened in spite of the protection - if ( Athena::Timeout::instance().reached() ) { - return HLT::ErrorCode(HLT::Action::ABORT_EVENT, HLT::Reason::TIMEOUT); - } - - if(m_doBd_KstarMuMuDecay || m_doBs_Phi1020MuMuDecay || m_doLb_LambdaMuMuDecay || m_doBc_DsMuMuDecay || m_doBc_DplusMuMuDecay || m_doBc_DstarMuMuDecay || m_doBc_D0MuMuDecay) { - const xAOD::TrackParticle* track2 = (*trkIt2); - - // Sergey S. - // ElementLink<xAOD::TrackParticleContainer> trackEL4( mapTrackToIndex[*trkIt2].roi == 1 ? tracksRoiI1[0].dataID() : tracksRoiI2[0].dataID(), mapTrackToIndex[*trkIt2].index); - // ElementLink<xAOD::IParticleContainer> ItrackEL4; - // ItrackEL4.resetWithKeyAndIndex(mapTrackToIndex[*trkIt2].roi == 1 ? tracksRoiI1[0].dataID() : tracksRoiI2[0].dataID(), mapTrackToIndex[*trkIt2].index); - - ElementLink<xAOD::TrackParticleContainer> & trackEL4 = mapTrackToIndex[*trkIt2].elLink; - ElementLink<xAOD::IParticleContainer> ItrackEL4; - ItrackEL4.resetWithKeyAndIndex(trackEL4.dataID(), trackEL4.index()); - - - if (*trackEL4 != track2) { - ATH_MSG_FATAL("Track 2 doesn't match dereferenced elementlink: " << track2 << " " << *trackEL4 ); - if ( timerSvc() ) m_TotTimer->stop(); - return HLT::MISSING_FEATURE; - } - - - // Check that it is not muon track -// if(itrk2==piTrk || itrk2==miTrk) { -// ATH_MSG_DEBUG("Track " << track2 << " was matched to a muon, skip it" ); -// continue; -// } - if( !(Found1Track && isUnique(*trkIt2,*trackELmu1)) || !(Found2Track &&isUnique(*trkIt2,*trackELmu2)) ) { - ATH_MSG_DEBUG("Track " << track2 << " was matched to a muon, skip it" ); - continue; - } - - // check that track1 and track2 have opposite charges - // if( (track1->charge())*(track2->charge()) > 0) { - // ATH_MSG_DEBUG("Track pair rejected by opposite charge check: " - // << track1 << " = " << track1->charge() << ", " - // << track2 << " = " << track2->charge() ); - // continue; - // } - - // - // Bd -> mu mu K0* (K+ pi-) part - // - if(m_doBd_KstarMuMuDecay) { - - // check that track1 and track2 have opposite charges - if( (track1->charge())*(track2->charge()) > 0) { - ATH_MSG_DEBUG("Track pair rejected by opposite charge check: " - << track1 << " = " << track1->charge() << ", " << track2 << " = " << track2->charge() ); - } else { - // Mass hypothesis 1: track1 = kaon, track2 = pion - xAOD::TrigBphys* xaod_trigPartKstar(nullptr); - xAOD::TrigBphys* xaod_trigPartBdMuMuKstar = checkBMuMu2X(trackEL3,trackEL4,trackELmu1,trackELmu2, - bD_to_Kstar,xaod_trigPartKstar); - ++nTriedCombinations; - if (xaod_trigPartBdMuMuKstar) { - m_bphysHelperTool->setBeamlineDisplacement(xaod_trigPartBdMuMuKstar,{*trackEL3,*trackEL4,*trackELmu1,*trackELmu2}, beamspot); - m_bphysHelperTool->setBeamlineDisplacement(xaod_trigPartKstar, {*trackEL3,*trackEL4}, beamspot); - - if(m_maxBdToStore >= 0 && m_countBdToStore >= m_maxBdToStore) { - if(m_countBdToStore == m_maxBdToStore) { - ATH_MSG_WARNING("Reached maximum number of Bd candidates to store " << m_maxBdToStore << "; following candidates won't be written out" ); - m_mon_Errors.push_back(ERROR_MaxNumBdReached); - } - else - ATH_MSG_DEBUG("Do not write out " << m_countBdToStore+1 << "th Bd candidate" ); - } - else { - m_TrigBphysColl_b->push_back(xaod_trigPartBdMuMuKstar); - m_TrigBphysColl_X->push_back(xaod_trigPartKstar ); - // trackParticleLinks are set by the vertexing method - xaod_trigPartBdMuMuKstar->addParticleLink(ItrackEL3); // Sergey S. - xaod_trigPartBdMuMuKstar->addParticleLink(ItrackEL4); - if(Found1Track) xaod_trigPartBdMuMuKstar->addParticleLink(ELmu1); - if(Found2Track) xaod_trigPartBdMuMuKstar->addParticleLink(ELmu2); - - xaod_trigPartKstar->addParticleLink(ItrackEL3); // Sergey S. - xaod_trigPartKstar->addParticleLink(ItrackEL4); - - // set the secondary link; note, does not set correctly for persistified data. - // see code further down for the re-setting of these links - int iKstar = m_TrigBphysColl_X->size() - 1; - ElementLink<xAOD::TrigBphysContainer> trigPartXEL(*m_TrigBphysColl_X,iKstar); - xaod_trigPartBdMuMuKstar->setSecondaryDecayLink(trigPartXEL); - } - result=true; - m_mon_BdMuMuKs_n++; - m_countBdToStore++; - if(IdEvent!=m_lastEventPassedBplus) { - m_countPassedEventsBplus++; - m_lastEventPassedBplus = IdEvent; - } - - } // if hypo1 - xaod_trigPartKstar = nullptr; //hypo 1 added to SG(if exists), so reuse the pointer - - // Mass hypothesis 2: track1 = pion, track2 = kaon - xaod_trigPartBdMuMuKstar = checkBMuMu2X(trackEL4,trackEL3,trackELmu1,trackELmu2, - bD_to_Kstar,xaod_trigPartKstar); - ++nTriedCombinations; - if (xaod_trigPartBdMuMuKstar) { - m_bphysHelperTool->setBeamlineDisplacement(xaod_trigPartBdMuMuKstar,{*trackEL4,*trackEL3,*trackELmu1,*trackELmu2}, beamspot); - m_bphysHelperTool->setBeamlineDisplacement(xaod_trigPartKstar, {*trackEL4,*trackEL3}, beamspot); - if(m_maxBdToStore >= 0 && m_countBdToStore >= m_maxBdToStore) { - if(m_countBdToStore == m_maxBdToStore) { - ATH_MSG_WARNING("Reached maximum number of Bd candidates to store " << m_maxBdToStore << "; following candidates won't be written out" ); - m_mon_Errors.push_back(ERROR_MaxNumBdReached); - } - else - ATH_MSG_DEBUG("Do not write out " << m_countBdToStore+1 << "th Bd candidate" ); - } - else { - m_TrigBphysColl_b->push_back(xaod_trigPartBdMuMuKstar); - m_TrigBphysColl_X->push_back(xaod_trigPartKstar ); - // trackParticleLinks are set by the vertexing method - xaod_trigPartBdMuMuKstar->addParticleLink(ItrackEL4); // Sergey S. - xaod_trigPartBdMuMuKstar->addParticleLink(ItrackEL3); - if(Found1Track) xaod_trigPartBdMuMuKstar->addParticleLink(ELmu1); - if(Found2Track) xaod_trigPartBdMuMuKstar->addParticleLink(ELmu2); - - xaod_trigPartKstar->addParticleLink(ItrackEL4); // Sergey S. - xaod_trigPartKstar->addParticleLink(ItrackEL3); - - // set the secondary link; note, does not set correctly for persistified data. - // see code further down for the re-setting of these links - int iKstar = m_TrigBphysColl_X->size() - 1; - ElementLink<xAOD::TrigBphysContainer> trigPartXEL(*m_TrigBphysColl_X,iKstar); - xaod_trigPartBdMuMuKstar->setSecondaryDecayLink(trigPartXEL); - } - result=true; - m_mon_BdMuMuKs_n++; - m_countBdToStore++; - if(IdEvent!=m_lastEventPassedBplus) { - m_countPassedEventsBplus++; - m_lastEventPassedBplus = IdEvent; - } - - } // if hypo2 - } // end check that track1 and track2 have opposite charges - } // if m_doBd_KstarMuMuDecay - - - // - // Bs -> mu mu Phi (K K) part - // - if(m_doBs_Phi1020MuMuDecay) { - - // check that track1 and track2 have opposite charges - if( (track1->charge())*(track2->charge()) > 0) { - ATH_MSG_DEBUG("Track pair rejected by opposite charge check: " - << track1 << " = " << track1->charge() << ", " << track2 << " = " << track2->charge() ); - } else { - - xAOD::TrigBphys* xaod_trigPartPhi(nullptr); - xAOD::TrigBphys* xaod_trigPartBsMuMuPhi = checkBMuMu2X(trackEL3,trackEL4,trackELmu1,trackELmu2, - bS_to_Phi,xaod_trigPartPhi); - - ++nTriedCombinations; - if (xaod_trigPartBsMuMuPhi) { - m_bphysHelperTool->setBeamlineDisplacement(xaod_trigPartBsMuMuPhi,{*trackEL3,*trackEL4,*trackELmu1,*trackELmu2}, beamspot); - m_bphysHelperTool->setBeamlineDisplacement(xaod_trigPartPhi, {*trackEL3,*trackEL4}, beamspot); - - if(m_maxBsToStore >= 0 && m_countBsToStore >= m_maxBsToStore) { - if(m_countBsToStore == m_maxBsToStore) { - ATH_MSG_WARNING("Reached maximum number of Bs candidates to store " << m_maxBsToStore << "; following candidates won't be written out" ); - m_mon_Errors.push_back(ERROR_MaxNumBsReached); - } - else - ATH_MSG_DEBUG("Do not write out " << m_countBsToStore+1 << "th Bs candidate" ); - } - else { - m_TrigBphysColl_b->push_back(xaod_trigPartBsMuMuPhi); - m_TrigBphysColl_X->push_back(xaod_trigPartPhi ); - // trackParticleLinks are set by the vertexing method - xaod_trigPartBsMuMuPhi->addParticleLink(ItrackEL3); // Sergey S. - xaod_trigPartBsMuMuPhi->addParticleLink(ItrackEL4); - if(Found1Track) xaod_trigPartBsMuMuPhi->addParticleLink(ELmu1); - if(Found2Track) xaod_trigPartBsMuMuPhi->addParticleLink(ELmu2); - - xaod_trigPartPhi->addParticleLink(ItrackEL3); // Sergey S. - xaod_trigPartPhi->addParticleLink(ItrackEL4); - - // set the secondary link; note, does not set correctly for persistified data. - // see code further down for the re-setting of these links - int iPhi = m_TrigBphysColl_X->size() - 1; - ElementLink<xAOD::TrigBphysContainer> trigPartXEL(*m_TrigBphysColl_X,iPhi); - xaod_trigPartBsMuMuPhi->setSecondaryDecayLink(trigPartXEL); - } - result=true; - m_mon_BsMuMuPhi_n++; - m_countBsToStore++; - if(IdEvent!=m_lastEventPassedBplus) { - m_countPassedEventsBplus++; - m_lastEventPassedBplus = IdEvent; - } - - - } - } // end check that track1 and track2 have opposite charges - } // m_doBs_Phi1020MuMuDecay - - - // - // Lambda_b -> mu mu Lambda part - // - - if(m_doLb_LambdaMuMuDecay) { - - // check that track1 and track2 have opposite charges - if( (track1->charge())*(track2->charge()) > 0) { - ATH_MSG_DEBUG("Track pair rejected by opposie charge check: " - << track1 << " = " << track1->charge() << ", " << track2 << " = " << track2->charge() ); - } else { - ATH_MSG_DEBUG("Track pair accepted by opposie charge check: " - << track1 << " = " << track1->charge() << ", " << track2 << " = " << track2->charge() ); - - std::vector<const xAOD::TrackParticle*> bTracks; - bTracks.clear(); - bTracks.push_back(track1); - bTracks.push_back(track2); - - double PtLambda = PtVal (bTracks); - - if ( PtLambda > m_lowerLambda_PtCut ) { - - bTracks.push_back(*trackELmu1); - bTracks.push_back(*trackELmu2); - - double PtLb = PtVal (bTracks); - - if ( PtLb > m_lowerLb_PtCut ) { - - - // Now L_b uses simple 4-prong vertex fit instead of cascade vertexing - // 29.06.2016, L.Gladilin: switch to cascade vertexing - - xAOD::TrigBphys* xaod_trigPartLambda(nullptr); - - if ( fabs(1./(track1->qOverP())) >= fabs(1./(track2->qOverP())) ) { - // 29.06.2016, L.Gladilin: take track with larger momemtum as a proton - - // Mass hypothesis 1: track1 = proton, track2 = pion - // xAOD::TrigBphys* xaod_trigPartLbMuMuLambda = checkBMuMu2X(trackEL3,trackEL4,trackELmu1,trackELmu2, - // lB_to_L,xaod_trigPartLambda); - xAOD::TrigBphys* xaod_trigPartLbMuMuLambda = checkLbMuMuLambda(trackEL3,trackEL4,trackELmu1,trackELmu2, - xaod_trigPartLambda); - ++nTriedCombinations; - if (xaod_trigPartLbMuMuLambda) { - m_bphysHelperTool->setBeamlineDisplacement(xaod_trigPartLbMuMuLambda,{*trackEL3,*trackEL4,*trackELmu1,*trackELmu2}, beamspot); - m_bphysHelperTool->setBeamlineDisplacement(xaod_trigPartLambda, {*trackEL3,*trackEL4}, beamspot); - - if(m_maxLbToStore >= 0 && m_countLbToStore >= m_maxLbToStore) { - if(m_countLbToStore == m_maxLbToStore) { - ATH_MSG_WARNING("Reached maximum number of Lb candidates to store " << m_maxLbToStore << "; following candidates won't be written out" ); - m_mon_Errors.push_back(ERROR_MaxNumLbReached); - } - else - ATH_MSG_DEBUG("Do not write out " << m_countLbToStore+1 << "th Lb candidate" ); - } - else { - m_TrigBphysColl_b->push_back(xaod_trigPartLbMuMuLambda); - m_TrigBphysColl_X->push_back(xaod_trigPartLambda ); - // trackParticleLinks are set by the vertexing method - xaod_trigPartLbMuMuLambda->addParticleLink(ItrackEL3); // Sergey S. - xaod_trigPartLbMuMuLambda->addParticleLink(ItrackEL4); - if(Found1Track) xaod_trigPartLbMuMuLambda->addParticleLink(ELmu1); - if(Found2Track) xaod_trigPartLbMuMuLambda->addParticleLink(ELmu2); - - xaod_trigPartLambda->addParticleLink(ItrackEL3); // Sergey S. - xaod_trigPartLambda->addParticleLink(ItrackEL4); - - // set the secondary link; note, does not set correctly for persistified data. - // see code further down for the re-setting of these links - int iLambda = m_TrigBphysColl_X->size() - 1; - ElementLink<xAOD::TrigBphysContainer> trigPartXEL(*m_TrigBphysColl_X,iLambda); - xaod_trigPartLbMuMuLambda->setSecondaryDecayLink(trigPartXEL); - } - result=true; - m_mon_LbMuMuLambda_n++; - m_countLbToStore++; - if(IdEvent!=m_lastEventPassedBplus) { - m_countPassedEventsBplus++; - m_lastEventPassedBplus = IdEvent; - } - - } // if hypo1 - // xaod_trigPartLambda = nullptr; //hypo 1 added to SG(if exists), so reuse the pointer - - } else { - - // Mass hypothesis 2: track1 = pion, track2 = proton - // xaod_trigPartLbMuMuLambda = checkBMuMu2X(trackEL4,trackEL3,trackELmu1,trackELmu2, - // lB_to_L,xaod_trigPartLambda); - xAOD::TrigBphys* xaod_trigPartLbMuMuLambda = checkLbMuMuLambda(trackEL4,trackEL3,trackELmu1,trackELmu2, - xaod_trigPartLambda); - ++nTriedCombinations; - if (xaod_trigPartLbMuMuLambda) { - m_bphysHelperTool->setBeamlineDisplacement(xaod_trigPartLbMuMuLambda,{*trackEL4,*trackEL3,*trackELmu1,*trackELmu2}, beamspot); - m_bphysHelperTool->setBeamlineDisplacement(xaod_trigPartLambda, {*trackEL4,*trackEL3}, beamspot); - - if(m_maxLbToStore >= 0 && m_countLbToStore >= m_maxLbToStore) { - if(m_countLbToStore == m_maxLbToStore) { - ATH_MSG_WARNING("Reached maximum number of Lb candidates to store " << m_maxLbToStore << "; following candidates won't be written out" ); - m_mon_Errors.push_back(ERROR_MaxNumLbReached); - } - else - ATH_MSG_DEBUG("Do not write out " << m_countLbToStore+1 << "th Lb candidate" ); - } - else { - m_TrigBphysColl_b->push_back(xaod_trigPartLbMuMuLambda); - m_TrigBphysColl_X->push_back(xaod_trigPartLambda ); - // trackParticleLinks are set by the vertexing method - xaod_trigPartLbMuMuLambda->addParticleLink(ItrackEL4); // Sergey S. - xaod_trigPartLbMuMuLambda->addParticleLink(ItrackEL3); - if(Found1Track) xaod_trigPartLbMuMuLambda->addParticleLink(ELmu1); - if(Found2Track) xaod_trigPartLbMuMuLambda->addParticleLink(ELmu2); - - xaod_trigPartLambda->addParticleLink(ItrackEL4); // Sergey S. - xaod_trigPartLambda->addParticleLink(ItrackEL3); - - // set the secondary link; note, does not set correctly for persistified data. - // see code further down for the re-setting of these links - int iLambda = m_TrigBphysColl_X->size() - 1; - ElementLink<xAOD::TrigBphysContainer> trigPartXEL(*m_TrigBphysColl_X,iLambda); - xaod_trigPartLbMuMuLambda->setSecondaryDecayLink(trigPartXEL); - } - result=true; - m_mon_LbMuMuLambda_n++; - m_countLbToStore++; - if(IdEvent!=m_lastEventPassedBplus) { - m_countPassedEventsBplus++; - m_lastEventPassedBplus = IdEvent; - } - } // if hypo2 - } // take track with larger momemtum as a proton - - } // Pt Lb - } // Pt Lambda - - } // end check that track1 and track2 have opposite charges - } // m_doLb_LambdaMuMuDecay - - - // - // Bc -> mu mu Ds (Phi pi) part - // - if(m_doBc_DsMuMuDecay) { - - // check that track1 and track2 have opposite charges - if( (track1->charge())*(track2->charge()) > 0) { - ATH_MSG_DEBUG("Bc -> Ds: Track pair rejected by opposie charge check: " - << track1 << " = " << track1->charge() << ", " - << track2 << " = " << track2->charge() ); - } else { - - double xPhiMass = XMass(track1,track2,bS_to_Phi); // decay = bS_to_Phi to actually calculate Phi->KK mass - - if ( xPhiMass > m_lowerPhiDs_MassCut && xPhiMass < m_upperPhiDs_MassCut ) { - - double xPhiMuMuMass = XMuMuMass (*trackELmu1,*trackELmu2,track1,track2,bS_to_Phi); - if ( xPhiMuMuMass < m_upperBc_DsMuMuMassCut - PIMASS ) { - - // 3rd loop over tracks - //xAOD::TrackParticleContainer::const_iterator trkIt3 = xAODTrkParticleCont->begin(); - std::vector<const xAOD::TrackParticle*>::const_iterator trkIt3 = merged_tracks.begin(); - - for (int itrk3=0 ; trkIt3 != lastTrkIt; itrk3++, trkIt3++) - { - const xAOD::TrackParticle* track3 = *trkIt3; - - // looping over all tracks, so expect to same tracks, but should skip those combinations - if(itrk3==itrk1 || itrk3==itrk2) { - ATH_MSG_DEBUG("Track " << track3 << " is the same as another" ); - continue; - } - - - //ElementLink<xAOD::TrackParticleContainer> trackEL5(*xAODTrkParticleCont,itrk3); - //ElementLink<xAOD::TrackParticleContainer> trackEL5( mapTrackToIndex[*trkIt3].roi == 1 ? *tracksRoiI1 : *tracksRoiI2, mapTrackToIndex[*trkIt3].index); -// ElementLink<xAOD::TrackParticleContainer> trackEL5( mapTrackToIndex[*trkIt3].roi == 1 ? tracksRoiI1[0].dataID() : tracksRoiI2[0].dataID(), mapTrackToIndex[*trkIt3].index); -// ElementLink<xAOD::IParticleContainer> ItrackEL5; -// ItrackEL5.resetWithKeyAndIndex(mapTrackToIndex[*trkIt3].roi == 1 ? tracksRoiI1[0].dataID() : tracksRoiI2[0].dataID(), mapTrackToIndex[*trkIt3].index); - - ElementLink<xAOD::TrackParticleContainer> & trackEL5 = mapTrackToIndex[*trkIt3].elLink; - ElementLink<xAOD::IParticleContainer> ItrackEL5; - ItrackEL5.resetWithKeyAndIndex(trackEL5.dataID(), trackEL5.index()); - - - if (*trackEL5 != track3) { - ATH_MSG_FATAL("Track 3 doesn't match dereferenced elementlink: " << track3 << " " << *trackEL5 ); - if ( timerSvc() ) m_TotTimer->stop(); - return HLT::MISSING_FEATURE; - } - - - - // Check that it is not muon track -// if(itrk3==piTrk || itrk3==miTrk) { -// ATH_MSG_DEBUG("Track " << track3 << " was matched to a muon, skip it" ); -// continue; -// } - if( !(Found1Track && isUnique(*trkIt3,*trackELmu1)) || !(Found2Track &&isUnique(*trkIt3,*trackELmu2)) ) { - ATH_MSG_DEBUG("Track " << track3 << " was matched to a muon, skip it" ); - continue; - } - - std::vector<const xAOD::TrackParticle*> bTracks; - bTracks.clear(); - bTracks.push_back(track1); - bTracks.push_back(track2); - bTracks.push_back(track3); - - double PtDs = PtVal (bTracks); - - if ( PtDs > m_lowerDs_PtCut ) { - - bTracks.push_back(*trackELmu1); - bTracks.push_back(*trackELmu2); - - double PtBc = PtVal (bTracks); - - if ( PtBc > m_lowerBcDs_PtCut ) { - - xAOD::TrigBphys* trigPartDs(nullptr); - xAOD::TrigBphys* trigPartBcMuMuDs = checkBcMuMuDs(trackEL3,trackEL4,trackEL5, - trackELmu1,trackELmu2, - xPhiMass,trigPartDs); - nTriedCombinations++; - if (trigPartBcMuMuDs) { - if(m_maxBcToStore >= 0 && m_countBcToStore >= m_maxBcToStore) { - if(m_countBcToStore == m_maxBcToStore) { - ATH_MSG_WARNING("Reached maximum number of Bc candidates to store " << m_maxBcToStore << "; following candidates won't be written out" ); - m_mon_Errors.push_back(ERROR_MaxNumBcReached); - } - else - ATH_MSG_DEBUG("Do not write out " << m_countBcToStore+1 << "th Bc candidate" ); - } - else { - m_TrigBphysColl_b->push_back( trigPartBcMuMuDs ); - m_TrigBphysColl_X->push_back( trigPartDs ); - m_bphysHelperTool->setBeamlineDisplacement(trigPartBcMuMuDs, - {*trkIt1,*trkIt2,*trkIt3,*trackELmu1,*trackELmu2}, beamspot); - m_bphysHelperTool->setBeamlineDisplacement(trigPartDs, - {*trkIt1,*trkIt2,*trkIt3}, beamspot); - trigPartDs->addParticleLink(ItrackEL3); - trigPartDs->addParticleLink(ItrackEL4); - trigPartDs->addParticleLink(ItrackEL5); - - int iDs = m_TrigBphysColl_X->size() - 1; - ElementLink<xAOD::TrigBphysContainer> trigPartXEL(*m_TrigBphysColl_X,iDs); - - trigPartBcMuMuDs->addParticleLink(ItrackEL3); - trigPartBcMuMuDs->addParticleLink(ItrackEL4); - trigPartBcMuMuDs->addParticleLink(ItrackEL5); - if(Found1Track) trigPartBcMuMuDs->addParticleLink(ELmu1); - if(Found2Track) trigPartBcMuMuDs->addParticleLink(ELmu2); - trigPartBcMuMuDs->setSecondaryDecayLink(trigPartXEL); - } - - result=true; - m_mon_BcMuMuDs_n++; - m_countBcToStore++; - if(IdEvent!=m_lastEventPassedBc) { - m_countPassedEventsBc++; - m_lastEventPassedBc = IdEvent; - } - - } // if trigPartBcMuMuDs - - } // Pt Bc - } // Pt Ds - } // for loop over track3 - } // in mass range - } // in phi mass range - } // end check that track1 and track2 have opposite charges - } // if m_doBc_DsMuMuDecay - - - - - // - // Bc -> mu mu D+ (pi pi K) part - // - if(m_doBc_DplusMuMuDecay) { - - // check that track1 and track2 have same charges - if( (track1->charge())*(track2->charge()) < 0) { - ATH_MSG_DEBUG("Bc -> D+: Track pair rejected by same charge check: " - << track1 << " = " << track1->charge() << ", " - << track2 << " = " << track2->charge() ); - } else { - ATH_MSG_DEBUG("Bc -> D+: Track pair accepted by same charge check: " - << track1 << " = " << track1->charge() << ", " << track2 << " = " << track2->charge() ); - - double xPiPiMass = XMass(track1,track2,bC_to_PiPi); // decay = bC_to_PiPi to actually calculate m(pi pi) - - if ( xPiPiMass < m_upperDplus_MassCut - KPLUSMASS ) { - - double xPiPiMuMuMass = XMuMuMass (*trackELmu1,*trackELmu2,track1,track2,bC_to_PiPi); - - if ( xPiPiMuMuMass < m_upperBc_DplusMuMuMassCut - KPLUSMASS ) { - - // 3rd loop over tracks - //xAOD::TrackParticleContainer::const_iterator trkIt3 = xAODTrkParticleCont->begin(); - std::vector<const xAOD::TrackParticle*>::const_iterator trkIt3 = merged_tracks.begin(); - - for (int itrk3=0 ; trkIt3 != lastTrkIt; itrk3++, trkIt3++) - { - const xAOD::TrackParticle* track3 = *trkIt3; - - // looping over all tracks, so expect to same tracks, but should skip those combinations - if(itrk3==itrk1 || itrk3==itrk2) { - ATH_MSG_DEBUG("Track " << track3 << " is the same as another" ); - continue; - } - - - ElementLink<xAOD::TrackParticleContainer> & trackEL5 = mapTrackToIndex[*trkIt3].elLink; - ElementLink<xAOD::IParticleContainer> ItrackEL5; - ItrackEL5.resetWithKeyAndIndex(trackEL5.dataID(), trackEL5.index()); - - - if (*trackEL5 != track3) { - ATH_MSG_FATAL("Track 3 doesn't match dereferenced elementlink: " << track3 << " " << *trackEL5 ); - if ( timerSvc() ) m_TotTimer->stop(); - return HLT::MISSING_FEATURE; - } - - - - // Check that it is not muon track - if( !(Found1Track && isUnique(*trkIt3,*trackELmu1)) || !(Found2Track &&isUnique(*trkIt3,*trackELmu2)) ) { - ATH_MSG_DEBUG("Track " << track3 << " was matched to a muon, skip it" ); - continue; - } - // check that track1 and track3 have opposite charges - if( (track1->charge())*(track3->charge()) > 0) { - ATH_MSG_DEBUG("Bc -> D+: 3rd track rejected by opposite charge check: " - << track1 << " = " << track1->charge() << ", " << track3 << " = " << track3->charge() ); - } else { - - ATH_MSG_DEBUG("Bc -> D+: 3rd track accepted by opposite charge check: " - << track1 << " = " << track1->charge() << ", " << track3 << " = " << track3->charge() ); - - std::vector<const xAOD::TrackParticle*> bTracks; - bTracks.clear(); - bTracks.push_back(track1); - bTracks.push_back(track2); - bTracks.push_back(track3); - - double PtDplus = PtVal (bTracks); - - if ( PtDplus > m_lowerDplus_PtCut ) { - - bTracks.push_back(*trackELmu1); - bTracks.push_back(*trackELmu2); - - double PtBc = PtVal (bTracks); - - if ( PtBc > m_lowerBcDplus_PtCut ) { - - xAOD::TrigBphys* trigPartDplus(nullptr); - xAOD::TrigBphys* trigPartBcMuMuDplus = checkBcMuMuDplus(trackEL3,trackEL4,trackEL5, - trackELmu1,trackELmu2, - trigPartDplus); - nTriedCombinations++; - if (trigPartBcMuMuDplus) { - if(m_maxBcDplusToStore >= 0 && m_countBcDplusToStore >= m_maxBcDplusToStore) { - if(m_countBcDplusToStore == m_maxBcDplusToStore) { - ATH_MSG_WARNING("Reached maximum number of Bc->D+ candidates to store " << m_maxBcDplusToStore << "; following candidates won't be written out" ); - m_mon_Errors.push_back(ERROR_MaxNumBcDplusReached); - } - else - ATH_MSG_DEBUG("Do not write out " << m_countBcDplusToStore+1 << "th Bc->D+ candidate" ); - //TJ: delete trigPartBcMuMuDplus; - //TJ: delete trigPartDplus; - } - else { - m_TrigBphysColl_b->push_back( trigPartBcMuMuDplus ); - m_TrigBphysColl_X->push_back( trigPartDplus ); - - m_bphysHelperTool->setBeamlineDisplacement(trigPartBcMuMuDplus, - {*trkIt1,*trkIt2,*trkIt3,*trackELmu1,*trackELmu2}, beamspot); - m_bphysHelperTool->setBeamlineDisplacement(trigPartDplus, - {*trkIt1,*trkIt2,*trkIt3}, beamspot); - trigPartDplus->addParticleLink(ItrackEL3); - trigPartDplus->addParticleLink(ItrackEL4); - trigPartDplus->addParticleLink(ItrackEL5); - - int iDplus = m_TrigBphysColl_X->size() - 1; - ElementLink<xAOD::TrigBphysContainer> trigPartXEL(*m_TrigBphysColl_X,iDplus); - - trigPartBcMuMuDplus->addParticleLink(ItrackEL3); - trigPartBcMuMuDplus->addParticleLink(ItrackEL4); - trigPartBcMuMuDplus->addParticleLink(ItrackEL5); - if(Found1Track) trigPartBcMuMuDplus->addParticleLink(ELmu1); - if(Found2Track) trigPartBcMuMuDplus->addParticleLink(ELmu2); - trigPartBcMuMuDplus->setSecondaryDecayLink(trigPartXEL); - } - - result=true; - m_mon_BcMuMuDplus_n++; - m_countBcDplusToStore++; - if(IdEvent!=m_lastEventPassedBcDplus) { - m_countPassedEventsBcDplus++; - m_lastEventPassedBcDplus = IdEvent; - } - - } // if trigPartBcMuMuDs - - } // Pt D+ - } // Pt BC - } // check of 3rd track charge - } // for loop over track3 - } // in mass range - } // in phi mass range - } // end check that track1 and track2 have same charges - } // if m_doBc_DplusMuMuDecay - - // - // Bc -> mu mu D* ( D0(K pi) pi) part - // - if(m_doBc_DstarMuMuDecay) { - - // check that track1 and track2 have opposite charges - if( (track1->charge())*(track2->charge()) > 0) { - ATH_MSG_DEBUG("Bc -> D*: Track pair rejected by opposite charge check: " - << track1 << " = " << track1->charge() << ", " << track2 << " = " << track2->charge() ); - } else { - - ATH_MSG_DEBUG("Bc -> D*: Track pair accepted by opposite charge check: " - << track1 << " = " << track1->charge() << ", " << track2 << " = " << track2->charge() ); - - if( (track1->pt()) < m_lowerDstarKpi_PtCut || (track2->pt()) < m_lowerDstarKpi_PtCut ) { - ATH_MSG_DEBUG("Bc -> D*: Track pair rejected by minimal pT(track) check: " - << track1 << " = " << track1->pt() << ", " << track2 << " = " << track2->pt() ); - } else { - - ATH_MSG_DEBUG("Bc -> D*: Track pair accepted by minimal pT(track) check: " - << track1 << " = " << track1->pt() << ", " << track2 << " = " << track2->pt() ); - - double xD0Mass1 = XMass(track1,track2,bD_to_Kstar); // decay = bD_to_Kstar to actually calculate m(K pi) - double xD0Mass2 = XMass(track2,track1,bD_to_Kstar); // decay = bD_to_Kstar to actually calculate m(K pi) - - if ( (xD0Mass1 > m_lowerD0Dstar_MassCut && xD0Mass1 < m_upperD0Dstar_MassCut) || - (xD0Mass2 > m_lowerD0Dstar_MassCut && xD0Mass2 < m_upperD0Dstar_MassCut) ) { - - double xD0MuMuMass1 = XMuMuMass (*trackELmu1,*trackELmu2,track1,track2,bD_to_Kstar); - double xD0MuMuMass2 = XMuMuMass (*trackELmu1,*trackELmu2,track2,track1,bD_to_Kstar); - - if ( (xD0Mass1 > m_lowerD0Dstar_MassCut && xD0Mass1 < m_upperD0Dstar_MassCut && xD0MuMuMass1 < m_upperBc_DstarMuMuMassCut - PIMASS) || - (xD0Mass2 > m_lowerD0Dstar_MassCut && xD0Mass2 < m_upperD0Dstar_MassCut && xD0MuMuMass2 < m_upperBc_DstarMuMuMassCut - PIMASS) ) { - - // 3rd loop over tracks - //xAOD::TrackParticleContainer::const_iterator trkIt3 = xAODTrkParticleCont->begin(); - std::vector<const xAOD::TrackParticle*>::const_iterator trkIt3 = merged_tracks.begin(); - - for (int itrk3=0 ; trkIt3 != lastTrkIt; itrk3++, trkIt3++) - { - const xAOD::TrackParticle* track3 = *trkIt3; - - // looping over all tracks, so expect to same tracks, but should skip those combinations - if(itrk3==itrk1 || itrk3==itrk2) { - ATH_MSG_DEBUG("Track " << track3 << " is the same as another" ); - continue; - } - - - ElementLink<xAOD::TrackParticleContainer> & trackEL5 = mapTrackToIndex[*trkIt3].elLink; - ElementLink<xAOD::IParticleContainer> ItrackEL5; - ItrackEL5.resetWithKeyAndIndex(trackEL5.dataID(), trackEL5.index()); - - - if (*trackEL5 != track3) { - ATH_MSG_FATAL("Track 3 doesn't match dereferenced elementlink: " << track3 << " " << *trackEL5 ); - if ( timerSvc() ) m_TotTimer->stop(); - return HLT::MISSING_FEATURE; - } - - - // Check that it is not muon track - if( !(Found1Track && isUnique(*trkIt3,*trackELmu1)) || !(Found2Track &&isUnique(*trkIt3,*trackELmu2)) ) { - ATH_MSG_DEBUG("Track " << track3 << " was matched to a muon, skip it" ); - continue; - } - - if ( !((xD0Mass1 > m_lowerD0Dstar_MassCut && xD0Mass1 < m_upperD0Dstar_MassCut && xD0MuMuMass1 < m_upperBc_DstarMuMuMassCut - PIMASS && - ((track1->charge())*(track3->charge()) < 0) ) || - (xD0Mass2 > m_lowerD0Dstar_MassCut && xD0Mass2 < m_upperD0Dstar_MassCut && xD0MuMuMass2 < m_upperBc_DstarMuMuMassCut - PIMASS && - ((track2->charge())*(track3->charge()) < 0) )) ) { - // - ATH_MSG_DEBUG("Bc -> D*: Track pair rejected by track3 charge check: " << track3 << " = " << track3->charge() ); - } else { - - ATH_MSG_DEBUG("Bc -> D*: 3rd track accepted by opposite to kaon charge check: " - << track1 << " = " << track1->charge() << ", " << track2 << " = " << track2->charge() << ", " << track3 << " = " << track3->charge() ); - - std::vector<const xAOD::TrackParticle*> bTracks; - bTracks.clear(); - bTracks.push_back(track1); - bTracks.push_back(track2); - bTracks.push_back(track3); - - double PtDstar = PtVal (bTracks); - - if ( PtDstar > m_lowerDstar_PtCut ) { - - bTracks.push_back(*trackELmu1); - bTracks.push_back(*trackELmu2); - - double PtBc = PtVal (bTracks); - - if ( PtBc > m_lowerBcDstar_PtCut ) { - - xAOD::TrigBphys* trigPartDstar(nullptr); - xAOD::TrigBphys* trigPartBcMuMuDstar = checkBcMuMuDstar(trackEL3,trackEL4,trackEL5, - trackELmu1,trackELmu2, - trigPartDstar); - nTriedCombinations++; - if (trigPartBcMuMuDstar) { - if(m_maxBcDstarToStore >= 0 && m_countBcDstarToStore >= m_maxBcDstarToStore) { - if(m_countBcDstarToStore == m_maxBcDstarToStore) { - ATH_MSG_WARNING("Reached maximum number of Bc->D* candidates to store " << m_maxBcDstarToStore << "; following candidates won't be written out" ); - m_mon_Errors.push_back(ERROR_MaxNumBcDstarReached); - } else { - ATH_MSG_DEBUG("Do not write out " << m_countBcDstarToStore+1 << "th Bc->D* candidate" ); - } - //TJ: delete trigPartBcMuMuDstar; - //TJ: delete trigPartDstar; - } - else { - m_TrigBphysColl_b->push_back( trigPartBcMuMuDstar ); - m_TrigBphysColl_X->push_back( trigPartDstar ); - - m_bphysHelperTool->setBeamlineDisplacement(trigPartBcMuMuDstar, - {*trkIt1,*trkIt2,*trkIt3,*trackELmu1,*trackELmu2}, beamspot); - m_bphysHelperTool->setBeamlineDisplacement(trigPartDstar, - {*trkIt1,*trkIt2,*trkIt3}, beamspot); - trigPartDstar->addParticleLink(ItrackEL3); - trigPartDstar->addParticleLink(ItrackEL4); - trigPartDstar->addParticleLink(ItrackEL5); - - int iDstar = m_TrigBphysColl_X->size() - 1; - ElementLink<xAOD::TrigBphysContainer> trigPartXEL(*m_TrigBphysColl_X,iDstar); - - trigPartBcMuMuDstar->addParticleLink(ItrackEL3); - trigPartBcMuMuDstar->addParticleLink(ItrackEL4); - trigPartBcMuMuDstar->addParticleLink(ItrackEL5); - if(Found1Track) trigPartBcMuMuDstar->addParticleLink(ELmu1); - if(Found2Track) trigPartBcMuMuDstar->addParticleLink(ELmu2); - trigPartBcMuMuDstar->setSecondaryDecayLink(trigPartXEL); - } - - result=true; - m_mon_BcMuMuDstar_n++; - m_countBcDstarToStore++; - if(IdEvent!=m_lastEventPassedBcDstar) { - m_countPassedEventsBcDstar++; - m_lastEventPassedBcDstar = IdEvent; - } - - } // if trigPartBcMuMuDstar - - } // Pt D* - } // Pt BC - } // check of 3rd track charge - } // for loop over track3 - } // in Bc mass range - } // in D0/D* mass range - } // end check that track1 and track2 have large enough pT values - } // end check that track1 and track2 have opposite charges - } // if m_doBc_DstarMuMuDecay - - // - // Bc -> mu mu D0 (K pi) part - // - if(m_doBc_D0MuMuDecay) { - - // check that track1 and track2 have opposite charges - if( (track1->charge())*(track2->charge()) > 0) { - ATH_MSG_DEBUG("Bc -> D0: Track pair rejected by opposite charge check: " - << track1 << " = " << track1->charge() << ", " - << track2 << " = " << track2->charge() ); - } else { - - ATH_MSG_DEBUG("Bc -> D0: Track pair accepted by opposite charge check: " - << track1 << " = " << track1->charge() << ", " - << track2 << " = " << track2->charge() ); - - double xD0Mass1 = XMass(track1,track2,bD_to_Kstar); // decay = bD_to_Kstar to actually calculate m(K pi) - double xD0Mass2 = XMass(track2,track1,bD_to_Kstar); // decay = bD_to_Kstar to actually calculate m(K pi) - - if ( (xD0Mass1 > m_lowerD0_MassCut && xD0Mass1 < m_upperD0_MassCut) || - (xD0Mass2 > m_lowerD0_MassCut && xD0Mass2 < m_upperD0_MassCut) ) { - - double xD0MuMuMass1 = XMuMuMass (*trackELmu1,*trackELmu2,track1,track2,bD_to_Kstar); - double xD0MuMuMass2 = XMuMuMass (*trackELmu1,*trackELmu2,track2,track1,bD_to_Kstar); - - if ( (xD0Mass1 > m_lowerD0_MassCut && xD0Mass1 < m_upperD0_MassCut && xD0MuMuMass1 < m_upperBc_D0MuMuMassCut) || - (xD0Mass2 > m_lowerD0_MassCut && xD0Mass2 < m_upperD0_MassCut && xD0MuMuMass2 < m_upperBc_D0MuMuMassCut) ) { - std::vector<const xAOD::TrackParticle*> bTracks; - bTracks.clear(); - bTracks.push_back(track1); - bTracks.push_back(track2); - - double PtD0 = PtVal (bTracks); - - if ( PtD0 > m_lowerD0_PtCut ) { - - bTracks.push_back(*trackELmu1); - bTracks.push_back(*trackELmu2); - - double PtBc = PtVal (bTracks); - - if ( PtBc > m_lowerBcD0_PtCut ) { - - xAOD::TrigBphys* trigPartD0(nullptr); - xAOD::TrigBphys* trigPartBcMuMuD0 = checkBcMuMuD0(trackEL3,trackEL4, - trackELmu1,trackELmu2, - trigPartD0); - nTriedCombinations++; - if (trigPartBcMuMuD0) { - if(m_maxBcD0ToStore >= 0 && m_countBcD0ToStore >= m_maxBcD0ToStore) { - if(m_countBcD0ToStore == m_maxBcD0ToStore) { - ATH_MSG_WARNING("Reached maximum number of Bc->D0 candidates to store " << m_maxBcD0ToStore << "; following candidates won't be written out" ); - m_mon_Errors.push_back(ERROR_MaxNumBcD0Reached); - } - else - ATH_MSG_DEBUG("Do not write out " << m_countBcD0ToStore+1 << "th Bc->D0 candidate" ); - //TJ: delete trigPartBcMuMuD0; - //TJ: delete trigPartD0; - } - else { - m_TrigBphysColl_b->push_back( trigPartBcMuMuD0 ); - m_TrigBphysColl_X->push_back( trigPartD0 ); - - m_bphysHelperTool->setBeamlineDisplacement(trigPartBcMuMuD0, - {*trkIt1,*trkIt2,*trackELmu1,*trackELmu2}, beamspot); - m_bphysHelperTool->setBeamlineDisplacement(trigPartD0, - {*trkIt1,*trkIt2}, beamspot); - trigPartD0->addParticleLink(ItrackEL3); - trigPartD0->addParticleLink(ItrackEL4); - - int iD0 = m_TrigBphysColl_X->size() - 1; - ElementLink<xAOD::TrigBphysContainer> trigPartXEL(*m_TrigBphysColl_X,iD0); - - trigPartBcMuMuD0->addParticleLink(ItrackEL3); - trigPartBcMuMuD0->addParticleLink(ItrackEL4); - if(Found1Track) trigPartBcMuMuD0->addParticleLink(ELmu1); - if(Found2Track) trigPartBcMuMuD0->addParticleLink(ELmu2); - trigPartBcMuMuD0->setSecondaryDecayLink(trigPartXEL); - } - - result=true; - m_mon_BcMuMuD0_n++; - m_countBcD0ToStore++; - if(IdEvent!=m_lastEventPassedBcD0) { - m_countPassedEventsBcD0++; - m_lastEventPassedBcD0 = IdEvent; - } - - } // if trigPartBcMuMuD0 - - } // Pt D0 - } // Pt Bc - } // in Bc mass range - } // in D0 mass range - } // end check that track1 and track2 have opposite charges - } // if m_doBc_D0MuMuDecay - - - } // end if(m_doBd_KstarMuMuDecay || m_doBs_Phi1020MuMuDecay || m_doLb_LambdaMuMuDecay) - } // end of inner loop over tracks 2 - - } // end of outer loop over tracks 1 - } // end of inner muon loop - } // end of outer muon loop - } // end if muidIDtracks1,2 sizes >= 0 - - ATH_MSG_DEBUG("Totally tried to build " << nTriedCombinations << " tracks cobinations" ); - m_mon_nTriedCombinations = nTriedCombinations; - -// std::string KEY; //sivokl - - if(m_TrigBphysColl_b!=0 && m_TrigBphysColl_b->size()>0) { - ATH_MSG_DEBUG("REGTEST: Store Bphys Collection size: " << m_TrigBphysColl_b->size() ); - HLT::ErrorCode sc = attachFeature(outputTE, m_TrigBphysColl_X, "EFBMuMuXFex_X" ); - if(sc != HLT::OK) { - ATH_MSG_WARNING( "Failed to store trigBphys_X Collection in outputTE" ); - m_mon_Errors.push_back(ERROR_BphysCollStore_Fails); - delete m_TrigBphysColl_b; - delete m_TrigBphysColl_X; - if ( timerSvc() ) m_TotTimer->stop(); - return HLT::ERROR; - } - // Sergey S.: get persistified TrigBphysContainer of X decays - ElementLinkVector<xAOD::TrigBphysContainer> ELvecTBPh; - sc = getFeaturesLinks< xAOD::TrigBphysContainer, xAOD::TrigBphysContainer > (outputTE, ELvecTBPh, "EFBMuMuXFex_X"); -// const xAOD::TrigBphysContainer * TrigBphysColl_X_persist(0); -// sc = getFeature(outputTE, TrigBphysColl_X_persist, "EFBMuMuXFex_X"); - if(sc != HLT::OK) { - ATH_MSG_WARNING( "Failed to getFeaturesLinks trigBphys_X Collection in outputTE" ); - } else { - if(msgLvl() <= MSG::DEBUG){ - for ( const ElementLink<xAOD::TrigBphysContainer> eltp: ELvecTBPh) { - msg() << MSG::DEBUG << " ===== TrigBphys Container ElementLinks : " - << " index: " << eltp.index() - << " sgkey: " << eltp.dataID() - << " hashkey: "<< eltp.key() - << " valid: " << eltp.isValid() - << " ptr: " << (eltp.isValid() ? *eltp : nullptr) - << endmsg; -// KEY = eltp.dataID(); - } - } - } - // Sergey S.: reset the secondary decay links to persistified container - for( xAOD::TrigBphysContainer::iterator BPobj = m_TrigBphysColl_b->begin(); BPobj != m_TrigBphysColl_b->end(); ++BPobj) { - if ((*BPobj)->secondaryDecayLink().isValid() ) { - ElementLink<xAOD::TrigBphysContainer> secEL; -// secEL.resetWithKeyAndIndex(KEY,(*BPobj)->secondaryDecayLink().index()); - // match transient secondary decay ELs with those from persistified container - for(const ElementLink<xAOD::TrigBphysContainer> persistentSecEL : ELvecTBPh ) { - if(*persistentSecEL == *(*BPobj)->secondaryDecayLink()) - secEL = persistentSecEL; - } - if(!secEL.isValid()){ - ATH_MSG_WARNING( "Failed to find persistified secondary decay EL" ); - } else { - (*BPobj)->setSecondaryDecayLink(secEL); - } - ATH_MSG_DEBUG(" ===== TrigBphys secondaryDecay ElementLinks AFTER reset: Slink isValid = " << (*BPobj)->secondaryDecayLink().isValid() - << ", dataID = " << (*BPobj)->secondaryDecayLink().dataID() << ", index = " << (*BPobj)->secondaryDecayLink().index() - << ", key = " << (*BPobj)->secondaryDecayLink().key() << ", cptr = " << (*BPobj)->secondaryDecayLink().cptr() ); - } - } - - - - - sc = attachFeature(outputTE, m_TrigBphysColl_b, "EFBMuMuXFex" ); - if(sc != HLT::OK) { - ATH_MSG_WARNING( "Failed to store trigBphys Collection in outputTE" ); - m_mon_Errors.push_back(ERROR_BphysCollStore_Fails); - delete m_TrigBphysColl_b; - delete m_TrigBphysColl_X; - if ( timerSvc() ) m_TotTimer->stop(); - return HLT::ERROR; - } - } else { - ATH_MSG_DEBUG("REGTEST: no bphys collection to store " ); - delete m_TrigBphysColl_b; - delete m_TrigBphysColl_X; - } - - if(result) { - if(IdEvent!=m_lastEventPassed) { - m_countPassedEvents++; - m_lastEventPassed = IdEvent; - } - m_countPassedRoIs++; - } - - if ( timerSvc() ) { - m_TotTimer->stop(); - m_VtxFitTimer->resume(); - m_VtxFitTimer->stop(); - m_mon_TotalRunTime = m_TotTimer->elapsed(); - m_mon_VertexingTime = m_VtxFitTimer->elapsed(); - } - - if ( timerSvc() ) { - ATH_MSG_DEBUG("m_TotTimer->elapsed() = " << m_TotTimer->elapsed() ); - ATH_MSG_DEBUG("m_VtxFitTimer->elapsed() = " << m_VtxFitTimer->elapsed() ); - } - - return HLT::OK; - -} - - -xAOD::TrigBphys* TrigEFBMuMuXFex::checkBplusMuMuKplus(const ElementLink<xAOD::TrackParticleContainer> & eltrack1, - const ElementLink<xAOD::TrackParticleContainer> & elmu1, - const ElementLink<xAOD::TrackParticleContainer> & elmu2) { - - ATH_MSG_DEBUG("Try to build B+ -> mu mu K+ with track " << *eltrack1 ); - float massKMuMu = KMuMuMass(*elmu1,*elmu2,*eltrack1); - - static const std::vector<double> masses = {KPLUSMASS,MUMASS,MUMASS}; - - if( !(massKMuMu > m_lowerKMuMuMassCut && massKMuMu < m_upperKMuMuMassCut) ) { - ATH_MSG_DEBUG(" B+ -> mu mu K+ candidate rejected by mass cut: m = " << massKMuMu ); - return nullptr; - } - ++m_countPassedBplusMass; - auto track1 = *eltrack1; - - // Fill BMuMuK monitoring containers - m_mon_BMuMuK_Pt_K.push_back(track1->pt()*0.001); - m_mon_BMuMuK_Eta_K.push_back(track1->eta()); - m_mon_BMuMuK_Phi_K.push_back(track1->phi()); - m_mon_BMuMuK_InvMass_B.push_back(massKMuMu*0.001); - - // create initial object - xAOD::TrigBphys * result = new xAOD::TrigBphys; - result->makePrivateStore(); - result->initialise(0,0.,0.,0., - xAOD::TrigBphys::BKMUMU, massKMuMu, xAOD::TrigBphys::EF); - - std::vector<ElementLink<xAOD::TrackParticleContainer> > vec_tracks = {eltrack1,elmu1, elmu2}; - - if (m_doB_KMuMuVertexing) { - - if ( timerSvc() ) m_VtxFitTimer->resume(); - if (!m_bphysHelperTool->vertexFit(result,vec_tracks,masses).isSuccess()) { - ATH_MSG_DEBUG(" Vertex fitting failed." ); - if ( timerSvc() ) m_VtxFitTimer->pause(); - delete result; - return nullptr; - } - m_countPassedBplusVtx++; - - double chi2val(result->fitchi2()); - - if (chi2val > m_bVtxChi2Cut || chi2val < 0) { - ATH_MSG_DEBUG(" B+ -> mu mu K+ candidate rejected by chi2 cut: chi2 = " << chi2val ); - delete result; - return nullptr; - } - m_mon_BMuMuK_Chi2_B.push_back(chi2val); - ++m_countPassedBplusVtxChi2; - - - ATH_MSG_DEBUG(" Good B+ -> mu mu K+ found!" << std::endl - << " m = " << result->mass() << ", " - << "chi2 = " << result->fitchi2() << ", vertex (" << result->fitx() << ", " - << result->fity() << ", " << result->fitz() << ")" ); - } // if m_doB_KMuMuVertexing - else { - // if vertexting is not done - just attach trackParticle links - for(const auto& tpel : vec_tracks) { - result->addTrackParticleLink(tpel); - } - } - - return result; -} // checkBplusMuMuKplus - -xAOD::TrigBphys* TrigEFBMuMuXFex::checkBcMuMuDs(const ElementLink<xAOD::TrackParticleContainer> & eltrack1, - const ElementLink<xAOD::TrackParticleContainer> & eltrack2, - const ElementLink<xAOD::TrackParticleContainer> & eltrack3, - const ElementLink<xAOD::TrackParticleContainer> & elmu1, - const ElementLink<xAOD::TrackParticleContainer> & elmu2, - double xPhiMass, - xAOD::TrigBphys* & trigPartX) { - - trigPartX = nullptr; - xAOD::TrigBphys * fitVtx_X(nullptr); - xAOD::TrigBphys * fitVtx(nullptr); - - std::vector<double> massHypoX = {KPLUSMASS,KPLUSMASS,PIMASS}; - std::vector<double> massHypo = {MUMASS,MUMASS,KPLUSMASS,KPLUSMASS,PIMASS}; - - m_countPassedPhiDsMass++; - - ATH_MSG_DEBUG("Try to build " << "D_s" << " with tracks " << *eltrack1 << ", " << *eltrack2 << ", " << *eltrack3 ); - - - float massX = X3Mass(*eltrack1, *eltrack2, *eltrack3); - if( !(massX > m_lowerDs_MassCut && massX < m_upperDs_MassCut) ) { - ATH_MSG_DEBUG(" " << "D_s" << " candidate rejected by the mass cut: m = " << massX ); - return nullptr; - } - m_countPassedDsMass++; - - float massXMuMu = X3MuMuMass(*elmu1, *elmu2, *eltrack1, *eltrack2, *eltrack3); - if( !(massXMuMu > m_lowerBc_DsMuMuMassCut && massXMuMu < m_upperBc_DsMuMuMassCut) ) { - ATH_MSG_DEBUG(" " << "B_c" << " candidate rejected by the mass cut: m = " << massXMuMu ); - return nullptr; - } - m_countPassedBcMass++; - - // create initial object - fitVtx_X = new xAOD::TrigBphys; - fitVtx_X->makePrivateStore(); - fitVtx_X->initialise(0,0.,0.,0., - xAOD::TrigBphys::DSPHIPI, massX, xAOD::TrigBphys::EF); - fitVtx = new xAOD::TrigBphys; - fitVtx->makePrivateStore(); - fitVtx->initialise(0,0.,0.,0., - xAOD::TrigBphys::BCDSMUMU, massXMuMu, xAOD::TrigBphys::EF); - - std::vector<ElementLink<xAOD::TrackParticleContainer> > vec_tracksX = {eltrack1,eltrack2,eltrack3}; - std::vector<ElementLink<xAOD::TrackParticleContainer> > vec_tracks = {elmu1,elmu2,eltrack1,eltrack2,eltrack3}; - - m_mon_BcMuMuDs_Pt_K1.push_back ((*eltrack1)->pt()*0.001); - m_mon_BcMuMuDs_Eta_K1.push_back((*eltrack1)->eta()); - m_mon_BcMuMuDs_Phi_K1.push_back((*eltrack1)->phi()); - m_mon_BcMuMuDs_Pt_K2.push_back( (*eltrack2)->pt()*0.001); - m_mon_BcMuMuDs_Eta_K2.push_back((*eltrack2)->eta()); - m_mon_BcMuMuDs_Phi_K2.push_back((*eltrack2)->phi()); - m_mon_BcMuMuDs_Pt_pi.push_back ((*eltrack3)->pt()*0.001); - m_mon_BcMuMuDs_Eta_pi.push_back((*eltrack3)->eta()); - m_mon_BcMuMuDs_Phi_pi.push_back((*eltrack3)->phi()); - - - m_mon_BcMuMuDs_InvMass_PhiDs.push_back(xPhiMass/1000.); - - m_mon_BcMuMuDs_InvMass_Ds.push_back(massX/1000.); - m_mon_BcMuMuDs_InvMass_Bc.push_back(massXMuMu/1000.); - - - if(m_doDs_Vertexing) { - if ( timerSvc() ) m_VtxFitTimer->resume(); - if (!m_bphysHelperTool->vertexFit(fitVtx_X,vec_tracksX,massHypoX).isSuccess()) { - ATH_MSG_DEBUG(" Failed to fit X vertex for " << "D_s" ); - if ( timerSvc() ) m_VtxFitTimer->pause(); - delete fitVtx_X; - delete fitVtx; - return nullptr; - } - if ( timerSvc() ) m_VtxFitTimer->pause(); - - - float chi2X = fitVtx_X->fitchi2(); - if( chi2X > m_DsVtxChi2Cut || chi2X < 0 ) { - ATH_MSG_DEBUG(" " << "D_s" << " candidate rejected by X vertex chi2 cut: chi2 = " << chi2X ); - delete fitVtx_X; - delete fitVtx; - return nullptr; - } - m_countPassedDsVtxChi2++; - m_mon_BcMuMuDs_InvMass_Ds.push_back(massX/1000.); - // m_mon_BcMuMuDs_VtxMass_Ds.push_back(vtxMassX/1000.); - m_mon_BcMuMuDs_Chi2_Ds.push_back(chi2X); - - } // m_doDs_Vertexing - else { - // if vertexting is not done - just attach trackParticle links - for(const auto& tpel : vec_tracksX) { - fitVtx_X->addTrackParticleLink(tpel); - } - } - - if(m_doBc_DsMuMuVertexing) { - - if(m_doBc_DsMuMuCascade) { - // Cascade 2-vertex fit - - // Trk::VertexID dplusCascade, bcCascade; - Trk::VertexID dsCascade; - - std::vector<const xAOD::TrackParticle*> trackpTripletX; - trackpTripletX.push_back(*eltrack1); - trackpTripletX.push_back(*eltrack2); - trackpTripletX.push_back(*eltrack3); - - std::vector<double> massAtVrtX; - massAtVrtX.push_back(KPLUSMASS); - massAtVrtX.push_back(KPLUSMASS); - massAtVrtX.push_back(PIMASS); - - std::unique_ptr<Trk::IVKalState> state = m_VKVFitter->makeState(); - - dsCascade = m_VKVFitter->startVertex(trackpTripletX,massAtVrtX,*state); - - std::vector<Trk::VertexID> vrtList; - vrtList.push_back(dsCascade); - - std::vector<const xAOD::TrackParticle*> trackpXMuMu; - trackpXMuMu.push_back(*elmu1); - trackpXMuMu.push_back(*elmu2); - - std::vector<double> massAtVrtXMuMu; - massAtVrtXMuMu.push_back(MUMASS); - massAtVrtXMuMu.push_back(MUMASS); - - // bcCascade = m_VKVFitter->nextVertex(trackpXMuMu,massAtVrtXMuMu,vrtList); - m_VKVFitter->nextVertex(trackpXMuMu,massAtVrtXMuMu,vrtList,*state); - - Amg::Vector3D VertexX; - Amg::Vector3D VertexXMuMu; - - Trk::VxCascadeInfo * result = m_VKVFitter->fitCascade(*state); - - if ( timerSvc() ) m_VtxFitTimer->pause(); - - if( result==NULL ) { - ATH_MSG_DEBUG(" Failed cascade fit for " << "B_c -> Ds" ); - delete fitVtx_X; - delete fitVtx; - delete result; - return nullptr; - } else { - result->setSVOwnership(true); // to deleted the vertices of cascade together with VxCascadeInfo - ATH_MSG_DEBUG(" Managed cascade fit for " << "B_c -> Ds" ); - m_countPassedBcVtx++; - - const std::vector<xAOD::Vertex*> cascadeVertices = result->vertices(); - - VertexX[0] = cascadeVertices[0]->x(); VertexX[1] = cascadeVertices[0]->y(); VertexX[2] = cascadeVertices[0]->z(); - VertexXMuMu[0] = cascadeVertices[1]->x(); VertexXMuMu[1] = cascadeVertices[1]->y(); VertexXMuMu[2] = cascadeVertices[1]->z(); - - ATH_MSG_DEBUG(" " << "Bc -> Ds Casc., VertexX = " << VertexX[0] << " " << VertexX[1] << " " << VertexX[2] ); - ATH_MSG_DEBUG(" " << "Bc -> Ds Casc., VertexXMuMu = " << VertexXMuMu[0] << " " << VertexXMuMu[1] << " " << VertexXMuMu[2] ); - - float chi2XMuMu = result->fitChi2(); - fitVtx->setFitchi2(chi2XMuMu); - if( !(chi2XMuMu < m_bCVtxChi2Cut) ) { - ATH_MSG_DEBUG(" " << "B_c -> Ds" << " candidate rejected by XMuMu vertex chi2 cut: chi2 = " << chi2XMuMu ); - delete fitVtx_X; - delete fitVtx; - delete result; - return nullptr; - } else { - ATH_MSG_DEBUG(" " << "B_c -> Ds" << " candidate accepted by XMuMu vertex chi2 cut: chi2 = " << chi2XMuMu ); - m_countPassedBcVtxChi2++; - - const std::vector< std::vector<TLorentzVector> > &cascadeMomenta = result->getParticleMoms(); - - const std::vector<TLorentzVector> &bcTrkMom = cascadeMomenta[1]; - const std::vector<TLorentzVector> &dsTrkMom = cascadeMomenta[0]; - - std::vector<TLorentzVector>::const_iterator momItr; - - TLorentzVector dsMom, bcMom; - for(momItr=dsTrkMom.begin(); momItr!=dsTrkMom.end(); ++momItr) { dsMom += *momItr; } - for(momItr=bcTrkMom.begin(); momItr!=bcTrkMom.end(); ++momItr) { bcMom += *momItr; } - - double pxDs = dsMom.Px(); - double pyDs = dsMom.Py(); - - double LxyDs = LxyVal(pxDs,pyDs,VertexXMuMu,VertexX); - - if ( m_lowerDs_LxyCut > -99. && LxyDs < m_lowerDs_LxyCut ) { - ATH_MSG_DEBUG(" " << "B_c -> Ds" << " candidate rejected by Lxy cut: Lxy = " << LxyDs ); - delete fitVtx_X; - delete fitVtx; - delete result; - return nullptr; - } else { - m_countPassedBcDsLxy++; - ATH_MSG_DEBUG(" " << "B_c -> Ds" << " candidate accepted by Lxy cut: Lxy = " << LxyDs ); - - double vtxMassX = dsMom.M(); - double vtxMassXMuMu = bcMom.M(); - - double PtDs = dsMom.Perp(); - double PtBc = bcMom.Perp(); - - // trigPartX = new TrigEFBphys( 0, 0., 0., TrigEFBphys::DPKPIPI, massX); - - ATH_MSG_DEBUG(" " << "Bc -> Ds" << " : vtxMassXMuMu = " << vtxMassXMuMu ); - - m_mon_BcMuMuDs_VtxMass_Ds.push_back(vtxMassX/1000.); - m_mon_BcMuMuDs_Lxy_Ds.push_back(LxyDs); - m_mon_BcMuMuDs_pT_Ds.push_back(PtDs/1000.); - m_mon_BcMuMuDs_pT_Bc.push_back(PtBc/1000.); - m_mon_BcMuMuDs_VtxMass_Bc.push_back(vtxMassXMuMu/1000.); - m_mon_BcMuMuDs_Chi2_Bc.push_back(chi2XMuMu); - - // manually attach the track links to fitVtx - for(const auto& tpel : vec_tracks) { - fitVtx->addTrackParticleLink(tpel); - } - - // result of cascate fit is not needed anymore - delete result; - - } // end XMuMu Lxy cut - } // end XMuMu chi2 cut - // } // end if(XMuMuVxCandidate) - } // result==NULL - - - } else { - - // Try to fit XMuMu -> mu mu X vertex - if ( timerSvc() ) m_VtxFitTimer->resume(); - if (!m_bphysHelperTool->vertexFit(fitVtx,vec_tracks,massHypo).isSuccess()) { - ATH_MSG_DEBUG(" Failed to fit XMuMu vertex for " << "B_c" ); - if ( timerSvc() ) m_VtxFitTimer->pause(); - delete fitVtx_X; - delete fitVtx; - return nullptr; - } - if ( timerSvc() ) m_VtxFitTimer->pause(); - m_countPassedBcVtx++; - float chi2XMuMu = fitVtx->fitchi2(); - if( chi2XMuMu > m_bCVtxChi2Cut || chi2XMuMu < 0 ) { - ATH_MSG_DEBUG(" " << "B_c" << " candidate rejected by XMuMu vertex chi2 cut: chi2 = " << chi2XMuMu ); - delete fitVtx_X; - delete fitVtx; - return nullptr; - } - m_countPassedBcVtxChi2++; - - m_mon_BcMuMuDs_InvMass_Bc.push_back(massXMuMu/1000.); - // m_mon_BcMuMuDs_VtxMass_Bc.push_back(vtxMassXMuMu/1000.); - m_mon_BcMuMuDs_Chi2_Bc.push_back(chi2XMuMu); - - } //m_doBc_DsMuMuCascade - } //m_doBc_DsMuMuVertexing - else { - // if vertexting is not done - just attach trackParticle links - for(const auto& tpel : vec_tracks) { - fitVtx->addTrackParticleLink(tpel); - } - } - - ATH_MSG_DEBUG(" Good " << "B_c" << " found!" << std::endl - << " doDsVtx: " << (m_doDs_Vertexing ? "Yes" : "No") - << " doBcVtx: " << (m_doBc_DsMuMuVertexing ? "Yes" : "No") - << " m = " << fitVtx->mass() << ", " - << "chi2 = " << fitVtx->fitchi2() << ", vertex (" << fitVtx->fitx() << ", " - << fitVtx->fity() << ", " << fitVtx->fitz() << ")" ); - - trigPartX = fitVtx_X; - return fitVtx; -} //checkBcMuMuDs - -xAOD::TrigBphys* TrigEFBMuMuXFex::checkBcMuMuDplus(const ElementLink<xAOD::TrackParticleContainer> & eltrack1, - const ElementLink<xAOD::TrackParticleContainer> & eltrack2, - const ElementLink<xAOD::TrackParticleContainer> & eltrack3, - const ElementLink<xAOD::TrackParticleContainer> & elmu1, - const ElementLink<xAOD::TrackParticleContainer> & elmu2, - xAOD::TrigBphys* & trigPartX) { - - trigPartX = nullptr; - xAOD::TrigBphys * fitVtx_X(nullptr); - xAOD::TrigBphys * fitVtx(nullptr); - - std::vector<double> massHypoX = {PIMASS,PIMASS,KPLUSMASS}; - std::vector<double> massHypo = {MUMASS,MUMASS,PIMASS,PIMASS,KPLUSMASS}; - - ATH_MSG_DEBUG("Try to build " << "D+" << " with tracks " << *eltrack1 << ", " << *eltrack2 << ", " << *eltrack3 ); - - float massX = XKPiPiMass(*eltrack3, *eltrack1, *eltrack2); - if( !(massX > m_lowerDplus_MassCut && massX < m_upperDplus_MassCut) ) { - ATH_MSG_DEBUG(" " << "D+" << " candidate rejected by the mass cut: m = " << massX ); - return nullptr; - } - m_countPassedDplusMass++; - - float massXMuMu = XKPiPiMuMuMass(*elmu1, *elmu2, *eltrack3, *eltrack1, *eltrack2); - if( !(massXMuMu > m_lowerBc_DplusMuMuMassCut && massXMuMu < m_upperBc_DplusMuMuMassCut) ) { - ATH_MSG_DEBUG(" " << "B_c -> D+" << " candidate rejected by the mass cut: m = " << massXMuMu ); - return nullptr; - } - m_countPassedBcDplusMass++; - - // create initial object - fitVtx_X = new xAOD::TrigBphys; - fitVtx_X->makePrivateStore(); - fitVtx_X->initialise(0,0.,0.,0., - xAOD::TrigBphys::DPKPIPI, massX, xAOD::TrigBphys::EF); - fitVtx = new xAOD::TrigBphys; - fitVtx->makePrivateStore(); - fitVtx->initialise(0,0.,0.,0., - xAOD::TrigBphys::BCDPMUMU, massXMuMu, xAOD::TrigBphys::EF); - - std::vector<ElementLink<xAOD::TrackParticleContainer> > vec_tracksX = {eltrack1,eltrack2,eltrack3}; - std::vector<ElementLink<xAOD::TrackParticleContainer> > vec_tracks = {elmu1,elmu2,eltrack1,eltrack2,eltrack3}; - - m_mon_BcMuMuDplus_Pt_pi1.push_back ((*eltrack1)->pt()*0.001); - m_mon_BcMuMuDplus_Eta_pi1.push_back((*eltrack1)->eta()); - m_mon_BcMuMuDplus_Phi_pi1.push_back((*eltrack1)->phi()); - m_mon_BcMuMuDplus_Pt_pi2.push_back( (*eltrack2)->pt()*0.001); - m_mon_BcMuMuDplus_Eta_pi2.push_back((*eltrack2)->eta()); - m_mon_BcMuMuDplus_Phi_pi2.push_back((*eltrack2)->phi()); - m_mon_BcMuMuDplus_Pt_K.push_back ((*eltrack3)->pt()*0.001); - m_mon_BcMuMuDplus_Eta_K.push_back((*eltrack3)->eta()); - m_mon_BcMuMuDplus_Phi_K.push_back((*eltrack3)->phi()); - - m_mon_BcMuMuDplus_InvMass_Dplus.push_back(massX/1000.); - m_mon_BcMuMuDplus_InvMass_Bc.push_back(massXMuMu/1000.); - - if(m_doDplus_Vertexing) { - if ( timerSvc() ) m_VtxFitTimer->resume(); - if (!m_bphysHelperTool->vertexFit(fitVtx_X,vec_tracksX,massHypoX).isSuccess()) { - ATH_MSG_DEBUG(" Failed to fit X vertex for " << "D+" ); - if ( timerSvc() ) m_VtxFitTimer->pause(); - delete fitVtx_X; - delete fitVtx; - return nullptr; - } - if ( timerSvc() ) m_VtxFitTimer->pause(); - - - float chi2X = fitVtx_X->fitchi2(); - if( chi2X > m_DplusVtxChi2Cut || chi2X < 0 ) { - ATH_MSG_DEBUG(" " << "D+" << " candidate rejected by X vertex chi2 cut: chi2 = " << chi2X ); - delete fitVtx_X; - delete fitVtx; - return nullptr; - } - m_countPassedDplusVtxChi2++; - // m_mon_BcMuMuDplus_InvMass_Dplus.push_back(massX/1000.); - // m_mon_BcMuMuDs_VtxMass_Ds.push_back(vtxMassX/1000.); - m_mon_BcMuMuDplus_Chi2_Dplus.push_back(chi2X); - - } // m_doDplus_Vertexing - else { - // if vertexting is not done - just attach trackParticle links - for(const auto& tpel : vec_tracksX) { - fitVtx_X->addTrackParticleLink(tpel); - } - } - - if(m_doBc_DplusMuMuVertexing) { - - if(m_doBc_DplusMuMuCascade) { - // Cascade 2-vertex fit - - // Trk::VertexID dplusCascade, bcCascade; - Trk::VertexID dplusCascade; - - std::vector<const xAOD::TrackParticle*> trackpTripletX; - trackpTripletX.push_back(*eltrack3); - trackpTripletX.push_back(*eltrack1); - trackpTripletX.push_back(*eltrack2); - - std::vector<double> massAtVrtX; - massAtVrtX.push_back(KPLUSMASS); - massAtVrtX.push_back(PIMASS); - massAtVrtX.push_back(PIMASS); - - std::unique_ptr<Trk::IVKalState> state = m_VKVFitter->makeState(); - - dplusCascade = m_VKVFitter->startVertex(trackpTripletX,massAtVrtX,*state); - std::vector<Trk::VertexID> vrtList; - vrtList.push_back(dplusCascade); - - std::vector<const xAOD::TrackParticle*> trackpXMuMu; - trackpXMuMu.push_back(*elmu1); - trackpXMuMu.push_back(*elmu2); - - std::vector<double> massAtVrtXMuMu; - massAtVrtXMuMu.push_back(MUMASS); - massAtVrtXMuMu.push_back(MUMASS); - - // bcCascade = m_VKVFitter->nextVertex(trackpXMuMu,massAtVrtXMuMu,vrtList); - m_VKVFitter->nextVertex(trackpXMuMu,massAtVrtXMuMu,vrtList,*state); - - Amg::Vector3D VertexX; - Amg::Vector3D VertexXMuMu; - - Trk::VxCascadeInfo * result = m_VKVFitter->fitCascade(*state); - - if ( timerSvc() ) m_VtxFitTimer->pause(); - - if( result==NULL ) { - ATH_MSG_DEBUG(" Failed cascade fit for " << "B_c -> Dplus" ); - delete fitVtx_X; - delete fitVtx; - delete result; - return nullptr; - } else { - result->setSVOwnership(true); // to deleted the vertices of cascade together with VxCascadeInfo - ATH_MSG_DEBUG(" Managed cascade fit for " << "B_c -> Dplus" ); - m_countPassedBcDplusVtx++; - - const std::vector<xAOD::Vertex*> cascadeVertices = result->vertices(); - - VertexX[0] = cascadeVertices[0]->x(); VertexX[1] = cascadeVertices[0]->y(); VertexX[2] = cascadeVertices[0]->z(); - VertexXMuMu[0] = cascadeVertices[1]->x(); VertexXMuMu[1] = cascadeVertices[1]->y(); VertexXMuMu[2] = cascadeVertices[1]->z(); - - ATH_MSG_DEBUG(" " << "Bc -> Dplus Casc., VertexX = " << VertexX[0] << " " << VertexX[1] << " " << VertexX[2] ); - ATH_MSG_DEBUG(" " << "Bc -> Dplus Casc., VertexXMuMu = " << VertexXMuMu[0] << " " << VertexXMuMu[1] << " " << VertexXMuMu[2] ); - - float chi2XMuMu = result->fitChi2(); - fitVtx->setFitchi2(chi2XMuMu); - if( !(chi2XMuMu < m_bCDplusVtxChi2Cut) ) { - ATH_MSG_DEBUG(" " << "B_c -> Dplus" << " candidate rejected by XMuMu vertex chi2 cut: chi2 = " << chi2XMuMu ); - delete fitVtx_X; - delete fitVtx; - delete result; - return nullptr; - } else { - ATH_MSG_DEBUG(" " << "B_c -> Dplus" << " candidate accepted by XMuMu vertex chi2 cut: chi2 = " << chi2XMuMu ); - m_countPassedBcDplusVtxChi2++; - - const std::vector< std::vector<TLorentzVector> > &cascadeMomenta = result->getParticleMoms(); - - const std::vector<TLorentzVector> &bcTrkMom = cascadeMomenta[1]; - const std::vector<TLorentzVector> &dcTrkMom = cascadeMomenta[0]; - - std::vector<TLorentzVector>::const_iterator momItr; - - TLorentzVector dcMom, bcMom; - for(momItr=dcTrkMom.begin(); momItr!=dcTrkMom.end(); ++momItr) { dcMom += *momItr; } - for(momItr=bcTrkMom.begin(); momItr!=bcTrkMom.end(); ++momItr) { bcMom += *momItr; } - - - double pxDplus = dcMom.Px(); - double pyDplus = dcMom.Py(); - - double LxyDplus = LxyVal(pxDplus,pyDplus,VertexXMuMu,VertexX); - - if ( m_lowerDplus_LxyCut > -99. && LxyDplus < m_lowerDplus_LxyCut ) { - ATH_MSG_DEBUG(" " << "B_c -> Dplus" << " candidate rejected by Lxy cut: Lxy = " << LxyDplus ); - delete fitVtx_X; - delete fitVtx; - delete result; - return nullptr; - } else { - m_countPassedBcDplusLxy++; - ATH_MSG_DEBUG(" " << "B_c -> Dplus" << " candidate accepted by Lxy cut: Lxy = " << LxyDplus ); - - double vtxMassX = dcMom.M(); - double vtxMassXMuMu = bcMom.M(); - - double PtDplus = dcMom.Perp(); - double PtBc = bcMom.Perp(); - - // trigPartX = new TrigEFBphys( 0, 0., 0., TrigEFBphys::DPKPIPI, massX); - - ATH_MSG_DEBUG(" " << "Bc -> Dplus" << " : vtxMassXMuMu = " << vtxMassXMuMu ); - - // m_mon_BcMuMuDplus_InvMass_Dplus.push_back(massX/1000.); - m_mon_BcMuMuDplus_VtxMass_Dplus.push_back(vtxMassX/1000.); - // m_mon_BcMuMuDplus_Chi2_Dplus.push_back(chi2X); - m_mon_BcMuMuDplus_Lxy_Dplus.push_back(LxyDplus); - m_mon_BcMuMuDplus_pT_Dplus.push_back(PtDplus/1000.); - m_mon_BcMuMuDplus_pT_Bc.push_back(PtBc/1000.); - // m_mon_BcMuMuDplus_InvMass_Bc.push_back(massXMuMu/1000.); - m_mon_BcMuMuDplus_VtxMass_Bc.push_back(vtxMassXMuMu/1000.); - m_mon_BcMuMuDplus_Chi2_Bc.push_back(chi2XMuMu); - - // manually attach the track links to fitVtx - for(const auto& tpel : vec_tracks) { - fitVtx->addTrackParticleLink(tpel); - } - - // result of cascate fit is not needed anymore - delete result; - - } // end XMuMu Lxy cut - } // end XMuMu chi2 cut - // } // end if(XMuMuVxCandidate) - } // result==NULL - - - } else { - - // Try to fit XMuMu -> mu mu X vertex - if ( timerSvc() ) m_VtxFitTimer->resume(); - if (!m_bphysHelperTool->vertexFit(fitVtx,vec_tracks,massHypo).isSuccess()) { - ATH_MSG_DEBUG(" Failed to fit XMuMu vertex for " << "B_c -> D+" ); - if ( timerSvc() ) m_VtxFitTimer->pause(); - delete fitVtx_X; - delete fitVtx; - return nullptr; - } - if ( timerSvc() ) m_VtxFitTimer->pause(); - m_countPassedBcDplusVtx++; - float chi2XMuMu = fitVtx->fitchi2(); - if( chi2XMuMu > m_bCDplusVtxChi2Cut || chi2XMuMu < 0 ) { - ATH_MSG_DEBUG(" " << "B_c -> D+" << " candidate rejected by XMuMu vertex chi2 cut: chi2 = " << chi2XMuMu ); - delete fitVtx_X; - delete fitVtx; - return nullptr; - } - m_countPassedBcDplusVtxChi2++; - - // m_mon_BcMuMuDplus_InvMass_Bc.push_back(massXMuMu/1000.); - // m_mon_BcMuMuDs_VtxMass_Bc.push_back(vtxMassXMuMu/1000.); - m_mon_BcMuMuDplus_Chi2_Bc.push_back(chi2XMuMu); - - } //m_doBc_DplusMuMuCascade - } //m_doBc_DplusMuMuVertexing - else { - // if vertexting is not done - just attach trackParticle links - for(const auto& tpel : vec_tracks) { - fitVtx->addTrackParticleLink(tpel); - } - } - - ATH_MSG_DEBUG(" Good B_c->D+ found! doDplusVtx: " << (m_doDplus_Vertexing ? "Yes" : "No") - << " doBcDplusVtx: " << (m_doBc_DplusMuMuVertexing ? "Yes" : "No") - << " m = " << fitVtx->mass() << ", " - << "chi2 = " << fitVtx->fitchi2() << ", vertex (" << fitVtx->fitx() << ", " - << fitVtx->fity() << ", " << fitVtx->fitz() << ")" ); - - trigPartX = fitVtx_X; - return fitVtx; -} //checkBcMuMuDplus - -xAOD::TrigBphys* TrigEFBMuMuXFex::checkBcMuMuDstar(const ElementLink<xAOD::TrackParticleContainer> & eltrack1, - const ElementLink<xAOD::TrackParticleContainer> & eltrack2, - const ElementLink<xAOD::TrackParticleContainer> & eltrack3, - const ElementLink<xAOD::TrackParticleContainer> & elmu1, - const ElementLink<xAOD::TrackParticleContainer> & elmu2, - xAOD::TrigBphys* & trigPartX) { - - trigPartX = nullptr; - xAOD::TrigBphys * fitVtx_X(nullptr); - xAOD::TrigBphys * fitVtx(nullptr); - - std::vector<double> massHypoD0 = {KPLUSMASS,PIMASS}; - std::vector<double> massHypo = {MUMASS,MUMASS,KPLUSMASS,PIMASS,PIMASS}; - float massX; - float massXMuMu; - double xD0Mass; - - ATH_MSG_DEBUG("Try to build " << "Dstar" << " with tracks " << *eltrack1 << ", " << *eltrack2 << ", " << *eltrack3 ); - - if ( ((*eltrack1)->charge())*((*eltrack3)->charge()) < 0 ) { - massX = XKPiPiMass(*eltrack1, *eltrack2, *eltrack3); - massXMuMu = XKPiPiMuMuMass(*elmu1, *elmu2, *eltrack1, *eltrack2, *eltrack3); - xD0Mass = XMass(*eltrack1,*eltrack2,bD_to_Kstar); // decay = bD_to_Kstar to actually calculate m(K pi) - } else { - massX = XKPiPiMass(*eltrack2, *eltrack1, *eltrack3); - massXMuMu = XKPiPiMuMuMass(*elmu1, *elmu2, *eltrack2, *eltrack1, *eltrack3); - xD0Mass = XMass(*eltrack2,*eltrack1,bD_to_Kstar); // decay = bD_to_Kstar to actually calculate m(K pi) - } - - if ( !(xD0Mass > m_lowerD0Dstar_MassCut && xD0Mass < m_upperD0Dstar_MassCut && (massX - xD0Mass) < m_upperDstar_DMCut) ) { - // - ATH_MSG_DEBUG(" " << "D*" << " candidate rejected by the mass cut: md0, dM = " << xD0Mass << " , " << massX ); - return nullptr; - } - m_countPassedDstarMass++; - - if ( !(massXMuMu > m_lowerBc_DstarMuMuMassCut && massXMuMu < m_upperBc_DstarMuMuMassCut) ) { - // - ATH_MSG_DEBUG(" " << "B_c -> D*" << " candidate rejected by the mass cut: m = " << massXMuMu ); - return nullptr; - } - m_countPassedBcDstarMass++; - - // create initial object - fitVtx_X = new xAOD::TrigBphys; - fitVtx_X->makePrivateStore(); - fitVtx_X->initialise(0,0.,0.,0., - xAOD::TrigBphys::DSTDZPI, massX, xAOD::TrigBphys::EF); - fitVtx = new xAOD::TrigBphys; - fitVtx->makePrivateStore(); - fitVtx->initialise(0,0.,0.,0., - xAOD::TrigBphys::BCDSTMUMU, massXMuMu, xAOD::TrigBphys::EF); - - std::vector<ElementLink<xAOD::TrackParticleContainer> > vec_tracksD0; - std::vector<ElementLink<xAOD::TrackParticleContainer> > vec_tracks; - - if ( ((*eltrack1)->charge())*((*eltrack3)->charge()) < 0 ) { - vec_tracksD0 = {eltrack1,eltrack2}; - vec_tracks = {elmu1,elmu2,eltrack1,eltrack2,eltrack3}; - - m_mon_BcMuMuDstar_Pt_K.push_back ((*eltrack1)->pt()*0.001); - m_mon_BcMuMuDstar_Eta_K.push_back((*eltrack1)->eta()); - m_mon_BcMuMuDstar_Phi_K.push_back((*eltrack1)->phi()); - m_mon_BcMuMuDstar_Pt_pi.push_back( (*eltrack2)->pt()*0.001); - m_mon_BcMuMuDstar_Eta_pi.push_back((*eltrack2)->eta()); - m_mon_BcMuMuDstar_Phi_pi.push_back((*eltrack2)->phi()); - } else { - vec_tracksD0 = {eltrack2,eltrack1}; - vec_tracks = {elmu1,elmu2,eltrack2,eltrack1,eltrack3}; - - m_mon_BcMuMuDstar_Pt_K.push_back ((*eltrack2)->pt()*0.001); - m_mon_BcMuMuDstar_Eta_K.push_back((*eltrack2)->eta()); - m_mon_BcMuMuDstar_Phi_K.push_back((*eltrack2)->phi()); - m_mon_BcMuMuDstar_Pt_pi.push_back( (*eltrack1)->pt()*0.001); - m_mon_BcMuMuDstar_Eta_pi.push_back((*eltrack1)->eta()); - m_mon_BcMuMuDstar_Phi_pi.push_back((*eltrack1)->phi()); - } - - m_mon_BcMuMuDstar_Pt_pis.push_back ((*eltrack3)->pt()*0.001); - m_mon_BcMuMuDstar_Eta_pis.push_back((*eltrack3)->eta()); - m_mon_BcMuMuDstar_Phi_pis.push_back((*eltrack3)->phi()); - - m_mon_BcMuMuDstar_InvMass_D0Dstar.push_back(xD0Mass/1000.); - m_mon_BcMuMuDstar_DelMass_Dstar.push_back((massX-xD0Mass)/1000.); - m_mon_BcMuMuDstar_InvMass_Bc.push_back(massXMuMu/1000.); - - if(m_doD0Dstar_Vertexing) { - if ( timerSvc() ) m_VtxFitTimer->resume(); - if (!m_bphysHelperTool->vertexFit(fitVtx_X,vec_tracksD0,massHypoD0).isSuccess()) { - ATH_MSG_DEBUG(" Failed to fit D0 vertex for " << "D*" ); - if ( timerSvc() ) m_VtxFitTimer->pause(); - delete fitVtx_X; - delete fitVtx; - return nullptr; - } - if ( timerSvc() ) m_VtxFitTimer->pause(); - - - float chi2X = fitVtx_X->fitchi2(); - if( chi2X > m_D0DstarVtxChi2Cut || chi2X < 0 ) { - ATH_MSG_DEBUG(" " << "D*" << " candidate rejected by D0 vertex chi2 cut: chi2 = " << chi2X ); - delete fitVtx_X; - delete fitVtx; - return nullptr; - } - m_countPassedD0DstarVtxChi2++; - // m_mon_BcMuMuDplus_InvMass_Dplus.push_back(massX/1000.); - // m_mon_BcMuMuDs_VtxMass_Ds.push_back(vtxMassX/1000.); - m_mon_BcMuMuDstar_Chi2_D0Dstar.push_back(chi2X); - - } // m_doDplus_Vertexing - else { - // if vertexting is not done - just attach trackParticle links - for(const auto& tpel : vec_tracksD0) { - fitVtx_X->addTrackParticleLink(tpel); - } - } - - if(m_doBc_DstarMuMuVertexing) { - - if(m_doBc_DstarMuMuCascade) { - // Cascade 2-vertex fit - - // Trk::VertexID dplusCascade, bcCascade; - Trk::VertexID d0Cascade; - - std::vector<const xAOD::TrackParticle*> trackpDupletX; - - if ( ((*eltrack1)->charge())*((*eltrack3)->charge()) < 0 ) { - trackpDupletX.push_back(*eltrack1); - trackpDupletX.push_back(*eltrack2); - } else { - trackpDupletX.push_back(*eltrack2); - trackpDupletX.push_back(*eltrack1); - } - - std::vector<double> massAtVrtX; - massAtVrtX.push_back(KPLUSMASS); - massAtVrtX.push_back(PIMASS); - - std::unique_ptr<Trk::IVKalState> state = m_VKVFitter->makeState(); - - d0Cascade = m_VKVFitter->startVertex(trackpDupletX,massAtVrtX,*state); - - std::vector<Trk::VertexID> vrtList; - vrtList.push_back(d0Cascade); - - std::vector<const xAOD::TrackParticle*> trackpXMuMu; - trackpXMuMu.push_back(*eltrack3); - trackpXMuMu.push_back(*elmu1); - trackpXMuMu.push_back(*elmu2); - - std::vector<double> massAtVrtXMuMu; - massAtVrtXMuMu.push_back(PIMASS); - massAtVrtXMuMu.push_back(MUMASS); - massAtVrtXMuMu.push_back(MUMASS); - - // bcCascade = m_VKVFitter->nextVertex(trackpXMuMu,massAtVrtXMuMu,vrtList); - m_VKVFitter->nextVertex(trackpXMuMu,massAtVrtXMuMu,vrtList,*state); - - Amg::Vector3D VertexX; - Amg::Vector3D VertexXMuMu; - - Trk::VxCascadeInfo * result = m_VKVFitter->fitCascade(*state); - - if ( timerSvc() ) m_VtxFitTimer->pause(); - - if( result==NULL ) { - ATH_MSG_DEBUG(" Failed cascade fit for " << "B_c -> Dstar" ); - delete fitVtx_X; - delete fitVtx; - delete result; - return nullptr; - } else { - result->setSVOwnership(true); // to deleted the vertices of cascade together with VxCascadeInfo - ATH_MSG_DEBUG(" Managed cascade fit for " << "B_c -> Dstar" ); - m_countPassedBcDstarVtx++; - - const std::vector<xAOD::Vertex*> cascadeVertices = result->vertices(); - - VertexX[0] = cascadeVertices[0]->x(); VertexX[1] = cascadeVertices[0]->y(); VertexX[2] = cascadeVertices[0]->z(); - VertexXMuMu[0] = cascadeVertices[1]->x(); VertexXMuMu[1] = cascadeVertices[1]->y(); VertexXMuMu[2] = cascadeVertices[1]->z(); - - ATH_MSG_DEBUG(" " << "Bc -> Dstar Casc., VertexX = " << VertexX[0] << " " << VertexX[1] << " " << VertexX[2] ); - ATH_MSG_DEBUG(" " << "Bc -> Dstar Casc., VertexXMuMu = " << VertexXMuMu[0] << " " << VertexXMuMu[1] << " " << VertexXMuMu[2] ); - - float chi2XMuMu = result->fitChi2(); - fitVtx->setFitchi2(chi2XMuMu); - if( !(chi2XMuMu < m_bCDstarVtxChi2Cut) ) { - ATH_MSG_DEBUG(" " << "B_c -> Dstar" << " candidate rejected by XMuMu vertex chi2 cut: chi2 = " << chi2XMuMu ); - delete fitVtx_X; - delete fitVtx; - delete result; - return nullptr; - } else { - ATH_MSG_DEBUG(" " << "B_c -> Dstar" << " candidate accepted by XMuMu vertex chi2 cut: chi2 = " << chi2XMuMu ); - m_countPassedBcDstarVtxChi2++; - - const std::vector< std::vector<TLorentzVector> > &cascadeMomenta = result->getParticleMoms(); - - const std::vector<TLorentzVector> &bcTrkMom = cascadeMomenta[1]; - const std::vector<TLorentzVector> &d0TrkMom = cascadeMomenta[0]; - - std::vector<TLorentzVector>::const_iterator momItr; - - TLorentzVector d0Mom, bcMom; - for(momItr=d0TrkMom.begin(); momItr!=d0TrkMom.end(); ++momItr) { d0Mom += *momItr; } - for(momItr=bcTrkMom.begin(); momItr!=bcTrkMom.end(); ++momItr) { bcMom += *momItr; } - - - double pxD0 = d0Mom.Px(); - double pyD0 = d0Mom.Py(); - - double LxyD0 = LxyVal(pxD0,pyD0,VertexXMuMu,VertexX); - - if ( m_lowerD0Dstar_LxyCut > -99. && LxyD0 < m_lowerD0Dstar_LxyCut ) { - ATH_MSG_DEBUG(" " << "B_c -> Dstar" << " candidate rejected by Lxy cut: Lxy = " << LxyD0 ); - delete fitVtx_X; - delete fitVtx; - delete result; - return nullptr; - } else { - m_countPassedBcD0DstarLxy++; - ATH_MSG_DEBUG(" " << "B_c -> Dstar" << " candidate accepted by Lxy cut: Lxy = " << LxyD0 ); - - double vtxMassD0 = d0Mom.M(); - - double pxDstar = pxD0 + bcTrkMom[0].Px(); - double pyDstar = pyD0 + bcTrkMom[0].Py(); - double pzDstar = d0Mom.Pz() + bcTrkMom[0].Pz(); - double eDstar = d0Mom.E() + bcTrkMom[0].E(); - - double PtDstar = sqrt(pxDstar*pxDstar+pyDstar*pyDstar); - - double vtxDstarMass = sqrt(eDstar*eDstar-pxDstar*pxDstar-pyDstar*pyDstar-pzDstar*pzDstar); - - double vtxMassXMuMu = bcMom.M(); - double PtBc = bcMom.Perp(); - - ATH_MSG_DEBUG(" " << "Bc -> Dstar" << " : vtxMassXMuMu = " << vtxMassXMuMu ); - - // m_mon_BcMuMuDplus_InvMass_Dplus.push_back(massX/1000.); - m_mon_BcMuMuDstar_VtxMass_D0Dstar.push_back(vtxMassD0/1000.); - m_mon_BcMuMuDstar_VtxDelMass_Dstar.push_back((vtxDstarMass-vtxMassD0)/1000.); - // m_mon_BcMuMuDplus_Chi2_Dplus.push_back(chi2X); - m_mon_BcMuMuDstar_Lxy_D0Dstar.push_back(LxyD0); - m_mon_BcMuMuDstar_pT_Dstar.push_back(PtDstar/1000.); - m_mon_BcMuMuDstar_pT_Bc.push_back(PtBc/1000.); - // m_mon_BcMuMuDplus_InvMass_Bc.push_back(massXMuMu/1000.); - m_mon_BcMuMuDstar_VtxMass_Bc.push_back(vtxMassXMuMu/1000.); - m_mon_BcMuMuDstar_Chi2_Bc.push_back(chi2XMuMu); - - // manually attach the track links to fitVtx - for(const auto& tpel : vec_tracks) { - fitVtx->addTrackParticleLink(tpel); - } - - // result of cascate fit is not needed anymore - delete result; - - } // end XMuMu Lxy cut - } // end XMuMu chi2 cut - // } // end if(XMuMuVxCandidate) - } // result==NULL - - - } else { - - // Try to fit XMuMu -> mu mu X vertex - if ( timerSvc() ) m_VtxFitTimer->resume(); - if (!m_bphysHelperTool->vertexFit(fitVtx,vec_tracks,massHypo).isSuccess()) { - ATH_MSG_DEBUG(" Failed to fit XMuMu vertex for " << "B_c -> Dstar" ); - if ( timerSvc() ) m_VtxFitTimer->pause(); - delete fitVtx_X; - delete fitVtx; - return nullptr; - } - if ( timerSvc() ) m_VtxFitTimer->pause(); - m_countPassedBcDstarVtx++; - float chi2XMuMu = fitVtx->fitchi2(); - if( chi2XMuMu > m_bCDstarVtxChi2Cut || chi2XMuMu < 0 ) { - ATH_MSG_DEBUG(" " << "B_c -> D*" << " candidate rejected by XMuMu vertex chi2 cut: chi2 = " << chi2XMuMu ); - delete fitVtx_X; - delete fitVtx; - return nullptr; - } - m_countPassedBcDstarVtxChi2++; - - m_mon_BcMuMuDstar_Chi2_Bc.push_back(chi2XMuMu); - - } //m_doBc_DstarMuMuCascade - } //m_doBc_DstarMuMuVertexing - else { - // if vertexting is not done - just attach trackParticle links - for(const auto& tpel : vec_tracks) { - fitVtx->addTrackParticleLink(tpel); - } - } - - ATH_MSG_DEBUG(" Good B_c->D* found! doD0DstarVtx: " << (m_doD0Dstar_Vertexing ? "Yes" : "No") - << " doBcDstarVtx: " << (m_doBc_DstarMuMuVertexing ? "Yes" : "No") - << " m = " << fitVtx->mass() << ", " - << "chi2 = " << fitVtx->fitchi2() << ", vertex (" << fitVtx->fitx() << ", " - << fitVtx->fity() << ", " << fitVtx->fitz() << ")" ); - - trigPartX = fitVtx_X; - return fitVtx; -} //checkBcMuMuDstar - -xAOD::TrigBphys* TrigEFBMuMuXFex::checkBcMuMuD0(const ElementLink<xAOD::TrackParticleContainer> & eltrack1, - const ElementLink<xAOD::TrackParticleContainer> & eltrack2, - const ElementLink<xAOD::TrackParticleContainer> & elmu1, - const ElementLink<xAOD::TrackParticleContainer> & elmu2, - xAOD::TrigBphys* & trigPartX) { - - trigPartX = nullptr; - xAOD::TrigBphys * fitVtx_X(nullptr); - xAOD::TrigBphys * fitVtx(nullptr); - - std::vector<double> massHypoX = {KPLUSMASS,PIMASS}; - std::vector<double> massHypo = {MUMASS,MUMASS,KPLUSMASS,PIMASS}; - float massX; - float massXMuMu; - - ATH_MSG_DEBUG("Try to build " << "D0" << " with tracks " << *eltrack1 << ", " << *eltrack2 ); - - double xD0Mass1 = XMass(*eltrack1,*eltrack2,bD_to_Kstar); // decay = bD_to_Kstar to actually calculate m(K pi) - double xD0Mass2 = XMass(*eltrack2,*eltrack1,bD_to_Kstar); // decay = bD_to_Kstar to actually calculate m(K pi) - - if ( xD0Mass1 > m_lowerD0_MassCut && xD0Mass1 < m_upperD0_MassCut ) { - massX = xD0Mass1; - massXMuMu = XMuMuMass (*elmu1,*elmu2,*eltrack1,*eltrack2,bD_to_Kstar); - } else { - massX = xD0Mass2; - massXMuMu = XMuMuMass (*elmu1,*elmu2,*eltrack2,*eltrack1,bD_to_Kstar); - } - - m_countPassedD0Mass++; - - if ( !(massXMuMu > m_lowerBc_D0MuMuMassCut && massXMuMu < m_upperBc_D0MuMuMassCut) ) { - // - ATH_MSG_DEBUG(" " << "B_c -> D0" << " candidate rejected by the mass cut: m = " << massXMuMu ); - return nullptr; - } - m_countPassedBcD0Mass++; - - // create initial object - fitVtx_X = new xAOD::TrigBphys; - fitVtx_X->makePrivateStore(); - fitVtx_X->initialise(0,0.,0.,0., - xAOD::TrigBphys::DZKPI, massX, xAOD::TrigBphys::EF); - fitVtx = new xAOD::TrigBphys; - fitVtx->makePrivateStore(); - fitVtx->initialise(0,0.,0.,0., - xAOD::TrigBphys::BCDSTMUMU, massXMuMu, xAOD::TrigBphys::EF); - - std::vector<ElementLink<xAOD::TrackParticleContainer> > vec_tracksX; - std::vector<ElementLink<xAOD::TrackParticleContainer> > vec_tracks; - - if ( xD0Mass1 > m_lowerD0_MassCut && xD0Mass1 < m_upperD0_MassCut ) { - vec_tracksX = {eltrack1,eltrack2}; - vec_tracks = {elmu1,elmu2,eltrack1,eltrack2}; - - m_mon_BcMuMuD0_Pt_K.push_back ((*eltrack1)->pt()*0.001); - m_mon_BcMuMuD0_Eta_K.push_back((*eltrack1)->eta()); - m_mon_BcMuMuD0_Phi_K.push_back((*eltrack1)->phi()); - m_mon_BcMuMuD0_Pt_pi.push_back( (*eltrack2)->pt()*0.001); - m_mon_BcMuMuD0_Eta_pi.push_back((*eltrack2)->eta()); - m_mon_BcMuMuD0_Phi_pi.push_back((*eltrack2)->phi()); - } else { - vec_tracksX = {eltrack2,eltrack1}; - vec_tracks = {elmu1,elmu2,eltrack2,eltrack1}; - - m_mon_BcMuMuD0_Pt_K.push_back ((*eltrack2)->pt()*0.001); - m_mon_BcMuMuD0_Eta_K.push_back((*eltrack2)->eta()); - m_mon_BcMuMuD0_Phi_K.push_back((*eltrack2)->phi()); - m_mon_BcMuMuD0_Pt_pi.push_back( (*eltrack1)->pt()*0.001); - m_mon_BcMuMuD0_Eta_pi.push_back((*eltrack1)->eta()); - m_mon_BcMuMuD0_Phi_pi.push_back((*eltrack1)->phi()); - } - - m_mon_BcMuMuD0_InvMass_D0.push_back(massX/1000.); - m_mon_BcMuMuD0_InvMass_Bc.push_back(massXMuMu/1000.); - - if(m_doD0_Vertexing) { - if ( timerSvc() ) m_VtxFitTimer->resume(); - if (!m_bphysHelperTool->vertexFit(fitVtx_X,vec_tracksX,massHypoX).isSuccess()) { - ATH_MSG_DEBUG(" Failed to fit D0 vertex for " << "D0" ); - if ( timerSvc() ) m_VtxFitTimer->pause(); - delete fitVtx_X; - delete fitVtx; - return nullptr; - } - if ( timerSvc() ) m_VtxFitTimer->pause(); - - - float chi2X = fitVtx_X->fitchi2(); - if( chi2X > m_D0VtxChi2Cut || chi2X < 0 ) { - ATH_MSG_DEBUG(" " << "D0" << " candidate rejected by D0 vertex chi2 cut: chi2 = " << chi2X ); - delete fitVtx_X; - delete fitVtx; - return nullptr; - } - m_countPassedD0VtxChi2++; - // m_mon_BcMuMuDplus_InvMass_Dplus.push_back(massX/1000.); - // m_mon_BcMuMuDs_VtxMass_Ds.push_back(vtxMassX/1000.); - m_mon_BcMuMuD0_Chi2_D0.push_back(chi2X); - - } // m_doDplus_Vertexing - else { - // if vertexting is not done - just attach trackParticle links - for(const auto& tpel : vec_tracksX) { - fitVtx_X->addTrackParticleLink(tpel); - } - } - - if(m_doBc_D0MuMuVertexing) { - - if(m_doBc_D0MuMuCascade) { - // Cascade 2-vertex fit - - // Trk::VertexID dplusCascade, bcCascade; - Trk::VertexID d0Cascade; - - std::vector<const xAOD::TrackParticle*> trackpDupletX; - - if ( xD0Mass1 > m_lowerD0_MassCut && xD0Mass1 < m_upperD0_MassCut ) { - trackpDupletX.push_back(*eltrack1); - trackpDupletX.push_back(*eltrack2); - } else { - trackpDupletX.push_back(*eltrack2); - trackpDupletX.push_back(*eltrack1); - } - - std::vector<double> massAtVrtX; - massAtVrtX.push_back(KPLUSMASS); - massAtVrtX.push_back(PIMASS); - - std::unique_ptr<Trk::IVKalState> state = m_VKVFitter->makeState(); - - d0Cascade = m_VKVFitter->startVertex(trackpDupletX,massAtVrtX,*state); - - std::vector<Trk::VertexID> vrtList; - vrtList.push_back(d0Cascade); - - std::vector<const xAOD::TrackParticle*> trackpXMuMu; - trackpXMuMu.push_back(*elmu1); - trackpXMuMu.push_back(*elmu2); - - std::vector<double> massAtVrtXMuMu; - massAtVrtXMuMu.push_back(MUMASS); - massAtVrtXMuMu.push_back(MUMASS); - - // bcCascade = m_VKVFitter->nextVertex(trackpXMuMu,massAtVrtXMuMu,vrtList); - m_VKVFitter->nextVertex(trackpXMuMu,massAtVrtXMuMu,vrtList,*state); - - Amg::Vector3D VertexX; - Amg::Vector3D VertexXMuMu; - - Trk::VxCascadeInfo * result = m_VKVFitter->fitCascade(*state); - - if ( timerSvc() ) m_VtxFitTimer->pause(); - - if( result==NULL ) { - ATH_MSG_DEBUG(" Failed cascade fit for B_c -> D0" ); - delete fitVtx_X; - delete fitVtx; - delete result; - return nullptr; - } else { - result->setSVOwnership(true); // to deleted the vertices of cascade together with VxCascadeInfo - ATH_MSG_DEBUG(" Managed cascade fit for B_c -> D0" ); - m_countPassedBcD0Vtx++; - - const std::vector<xAOD::Vertex*> cascadeVertices = result->vertices(); - - VertexX[0] = cascadeVertices[0]->x(); VertexX[1] = cascadeVertices[0]->y(); VertexX[2] = cascadeVertices[0]->z(); - VertexXMuMu[0] = cascadeVertices[1]->x(); VertexXMuMu[1] = cascadeVertices[1]->y(); VertexXMuMu[2] = cascadeVertices[1]->z(); - - ATH_MSG_DEBUG(" Bc -> D0 Casc., VertexX = " << VertexX[0] << " " << VertexX[1] << " " << VertexX[2] ); - ATH_MSG_DEBUG(" Bc -> D0 Casc., VertexXMuMu = " << VertexXMuMu[0] << " " << VertexXMuMu[1] << " " << VertexXMuMu[2] ); - - float chi2XMuMu = result->fitChi2(); - fitVtx->setFitchi2(chi2XMuMu); - if( !(chi2XMuMu < m_bCD0VtxChi2Cut) ) { - ATH_MSG_DEBUG(" B_c -> D0 candidate rejected by XMuMu vertex chi2 cut: chi2 = " << chi2XMuMu ); - delete fitVtx_X; - delete fitVtx; - delete result; - return nullptr; - } else { - ATH_MSG_DEBUG(" B_c -> D0 candidate accepted by XMuMu vertex chi2 cut: chi2 = " << chi2XMuMu ); - m_countPassedBcD0VtxChi2++; - - const std::vector< std::vector<TLorentzVector> > &cascadeMomenta = result->getParticleMoms(); - - const std::vector<TLorentzVector> &bcTrkMom = cascadeMomenta[1]; - const std::vector<TLorentzVector> &d0TrkMom = cascadeMomenta[0]; - - std::vector<TLorentzVector>::const_iterator momItr; - - TLorentzVector d0Mom, bcMom; - for(momItr=d0TrkMom.begin(); momItr!=d0TrkMom.end(); ++momItr) { d0Mom += *momItr; } - for(momItr=bcTrkMom.begin(); momItr!=bcTrkMom.end(); ++momItr) { bcMom += *momItr; } - - double pxD0 = d0Mom.Px(); - double pyD0 = d0Mom.Py(); - - double LxyD0 = LxyVal(pxD0,pyD0,VertexXMuMu,VertexX); - - if ( m_lowerD0_LxyCut > -99. && LxyD0 < m_lowerD0_LxyCut ) { - ATH_MSG_DEBUG(" B_c -> D0 candidate rejected by Lxy cut: Lxy = " << LxyD0 ); - delete fitVtx_X; - delete fitVtx; - delete result; - return nullptr; - } else { - m_countPassedBcD0Lxy++; - ATH_MSG_DEBUG(" B_c -> D0 candidate accepted by Lxy cut: Lxy = " << LxyD0 ); - - double vtxMassD0 = d0Mom.M(); - double PtD0 = d0Mom.Perp(); - - double vtxMassXMuMu = bcMom.M(); - double PtBc = bcMom.Perp(); - - ATH_MSG_DEBUG(" Bc -> D0 : vtxMassXMuMu = " << vtxMassXMuMu ); - - // m_mon_BcMuMuDplus_InvMass_Dplus.push_back(massX/1000.); - m_mon_BcMuMuD0_VtxMass_D0.push_back(vtxMassD0/1000.); - // m_mon_BcMuMuDplus_Chi2_Dplus.push_back(chi2X); - m_mon_BcMuMuD0_Lxy_D0.push_back(LxyD0); - m_mon_BcMuMuD0_pT_D0.push_back(PtD0/1000.); - m_mon_BcMuMuD0_pT_Bc.push_back(PtBc/1000.); - // m_mon_BcMuMuDplus_InvMass_Bc.push_back(massXMuMu/1000.); - m_mon_BcMuMuD0_VtxMass_Bc.push_back(vtxMassXMuMu/1000.); - m_mon_BcMuMuD0_Chi2_Bc.push_back(chi2XMuMu); - - // manually attach the track links to fitVtx - for(const auto& tpel : vec_tracks) { - fitVtx->addTrackParticleLink(tpel); - } - - // result of cascate fit is not needed anymore - delete result; - - } // end XMuMu Lxy cut - } // end XMuMu chi2 cut - // } // end if(XMuMuVxCandidate) - } // result==NULL - - - } else { - - // Try to fit XMuMu -> mu mu X vertex - if ( timerSvc() ) m_VtxFitTimer->resume(); - if (!m_bphysHelperTool->vertexFit(fitVtx,vec_tracks,massHypo).isSuccess()) { - ATH_MSG_DEBUG(" Failed to fit XMuMu vertex for B_c -> Dstar" ); - if ( timerSvc() ) m_VtxFitTimer->pause(); - delete fitVtx_X; - delete fitVtx; - return nullptr; - } - if ( timerSvc() ) m_VtxFitTimer->pause(); - m_countPassedBcDstarVtx++; - float chi2XMuMu = fitVtx->fitchi2(); - if( chi2XMuMu > m_bCDstarVtxChi2Cut || chi2XMuMu < 0 ) { - ATH_MSG_DEBUG(" B_c -> D* candidate rejected by XMuMu vertex chi2 cut: chi2 = " << chi2XMuMu ); - delete fitVtx_X; - delete fitVtx; - return nullptr; - } - m_countPassedBcD0VtxChi2++; - - m_mon_BcMuMuD0_Chi2_Bc.push_back(chi2XMuMu); - - } //m_doBc_D0MuMuCascade - } //m_doBc_D0MuMuVertexing - else { - // if vertexting is not done - just attach trackParticle links - for(const auto& tpel : vec_tracks) { - fitVtx->addTrackParticleLink(tpel); - } - } - - ATH_MSG_DEBUG(" Good B_c->D0 found! doD0Vtx: " << (m_doD0_Vertexing ? "Yes" : "No") - << " doBcD0Vtx: " << (m_doBc_D0MuMuVertexing ? "Yes" : "No") - << " m = " << fitVtx->mass() << ", " - << "chi2 = " << fitVtx->fitchi2() << ", vertex (" << fitVtx->fitx() << ", " - << fitVtx->fity() << ", " << fitVtx->fitz() << ")" ); - - trigPartX = fitVtx_X; - return fitVtx; -} //checkBcMuMuD0 - -xAOD::TrigBphys* TrigEFBMuMuXFex::checkLbMuMuLambda(const ElementLink<xAOD::TrackParticleContainer> & eltrack1, - const ElementLink<xAOD::TrackParticleContainer> & eltrack2, - const ElementLink<xAOD::TrackParticleContainer> & elmu1, - const ElementLink<xAOD::TrackParticleContainer> & elmu2, - xAOD::TrigBphys* & trigPartX) { - - trigPartX = nullptr; - xAOD::TrigBphys * fitVtx_X(nullptr); - xAOD::TrigBphys * fitVtx(nullptr); - - std::vector<double> massHypoX = {PROTONMASS,PIMASS}; - std::vector<double> massHypo = {MUMASS,MUMASS,PROTONMASS,PIMASS}; - - ATH_MSG_DEBUG("Try to build Lambda with tracks " << *eltrack1 << ", " << *eltrack2 ); - - - float massX = XMass(*eltrack1, *eltrack2,lB_to_L); - if( !(massX > m_lowerLambda_PrPiMassCut && massX < m_upperLambda_PrPiMassCut) ) { - ATH_MSG_DEBUG(" Lambda candidate rejected by the mass cut: m = " << massX ); - return nullptr; - } - ATH_MSG_DEBUG(" Lambda candidate accepted by the mass cut: m = " << massX ); - m_countPassedLambdaMass++; - - float massXMuMu = XMuMuMass(*elmu1, *elmu2, *eltrack1, *eltrack2,lB_to_L); - if( !(massXMuMu > m_lowerLb_LambdaMuMuMassCut && massXMuMu < m_upperLb_LambdaMuMuMassCut) ) { - ATH_MSG_DEBUG(" L_b -> L candidate rejected by the mass cut: m = " << massXMuMu ); - return nullptr; - } - ATH_MSG_DEBUG(" L_b -> L candidate accepted by the mass cut: m = " << massXMuMu ); - m_countPassedLbMass++; - - // create initial object - fitVtx_X = new xAOD::TrigBphys; - fitVtx_X->makePrivateStore(); - fitVtx_X->initialise(0,0.,0.,0., - xAOD::TrigBphys::LAMBDAPIP, massX, xAOD::TrigBphys::EF); - fitVtx = new xAOD::TrigBphys; - fitVtx->makePrivateStore(); - fitVtx->initialise(0,0.,0.,0., - xAOD::TrigBphys::LBLMUMU, massXMuMu, xAOD::TrigBphys::EF); - - std::vector<ElementLink<xAOD::TrackParticleContainer> > vec_tracksX = {eltrack1,eltrack2}; - std::vector<ElementLink<xAOD::TrackParticleContainer> > vec_tracks = {elmu1,elmu2,eltrack1,eltrack2}; - - m_mon_LbMuMuLambda_Pt_P.push_back ((*eltrack1)->pt()*0.001); - m_mon_LbMuMuLambda_Eta_P.push_back((*eltrack1)->eta()); - m_mon_LbMuMuLambda_Phi_P.push_back((*eltrack1)->phi()); - m_mon_LbMuMuLambda_Pt_Pi.push_back( (*eltrack2)->pt()*0.001); - m_mon_LbMuMuLambda_Eta_Pi.push_back((*eltrack2)->eta()); - m_mon_LbMuMuLambda_Phi_Pi.push_back((*eltrack2)->phi()); - - m_mon_LbMuMuLambda_InvMass_Lambda.push_back(massX/1000.); - m_mon_LbMuMuLambda_InvMass_Lb.push_back(massXMuMu/1000.); - - if(m_doLambda_PPiVertexing) { - if ( timerSvc() ) m_VtxFitTimer->resume(); - if (!m_bphysHelperTool->vertexFit(fitVtx_X,vec_tracksX,massHypoX).isSuccess()) { - ATH_MSG_DEBUG(" Failed to fit X vertex for Lambda" ); - if ( timerSvc() ) m_VtxFitTimer->pause(); - delete fitVtx_X; - delete fitVtx; - return nullptr; - } - if ( timerSvc() ) m_VtxFitTimer->pause(); - - - float chi2X = fitVtx_X->fitchi2(); - if( chi2X > m_lambdaVtxChi2Cut || chi2X < 0 ) { - ATH_MSG_DEBUG(" Lambda candidate rejected by X vertex chi2 cut: chi2 = " << chi2X ); - delete fitVtx_X; - delete fitVtx; - return nullptr; - } - m_countPassedLambdaVtxChi2++; - // m_mon_BcMuMuDplus_InvMass_Dplus.push_back(massX/1000.); - // m_mon_BcMuMuDs_VtxMass_Ds.push_back(vtxMassX/1000.); - m_mon_LbMuMuLambda_Chi2_Lambda.push_back(chi2X); - - } // m_doDplus_Vertexing - else { - // if vertexting is not done - just attach trackParticle links - for(const auto& tpel : vec_tracksX) { - fitVtx_X->addTrackParticleLink(tpel); - } - } - - if(m_doLb_LambdaMuMuVertexing) { - - if(m_doLb_LambdaMuMuCascade) { - // Cascade 2-vertex fit - - // Trk::VertexID dplusCascade, bcCascade; - Trk::VertexID LambdaCascade; - - std::vector<const xAOD::TrackParticle*> trackpDupletX; - trackpDupletX.push_back(*eltrack1); - trackpDupletX.push_back(*eltrack2); - - std::vector<double> massAtVrtX; - massAtVrtX.push_back(PROTONMASS); - massAtVrtX.push_back(PIMASS); - - std::unique_ptr<Trk::IVKalState> state = m_VKVFitter->makeState(); - - LambdaCascade = m_VKVFitter->startVertex(trackpDupletX,massAtVrtX,*state); - - std::vector<Trk::VertexID> vrtList; - vrtList.push_back(LambdaCascade); - - std::vector<const xAOD::TrackParticle*> trackpXMuMu; - trackpXMuMu.push_back(*elmu1); - trackpXMuMu.push_back(*elmu2); - - std::vector<double> massAtVrtXMuMu; - massAtVrtXMuMu.push_back(MUMASS); - massAtVrtXMuMu.push_back(MUMASS); - - // bcCascade = m_VKVFitter->nextVertex(trackpXMuMu,massAtVrtXMuMu,vrtList); - m_VKVFitter->nextVertex(trackpXMuMu,massAtVrtXMuMu,vrtList,*state); - - Amg::Vector3D VertexX; - Amg::Vector3D VertexXMuMu; - - Trk::VxCascadeInfo * result = m_VKVFitter->fitCascade(*state); - - if ( timerSvc() ) m_VtxFitTimer->pause(); - - if( result==NULL ) { - ATH_MSG_DEBUG(" Failed cascade fit for L_b -> Lambda" ); - delete fitVtx_X; - delete fitVtx; - delete result; - return nullptr; - } else { - result->setSVOwnership(true); // to deleted the vertices of cascade together with VxCascadeInfo - ATH_MSG_DEBUG(" Managed cascade fit for L_b -> Lambda" ); - m_countPassedLbVtx++; - - const std::vector<xAOD::Vertex*> cascadeVertices = result->vertices(); - - VertexX[0] = cascadeVertices[0]->x(); VertexX[1] = cascadeVertices[0]->y(); VertexX[2] = cascadeVertices[0]->z(); - VertexXMuMu[0] = cascadeVertices[1]->x(); VertexXMuMu[1] = cascadeVertices[1]->y(); VertexXMuMu[2] = cascadeVertices[1]->z(); - - ATH_MSG_DEBUG(" Lb -> Lambda Casc., VertexX = " << VertexX[0] << " " << VertexX[1] << " " << VertexX[2] ); - ATH_MSG_DEBUG(" Lb -> Lambda Casc., VertexXMuMu = " << VertexXMuMu[0] << " " << VertexXMuMu[1] << " " << VertexXMuMu[2] ); - - float chi2XMuMu = result->fitChi2(); - fitVtx->setFitchi2(chi2XMuMu); - if( !(chi2XMuMu < m_lBVtxChi2Cut) ) { - ATH_MSG_DEBUG(" L_b -> Lambda candidate rejected by XMuMu vertex chi2 cut: chi2 = " << chi2XMuMu ); - delete fitVtx_X; - delete fitVtx; - delete result; - return nullptr; - } else { - ATH_MSG_DEBUG(" L_b -> Lambda candidate accepted by XMuMu vertex chi2 cut: chi2 = " << chi2XMuMu ); - m_countPassedLbVtxChi2++; - - const std::vector< std::vector<TLorentzVector> > &cascadeMomenta = result->getParticleMoms(); - - const std::vector<TLorentzVector> &lbTrkMom = cascadeMomenta[1]; - const std::vector<TLorentzVector> &laTrkMom = cascadeMomenta[0]; - - std::vector<TLorentzVector>::const_iterator momItr; - - TLorentzVector laMom, lbMom; - for(momItr=laTrkMom.begin(); momItr!=laTrkMom.end(); ++momItr) { laMom += *momItr; } - for(momItr=lbTrkMom.begin(); momItr!=lbTrkMom.end(); ++momItr) { lbMom += *momItr; } - - double pxLambda = laMom.Px(); - double pyLambda = laMom.Py(); - - double LxyLambda = LxyVal(pxLambda,pyLambda,VertexXMuMu,VertexX); - - if ( m_lowerLambda_LxyCut > -99. && LxyLambda < m_lowerLambda_LxyCut ) { - ATH_MSG_DEBUG(" L_b -> Lambda candidate rejected by Lxy cut: Lxy = " << LxyLambda ); - delete fitVtx_X; - delete fitVtx; - delete result; - return nullptr; - } else { - m_countPassedLbLambdaLxy++; - ATH_MSG_DEBUG(" L_b -> Lambda candidate accepted by Lxy cut: Lxy = " << LxyLambda ); - - double vtxMassX = laMom.M(); - double vtxMassXMuMu = lbMom.M(); - - if( !(vtxMassX < m_upperLambdaVtxMassCut) ) { - ATH_MSG_DEBUG(" Lambda candidate rejected by the vtx mass cut: m = " << vtxMassX ); - delete fitVtx_X; - delete fitVtx; - delete result; - return nullptr; - } - m_countPassedLambdaVtxMass++; - - if( !(vtxMassXMuMu > m_lowerLb_LambdaMuMuVtxMassCut && vtxMassXMuMu < m_upperLb_LambdaMuMuVtxMassCut) ) { - ATH_MSG_DEBUG(" L_b -> L candidate rejected by the vtx mass cut: m = " << vtxMassXMuMu ); - delete fitVtx_X; - delete fitVtx; - delete result; - return nullptr; - } - m_countPassedLbVtxMass++; - - double PtLambda = laMom.Perp(); - double PtLb = lbMom.Perp(); - - // trigPartX = new TrigEFBphys( 0, 0., 0., TrigEFBphys::DPKPIPI, massX); - - ATH_MSG_DEBUG(" Lb -> Lambda : vtxMassXMuMu = " << vtxMassXMuMu ); - - // m_mon_BcMuMuDplus_InvMass_Dplus.push_back(massX/1000.); - m_mon_LbMuMuLambda_VtxMass_Lambda.push_back(vtxMassX/1000.); - // m_mon_BcMuMuDplus_Chi2_Dplus.push_back(chi2X); - m_mon_LbMuMuLambda_Lxy_Lambda.push_back(LxyLambda); - m_mon_LbMuMuLambda_pT_Lambda.push_back(PtLambda/1000.); - m_mon_LbMuMuLambda_pT_Lb.push_back(PtLb/1000.); - // m_mon_BcMuMuDplus_InvMass_Bc.push_back(massXMuMu/1000.); - m_mon_LbMuMuLambda_VtxMass_Lb.push_back(vtxMassXMuMu/1000.); - m_mon_LbMuMuLambda_Chi2_Lb.push_back(chi2XMuMu); - - m_mon_LbMuMuLambda_FinMass_Lambda.push_back(massX/1000.); - m_mon_LbMuMuLambda_FinMass_Lb.push_back(massXMuMu/1000.); - - // manually attach the track links to fitVtx - for(const auto& tpel : vec_tracks) { - fitVtx->addTrackParticleLink(tpel); - } - - // result of cascate fit is not needed anymore - delete result; - - } // end XMuMu Lxy cut - } // end XMuMu chi2 cut - // } // end if(XMuMuVxCandidate) - } // result==NULL - - - } else { - - // Try to fit XMuMu -> mu mu X vertex - if ( timerSvc() ) m_VtxFitTimer->resume(); - if (!m_bphysHelperTool->vertexFit(fitVtx,vec_tracks,massHypo).isSuccess()) { - ATH_MSG_DEBUG(" Failed to fit XMuMu vertex for L_b -> Lambda" ); - if ( timerSvc() ) m_VtxFitTimer->pause(); - delete fitVtx_X; - delete fitVtx; - return nullptr; - } - if ( timerSvc() ) m_VtxFitTimer->pause(); - m_countPassedLbVtx++; - float chi2XMuMu = fitVtx->fitchi2(); - if( chi2XMuMu > m_lBVtxChi2Cut || chi2XMuMu < 0 ) { - ATH_MSG_DEBUG(" L_b -> Lambda candidate rejected by XMuMu vertex chi2 cut: chi2 = " << chi2XMuMu ); - delete fitVtx_X; - delete fitVtx; - return nullptr; - } - m_countPassedLbVtxChi2++; - - // m_mon_BcMuMuDplus_InvMass_Bc.push_back(massXMuMu/1000.); - // m_mon_BcMuMuDs_VtxMass_Bc.push_back(vtxMassXMuMu/1000.); - m_mon_LbMuMuLambda_Chi2_Lb.push_back(chi2XMuMu); - - } //m_doLb_LambdaMuMuCascade - } //m_doLb_LambdaMuMuVertexing - else { - // if vertexting is not done - just attach trackParticle links - for(const auto& tpel : vec_tracks) { - fitVtx->addTrackParticleLink(tpel); - } - } - - ATH_MSG_DEBUG(" Good L_b->Lambda found! doLambdaVtx: " << (m_doLambda_PPiVertexing ? "Yes" : "No") - << " doLbLambdaVtx: " << (m_doLb_LambdaMuMuVertexing ? "Yes" : "No") - << " m = " << fitVtx->mass() << ", " - << "chi2 = " << fitVtx->fitchi2() << ", vertex (" << fitVtx->fitx() << ", " - << fitVtx->fity() << ", " << fitVtx->fitz() << ")" ); - - trigPartX = fitVtx_X; - return fitVtx; -} //checkLbMuMuLambda - -xAOD::TrigBphys* TrigEFBMuMuXFex::checkBMuMu2X(const ElementLink<xAOD::TrackParticleContainer> & eltrack1, - const ElementLink<xAOD::TrackParticleContainer> & eltrack2, - const ElementLink<xAOD::TrackParticleContainer> & elmu1, - const ElementLink<xAOD::TrackParticleContainer> & elmu2, - int decay, xAOD::TrigBphys* & trigPartX) { - trigPartX = nullptr; - xAOD::TrigBphys * fitVtx_X(nullptr); - xAOD::TrigBphys * fitVtx(nullptr); - - std::vector<double> massHypoX; - std::vector<double> massHypo; - double lowerXMassCut, upperXMassCut; - double lowerXMuMuMassCut, upperXMuMuMassCut; - double chi2XCut; - double chi2XMuMuCut; - std::string decayName; - xAOD::TrigBphys::pType decayType(xAOD::TrigBphys::UNKNOWNPTYPE); - unsigned int *countPassedXMass; - unsigned int *countPassedXMuMuMass; - unsigned int *countPassedXVtx; - unsigned int *countPassedXVtxChi2; - unsigned int *countPassedXMuMuVtx; - unsigned int *countPassedXMuMuVtxChi2; - - bool do2XVertexing; - bool doBMuMu2XVertexing; - - std::vector<float> *pMon_BMuMu2X_Pt_X1; - std::vector<float> *pMon_BMuMu2X_Eta_X1; - std::vector<float> *pMon_BMuMu2X_Phi_X1; - std::vector<float> *pMon_BMuMu2X_Pt_X2; - std::vector<float> *pMon_BMuMu2X_Eta_X2; - std::vector<float> *pMon_BMuMu2X_Phi_X2; - std::vector<float> *pMon_BMuMu2X_InvMass_2X; - std::vector<float> *pMon_BMuMu2X_VtxMass_2X; - std::vector<float> *pMon_BMuMu2X_Chi2_2X; - std::vector<float> *pMon_BMuMu2X_InvMass_B; - std::vector<float> *pMon_BMuMu2X_VtxMass_B; - std::vector<float> *pMon_BMuMu2X_Chi2_B; - - // Fix silly warning messages - // (void)pMon_BMuMu2X_VtxMass_2X; - // (void)pMon_BMuMu2X_VtxMass_B; - - if(decay == bD_to_Kstar) { - massHypoX = {KPLUSMASS,PIMASS}; - massHypo = {KPLUSMASS,PIMASS,MUMASS,MUMASS}; - lowerXMassCut = m_lowerKstar_KaonMassCut; - upperXMassCut = m_upperKstar_KaonMassCut; - chi2XCut = m_kStarVtxChi2Cut; - lowerXMuMuMassCut = m_lowerBd_KstarMuMuMassCut; - upperXMuMuMassCut = m_upperBd_KstarMuMuMassCut; - chi2XMuMuCut = m_bDVtxChi2Cut; - decayName = "Bd -> mu mu K*"; - decayType = xAOD::TrigBphys::BDKSTMUMU; - countPassedXMass = &m_countPassedKstarMass; - countPassedXMuMuMass = &m_countPassedBdMass; - countPassedXVtx = &m_countPassedKstarVtx; - countPassedXVtxChi2 = &m_countPassedKstarVtxChi2; - countPassedXMuMuVtx = &m_countPassedBdVtx; - countPassedXMuMuVtxChi2 = &m_countPassedBdVtxChi2; - do2XVertexing = m_doKstar_KPiVertexing; - doBMuMu2XVertexing = m_doBd_KstarMuMuVertexing; - pMon_BMuMu2X_Pt_X1 = &m_mon_BdMuMuKs_Pt_K; - pMon_BMuMu2X_Eta_X1 = &m_mon_BdMuMuKs_Eta_K; - pMon_BMuMu2X_Phi_X1 = &m_mon_BdMuMuKs_Phi_K; - pMon_BMuMu2X_Pt_X2 = &m_mon_BdMuMuKs_Pt_Pi; - pMon_BMuMu2X_Eta_X2 = &m_mon_BdMuMuKs_Eta_Pi; - pMon_BMuMu2X_Phi_X2 = &m_mon_BdMuMuKs_Phi_Pi; - pMon_BMuMu2X_InvMass_2X = &m_mon_BdMuMuKs_InvMass_Kstar; - pMon_BMuMu2X_VtxMass_2X = &m_mon_BdMuMuKs_VtxMass_Kstar; - pMon_BMuMu2X_Chi2_2X = &m_mon_BdMuMuKs_Chi2_Kstar; - pMon_BMuMu2X_InvMass_B = &m_mon_BdMuMuKs_InvMass_Bd; - pMon_BMuMu2X_VtxMass_B = &m_mon_BdMuMuKs_VtxMass_Bd; - pMon_BMuMu2X_Chi2_B = &m_mon_BdMuMuKs_Chi2_Bd; - } else if(decay == bS_to_Phi) { - massHypoX = {KPLUSMASS,KPLUSMASS}; - massHypo = {KPLUSMASS,KPLUSMASS,MUMASS,MUMASS}; - lowerXMassCut = m_lowerPhi1020_KaonMassCut; - upperXMassCut = m_upperPhi1020_KaonMassCut; - chi2XCut = m_phi1020VtxChi2Cut; - lowerXMuMuMassCut = m_lowerBs_Phi1020MuMuMassCut; - upperXMuMuMassCut = m_upperBs_Phi1020MuMuMassCut; - chi2XMuMuCut = m_bSVtxChi2Cut; - decayName = "Bs -> mu mu phi"; - decayType = xAOD::TrigBphys::BSPHIMUMU; - countPassedXMass = &m_countPassedPhi1020Mass; - countPassedXMuMuMass = &m_countPassedBsMass; - countPassedXVtx = &m_countPassedPhi1020Vtx; - countPassedXVtxChi2 = &m_countPassedPhi1020VtxChi2; - countPassedXMuMuVtx = &m_countPassedBsVtx; - countPassedXMuMuVtxChi2 = &m_countPassedBsVtxChi2; - do2XVertexing = m_doPhi1020_KKVertexing; - doBMuMu2XVertexing = m_doBs_Phi1020MuMuVertexing; - pMon_BMuMu2X_Pt_X1 = &m_mon_BsMuMuPhi_Pt_K1; - pMon_BMuMu2X_Eta_X1 = &m_mon_BsMuMuPhi_Eta_K1; - pMon_BMuMu2X_Phi_X1 = &m_mon_BsMuMuPhi_Phi_K1; - pMon_BMuMu2X_Pt_X2 = &m_mon_BsMuMuPhi_Pt_K2; - pMon_BMuMu2X_Eta_X2 = &m_mon_BsMuMuPhi_Eta_K2; - pMon_BMuMu2X_Phi_X2 = &m_mon_BsMuMuPhi_Phi_K2; - pMon_BMuMu2X_InvMass_2X = &m_mon_BsMuMuPhi_InvMass_Phi1020; - pMon_BMuMu2X_VtxMass_2X = &m_mon_BsMuMuPhi_VtxMass_Phi1020; - pMon_BMuMu2X_Chi2_2X = &m_mon_BsMuMuPhi_Chi2_Phi1020; - pMon_BMuMu2X_InvMass_B = &m_mon_BsMuMuPhi_InvMass_Bs; - pMon_BMuMu2X_VtxMass_B = &m_mon_BsMuMuPhi_VtxMass_Bs; - pMon_BMuMu2X_Chi2_B = &m_mon_BsMuMuPhi_Chi2_Bs; - } else if(decay == lB_to_L) { - massHypoX = {PROTONMASS,PIMASS}; - massHypo = {PROTONMASS,PIMASS,MUMASS,MUMASS}; - lowerXMassCut = m_lowerLambda_PrPiMassCut; - upperXMassCut = m_upperLambda_PrPiMassCut; - chi2XCut = m_lambdaVtxChi2Cut; - lowerXMuMuMassCut = m_lowerLb_LambdaMuMuMassCut; - upperXMuMuMassCut = m_upperLb_LambdaMuMuMassCut; - chi2XMuMuCut = m_lBVtxChi2Cut; - decayName = "Lambda_b -> mu mu Lambda"; - decayType = xAOD::TrigBphys::LBLMUMU; - countPassedXMass = &m_countPassedLambdaMass; - countPassedXMuMuMass = &m_countPassedLbMass; - countPassedXVtx = &m_countPassedLambdaVtx; - countPassedXVtxChi2 = &m_countPassedLambdaVtxChi2; - countPassedXMuMuVtx = &m_countPassedLbVtx; - countPassedXMuMuVtxChi2 = &m_countPassedLbVtxChi2; - do2XVertexing = m_doLambda_PPiVertexing; - doBMuMu2XVertexing = m_doLb_LambdaMuMuVertexing; - pMon_BMuMu2X_Pt_X1 = &m_mon_LbMuMuLambda_Pt_P; - pMon_BMuMu2X_Eta_X1 = &m_mon_LbMuMuLambda_Eta_P; - pMon_BMuMu2X_Phi_X1 = &m_mon_LbMuMuLambda_Phi_P; - pMon_BMuMu2X_Pt_X2 = &m_mon_LbMuMuLambda_Pt_Pi; - pMon_BMuMu2X_Eta_X2 = &m_mon_LbMuMuLambda_Eta_Pi; - pMon_BMuMu2X_Phi_X2 = &m_mon_LbMuMuLambda_Phi_Pi; - pMon_BMuMu2X_InvMass_2X = &m_mon_LbMuMuLambda_InvMass_Lambda; - pMon_BMuMu2X_VtxMass_2X = &m_mon_LbMuMuLambda_VtxMass_Lambda; - pMon_BMuMu2X_Chi2_2X = &m_mon_LbMuMuLambda_Chi2_Lambda; - pMon_BMuMu2X_InvMass_B = &m_mon_LbMuMuLambda_InvMass_Lb; - pMon_BMuMu2X_VtxMass_B = &m_mon_LbMuMuLambda_VtxMass_Lb; - pMon_BMuMu2X_Chi2_B = &m_mon_LbMuMuLambda_Chi2_Lb; - } else { - ATH_MSG_DEBUG("Wrong decay identifier passed to checkBMuMu2X: decay = " << decay ); - m_mon_Errors.push_back(ERROR_WrongDecayID); - return nullptr; - } - - ATH_MSG_DEBUG("Try to build " << decayName << " with tracks " << *eltrack1 << ", " << *eltrack2 ); - - float massX = XMass(*eltrack1, *eltrack2, decay); - if( !(massX > lowerXMassCut && massX < upperXMassCut) ) { - ATH_MSG_DEBUG(" " << decayName << " candidate rejected by X mass cut: m = " << massX ); - trigPartX = nullptr; - return nullptr; - } - - ++(*countPassedXMass); - - float massXMuMu = XMuMuMass(*elmu1, *elmu2, *eltrack1, *eltrack2, decay); - if( !(massXMuMu > lowerXMuMuMassCut && massXMuMu < upperXMuMuMassCut) ) { - ATH_MSG_DEBUG(" " << decayName << " candidate rejected by XMuMu mass cut: m = " << massXMuMu ); - trigPartX = nullptr; - return nullptr; - } - - ++(*countPassedXMuMuMass); - - // create initial object - fitVtx_X = new xAOD::TrigBphys; - fitVtx_X->makePrivateStore(); - fitVtx_X->initialise(0,0.,0.,0., - decayType, massX, xAOD::TrigBphys::EF); - fitVtx = new xAOD::TrigBphys; - fitVtx->makePrivateStore(); - fitVtx->initialise(0,0.,0.,0., - decayType, massXMuMu, xAOD::TrigBphys::EF); - - - std::vector<ElementLink<xAOD::TrackParticleContainer> > vec_tracksX = {eltrack1,eltrack2}; - std::vector<ElementLink<xAOD::TrackParticleContainer> > vec_tracks = {eltrack1,eltrack2,elmu1,elmu2}; - - - pMon_BMuMu2X_Pt_X1->push_back ((*eltrack1)->pt()*0.001); - pMon_BMuMu2X_Eta_X1->push_back((*eltrack1)->eta()); - pMon_BMuMu2X_Phi_X1->push_back((*eltrack1)->phi()); - pMon_BMuMu2X_Pt_X2->push_back ((*eltrack2)->pt()*0.001); - pMon_BMuMu2X_Eta_X2->push_back((*eltrack2)->eta()); - pMon_BMuMu2X_Phi_X2->push_back((*eltrack2)->phi()); - pMon_BMuMu2X_InvMass_2X->push_back(massX*0.001); - pMon_BMuMu2X_InvMass_B->push_back(massXMuMu/1000.); - - - - if(do2XVertexing) { - if ( timerSvc() ) m_VtxFitTimer->resume(); - if (!m_bphysHelperTool->vertexFit(fitVtx_X,vec_tracksX,massHypoX).isSuccess()) { - ATH_MSG_DEBUG(" Vertex fitting of X failed." << decayName ); - } - if ( timerSvc() ) m_VtxFitTimer->pause(); - - ++(*countPassedXVtx); - double chi2X(fitVtx_X->fitchi2()); - if( chi2X > chi2XCut || chi2X < 0 ) { - ATH_MSG_DEBUG(" " << decayName << " candidate rejected by X vertex chi2 cut: chi2 = " << chi2X ); - delete fitVtx_X; - delete fitVtx; - return nullptr; - } - (*countPassedXVtxChi2)++; - pMon_BMuMu2X_VtxMass_2X->push_back(fitVtx_X->fitmass()*0.001); - pMon_BMuMu2X_Chi2_2X->push_back(chi2X); - } // do2XVertexing - else { - // if vertexting is not done - just attach trackParticle links - for(const auto& tpel : vec_tracksX) { - fitVtx_X->addTrackParticleLink(tpel); - } - } - - if(doBMuMu2XVertexing) { - if ( timerSvc() ) m_VtxFitTimer->resume(); - if (!m_bphysHelperTool->vertexFit(fitVtx,vec_tracks,massHypo).isSuccess()) { - ATH_MSG_DEBUG(" Vertex fitting of MuMuX failed for " << decayName ); - } - if ( timerSvc() ) m_VtxFitTimer->pause(); - (*countPassedXMuMuVtx)++; - double chi2MuMuX(fitVtx->fitchi2()); - if( chi2MuMuX > chi2XMuMuCut || chi2MuMuX < 0 ) { - ATH_MSG_DEBUG(" " << decayName << " candidate rejected by XMuMu vertex chi2 cut: chi2 = " << chi2MuMuX ); - delete fitVtx_X; - delete fitVtx; - return nullptr; - } - (*countPassedXMuMuVtxChi2)++; - pMon_BMuMu2X_VtxMass_B->push_back(fitVtx->fitmass()*0.001); - pMon_BMuMu2X_Chi2_B->push_back(chi2MuMuX); - - } // doBMuMu2XVertexing - else { - // if vertexting is not done - just attach trackParticle links - for(const auto& tpel : vec_tracks) { - fitVtx->addTrackParticleLink(tpel); - } - } - - trigPartX = fitVtx_X; - return fitVtx; - -} // checkBMuMu2X - - - -/*----------------------------------------------------------------------------*/ -void TrigEFBMuMuXFex::addUnique(std::vector<const xAOD::TrackParticle*>& tps, const xAOD::TrackParticle* tpIn) -{ - // std::cout<<" in addUnique : tpIn pT= "<<tpIn->pt()<<std::endl; - std::vector<const xAOD::TrackParticle*>::iterator tpItr; - for( tpItr = tps.begin(); tpItr != tps.end(); tpItr++) - { - double dPhi=fabs((*tpItr)->phi() - - tpIn->phi()); - if (dPhi > M_PI) dPhi = 2.*M_PI - dPhi; - - if( fabs(dPhi) < 0.02 && - fabs((*tpItr)->eta() - - tpIn->eta()) < 0.02 && - tpIn->charge() * (*tpItr)->charge() > 0) - { //std::cout<<" TrigEFBMuMuFex addUnique: the SAME tps! pT= "<< - //tpIn->pt()<<" and "<< - //(*tpItr)->pt()<<std::endl; - return; - } - } - tps.push_back(tpIn); -} - -void TrigEFBMuMuXFex::addUnique(std::vector<ElementLink<xAOD::TrackParticleContainer> >& tps, const ElementLink<xAOD::TrackParticleContainer>&tpIn) { - if (!tpIn.isValid()) { - return; - } - for (auto itr = tps.begin(); itr != tps.end(); ++itr) { - auto tpel = *itr; - double dPhi = fabs( (*tpel)->phi() - (*tpIn)->phi() ); - if (dPhi > M_PI) dPhi = 2.*M_PI - dPhi; - - if( fabs(dPhi) < 0.02 && - fabs((*tpel)->eta() - - (*tpIn)->eta()) < 0.02 && - (*tpIn)->charge() * (*tpel)->charge() > 0) { - // same parameters - return; - } - } // for - - // if here then its unique - tps.push_back(tpIn); -} // addUnique - - -/*----------------------------------------------------------------------------*/ -bool TrigEFBMuMuXFex::isUnique(const xAOD::TrackParticle* id1, const xAOD::TrackParticle* id2) const { - if (!id1 || !id2) return false; - float dEta = fabs( id1->eta() - id2->eta() ); - float dPhi = id1->phi() - id2->phi(); - while (dPhi > M_PI) dPhi -= 2*M_PI; - while (dPhi < -M_PI) dPhi += 2*M_PI; - - if( dEta < 0.02 && fabs(dPhi) < 0.02 && id1->charge() * id2->charge() > 0 ) return false; - else return true; - -} - - - - - - -double TrigEFBMuMuXFex::XMass(const xAOD::TrackParticle* particle1, const xAOD::TrackParticle* particle2, int decay) { /// checking the mass - - std::array<double, 2> massHypo; - if(decay == di_to_muons){ - massHypo[0] = (MUMASS); - massHypo[1] = (MUMASS); - } - else if(decay == bD_to_Kstar){ - massHypo[0] = (KPLUSMASS); - massHypo[1] = (PIMASS); - } - else if(decay == bS_to_Phi){ - massHypo[0] = (KPLUSMASS); - massHypo[1] = (KPLUSMASS); - } - else if(decay == bC_to_PiPi){ - massHypo[0] = (PIMASS); - massHypo[1] = (PIMASS); - } - else if(decay == lB_to_L){ - massHypo[0] = (PROTONMASS); - massHypo[1] = (PIMASS); - }else{ - throw std::runtime_error("unknown decay TrigEFBMuMuXFex::XMass"); - } - std::array<const xAOD::TrackParticle*, 2> bTracks{particle1, particle2}; - return m_bphysHelperTool->invariantMass(bTracks, massHypo); - -} - -double TrigEFBMuMuXFex::X3Mass(const xAOD::TrackParticle* particle1, const xAOD::TrackParticle* particle2, const xAOD::TrackParticle* particle3 ) { - static constexpr std::array<double, 3> massHypo{KPLUSMASS, KPLUSMASS, PIMASS}; - const std::array<const xAOD::TrackParticle*, 3> bTracks{ particle1, particle2, particle3}; - return m_bphysHelperTool->invariantMass(bTracks, massHypo); - -} - -double TrigEFBMuMuXFex::XKPiPiMass(const xAOD::TrackParticle* particle1, const xAOD::TrackParticle* particle2, const xAOD::TrackParticle* particle3 ) { - - static constexpr std::array<double, 3> massHypo{KPLUSMASS, PIMASS, PIMASS}; - const std::array<const xAOD::TrackParticle*, 3> bTracks{particle1,particle2,particle3}; - return m_bphysHelperTool->invariantMass(bTracks, massHypo); - -} - -double TrigEFBMuMuXFex::KMuMuMass( const xAOD::TrackParticle* mu1, const xAOD::TrackParticle* mu2, const xAOD::TrackParticle* kaon) { - static constexpr std::array<double, 3> massHypo{MUMASS, MUMASS, KPLUSMASS}; //K - const std::array<const xAOD::TrackParticle*, 3> bTracks{mu1, mu2, kaon}; - return m_bphysHelperTool->invariantMass(bTracks, massHypo); -} - -double TrigEFBMuMuXFex::XMuMuMass(const xAOD::TrackParticle* mu1, const xAOD::TrackParticle* mu2, const xAOD::TrackParticle* particle1, - const xAOD::TrackParticle* particle2, int decay){ - std::array<double, 4> massHypo; - massHypo[0] = MUMASS; - massHypo[1] = MUMASS; - if(decay == bD_to_Kstar){ - massHypo[2] = KPLUSMASS; - massHypo[3] = PIMASS; - } - else if(decay == bS_to_Phi){ - massHypo[2] = KPLUSMASS; - massHypo[3] = KPLUSMASS; - } - else if(decay == bC_to_PiPi){ - massHypo[2] = PIMASS; - massHypo[3] = PIMASS; - } - else if(decay == lB_to_L){ - massHypo[2] = PROTONMASS; - massHypo[3] = PIMASS; - }else{ - throw std::runtime_error("unknown decay TrigEFBMuMuXFex::XMuMuMass"); - } - const std::array<const xAOD::TrackParticle*, 4> bTracks{mu1,mu2,particle1,particle2}; - return m_bphysHelperTool->invariantMass(bTracks, massHypo); -} - -double TrigEFBMuMuXFex::X3MuMuMass(const xAOD::TrackParticle* mu1, const xAOD::TrackParticle* mu2, const xAOD::TrackParticle* particle1, - const xAOD::TrackParticle* particle2, const xAOD::TrackParticle* particle3 ) { - static constexpr std::array<double, 5> massHypo{MUMASS, MUMASS, KPLUSMASS, KPLUSMASS, PIMASS}; - const std::array<const xAOD::TrackParticle*, 5> bTracks{mu1,mu2,particle1,particle2,particle3}; - return m_bphysHelperTool->invariantMass(bTracks, massHypo); - -} - -double TrigEFBMuMuXFex::XKPiPiMuMuMass(const xAOD::TrackParticle* mu1, const xAOD::TrackParticle* mu2, const xAOD::TrackParticle* particle1, - const xAOD::TrackParticle* particle2, const xAOD::TrackParticle* particle3 ) { - static constexpr std::array<double, 5> massHypo{MUMASS, MUMASS, KPLUSMASS, PIMASS, PIMASS}; - const std::array<const xAOD::TrackParticle*, 5> bTracks{mu1,mu2,particle1,particle2,particle3}; - return m_bphysHelperTool->invariantMass(bTracks, massHypo); - -} diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBMuMuXFex.h b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBMuMuXFex.h deleted file mode 100644 index 13a7e317b6aa86ae94484da287d92558a13a8e7c..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBMuMuXFex.h +++ /dev/null @@ -1,608 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// vim: tabstop=2:shiftwidth=2:expandtab -/************************************************************************** -** -** File: Trigger/TrigHypothesis/TrigBphysHypo/TrigEFBMuMuXFex.h -** -** Description: EF hypothesis algorithms for -** B^0_{d,s},\Lambda_b \to X \mu^+ \mu^- -** -** -** Author: J.Kirk -** Author: Semen Turchikhin <Semen.Turchikhin@cern.ch> -** -** Created: 12.09.2007 -** Modified: 08.04.2012 -** Modified: 26.09.2012 : "B_c -> D_s(*) (->Phi(->K+K-)) mu+mu-" added (Leonid Gladilin <gladilin@mail.cern.ch>) -** 17.11.2015 : "B_c -> D_s(*) (->Phi(->K+K-)) mu+mu-" updated (Leonid Gladilin <gladilin@mail.cern.ch>) -** 18.11.2015 : "B_c -> Dplus (->K pi pi) mu+mu-" added (Leonid Gladilin <gladilin@mail.cern.ch>) -** -***************************************************************************/ - -#ifndef TRIG_TrigEFBMuMuXFex_H -#define TRIG_TrigEFBMuMuXFex_H - -// standard stuff -#include <string> -// trigger includes -#include "TrigInterfaces/ComboAlgo.h" -#include "TrigSteeringEvent/TrigRoiDescriptor.h" -#include "TrkVKalVrtFitter/TrkVKalVrtFitter.h" - -#include "Constants.h" -#include "BtrigUtils.h" -#include "TrigBphysHelperUtilsTool.h" - -#include "xAODEventInfo/EventInfo.h" -#include "xAODTracking/TrackParticle.h" -#include "xAODMuon/Muon.h" -#include "xAODMuon/MuonContainer.h" -#include "xAODTrigBphys/TrigBphys.h" -#include "xAODTrigBphys/TrigBphysContainer.h" -#include "xAODTrigBphys/TrigBphysAuxContainer.h" - -class TriggerElement; -class CombinedMuonFeature; - -class TrigBphysHelperUtilsTool; - -class TrigEFBMuMuXFex: public HLT::ComboAlgo { - - public: - TrigEFBMuMuXFex(const std::string & name, ISvcLocator* pSvcLocator); - ~TrigEFBMuMuXFex(); - HLT::ErrorCode hltInitialize(); - HLT::ErrorCode hltFinalize(); - HLT::ErrorCode acceptInputs(HLT::TEConstVec& inputTE, bool& pass ); - HLT::ErrorCode hltExecute(HLT::TEConstVec& inputTE, HLT::TriggerElement* outputTE); - - private: - - ToolHandle < Trk::IVertexFitter > m_fitterSvc; - - ToolHandle <TrigBphysHelperUtilsTool> m_bphysHelperTool; - - // container inputs names - std::string m_bphysCollectionKey; - std::string m_input_trackCollectionKey; - - // Cuts and properties - bool m_oppositeCharge; - float m_lowerMuMuMassCut; - float m_upperMuMuMassCut; -// float m_lowerMuVtxMassCut; -// float m_upperMuVtxMassCut; - float m_muVtxChi2Cut; - - // Maximum number of track combinations to try -- protection against TimeOuts - int m_maxNcombinations; - - bool m_doB_KMuMuDecay; - float m_lowerKMuMuMassCut; - float m_upperKMuMuMassCut; -// float m_lowerBVtxMassCut; -// float m_upperBVtxMassCut; - bool m_doB_KMuMuVertexing; - float m_bVtxChi2Cut; - int m_maxBpToStore; - - bool m_doBd_KstarMuMuDecay; - float m_lowerKstar_KaonMassCut; - float m_upperKstar_KaonMassCut; - float m_lowerBd_KstarMuMuMassCut; - float m_upperBd_KstarMuMuMassCut; -// float m_lowerKstarVtxMassCut; -// float m_upperKstarVtxMassCut; -// float m_lowerBdVtxMassCut; -// float m_upperBdVtxMassCut; - bool m_doKstar_KPiVertexing; - bool m_doBd_KstarMuMuVertexing; - float m_kStarVtxChi2Cut; - float m_bDVtxChi2Cut; - int m_maxBdToStore; - - bool m_doBs_Phi1020MuMuDecay; - float m_lowerPhi1020_KaonMassCut; - float m_upperPhi1020_KaonMassCut; - float m_lowerBs_Phi1020MuMuMassCut; - float m_upperBs_Phi1020MuMuMassCut; -// float m_lowerPhi1020VtxMassCut; -// float m_upperPhi1020VtxMassCut; -// float m_lowerBsVtxMassCut; -// float m_upperBsVtxMassCut; - bool m_doPhi1020_KKVertexing; - bool m_doBs_Phi1020MuMuVertexing; - float m_phi1020VtxChi2Cut; - float m_bSVtxChi2Cut; - int m_maxBsToStore; - - bool m_doLb_LambdaMuMuDecay; - float m_lowerLambda_PrPiMassCut; - float m_upperLambda_PrPiMassCut; - float m_lowerLambda_PtCut; - float m_lowerLb_LambdaMuMuMassCut; - float m_upperLb_LambdaMuMuMassCut; - float m_lowerLb_PtCut; -// float m_lowerLambdaVtxMassCut; - float m_lowerLambda_LxyCut; - float m_upperLambdaVtxMassCut; - float m_lowerLb_LambdaMuMuVtxMassCut; - float m_upperLb_LambdaMuMuVtxMassCut; - bool m_doLambda_PPiVertexing; - bool m_doLb_LambdaMuMuVertexing; - bool m_doLb_LambdaMuMuCascade; - float m_lambdaVtxChi2Cut; - float m_lBVtxChi2Cut; - int m_maxLbToStore; - - bool m_doBc_DsMuMuDecay; - float m_lowerPhiDs_MassCut; - float m_upperPhiDs_MassCut; - float m_lowerDs_MassCut; - float m_upperDs_MassCut; - float m_lowerDs_PtCut; - float m_lowerBc_DsMuMuMassCut; - float m_upperBc_DsMuMuMassCut; - float m_lowerBcDs_PtCut; - float m_lowerDs_LxyCut; - bool m_doDs_Vertexing; - bool m_doBc_DsMuMuVertexing; - bool m_doBc_DsMuMuCascade; - float m_DsVtxChi2Cut; - float m_bCVtxChi2Cut; - int m_maxBcToStore; - - bool m_doBc_DplusMuMuDecay; - float m_lowerDplus_MassCut; - float m_upperDplus_MassCut; - float m_lowerDplus_PtCut; - float m_lowerDplus_LxyCut; - float m_lowerBc_DplusMuMuMassCut; - float m_upperBc_DplusMuMuMassCut; - float m_lowerBcDplus_PtCut; - bool m_doDplus_Vertexing; - bool m_doBc_DplusMuMuVertexing; - bool m_doBc_DplusMuMuCascade; - float m_DplusVtxChi2Cut; - float m_bCDplusVtxChi2Cut; - int m_maxBcDplusToStore; - - bool m_doBc_DstarMuMuDecay; - float m_lowerD0Dstar_MassCut; - float m_upperD0Dstar_MassCut; - float m_upperDstar_DMCut; - float m_lowerDstar_PtCut; - float m_lowerDstarKpi_PtCut; - float m_lowerD0Dstar_LxyCut; - float m_lowerBc_DstarMuMuMassCut; - float m_upperBc_DstarMuMuMassCut; - float m_lowerBcDstar_PtCut; - bool m_doD0Dstar_Vertexing; - bool m_doBc_DstarMuMuVertexing; - bool m_doBc_DstarMuMuCascade; - float m_D0DstarVtxChi2Cut; - float m_bCDstarVtxChi2Cut; - int m_maxBcDstarToStore; - - bool m_doBc_D0MuMuDecay; - float m_lowerD0_MassCut; - float m_upperD0_MassCut; - float m_lowerD0_PtCut; - float m_lowerD0_LxyCut; - float m_lowerBc_D0MuMuMassCut; - float m_upperBc_D0MuMuMassCut; - float m_lowerBcD0_PtCut; - bool m_doD0_Vertexing; - bool m_doBc_D0MuMuVertexing; - bool m_doBc_D0MuMuCascade; - float m_D0VtxChi2Cut; - float m_bCD0VtxChi2Cut; - int m_maxBcD0ToStore; - - // Monitoring variables and containers - // General - std::vector<int> m_mon_Errors; - std::vector<int> m_mon_Acceptance; - int m_mon_nTriedCombinations; - // Timing - float m_mon_TotalRunTime; - float m_mon_VertexingTime; - // RoIs - std::vector<float> m_mon_RoI_RoI1Eta; - std::vector<float> m_mon_RoI_RoI2Eta; - std::vector<float> m_mon_RoI_RoI1Phi; - std::vector<float> m_mon_RoI_RoI2Phi; - std::vector<float> m_mon_RoI_dEtaRoI; - std::vector<float> m_mon_RoI_dPhiRoI; - // DiMuon - int m_mon_DiMu_n; - std::vector<float> m_mon_DiMu_Pt_Mu1; - std::vector<float> m_mon_DiMu_Pt_Mu2; - std::vector<float> m_mon_DiMu_Eta_Mu1; - std::vector<float> m_mon_DiMu_Eta_Mu2; - std::vector<float> m_mon_DiMu_Phi_Mu1; - std::vector<float> m_mon_DiMu_Phi_Mu2; - std::vector<float> m_mon_DiMu_dEtaMuMu; - std::vector<float> m_mon_DiMu_dPhiMuMu; - std::vector<float> m_mon_DiMu_pTsumMuMu; - std::vector<float> m_mon_DiMu_InvMassMuMu; - std::vector<float> m_mon_DiMu_VtxMassMuMu; - std::vector<float> m_mon_DiMu_Chi2MuMu; - // Tracks - int m_mon_Tracks_n; - std::vector<float> m_mon_Tracks_Eta; - std::vector<float> m_mon_Tracks_Pt; - std::vector<float> m_mon_Tracks_Phi; - // B+ - int m_mon_BMuMuK_n; - std::vector<float> m_mon_BMuMuK_Pt_K; - std::vector<float> m_mon_BMuMuK_Eta_K; - std::vector<float> m_mon_BMuMuK_Phi_K; - std::vector<float> m_mon_BMuMuK_InvMass_B; - std::vector<float> m_mon_BMuMuK_VtxMass_B; - std::vector<float> m_mon_BMuMuK_Chi2_B; - // Bd - int m_mon_BdMuMuKs_n; - std::vector<float> m_mon_BdMuMuKs_Pt_K; - std::vector<float> m_mon_BdMuMuKs_Eta_K; - std::vector<float> m_mon_BdMuMuKs_Phi_K; - std::vector<float> m_mon_BdMuMuKs_Pt_Pi; - std::vector<float> m_mon_BdMuMuKs_Eta_Pi; - std::vector<float> m_mon_BdMuMuKs_Phi_Pi; - std::vector<float> m_mon_BdMuMuKs_InvMass_Kstar; - std::vector<float> m_mon_BdMuMuKs_VtxMass_Kstar; - std::vector<float> m_mon_BdMuMuKs_Chi2_Kstar; - std::vector<float> m_mon_BdMuMuKs_InvMass_Bd; - std::vector<float> m_mon_BdMuMuKs_VtxMass_Bd; - std::vector<float> m_mon_BdMuMuKs_Chi2_Bd; - // Bs - int m_mon_BsMuMuPhi_n; - std::vector<float> m_mon_BsMuMuPhi_Pt_K1; - std::vector<float> m_mon_BsMuMuPhi_Eta_K1; - std::vector<float> m_mon_BsMuMuPhi_Phi_K1; - std::vector<float> m_mon_BsMuMuPhi_Pt_K2; - std::vector<float> m_mon_BsMuMuPhi_Eta_K2; - std::vector<float> m_mon_BsMuMuPhi_Phi_K2; - std::vector<float> m_mon_BsMuMuPhi_InvMass_Phi1020; - std::vector<float> m_mon_BsMuMuPhi_VtxMass_Phi1020; - std::vector<float> m_mon_BsMuMuPhi_Chi2_Phi1020; - std::vector<float> m_mon_BsMuMuPhi_InvMass_Bs; - std::vector<float> m_mon_BsMuMuPhi_VtxMass_Bs; - std::vector<float> m_mon_BsMuMuPhi_Chi2_Bs; - // Lambda_b - int m_mon_LbMuMuLambda_n; - std::vector<float> m_mon_LbMuMuLambda_Pt_P; - std::vector<float> m_mon_LbMuMuLambda_Eta_P; - std::vector<float> m_mon_LbMuMuLambda_Phi_P; - std::vector<float> m_mon_LbMuMuLambda_Pt_Pi; - std::vector<float> m_mon_LbMuMuLambda_Eta_Pi; - std::vector<float> m_mon_LbMuMuLambda_Phi_Pi; - std::vector<float> m_mon_LbMuMuLambda_InvMass_Lambda; - std::vector<float> m_mon_LbMuMuLambda_VtxMass_Lambda; - std::vector<float> m_mon_LbMuMuLambda_FinMass_Lambda; - std::vector<float> m_mon_LbMuMuLambda_Chi2_Lambda; - std::vector<float> m_mon_LbMuMuLambda_Lxy_Lambda; - std::vector<float> m_mon_LbMuMuLambda_pT_Lambda; - std::vector<float> m_mon_LbMuMuLambda_pT_Lb; - std::vector<float> m_mon_LbMuMuLambda_InvMass_Lb; - std::vector<float> m_mon_LbMuMuLambda_VtxMass_Lb; - std::vector<float> m_mon_LbMuMuLambda_FinMass_Lb; - std::vector<float> m_mon_LbMuMuLambda_Chi2_Lb; - // Bc - int m_mon_BcMuMuDs_n; - std::vector<float> m_mon_BcMuMuDs_Pt_K1; - std::vector<float> m_mon_BcMuMuDs_Eta_K1; - std::vector<float> m_mon_BcMuMuDs_Phi_K1; - std::vector<float> m_mon_BcMuMuDs_Pt_K2; - std::vector<float> m_mon_BcMuMuDs_Eta_K2; - std::vector<float> m_mon_BcMuMuDs_Phi_K2; - std::vector<float> m_mon_BcMuMuDs_Pt_pi; - std::vector<float> m_mon_BcMuMuDs_Eta_pi; - std::vector<float> m_mon_BcMuMuDs_Phi_pi; - std::vector<float> m_mon_BcMuMuDs_InvMass_PhiDs; - std::vector<float> m_mon_BcMuMuDs_InvMass_Ds; - std::vector<float> m_mon_BcMuMuDs_VtxMass_Ds; - std::vector<float> m_mon_BcMuMuDs_Chi2_Ds; - std::vector<float> m_mon_BcMuMuDs_Lxy_Ds; - std::vector<float> m_mon_BcMuMuDs_pT_Ds; - std::vector<float> m_mon_BcMuMuDs_pT_Bc; - std::vector<float> m_mon_BcMuMuDs_InvMass_Bc; - std::vector<float> m_mon_BcMuMuDs_VtxMass_Bc; - std::vector<float> m_mon_BcMuMuDs_Chi2_Bc; - // Bc -> D+ - int m_mon_BcMuMuDplus_n; - std::vector<float> m_mon_BcMuMuDplus_Pt_K; - std::vector<float> m_mon_BcMuMuDplus_Eta_K; - std::vector<float> m_mon_BcMuMuDplus_Phi_K; - std::vector<float> m_mon_BcMuMuDplus_Pt_pi1; - std::vector<float> m_mon_BcMuMuDplus_Eta_pi1; - std::vector<float> m_mon_BcMuMuDplus_Phi_pi1; - std::vector<float> m_mon_BcMuMuDplus_Pt_pi2; - std::vector<float> m_mon_BcMuMuDplus_Eta_pi2; - std::vector<float> m_mon_BcMuMuDplus_Phi_pi2; - std::vector<float> m_mon_BcMuMuDplus_InvMass_Dplus; - std::vector<float> m_mon_BcMuMuDplus_VtxMass_Dplus; - std::vector<float> m_mon_BcMuMuDplus_Chi2_Dplus; - std::vector<float> m_mon_BcMuMuDplus_Lxy_Dplus; - std::vector<float> m_mon_BcMuMuDplus_pT_Dplus; - std::vector<float> m_mon_BcMuMuDplus_pT_Bc; - std::vector<float> m_mon_BcMuMuDplus_InvMass_Bc; - std::vector<float> m_mon_BcMuMuDplus_VtxMass_Bc; - std::vector<float> m_mon_BcMuMuDplus_Chi2_Bc; - // Bc -> D* - int m_mon_BcMuMuDstar_n; - std::vector<float> m_mon_BcMuMuDstar_Pt_K; - std::vector<float> m_mon_BcMuMuDstar_Eta_K; - std::vector<float> m_mon_BcMuMuDstar_Phi_K; - std::vector<float> m_mon_BcMuMuDstar_Pt_pi; - std::vector<float> m_mon_BcMuMuDstar_Eta_pi; - std::vector<float> m_mon_BcMuMuDstar_Phi_pi; - std::vector<float> m_mon_BcMuMuDstar_Pt_pis; - std::vector<float> m_mon_BcMuMuDstar_Eta_pis; - std::vector<float> m_mon_BcMuMuDstar_Phi_pis; - std::vector<float> m_mon_BcMuMuDstar_InvMass_D0Dstar; - std::vector<float> m_mon_BcMuMuDstar_VtxMass_D0Dstar; - std::vector<float> m_mon_BcMuMuDstar_DelMass_Dstar; - std::vector<float> m_mon_BcMuMuDstar_VtxDelMass_Dstar; - std::vector<float> m_mon_BcMuMuDstar_Chi2_D0Dstar; - std::vector<float> m_mon_BcMuMuDstar_Lxy_D0Dstar; - std::vector<float> m_mon_BcMuMuDstar_pT_Dstar; - std::vector<float> m_mon_BcMuMuDstar_pT_Bc; - std::vector<float> m_mon_BcMuMuDstar_InvMass_Bc; - std::vector<float> m_mon_BcMuMuDstar_VtxMass_Bc; - std::vector<float> m_mon_BcMuMuDstar_Chi2_Bc; - // Bc -> D0 - int m_mon_BcMuMuD0_n; - std::vector<float> m_mon_BcMuMuD0_Pt_K; - std::vector<float> m_mon_BcMuMuD0_Eta_K; - std::vector<float> m_mon_BcMuMuD0_Phi_K; - std::vector<float> m_mon_BcMuMuD0_Pt_pi; - std::vector<float> m_mon_BcMuMuD0_Eta_pi; - std::vector<float> m_mon_BcMuMuD0_Phi_pi; - std::vector<float> m_mon_BcMuMuD0_InvMass_D0; - std::vector<float> m_mon_BcMuMuD0_VtxMass_D0; - std::vector<float> m_mon_BcMuMuD0_Chi2_D0; - std::vector<float> m_mon_BcMuMuD0_Lxy_D0; - std::vector<float> m_mon_BcMuMuD0_pT_D0; - std::vector<float> m_mon_BcMuMuD0_pT_Bc; - std::vector<float> m_mon_BcMuMuD0_InvMass_Bc; - std::vector<float> m_mon_BcMuMuD0_VtxMass_Bc; - std::vector<float> m_mon_BcMuMuD0_Chi2_Bc; - - - // to set Accept-All mode: should be done with force-accept when possible - bool m_acceptAll; - - xAOD::TrigBphysContainer * m_TrigBphysColl_b; - xAOD::TrigBphysContainer * m_TrigBphysColl_X; - - // Timers - TrigTimer* m_TotTimer; - TrigTimer* m_VtxFitTimer; - - Trk::TrkVKalVrtFitter* m_VKVFitter; - - //Counters - int m_lastEvent; - int m_lastEventPassed; - unsigned int m_countTotalEvents; - unsigned int m_countTotalRoI; - unsigned int m_countPassedEvents; - unsigned int m_countPassedRoIs; - - int m_lastEventPassedBplus; - int m_lastEventPassedBd; - int m_lastEventPassedBs; - int m_lastEventPassedLb; - int m_lastEventPassedBc; - int m_lastEventPassedBcDplus; - int m_lastEventPassedBcDstar; - int m_lastEventPassedBcD0; - unsigned int m_countPassedEventsBplus; - unsigned int m_countPassedEventsBs; - unsigned int m_countPassedEventsBd; - unsigned int m_countPassedEventsLb; - unsigned int m_countPassedEventsBc; - unsigned int m_countPassedEventsBcDplus; - unsigned int m_countPassedEventsBcDstar; - unsigned int m_countPassedEventsBcD0; - - unsigned int m_countPassedMuMuID; - unsigned int m_countPassedMuMuOS; - unsigned int m_countPassedMuMuMass; - unsigned int m_countPassedMuMuVtx; - unsigned int m_countPassedMuMuVtxChi2; - - unsigned int m_countPassedBplusMass; - unsigned int m_countPassedBplusVtx; - unsigned int m_countPassedBplusVtxChi2; - int m_countBpToStore; - - unsigned int m_countPassedKstarMass; - unsigned int m_countPassedBdMass; - unsigned int m_countPassedKstarVtx; - unsigned int m_countPassedKstarVtxChi2; - unsigned int m_countPassedBdVtx; - unsigned int m_countPassedBdVtxChi2; - int m_countBdToStore; - - unsigned int m_countPassedPhi1020Mass; - unsigned int m_countPassedBsMass; - unsigned int m_countPassedPhi1020Vtx; - unsigned int m_countPassedPhi1020VtxChi2; - unsigned int m_countPassedBsVtx; - unsigned int m_countPassedBsVtxChi2; - int m_countBsToStore; - - unsigned int m_countPassedLambdaMass; - unsigned int m_countPassedLambdaVtxMass; - unsigned int m_countPassedLbMass; - unsigned int m_countPassedLbVtxMass; - unsigned int m_countPassedLambdaVtx; - unsigned int m_countPassedLambdaVtxChi2; - unsigned int m_countPassedLbVtx; - unsigned int m_countPassedLbVtxChi2; - unsigned int m_countPassedLbLambdaLxy; - int m_countLbToStore; - - unsigned int m_countPassedPhiDsMass; - unsigned int m_countPassedDsMass; - unsigned int m_countPassedBcMass; - unsigned int m_countPassedDsVtx; - unsigned int m_countPassedDsVtxChi2; - unsigned int m_countPassedBcVtx; - unsigned int m_countPassedBcVtxChi2; - unsigned int m_countPassedBcDsLxy; - int m_countBcToStore; - - unsigned int m_countPassedDplusMass; - unsigned int m_countPassedBcDplusMass; - unsigned int m_countPassedDplusVtx; - unsigned int m_countPassedDplusVtxChi2; - unsigned int m_countPassedBcDplusVtx; - unsigned int m_countPassedBcDplusVtxChi2; - unsigned int m_countPassedBcDplusLxy; - int m_countBcDplusToStore; - - unsigned int m_countPassedD0DstarMass; - unsigned int m_countPassedDstarMass; - unsigned int m_countPassedBcDstarMass; - unsigned int m_countPassedD0DstarVtx; - unsigned int m_countPassedD0DstarVtxChi2; - unsigned int m_countPassedBcDstarVtx; - unsigned int m_countPassedBcDstarVtxChi2; - unsigned int m_countPassedBcD0DstarLxy; - int m_countBcDstarToStore; - - unsigned int m_countPassedD0Mass; - unsigned int m_countPassedBcD0Mass; - unsigned int m_countPassedD0Vtx; - unsigned int m_countPassedD0VtxChi2; - unsigned int m_countPassedBcD0Vtx; - unsigned int m_countPassedBcD0VtxChi2; - unsigned int m_countPassedBcD0Lxy; - int m_countBcD0ToStore; - - void addUnique(std::vector<const xAOD::TrackParticle*>&, const xAOD::TrackParticle*); - void addUnique(std::vector<ElementLink<xAOD::TrackParticleContainer> >&, const ElementLink<xAOD::TrackParticleContainer>&); -// double invariantMass(const TrigMuonEF* , const TrigMuonEF* ); -// double invariantMass(const Trk::Track* , const Trk::Track* ); - bool isUnique(const xAOD::TrackParticle* id1, const xAOD::TrackParticle* id2) const; - - double XMass(const xAOD::TrackParticle* particle1, const xAOD::TrackParticle* particle2, int decay); /// checking the mass - double X3Mass(const xAOD::TrackParticle* particle1, const xAOD::TrackParticle* particle2, const xAOD::TrackParticle* particle3 ); - double XKPiPiMass(const xAOD::TrackParticle* particle1, const xAOD::TrackParticle* particle2, const xAOD::TrackParticle* particle3 ); - - double KMuMuMass( const xAOD::TrackParticle* mu1, const xAOD::TrackParticle* mu2, const xAOD::TrackParticle* kaon); - double XMuMuMass( const xAOD::TrackParticle* mu1, const xAOD::TrackParticle* mu2, const xAOD::TrackParticle* particle1, - const xAOD::TrackParticle* particle2, int decay); - double X3MuMuMass(const xAOD::TrackParticle* mu1, const xAOD::TrackParticle* mu2, const xAOD::TrackParticle* particle1, - const xAOD::TrackParticle* particle2, const xAOD::TrackParticle* particle3 ); - double XKPiPiMuMuMass(const xAOD::TrackParticle* mu1, const xAOD::TrackParticle* mu2, const xAOD::TrackParticle* particle1, - const xAOD::TrackParticle* particle2, const xAOD::TrackParticle* particle3 ); - - xAOD::TrigBphys* checkBplusMuMuKplus(const ElementLink<xAOD::TrackParticleContainer> & eltrack1, - const ElementLink<xAOD::TrackParticleContainer> & elmu1, - const ElementLink<xAOD::TrackParticleContainer> & elmu2); - - xAOD::TrigBphys* checkBMuMu2X(const ElementLink<xAOD::TrackParticleContainer> & eltrack1, - const ElementLink<xAOD::TrackParticleContainer> & eltrack2, - const ElementLink<xAOD::TrackParticleContainer> & elmu1, - const ElementLink<xAOD::TrackParticleContainer> & elmu2, - int decay, xAOD::TrigBphys* & trigPartX); - - xAOD::TrigBphys* checkBcMuMuDs(const ElementLink<xAOD::TrackParticleContainer> & eltrack1, - const ElementLink<xAOD::TrackParticleContainer> & eltrack2, - const ElementLink<xAOD::TrackParticleContainer> & eltrack3, - const ElementLink<xAOD::TrackParticleContainer> & elmu1, - const ElementLink<xAOD::TrackParticleContainer> & elmu2, - double xPhiMass, - xAOD::TrigBphys* & trigPartX); - - xAOD::TrigBphys* checkBcMuMuDplus(const ElementLink<xAOD::TrackParticleContainer> & eltrack1, - const ElementLink<xAOD::TrackParticleContainer> & eltrack2, - const ElementLink<xAOD::TrackParticleContainer> & eltrack3, - const ElementLink<xAOD::TrackParticleContainer> & elmu1, - const ElementLink<xAOD::TrackParticleContainer> & elmu2, - xAOD::TrigBphys* & trigPartX); - - xAOD::TrigBphys* checkBcMuMuDstar(const ElementLink<xAOD::TrackParticleContainer> & eltrack1, - const ElementLink<xAOD::TrackParticleContainer> & eltrack2, - const ElementLink<xAOD::TrackParticleContainer> & eltrack3, - const ElementLink<xAOD::TrackParticleContainer> & elmu1, - const ElementLink<xAOD::TrackParticleContainer> & elmu2, - xAOD::TrigBphys* & trigPartX); - - xAOD::TrigBphys* checkBcMuMuD0(const ElementLink<xAOD::TrackParticleContainer> & eltrack1, - const ElementLink<xAOD::TrackParticleContainer> & eltrack2, - const ElementLink<xAOD::TrackParticleContainer> & elmu1, - const ElementLink<xAOD::TrackParticleContainer> & elmu2, - xAOD::TrigBphys* & trigPartX); - - xAOD::TrigBphys* checkLbMuMuLambda(const ElementLink<xAOD::TrackParticleContainer> & eltrack1, - const ElementLink<xAOD::TrackParticleContainer> & eltrack2, - const ElementLink<xAOD::TrackParticleContainer> & elmu1, - const ElementLink<xAOD::TrackParticleContainer> & elmu2, - xAOD::TrigBphys* & trigPartX); - - -}; - -// Define the bins for error-monitoring histogram -#define ERROR_No_EventInfo 0 -#define ERROR_Not_2_InputTEs 1 -#define ERROR_No_RoIs 2 -#define ERROR_No_MuonEFInfoContainer 3 -#define ERROR_No_MuonCandidate 4 - -#define ERROR_SameMuon 5 -#define ERROR_DiMuVtxFit_Fails 6 -#define ERROR_DiMuVtxMass_Fails 7 - -#define ERROR_No_TrackColl 8 -#define ERROR_No_MuonTrackMatch 17 - -#define ERROR_BplusVtxFit_Fails 9 -#define ERROR_BplusVtxMass_Fails 10 -#define ERROR_WrongDecayID 11 -#define ERROR_XVtxFit_Fails 12 -#define ERROR_XVtxMass_Fails 13 -#define ERROR_XMuMuVtxFit_Fails 14 -#define ERROR_XMuMuVtxMass_Fails 15 - -#define ERROR_BphysCollStore_Fails 16 - -#define ERROR_TooManyComb_Acc 18 -#define ERROR_TooManyComb_Rej 19 - -#define ERROR_MaxNumBpReached 20 -#define ERROR_MaxNumBdReached 21 -#define ERROR_MaxNumBsReached 22 -#define ERROR_MaxNumLbReached 23 -#define ERROR_MaxNumBcReached 24 -#define ERROR_MaxNumBcDplusReached 24 -#define ERROR_MaxNumBcDstarReached 24 -#define ERROR_MaxNumBcD0Reached 24 - -// // Define the bins for acceptance-monitoring histogram -// #define ACCEPT_Input 0 -// #define ACCEPT_AcceptAll 1 -// #define ACCEPT_Got_RoIs 2 -// #define ACCEPT_Got_Muons 3 -// #define ACCEPT_Got_TrackColl 4 -// #define ACCEPT_First_TrackColl 5 -// #define ACCEPT_Both_TrackColls 6 -// #define ACCEPT_Full_IDTracks 7 -// #define ACCEPT_Pass_OppChargeC 8 -// #define ACCEPT_MuonTracks_Added 8 -// #define ACCEPT_Muon_Vertexing 9 -// #define ACCEPT_CalcInvMass 10 -// #define ACCEPT_MuonVtx_Part 11 -// #define ACCEPT_MuMu_Mass 12 -// #define ACCEPT_MotherVtxCreated 13 -// #define ACCEPT_BphysCollParticle 14 - -#endif diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBMuMuXHypo.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBMuMuXHypo.cxx deleted file mode 100644 index 2799601e2a71ab49288561bdf06b5542e27a77c6..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBMuMuXHypo.cxx +++ /dev/null @@ -1,482 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// vim: tabstop=2:shiftwidth=2:expandtab -// -*- C++ -*-// -/************************************************************************** -** -** File: Trigger/TrigHypothesis/TrigBPhysHypo/TrigEFBMuMuXHypo.cxx -** -** Description: EF hypothesis algorithms for -** B^0_{s,d},\Lambda_b \to X \mu^+ \mu^- -** -** -** Author: J.Kirk -** Author: Semen Turchikhin <Semen.Turchikhin@cern.ch> -** -** Created: 12.09.2007 -** Modified: 08.04.2012 -** -** Modified: 26.09.2012 : "B_c -> D_s(*) (->Phi(->K+K-)) mu+mu-" added (Leonid Gladilin <gladilin@mail.cern.ch>) -** -***************************************************************************/ - -//#include "TrigMuonEvent/CombinedMuonFeature.h" - -#include "TrigEFBMuMuXHypo.h" -#include "xAODTrigger/TrigPassBits.h" - -// additions of xAOD objects -#include "xAODEventInfo/EventInfo.h" -#include "xAODTrigBphys/TrigBphys.h" -#include "xAODTrigBphys/TrigBphysContainer.h" -#include "xAODTrigBphys/TrigBphysAuxContainer.h" - -class ISvcLocator; - -TrigEFBMuMuXHypo::TrigEFBMuMuXHypo(const std::string & name, ISvcLocator* pSvcLocator): - HLT::HypoAlgo(name, pSvcLocator) -//counters -,m_lastEvent(-1) -,m_lastEventPassed(-1) -,m_countTotalEvents(0) -,m_countTotalRoI(0) -,m_countPassedEvents(0) -,m_countPassedRoIs(0) -,m_countPassedBplus(0) -,m_countPassedBd(0) -,m_countPassedBs(0) -,m_countPassedLb(0) -,m_countPassedBc(0) -,m_countPassedBcDplus(0) -,m_countPassedBcDstar(0) -,m_countPassedBcD0(0) -{ - declareProperty("bphysCollectionKey", m_bphysCollectionKey = "EFBMuMuXFex" ); - declareProperty("AcceptAll", m_acceptAll=true); // Should we just accept all events - - declareProperty("AcceptBplus", m_acceptBplus=true); - declareProperty("AcceptBd", m_acceptBd=true); - declareProperty("AcceptBs", m_acceptBs=true); - declareProperty("AcceptLb", m_acceptLb=true); - declareProperty("AcceptBc", m_acceptBc=true); // BcDs - declareProperty("AcceptBcDplus", m_acceptBcDplus=false); - declareProperty("AcceptBcDstar", m_acceptBcDstar=false); - declareProperty("AcceptBcD0", m_acceptBcD0=false); - - declareProperty("LowerBplusMassCut", m_lowerBplusMassCut = 4500.); //4500.00 - declareProperty("UpperBplusMassCut", m_upperBplusMassCut = 5900.); //5900.00 - declareProperty("BplusChi2Cut", m_BplusChi2Cut = 60.); //5900.00 - declareProperty("LowerBdMassCut", m_lowerBdMassCut = 4600.); //4600.00 - declareProperty("UpperBdMassCut", m_upperBdMassCut = 6000.); //6000.00 - declareProperty("BdChi2Cut", m_BdChi2Cut = 60.); //6000.00 - declareProperty("LowerKstarMassCut", m_lowerKstarMassCut = 600.); //4600.00 - declareProperty("UpperKstarMassCut", m_upperKstarMassCut = 1200.); //6000.00 - declareProperty("KstarChi2Cut", m_KstarChi2Cut = 60.); //6000.00 - declareProperty("LowerBsMassCut", m_lowerBsMassCut = 4600.); //4600.00 - declareProperty("UpperBsMassCut", m_upperBsMassCut = 6000.); //6000.00 - declareProperty("BsChi2Cut", m_BsChi2Cut = 60.); //6000.00 - declareProperty("LowerPhi1020MassCut", m_lowerPhi1020MassCut = 990.); //4600.00 - declareProperty("UpperPhi1020MassCut", m_upperPhi1020MassCut = 1050.); //6000.00 - declareProperty("Phi1020Chi2Cut", m_Phi1020Chi2Cut = 60.); //6000.00 - declareProperty("LowerLbMassCut", m_lowerLbMassCut = 4600.); //4600.00 - declareProperty("UpperLbMassCut", m_upperLbMassCut = 6400.); //6400.00 - declareProperty("LbChi2Cut", m_LbChi2Cut = 100.); //6400.00 - declareProperty("LowerLambdaMassCut", m_lowerLambdaMassCut = 1040.); //4600.00 - declareProperty("UpperLambdaMassCut", m_upperLambdaMassCut = 1220.); //6400.00 - declareProperty("LambdaChi2Cut", m_LambdaChi2Cut = 100.); //6400.00 - - declareProperty("LowerBcMassCut", m_lowerBcMassCut = 1800.); //1800. - declareProperty("UpperBcMassCut", m_upperBcMassCut = 7050.); //7050. - declareProperty("BcChi2Cut", m_BcChi2Cut = 120.); // 120. - // declareProperty("LowerPhiDsMassCut", m_lowerPhiDsMassCut = 980.); // 980. - // declareProperty("UpperPhiDsMassCut", m_upperPhiDsMassCut = 1080.); //1080. - declareProperty("LowerDsMassCut", m_lowerDsMassCut = 1600.); //1600. - declareProperty("UpperDsMassCut", m_upperDsMassCut = 2400.); //2400. - declareProperty("DsChi2Cut", m_DsChi2Cut = 90.); // 90. - - declareProperty("LowerBcDplusMassCut", m_lowerBcDplusMassCut = 5450.); //1800. - declareProperty("UpperBcDplusMassCut", m_upperBcDplusMassCut = 7050.); //7050. - declareProperty("BcDplusChi2Cut", m_BcDplusChi2Cut = 180.); // 120. - declareProperty("LowerDplusMassCut", m_lowerDplusMassCut = 1500.); //1600. - declareProperty("UpperDplusMassCut", m_upperDplusMassCut = 2300.); //2400. - declareProperty("DplusChi2Cut", m_DplusChi2Cut = 90.); // 90. - - declareProperty("LowerBcDstarMassCut", m_lowerBcDstarMassCut = 5450.); //1800. - declareProperty("UpperBcDstarMassCut", m_upperBcDstarMassCut = 7050.); //7050. - declareProperty("BcDstarChi2Cut", m_BcDstarChi2Cut = 120.); // 120. - declareProperty("LowerDstarMassCut", m_lowerDstarMassCut = 1500.); //1600. - declareProperty("UpperDstarMassCut", m_upperDstarMassCut = 2300.); //2400. - declareProperty("DstarChi2Cut", m_DstarChi2Cut = 90.); // 90. - - declareProperty("LowerBcD0MassCut", m_lowerBcD0MassCut = 5250.); //1800. - declareProperty("UpperBcD0MassCut", m_upperBcD0MassCut = 6911.); //7050. - declareProperty("BcD0Chi2Cut", m_BcD0Chi2Cut = 120.); // 120. - declareProperty("LowerD0MassCut", m_lowerD0MassCut = 1500.); //1600. - declareProperty("UpperD0MassCut", m_upperD0MassCut = 2300.); //2400. - declareProperty("D0Chi2Cut", m_D0Chi2Cut = 90.); // 90. - -} - -TrigEFBMuMuXHypo::~TrigEFBMuMuXHypo() -{ } - -HLT::ErrorCode TrigEFBMuMuXHypo::hltInitialize() -{ - ATH_MSG_INFO("Running TrigEFBMuMuXHypo::hltInitialize" ); - ATH_MSG_DEBUG(" AcceptAll= " << m_acceptAll ); - - m_lastEvent=-1; - m_lastEventPassed=-1; - m_countTotalEvents=0; - m_countTotalRoI=0; - m_countPassedEvents=0; - m_countPassedRoIs=0; - m_countPassedBplus=0; - m_countPassedBd=0; - m_countPassedBs=0; - m_countPassedLb=0; - m_countPassedBc=0; - m_countPassedBcDplus=0; - m_countPassedBcDstar=0; - m_countPassedBcD0=0; - - return HLT::OK; -} - - -HLT::ErrorCode TrigEFBMuMuXHypo::hltFinalize() -{ - - ATH_MSG_INFO("Running TrigEFBMuMuXHypo::hltFinalize" ); - MsgStream log(msgSvc(), name()); - - ATH_MSG_INFO("|----------------------- SUMMARY FROM TrigEFBMuMuXHypo -------------|" ); - ATH_MSG_INFO("Run on events/RoIs " << m_countTotalEvents << "/" << m_countTotalRoI ); - ATH_MSG_INFO("Passed events/RoIs " << m_countPassedEvents << "/" << m_countPassedRoIs ); - ATH_MSG_INFO("RoIs Passed B+: " << m_countPassedBplus ); - ATH_MSG_INFO("RoIs Passed Bd: " << m_countPassedBd ); - ATH_MSG_INFO("RoIs Passed Bs: " << m_countPassedBs ); - ATH_MSG_INFO("RoIs Passed Lb: " << m_countPassedLb ); - ATH_MSG_INFO("RoIs Passed Bc: " << m_countPassedBc ); - ATH_MSG_INFO("RoIs Passed BcDplus: " << m_countPassedBcDplus ); - ATH_MSG_INFO("RoIs Passed BcDstar: " << m_countPassedBcDstar ); - ATH_MSG_INFO("RoIs Passed BcD0: " << m_countPassedBcD0 ); - - return HLT::OK; -} - - -HLT::ErrorCode TrigEFBMuMuXHypo::hltExecute(const HLT::TriggerElement* outputTE, bool& pass) -{ - - ATH_MSG_DEBUG("Running TrigEFBMuMuXHypo::hltExecute" ); - - bool result = false; - bool PassedBplus=false; - bool PassedBd=false; - bool PassedBs=false; - bool PassedLb=false; - bool PassedBc=false; - bool PassedBcDplus=false; - bool PassedBcDstar=false; - bool PassedBcD0=false; - - // Retrieve event info - int IdRun = 0; - int IdEvent = 0; - - // JW - Try to get the xAOD event info - const xAOD::EventInfo *evtInfo(0); - if ( store()->retrieve(evtInfo).isFailure() ) { - ATH_MSG_WARNING("Failed to get xAOD::EventInfo " ); - // now try the old event ifo - }else { // found the xAOD event info - ATH_MSG_DEBUG(" Run " << evtInfo->runNumber() << " Event " << evtInfo->eventNumber() ); - IdRun = evtInfo->runNumber(); - IdEvent = evtInfo->eventNumber(); - } // get event ifo - if (IdEvent != m_lastEvent) { - m_countTotalEvents++; - m_lastEvent=IdEvent; - } - m_countTotalRoI++; - - // Accept-All mode: temporary patch; should be done with force-accept - if (m_acceptAll) { - ATH_MSG_DEBUG("AcceptAll property is set: taking all events" ); - pass = true; - return HLT::OK; - } else { - ATH_MSG_DEBUG("AcceptAll property not set: applying selection" ); - } - - ATH_MSG_DEBUG("Using outputTE ( " << outputTE << " ) ->getId(): " << outputTE->getId() ); - - - // create vector for TrigEFBphys particles - const xAOD::TrigBphysContainer * xAODTrigBphysColl(0); - - // get vector of TrigEFBphys particles from outputTE - HLT::ErrorCode status = getFeature(outputTE, xAODTrigBphysColl, m_bphysCollectionKey); - if ( status != HLT::OK ) { - ATH_MSG_WARNING("Failed to get xAODTrigBphysColl collection" ); - return HLT::OK; - } - - ATH_MSG_DEBUG(" Retrieved Bphys collection xAODTrigBphysColl = " << xAODTrigBphysColl ); - if ( xAODTrigBphysColl == 0 ) { - ATH_MSG_DEBUG("No Bphys particles to analyse, leaving!" ); - return HLT::OK; - } - - ATH_MSG_DEBUG("Got xAODTrigBphysColl collection with " << xAODTrigBphysColl->size() << " TrigBphys particles " ); - - // if no Bphys particles were found, just leave TrigBphysColl. empty and leave - if ( xAODTrigBphysColl->size() == 0 ) { - ATH_MSG_DEBUG("No Bphys particles to analyse, leaving!" ); -// delete trigBphysColl; - return HLT::OK; - } - - //TrigPassBits *bits = HLT::makeTrigPassBits(xAODTrigBphysColl); - std::unique_ptr<xAOD::TrigPassBits> xBits = xAOD::makeTrigPassBits<xAOD::TrigBphysContainer>(xAODTrigBphysColl); - - // now loop over Bphys particles to see if one passes cuts - for (xAOD::TrigBphysContainer::const_iterator bphysIter = xAODTrigBphysColl->begin(); - bphysIter != xAODTrigBphysColl->end(); ++bphysIter) { - - //determine decay mode - std::string decayName("UNKNOWN"); - xAOD::TrigBphys::pType decayType = (*bphysIter)->particleType(); - if(decayType == xAOD::TrigBphys::BKMUMU) decayName = "B+ -> mu mu K+"; - if(decayType == xAOD::TrigBphys::BDKSTMUMU) decayName = "Bd -> mu mu K*"; - if(decayType == xAOD::TrigBphys::BSPHIMUMU) decayName = "Bs -> mu mu Phi"; - if(decayType == xAOD::TrigBphys::LBLMUMU) decayName = "Lambda_b -> mu mu Lambda"; - if(decayType == xAOD::TrigBphys::BCDSMUMU) decayName = "Bc -> mu mu Ds"; - if(decayType == xAOD::TrigBphys::BCDPMUMU) decayName = "Bc -> mu mu D+"; - if(decayType == xAOD::TrigBphys::BCDSTMUMU) decayName = "Bc -> mu mu D*+ or Bc -> mu mu D0"; - - ATH_MSG_DEBUG("Bphys particle type: " << decayName << ", " << decayType << " with mass " << (*bphysIter)->mass() ); - -// if ((*bphysIter)->particleType() == TrigEFBphys::BMUMUX ) { - if (decayType == xAOD::TrigBphys::BKMUMU || decayType == xAOD::TrigBphys::BDKSTMUMU || - decayType == xAOD::TrigBphys::BSPHIMUMU || decayType == xAOD::TrigBphys::LBLMUMU || - decayType == xAOD::TrigBphys::BCDSMUMU || decayType == xAOD::TrigBphys::BCDPMUMU - || decayType == xAOD::TrigBphys::BCDSTMUMU ) { - - bool thisPassedBplus=false; - bool thisPassedBd=false; - bool thisPassedBs=false; - bool thisPassedLb=false; - bool thisPassedBc=false; - bool thisPassedBcDplus=false; - bool thisPassedBcDstar=false; - bool thisPassedBcD0=false; - - float BMass = (*bphysIter)->mass(); - float BChi2 = (*bphysIter)->fitchi2(); - ATH_MSG_DEBUG("BMass = " << BMass ); - ATH_MSG_DEBUG("BChi2 = " << BChi2 ); - - if( decayType == xAOD::TrigBphys::BKMUMU ) { - if( m_acceptBplus ) { - if ( BMass > m_lowerBplusMassCut && BMass < m_upperBplusMassCut ) { - ATH_MSG_DEBUG(" Mass = " << BMass << " -> B+ Mass passed " ); - if( BChi2 < m_BplusChi2Cut /*&& BChi2 >= -0.0001*/ ) { // allow -nve chi2 for not fitted - ATH_MSG_DEBUG(" Chi2 = " << BChi2 << " -> B+ Chi2 passed " ); - PassedBplus=true; - thisPassedBplus=true; - } - } - } - } - else { // bD_to_Kstar, bS_to_Phi, lB_to_L, bC_to_Ds - const xAOD::TrigBphys* trigPartX = (*bphysIter)->secondaryDecay(); - if(!trigPartX) { - ATH_MSG_WARNING("No secondary decay pointer in Bphys particle of type " << (*bphysIter)->particleType() ); - } else { - float XMass = trigPartX->mass(); - float XChi2 = trigPartX->fitchi2(); - int nXParticles = trigPartX->trackParticleLinks().size(); - ATH_MSG_DEBUG("XMass = " << XMass << ", XChi2 = " << XChi2 << ", nXParticles = " << nXParticles ); - - // Bd -> Mu Mu Kstar - if( (decayType == xAOD::TrigBphys::BDKSTMUMU) && m_acceptBd ) { - if ( BMass > m_lowerBdMassCut && BMass < m_upperBdMassCut ) { - ATH_MSG_DEBUG(" BMass = " << BMass << " -> Bd Mass passed " ); - if ( XMass > m_lowerKstarMassCut && XMass < m_upperKstarMassCut ) { - ATH_MSG_DEBUG(" XMass = " << XMass << " -> K* Mass passed " ); - if( BChi2 < m_BdChi2Cut /*&& BChi2 >= -0.0001*/) { // allow -nve chi2 for not fitted - ATH_MSG_DEBUG(" BChi2 = " << BChi2 << " -> Bd Chi2 passed " ); - if ( XChi2 < m_KstarChi2Cut /*&& XChi2 >= -0.0001*/) { // allow -nve chi2 for not fitted - ATH_MSG_DEBUG(" XChi2 = " << XChi2 << " -> K* Chi2 passed " ); - PassedBd=true; - thisPassedBd=true; - } - } - } - } - } - - // Bs -> Mu Mu Phi - if( (decayType == xAOD::TrigBphys::BSPHIMUMU) && m_acceptBs ) { - if ( BMass > m_lowerBsMassCut && BMass < m_upperBsMassCut ) { - ATH_MSG_DEBUG(" BMass = " << BMass << " -> Bs Mass passed " ); - if ( XMass > m_lowerPhi1020MassCut && XMass < m_upperPhi1020MassCut ) { - ATH_MSG_DEBUG(" XMass = " << XMass << " -> Phi Mass passed " ); - if( BChi2 < m_BsChi2Cut /*&& BChi2 >= -0.0001*/ ) { // allow -nve chi2 for not fitted - ATH_MSG_DEBUG(" BChi2 = " << BChi2 << " -> Bs Chi2 passed " ); - if ( XChi2 < m_Phi1020Chi2Cut /*&& XChi2 >= -0.0001*/) { // allow -nve chi2 for not fitted - ATH_MSG_DEBUG(" XChi2 = " << XChi2 << " -> Phi Chi2 passed " ); - PassedBs=true; - thisPassedBs=true; - } - } - } - } - } - - // Lambda_b -> Mu Mu Lambda - if( (decayType == xAOD::TrigBphys::LBLMUMU) && m_acceptLb ) { - if ( BMass > m_lowerLbMassCut && BMass < m_upperLbMassCut ) { - ATH_MSG_DEBUG(" BMass = " << BMass << " -> Lambda_b Mass passed " ); - if ( XMass > m_lowerLambdaMassCut && XMass < m_upperLambdaMassCut ) { - ATH_MSG_DEBUG(" XMass = " << XMass << " -> Lambda Mass passed " ); - if( BChi2 < m_LbChi2Cut /*&& BChi2 >= -0.0001*/) {// allow -nve chi2 for not fitted - ATH_MSG_DEBUG(" BChi2 = " << BChi2 << " -> Lambda_b Chi2 passed " ); - if ( XChi2 < m_LambdaChi2Cut /*&& XChi2 >= -0.0001*/ ) { // allow -nve chi2 for not fitted - ATH_MSG_DEBUG(" XChi2 = " << XChi2 << " -> Lambda Chi2 passed " ); - PassedLb=true; - thisPassedLb=true; - } - } - } - } - } - - // Bc -> Mu Mu Ds - if( (decayType == xAOD::TrigBphys::BCDSMUMU) && m_acceptBc ) { - if ( BMass > m_lowerBcMassCut && BMass < m_upperBcMassCut ) { - ATH_MSG_DEBUG(" BMass = " << BMass << " -> Bc Mass passed " ); - if ( XMass > m_lowerDsMassCut && XMass < m_upperDsMassCut ) { - ATH_MSG_DEBUG(" XMass = " << XMass << " -> Ds Mass passed " ); - if( BChi2 < m_BcChi2Cut && BChi2 >= -0.0001) { - ATH_MSG_DEBUG(" BChi2 = " << BChi2 << " -> Bc Chi2 passed " ); - if ( XChi2 < m_DsChi2Cut && XChi2 >= -0.0001) { - ATH_MSG_DEBUG(" XChi2 = " << XChi2 << " -> Ds Chi2 passed " ); - PassedBc=true; - thisPassedBc=true; - } - } - } - } - } - - // Bc -> Mu Mu D+ - if( (decayType == xAOD::TrigBphys::BCDPMUMU) && m_acceptBcDplus ) { - if ( BMass > m_lowerBcDplusMassCut && BMass < m_upperBcDplusMassCut ) { - ATH_MSG_DEBUG(" BMass = " << BMass << " -> BcDplus Mass passed " ); - if ( XMass > m_lowerDplusMassCut && XMass < m_upperDplusMassCut ) { - ATH_MSG_DEBUG(" XMass = " << XMass << " -> Dplus Mass passed " ); - if( BChi2 < m_BcDplusChi2Cut && BChi2 >= -0.0001) { - ATH_MSG_DEBUG(" BChi2 = " << BChi2 << " -> BcDplus Chi2 passed " ); - if ( XChi2 < m_DplusChi2Cut && XChi2 >= -0.0001) { - ATH_MSG_DEBUG(" XChi2 = " << XChi2 << " -> Dplus Chi2 passed " ); - PassedBcDplus=true; - thisPassedBcDplus=true; - } - } - } - } - } - - // Bc -> Mu Mu D* - if( (decayType == xAOD::TrigBphys::BCDSTMUMU) && nXParticles == 3 && m_acceptBcDstar ) { - if ( BMass > m_lowerBcDstarMassCut && BMass < m_upperBcDstarMassCut ) { - ATH_MSG_DEBUG(" BMass = " << BMass << " -> BcDstar Mass passed " ); - if ( XMass > m_lowerDstarMassCut && XMass < m_upperDstarMassCut ) { - ATH_MSG_DEBUG(" XMass = " << XMass << " -> Dstar Mass passed " ); - if( BChi2 < m_BcDstarChi2Cut && BChi2 >= -0.0001) { - ATH_MSG_DEBUG(" BChi2 = " << BChi2 << " -> BcDstar Chi2 passed " ); - if ( XChi2 < m_DstarChi2Cut && XChi2 >= -0.0001) { - ATH_MSG_DEBUG(" XChi2 = " << XChi2 << " -> Dstar Chi2 passed " ); - PassedBcDstar=true; - thisPassedBcDstar=true; - } - } - } - } - } - - // Bc -> Mu Mu D0 - if( (decayType == xAOD::TrigBphys::BCDSTMUMU) && nXParticles == 2 && m_acceptBcD0 ) { - if ( BMass > m_lowerBcD0MassCut && BMass < m_upperBcD0MassCut ) { - ATH_MSG_DEBUG(" BMass = " << BMass << " -> BcD0 Mass passed " ); - if ( XMass > m_lowerD0MassCut && XMass < m_upperD0MassCut ) { - ATH_MSG_DEBUG(" XMass = " << XMass << " -> D0 Mass passed " ); - if( BChi2 < m_BcD0Chi2Cut && BChi2 >= -0.0001) { - ATH_MSG_DEBUG(" BChi2 = " << BChi2 << " -> BcD0 Chi2 passed " ); - if ( XChi2 < m_D0Chi2Cut && XChi2 >= -0.0001) { - ATH_MSG_DEBUG(" XChi2 = " << XChi2 << " -> D0 Chi2 passed " ); - PassedBcD0=true; - thisPassedBcD0=true; - } - } - } - } - } - - } // end if(trigPartX) - } // end bD_to_Kstar, bS_to_Phi, lB_to_L, bC_to_Ds - - if ( (thisPassedBplus) || - (thisPassedBd) || - (thisPassedBs) || - (thisPassedBc) || - (thisPassedBcDplus) || - (thisPassedBcDstar) || - (thisPassedBcD0) || - (thisPassedLb) ) { - result=true; - //HLT::markPassing(bits, *bphysIter, xAODTrigBphysColl); - xBits->markPassing((*bphysIter),xAODTrigBphysColl,true); - } - - } // end if decayType is ok - } - - if (PassedBplus) m_countPassedBplus++; - if (PassedBd) m_countPassedBd++; - if (PassedBs) m_countPassedBs++; - if (PassedLb) m_countPassedLb++; - if (PassedBc) m_countPassedBc++; - if (PassedBcDplus) m_countPassedBcDplus++; - if (PassedBcDstar) m_countPassedBcDstar++; - if (PassedBcD0) m_countPassedBcD0++; - - if (result) { - m_countPassedRoIs++; - if (IdEvent!= (int) m_lastEventPassed) { - m_countPassedEvents++; - m_lastEventPassed=IdEvent; - } - } - - // Reach this point successfully - ATH_MSG_DEBUG("Run: " << IdRun << " Event: " << IdEvent << " result is " << result ); - - if (!m_acceptAll) pass = result; - - // store result - //if ( attachBits(outputTE, bits) != HLT::OK ) { - // ATH_MSG_ERROR("Problem attaching TrigPassBits! " ); - //} - if(attachFeature(outputTE, xBits.release(),"passbits") != HLT::OK){ - ATH_MSG_ERROR("Could not store TrigPassBits! "); - } -// delete trigBphysColl; - - return HLT::OK; -} diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBMuMuXHypo.h b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBMuMuXHypo.h deleted file mode 100644 index dbaf6e240db5a21a54caa257015bf67e88fe816f..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBMuMuXHypo.h +++ /dev/null @@ -1,125 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// vim: tabstop=2:shiftwidth=2:expandtab -/************************************************************************** -** -** File: Trigger/TrigHypothesis/TrigBphysHypo/TrigEFBMuMuXFex.h -** -** Description: EF hypothesis algorithms for -** B^0_{d,s},\Lambda_b \to X \mu^+ \mu^- -** -** -** Author: J.Kirk -** Author: Semen Turchikhin <Semen.Turchikhin@cern.ch> -** -** Created: 12.09.2007 -** Modified: 08.04.2012 -** -***************************************************************************/ - -#ifndef TRIG_TrigEFBMuMuXHypo_H -#define TRIG_TrigEFBMuMuXHypo_H - -// standard stuff -#include <string> -// general athena stuff -#include "TrigInterfaces/HypoAlgo.h" - -class TrigEFBMuMuXHypo: public HLT::HypoAlgo { - - public: - TrigEFBMuMuXHypo(const std::string & name, ISvcLocator* pSvcLocator); - ~TrigEFBMuMuXHypo(); - HLT::ErrorCode hltInitialize(); - HLT::ErrorCode hltFinalize(); - HLT::ErrorCode hltExecute(const HLT::TriggerElement* outputTE, bool& pass); - - private: - - std::string m_bphysCollectionKey; - // Cuts and properties - bool m_acceptBplus; - bool m_acceptBd; - bool m_acceptBs; - bool m_acceptLb; - bool m_acceptBc; - bool m_acceptBcDplus; - bool m_acceptBcDstar; - bool m_acceptBcD0; - - float m_lowerBplusMassCut; - float m_upperBplusMassCut; - float m_BplusChi2Cut; - float m_lowerBdMassCut; - float m_upperBdMassCut; - float m_BdChi2Cut; - float m_lowerKstarMassCut; - float m_upperKstarMassCut; - float m_KstarChi2Cut; - float m_lowerBsMassCut; - float m_upperBsMassCut; - float m_BsChi2Cut; - float m_lowerPhi1020MassCut; - float m_upperPhi1020MassCut; - float m_Phi1020Chi2Cut; - float m_lowerLbMassCut; - float m_upperLbMassCut; - float m_LbChi2Cut; - float m_lowerLambdaMassCut; - float m_upperLambdaMassCut; - float m_LambdaChi2Cut; - - float m_lowerBcMassCut; - float m_upperBcMassCut; - float m_BcChi2Cut; -// float m_lowerPhiDsMassCut; -// float m_upperPhiDsMassCut; - float m_lowerDsMassCut; - float m_upperDsMassCut; - float m_DsChi2Cut; - - float m_lowerBcDplusMassCut; - float m_upperBcDplusMassCut; - float m_BcDplusChi2Cut; - float m_lowerDplusMassCut; - float m_upperDplusMassCut; - float m_DplusChi2Cut; - - float m_lowerBcDstarMassCut; - float m_upperBcDstarMassCut; - float m_BcDstarChi2Cut; - float m_lowerDstarMassCut; - float m_upperDstarMassCut; - float m_DstarChi2Cut; - - float m_lowerBcD0MassCut; - float m_upperBcD0MassCut; - float m_BcD0Chi2Cut; - float m_lowerD0MassCut; - float m_upperD0MassCut; - float m_D0Chi2Cut; - - // to set Accept-All mode: should be done with force-accept when possible - bool m_acceptAll; - - //Counters - int m_lastEvent; - int m_lastEventPassed; - unsigned int m_countTotalEvents; - unsigned int m_countTotalRoI; - unsigned int m_countPassedEvents; - unsigned int m_countPassedRoIs; - unsigned int m_countPassedBplus; - unsigned int m_countPassedBd; - unsigned int m_countPassedBs; - unsigned int m_countPassedLb; - unsigned int m_countPassedBc; - unsigned int m_countPassedBcDplus; - unsigned int m_countPassedBcDstar; - unsigned int m_countPassedBcD0; - -}; - -#endif diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFMultiMuFex.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFMultiMuFex.cxx deleted file mode 100644 index 51863a5ddc74b93ffe3f45eb7d8ae85b5aaa57a1..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFMultiMuFex.cxx +++ /dev/null @@ -1,430 +0,0 @@ -// -*- C++ -*- - -/* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -*/ - -/************************************************************************** - ** - ** File: Trigger/TrigHypothesis/TrigBphysHypo/TrigL2MultiMuFex.cxx - ** - ** Description: EF hypothesis algorithms for 3mu and 4mu signatures - ** - **************************************************************************/ - -#include "TrigEFMultiMuFex.h" -#include "TrigBphysHelperUtilsTool.h" - -#include "xAODTracking/TrackParticle.h" -#include "xAODMuon/MuonContainer.h" -#include "TrigTimeAlgs/TrigTimer.h" // for TrigTimer - -TrigEFMultiMuFex::TrigEFMultiMuFex(const std::string & name, ISvcLocator* pSvcLocator): - HLT::ComboAlgo(name, pSvcLocator) -,m_bphysHelperTool("TrigBphysHelperUtilsTool") -,m_BmmHypTot(0),m_BmmHypVtx(0) -,m_expectNumberOfInputTE(3) -,m_oppositeCharge(true) -,m_NMassMuon(2) -,m_lowerMassCut(2000.) -,m_upperMassCut(10000.) -,m_ApplyupperMassCut(true) -,m_checkNinputTE(true) -,m_muonAlgo("TrigMuSuperEF") -,m_acceptAll(false) -//counters -,m_lastEvent(-1) -,m_lastEventPassed(-1) -,m_countTotalEvents(0) -,m_countTotalRoI(0) -,m_countPassedEvents(0) -,m_countPassedRoIs(0) -,m_countPassedmumuPairsEv(0) -,m_countPassedBsMassEv(0) -,m_countPassedVtxFitEv(0) -,m_countPassedmumuPairs2R(0) -,m_countPassedBsMass2R(0) -,m_countPassedVtxFit2R(0) -,m_massMuon(105.6583715) -{ - - // Read cuts - - declareProperty("AcceptAll", m_acceptAll=true); - declareProperty("NInputMuon" , m_expectNumberOfInputTE = 3 ); - declareProperty("OppositeSign", m_oppositeCharge=true); - declareProperty("NMassMuon" , m_NMassMuon = 2 ); - declareProperty("LowerMassCut", m_lowerMassCut=2000.0); - declareProperty("UpperMassCut", m_upperMassCut=10000.0); - declareProperty("ApplyUpperMassCut", m_ApplyupperMassCut=true); - declareProperty("MuonAlgo", m_muonAlgo="TrigMuSuperEF"); - declareProperty("CheckNinputTE", m_checkNinputTE=true); - - declareMonitoredStdContainer("Errors" , m_mon_Errors , AutoClear); - declareMonitoredStdContainer("Acceptance" , m_mon_Acceptance , AutoClear); - declareMonitoredStdContainer("pTMu1", m_mon_mu1pT , AutoClear ); - declareMonitoredStdContainer("pTMu2", m_mon_mu2pT , AutoClear ); - declareMonitoredStdContainer("MuMumass", m_mon_MuMumass , AutoClear ); - declareMonitoredStdContainer("FitMass", m_mon_FitMass , AutoClear ); - declareMonitoredStdContainer("VtxChi2", m_mon_Chi2 , AutoClear ); - -} - -TrigEFMultiMuFex::~TrigEFMultiMuFex() -{ } - -HLT::ErrorCode TrigEFMultiMuFex::hltInitialize() -{ - ATH_MSG_DEBUG("Initialization ..." ); - ATH_MSG_DEBUG("AcceptAll = " << (m_acceptAll==true ? "True" : "False") ); - ATH_MSG_DEBUG("Number of input muons expected = " << m_expectNumberOfInputTE ); - ATH_MSG_DEBUG("Number of muons used for mass = " << m_NMassMuon ); - ATH_MSG_DEBUG("OppositeCharge = " << (m_oppositeCharge==true ? "True" : "False") ); - ATH_MSG_DEBUG("LowerMassCut = " << m_lowerMassCut ); - ATH_MSG_DEBUG("UpperMassCut = " << m_upperMassCut ); - ATH_MSG_DEBUG("check for number of input TEs is " << (m_checkNinputTE!=0 ? "ENABLED" : "DISABLED") ); - - if ( timerSvc() ) { - m_BmmHypTot = addTimer("EFBmmHypTot"); - m_BmmHypVtx = addTimer("EFBmmHypVtxFit"); - } - if (m_muonAlgo != "TrigMuSuperEF" ) { - ATH_MSG_INFO(" Expected algorithm name: TrigMuSuperEF, but got: " << m_muonAlgo ); - return HLT::BAD_JOB_SETUP; - } - - if (m_bphysHelperTool.retrieve().isFailure()) { - ATH_MSG_ERROR("Can't find TrigBphysHelperUtilsTool" ); - return HLT::BAD_JOB_SETUP; - } else { - ATH_MSG_DEBUG("TrigBphysHelperUtilsTool found" ); - } - - - m_lastEvent=-1; - m_lastEventPassed=-1; - m_countTotalEvents=0; - m_countTotalRoI=0; - m_countPassedEvents=0; - m_countPassedRoIs=0; - m_countPassedmumuPairsEv=0; - m_countPassedBsMassEv=0; - m_countPassedVtxFitEv=0; - m_countPassedmumuPairs2R=0; - m_countPassedBsMass2R=0; - m_countPassedVtxFit2R=0; - - return HLT::OK; -} - -HLT::ErrorCode TrigEFMultiMuFex::hltFinalize() -{ - ATH_MSG_INFO("in finalize()" ); - MsgStream log(msgSvc(), name()); - - ATH_MSG_INFO("|----------------------- SUMMARY FROM TrigEFMultiMuFex -------------|" ); - ATH_MSG_INFO("Run on events/2xRoIs " << m_countTotalEvents << "/" << m_countTotalRoI ); - ATH_MSG_INFO("Passed events/2xRoIs " << m_countPassedEvents << "/" << m_countPassedRoIs ); - ATH_MSG_INFO("Passed MuMu pairs:events/2xRoIs " << m_countPassedmumuPairsEv<<"/"<<m_countPassedmumuPairs2R ); - ATH_MSG_INFO("Passed BsMass: events/2xRoIs "<< m_countPassedBsMassEv<<"/"<<m_countPassedBsMass2R); - ATH_MSG_INFO("Passed Vtx Fit: events/2xRoIs "<<m_countPassedVtxFitEv<< "/"<<m_countPassedVtxFit2R); - - return HLT::OK; -} - -// Define the bins for error-monitoring histogram -#define ERROR_No_EventInfo 0 -#define ERROR_WrongNum_Input_TE 1 -#define ERROR_GetMuonFailed 2 -#define ERROR_AddTrack_Fails 3 -#define ERROR_CalcInvMass_Fails 4 -#define ERROR_BphysColl_Fails 5 - -// Define the bins for acceptance-monitoring histogram -#define ACCEPT_Input 0 -#define ACCEPT_GotMuons 1 -#define ACCEPT_InvMass_Cut 2 - -//------------------------------------------------------------------------------------- -HLT::ErrorCode TrigEFMultiMuFex::acceptInputs(HLT::TEConstVec& inputTE, bool& pass) { - - ATH_MSG_DEBUG("Running TrigEFMultiMuFex::acceptInputs"); - m_mon_Acceptance.push_back( ACCEPT_Input ); - - if ( timerSvc() ) m_BmmHypTot->start(); - - // check the right number of inputTEs - if ( m_checkNinputTE != 0 && m_expectNumberOfInputTE != inputTE.size()) { - ATH_MSG_ERROR("Got different than " << m_expectNumberOfInputTE << " number of input TEs, found " << inputTE.size() ); - if ( timerSvc() ) m_BmmHypTot->stop(); - m_mon_Errors.push_back( ERROR_WrongNum_Input_TE ); - return HLT::BAD_JOB_SETUP; - } else { - ATH_MSG_DEBUG("Found Expected " << m_expectNumberOfInputTE << " inputTEs" ); - } - // event info - uint32_t runNumber(0), evtNumber(0), lbBlock(0); - if (m_bphysHelperTool->getRunEvtLb( runNumber, evtNumber, lbBlock).isFailure()) { - ATH_MSG_ERROR("Error retriving EventInfo" ); - m_mon_Errors.push_back( ERROR_No_EventInfo ); - } - - if (evtNumber != m_lastEvent) { - m_countTotalEvents++; - m_lastEvent=evtNumber; - } - m_countTotalRoI++; - - ATH_MSG_DEBUG(" Number of input TEs " << inputTE.size() ); - pass=true; - return HLT::OK; - -} - - -HLT::ErrorCode TrigEFMultiMuFex::hltExecute(HLT::TEConstVec& inputTE , HLT::TriggerElement* outputTE) -{ - ATH_MSG_DEBUG(" In TrigEFMultiMu hltExecute" ); - - xAOD::TrigBphysContainer * xAODTrigBphysColl = new xAOD::TrigBphysContainer; - xAOD::TrigBphysAuxContainer xAODTrigBphysAuxColl; - xAODTrigBphysColl->setStore(&xAODTrigBphysAuxColl); - - if (m_expectNumberOfInputTE==3) { // call the main processing algorithm - ATH_MSG_DEBUG(" Call processTriMuon " ); - processTriMuon(inputTE, *xAODTrigBphysColl); - } - - /* - if(vtxpass) m_countPassedVtxFit2R++; - if(mumuIDpass) m_countPassedmumuPairs2R++; - if (PassedBsMass) m_countPassedBsMass2R++; - m_countPassedRoIs++; - if(IdEvent != m_lastEventPassed) { - m_countPassedEvents++; - m_lastEventPassed = IdEvent; - if(vtxpass) m_countPassedVtxFitEv++; - if(mumuIDpass) m_countPassedmumuPairsEv++; - if (PassedBsMass) m_countPassedBsMassEv++; - } - */ - if ( timerSvc() ) m_BmmHypTot->stop(); - - - if (xAODTrigBphysColl && xAODTrigBphysColl->size()) { - ATH_MSG_DEBUG("REGTEST: Store Bphys Collection size: " << xAODTrigBphysColl->size() ); - - HLT::ErrorCode sc = attachFeature(outputTE, xAODTrigBphysColl, "EFMultiMuFex" ); - if(sc != HLT::OK) { - ATH_MSG_WARNING("Failed to store trigBphys Collection" ); - m_mon_Errors.push_back( ERROR_BphysColl_Fails ); - delete xAODTrigBphysColl; xAODTrigBphysColl = nullptr; // assume deletion responsibility - return HLT::ERROR; - } - } else { - ATH_MSG_DEBUG("REGTEST: no bphys collection to store " ); - delete xAODTrigBphysColl; xAODTrigBphysColl = nullptr; - } - - - return HLT::OK; -} - -void TrigEFMultiMuFex::processTriMuon(HLT::TEConstVec& inputTE, xAOD::TrigBphysContainer & outputContainer) { - ATH_MSG_VERBOSE(" In processTriMuon " ); - typedef ElementLinkVector<xAOD::MuonContainer> ELVMuons; - std::vector<ELVMuons> vec_elv_muons; // for muons, size 3 - - unsigned int nTEs = m_expectNumberOfInputTE; - if( ! m_checkNinputTE ) nTEs = inputTE.size(); - - - for ( unsigned int i=0; i < nTEs; ++i) { - ELVMuons elvmuon; - ATH_MSG_DEBUG("Try to retrieve EFInfo container of muon " << i ); - if(getFeaturesLinks<xAOD::MuonContainer,xAOD::MuonContainer>(inputTE[i], elvmuon)!=HLT::OK ) { - ATH_MSG_DEBUG("Failed to get EFInfo feature of muon " << i << ", exiting" ); - m_mon_Errors.push_back( ERROR_GetMuonFailed ); - return; - } - ATH_MSG_DEBUG("Found MuonContainer, Got MuonEF " << i << " Feature, size = " << elvmuon.size() ); - vec_elv_muons.push_back(elvmuon); - } // loop over each roi - - m_mon_Acceptance.push_back( ACCEPT_GotMuons ); - - if(msgLvl() <= MSG::DEBUG) { - int ic(0); - for ( const auto& muelv : vec_elv_muons) { - // loop over the vector of muon containers - msg() << MSG::DEBUG << "MuonContainer, Got MuonEF " << ic << " Feature, size = " << muelv.size() << endmsg; - int i(0); - for ( const ElementLink<xAOD::MuonContainer> muel: muelv) { - msg() << MSG::DEBUG << "ELLink: " << i++ - << " index: " << muel.index() - << " sgkey: " << muel.dataID() - << " hashkey: "<< muel.key() - << " valid: " << muel.isValid() - << " ptr: " << (muel.isValid() ? *muel : nullptr) - << endmsg; - if (!muel.isValid()) { continue;} - msg() << MSG::DEBUG << "Muon: " << i - << " pt: " << (*muel)->pt() - << " eta: " << (*muel)->eta() - << " phi: " << (*muel)->phi() - << " q: " << (*muel)->charge() - << " mutype: " << (*muel)->muonType() - << " author: " << (*muel)->author() - << " id/ms/cb: " << (*muel)->trackParticle(xAOD::Muon::InnerDetectorTrackParticle) - << " " << (*muel)->trackParticle(xAOD::Muon::MuonSpectrometerTrackParticle) - << " " << (*muel)->trackParticle(xAOD::Muon::CombinedTrackParticle) - << endmsg; - } // for - // http://acode-browser.usatlas.bnl.gov/lxr/source/atlas/Event/xAOD/xAODMuon/xAODMuon/versions/Muon_v1.h - - ++ic; - } // for muons - } // DEBUG - - std::vector<const xAOD::Muon*> uniqueMuons; - // add all the unique muons into a single container - for ( const auto& muelv : vec_elv_muons) { - for ( const ElementLink<xAOD::MuonContainer> muel : muelv ) { - m_bphysHelperTool->addUnique( *muel, uniqueMuons, 0.005,0.005,10,xAOD::Muon::InnerDetectorTrackParticle); - } // loop over muonEL in each roi - } // loop over rois - if ( msgLvl() <= MSG::DEBUG )ATH_MSG_DEBUG("Number of unique muons : " << uniqueMuons.size() ); - - if (m_NMassMuon == 2 && uniqueMuons.size() > 1) { - buildDiMu(uniqueMuons,outputContainer); - } // di-muons - - if (m_NMassMuon == 3 && uniqueMuons.size() > 2) { - buildTriMu(uniqueMuons,outputContainer); - } // tri-muons - - return; -} //processTriMuon - - -void TrigEFMultiMuFex::buildDiMu (const std::vector<const xAOD::Muon*> &muons, xAOD::TrigBphysContainer & outputContainer) { - ATH_MSG_DEBUG(" In TrigEFBMuMu buildDiMu" ); - if (muons.size() < 2) return; - - std::vector<const xAOD::Muon*>::const_iterator muit_end = muons.end(); - std::vector<const xAOD::Muon*>::const_iterator muit1(muons.begin()), muit2(muons.begin()); - - for (;muit1 != muit_end; ++muit1) { - double charge1 = (*muit1)->charge(); - const xAOD::TrackParticle * tp1 = (*muit1)->trackParticle(xAOD::Muon::InnerDetectorTrackParticle); - if (!tp1) continue; - for (muit2=muit1; muit2 != muit_end; ++muit2) { - if (muit2 == muit1) continue; - double charge2 = (*muit2)->charge(); - const xAOD::TrackParticle * tp2 = (*muit2)->trackParticle(xAOD::Muon::InnerDetectorTrackParticle); - if (!tp2) continue; - - if ( (charge1*charge2 > 0) ) { - ATH_MSG_DEBUG("Reject All same charges: " << charge1 << " " << charge2 ); - continue; - } // same sign - double mass = m_bphysHelperTool->invariantMass( {tp1,tp2}, {m_massMuon,m_massMuon} ); - if ( mass < m_lowerMassCut || (m_ApplyupperMassCut && mass > m_upperMassCut) ) { - ATH_MSG_DEBUG("Mass buildDiMu: " << mass << " cut failed " ); - continue; - } else { - ATH_MSG_DEBUG("Mass buildDiMu: " << mass << " cut passed " ); - m_mon_Acceptance.push_back( ACCEPT_InvMass_Cut ); - } - - // create output object - xAOD::TrigBphys * xaodobj = new xAOD::TrigBphys; - outputContainer.push_back(xaodobj); - std::vector<ElementLink<xAOD::TrackParticleContainer> > trksEL = - {(*muit1)->trackParticleLink(xAOD::Muon::InnerDetectorTrackParticle), - (*muit2)->trackParticleLink(xAOD::Muon::InnerDetectorTrackParticle) - }; - - - xaodobj->initialise(0, 0., 0., xAOD::TrigBphys::MULTIMU, mass,xAOD::TrigBphys::EF); - std::vector<double> masses(trksEL.size(),m_massMuon); - if (m_bphysHelperTool->vertexFit(xaodobj,trksEL,masses).isFailure()) { - ATH_MSG_DEBUG("Problems with vertex fit in buildTriMu" ); - } - m_mon_mu1pT.push_back(tp1->p4().Pt()*0.001); - m_mon_mu2pT.push_back(tp2->p4().Pt()*0.001); - //m_mon_pTsum = ((m_mon_mu1pT + m_mon_mu2pT)); // but this isn't declared anywhere? - //m_mon_dEtaMuMu.push_back(m_bphysHelperTool->absDeltaEta(tp1->p4().Eta(),tp2->p4().Eta())); - //m_mon_dPhiMuMu.push_back(m_bphysHelperTool->absDeltaPhi(tp1->p4().Phi(),tp2->p4().Phi())); - m_mon_MuMumass.push_back(mass*0.001); - m_mon_FitMass.push_back(xaodobj->fitmass()*0.001); - m_mon_Chi2.push_back (xaodobj->fitchi2()); - - - - } // muit2 - }//muit1 - - -} // buildDiMu - -void TrigEFMultiMuFex::buildTriMu(const std::vector<const xAOD::Muon*> &muons, xAOD::TrigBphysContainer & outputContainer) { - ATH_MSG_DEBUG(" In TrigEFBMuMu buildTriMu" ); - if (muons.size() < 3) return; - - std::vector<const xAOD::Muon*>::const_iterator muit_end = muons.end(); - std::vector<const xAOD::Muon*>::const_iterator muit1(muons.begin()), muit2(muons.begin()), muit3(muons.begin()); - - for (;muit1 != muit_end; ++muit1) { - double charge1 = (*muit1)->charge(); - const xAOD::TrackParticle * tp1 = (*muit1)->trackParticle(xAOD::Muon::InnerDetectorTrackParticle); - if (!tp1) continue; - for (muit2=muit1; muit2 != muit_end; ++muit2) { - if (muit2 == muit1) continue; - double charge2 = (*muit2)->charge(); - const xAOD::TrackParticle * tp2 = (*muit2)->trackParticle(xAOD::Muon::InnerDetectorTrackParticle); - if (!tp2) continue; - - for (muit3=muit2; muit3 != muit_end; ++muit3) { - if (muit3 == muit2 || muit3 == muit1) continue; - double charge3 = (*muit3)->charge(); - const xAOD::TrackParticle * tp3 = (*muit3)->trackParticle(xAOD::Muon::InnerDetectorTrackParticle); - if (!tp3) continue; - - if ( (charge1*charge2 > 0) && (charge1*charge3 > 0) && (charge2*charge3 > 0) ) { - ATH_MSG_DEBUG("Reject All same charges: " << charge1 << " " << charge2 << " " << charge3 ); - continue; - } // same sign - - double mass = m_bphysHelperTool->invariantMass( {tp1,tp2,tp3}, {m_massMuon,m_massMuon,m_massMuon} ); - if ( mass < m_lowerMassCut || (m_ApplyupperMassCut && mass > m_upperMassCut) ) { - ATH_MSG_DEBUG("Mass buildTriMu: " << mass << " cut failed " ); - continue; - } else { - ATH_MSG_DEBUG("Mass buildTriMu: " << mass << " cut passed " ); - m_mon_Acceptance.push_back( ACCEPT_InvMass_Cut ); - } - - // create output object - xAOD::TrigBphys * xaodobj = new xAOD::TrigBphys; - outputContainer.push_back(xaodobj); - std::vector<ElementLink<xAOD::TrackParticleContainer> > trksEL = - {(*muit1)->trackParticleLink(xAOD::Muon::InnerDetectorTrackParticle), - (*muit2)->trackParticleLink(xAOD::Muon::InnerDetectorTrackParticle), - (*muit3)->trackParticleLink(xAOD::Muon::InnerDetectorTrackParticle) - }; - - - xaodobj->initialise(0, 0., 0., xAOD::TrigBphys::MULTIMU, mass,xAOD::TrigBphys::EF); - std::vector<double> masses(trksEL.size(),m_massMuon); - if (m_bphysHelperTool->vertexFit(xaodobj,trksEL,masses).isFailure()) { - ATH_MSG_DEBUG("Problems with vertex fit in buildTriMu" ); - } - m_bphysHelperTool->fillTrigObjectKinematics(xaodobj,{tp1,tp2,tp3}); - - } // muit3 - } // muit2 - } // muit1 - - -} // buildTriMu diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFMultiMuFex.h b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFMultiMuFex.h deleted file mode 100644 index c782afaccee0ce9c1eccec8059e590917b22cbdd..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFMultiMuFex.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/************************************************************************** - ** - ** File: Trigger/TrigHypothesis/TrigBphysHypo/TrigEFMultiMuFex.h - ** - ** Description: EF hypothesis algorithms for B0_s -> mu+ mu- - ** Currently a dummy algorithm - ** - ** Author: J.Kirk - ** - ** Created: 12.09.07 - ** Modified: - ** - **************************************************************************/ - -#ifndef TRIG_TrigEFMultiMuCombo_H -#define TRIG_TrigEFMultiMuCombo_H - -// standard stuff -#include <string> - -#include "TrigInterfaces/ComboAlgo.h" -#include "xAODMuon/Muon.h" -#include "xAODTrigBphys/TrigBphysContainer.h" - -class TrigBphysHelperUtilsTool; -class TrigTimer; - -class TrigEFMultiMuFex: public HLT::ComboAlgo { - - public: - TrigEFMultiMuFex(const std::string & name, ISvcLocator* pSvcLocator); - ~TrigEFMultiMuFex(); - HLT::ErrorCode hltInitialize(); - HLT::ErrorCode hltFinalize(); - - HLT::ErrorCode acceptInputs(HLT::TEConstVec& inputTE, bool& pass ); - HLT::ErrorCode hltExecute(HLT::TEConstVec& inputTE, HLT::TriggerElement* outputTE); - - private: - - void processTriMuon(HLT::TEConstVec& inputTE, xAOD::TrigBphysContainer & outputContainer); - void buildDiMu (const std::vector<const xAOD::Muon*> &muons, xAOD::TrigBphysContainer & outputContainer); - void buildTriMu(const std::vector<const xAOD::Muon*> &muons, xAOD::TrigBphysContainer & outputContainer); - - ToolHandle <TrigBphysHelperUtilsTool> m_bphysHelperTool; - - - TrigTimer* m_BmmHypTot, *m_BmmHypVtx; - - - unsigned int m_expectNumberOfInputTE; - - // Mass window cuts - bool m_oppositeCharge; - int m_NMassMuon; - float m_lowerMassCut; - float m_upperMassCut; - bool m_ApplyupperMassCut; - bool m_checkNinputTE; - std::string m_muonAlgo; - // to set Accept-All mode: should be done with force-accept when possible - bool m_acceptAll; - - - //Counters - uint32_t m_lastEvent; - uint32_t m_lastEventPassed; - unsigned int m_countTotalEvents; - unsigned int m_countTotalRoI; - unsigned int m_countPassedEvents; - unsigned int m_countPassedRoIs; - unsigned int m_countPassedmumuPairsEv; - unsigned int m_countPassedBsMassEv; - unsigned int m_countPassedVtxFitEv; - unsigned int m_countPassedmumuPairs2R; - unsigned int m_countPassedBsMass2R; - unsigned int m_countPassedVtxFit2R; - - - //Monitored variables - std::vector<int> m_mon_Errors; - std::vector<int> m_mon_Acceptance; - std::vector<float> m_mon_mu1pT; - std::vector<float> m_mon_mu2pT; - std::vector<float> m_mon_MuMumass; - std::vector<float> m_mon_FitMass; - std::vector<float> m_mon_Chi2; - - const double m_massMuon; -}; - - -#endif diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFMultiMuHypo.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFMultiMuHypo.cxx deleted file mode 100644 index 39ec9f87ceee10d48b2b3695a2b55cccd45c1ab0..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFMultiMuHypo.cxx +++ /dev/null @@ -1,253 +0,0 @@ -// -*- C++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/************************************************************************** - ** - ** File: Trigger/TrigHypothesis/TrigBPhysHypo/TrigEFMultiMuHypo.cxx - ** - ** Description: EF hypothesis algorithms for B0_s -> mu+ mu- - ** Dummy algo for now - ** - ** Author: J.Kirk - ** - **************************************************************************/ - -#include "TrigEFMultiMuHypo.h" - -#include "xAODTrigger/TrigPassBits.h" - - -// additions of xAOD objects -#include "xAODEventInfo/EventInfo.h" - -#include "xAODTrigBphys/TrigBphys.h" -#include "xAODTrigBphys/TrigBphysContainer.h" -//#include "xAODTrigBphys/TrigBphysAuxContainer.h" - -class ISvcLocator; - -TrigEFMultiMuHypo::TrigEFMultiMuHypo(const std::string & name, ISvcLocator* pSvcLocator): - HLT::HypoAlgo(name, pSvcLocator) -,m_lastEvent(-1) -,m_lastEventPassed(-1) -,m_countTotalEvents(0) -,m_countTotalRoI(0) -,m_countPassedEvents(0) -,m_countPassedRoIs(0) -,m_countPassedBsMass(0) -,m_countPassedChi2Cut(0) -{ - - // Read cuts - - declareProperty("AcceptAll", m_acceptAll=true); - declareProperty("bphysCollectionKey", m_bphysCollectionKey = "EFMultiMuFex" ); - declareProperty("OppositeSign", m_oppositeCharge=true); - declareProperty("LowerMassCut", m_lowerMassCut=4000.0); - declareProperty("UpperMassCut", m_upperMassCut=6000.0); - declareProperty("ApplyUpperMassCut", m_ApplyupperMassCut=true); - declareProperty("ApplyChi2Cut", m_ApplyChi2Cut=true); - declareProperty("Chi2VtxCut", m_Chi2VtxCut=20.0); - - declareMonitoredVariable("CutCounter", m_mon_cutCounter); - declareMonitoredVariable("MuMumass", m_mon_MuMumass ); - declareMonitoredVariable("FitChi2", m_mon_FitChi2 ); - - -} - -TrigEFMultiMuHypo::~TrigEFMultiMuHypo() -{ } - -HLT::ErrorCode TrigEFMultiMuHypo::hltInitialize() -{ - - ATH_MSG_DEBUG("AcceptAll = " << (m_acceptAll==true ? "True" : "False") ); - ATH_MSG_DEBUG("TrigBphys collection " << m_bphysCollectionKey ); - ATH_MSG_DEBUG("OppositeCharge = " << (m_oppositeCharge==true ? "True" : "False") ); - ATH_MSG_DEBUG("LowerMassCut = " << m_lowerMassCut ); - ATH_MSG_DEBUG("UpperMassCut = " << m_upperMassCut ); - ATH_MSG_DEBUG("ApplyUpperMassCut = " << m_ApplyupperMassCut ); - ATH_MSG_DEBUG("ApplyChi2Cut = " << m_ApplyChi2Cut ); - ATH_MSG_DEBUG("Chi2VtxCut = " << m_Chi2VtxCut ); - - m_lastEvent = -1; - m_lastEventPassed = -1; - m_countTotalEvents =0; - m_countTotalRoI =0; - m_countPassedEvents =0; - m_countPassedRoIs =0; - m_countPassedBsMass =0; - m_countPassedChi2Cut =0; - - return HLT::OK; -} - -HLT::ErrorCode TrigEFMultiMuHypo::hltFinalize() -{ - ATH_MSG_INFO("in finalize()" ); - ATH_MSG_INFO("|----------------------- SUMMARY FROM TrigEFMultiMuHypo -------------|" ); - ATH_MSG_INFO("Run on events/2xRoIs " << m_countTotalEvents << "/" << m_countTotalRoI ); - ATH_MSG_INFO("Passed events/2xRoIs " << m_countPassedEvents << "/" << m_countPassedRoIs ); - ATH_MSG_INFO("RoIs Passed BsMass: " << m_countPassedBsMass ); - ATH_MSG_INFO("RoIs Passed Chi2 cut: " << m_countPassedChi2Cut ); - - return HLT::OK; -} - -//------------------------------------------------------------------------------------- -HLT::ErrorCode TrigEFMultiMuHypo::hltExecute(const HLT::TriggerElement* outputTE, bool& pass) -{ - - bool PassedBsMass=false; - bool PassedChi2Cut=false; - bool result = false; - m_mon_cutCounter = -1; - m_mon_FitChi2 = -1; - m_mon_MuMumass = -1; - // Retrieve event info -// int IdRun = 0; - int IdEvent = 0; - - // JW - Try to get the xAOD event info - const xAOD::EventInfo *evtInfo(0); - if ( store()->retrieve(evtInfo).isFailure() ) { - ATH_MSG_WARNING("Failed to get xAOD::EventInfo " ); - }else { // found the xAOD event info - ATH_MSG_DEBUG(" Run " << evtInfo->runNumber() << " Event " << evtInfo->eventNumber() ); -// IdRun = evtInfo->runNumber(); - IdEvent = evtInfo->eventNumber(); - } // get event ifo - - if (IdEvent != m_lastEvent) { - m_countTotalEvents++; - m_lastEvent=IdEvent; - } - m_countTotalRoI++; - - // Accept-All mode: temporary patch; should be done with force-accept - if (m_acceptAll) { - pass = true; - //return HLT::OK; - } - ATH_MSG_DEBUG("AcceptAll is set to : " << (m_acceptAll ? "True, taking all events " : "False, applying selection" )); - - // create vector for TrigEFBphys particles - const xAOD::TrigBphysContainer* trigBphysColl = 0; - - HLT::ErrorCode status = getFeature(outputTE, trigBphysColl, m_bphysCollectionKey ); - - if ( status != HLT::OK ) { - ATH_MSG_WARNING("Failed to get TrigBphysics collection" ); - return HLT::OK; - } - - ATH_MSG_DEBUG(" Retrieved Bphys collection trigBphysColl = " << trigBphysColl ); - if ( trigBphysColl == 0 ) { - if ( msgLvl() <= MSG::DEBUG ) - ATH_MSG_DEBUG("No Bphys particles to analyse, leaving!" ); - - return HLT::OK; - } - - ATH_MSG_DEBUG("Got TrigBphys collection with " << trigBphysColl->size() << " TrigBphys particles " ); - - // if no Bphys particles were found, just leave TrigBphysColl. empty and leave - if ( trigBphysColl->size() == 0 ) { - ATH_MSG_DEBUG("No Bphys particles to analyse, leaving!" ); - - return HLT::OK; - } - - m_mon_cutCounter = 0; - //TrigPassBits *bits = HLT::makeTrigPassBits(trigBphysColl); - std::unique_ptr<xAOD::TrigPassBits> xBits = xAOD::makeTrigPassBits<xAOD::TrigBphysContainer>(trigBphysColl); - - // now loop over Bphys particles to see if one passes cuts - for (xAOD::TrigBphysContainer::const_iterator bphysIter = trigBphysColl->begin(); bphysIter != trigBphysColl->end(); ++bphysIter) { - - if ((*bphysIter)->particleType() == xAOD::TrigBphys::MULTIMU ) { - ATH_MSG_DEBUG("Got Bphys particle with mass " << (*bphysIter)->mass() << " chi2 : " << (*bphysIter)->fitchi2() ); - - float BsMass = (*bphysIter)->mass(); - bool thisPassedBsMass = (m_lowerMassCut < BsMass && ((BsMass < m_upperMassCut) || (!m_ApplyupperMassCut) )); - // PassedBsMass |= thisPassedBsMass; - bool thisPassedChi2Cut = ((!m_ApplyChi2Cut) || ((*bphysIter)->fitchi2() < m_Chi2VtxCut && (*bphysIter)->fitchi2() >= -1e-10) ); - // PassedChi2Cut |= thisPassedChi2Cut; - if(thisPassedBsMass){ ATH_MSG_DEBUG("Passed mass cut " << BsMass <<" GeV" );} - m_mon_MuMumass = ((BsMass*0.001)); - if(thisPassedChi2Cut){ - ATH_MSG_DEBUG("Apply chi2 cut : " << m_ApplyChi2Cut << " chi2 : " << (*bphysIter)->fitchi2() << " Passed Chi2 cut < "<< m_Chi2VtxCut ); - } - m_mon_FitChi2 = (*bphysIter)->fitchi2(); - if(!thisPassedBsMass && !thisPassedChi2Cut){ - ATH_MSG_DEBUG("Did not pass mass & chi2 cuts < "); - } - if( thisPassedBsMass ) PassedBsMass = true; - if( thisPassedBsMass && thisPassedChi2Cut ) - { - PassedChi2Cut = true; - //HLT::markPassing(bits, *bphysIter, trigBphysColl); - xBits->markPassing((*bphysIter),trigBphysColl,true); - } - - } - - - // JK check tracks, for debugging only - /* - const ElementLinkVector<Rec::TrackParticleContainer> trackVector = (*bphysIter)->trackVector(); - if (trackVector.size() != 0) { - ATH_MSG_DEBUG(" got track vector size: " << trackVector.size() ); - } else { - if(msgLvl() <= MSG::DEBUG)ATH_MSG_DEBUG(" no track vector!!! " ); - } - ElementLinkVector<Rec::TrackParticleContainer>::const_iterator trkIt=trackVector.begin(); - for (int itrk=0 ; trkIt!= trackVector.end(); ++itrk, ++trkIt) { - const Trk::MeasuredPerigee* trackPerigee=(*(*trkIt))->measuredPerigee(); - if(msgLvl() <= MSG::VERBOSE) msg() << MSG::VERBOSE << "track, iterator, pointer " << itrk << " " << *trkIt << " " << *(*trkIt) ); - double phi = trackPerigee->parameters()[Trk::phi]; - double theta = trackPerigee->parameters()[Trk::theta]; - double px = trackPerigee->momentum()[Trk::px]; - double py = trackPerigee->momentum()[Trk::py]; - double pt = sqrt(px*px + py*py); - double eta = -std::log(tan(theta/2)); - - ATH_MSG_DEBUG("track " << itrk << " pt phi eta " << pt << " " << - phi << " " << eta ); - } - */ - // end JK debug printout - } - - - - - if (PassedBsMass) { m_countPassedBsMass++; m_mon_cutCounter++; } - if (PassedChi2Cut) { m_countPassedChi2Cut++; m_mon_cutCounter++; } - if ( PassedBsMass && PassedChi2Cut ) { - result = true; - } - - if (result) { - m_countPassedRoIs++; - if (IdEvent!= m_lastEventPassed) { - m_countPassedEvents++; - m_lastEventPassed=IdEvent; - } - pass=true; - ATH_MSG_DEBUG(" accepting event" ); - } - - // store result - //if ( attachBits(outputTE, bits) != HLT::OK ) { - // ATH_MSG_ERROR("Problem attaching TrigPassBits! " ); - //} - if(attachFeature(outputTE, xBits.release(),"passbits") != HLT::OK) - ATH_MSG_ERROR("Could not store TrigPassBits! "); - - return HLT::OK; -} diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFMultiMuHypo.h b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFMultiMuHypo.h deleted file mode 100644 index afa7bd675390b6a3d4a5bb6326527f21e3caf589..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFMultiMuHypo.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/************************************************************************** - ** - ** File: Trigger/TrigHypothesis/TrigBphysHypo/TrigEFMultiMuHypo.h - ** - ** Description: EF hypothesis algorithms for 3 and 4 mu - ** currently a dummy algorithm - ** - ** Author: J.Kirk - ** - ** Created: 12.09.07 - ** Modified: - ** - **************************************************************************/ - -#ifndef TRIG_TrigEFMultiMuHypo_H -#define TRIG_TrigEFMultiMuHypo_H - -// standard stuff -#include <string> -// general athena stuff -#include "TrigInterfaces/HypoAlgo.h" - - -class TrigEFMultiMuHypo: public HLT::HypoAlgo { - - public: - TrigEFMultiMuHypo(const std::string & name, ISvcLocator* pSvcLocator); - ~TrigEFMultiMuHypo(); - HLT::ErrorCode hltInitialize(); - //StatusCode execute(); - HLT::ErrorCode hltFinalize(); - HLT::ErrorCode hltExecute(const HLT::TriggerElement* outputTE, bool& pass); - - private: - - - // Mass window cuts - bool m_oppositeCharge; - float m_lowerMassCut; - float m_upperMassCut; - bool m_ApplyupperMassCut; - bool m_ApplyChi2Cut; - float m_Chi2VtxCut; - - // to set Accept-All mode: should be done with force-accept when possible - bool m_acceptAll; - std::string m_bphysCollectionKey; - - - //Counters - int m_lastEvent; - int m_lastEventPassed; - unsigned int m_countTotalEvents; - unsigned int m_countTotalRoI; - unsigned int m_countPassedEvents; - unsigned int m_countPassedRoIs; - unsigned int m_countPassedBsMass; - unsigned int m_countPassedChi2Cut; - - - int m_mon_cutCounter; - double m_mon_MuMumass; - double m_mon_FitChi2; - -}; - -#endif diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFTrkMassFex.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFTrkMassFex.cxx deleted file mode 100644 index 1005ddeae15383108c69e6edea0a102372d4f10c..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFTrkMassFex.cxx +++ /dev/null @@ -1,702 +0,0 @@ -/* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -*/ - -// ******************************************************************** -// -// NAME: TrigEFTrkMassFex.cxx -// PACKAGE: Trigger/TrigHypothesis/TrigBphysHypo -// author : Julie Kirk -// ******************************************************************** - -#include "TrigEFTrkMassFex.h" -#include "TrigBphysHelperUtilsTool.h" - -#include "xAODTrigBphys/TrigBphysAuxContainer.h" -// additions of xAOD objects -#include "xAODMuon/MuonContainer.h" - -#include <math.h> - -#include "TrigSteeringEvent/TrigRoiDescriptor.h" -#include "CLHEP/Units/SystemOfUnits.h" - -#include "CLHEP/GenericFunctions/CumulativeChiSquare.hh" -#include "TrigTimeAlgs/TrigTimer.h" // for TrigTimer - -class ISvcLocator; - -using namespace std; - -/*------------------------------------------------------------------------------------*/ -TrigEFTrkMassFex::TrigEFTrkMassFex(const std::string & name, ISvcLocator* pSvcLocator): -HLT::FexAlgo(name, pSvcLocator) -,m_bphysHelperTool("TrigBphysHelperUtilsTool") -,m_TotTimer(0) -,m_VtxFitTimer(0) -/*------------------------------------------------------------------------------------*/ -{ - - // Read cuts - declareProperty( "AcceptAll", m_acceptAll = false ); - declareProperty( "OppositeCharge", m_oppositeCharge = true ); - declareProperty("MuonPTthr", m_muonPtthr=4.); - declareProperty("TrackPTthr", m_trackPtthr=1.4); - declareProperty("dEtaTrackRoI", m_dEta_cut=0.1); - declareProperty("dPhiTrackRoI", m_dPhi_cut=0.1); - declareProperty("DaughterMass", m_daughterMass=105.6583715); - declareProperty("Mass_low_cut", m_mass_low_cut=0.); - declareProperty("Mass_high_cut", m_mass_high_cut=0.); - declareProperty("doVertexFit", m_doVertexFit=true); - - // Input list of tracks for second leg - declareProperty("TrackCollection",m_input_trackCollectionKey="InDetTrigTrackingxAODCnv_Bphysics_IDTrig"); - - - // Variables for monitoring histograms - declareMonitoredStdContainer("Errors" , m_mon_Errors , AutoClear); - declareMonitoredStdContainer("Acceptance" , m_mon_Acceptance , AutoClear); - declareMonitoredStdContainer("ROIEta" , m_mon_ROIEta , AutoClear); - declareMonitoredStdContainer("ROIPhi" , m_mon_ROIPhi , AutoClear); - declareMonitoredVariable( "nTracks" , m_mon_nTracks ); - declareMonitoredStdContainer("TrkPt" , m_mon_TrkPt , AutoClear); - declareMonitoredStdContainer("TrkPt_wideRange" , m_mon_TrkPt , AutoClear); - declareMonitoredStdContainer("TrkEta" , m_mon_TrkEta , AutoClear); - declareMonitoredStdContainer("TrkPhi" , m_mon_TrkPhi , AutoClear); - declareMonitoredStdContainer("TrkROIdEta" , m_mon_TrkROIdEta , AutoClear); - declareMonitoredStdContainer("TrkROIdPhi" , m_mon_TrkROIdPhi , AutoClear); - declareMonitoredStdContainer("TrkROIdR" , m_mon_TrkROIdR , AutoClear); - declareMonitoredStdContainer("InvMassNoTrkPtCut", m_mon_InvMassNoTrkPtCut , AutoClear); - declareMonitoredStdContainer("InvMassNoTrkPtCut_wideRange", m_mon_InvMassNoTrkPtCut_wideRange , AutoClear); - declareMonitoredStdContainer("InvMass" , m_mon_InvMass , AutoClear); - declareMonitoredStdContainer("InvMass_wideRange", m_mon_InvMass_wideRange , AutoClear); - declareMonitoredStdContainer("Trk1Pt" , m_mon_Trk1Pt , AutoClear); - declareMonitoredStdContainer("Trk2Pt" , m_mon_Trk2Pt , AutoClear); - declareMonitoredStdContainer("Trk1Eta" , m_mon_Trk1Eta , AutoClear); - declareMonitoredStdContainer("Trk2Eta" , m_mon_Trk2Eta , AutoClear); - declareMonitoredStdContainer("Trk1Phi" , m_mon_Trk1Phi , AutoClear); - declareMonitoredStdContainer("Trk2Phi" , m_mon_Trk2Phi , AutoClear); - declareMonitoredStdContainer("Trk1Trk2dR" , m_mon_Trk1Trk2dR , AutoClear); - declareMonitoredStdContainer("Trk1Trk2dEta" , m_mon_Trk1Trk2dEta , AutoClear); - declareMonitoredStdContainer("Trk1Trk2dPhi" , m_mon_Trk1Trk2dPhi , AutoClear); - declareMonitoredStdContainer("SumPtTrk12" , m_mon_SumPtTrk12 , AutoClear); - declareMonitoredStdContainer("FitMass" , m_mon_FitMass , AutoClear); - declareMonitoredStdContainer("FitMass_wideRange", m_mon_FitMass , AutoClear); - declareMonitoredStdContainer("InvMass_okFit" , m_mon_InvMass_okFit , AutoClear); - declareMonitoredStdContainer("Chi2toNDoF" , m_mon_Chi2toNDoF , AutoClear); - declareMonitoredStdContainer("Chi2toNDoFProb" , m_mon_Chi2toNDoFProb , AutoClear); - declareMonitoredStdContainer("FitTotalPt" , m_mon_FitTotalPt , AutoClear); - declareMonitoredStdContainer("SumPtTrk12_okFit" , m_mon_SumPtTrk12_okFit , AutoClear); - declareMonitoredStdContainer("FitVtxR" , m_mon_FitVtxR , AutoClear); - declareMonitoredStdContainer("FitVtxZ" , m_mon_FitVtxZ , AutoClear); - declareMonitoredVariable( "nBphys" , m_mon_nBphys ); - declareMonitoredVariable( "TotalRunTime" , m_mon_TotalRunTime ); - declareMonitoredVariable( "VertexingTime" , m_mon_VertexingTime ); - - // zero counters - m_lastEvent = 999; - m_lastEventPassed = 999; - m_countTotalEvents=0; - m_countTotalRoI=0; - m_countPassedEvents=0; - m_countPassedRoIs=0; - m_countPassedRoIMatch=0; - m_countPassedMass=0; - -} - -/*-------------------------------------------*/ -TrigEFTrkMassFex::~TrigEFTrkMassFex() -/*-------------------------------------------*/ -{} - -/*-------------------------------------------*/ -HLT::ErrorCode TrigEFTrkMassFex::hltInitialize() -/*-------------------------------------------*/ -{ - - if (m_bphysHelperTool.retrieve().isFailure()) { - ATH_MSG_ERROR("Can't find TrigBphysHelperUtilsTool" ); - return HLT::BAD_JOB_SETUP; - } else { - ATH_MSG_DEBUG("TrigBphysHelperUtilsTool found" ); - } - - - ATH_MSG_INFO("AcceptAll = "<< (m_acceptAll==true ? "True" : "False") ); - ATH_MSG_INFO("Apply opposite sign cut = " << (m_oppositeCharge==true ? "True" : "False") ); - ATH_MSG_INFO("Muon pT cut " << m_muonPtthr ); - ATH_MSG_INFO("Track pT cut " << m_trackPtthr ); - ATH_MSG_INFO("Track-RoI match cuts: dEta<" << m_dEta_cut << " dPhi<" << m_dPhi_cut ); - ATH_MSG_INFO("Mass cuts :" << m_mass_low_cut << " to " << m_mass_high_cut ); - ATH_MSG_INFO("Daughter mass:" << m_daughterMass ); - ATH_MSG_INFO("Initialization completed successfully"); - - // add timers - if ( timerSvc() ) { - m_TotTimer = addTimer("EFTrkMassTot"); - m_VtxFitTimer = addTimer("EFTrkMassVFit"); - } - return HLT::OK; -} - - -/*-------------------------------------------*/ -HLT::ErrorCode TrigEFTrkMassFex::hltFinalize() -/*-------------------------------------------*/ -{ - ATH_MSG_INFO("|----------------------- SUMMARY FROM TrigEFTrkMassFex -------------|" ); - ATH_MSG_INFO("in finalize()" ); - ATH_MSG_INFO("Run on events/RoIs " << m_countTotalEvents << "/" << m_countTotalRoI ); - ATH_MSG_INFO("Passed events/RoIs " << m_countPassedEvents << "/" << m_countPassedRoIs ); - ATH_MSG_INFO("Passed RoI match " << m_countPassedRoIMatch ); - ATH_MSG_INFO("Passed mass cuts " << m_countPassedMass ); - - return HLT::OK; -} - -// Define the bins for error-monitoring histogram -#define ERROR_No_EventInfo 0 -#define ERROR_No_RoI 1 -#define ERROR_No_TrackColl 2 -#define ERROR_No_Muon 3 -#define ERROR_Empty_TrackColl 4 -#define ERROR_More_TrackColl 5 -#define ERROR_AddTrack_Fails 6 -#define ERROR_Unique_AddTrack_Fails 7 -#define ERROR_CalcInvMass_Fails 8 -#define ERROR_CalcMother_Fails 9 -#define ERROR_CalcMassPull_Fails 10 -#define ERROR_BphysColl_Fails 11 - -// Define the bins for acceptance-monitoring histogram -#define ACCEPT_Input 0 -#define ACCEPT_AcceptAll 1 -#define ACCEPT_Got_RoI 2 -#define ACCEPT_Got_TrackColl 3 -#define ACCEPT_Full_TrackColl 4 -#define ACCEPT_Single_TrackColl 5 -#define ACCEPT_Full_IDTracks 6 -#define ACCEPT_Mu1_Chi2_Cut 7 -#define ACCEPT_Mu1_pT_Cut 8 -#define ACCEPT_Mu1_Chi2Pt_Cut 9 -#define ACCEPT_Mu1_dEta_Cut 10 -#define ACCEPT_Mu1_dPhi_Cut 11 -#define ACCEPT_Mu1_dR_Cut 12 -#define ACCEPT_Mu2_Chi2_Cut 13 -#define ACCEPT_Mu2_pT_Cut 14 -#define ACCEPT_Mu2_Chi2Pt_Cut 15 -#define ACCEPT_Opp_Charge 16 -#define ACCEPT_InvMass_Cut 17 -#define ACCEPT_AddTrack_Test 18 -#define ACCEPT_Vertexing 19 -#define ACCEPT_CalcInvMass 20 -#define ACCEPT_CalcMother 21 -#define ACCEPT_Vertex_not_NULL 22 -// Separator 23 -#define ACCEPT_BphysColl_not_Empty 24 -// Separator 25 -#define ACCEPT_Each_Mu1_Chi2_Cut 26 -#define ACCEPT_Each_Mu1_pT_Cut 27 -#define ACCEPT_Each_Mu1_Chi2Pt_Cut 28 -#define ACCEPT_Each_Mu1_dEta_Cut 29 -#define ACCEPT_Each_Mu1_dPhi_Cut 30 -#define ACCEPT_Each_Mu1_dR_Cut 31 -// Separator 32 -#define ACCEPT_Each_Mu2_Chi2_Cut 33 -#define ACCEPT_Each_Mu2_pT_Cut 34 -#define ACCEPT_Each_Mu2_Chi2Pt_Cut 35 -#define ACCEPT_Each_Opp_Charge 36 -#define ACCEPT_Each_InvMass_Cut 37 -#define ACCEPT_Each_AddTrack_Test 38 -#define ACCEPT_Each_Vertexing 39 -#define ACCEPT_Each_CalcInvMass 40 -#define ACCEPT_Each_CalcMother 41 -#define ACCEPT_Each_Vertex_not_NULL 42 - -/*--------------------------------------------------------------*/ -HLT::ErrorCode TrigEFTrkMassFex::hltExecute(const HLT::TriggerElement* inputTE , HLT::TriggerElement* outputTE) -/*--------------------------------------------------------------*/ -{ - ATH_MSG_DEBUG(" In EF B tag and probe FEX hltExecute" ); - - xAOD::TrigBphysContainer * xAODTrigBphysColl = new xAOD::TrigBphysContainer; - xAOD::TrigBphysAuxContainer xAODTrigBphysAuxColl; - xAODTrigBphysColl->setStore(&xAODTrigBphysAuxColl); - - bool result = false; - //bool PassedRoIMatch=false; - //bool PassedMass=false; - // Processing timers - if ( timerSvc() ) m_TotTimer->start(); - // Initialize the monitoring variables - m_mon_nTracks = -1; - m_mon_nBphys = 0; - m_mon_TotalRunTime = 0; - m_mon_VertexingTime = 0; - - m_mon_Acceptance.push_back( ACCEPT_Input ); - - // event info - uint32_t runNumber(0), evtNumber(0), lbBlock(0); - if (m_bphysHelperTool->getRunEvtLb( runNumber, evtNumber, lbBlock).isFailure()) { - ATH_MSG_ERROR("Error retriving EventInfo" ); - } - - // Accept-All mode: temporary patch; should be done with force-accept - if (m_acceptAll) { - ATH_MSG_DEBUG("AcceptAll property is set: taking all events" ); - m_mon_Acceptance.push_back( ACCEPT_AcceptAll ); - result = true; - } - else { - ATH_MSG_DEBUG("AcceptAll property not set: applying selection" ); - result=false; - } // accept all - - // get RoI descriptor - const TrigRoiDescriptor* roiDescriptor = 0; - if (getFeature(outputTE, roiDescriptor, "initialRoI") != HLT::OK) roiDescriptor = 0; - - if ( !roiDescriptor ) { - ATH_MSG_WARNING("No RoI for this Trigger Element! " ); - if ( timerSvc() ) m_TotTimer->stop(); - m_mon_Errors.push_back( ERROR_No_RoI ); - return HLT::NAV_ERROR; - } - m_mon_Acceptance.push_back( ACCEPT_Got_RoI ); - - ATH_MSG_DEBUG("Using TE("<< outputTE <<")->getId(): " << outputTE->getId() << "; RoI ID = " << roiDescriptor->roiId() - << ": Eta = " << roiDescriptor->eta() << ", Phi = " << roiDescriptor->phi()); - - // RoI monitoring - m_mon_ROIEta.push_back( roiDescriptor->eta() ); - m_mon_ROIPhi.push_back( roiDescriptor->phi() ); - if (evtNumber != m_lastEvent) { - m_countTotalEvents++; - m_lastEvent=evtNumber; - } - m_countTotalRoI++; - - typedef ElementLinkVector<xAOD::MuonContainer> ELVMuons; - typedef ElementLinkVector<xAOD::TrackParticleContainer> ELVTrackParticles; - - - // get the muons - ELVMuons elvmuon; - ATH_MSG_DEBUG("Try to retrieve EFInfo container of muons " ); - if(getFeaturesLinks<xAOD::MuonContainer,xAOD::MuonContainer>(outputTE, elvmuon)!=HLT::OK ) { - ATH_MSG_DEBUG("Failed to get EFInfo feature of muon, exiting" ); - m_mon_Errors.push_back( ERROR_No_Muon ); - if ( timerSvc() ) m_TotTimer->stop(); - return HLT::MISSING_FEATURE; // was HLT::OK - } - if(msgLvl() <= MSG::DEBUG) { // print debug - msg() << MSG::DEBUG << "Found MuonContainer, Got MuonEF size = " << elvmuon.size() << endmsg; - for ( const ElementLink<xAOD::MuonContainer> muel: elvmuon) { - msg() << MSG::DEBUG << "ELLink: " - << " index: " << muel.index() - << " sgkey: " << muel.dataID() - << " hashkey: "<< muel.key() - << " valid: " << muel.isValid() - << " ptr: " << (muel.isValid() ? *muel : nullptr) - << endmsg; - } - for ( const ElementLink<xAOD::MuonContainer> muel: elvmuon) { - if (!muel.isValid()) continue; - msg() << MSG::DEBUG << "Muon: " - << " pt: " << (*muel)->pt() - << " eta: " << (*muel)->eta() - << " phi: " << (*muel)->phi() - << " q: " << (*muel)->charge() - << " mutype: " << (*muel)->muonType() - << " author: " << (*muel)->author() - << " id/ms/cb: " << (*muel)->trackParticle(xAOD::Muon::InnerDetectorTrackParticle) - << " " << (*muel)->trackParticle(xAOD::Muon::MuonSpectrometerTrackParticle) - << " " << (*muel)->trackParticle(xAOD::Muon::CombinedTrackParticle) - << endmsg; - } // for - } // if debug - - // do some muon collections check to see that the ELVs do the same as the vec collections - std::vector<const xAOD::MuonContainer*> MuEFTracks; - if ( getFeatures(inputTE, MuEFTracks) != HLT::OK ) { - ATH_MSG_DEBUG("Failed to get EFInfo feature, exiting" ); - return HLT::OK; - } - ATH_MSG_DEBUG("Get muon vec collections of size: " << MuEFTracks.size() ); - for (const auto mucol : MuEFTracks) { - if (!mucol) continue; - ATH_MSG_DEBUG("This muon collection has: " << mucol->size() << " muons " ); - } - - // now get the tracks - ELVTrackParticles elvtps; - ATH_MSG_DEBUG("Try to retrieve TrackParticleContainers " ); - //if(getFeaturesLinks<xAOD::TrackParticleContainer,xAOD::TrackParticleContainer>(outputTE, elvtps)!=HLT::OK ) { - if(getFeaturesLinks<xAOD::TrackParticleContainer,xAOD::TrackParticleContainer>(inputTE, elvtps,m_input_trackCollectionKey)!=HLT::OK ) { - ATH_MSG_DEBUG("Failed to get TrackParticleContainers feature, exiting" ); - if ( timerSvc() ) m_TotTimer->stop(); - m_mon_Errors.push_back( ERROR_No_TrackColl ); - return HLT::MISSING_FEATURE; // was HLT::OK - } - - if(msgLvl() <= MSG::DEBUG) { // print debug - msg() << MSG::DEBUG << "Found TrackParticleContainer, size: " << elvtps.size() << endmsg; - for ( const ElementLink<xAOD::TrackParticleContainer> eltp: elvtps) { - msg() << MSG::DEBUG << "ELLink: " - << " index: " << eltp.index() - << " sgkey: " << eltp.dataID() - << " hashkey: "<< eltp.key() - << " valid: " << eltp.isValid() - << " ptr: " << (eltp.isValid() ? *eltp : nullptr) - << endmsg; - } - } // if debug - - m_mon_Acceptance.push_back( ACCEPT_Got_TrackColl ); - if (elvtps.size() == 0) { - if ( timerSvc() ) m_TotTimer->stop(); - m_mon_Errors.push_back( ERROR_Empty_TrackColl ); - return HLT::OK; - } - m_mon_Acceptance.push_back( ACCEPT_Full_TrackColl ); - - - // Loop over tracks (Particles) - ATH_MSG_DEBUG(" Now loop over tracks " ); - if (elvtps.size() > 0 ) m_mon_Acceptance.push_back( ACCEPT_Full_IDTracks ); - m_mon_nTracks = elvtps.size(); - - // Boolean flags indicating what stages were already reached (for monitoring purposes) - m_flag_stages.resize(43,false); // should set the size the first time, and reinitiallise on all others - // On second and subsequent pases, need to force to false. - std::fill(m_flag_stages.begin(), m_flag_stages.end(), false); - - // Prepare the vertexing timer - if ( timerSvc() ) { - m_VtxFitTimer->start(); - m_VtxFitTimer->pause(); // resume it only for the vertexing periods - } - - - // combine track from muon with track from id - //#FIXME - remember to implement the scenario of (tracks matched to roi + tracks) - std::vector<ElementLink<xAOD::MuonContainer> > muons; - std::vector<ElementLink<xAOD::TrackParticleContainer> > tracks; - for (const ElementLink<xAOD::MuonContainer> muel: elvmuon) { - if (!muel.isValid()) continue; - const xAOD::TrackParticle * mutrk = (*muel)->trackParticle(xAOD::Muon::InnerDetectorTrackParticle); - if (!mutrk) continue; - if (mutrk->definingParametersCovMatrixVec().size() == 0) { - ATH_MSG_INFO("mu track has no ParametersCovMatrix - will reject" ); - //#FIXME add monitoring flags here - continue; - } - - double pT = mutrk->pt(); - float trackChi2 = mutrk->chiSquared(); - //double eta = mutrk->eta() ; - //double phi = mutrk->phi() ; - - if ( fabs(pT) >= m_muonPtthr ) { - if ( !m_flag_stages[ ACCEPT_Mu1_pT_Cut ] ) { - m_mon_Acceptance.push_back( ACCEPT_Mu1_pT_Cut ); - m_flag_stages[ ACCEPT_Mu1_pT_Cut ] = true; - } - m_mon_Acceptance.push_back( ACCEPT_Each_Mu1_pT_Cut ); - } else { - ATH_MSG_VERBOSE("Muon fails pT cut " <<mutrk << " pT = " << pT ); - } // threshold - if ( trackChi2 <= 1e7 ) { - if ( !m_flag_stages[ ACCEPT_Mu1_Chi2_Cut ] ) { - m_mon_Acceptance.push_back( ACCEPT_Mu1_Chi2_Cut ); - m_flag_stages[ACCEPT_Mu1_Chi2_Cut] = true; - } - m_mon_Acceptance.push_back( ACCEPT_Each_Mu1_Chi2_Cut ); - } else { - ATH_MSG_VERBOSE("Track fails chi2 cut "<<mutrk << " chi2 = " << trackChi2 ); - } - if ( fabs(pT) <m_muonPtthr || trackChi2 > 1e7 ) continue; - // Check pT+chi2 (monitoring only) - if ( !m_flag_stages[ ACCEPT_Mu1_Chi2Pt_Cut ] ) { - m_mon_Acceptance.push_back( ACCEPT_Mu1_Chi2Pt_Cut ); - m_flag_stages[ACCEPT_Mu1_Chi2Pt_Cut] = true; - } - m_mon_Acceptance.push_back( ACCEPT_Each_Mu1_Chi2Pt_Cut ); - - muons.push_back(muel); - } // optimize? addUnique? - for (const ElementLink<xAOD::TrackParticleContainer> trkel: elvtps) { - const xAOD::TrackParticle * trk = *trkel; - if (!trk) continue; - if (trk->definingParametersCovMatrixVec().size() == 0) { - ATH_MSG_INFO("track has no ParametersCovMatrix - will reject" ); - //#FIXME add monitoring flags here - continue; - } - - - double pT2 = trk->pt(); - float track2Chi2 = trk->chiSquared(); - double eta2 = trk->eta() ; - double phi2 = trk->phi() ; - - if ( track2Chi2 <= 1e7 ) { - if ( !m_flag_stages[ ACCEPT_Mu2_Chi2_Cut ] ) { - m_mon_Acceptance.push_back( ACCEPT_Mu2_Chi2_Cut ); - m_flag_stages[ ACCEPT_Mu2_Chi2_Cut ] = true; - } - m_mon_Acceptance.push_back( ACCEPT_Each_Mu2_Chi2_Cut ); - } - if ( pT2 >= m_trackPtthr ) { - if ( !m_flag_stages[ ACCEPT_Mu2_pT_Cut ] ) { - m_mon_Acceptance.push_back( ACCEPT_Mu2_pT_Cut ); - m_flag_stages[ ACCEPT_Mu2_pT_Cut ] = true; - } - m_mon_Acceptance.push_back( ACCEPT_Each_Mu2_pT_Cut ); - } - - m_mon_TrkPt.push_back(pT2*0.001); - m_mon_TrkEta.push_back(eta2); - m_mon_TrkPhi.push_back(phi2); - - m_mon_TrkROIdEta.push_back( m_bphysHelperTool->absDeltaEta(eta2, roiDescriptor->eta()) ); - m_mon_TrkROIdPhi.push_back( m_bphysHelperTool->absDeltaPhi(phi2, roiDescriptor->phi()) ); - m_mon_TrkROIdR.push_back( m_bphysHelperTool->deltaR(eta2,phi2, roiDescriptor->eta(),roiDescriptor->phi()) ); - - tracks.push_back(trkel); - }// optimize? addUnique? - - buildMuTrkPairs(roiDescriptor,muons,tracks,*xAODTrigBphysColl); // make pairs of objects and add to output - - if (xAODTrigBphysColl->size()) result = true; - - // Reach this point successfully - ATH_MSG_DEBUG("Run: " << runNumber << " Event: " << evtNumber << " result is " << result ); - // Stop the processing timers - if ( timerSvc() ) { - m_TotTimer ->stop(); - m_VtxFitTimer->resume(); - m_VtxFitTimer->stop(); - // Fill the monitoring variables - m_mon_TotalRunTime = m_TotTimer ->elapsed(); - m_mon_VertexingTime = m_VtxFitTimer->elapsed(); - } - - if (/*xAODTrigBphysColl &&*/ xAODTrigBphysColl->size()) { - ATH_MSG_DEBUG("REGTEST: Store Bphys Collection size: " << xAODTrigBphysColl->size() ); - - HLT::ErrorCode sc = attachFeature(outputTE, xAODTrigBphysColl, "EFTrackMass" ); - if(sc != HLT::OK) { - ATH_MSG_WARNING("Failed to store trigBphys Collection" ); - delete xAODTrigBphysColl; xAODTrigBphysColl = nullptr; // assume deletion responsibility - return HLT::ERROR; - } - } else { - ATH_MSG_DEBUG("REGTEST: no bphys collection to store " ); - delete xAODTrigBphysColl; xAODTrigBphysColl = nullptr; - } - - return HLT::OK; -} - - -void TrigEFTrkMassFex::buildMuTrkPairs(const TrigRoiDescriptor * roi, - const std::vector<ElementLink<xAOD::MuonContainer> > & muons, - const std::vector<ElementLink< xAOD::TrackParticleContainer> > & tracks, - xAOD::TrigBphysContainer & physcontainer) { - if (!roi) { - ATH_MSG_DEBUG("null roi ptr"); - return; - } - if (!muons.size()) { - ATH_MSG_DEBUG("No Muons in buildTrkPairs"); - return; - } - if (!tracks.size()) { - ATH_MSG_DEBUG("No tracks in buildTrkPairs"); - return; - } - - for (const auto& muel: muons) { - if (!muel.isValid()) continue; - const xAOD::Muon * muon = *muel; - if (!muon) continue; - const xAOD::TrackParticle * mutrk = muon->trackParticle(xAOD::Muon::InnerDetectorTrackParticle); - const ElementLink<xAOD::TrackParticleContainer> & mutrkel = muon->trackParticleLink(xAOD::Muon::InnerDetectorTrackParticle); - if (!mutrk) continue; - - for (const auto& trkel: tracks) { - if (!trkel.isValid()) continue; - const xAOD::TrackParticle * trk = *trkel; - if (!trk) continue; - - if (trk->definingParametersCovMatrixVec().size() == 0) { - ATH_MSG_INFO("track has no ParametersCovMatrix - will reject" ); - //#FIXME add monitoring flags here - continue; - } - - // compare the two tps, make sure unique - if (!m_bphysHelperTool->areUnique(mutrk,trk,0.005,0.005,10)) { - ATH_MSG_DEBUG("Trk and MuTrk match, continue"); - } - - double charge1 = mutrk->charge(); - double charge2 = trk ->charge(); - - double pT1 = mutrk->pt(); - double pT2 = trk->pt(); - //float track1Chi2 = mutrk->chiSquared(); - float track2Chi2 = trk->chiSquared(); - double eta1 = mutrk->eta() ; - double eta2 = trk->eta() ; - double phi1 = mutrk->phi() ; - double phi2 = trk->phi() ; - - std::vector<const xAOD::TrackParticle*> inputtrks; - std::vector<double> massHypo ; - inputtrks.push_back(mutrk); - inputtrks.push_back(trk); - massHypo.push_back( m_daughterMass ); - massHypo.push_back( m_daughterMass ); - - double Mass = m_bphysHelperTool->invariantMass(mutrk,trk,m_daughterMass,m_daughterMass); - - if ( track2Chi2 <= 1e7 ) { - if ( pT2 > 2e3 ) { // updated the hard coded value to GeV, rather than MeV - m_mon_InvMassNoTrkPtCut.push_back( Mass / CLHEP::GeV ); - m_mon_InvMassNoTrkPtCut_wideRange.push_back( Mass / CLHEP::GeV ); - } - } // If good track - - // check Pt and chi2 - if( pT2 < m_trackPtthr || track2Chi2 > 1e7) continue; - if ( !m_flag_stages[ ACCEPT_Mu2_Chi2Pt_Cut ] ) { - m_mon_Acceptance.push_back( ACCEPT_Mu2_Chi2Pt_Cut ); - m_flag_stages[ ACCEPT_Mu2_Chi2Pt_Cut ] = true; - } - m_mon_Acceptance.push_back( ACCEPT_Each_Mu2_Chi2Pt_Cut ); - - if (m_oppositeCharge) { - if ( charge1 * charge2 > 0) { - ATH_MSG_DEBUG("Fail opp charge reqirement." << charge1 << " " << charge2); - continue; - } else {// same q - ATH_MSG_DEBUG("Passes opp charge reqirement." << charge1 << " " << charge2); - } - } else {// apply opp charge cut - ATH_MSG_VERBOSE("opposite sign cuts not applied, make mass cuts " ); - } - if ( !m_flag_stages[ ACCEPT_Opp_Charge ] ) { - m_mon_Acceptance.push_back( ACCEPT_Opp_Charge ); - m_flag_stages[ ACCEPT_Opp_Charge ] = true; - } - m_mon_Acceptance.push_back( ACCEPT_Each_Opp_Charge ); - - - // Check the invariant mass cut - if (Mass < m_mass_low_cut || Mass > m_mass_high_cut){ - ATH_MSG_DEBUG("Fail mass cuts: " << Mass ); - continue; - } else { - ATH_MSG_DEBUG("Passes Mass cut " << Mass ); - } - if ( !m_flag_stages[ ACCEPT_InvMass_Cut ] ) { - m_mon_Acceptance.push_back( ACCEPT_InvMass_Cut ); - m_flag_stages[ ACCEPT_InvMass_Cut ] = true; - } - m_mon_Acceptance.push_back( ACCEPT_Each_InvMass_Cut ); - m_mon_InvMass.push_back( Mass / CLHEP::GeV ); - m_mon_InvMass_wideRange.push_back( Mass / CLHEP::GeV ); - - // Monitoring of the di-muon track pairs - m_mon_Trk1Pt .push_back( pT1 / CLHEP::GeV ); - m_mon_Trk2Pt .push_back( pT2 / CLHEP::GeV ); - m_mon_Trk1Eta.push_back( eta1 ); - m_mon_Trk2Eta.push_back( eta2 ); - m_mon_Trk1Phi.push_back( phi1 ); - m_mon_Trk2Phi.push_back( phi2 ); - m_mon_SumPtTrk12.push_back ( (pT1 + pT2) / CLHEP::GeV ); - - m_mon_Trk1Trk2dEta.push_back( m_bphysHelperTool->absDeltaEta(eta1,eta2) ); - m_mon_Trk1Trk2dPhi.push_back( m_bphysHelperTool->absDeltaPhi(phi1,phi2) ); - m_mon_Trk1Trk2dR .push_back( m_bphysHelperTool->deltaR(eta1,phi1,eta2,phi2) ); - - // got to here - add object to container - xAOD::TrigBphys* xaodObj = new xAOD::TrigBphys(); - physcontainer.push_back( xaodObj ); - xaodObj->initialise(roi->roiId(), 0.,0.,0., - xAOD::TrigBphys::JPSIMUMU, Mass, xAOD::TrigBphys::EF ); - m_bphysHelperTool->fillTrigObjectKinematics(xaodObj,{mutrk,trk}); - - // #FIXME- is it really JPSIMUMU flag? - - xaodObj->addTrackParticleLink(mutrkel); - xaodObj->addTrackParticleLink(trkel); - - // Find and set the IParticle link to the Muon and Track - // note it's the muon, and not the muon's ID track here. - ElementLink<xAOD::IParticleContainer> ptl1EL,ptl2EL; - ptl1EL.resetWithKeyAndIndex(muel.dataID(),muel.index()); - ptl2EL.resetWithKeyAndIndex(trkel.dataID(),trkel.index()); - - xaodObj->addParticleLink(ptl1EL); // - xaodObj->addParticleLink(ptl2EL); // - - - - if (m_doVertexFit) { - std::vector<ElementLink<xAOD::TrackParticleContainer> > input = {mutrkel, trkel}; - if (m_bphysHelperTool->vertexFit(xaodObj,input,massHypo).isFailure()) { - ATH_MSG_DEBUG("Problems with vertex fit" ); - } - // Passed vertexing (monitoring only) - well actually, only it's called - if ( !m_flag_stages[ ACCEPT_Vertexing ] ) { - m_mon_Acceptance.push_back( ACCEPT_Vertexing ); - m_flag_stages[ ACCEPT_Vertexing ] = true; - } - m_mon_Acceptance.push_back( ACCEPT_Each_Vertexing ); - if ( timerSvc() ) m_VtxFitTimer->pause(); - } // vertex fitting - - if (xaodObj->fitmass() < 0) { - ATH_MSG_DEBUG("Fail to get fitMass from xAOD::TrigBphys" ); - // m_mon_Errors.push_back( ERROR_CalcInvMass_Fails ); - } - else { - if ( !m_flag_stages[ ACCEPT_CalcInvMass ] ) { - m_mon_Acceptance.push_back( ACCEPT_CalcInvMass ); - m_flag_stages[ ACCEPT_CalcInvMass ] = true; - } - m_mon_Acceptance.push_back( ACCEPT_Each_CalcInvMass ); - } - m_mon_FitMass .push_back( xaodObj->fitmass() / CLHEP::GeV ); - m_mon_InvMass_okFit .push_back( xaodObj->mass() / CLHEP::GeV ); - - double chisq = xaodObj->fitchi2(); - unsigned int ndf = xaodObj->fitndof(); - - if (chisq <=0 || ndf == 0) { - - m_mon_Chi2toNDoF.push_back( -1. ); - m_mon_Chi2toNDoFProb.push_back(-1.); - } else { - m_mon_Chi2toNDoF.push_back( chisq / ndf ); - double chi2prob = 1.0 - Genfun::CumulativeChiSquare( ndf )(chisq); - m_mon_Chi2toNDoFProb.push_back( chi2prob ); - } - double r2 = xaodObj->fitx()*xaodObj->fitx() + xaodObj->fitz()*xaodObj->fitz(); - m_mon_FitVtxR.push_back(sqrt(r2)); - m_mon_FitVtxZ.push_back(xaodObj->fitz()); - - } // for tracks - } // for mu - - - -} //buildMuTrkPairs - - - diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFTrkMassFex.h b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFTrkMassFex.h deleted file mode 100644 index 4deff4ef0b2181410f9f21ffa60711264e5a1ae1..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFTrkMassFex.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -// ******************************************************************** -// -// NAME: TrigEFTrkMassFex.h -// PACKAGE: Trigger/TrigHypothesis/TrigBphysHypo -// -// AUTHOR: Julie Kirk -// -// ******************************************************************** - -#ifndef TRIG_TrigEFTrkMassFex_H -#define TRIG_TrigEFTrkMassFex_H - -#include "TrigInterfaces/FexAlgo.h" - -#include "xAODMuon/Muon.h" -#include "xAODMuon/MuonContainer.h" -#include "xAODTrigBphys/TrigBphys.h" -#include "xAODTrigBphys/TrigBphysContainer.h" - - - -//class TriggerElement; - -// forward includes -class TrigBphysHelperUtilsTool; -class TrigTimer; - - - -class TrigEFTrkMassFex: public HLT::FexAlgo { - - public: - TrigEFTrkMassFex(const std::string & name, ISvcLocator* pSvcLocator); - ~TrigEFTrkMassFex(); - HLT::ErrorCode hltInitialize(); - HLT::ErrorCode hltFinalize(); - HLT::ErrorCode hltExecute(const HLT::TriggerElement* inputTE, HLT::TriggerElement* outputTE ); - // HLT::ErrorCode acceptInput(const HLT::TriggerElement* inputTE, bool& pass ); - - private: - - ToolHandle <TrigBphysHelperUtilsTool> m_bphysHelperTool; - TrigTimer* m_TotTimer; - TrigTimer* m_VtxFitTimer; - - void buildMuTrkPairs(const TrigRoiDescriptor * roi, - const std::vector<ElementLink<xAOD::MuonContainer> > & muons, - const std::vector<ElementLink< xAOD::TrackParticleContainer> > & tracks, - xAOD::TrigBphysContainer & physcontainer - ); - - // Properties: - - // container inputs names - std::string m_input_trackCollectionKey; //! list of tracks to search for second leg - - float m_trackPtthr; - float m_muonPtthr; - float m_dEta_cut; - float m_dPhi_cut; - float m_mass_low_cut; - float m_mass_high_cut; - float m_daughterMass; - - bool m_doVertexFit; - bool m_oppositeCharge; - bool m_acceptAll; - - - - uint32_t m_lastEvent; - uint32_t m_lastEventPassed; - unsigned int m_countTotalEvents; - unsigned int m_countTotalRoI; - unsigned int m_countPassedEvents; - unsigned int m_countPassedRoIs; - unsigned int m_countPassedRoIMatch; - unsigned int m_countPassedMass; - - std::vector<bool> m_flag_stages; - -// Monitored variables - std::vector<int> m_mon_Errors; - std::vector<int> m_mon_Acceptance; - std::vector<float> m_mon_ROIEta; - std::vector<float> m_mon_ROIPhi; - int m_mon_nTracks; - std::vector<float> m_mon_TrkPt; - std::vector<float> m_mon_TrkPt_wideRange; - std::vector<float> m_mon_TrkEta; - std::vector<float> m_mon_TrkPhi; - std::vector<float> m_mon_TrkROIdEta; - std::vector<float> m_mon_TrkROIdPhi; - std::vector<float> m_mon_TrkROIdR; - std::vector<float> m_mon_InvMassNoTrkPtCut; - std::vector<float> m_mon_InvMassNoTrkPtCut_wideRange; - std::vector<float> m_mon_InvMass; - std::vector<float> m_mon_InvMass_wideRange; - std::vector<float> m_mon_Trk1Pt; - std::vector<float> m_mon_Trk2Pt; - std::vector<float> m_mon_Trk1Eta; - std::vector<float> m_mon_Trk2Eta; - std::vector<float> m_mon_Trk1Phi; - std::vector<float> m_mon_Trk2Phi; - std::vector<float> m_mon_Trk1Trk2dEta; - std::vector<float> m_mon_Trk1Trk2dPhi; - std::vector<float> m_mon_Trk1Trk2dR; - std::vector<float> m_mon_SumPtTrk12; - std::vector<float> m_mon_FitMass; - std::vector<float> m_mon_FitMass_wideRange; - std::vector<float> m_mon_InvMass_okFit; - std::vector<float> m_mon_Chi2toNDoF; - std::vector<float> m_mon_Chi2toNDoFProb; - std::vector<float> m_mon_FitTotalPt; - std::vector<float> m_mon_SumPtTrk12_okFit; - std::vector<float> m_mon_FitVtxR; - std::vector<float> m_mon_FitVtxZ; - int m_mon_nBphys; - float m_mon_TotalRunTime; - float m_mon_VertexingTime; - -}; - -#endif diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFTrkMassHypo.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFTrkMassHypo.cxx deleted file mode 100644 index b69f2ff3dc04b8fd6a24c42312d867f02a0dc793..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFTrkMassHypo.cxx +++ /dev/null @@ -1,170 +0,0 @@ -// -*- C++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/************************************************************************** - ** - ** File: Trigger/TrigHypothesis/TrigBPhysHypo/TrigEFTrkMassHypo.cxx - ** - ** Description: L2 hypothesis algorithms for tag and probe (tracks with mass cut) - ** Create TrigL2Bphys - ** - ** Author: J.Kirk - ** - ** Created: 14.10.2007 - ** Modified: - ** - **************************************************************************/ - -//#include "TrigMuonEvent/CombinedMuonFeature.h" - -#include "TrigEFTrkMassHypo.h" - - -#include "xAODTrigger/TrigPassBits.h" - -// additions of xAOD objects -#include "xAODEventInfo/EventInfo.h" -#include "xAODTrigBphys/TrigBphysContainer.h" - -class ISvcLocator; - -TrigEFTrkMassHypo::TrigEFTrkMassHypo(const std::string & name, ISvcLocator* pSvcLocator): - HLT::HypoAlgo(name, pSvcLocator) -,m_lastEvent(-1) -,m_lastEventPassed(-1) -,m_countTotalEvents(0) -,m_countTotalRoI(0) -,m_countPassedEvents(0) -,m_countPassedRoIs(0) -{ - - // Read cuts - declareProperty("AcceptAll", m_acceptAll=true); - - declareMonitoredVariable("CutCounter", m_mon_cutCounter); - declareMonitoredVariable("NBphys", m_mon_NBphys); - - -} - -TrigEFTrkMassHypo::~TrigEFTrkMassHypo() -{ } - -HLT::ErrorCode TrigEFTrkMassHypo::hltInitialize() -{ - - ATH_MSG_DEBUG("AcceptAll = "<< (m_acceptAll==true ? "True" : "False")); - - m_lastEvent = -1; - m_lastEventPassed = -1; - m_countTotalEvents =0; - m_countTotalRoI =0; - m_countPassedEvents =0; - m_countPassedRoIs =0; - - return HLT::OK; -} - -HLT::ErrorCode TrigEFTrkMassHypo::hltFinalize() -{ - ATH_MSG_INFO("in finalize()" ); - ATH_MSG_INFO("|----------------------- SUMMARY FROM TrigEFTrkMassHypo -------------|" ); - ATH_MSG_INFO("Run on events/2xRoIs " << m_countTotalEvents << "/" << m_countTotalRoI ); - ATH_MSG_INFO("Passed events/2xRoIs " << m_countPassedEvents << "/" << m_countPassedRoIs ); - - return HLT::OK; -} - -//------------------------------------------------------------------------------------- -HLT::ErrorCode TrigEFTrkMassHypo::hltExecute(const HLT::TriggerElement* outputTE, bool& pass) -{ - - bool result = false; - m_mon_cutCounter = -1; - - // Retrieve event info -// int IdRun = 0; - int IdEvent = 0; - - // JW - Try to get the xAOD event info - const xAOD::EventInfo *evtInfo(0); - if ( store()->retrieve(evtInfo).isFailure() ) { - ATH_MSG_WARNING("Failed to get xAOD::EventInfo " ); - }else { // found the xAOD event info - ATH_MSG_DEBUG(" Run " << evtInfo->runNumber() << " Event " << evtInfo->eventNumber() ); -// IdRun = evtInfo->runNumber(); - IdEvent = evtInfo->eventNumber(); - } // get event ifo - - if (IdEvent != m_lastEvent) { - m_countTotalEvents++; - m_lastEvent=IdEvent; - } - m_countTotalRoI++; - - - // Accept-All mode: temporary patch; should be done with force-accept - if (m_acceptAll) { - pass = true; - //return HLT::OK; - } - ATH_MSG_DEBUG("AcceptAll is set to : " << (m_acceptAll ? "True, taking all events " : "False, applying selection" )); - - // for now pass all events - JK changed to false 9/2/10 - pass=false; -// create vector for TrigEFBphys particles - const xAOD::TrigBphysContainer * xAODTrigBphysColl(0); - - HLT::ErrorCode status = getFeature(outputTE, xAODTrigBphysColl, "EFTrackMass"); - - if ( status != HLT::OK ) { - ATH_MSG_WARNING("Failed to get xAODTrigBphysColl collection" ); - return HLT::OK; - } - - ATH_MSG_DEBUG(" Retrieved Bphys collection xAODTrigBphysColl = " << xAODTrigBphysColl ); - // if no Bphys particles were found, just leave TrigBphysColl. empty and leave - if ( xAODTrigBphysColl == 0 ) { - ATH_MSG_DEBUG("No Bphys particles to analyse, leaving!" ); - m_mon_NBphys=0; - return HLT::OK; - } - - m_mon_NBphys=xAODTrigBphysColl->size(); - ATH_MSG_DEBUG("Got TrigBphys collection with " << xAODTrigBphysColl->size() << " TrigBphys particles " ); - - m_mon_cutCounter = 0; - - //TrigPassBits *bits = HLT::makeTrigPassBits(xAODTrigBphysColl); - std::unique_ptr<xAOD::TrigPassBits> xBits = xAOD::makeTrigPassBits<xAOD::TrigBphysContainer>(xAODTrigBphysColl); - - // now loop over Bphys particles to set passBits - xAOD::TrigBphysContainer::const_iterator bphysIter = xAODTrigBphysColl->begin(); - for ( ; bphysIter != xAODTrigBphysColl->end(); ++bphysIter) { - //HLT::markPassing(bits, *bphysIter, xAODTrigBphysColl); - xBits->markPassing((*bphysIter),xAODTrigBphysColl,true); - } - - result=true; - - if (result) { - m_countPassedRoIs++; - if (IdEvent!= m_lastEventPassed) { - m_countPassedEvents++; - m_lastEventPassed=IdEvent; - } - pass=true; - } - - // store result - //if ( attachBits(outputTE, bits) != HLT::OK ) { - // msg() << MSG::ERROR << "Problem attaching TrigPassBits! " ); - //} - if(attachFeature(outputTE, xBits.release(),"passbits") != HLT::OK) - ATH_MSG_ERROR("Could not store TrigPassBits! "); - - return HLT::OK; -} diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFTrkMassHypo.h b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFTrkMassHypo.h deleted file mode 100644 index 198ba8c12b83859af5b232ed21d34a142e3c6935..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFTrkMassHypo.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - - -#ifndef TRIGEFTRKMASSHYPO_H -#define TRIGEFTRKMASSHYPO_H - -#include "TrigInterfaces/HypoAlgo.h" - -class TriggerElement; - -class TrigEFTrkMassHypo: public HLT::HypoAlgo -{ - -public: - TrigEFTrkMassHypo(const std::string& name, ISvcLocator* pSvcLocator); - ~TrigEFTrkMassHypo(); - - HLT::ErrorCode hltInitialize(); - HLT::ErrorCode hltFinalize(); - HLT::ErrorCode hltExecute(const HLT::TriggerElement* outputTE, bool& pass); - - bool execHLTAlgorithm(TriggerElement* ); - -private: - - BooleanProperty m_acceptAll; - - int m_lastEvent; - int m_lastEventPassed; - unsigned int m_countTotalEvents; - unsigned int m_countTotalRoI; - unsigned int m_countPassedEvents; - unsigned int m_countPassedRoIs; - void handle(const Incident &); - - /* monitored variables */ - int m_mon_cutCounter; - int m_mon_NBphys; - //std::vector<float> m_mon_Mass; - //std::vector<float> m_mon_FitMass; - //std::vector<float> m_mon_Chi2; - //std::vector<float> m_mon_Chi2Prob; - -}; - -#endif diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuFex.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuFex.cxx deleted file mode 100644 index efd211282268af220ee44e4e9645dc921db3df3b..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuFex.cxx +++ /dev/null @@ -1,1193 +0,0 @@ -/* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -*/ - -// ******************************************************************* -// -// NAME: TrigL2BMuMuFex.h -// PACKAGE: Trigger/TrigHypothesis/TrigBphysHypo -// AUTHOR: Sergey Sivoklokov -// -// ******************************************************************* - -#include <math.h> - -//#include "TrigMuonEvent/CombinedMuonFeature.h" - -#include "TrigL2BMuMuFex.h" - - -#include "TrigSteeringEvent/TrigRoiDescriptor.h" - -#include "CLHEP/GenericFunctions/CumulativeChiSquare.hh" - -#include "TrigInDetToolInterfaces/ITrigVertexingTool.h" -#include "TrigInDetEvent/TrigL2Vertex.h" -#include "TrigInDetEvent/TrigVertex.h" // for TrigVertex -#include "xAODTrigBphys/TrigBphysAuxContainer.h" // for TrigBphysAu... -#include "xAODTrigBphys/TrigBphysContainer.h" // for TrigBphysCo... -#include "Constants.h" - -// additions of xAOD objects -#include "xAODTracking/TrackParticle.h" -#include "xAODTracking/TrackParticleContainer.h" -#include "xAODTrigMuon/L2StandAloneMuon.h" -#include "xAODTrigMuon/L2StandAloneMuonContainer.h" -#include "TrigBphysHelperUtilsTool.h" - -//class ISvcLocator; - - -/*--------------------------------------------------------------------------------*/ -TrigL2BMuMuFex::TrigL2BMuMuFex(const std::string & name, ISvcLocator* pSvcLocator): -HLT::ComboAlgo(name, pSvcLocator), -m_bphysHelperTool("TrigBphysHelperUtilsTool"), -m_muon1(0), -m_muon2(0), -m_L2vertFitter("TrigL2VertexFitter",this), -m_vertexingTool("TrigVertexingTool",this), -m_BmmHypTot(0), -m_BmmHypVtx(0), -// counters -m_lastEvent(-1), -m_lastEventPassed(-1), -m_countTotalEvents(0), -m_countTotalRoI(0), -m_countPassedEvents(0), -m_countPassedRoIs(0), -m_countPassedmumuPairs(0), -m_countPassedBsMass(0), -m_countPassedVtxFit(0), - -m_massMuon(105.6583715) -/*--------------------------------------------------------------------------------*/ -{ - - // Read properties - boolean switches - declareProperty("AcceptAll" , m_acceptAll = true ); - declareProperty("AcceptSameMuon" , m_acceptSameMuon = false); - declareProperty("OppositeSign" , m_oppositeCharge = true ); - declareProperty("SameSign" , m_sameCharge = false ); - declareProperty("ApplyUpperMassCut", m_ApplyupperMassCut = true ); - declareProperty("doVertexFit" , m_doVertexFit = true ); - declareProperty("noId" , m_noId = false); - - // Read properties - mass widnow cuts - declareProperty("LowerMassCut", m_lowerMassCut = 2000.0 ); - declareProperty("UpperMassCut", m_upperMassCut = 10000.0 ); - - // Read properties - vertexing tools - declareProperty("TrigL2VertexFitter", m_L2vertFitter ); - declareProperty("TrigVertexingTool" , m_vertexingTool, "TrigVertexingTool" ); - - declareProperty("MassTrack" , m_massMuon, "Mass of the muon" ); - declareProperty("L2CombinedMuonIDTrackKey",m_combinedMuonIDTrackKey="InDetTrigTrackingxAODCnv_Muon_FTF"); - declareProperty("L2CombinedMuonKey", m_combinedMuonKey ="MuonL2CBInfo"); - declareProperty("StandAloneMuonKey", m_standaloneMuonKey ="MuonL2SAInfo"); - - - // Variables for monitoring histograms - declareMonitoredStdContainer("Errors" , m_mon_Errors , AutoClear); - declareMonitoredStdContainer("Acceptance" , m_mon_Acceptance , AutoClear); - declareMonitoredStdContainer("ROIEta" , m_mon_ROIEta , AutoClear); - declareMonitoredStdContainer("ROIPhi" , m_mon_ROIPhi , AutoClear); - declareMonitoredStdContainer("Roi1Roi2dEta" , m_mon_Roi1Roi2dEta , AutoClear); - declareMonitoredStdContainer("Roi1Roi2dPhi" , m_mon_Roi1Roi2dPhi , AutoClear); - declareMonitoredStdContainer("Roi1Roi2dR" , m_mon_Roi1Roi2dR , AutoClear); - // - two combined muons - declareMonitoredStdContainer("MucombROIdR" , m_mon_MucombROIdR , AutoClear); - declareMonitoredStdContainer("MucombTrkdR" , m_mon_MucombTrkdR , AutoClear); - declareMonitoredStdContainer("MucombPt" , m_mon_MucombPt , AutoClear); - declareMonitoredStdContainer("MutrkPt" , m_mon_MutrkPt , AutoClear); - declareMonitoredStdContainer("MutrkPt_wideRange" , m_mon_MutrkPt_wideRange , AutoClear); - declareMonitoredStdContainer("MutrkEta" , m_mon_MutrkEta , AutoClear); - declareMonitoredStdContainer("MutrkPhi" , m_mon_MutrkPhi , AutoClear); - declareMonitoredStdContainer("Mutrk1Mutrk2dEta" , m_mon_Mutrk1Mutrk2dEta , AutoClear); - declareMonitoredStdContainer("Mutrk1Mutrk2dPhi" , m_mon_Mutrk1Mutrk2dPhi , AutoClear); - declareMonitoredStdContainer("Mutrk1Mutrk2dR" , m_mon_Mutrk1Mutrk2dR , AutoClear); - declareMonitoredStdContainer("SumPtMutrk12" , m_mon_SumPtMutrk12 , AutoClear); - declareMonitoredStdContainer("InvMass_comb" , m_mon_InvMass_comb , AutoClear); - declareMonitoredStdContainer("InvMass_comb_wideRange" , m_mon_InvMass_comb_wideRange , AutoClear); - declareMonitoredStdContainer("FitMass" , m_mon_FitMass , AutoClear); - declareMonitoredStdContainer("FitMass_wideRange" , m_mon_FitMass_wideRange , AutoClear); - declareMonitoredStdContainer("InvMass_comb_okFit" , m_mon_InvMass_comb_okFit , AutoClear); - declareMonitoredStdContainer("Chi2toNDoF" , m_mon_Chi2toNDoF , AutoClear); - // declareMonitoredStdContainer("Chi2toNDoFProb" , m_mon_Chi2toNDoFProb , AutoClear); - declareMonitoredStdContainer("FitTotalPt" , m_mon_FitTotalPt , AutoClear); - declareMonitoredStdContainer("SumPtMutrk12_okFit" , m_mon_SumPtMutrk12_okFit , AutoClear); - declareMonitoredStdContainer("FitVtxR" , m_mon_FitVtxR , AutoClear); - declareMonitoredStdContainer("FitVtxZ" , m_mon_FitVtxZ , AutoClear); - declareMonitoredVariable( "VertexingTime" , m_mon_VertexingTime ); - declareMonitoredVariable( "TotalRunTime" , m_mon_TotalRunTime ); - // // - one combined + one standalone muon - // declareMonitoredStdContainer("MustandROIdR" , m_mon_MustandROIdR , AutoClear); - // declareMonitoredStdContainer("MustandPt" , m_mon_MustandPt , AutoClear); - // declareMonitoredStdContainer("MustandPt_wideRange" , m_mon_MustandPt_wideRange , AutoClear); - // declareMonitoredStdContainer("MustandEta" , m_mon_MustandEta , AutoClear); - // declareMonitoredStdContainer("MustandPhi" , m_mon_MustandPhi , AutoClear); - // declareMonitoredStdContainer("MutrkMustanddEta" , m_mon_MutrkMustanddEta , AutoClear); - // declareMonitoredStdContainer("MutrkMustanddPhi" , m_mon_MutrkMustanddPhi , AutoClear); - // declareMonitoredStdContainer("MutrkMustanddR" , m_mon_MutrkMustanddR , AutoClear); - // declareMonitoredStdContainer("SumPtMutrkMustand" , m_mon_SumPtMutrkMustand , AutoClear); - // declareMonitoredStdContainer("InvMass_stand" , m_mon_InvMass_stand , AutoClear); - // declareMonitoredStdContainer("InvMass_stand_wideRange", m_mon_InvMass_stand_wideRange , AutoClear); - -} - -/*------------------------------*/ -TrigL2BMuMuFex::~TrigL2BMuMuFex() -/*------------------------------*/ -{ -} -/*-------------------------------------------*/ -HLT::ErrorCode TrigL2BMuMuFex::hltInitialize() -/*-------------------------------------------*/ -{ - - // Print out properties, cuts - ATH_MSG_DEBUG("Initialization ..." ); - ATH_MSG_DEBUG("AcceptAll = "<< (m_acceptAll==true ? "True" : "False") ); - ATH_MSG_DEBUG("noId = " << (m_noId==true ? "True" : "False") ); - ATH_MSG_DEBUG("OppositeCharge = "<< (m_oppositeCharge==true ? "True" : "False") ); - ATH_MSG_DEBUG("SameCharge = " << (m_sameCharge==true ? "True" : "False") ); - ATH_MSG_DEBUG("LowerMassCut = " << m_lowerMassCut ); - ATH_MSG_DEBUG("UpperMassCut = " << m_upperMassCut ); - ATH_MSG_DEBUG("ApplyUpperMassCut = " << m_ApplyupperMassCut ); - - // Consistency check of charge requirements - if( m_oppositeCharge && m_sameCharge ) { - ATH_MSG_ERROR("Bad configuration: OppositeCharge and SameCharge are required together" ); - return HLT::BAD_JOB_SETUP; - } - - // Retrieving the vertex fitting tool - // StatusCode sc = toolSvc()->retrieveTool("TrigVertexFitter","TrigVertexFitter",m_vertFitter); - // if ( sc.isFailure() ) { - // ATH_MSG_FATAL("Unable to locate TrigVertexFitter tool " ); - // return HLT::BAD_JOB_SETUP; - // } - - StatusCode sc = m_L2vertFitter.retrieve(); - if ( sc.isFailure() ) { - ATH_MSG_FATAL("Unable to locate TrigL2VertexFitter tool " ); - return HLT::BAD_JOB_SETUP; - } - else { - ATH_MSG_INFO("TrigL2VertexFitter retrieved"); - } - - sc = m_vertexingTool.retrieve(); - if ( sc.isFailure() ) { - ATH_MSG_FATAL("Unable to locate TrigVertexingTool tool " ); - return HLT::BAD_JOB_SETUP; - } else { - ATH_MSG_INFO("TrigVertexingTool retrieved"); - } - - if (m_bphysHelperTool.retrieve().isFailure()) { - ATH_MSG_ERROR("Can't find TrigBphysHelperUtilsTool" ); - return HLT::BAD_JOB_SETUP; - } else { - ATH_MSG_DEBUG("TrigBphysHelperUtilsTool found" ); - } - - - // Add the timers - if ( timerSvc() ) { - m_BmmHypTot = addTimer("BmmHypTot"); - m_BmmHypVtx = addTimer("BmmHypVtxFit"); - } - - // TODO: shouldn't be initialized in the constructor (does it matter ?) - m_lastEvent = -1; - m_lastEventPassed = -1; - m_countTotalEvents = 0; - m_countTotalRoI = 0; - m_countPassedEvents = 0; - m_countPassedRoIs = 0; - m_countPassedmumuPairs = 0; - m_countPassedBsMass = 0; - m_countPassedVtxFit = 0; - - return HLT::OK; -} - -/*-----------------------------------------*/ -HLT::ErrorCode TrigL2BMuMuFex::hltFinalize() -/*-----------------------------------------*/ -{ - - ATH_MSG_INFO("in finalize()" ); - MsgStream log(msgSvc(), name()); - - ATH_MSG_INFO("|----------------------- SUMMARY FROM TrigL2BMuMuFex -------------|" ); - ATH_MSG_INFO("Run on events/2xRoIs " << m_countTotalEvents << "/" << m_countTotalRoI ); - ATH_MSG_INFO("Passed events/2xRoIs " << m_countPassedEvents << "/" << m_countPassedRoIs ); - ATH_MSG_INFO("RoIs Passed MuMu pairs: " << m_countPassedmumuPairs ); - ATH_MSG_INFO("RoIs Passed BsMass: " << m_countPassedBsMass ); - ATH_MSG_INFO("RoIs Passed Vtx Fit: " << m_countPassedVtxFit ); - - return HLT::OK; -} - -// Define the bins for error-monitoring histogram -#define ERROR_No_EventInfo 0 -#define ERROR_Not_2_Input_TE 1 -#define ERROR_No_RoI_1 2 -#define ERROR_No_RoI_2 3 -#define ERROR_Mu1_not_Combined 4 -#define ERROR_Mu1_not_Standalone 5 -#define ERROR_Mu1_Standalone_Invalid 6 -#define ERROR_Mu2_not_Combined 7 -#define ERROR_Mu2_not_Standalone 8 -#define ERROR_Mu2_Standalone_Invalid 9 -#define ERROR_MuMu_not_Both_Combined 10 -#define ERROR_MuMu_not_Comb_Standalone 11 -#define ERROR_AddTrack_Fails 12 -#define ERROR_CalcInvMass_Fails 13 -#define ERROR_CalcMother_Fails 14 -#define ERROR_CalcMassPull_Fails 15 -#define ERROR_BphysColl_Fails 16 - -// Define the bins for acceptance-monitoring histogram -#define ACCEPT_Input 0 -#define ACCEPT_Got_RoIs 1 -#define ACCEPT_Mu1_Combined 2 -#define ACCEPT_Mu1_Standalone 3 -#define ACCEPT_Mu2_Combined 4 -#define ACCEPT_Mu2_Standalone 5 -#define ACCEPT_MuMu_Both_Combined 6 -#define ACCEPT_MuMu_Comb_Standalone 7 -#define ACCEPT_Mu1_IDTrack 8 -#define ACCEPT_Mu2_IDTrack 9 -#define ACCEPT_MuMu_Both_IDTracks 10 -#define ACCEPT_CombMu_IDTrack 11 -#define ACCEPT_DiMuon_Pair 12 -#define ACCEPT_vtxpass_is_TRUE 13 -#define ACCEPT_mumuIDpass_is_TRUE 14 -#define ACCEPT_Opp_Charge 15 -#define ACCEPT_InvMass_Cut 16 -#define ACCEPT_AddTrack_Test 17 -#define ACCEPT_Vertexing 18 -#define ACCEPT_CalcInvMass 19 -#define ACCEPT_CalcMother 20 -#define ACCEPT_Vertex_not_NULL 21 -// Separator 22 -#define ACCEPT_BphysColl_not_Empty 23 - -/*------------------------------------------------------------------------------*/ -HLT::ErrorCode TrigL2BMuMuFex::acceptInputs(HLT::TEConstVec& inputTE, bool& pass) -/*------------------------------------------------------------------------------*/ -{ - - // Global flags - bool mumuIDpass = true; - bool vtxpass = true; - if (m_noId) vtxpass = false; - if (m_resultHolder.size()) { - ATH_MSG_WARNING("m_resultHolder not empty" ); - } - m_resultHolder.clear(); - - // Initialize the monitoring variables - m_mon_TotalRunTime = 0; - m_mon_VertexingTime = 0; - - ATH_MSG_DEBUG("Running TrigL2BMuMuFex::acceptInputS" ); - m_mon_Acceptance.push_back( ACCEPT_Input ); - - if ( m_acceptAll ) { - pass = true; - ATH_MSG_DEBUG("Accept property is set: taking all the events" ); - return HLT::OK; - } - - // Processing timers - if ( timerSvc() ) m_BmmHypTot->start(); - - // Retrieve event info - //int IdRun = 0; - int IdEvent = 0; - // event info - uint32_t runNumber(0), evtNumber(0), lbBlock(0); - if (m_bphysHelperTool->getRunEvtLb( runNumber, evtNumber, lbBlock).isFailure()) { - ATH_MSG_ERROR("Error retriving EventInfo" ); - } - //IdRun = runNumber; - IdEvent = evtNumber; - - - - // Check consistency of the number of input Trigger Elements - if ( inputTE.size() != 2 ) { - ATH_MSG_ERROR("Got different than 2 number of input TEs" ); - if ( timerSvc() ) { - m_BmmHypTot->stop(); - m_mon_TotalRunTime = m_BmmHypTot->elapsed(); - } - m_mon_Errors.push_back( ERROR_Not_2_Input_TE ); - return HLT::BAD_JOB_SETUP; - } - - // Get the RoIs from the navigation - const TrigRoiDescriptor *roi[2] = { 0, 0 }; - for ( int i=0; i<2; i++ ) { - if ( getFeature(inputTE.at(i), roi[i]) != HLT::OK ) { - ATH_MSG_ERROR("Navigation error while getting RoI descriptor " << i+1 ); - if ( timerSvc() ) { - m_BmmHypTot->stop(); - m_mon_TotalRunTime = m_BmmHypTot->elapsed(); - } - if ( !i ) m_mon_Errors.push_back( ERROR_No_RoI_1 ); - else m_mon_Errors.push_back( ERROR_No_RoI_2 ); - return HLT::NAV_ERROR; - } - if ( roi[i] == NULL ) { - ATH_MSG_ERROR("Navigation error while getting RoI descriptor " << i+1 << " (null pointer)" ); - if ( timerSvc() ) { - m_BmmHypTot->stop(); - m_mon_TotalRunTime = m_BmmHypTot->elapsed(); - } - if ( !i ) m_mon_Errors.push_back( ERROR_No_RoI_1 ); - else m_mon_Errors.push_back( ERROR_No_RoI_2 ); - return HLT::NAV_ERROR; - } - } - - m_mon_Acceptance.push_back( ACCEPT_Got_RoIs ); - - // Print RoIs debugging information - ATH_MSG_DEBUG("Using inputTEs: " << inputTE.front()->getId() << " AND " << inputTE.back()->getId() - << "; RoI IDs = " << roi[0]->roiId() << " AND " << roi[1]->roiId() - << ": Eta1 = " << roi[0]->eta() << " Eta2 = " << roi[1]->eta() - << ", Phi1 = " << roi[0]->phi() << " Phi2 = " << roi[1]->phi()); - - // Monitoring of the RoIs opening angle - m_mon_ROIEta.push_back( roi[0]->eta() ); - m_mon_ROIPhi.push_back( roi[0]->phi() ); - m_mon_ROIEta.push_back( roi[1]->eta() ); - m_mon_ROIPhi.push_back( roi[1]->phi() ); - float dEtaRoI = roi[0]->eta() - roi[1]->eta(); - float dPhiRoI = roi[0]->phi() - roi[1]->phi(); - while ( dPhiRoI > M_PI ) dPhiRoI -= 2*M_PI; - while ( dPhiRoI < -M_PI ) dPhiRoI += 2*M_PI; - m_mon_Roi1Roi2dEta.push_back( fabs(dEtaRoI) ); - m_mon_Roi1Roi2dPhi.push_back( fabs(dPhiRoI) ); - m_mon_Roi1Roi2dR .push_back( sqrt(dEtaRoI*dEtaRoI + dPhiRoI*dPhiRoI) ); - - // JW test for xAOD l2 combined muons: - typedef ElementLinkVector<xAOD::L2CombinedMuonContainer> ELVMuons; - typedef ElementLinkVector<xAOD::L2StandAloneMuonContainer> ELVMuonsSA; - - for (unsigned int mui =0; mui < 2; ++mui) { - ATH_MSG_DEBUG("JW attempt: " << mui+1 ); - ELVMuons elvmuon; - if(getFeaturesLinks<xAOD::L2CombinedMuonContainer,xAOD::L2CombinedMuonContainer>(inputTE[mui], elvmuon)!=HLT::OK ) { - ATH_MSG_DEBUG("JW: " << mui+1 << " Problem" ); - } else { - ATH_MSG_DEBUG("JW: " << mui+1 << " Ok: size: " << elvmuon.size() ); - } - - } // mui - - - m_muon1 = m_muon2 = nullptr; - ELVMuonsSA muonFeatureEL; - const xAOD::L2StandAloneMuon* pMuonFeature(nullptr); - ElementLink<xAOD::L2StandAloneMuonContainer> pMuonFeatureEL; // for m_noId will be set to the SA muon - - const xAOD::L2CombinedMuon *muon(nullptr); - ElementLink<xAOD::L2CombinedMuonContainer> muonEL; - int i_comb = 0; // for noId chains, index of the RoI with combined muon feature (should be always 0, but better check it) - - // Get the muons combined/standalone features - // const CombinedMuonFeature *muonX[2] = { m_muon1, m_muon2 }; - const xAOD::L2CombinedMuon *muonX[2] = { m_muon1, m_muon2 }; // JW FIXME shouldn't this just initialise to nullptr? - ElementLink<xAOD::L2CombinedMuonContainer> muonXEL[2]; - - //ElementLink<xAOD::L2CombinedMuonContainer> l2combinedMuonEL[2]; - ELVMuons l2combinedMuonEL[2]; - if ( !m_noId ) { - for ( int i = 0; i < 2; i++ ) { - //if ( (getFeature(inputTE.at(i), muonX[i]) != HLT::OK) || !muonX[i] ) { - //if (getFeatureLink<xAOD::L2CombinedMuonContainer,xAOD::L2CombinedMuonContainer>(inputTE.at(i),l2combinedMuonEL[i]) != HLT::OK) { - if(getFeaturesLinks<xAOD::L2CombinedMuonContainer,xAOD::L2CombinedMuonContainer>(inputTE.at(i), l2combinedMuonEL[i])!=HLT::OK ) { - ATH_MSG_ERROR("Navigation error while getting CombinedMuonFeature " << i+1 ); - if ( timerSvc() ) { - m_BmmHypTot->stop(); - m_mon_TotalRunTime = m_BmmHypTot->elapsed(); - } - if ( i == 0 ) m_mon_Errors.push_back( ERROR_Mu1_not_Combined ); - else m_mon_Errors.push_back( ERROR_Mu2_not_Combined ); - return HLT::NAV_ERROR; - } else { - if (l2combinedMuonEL[i].size()) { - muonX[i] = l2combinedMuonEL[i][0].isValid() ? *(l2combinedMuonEL[i][0]): nullptr; - muonXEL[i] = l2combinedMuonEL[i][0]; - } - if (l2combinedMuonEL[i].size() > 1) { - ATH_MSG_WARNING("Unexpected number of containers for comb feature: " << i+1 ); - } - if (!muonX[i]) { - ATH_MSG_ERROR("Nullptr from EL for muon: " << i+1 ); - if ( timerSvc() ) { - m_BmmHypTot->stop(); - m_mon_TotalRunTime = m_BmmHypTot->elapsed(); - } - if ( i == 0 ) m_mon_Errors.push_back( ERROR_Mu1_not_Combined ); - else m_mon_Errors.push_back( ERROR_Mu2_not_Combined ); - return HLT::NAV_ERROR; - } - ATH_MSG_DEBUG("successfully got muon combined feature for RoI " << i+1 ); - // Monitoring of the combined muons w.r.t. ROI - if ( i == 0 ) m_mon_Acceptance.push_back( ACCEPT_Mu1_Combined ); - else m_mon_Acceptance.push_back( ACCEPT_Mu2_Combined ); - float dEtaCombRoI = ((i==0)?(roi[0]->eta()):(roi[1]->eta())) - muonX[i]->eta(); - float dPhiCombRoI = ((i==0)?(roi[0]->phi()):(roi[1]->phi())) - muonX[i]->phi(); - while ( dPhiCombRoI > M_PI ) dPhiCombRoI -= 2*M_PI; - while ( dPhiCombRoI < -M_PI ) dPhiCombRoI += 2*M_PI; - m_mon_MucombROIdR.push_back( sqrt(dEtaCombRoI*dEtaCombRoI + dPhiCombRoI*dPhiCombRoI) ); - } - } //end loop over RoIs - - } else { // m_noId - - for ( i_comb=0; i_comb<2; i_comb++ ) { - //if ( (getFeature(inputTE.at(i_comb), muonX[i_comb]) == HLT::OK) && muonX[i_comb] ) break; - //if (getFeatureLink<xAOD::L2CombinedMuonContainer,xAOD::L2CombinedMuonContainer>(inputTE.at(i_comb),l2combinedMuonEL[i_comb]) == HLT::OK) { - if(getFeaturesLinks<xAOD::L2CombinedMuonContainer,xAOD::L2CombinedMuonContainer>(inputTE.at(i_comb), l2combinedMuonEL[i_comb]) ==HLT::OK ) { - //muonX[i_comb] = l2combinedMuonEL[i_comb].isValid() ? *l2combinedMuonEL[i_comb]: nullptr; - if (l2combinedMuonEL[i_comb].size()) { - muonX[i_comb] = (l2combinedMuonEL[i_comb][0]).isValid() ? *(l2combinedMuonEL[i_comb][0]): nullptr; - muonXEL[i_comb] = l2combinedMuonEL[i_comb][0]; - } - if ( muonX[i_comb]) break; - } - muonX[i_comb] = NULL; - - } // for - if ( i_comb > 1 ) { - ATH_MSG_ERROR("Navigation error while getting CombinedMuonFeatures 1 or 2" ); - if ( timerSvc() ) { - m_BmmHypTot->stop(); - m_mon_TotalRunTime = m_BmmHypTot->elapsed(); - } - m_mon_Errors.push_back( ERROR_Mu1_not_Combined ); - m_mon_Errors.push_back( ERROR_Mu2_not_Combined ); - return HLT::NAV_ERROR; - } else { - ATH_MSG_DEBUG("successfully got muon combined feature for RoI " << i_comb+1 ); - // Monitoring of the combined muons w.r.t. ROI - if ( !i_comb ) m_mon_Acceptance.push_back( ACCEPT_Mu1_Combined ); - else m_mon_Acceptance.push_back( ACCEPT_Mu2_Combined ); - float dEtaCombRoI = roi[i_comb]->eta() - muonX[i_comb]->eta(); - float dPhiCombRoI = roi[i_comb]->phi() - muonX[i_comb]->phi(); - while ( dPhiCombRoI > M_PI ) dPhiCombRoI -= 2*M_PI; - while ( dPhiCombRoI < -M_PI ) dPhiCombRoI += 2*M_PI; - m_mon_MucombROIdR.push_back( sqrt(dEtaCombRoI*dEtaCombRoI + dPhiCombRoI*dPhiCombRoI) ); - } - - // Look for standalone muon in 2nd RoI - //JW ATH_MSG_ERROR(" getFeatureLink fails to get MuonFeature" ); - //if ( HLT::OK != getFeatureLink<xAOD::L2StandAloneMuonContainer, xAOD::L2StandAloneMuon>(inputTE.at(1-i_comb), muonFeatureEL) ) { - //if ( HLT::OK != getFeatureLink<xAOD::L2StandAloneMuonContainer, xAOD::L2StandAloneMuonContainer>(inputTE.at(1-i_comb), muonFeatureEL) ) { - if ( HLT::OK != getFeaturesLinks<xAOD::L2StandAloneMuonContainer, xAOD::L2StandAloneMuonContainer>(inputTE.at(1-i_comb), muonFeatureEL) ) { - if ( timerSvc() ) { - m_BmmHypTot->stop(); - m_mon_TotalRunTime = m_BmmHypTot->elapsed(); - } - if ( !i_comb ) m_mon_Errors.push_back( ERROR_Mu2_not_Standalone ); - else m_mon_Errors.push_back( ERROR_Mu1_not_Standalone ); - return HLT::ERROR; - } - if ( !muonFeatureEL.size() || !muonFeatureEL[0].isValid() ) { - ATH_MSG_ERROR(" getFeatureLink finds no TrigMuonFeature (EL invalid)" ); - if ( timerSvc() ) { - m_BmmHypTot->stop(); - m_mon_TotalRunTime = m_BmmHypTot->elapsed(); - } - if ( !i_comb ) m_mon_Errors.push_back( ERROR_Mu2_Standalone_Invalid ); - else m_mon_Errors.push_back( ERROR_Mu1_Standalone_Invalid ); - return HLT::NAV_ERROR; - } - pMuonFeatureEL = muonFeatureEL[0]; // for output object - pMuonFeature = *(muonFeatureEL[0]); - ATH_MSG_DEBUG("RoI " << 2-i_comb << ", the MuonFeature'ss sAddress = " << pMuonFeature ->sAddress() - << " / pt = " << pMuonFeature->pt() - << " / radius = " << pMuonFeature->rMS() // JW radius() - << " / eta = " << pMuonFeature->etaMS()//eta() - << " / phi = " << pMuonFeature->phiMS()//phi() - << " / dir_phi = " << pMuonFeature->dirPhiMS()//dir_phi() - << " / zeta = " << pMuonFeature->zMS()//zeta() - << " / dir_zeta = " << pMuonFeature->dirZMS()/*dir_zeta()*/); - if ( !i_comb ) m_mon_Acceptance.push_back( ACCEPT_Mu2_Standalone ); - else m_mon_Acceptance.push_back( ACCEPT_Mu1_Standalone ); - // Monitoring of the standalone muon w.r.t. ROI - float dEtaStandRoI = roi[1-i_comb]->eta() - pMuonFeature->eta(); - float dPhiStandRoI = roi[1-i_comb]->phi() - pMuonFeature->phi(); - while ( dPhiStandRoI > M_PI ) dPhiStandRoI -= 2*M_PI; - while ( dPhiStandRoI < -M_PI ) dPhiStandRoI += 2*M_PI; - m_mon_MustandROIdR.push_back( sqrt(dEtaStandRoI*dEtaStandRoI + dPhiStandRoI*dPhiStandRoI) ); - } - - m_muon1 = muonX[0]; - m_muon2 = muonX[1]; - - // Check if we have the requested objects - if ( !m_noId ) { - // Need two combined muons - if ( m_muon1 && m_muon2 && roi[0] && roi[1] ) { - ATH_MSG_DEBUG("Got all necessary objects " << m_muon1 << " " << m_muon2 << " for TEs " << inputTE.front() << " and " << inputTE.back() ); - m_mon_Acceptance.push_back( ACCEPT_MuMu_Both_Combined ); - } else { - ATH_MSG_ERROR("Can't get all necessary objects rois: " << ((roi[0] && roi[1])?"OK": "MISSING") << " muons: " << ((m_muon1 && m_muon2)?"OK": "MISSING") ); - if ( timerSvc() ) { - m_BmmHypTot->stop(); - m_mon_TotalRunTime = m_BmmHypTot->elapsed(); - } - m_mon_Errors.push_back( ERROR_MuMu_not_Both_Combined ); - return HLT::BAD_JOB_SETUP; - } - } else { - // The noId flag means one RoI only has a muon feature - no combined track - if ( muonX[i_comb] && roi[0] && roi[1] && pMuonFeature ) { - ATH_MSG_DEBUG("NoId version, Got all necessary objects " << m_muon1 << " " << m_muon2 << " " << pMuonFeature << "for TEs " << inputTE.front() << " and " << inputTE.back() ); - muon = muonX[i_comb]; - muonEL = muonXEL[i_comb]; - m_mon_Acceptance.push_back( ACCEPT_MuMu_Comb_Standalone ); - } else { - ATH_MSG_ERROR("NoId version, Can't get all necessary objects rois: " << ((roi[0] && roi[1])?"OK": "MISSING") - << " combined muon: " << (m_muon1?"OK": "MISSING") << " standalone muons: " << (pMuonFeature?"OK": "MISSING") ); - if ( timerSvc() ) { - m_BmmHypTot->stop(); - m_mon_TotalRunTime = m_BmmHypTot->elapsed(); - } - m_mon_Errors.push_back( ERROR_MuMu_not_Comb_Standalone ); - return HLT::BAD_JOB_SETUP; - } - } - - // Debug dump of the gained information - if ( !m_noId ) { - ATH_MSG_DEBUG("1st CombinedMuonFeature: addr=" << m_muon1 << " pt=" << m_muon1->pt()*m_muon1->charge() << " trkAddr=" << m_muon1->idTrack()); - if ( m_muon1->idTrack() ) ATH_MSG_DEBUG(" trackTrackAddr=" << m_muon1->idTrack()->track()); - else ATH_MSG_DEBUG(" trackTrackAddr=0"); - ATH_MSG_DEBUG("2nd CombinedMuonFeature: addr=" << m_muon2 << " pt=" << m_muon2->pt()*m_muon2->charge() << " trkAddr=" << m_muon2->idTrack()); - if ( m_muon2->idTrack() ) ATH_MSG_DEBUG(" trackTrackAddr=" << m_muon2->idTrack()->track()); - else ATH_MSG_DEBUG(" trackTrackAddr=0"); - } else { - ATH_MSG_DEBUG("CombinedMuonFeature: addr=" << muon << " pt=" << muon->pt()*muon->charge() << " trkAddr=" << muon->idTrack()); - if ( muon->idTrack() ) ATH_MSG_DEBUG(" trackTrackAddr=" << muon->idTrack()->track()); - else ATH_MSG_DEBUG(" trackTrackAddr=0"); - ATH_MSG_DEBUG("StandaloneMuonFeature: addr=" << pMuonFeature << " pt=" << pMuonFeature->pt() << " eta=" << pMuonFeature->eta() << " phi=" << pMuonFeature->phi()); - } - - // Check if we are still in the same event - if ( IdEvent != m_lastEvent ) { - m_countTotalEvents++; - m_lastEvent=IdEvent; - } - m_countTotalRoI++; - - // Get the Inner Detector tracks associated with the muons - if ( !m_noId ) { - if ( m_muon1->idTrack() ) m_mon_Acceptance.push_back( ACCEPT_Mu1_IDTrack ); - // if ( m_muon2->idTrack() && isUnique(m_muon1->idTrack(),m_muon2->idTrack())) m_mon_Acceptance.push_back( ACCEPT_Mu2_IDTrack ); - if ( m_muon2->idTrack() && isUnique(m_muon1->idTrack(),m_muon2->idTrack())) m_mon_Acceptance.push_back( ACCEPT_Mu2_IDTrack ); - - // ST: option to accept all events if two identical muon tracks are found - if ( m_acceptSameMuon && m_muon1->idTrack() && m_muon2->idTrack() && !(isUnique(m_muon1->idTrack(),m_muon2->idTrack())) ) { - pass = true; - if ( timerSvc() ) { - m_BmmHypTot->stop(); - m_mon_TotalRunTime = m_BmmHypTot->elapsed(); - } - ATH_MSG_DEBUG("Accepting two identical muons as AcceptSameMuon is set" ); - // return HLT::OK; - } - - if ( !m_acceptSameMuon && !(m_muon1->idTrack() && m_muon2->idTrack() && isUnique(m_muon1->idTrack(),m_muon2->idTrack())) ) { - ATH_MSG_DEBUG("Missing track(s) from ID or they are the same" ); - vtxpass = false; - mumuIDpass = false; - pass = true; // ST: to actually pass the empty collection to L2BMuMuHypo -// if ( timerSvc() ) { -// m_BmmHypTot->stop(); -// m_mon_TotalRunTime = m_BmmHypTot->elapsed(); -// } - return HLT::OK; - } else { - m_mon_Acceptance.push_back( ACCEPT_MuMu_Both_IDTracks ); - // Monitoring of the combined muons w.r.t. ID tracks - for ( int i=0; i<2; i++ ) { - //JW float dEtaMucombTrk = muonX[i]->IDTrack()->param()->eta() - muonX[i]->eta(); - // float dPhiMucombTrk = muonX[i]->IDTrack()->param()->phi0() - muonX[i]->phi(); - float dEtaMucombTrk = muonX[i]->idTrack()->eta() - muonX[i]->eta(); - float dPhiMucombTrk = muonX[i]->idTrack()->phi() - muonX[i]->phi(); - while ( dPhiMucombTrk > M_PI ) dPhiMucombTrk -= 2*M_PI; - while ( dPhiMucombTrk < -M_PI ) dPhiMucombTrk += 2*M_PI; - m_mon_MucombTrkdR.push_back( sqrt(dEtaMucombTrk*dEtaMucombTrk + dPhiMucombTrk*dPhiMucombTrk) ); - m_mon_MucombPt.push_back( muonX[i]->pt()*muonX[i]->charge() / CLHEP::GeV ); - // Monitoring of the ID tracks - // m_mon_MutrkPt_wideRange.push_back( fabs(muonX[i]->IDTrack()->param()->pT()) / CLHEP::GeV ); - // m_mon_MutrkPt .push_back( fabs(muonX[i]->IDTrack()->param()->pT()) / CLHEP::GeV ); - // m_mon_MutrkEta.push_back( muonX[i]->IDTrack()->param()->eta() ); - // m_mon_MutrkPhi.push_back( muonX[i]->IDTrack()->param()->phi0() ); - m_mon_MutrkPt_wideRange.push_back( fabs(muonX[i]->idTrack()->pt()) / CLHEP::GeV ); - m_mon_MutrkPt .push_back( fabs(muonX[i]->idTrack()->pt()) / CLHEP::GeV ); - m_mon_MutrkEta.push_back( muonX[i]->idTrack()->eta() ); - m_mon_MutrkPhi.push_back( muonX[i]->idTrack()->phi() ); - } - // float dEtaMuMu = m_muon1->IDTrack()->param()->eta() - m_muon2->IDTrack()->param()->eta(); // TODO: put opening angle calculation int the ToolBox) - //JW float dPhiMuMu = m_muon1->IDTrack()->param()->phi0() - m_muon2->IDTrack()->param()->phi0(); - float dEtaMuMu = m_muon1->idTrack()->eta() - m_muon2->idTrack()->eta(); // TODO: put opening angle calculation int the ToolBox) - float dPhiMuMu = m_muon1->idTrack()->phi() - m_muon2->idTrack()->phi(); - - while ( dPhiMuMu > M_PI ) dPhiMuMu -= 2*M_PI; - while ( dPhiMuMu < -M_PI ) dPhiMuMu += 2*M_PI; - m_mon_Mutrk1Mutrk2dEta.push_back( fabs(dEtaMuMu) ); - m_mon_Mutrk1Mutrk2dPhi.push_back( fabs(dPhiMuMu) ); - m_mon_Mutrk1Mutrk2dR .push_back( sqrt(dEtaMuMu*dEtaMuMu + dPhiMuMu*dPhiMuMu) ); - // m_mon_SumPtMutrk12.push_back( (fabs(m_muon1->IDTrack()->param()->pT()) + fabs(m_muon2->IDTrack()->param()->pT())) / CLHEP::GeV ); - m_mon_SumPtMutrk12.push_back( (fabs(m_muon1->idTrack()->pt()) + fabs(m_muon2->idTrack()->pt())) / CLHEP::GeV ); - } - } else { - if( !(muon->idTrack()) ) { - ATH_MSG_DEBUG("Missing track(s) from ID" ); - vtxpass = false; - mumuIDpass = false; - // if ( timerSvc() ) m_BmmHypTot->stop(); - // return HLT::OK; - } else { - m_mon_Acceptance.push_back( ACCEPT_CombMu_IDTrack ); - // Monitoring of the combined / standalone muons w.r.t. ID tracks - float dEtaMucombTrk = muon->idTrack()->eta() - muon->eta(); - float dPhiMucombTrk = muon->idTrack()->phi() - muon->phi(); - while ( dPhiMucombTrk > M_PI ) dPhiMucombTrk -= 2*M_PI; - while ( dPhiMucombTrk < -M_PI ) dPhiMucombTrk += 2*M_PI; - m_mon_MucombTrkdR.push_back( sqrt(dEtaMucombTrk*dEtaMucombTrk + dPhiMucombTrk*dPhiMucombTrk) ); - m_mon_MucombPt.push_back( muon->pt()*muon->charge() / CLHEP::GeV ); - // Monitoring of the ID tracks - m_mon_MutrkPt_wideRange .push_back( fabs(muon->idTrack()->pt()) / CLHEP::GeV ); - //m_mon_MustandPt_wideRange.push_back( fabs(pMuonFeature->pt()) / CLHEP::GeV ); - m_mon_MustandPt_wideRange.push_back( fabs(pMuonFeature->pt()) *1000. / CLHEP::GeV ); - m_mon_MutrkPt .push_back( fabs(muon->idTrack()->pt()) / CLHEP::GeV ); - m_mon_MustandPt.push_back( fabs(pMuonFeature->pt()) *1000. / CLHEP::GeV ); - m_mon_MutrkEta .push_back( muon->idTrack()->eta() ); - m_mon_MustandEta.push_back( pMuonFeature->eta() ); - m_mon_MutrkPhi .push_back( muon->idTrack()->phi() ); - m_mon_MustandPhi.push_back( pMuonFeature->phi() ); - float dEtaMuMu = muon->idTrack()->eta() - pMuonFeature->eta(); - float dPhiMuMu = muon->idTrack()->phi() - pMuonFeature->phi(); - while ( dPhiMuMu > M_PI ) dPhiMuMu -= 2*M_PI; - while ( dPhiMuMu < -M_PI ) dPhiMuMu += 2*M_PI; - m_mon_MutrkMustanddEta.push_back( fabs(dEtaMuMu) ); - m_mon_MutrkMustanddPhi.push_back( fabs(dPhiMuMu) ); - m_mon_MutrkMustanddR .push_back( sqrt(dEtaMuMu*dEtaMuMu + dPhiMuMu*dPhiMuMu) ); - m_mon_SumPtMutrkMustand.push_back( (fabs(muon->idTrack()->pt()) + fabs(pMuonFeature->pt()*1000.)) / CLHEP::GeV ); - } - } - - m_mon_Acceptance.push_back( ACCEPT_DiMuon_Pair ); - if ( vtxpass ) m_mon_Acceptance.push_back( ACCEPT_vtxpass_is_TRUE ); - if ( mumuIDpass ) m_mon_Acceptance.push_back( ACCEPT_mumuIDpass_is_TRUE ); - - ATH_MSG_DEBUG("JWW: charge check - !noId" ); - if ( !m_noId ) { - double mu1ptq, mu2ptq; - if ( m_muon1->idTrack()) { - mu1ptq = m_muon1->idTrack()->pt() * m_muon1->idTrack()->charge(); - ATH_MSG_DEBUG("JWW: mu1ptq from IDTrack()->param()->pT(): " << mu1ptq ); - ATH_MSG_DEBUG("JWW: " << m_muon1->charge() << " " << m_muon1->pt() ); - } else { - mu1ptq = m_muon1->pt() * m_muon1->charge(); - ATH_MSG_DEBUG("JWW: mu1ptq from ptq(): " << mu1ptq ); - ATH_MSG_DEBUG("JWW: " << m_muon1->charge() << " " << m_muon1->pt() << " " << mu1ptq ); - - } - if ( m_muon2->idTrack() ){ - mu2ptq = m_muon2->idTrack()->pt() * m_muon2->idTrack()->charge(); - ATH_MSG_DEBUG("JWW: mu2ptq from IDTrack()->param()->pT(): " << mu2ptq ); - ATH_MSG_DEBUG("JWW: " << m_muon2->charge() << " " << m_muon2->pt() << " " ); - - } else{ - mu2ptq = m_muon2->pt() * m_muon2->charge(); - ATH_MSG_DEBUG("JWW: mu2ptq from ptq(): " << mu2ptq ); - ATH_MSG_DEBUG("JWW: " << m_muon2->charge() << " " << m_muon2->pt() << " " << mu2ptq ); - } - ATH_MSG_DEBUG("JWW: muon1 \n" << *m_muon1 ); - ATH_MSG_DEBUG("JWW: muon2 \n" << *m_muon2 ); - - - } // !noid - - // Check opposite/same charge - double mu1ptq, mu2ptq; - if ( !m_noId ) { - if ( m_muon1->idTrack() ) mu1ptq = fabs(m_muon1->idTrack()->pt()) * m_muon1->idTrack()->charge(); - else mu1ptq = fabs(m_muon1->pt()) * m_muon1->charge(); - if ( m_muon2->idTrack() ) mu2ptq = fabs(m_muon2->idTrack()->pt()) * m_muon2->idTrack()->charge(); - else mu2ptq = fabs(m_muon2->pt()) * m_muon2->charge(); - } else { - if ( muon->idTrack() ) mu1ptq = fabs(muon->idTrack()->pt()) * muon->idTrack()->charge(); - else mu1ptq = fabs(muon->pt()) * muon->charge(); - mu2ptq = pMuonFeature->pt()*1000.; // convert to MeV - } - if ( !m_acceptSameMuon && m_oppositeCharge ) { - if ( mu1ptq * mu2ptq > 0 ) { - ATH_MSG_DEBUG("Combination discarded by opposite charge check" ); - pass = true; // ST: to actually pass the empty collection to L2BMuMuHypo - if ( timerSvc() ){ - m_BmmHypTot->stop(); - m_mon_TotalRunTime = m_BmmHypTot->elapsed(); - } - return HLT::OK; - } - } - if ( m_sameCharge ) { - if ( mu1ptq * mu2ptq < 0 ) { - ATH_MSG_DEBUG("Combination discarded by same charge check" ); - pass = true; // ST: to actually pass the empty collection to L2BMuMuHypo - if ( timerSvc() ){ - m_BmmHypTot->stop(); - m_mon_TotalRunTime = m_BmmHypTot->elapsed(); - } - return HLT::OK; - } - } - ATH_MSG_DEBUG("opposite/same charge cut passed" ); - m_mon_Acceptance.push_back( ACCEPT_Opp_Charge ); - - // Calculate the invariant mass - double mass(0.0); - if ( !m_noId ) { - //mass = invariantMass(m_muon1, m_muon2); - // mass = m_bphysHelperTool->invariantMass( {m_muon1, m_muon2}, {m_massMuon,m_massMuon} ); - mass = m_bphysHelperTool->invariantMass( m_muon1->idTrack(), m_muon2->idTrack(), m_massMuon,m_massMuon ); // #FIXME - use the ID track, yes? - - m_mon_InvMass_comb .push_back(mass / CLHEP::GeV); - m_mon_InvMass_comb_wideRange.push_back(mass / CLHEP::GeV); - } else { - //mass = invariantMass(muon, pMuonFeature); - // ATH_MSG_DEBUG("Mass determination of noId" ); - // ATH_MSG_DEBUG("Muon1 Id Track " << muon->idTrack()->pt() << " " << muon->idTrack()->eta() << " " << muon->idTrack()->phi() ); - // ATH_MSG_DEBUG("Muon2 Print: " << pMuonFeature->pt() << " " << pMuonFeature->eta() << " " << pMuonFeature->phi() ); - // auto p = dynamic_cast<const xAOD::IParticle*>(pMuonFeature); - // ATH_MSG_DEBUG("Muon2 IParticle: " << p->pt() << " " << p->eta() << " " << p->phi() ); - // ATH_MSG_DEBUG("Muon2 IDtrack " << p->pt() << " " << p->eta() << " " << p->phi() ); - // ATH_MSG_DEBUG("Muon2 SAtrack: " << p->pt() << " " << p->eta() << " " << p->phi() ); - // ATH_MSG_DEBUG("Muon2 type: " << pMuonFeature->type() ); - mass = m_bphysHelperTool->invariantMass( muon->idTrack(), pMuonFeature, m_massMuon,m_massMuon ); - m_mon_InvMass_stand .push_back(mass / CLHEP::GeV); - m_mon_InvMass_stand_wideRange.push_back(mass / CLHEP::GeV); - } - ATH_MSG_DEBUG("Mass: " << mass ); - - // ST: if two identical muons - set mass to -1 to accept in Hypo then - if( m_acceptSameMuon && !(isUnique(m_muon1->idTrack(),m_muon2->idTrack())) ) { - mass = -1.; - ATH_MSG_DEBUG("Mass is set to -1. for identical muons" ); - } - - // Apply the cut on the mass - if ( !m_acceptSameMuon && (mass < m_lowerMassCut || (mass > m_upperMassCut && m_ApplyupperMassCut)) ) { - ATH_MSG_DEBUG("Combination discarded by mass cut: " << mass << " MeV" ); - pass = true; // ST: to actually pass the empty collection to L2BMuMuHypo - if ( timerSvc() ) { - m_BmmHypTot->stop(); - m_mon_TotalRunTime = m_BmmHypTot->elapsed(); - } - return HLT::OK; - } else { - m_countPassedBsMass++; - } - m_mon_Acceptance.push_back( ACCEPT_InvMass_Cut ); - - // Start the vertexing timer - if ( timerSvc() ) m_BmmHypVtx->start(); - - // Found pair with good mass, now make L2Bphys object - // TrigL2Bphys* trigPartBmumu = new TrigL2Bphys( 0, 0., 0., TrigL2Bphys::BMUMU, mass); // TODO: shouldn't there be RoIs parameters ? - xAOD::TrigBphys* trigPartBmumu = new xAOD::TrigBphys(); - trigPartBmumu->makePrivateStore(); - trigPartBmumu->initialise( 0, 0., 0., xAOD::TrigBphys::BMUMU, mass,xAOD::TrigBphys::L2 ); - - ATH_MSG_DEBUG(" Create Bphys particle with RoIId " << trigPartBmumu->roiId() << " phi, eta " << trigPartBmumu->phi() << " " << trigPartBmumu->eta() << " vertex type " << trigPartBmumu->particleType() ); - - if ( !m_noId ) { - //const ElementLink< xAOD::TrackParticleContainer >& track1EL = m_muon1->idTrackLink(); - //const ElementLink< xAOD::TrackParticleContainer >& track2EL = m_muon2->idTrackLink(); - ElementLink< xAOD::TrackParticleContainer > track1EL = m_muon1->idTrackLink(); - ElementLink< xAOD::TrackParticleContainer > track2EL = m_muon2->idTrackLink(); - // note - the above tracks have HLT autokey - need to remap to pers. container - // no garauntee that some slimming won't latter mess this up - better to use TDT in analysis - ElementLinkVector< xAOD::TrackParticleContainer > newContainer1, newContainer2; - if (HLT::OK != getFeaturesLinks<xAOD::TrackParticleContainer,xAOD::TrackParticleContainer>(inputTE[0],newContainer1,m_combinedMuonIDTrackKey)) { - ATH_MSG_DEBUG("No elv trkcon roi0" ); - - } - if (HLT::OK != getFeaturesLinks<xAOD::TrackParticleContainer,xAOD::TrackParticleContainer>(inputTE[1],newContainer2,m_combinedMuonIDTrackKey)) { - ATH_MSG_DEBUG("No elv trkcon roi1" ); - } - ATH_MSG_DEBUG("Before mapping: Valid " << track1EL.isValid() << " " << track2EL.isValid() ); - ATH_MSG_DEBUG("V1 " << track1EL.dataID() << " " << track1EL.index() ); - ATH_MSG_DEBUG("V2 " << track2EL.dataID() << " " << track2EL.index() ); - track1EL = remap_container(track1EL,newContainer1); - track2EL = remap_container(track2EL,newContainer2); - - ATH_MSG_DEBUG("Just check track links... Valid " << track1EL.isValid() << " " << track2EL.isValid() ); - ATH_MSG_DEBUG("V1 " << track1EL.dataID() << " " << track1EL.index() << "V2 " << track2EL.dataID() << " " << track2EL.index() ); - ATH_MSG_DEBUG("Track 1 pT " << (*track1EL)->pt()<< " eta: " << (*track1EL)->eta() << " phi: " << (*track1EL)->phi() - << "Track 2 pT " << (*track2EL)->pt()<< " eta: " << (*track2EL)->eta() << " phi: " << (*track2EL)->phi() ); - - trigPartBmumu->addTrackParticleLink(track1EL); - trigPartBmumu->addTrackParticleLink(track2EL); - - ATH_MSG_DEBUG("JWPtl1: " << muonXEL[0].isValid() << " " << muonXEL[0].dataID() << " " << muonXEL[0].index() ); - ATH_MSG_DEBUG("JWPt12: " << muonXEL[1].isValid() << " " << muonXEL[1].dataID() << " " << muonXEL[1].index() ); - - ElementLinkVector< xAOD::L2CombinedMuonContainer > muonContainerComb1,muonContainerComb2; - if (HLT::OK != getFeaturesLinks<xAOD::L2CombinedMuonContainer,xAOD::L2CombinedMuonContainer>(inputTE[0],muonContainerComb1,m_combinedMuonKey)) { - ATH_MSG_DEBUG("No comb muon container" ); - } else { - ATH_MSG_DEBUG("Comb muon container: " << muonContainerComb1.size() ); - } - for (const ElementLink<xAOD::L2CombinedMuonContainer> el: muonContainerComb1) { - ATH_MSG_DEBUG("Comb muon container: " << el.dataID() << " " << el.index() ); - } - if (HLT::OK != getFeaturesLinks<xAOD::L2CombinedMuonContainer,xAOD::L2CombinedMuonContainer>(inputTE[1],muonContainerComb2,m_combinedMuonKey)) { - ATH_MSG_DEBUG("No comb muon container" ); - } else { - ATH_MSG_DEBUG("Comb muon container: " << muonContainerComb2.size() ); - } - for (const ElementLink<xAOD::L2CombinedMuonContainer> el: muonContainerComb2) { - ATH_MSG_DEBUG("Comb muon container: " << el.dataID() << " " << el.index() ); - } - ElementLink<xAOD::IParticleContainer> ptl1EL = remap_container(muonXEL[0],muonContainerComb1); - ElementLink<xAOD::IParticleContainer> ptl2EL = remap_container(muonXEL[1],muonContainerComb2); - - - //ElementLink<xAOD::IParticleContainer> ptl1EL(muonXEL[0].dataID(),muonXEL[0].index()); - //ElementLink<xAOD::IParticleContainer> ptl2EL(muonXEL[1].dataID(),muonXEL[1].index()); - trigPartBmumu->addParticleLink(ptl1EL); // - trigPartBmumu->addParticleLink(ptl2EL); // - - // set the eta and phi based on simple 4-mom - // ignore the correction mass of tracks - xAOD::IParticle::FourMom_t dimuon = (*track1EL)->p4() + (*track2EL)->p4(); - trigPartBmumu->setEta(dimuon.Rapidity()); - trigPartBmumu->setPhi(dimuon.Phi()); - - - } else { - ElementLink< xAOD::TrackParticleContainer > track1EL = muon->idTrackLink(); - ElementLinkVector< xAOD::TrackParticleContainer > newContainer1; - if (HLT::OK != getFeaturesLinks<xAOD::TrackParticleContainer,xAOD::TrackParticleContainer>(inputTE[0],newContainer1,m_combinedMuonIDTrackKey)) { - ATH_MSG_DEBUG("No elv trkcon roi0" ); - } - ATH_MSG_DEBUG("V1 " << track1EL.dataID() << " " << track1EL.index() ); - track1EL = remap_container(track1EL,newContainer1); - - ATH_MSG_VERBOSE("Just check track links... Track 1 pT " << (*track1EL)->pt() << " eta: " << (*track1EL)->eta() << " phi: " << (*track1EL)->phi() ); - // set the eta and phi based on simple 4-mom - // ignore the correction mass of tracks - xAOD::IParticle::FourMom_t saMuon; - auto pMuonFeaturep4 = pMuonFeature->p4(); - saMuon.SetPtEtaPhiM(pMuonFeature->pt() * 1000., pMuonFeaturep4.Eta(), pMuonFeaturep4.Phi(), pMuonFeaturep4.M()*1000.); - xAOD::IParticle::FourMom_t dimuon = (*track1EL)->p4() + saMuon; - - trigPartBmumu->setEta(dimuon.Eta()); - trigPartBmumu->setPhi(dimuon.Phi()); - - trigPartBmumu->addTrackParticleLink(track1EL); - ATH_MSG_DEBUG("JWnoid1: " << muonEL.dataID() << " " << muonEL.index() ); - ATH_MSG_DEBUG("JWnoid2: " << pMuonFeatureEL.dataID() << " " << pMuonFeatureEL.index() ); - - ElementLink<xAOD::IParticleContainer> tEL(muonEL.dataID(),muonEL.index()); - trigPartBmumu->addParticleLink(tEL); // use Iparticle container for standalone muon - - ElementLink<xAOD::IParticleContainer> pEL(pMuonFeatureEL.dataID(),pMuonFeatureEL.index()); - ATH_MSG_DEBUG("Inseting IParticle EL from L2Muon with: " << pEL.isValid() << " " << pEL.dataID() << " " << pEL.index() ); - trigPartBmumu->addParticleLink(pEL); // use Iparticle container for standalone muon - - } - - ///////////// Now do vertexing ///////////////// - - if ( vtxpass ) { - - // Create the vertexer - TrigL2Vertex* pL2V = new TrigL2Vertex(); - TrigVertex* p_mumuV = NULL; - StatusCode sc; - // Add tracks to the vertexer - bool addTracks = true; - for ( int i=0; i<2; i++ ) { - // #FIXME - previous code used MuonFeature::IDTrack()::chi2() / are these equivalent ... ? - if (muonX[i]->idTrack()->chiSquared() < 1e7 ) { - sc = m_vertexingTool->addTrack(muonX[i]->idTrack()->track(), pL2V, Trk::muon); - if ( sc.isFailure() ) { - ATH_MSG_DEBUG("Failed to add track " << i+1 << " to vertexingTool" ); - addTracks = false; - m_mon_Errors.push_back( ERROR_AddTrack_Fails ); - } - } else { - addTracks = false; - m_mon_Errors.push_back( ERROR_AddTrack_Fails ); - } - } - - // DO THE VERTEX-FIT - if ( addTracks ) { - m_mon_Acceptance.push_back( ACCEPT_AddTrack_Test ); - sc = m_L2vertFitter->fit(pL2V); - } - - // Check the result - if ( sc.isFailure() || (!addTracks) ) { - ATH_MSG_DEBUG("TrigL2VertexFitter failed" ); - } else { - m_mon_Acceptance.push_back( ACCEPT_Vertexing ); - // Calculate invariant mass - sc = m_vertexingTool->calculateInvariantMass(pL2V); - if ( sc.isSuccess() ) { - m_mon_Acceptance.push_back( ACCEPT_CalcInvMass ); - // Create mother particle - sc = m_vertexingTool->createMotherParticle(pL2V); - if ( sc.isSuccess() ) { - m_mon_Acceptance.push_back( ACCEPT_CalcMother ); - ATH_MSG_VERBOSE("Bs created: pT "<<pL2V->getMotherTrack()->pT() ); - } else { - m_mon_Errors.push_back( ERROR_CalcMother_Fails ); - } - p_mumuV = m_vertexingTool->createTrigVertex(pL2V); - } else { - m_mon_Errors.push_back( ERROR_CalcInvMass_Fails ); - } - } - delete pL2V; - - if ( p_mumuV == NULL ) { - ATH_MSG_DEBUG(" vertex fit failed for tracks" ); - // delete pL2V; - delete p_mumuV; - // delete trigPartBmumu; - vtxpass = false; - // continue; - } else { - m_mon_Acceptance.push_back( ACCEPT_Vertex_not_NULL ); - double chi2prob = 0.; - chi2prob = 1.0 - Genfun::CumulativeChiSquare(p_mumuV->ndof())(p_mumuV->chi2()); - ATH_MSG_DEBUG("REGTEST: mumu vertex Fit: x= y= z=" << p_mumuV->x() << " " << p_mumuV->y() << " " << p_mumuV->z() ); - ATH_MSG_DEBUG("REGTEST: Bmumu mass = " << p_mumuV->mass() ); - if (p_mumuV->massVariance() !=0) { - ATH_MSG_DEBUG("REGTEST: Bmumu mass pull = " << (p_mumuV->mass()-BSMASS)/p_mumuV->massVariance() ); - } else { - ATH_MSG_DEBUG("REGTEST: MuMu mass variance is 0 can't calculate the pull" ); - m_mon_Errors.push_back( ERROR_CalcMassPull_Fails ); - } - ATH_MSG_DEBUG("REGTEST: Chi2 vtx fit = " << p_mumuV->chi2() ); - ATH_MSG_DEBUG("SigmaX = SigmaY = SigmaZ = " << sqrt(p_mumuV->cov()[0]) << " " << sqrt(p_mumuV->cov()[2]) << " " << sqrt(p_mumuV->cov()[5]) ); - - // JK 28/4/08 changes for ElementLinks - // trigPartBmumu->pVertex(p_mumuV); - // 14-05-08 trigPartBmumu->pVertex(BMuMuVertexEL); - - // trigPartBmumu->fitmass(p_mumuV->mass()); - // trigPartBmumu->fitchi2(p_mumuV->chi2()); - // trigPartBmumu->fitndof(p_mumuV->ndof()); - // trigPartBmumu->fitx(p_mumuV->x()); - // trigPartBmumu->fity(p_mumuV->y()); - // trigPartBmumu->fitz(p_mumuV->z()); - trigPartBmumu->setFitmass(p_mumuV->mass()); - trigPartBmumu->setFitchi2(p_mumuV->chi2()); - trigPartBmumu->setFitndof(p_mumuV->ndof()); - trigPartBmumu->setFitx (p_mumuV->x()); - trigPartBmumu->setFity (p_mumuV->y()); - trigPartBmumu->setFitz (p_mumuV->z()); - - - // Monitoring of the fit results - m_mon_FitMass_wideRange .push_back( p_mumuV->mass() / CLHEP::GeV ); - m_mon_FitMass .push_back( p_mumuV->mass() / CLHEP::GeV ); - m_mon_InvMass_comb_okFit.push_back( mass / CLHEP::GeV ); - m_mon_Chi2toNDoF .push_back( p_mumuV->chi2() / p_mumuV->ndof() ); - m_mon_Chi2toNDoFProb .push_back( chi2prob ); - if ( p_mumuV->getMotherTrack() != NULL ) { - m_mon_FitTotalPt.push_back( p_mumuV->getMotherTrack()->pT() / CLHEP::GeV ); - m_mon_SumPtMutrk12_okFit.push_back( (fabs(m_muon1->idTrack()->pt()) + fabs(m_muon2->idTrack()->pt())) / CLHEP::GeV ); - } - m_mon_FitVtxR.push_back( sqrt(p_mumuV->x()*p_mumuV->x() + p_mumuV->y()*p_mumuV->y()) / CLHEP::mm ); - m_mon_FitVtxZ.push_back( p_mumuV->z() / CLHEP::mm ); - } - // Stop the vertexing timer - if ( timerSvc() ) { - m_BmmHypVtx->stop(); - m_mon_VertexingTime = m_BmmHypVtx->elapsed(); - } - } - - // Create vector for TrigL2Bphys particles - // m_trigBphysColl = new TrigL2BphysContainer(); - //m_trigBphysColl = new xAOD::TrigBphysContainer(); - - - // Append this combination to the result - // m_trigBphysColl->push_back(trigPartBmumu); - m_resultHolder.push_back(trigPartBmumu); - - // Update various counters - pass = true; - if ( vtxpass ) { - m_countPassedVtxFit++; - } - if ( mumuIDpass ) m_countPassedmumuPairs++; - m_countPassedRoIs++; - if(IdEvent != m_lastEventPassed) { - m_countPassedEvents++; - m_lastEventPassed = IdEvent; - } - - if ( timerSvc() ) { - m_BmmHypTot->stop(); - m_mon_TotalRunTime = m_BmmHypTot->elapsed(); - } - - ATH_MSG_DEBUG("End of acceptInput, pass is " << pass ); - return HLT::OK; -} - - - -/*----------------------------------------------------------------------------------------*/ -HLT::ErrorCode TrigL2BMuMuFex::hltExecute(HLT::TEConstVec& , HLT::TriggerElement* outputTE) -/*----------------------------------------------------------------------------------------*/ -{ - - ATH_MSG_DEBUG(" In TrigL2BMuMu hltExecute" ); - - // if ((m_trigBphysColl!=0) && (m_trigBphysColl->size() > 0)) { - // m_mon_Acceptance.push_back( ACCEPT_BphysColl_not_Empty ); - // ATH_MSG_DEBUG("REGTEST: Store Bphys Collection size: " << m_trigBphysColl->size() ); - // HLT::ErrorCode sc = attachFeature(outputTE, m_trigBphysColl, "L2BMuMuFex" ); - // if(sc != HLT::OK) { - // msg() << MSG::WARNING << "Failed to store trigBphys Collection" ); - // m_mon_Errors.push_back( ERROR_BphysColl_Fails ); - // return HLT::ERROR; - // } - // } else { - // ATH_MSG_DEBUG("REGTEST: no bphys collection to store " ); - // } - if (m_resultHolder.size()){ - m_mon_Acceptance.push_back( ACCEPT_BphysColl_not_Empty ); - xAOD::TrigBphysContainer * trigBphysColl = new xAOD::TrigBphysContainer; - xAOD::TrigBphysAuxContainer trigBphysAuxColl; - trigBphysColl->setStore(&trigBphysAuxColl); - - for (std::vector<xAOD::TrigBphys*>::iterator it = m_resultHolder.begin(); it != m_resultHolder.end();++it) { - trigBphysColl->push_back(*it); - }// for - m_resultHolder.clear(); - ATH_MSG_DEBUG("REGTEST: Store Bphys Collection size: " << trigBphysColl->size() ); - HLT::ErrorCode sc = attachFeature(outputTE, trigBphysColl, "L2BMuMuFex" ); - if(sc != HLT::OK) { - ATH_MSG_WARNING("Failed to store trigBphys Collection" ); - m_mon_Errors.push_back( ERROR_BphysColl_Fails ); - return HLT::ERROR; - } - } else { - ATH_MSG_DEBUG("REGTEST: no bphys collection to store " ); - } - - - return HLT::OK; -} - -bool TrigL2BMuMuFex::isUnique(const xAOD::TrackParticle* id1, const xAOD::TrackParticle* id2) const { - if (!id1 || !id2) return false; - float dEta = fabs( id1->eta() - id2->eta() ); - float dPhi = id1->phi() - id2->phi(); - while (dPhi > M_PI) dPhi -= 2*M_PI; - while (dPhi < -M_PI) dPhi += 2*M_PI; - - if( dEta < 0.02 && fabs(dPhi) < 0.02 && id1->charge() * id2->charge() > 0 ) return false; - else return true; - -} - - -ElementLink<xAOD::TrackParticleContainer> TrigL2BMuMuFex::remap_container(const ElementLink<xAOD::TrackParticleContainer> & oldElink, - const ElementLinkVector<xAOD::TrackParticleContainer> &newContainer) const { - // take a valid element link, and remap it onto already stored objects - // if original not valid, then no hope in finding new object, return the old - - // ATH_MSG_DEBUG(oldElink.isValid() << " " << (*oldElink)->pt()<< " " << (*oldElink)->phi() << " " << (*oldElink)->eta() ); - // ATH_MSG_DEBUG("Container: " << newContainer.size() ); - if (!oldElink.isValid()) return oldElink; - const auto tp = *oldElink; - - for (const ElementLink<xAOD::TrackParticleContainer> elink : newContainer) { - if (!elink.isValid()) continue; - const auto el = *elink; - - // do some simple matching: - if ( fabs(tp->pt() - el->pt() ) > 1 ) continue; - if ( fabs(tp->eta() - el->eta() ) > 0.001) continue; - double dphi = fabs(tp->phi() - el->phi()); - if (dphi > M_PI) dphi = 2*M_PI - dphi; - if (fabs(dphi) > 0.001) continue; - //ATH_MSG_DEBUG(elink.isValid() << " " - // << elink.dataID() << " " << elink.index() - // << " \n \t" << (*elink)->pt()<< " " << (*elink)->phi() << " " << (*elink)->eta() ); - - // if here, then passed the critera and assume is a match - return elink; - - } // loop over container - ATH_MSG_DEBUG(" No matching link found for remapping" ); - - // if here, then no match was found; - // best to return the original object - return oldElink; -} // remap_container - -ElementLink<xAOD::IParticleContainer> TrigL2BMuMuFex::remap_container(const ElementLink<xAOD::L2CombinedMuonContainer> & oldElink, - const ElementLinkVector<xAOD::L2CombinedMuonContainer> &newContainer) const { - // take a valid element link, and remap it onto already stored objects - // if original not valid, then no hope in finding new object, return the old - ////ATH_MSG_DEBUG("IParticle mapping" ); - //ATH_MSG_DEBUG(oldElink.isValid() << " " << (*oldElink)->pt()<< " " << (*oldElink)->phi() << " " << (*oldElink)->eta() ); - //ATH_MSG_DEBUG("Container: " << newContainer.size() ); - ElementLink<xAOD::IParticleContainer> iptlELold(oldElink.dataID(),oldElink.index()); - //ATH_MSG_DEBUG(" Valid: " << oldElink.isValid() ); - if (!oldElink.isValid()) return iptlELold; - const auto tp = *oldElink; - - for (const ElementLink<xAOD::L2CombinedMuonContainer> elink : newContainer) { - if (!elink.isValid()) continue; - const auto el = *elink; - - // do some simple matching: - if ( fabs(tp->pt() - el->pt() ) > 1 ) continue; - if ( fabs(tp->eta() - el->eta() ) > 0.001) continue; - double dphi = fabs(tp->phi() - el->phi()); - if (dphi > M_PI) dphi = 2*M_PI - dphi; - if (fabs(dphi) > 0.001) continue; - //ATH_MSG_DEBUG(elink.isValid() << " " - // << elink.dataID() << " " << elink.index() - // << " \n \t" << (*elink)->pt()<< " " << (*elink)->phi() << " " << (*elink)->eta() ); - - // if here, then passed the critera and assume is a match - //return elink; - ElementLink<xAOD::IParticleContainer> iptlEL(elink.dataID(),elink.index()); - //ATH_MSG_DEBUG("ELIparticle link: " << iptlEL.isValid() << " " - //<< iptlEL.dataID() << " " << iptlEL.index() ); - //ATH_MSG_DEBUG(" \n \t" << (*iptlEL)->pt()<< " " << (*iptlEL)->phi() << " " << (*iptlEL)->eta() ); - return iptlEL; - } // loop over container - ATH_MSG_DEBUG(" No matching link found for remapping" ); - - // if here, then no match was found; - // best to return the original object - return iptlELold; // this is the old link to the IParticle -} // remap_container diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuFex.h b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuFex.h deleted file mode 100644 index d42c15955dffd4b7c97965d792255225cd337e88..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuFex.h +++ /dev/null @@ -1,150 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// ******************************************************************* -// -// NAME: TrigL2BMuMuFex.h -// PACKAGE: Trigger/TrigHypothesis/TrigBphysHypo -// AUTHOR: Sergey Sivoklokov -// -// ******************************************************************* - -#ifndef TRIG_TrigL2BMuMuCombo_H -#define TRIG_TrigL2BMuMuCombo_H - -#include <string> - -#include "TrigInterfaces/ComboAlgo.h" - -#include "TrigInDetToolInterfaces/ITrigL2VertexFitter.h" - -//#include "TrigParticle/TrigL2BphysContainer.h" -#include "xAODTrigMuon/L2CombinedMuon.h" -#include "xAODTrigMuon/L2CombinedMuonContainer.h" - - - -#include "TrigTimeAlgs/TrigTimerSvc.h" - -class ITrigL2VertexFitter; -class ITrigVertexingTool; - -class TrigBphysHelperUtilsTool; - -class TrigL2BMuMuFex: public HLT::ComboAlgo { - - public: - - TrigL2BMuMuFex(const std::string & name, ISvcLocator* pSvcLocator); - ~TrigL2BMuMuFex(); - - HLT::ErrorCode hltInitialize(); - HLT::ErrorCode hltFinalize(); - HLT::ErrorCode hltExecute(HLT::TEConstVec& inputTE, HLT::TriggerElement* outputTE); - HLT::ErrorCode acceptInputs(HLT::TEConstVec& inputTE, bool& pass ); // TODO: move all to hltExecute ? - - private: - ToolHandle <TrigBphysHelperUtilsTool> m_bphysHelperTool; - - bool isUnique(const xAOD::TrackParticle* id1, const xAOD::TrackParticle* id2) const; - ElementLink<xAOD::TrackParticleContainer> remap_container(const ElementLink<xAOD::TrackParticleContainer> & oldElink,const ElementLinkVector<xAOD::TrackParticleContainer> &newContainer) const; - // ElementLink<xAOD::IParticleContainer> remap_container(const ElementLink<xAOD::IParticleContainer> & oldElink,const ElementLinkVector<xAOD::IParticleContainer> &newContainer) const; - ElementLink<xAOD::IParticleContainer> remap_container(const ElementLink<xAOD::L2CombinedMuonContainer> & oldElink, - const ElementLinkVector<xAOD::L2CombinedMuonContainer> &newContainer) const; - - std::string m_combinedMuonIDTrackKey,m_combinedMuonKey,m_standaloneMuonKey; - - // Variables to keep pre-results from acceptInput to hltExecute - //const CombinedMuonFeature *m_muon1; - //const CombinedMuonFeature *m_muon2; - const xAOD::L2CombinedMuon *m_muon1, *m_muon2; - - - // Configurable properties - mass window cuts - float m_lowerMassCut; - float m_upperMassCut; - - // Configurable properties - boolean switches - bool m_ApplyupperMassCut; - bool m_doVertexFit; - bool m_acceptAll; - bool m_acceptSameMuon; - bool m_oppositeCharge; - bool m_sameCharge; - bool m_noId; - - // Configurable properties - vertexing tools - ToolHandle<ITrigL2VertexFitter> m_L2vertFitter; - ToolHandle<ITrigVertexingTool> m_vertexingTool; - - // Timers - TrigTimer* m_BmmHypTot; - TrigTimer* m_BmmHypVtx; - - // Counters - int m_lastEvent; - int m_lastEventPassed; - unsigned int m_countTotalEvents; - unsigned int m_countTotalRoI; - unsigned int m_countPassedEvents; - unsigned int m_countPassedRoIs; - unsigned int m_countPassedmumuPairs; - unsigned int m_countPassedBsMass; - unsigned int m_countPassedVtxFit; - - // Output collections - - std::vector<xAOD::TrigBphys*> m_resultHolder; /// Hold results between accept and execute - - // Monitored variables - std::vector<int> m_mon_Errors; - std::vector<int> m_mon_Acceptance; - float m_mon_TotalRunTime; - std::vector<float> m_mon_ROIEta; - std::vector<float> m_mon_ROIPhi; - std::vector<float> m_mon_Roi1Roi2dEta; - std::vector<float> m_mon_Roi1Roi2dPhi; - std::vector<float> m_mon_Roi1Roi2dR; - // - two combined muons - std::vector<float> m_mon_MucombROIdR; - std::vector<float> m_mon_MucombTrkdR; - std::vector<float> m_mon_MucombPt; - std::vector<float> m_mon_MutrkPt; - std::vector<float> m_mon_MutrkPt_wideRange; - std::vector<float> m_mon_MutrkEta; - std::vector<float> m_mon_MutrkPhi; - std::vector<float> m_mon_Mutrk1Mutrk2dEta; - std::vector<float> m_mon_Mutrk1Mutrk2dPhi; - std::vector<float> m_mon_Mutrk1Mutrk2dR; - std::vector<float> m_mon_SumPtMutrk12; - std::vector<float> m_mon_InvMass_comb; - std::vector<float> m_mon_InvMass_comb_wideRange; - std::vector<float> m_mon_FitMass; - std::vector<float> m_mon_FitMass_wideRange; - std::vector<float> m_mon_InvMass_comb_okFit; - std::vector<float> m_mon_Chi2toNDoF; - std::vector<float> m_mon_Chi2toNDoFProb; - std::vector<float> m_mon_FitTotalPt; - std::vector<float> m_mon_SumPtMutrk12_okFit; - std::vector<float> m_mon_FitVtxR; - std::vector<float> m_mon_FitVtxZ; - float m_mon_VertexingTime; - // - one combined + one standalone muon - std::vector<float> m_mon_MustandROIdR; - std::vector<float> m_mon_MustandPt; - std::vector<float> m_mon_MustandPt_wideRange; - std::vector<float> m_mon_MustandEta; - std::vector<float> m_mon_MustandPhi; - std::vector<float> m_mon_MutrkMustanddEta; - std::vector<float> m_mon_MutrkMustanddPhi; - std::vector<float> m_mon_MutrkMustanddR; - std::vector<float> m_mon_SumPtMutrkMustand; - std::vector<float> m_mon_InvMass_stand; - std::vector<float> m_mon_InvMass_stand_wideRange; - - double m_massMuon; - -}; - -#endif diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuHypo.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuHypo.cxx deleted file mode 100644 index 42d6965921e1b16ebe4262c7fc4029a1e8861c71..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuHypo.cxx +++ /dev/null @@ -1,237 +0,0 @@ -// -*- C++ -*- - -/* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -*/ - -/************************************************************************** - ** - ** File: Trigger/TrigHypothesis/TrigBPhysHypo/TrigL2BMuMuHypo.cxx - ** - ** Description: L2 hypothesis algorithms for B0_s -> mu+ mu- - ** Create TrigL2Bphys - ** - ** Author: S.Sivoklokov (on the base of Carlo Schiavi example) - ** - ** Created: 05.092006 - ** Modified: 04.05.2007 Add monitoring cutcounter (from Julie's Kirk example) - ** - **************************************************************************/ - -#include "TrigL2BMuMuHypo.h" - -#include "xAODTrigger/TrigPassBits.h" - -#include "TrigBphysHelperUtilsTool.h" -#include "xAODTrigBphys/TrigBphys.h" -#include "xAODTrigBphys/TrigBphysContainer.h" - -TrigL2BMuMuHypo::TrigL2BMuMuHypo(const std::string & name, ISvcLocator* pSvcLocator): - HLT::HypoAlgo(name, pSvcLocator) -,m_bphysHelperTool("TrigBphysHelperUtilsTool") -,m_lastEvent(-1) -,m_lastEventPassed(-1) -,m_countTotalEvents(0) -,m_countTotalRoI(0) -,m_countPassedEvents(0) -,m_countPassedRoIs(0) -,m_countPassedBsMass(0) -,m_countPassedChi2Cut(0) -{ - - // Read cuts - declareProperty("AcceptAll", m_acceptAll=true); - declareProperty("AcceptSameMuon", m_acceptSameMuon=false); - declareProperty("OppositeSign", m_oppositeCharge=true); - declareProperty("LowerMassCut", m_lowerMassCut=4000.0); - declareProperty("UpperMassCut", m_upperMassCut=6000.0); - declareProperty("ApplyUpperMassCut", m_ApplyupperMassCut=true); - declareProperty("ApplyChi2Cut", m_ApplyChi2Cut=true); - declareProperty("Chi2VtxCut", m_Chi2VtxCut=20.0); - - declareMonitoredVariable( "CutCounter", m_mon_cutCounter); - declareMonitoredStdContainer("MuMumass", m_mon_MuMumass , AutoClear); - - -} - -TrigL2BMuMuHypo::~TrigL2BMuMuHypo() -{ } - -HLT::ErrorCode TrigL2BMuMuHypo::hltInitialize() -{ - - ATH_MSG_DEBUG("AcceptAll = " << (m_acceptAll==true ? "True" : "False")); - ATH_MSG_DEBUG("OppositeCharge = " << (m_oppositeCharge==true ? "True" : "False")); - ATH_MSG_DEBUG("LowerMassCut = " << m_lowerMassCut); - ATH_MSG_DEBUG("UpperMassCut = " << m_upperMassCut); - ATH_MSG_DEBUG("ApplyUpperMassCut = " << m_ApplyupperMassCut); - ATH_MSG_DEBUG("ApplyChi2Cut = " << m_ApplyChi2Cut); - ATH_MSG_DEBUG("Chi2Cut = " << m_Chi2VtxCut); - - m_lastEvent = -1; - m_lastEventPassed = -1; - m_countTotalEvents =0; - m_countTotalRoI =0; - m_countPassedEvents =0; - m_countPassedRoIs =0; - m_countPassedBsMass =0; - m_countPassedChi2Cut =0; - - if (m_bphysHelperTool.retrieve().isFailure()) { - ATH_MSG_ERROR("Can't find TrigBphysHelperUtilsTool"); - return HLT::BAD_JOB_SETUP; - } else { - ATH_MSG_DEBUG("TrigBphysHelperUtilsTool found"); - } - - return HLT::OK; -} - -HLT::ErrorCode TrigL2BMuMuHypo::hltFinalize() -{ - ATH_MSG_INFO("in finalize()"); - ATH_MSG_INFO("|----------------------- SUMMARY FROM TrigL2BMuMuHypo -------------|"); - ATH_MSG_INFO("Run on events/2xRoIs " << m_countTotalEvents << "/" << m_countTotalRoI); - ATH_MSG_INFO("Passed events/2xRoIs " << m_countPassedEvents << "/" << m_countPassedRoIs); - ATH_MSG_INFO("RoIs Passed BsMass: " << m_countPassedBsMass); - - return HLT::OK; -} - -//------------------------------------------------------------------------------------- -HLT::ErrorCode TrigL2BMuMuHypo::hltExecute(const HLT::TriggerElement* outputTE, bool& pass) -{ - - //const double BSMASS = 5369.3; - //const double BDMASS = 5279.2; - - //bool PassedMuMuPair=false; - bool PassedBsMass=false; - bool PassedChi2Cut=false; - bool result = false; - m_mon_cutCounter = -1; - // Retrieve event info - //int IdRun = 0; - int IdEvent = 0; - - // event info - uint32_t runNumber(0), evtNumber(0), lbBlock(0); - if (m_bphysHelperTool->getRunEvtLb( runNumber, evtNumber, lbBlock).isFailure()) { - ATH_MSG_ERROR("Error retriving EventInfo"); - } - //IdRun = runNumber; - IdEvent = evtNumber; - - if (IdEvent != m_lastEvent) { - m_countTotalEvents++; - m_lastEvent=IdEvent; - } - m_countTotalRoI++; - - - // Accept-All mode: temporary patch; should be done with force-accept - if (m_acceptAll) { - pass = true; - //return HLT::OK; - } - ATH_MSG_DEBUG("AcceptAll is set to : " << (m_acceptAll ? "True, taking all events " : "False, applying selection" )); - - // create vector for TrigL2Bphys particles - // const TrigL2BphysContainer* trigBphysColl = 0; - const xAOD::TrigBphysContainer* trigBphysColl(nullptr); - - HLT::ErrorCode status = getFeature(outputTE, trigBphysColl, "L2BMuMuFex"); - - if ( status != HLT::OK ) { - ATH_MSG_WARNING("Failed to get TrigBphysics collection"); - ATH_MSG_DEBUG(" End of HLTexecute, pass= " << pass); - return HLT::OK; - } - - ATH_MSG_DEBUG(" Retrieved Bphys collection trigBphysColl = " << trigBphysColl); - if ( trigBphysColl == 0 ) { - ATH_MSG_DEBUG("No Bphys particles to analyse, leaving!"); - return HLT::OK; - } - ATH_MSG_DEBUG("Got TrigBphys collection with " << trigBphysColl->size() << " TrigBphys particles "); - - // if no Bphys particles were found, just leave TrigBphysColl. empty and leave - if ( trigBphysColl->size() == 0 ) { - ATH_MSG_DEBUG("No Bphys particles to analyse, leaving!"); - return HLT::OK; - } - - m_mon_cutCounter = 0; - - //TrigPassBits *bits = HLT::makeTrigPassBits(trigBphysColl); - std::unique_ptr<xAOD::TrigPassBits> xBits = xAOD::makeTrigPassBits<xAOD::TrigBphysContainer>(trigBphysColl); - - // now loop over Bphys particles to see if one passes cuts - for (xAOD::TrigBphysContainer::const_iterator bphysIter = trigBphysColl->begin(); bphysIter != trigBphysColl->end(); ++bphysIter) { - - if ((*bphysIter)->particleType() == xAOD::TrigBphys::BMUMU ) { - ATH_MSG_DEBUG("Got Bphys partcile with mass " << (*bphysIter)->mass() << " and chi2 " << (*bphysIter)->fitchi2()); - - if(m_acceptSameMuon && (*bphysIter)->mass() < 0.) { - PassedBsMass = true; - PassedChi2Cut = true; - //HLT::markPassing(bits, *bphysIter, trigBphysColl); - xBits->markPassing((*bphysIter),trigBphysColl,true); - ATH_MSG_DEBUG("Candidate with mass " << (*bphysIter)->mass() << " accepted as AcceptSameMuon is set"); - } - - float BsMass = (*bphysIter)->mass(); - bool thisPassedBsMass = (m_lowerMassCut < BsMass && (BsMass < m_upperMassCut || (!m_ApplyupperMassCut))); - // PassedBsMass |= thisPassedBsMass; - - bool thisPassedChi2Cut = ((!m_ApplyChi2Cut) || ((*bphysIter)->fitchi2() < m_Chi2VtxCut && (*bphysIter)->fitchi2() != -99) ); - // PassedChi2Cut |= thisPassedChi2Cut; - if (thisPassedBsMass || (m_acceptSameMuon && (*bphysIter)->mass() < 0.) ) m_mon_MuMumass.push_back((BsMass*0.001)); - - if (thisPassedBsMass) { - m_countPassedBsMass++; - m_mon_cutCounter++; - if (thisPassedChi2Cut) { - m_countPassedChi2Cut++; - m_mon_cutCounter++; - } - } - - if( thisPassedBsMass && thisPassedChi2Cut ) - { - PassedBsMass = true; - PassedChi2Cut = true; - //HLT::markPassing(bits, *bphysIter, trigBphysColl); - xBits->markPassing((*bphysIter),trigBphysColl,true); - } - } - } - - /* - if (PassedBsMass) { - m_countPassedBsMass++; - m_mon_cutCounter++; - } - if (PassedChi2Cut) { m_countPassedChi2Cut++; m_mon_cutCounter++; } - */ - - if ( PassedBsMass && PassedChi2Cut ) { - result = true; - } - - if (result) { - m_countPassedRoIs++; - if (IdEvent!= m_lastEventPassed) { - m_countPassedEvents++; - m_lastEventPassed=IdEvent; - } - pass=true; - } - - // store result - if(attachFeature(outputTE, xBits.release(),"passbits") != HLT::OK) - ATH_MSG_ERROR("Could not store TrigPassBits! "); - ATH_MSG_DEBUG("End of hltExecute, passMass, passChi2, pass= " << PassedBsMass << " " << PassedChi2Cut << " " << pass); - return HLT::OK; -} diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuHypo.h b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuHypo.h deleted file mode 100644 index 4f7d363085eaab034193e892e734e8e3e1e63907..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuHypo.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/************************************************************************** - ** - ** File: Trigger/TrigHypothesis/TrigBphysHypo/TrigL2BMuMuFex.h - ** - ** Description: L2 hypothesis algorithms for B0_s -> mu+ mu- - ** Create TrigL2Bphys - ** - ** Author: S.Sivoklokov (on the base of Carlo Schiavi example) - ** - ** Created: 05.092006 - ** Modified: - ** - **************************************************************************/ - -#ifndef TRIG_TrigL2BMuMuHypo_H -#define TRIG_TrigL2BMuMuHypo_H - -// standard stuff -#include <string> -// general athena stuff -#include "TrigInterfaces/HypoAlgo.h" - -class TrigBphysHelperUtilsTool; - - -class TrigL2BMuMuHypo: public HLT::HypoAlgo { - - public: - TrigL2BMuMuHypo(const std::string & name, ISvcLocator* pSvcLocator); - ~TrigL2BMuMuHypo(); - HLT::ErrorCode hltInitialize(); - //StatusCode execute(); - HLT::ErrorCode hltFinalize(); - HLT::ErrorCode hltExecute(const HLT::TriggerElement* outputTE, bool& pass); - - private: - ToolHandle <TrigBphysHelperUtilsTool> m_bphysHelperTool; - - - // Mass window cuts - bool m_oppositeCharge; - float m_lowerMassCut; - float m_upperMassCut; - bool m_ApplyupperMassCut; - bool m_ApplyChi2Cut; - float m_Chi2VtxCut; - - // to set Accept-All mode: should be done with force-accept when possible - bool m_acceptAll; - - bool m_acceptSameMuon; - - - //Counters - int m_lastEvent; - int m_lastEventPassed; - unsigned int m_countTotalEvents; - unsigned int m_countTotalRoI; - unsigned int m_countPassedEvents; - unsigned int m_countPassedRoIs; - unsigned int m_countPassedBsMass; - unsigned int m_countPassedChi2Cut; - - /* monitored variables */ - int m_mon_cutCounter; - std::vector<float> m_mon_MuMumass; - -}; - -#endif diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuXFex.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuXFex.cxx deleted file mode 100644 index a08a88b5ce86746bd7af01be737f55e371f8b00e..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuXFex.cxx +++ /dev/null @@ -1,3100 +0,0 @@ -// -*- C++ -*- - -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -/************************************************************************** - ** - ** File: Trigger/TrigHypothesis/TrigBPhysHypo/TrigL2BMuMuXFex.cxx - ** - ** Description: L2 hypothesis algorithms for B+/- -> K+/- mu+ mu-, Bd -> K* mu+ mu-, Bs -> Phi(1020) mu+ mu-, Lb -> L mu+ mu- - ** Create TrigL2Bphys - ** Change log: (20.2.2010 Lb->LMuMu addon); (10.3.2010 monitoring addon); (11.4.2010 bugs removed); (5.5.2010 log levels downgrade); (6.6.2010 monitoring update); - ** (27.2.2011 bug fixed); - ** - ** Author: Pavel.Strachota@cern.ch - ** Semen.Turchikhin@cern.ch - ** - ** Created: 10.01.2010 based on C. Adorisio's code TrigL2DiMuFex.cxx & D. Scheirich's code TrigL2LbMuMuLFex.cxx - ** - ** Modified: 26.09.2012 : "B_c -> D_s(*) (->Phi(->K+K-)) mu+mu-" added (Leonid Gladilin <gladilin@mail.cern.ch>) - ** - ** - **************************************************************************/ - -#include "TrigL2BMuMuXFex.h" - -#include "BtrigUtils.h" - -#include "Constants.h" - -#include "TrigTimeAlgs/TrigTimerSvc.h" -#include "AthenaKernel/Timeout.h" - -#include "TrigSteeringEvent/TrigRoiDescriptor.h" - - -#include "TrigInDetToolInterfaces/ITrigL2VertexFitter.h" -#include "TrigInDetEvent/TrigL2Vertex.h" - -// additions of xAOD objects -#include "xAODEventInfo/EventInfo.h" -#include "TrigBphysHelperUtilsTool.h" -#include "TrigInDetEvent/TrigVertex.h" - -#include <math.h> - - -// temporary -#include <iostream> -#include <vector> -#include <string> -#include <algorithm> -#include <iterator> - - -template <class T> -T merge_no_dupl(const T& v1, const T& v2) { - T ret(v1); - for (typename T::const_iterator itr = v2.begin(); itr != v2.end(); ++itr) { - bool notfound = true; - for (typename T::const_iterator z = ret.begin(); z != ret.end(); ++z) { - if (*z == *itr) { - notfound = false; - break; - } - } - if (notfound) { - ret.push_back(*itr); - } - } - return ret; -} - -/*------------------------------------------------------------------------------------------*/ -TrigL2BMuMuXFex::TrigL2BMuMuXFex(const std::string & name, ISvcLocator* pSvcLocator): - HLT::ComboAlgo(name, pSvcLocator) -,m_bphysHelperTool("TrigBphysHelperUtilsTool") -,m_TotTimer(0) -,m_VtxFitTimer(0) -,m_L2vertFitter(0) -,m_vertexingTool(0) -{ -////////////////////////////// Declaration of python configurables ///////////////////////////////////////// - // Read cuts or accept all? - declareProperty("AcceptAll", m_acceptAll = false); // default = false - - - // sign & mass cuts - declareProperty("OppositeSign", m_oppositeCharge = true); // deafult = true - declareProperty("LowerMuMuMassCut", m_lowerMuMuMassCut = 100.); // default = 100.0 MeV - declareProperty("UpperMuMuMassCut", m_upperMuMuMassCut = 5500.); // default = 5500.0 MeV - declareProperty("LowerMuVtxMassCut", m_lowerMuVtxMassCut =100.); // default = 100.0 MeV - declareProperty("UpperMuVtxMassCut", m_upperMuVtxMassCut = 5500.); // default = 5500.0 MeV - declareProperty("MuVtxChi2Cut", m_muVtxChi2Cut = 40.); // default = 40.0 - - // Maximum number of decay candidates (2 mu + 1 or 2 tracks) to test - protection against TimeOuts - declareProperty("MaxNcombinations", m_maxNcombinations = 20000); - - // B+->K+MuMu cuts - declareProperty("DoB_KMuMuDecay", m_doB_KMuMuDecay = true); //Proceed B->KMuMu part of algorithm - declareProperty("LowerKMuMuMassCut", m_lowerKMuMuMassCut = 4500.); // default = 4500.0 MeV - declareProperty("UpperKMuMuMassCut", m_upperKMuMuMassCut = 5900.); // default = 5900.0 MeV - declareProperty("LowerB_KMuMuMassCutVtxOff", m_lowerB_KMuMuMassCutVtxOff = 4500.); // default = 4500.0 MeV - declareProperty("UpperB_KMuMuMassCutVtxOff", m_upperB_KMuMuMassCutVtxOff= 5900.); // default = 5900.0 MeV - declareProperty("LowerBVtxMassCut", m_lowerBVtxMassCut = 4500.); // default = 4500.0 MeV - declareProperty("UpperBVtxMassCut", m_upperBVtxMassCut = 5900.); // default = 5900.0 MeV - declareProperty("BVtxChi2Cut", m_bVtxChi2Cut = 300.); // default = 300.0 - - // Bd->K*MuMu cuts - declareProperty("DoBd_KstarMuMuDecay", m_doBd_KstarMuMuDecay = true); //Proceed Bd->K*MuMu part of algorithm - declareProperty("LowerKstar_KaonMassCut", m_lowerKstar_KaonMassCut = 600.); // default = 600.0 MeV - declareProperty("UpperKstar_KaonMassCut", m_upperKstar_KaonMassCut = 1500.); // default = 1500.0 MeV - declareProperty("LowerBd_KstarMuMuMassCut", m_lowerBd_KstarMuMuMassCut= 4300.); // default = 4600.0 MeV - declareProperty("UpperBd_KstarMuMuMassCut", m_upperBd_KstarMuMuMassCut =6300.); // default = 6300.0 MeV - declareProperty("LowerBd_KstarMuMuMassCutVtxOff", m_lowerBd_KstarMuMuMassCutVtxOff = 4600.); // default = 4600.0 MeV - declareProperty("UpperBd_KstarMuMuMassCutVtxOff", m_upperBd_KstarMuMuMassCutVtxOff= 6300.); // default = 6300.0 MeV - declareProperty("LowerKstarVtxMassCut", m_lowerKstarVtxMassCut = 600.); // default = 600.0 MeV - declareProperty("UpperKstarVtxMassCut", m_upperKstarVtxMassCut= 1200.); // default = 1200.0 MeV - declareProperty("LowerBdVtxMassCut", m_lowerBdVtxMassCut = 4600.); // default = 4600.0 MeV - declareProperty("UpperBdVtxMassCut", m_upperBdVtxMassCut = 6000.); // default = 6000.0 MeV - declareProperty("KstarVtxChi2Cut", m_kStarVtxChi2Cut = 60.); // default = 60.0 - declareProperty("BdVtxChi2Cut", m_bDVtxChi2Cut = 60.); // default = 60.0 - - // Bs->PhiMuMu cuts - declareProperty("DoBs_Phi1020MuMuDecay", m_doBs_Phi1020MuMuDecay = true); //Proceed Bs->PhiMuMu part of algorithm - declareProperty("LowerPhi1020_KaonMassCut", m_lowerPhi1020_KaonMassCut = 990.); // default = 990.0 MeV - declareProperty("UpperPhi1020_KaonMassCut", m_upperPhi1020_KaonMassCut = 1050.); // default = 1050.0 MeV - declareProperty("LowerBs_Phi1020MuMuMassCut", m_lowerBs_Phi1020MuMuMassCut = 5000.); // default = 5000.0 MeV - declareProperty("UpperBs_Phi1020MuMuMassCut", m_upperBs_Phi1020MuMuMassCut = 5800.); // default = 5800.0 MeV - declareProperty("LowerBs_Phi1020MuMuMassCutVtxOff", m_lowerBs_Phi1020MuMuMassCutVtxOff = 5000.); // default = 5000.0 MeV - declareProperty("UpperBs_Phi1020MuMuMassCutVtxOff", m_upperBs_Phi1020MuMuMassCutVtxOff = 5800.); // default = 5800.0 MeV - declareProperty("LowerPhi1020VtxMassCut", m_lowerPhi1020VtxMassCut = 990.); // default = 990.0 MeV - declareProperty("UpperPhi1020VtxMassCut", m_upperPhi1020VtxMassCut = 1060.); // default = 1060.0 MeV - declareProperty("LowerBsVtxMassCut", m_lowerBsVtxMassCut = 5000.); // default = 5000.0 MeV - declareProperty("UpperBsVtxMassCut", m_upperBsVtxMassCut = 5800.); // default = 5800.0 MeV - declareProperty("Phi1020VtxChi2Cut", m_phi1020VtxChi2Cut = 60.); // default = 60.0 - declareProperty("BsVtxChi2Cut", m_bSVtxChi2Cut = 60.); // default = 60.0 - - // Lb->LMuMu cuts // cuts optimalization in progress - declareProperty("DoLb_LambdaMuMuDecay", m_doLb_LambdaMuMuDecay = true); //Proceed Lb->LMuMu part of algorithm - declareProperty("LowerLambda_PrPiMassCut", m_lowerLambda_PrPiMassCut = 1040.); // optimal = 1080.0 MeV - declareProperty("UpperLambda_PrPiMassCut", m_upperLambda_PrPiMassCut = 1220.); // default = 2 500.0 MeV - declareProperty("LowerLb_LambdaMuMuMassCut", m_lowerLb_LambdaMuMuMassCut = 5090.); // default = 1 000.0 MeV - declareProperty("UpperLb_LambdaMuMuMassCut", m_upperLb_LambdaMuMuMassCut = 6270.); // default = 10 000.0 MeV - declareProperty("LowerLb_LambdaMuMuMassCutVtxOff", m_lowerLb_LambdaMuMuMassCutVtxOff = 5090.); // default = 2 000.0 MeV - declareProperty("UpperLb_LambdaMuMuMassCutVtxOff", m_upperLb_LambdaMuMuMassCutVtxOff = 6270.); // default = 8 000.0 MeV - declareProperty("LowerLambdaVtxMassCut", m_lowerLambdaVtxMassCut = 1070.); // default = 200.0 MeV - declareProperty("UpperLambdaVtxMassCut", m_upperLambdaVtxMassCut = 1160.); // default = 2 000.0 MeV - declareProperty("LambdaVtxChi2Cut", m_lambdaVtxChi2Cut = 100.); // default = 500.0 MeV - declareProperty("LowerLbVtxMassCut", m_lowerLbVtxMassCut = 4800.); // default = 1 000.0 MeV - declareProperty("UpperLbVtxMassCut", m_upperLbVtxMassCut = 6100.); // default = 10 000.0 MeV - declareProperty("LbVtxChi2Cut", m_lBVtxChi2Cut = 100.); // default = 500.0 - // cuts below anre not used now -// declareProperty("LbVtxDistanceCut", m_lBVtxDistanceCut = 0.); // default = 0.0 -// declareProperty("PiImpactCut", m_piImpactCut = 0.); // default = 0.0 -// declareProperty("PrImpactCut", m_prImpactCut = 0.); // default = 0.0 - - // Bc->Ds(->Phi(->K+K-))MuMu cuts - declareProperty("DoBc_DsMuMuDecay", m_doBc_DsMuMuDecay = true); //Proceed Bc->DsMuMu part of algorithm - declareProperty("LowerPhiDs_MassCut", m_lowerPhiDs_MassCut = 980.); // default = 980.0 MeV - declareProperty("UpperPhiDs_MassCut", m_upperPhiDs_MassCut = 1080.); // default = 1080.0 MeV - declareProperty("LowerDs_MassCut", m_lowerDs_MassCut = 1550.); // default = 1550.0 MeV - declareProperty("UpperDs_MassCut", m_upperDs_MassCut = 2450.); // default = 2450.0 MeV - declareProperty("LowerBc_DsMuMuMassCut", m_lowerBc_DsMuMuMassCut = 1750.); // default = 1750.0 MeV - declareProperty("UpperBc_DsMuMuMassCut", m_upperBc_DsMuMuMassCut = 7100.); // default = 7100.0 MeV - - declareProperty("LowerBc_DsMuMuMassCutVtxOff", m_lowerBc_DsMuMuMassCutVtxOff = 1800.); // default = 1800.0 MeV - declareProperty("UpperBc_DsMuMuMassCutVtxOff", m_upperBc_DsMuMuMassCutVtxOff = 7100.); // default = 7100.0 MeV - - declareProperty("LowerDsVtxMassCut", m_lowerDsVtxMassCut = 1600.); // default = 1600.0 MeV - declareProperty("UpperDsVtxMassCut", m_upperDsVtxMassCut = 2400.); // default = 2400.0 MeV - - declareProperty("LowerBcVtxMassCut", m_lowerBcVtxMassCut = 1800.); // default = 1800.0 MeV - declareProperty("UpperBcVtxMassCut", m_upperBcVtxMassCut = 7050.); // default = 7050.0 MeV - - declareProperty("DsVtxChi2Cut", m_DsVtxChi2Cut = 90.); // default = 90.0 - declareProperty("BcVtxChi2Cut", m_bCVtxChi2Cut = 120.); // default = 120.0 - - // - // Vertexing flags - // - // vertexing on/off - declareProperty("DoVertexFit", m_doVertexFit = false); // vertexing on/off (global), default = true - // muon pair vertex - declareProperty("DoMuMuVertexFit", m_doMuMuVertexFit = true); // mumu pair vertexing, default = true - // B+->K+MuMu - declareProperty("DoB_KMuMuVertexFit", m_doB_KMuMuVertexFit = true); // kaon&mu&mu vertexing, default = true - // Bd->K*MuMu - declareProperty("DoKstar_KaonPionVertexFit", m_doKstar_KaonPionVertexFit = true); // kaon pion vertexing, default = true - declareProperty("DoBd_KstarMuMuVertexFit", m_doBd_KstarMuMuVertexFit = true); // kaon&pion&mu&mu vertexing, default = true - // Bs->PhiMuMu - declareProperty("DoPhi1020_KaonKaonVertexFit", m_doPhi1020_KaonKaonVertexFit = true); // kaon kaon vertexing, default = true - declareProperty("DoBs_Phi1020MuMuVertexFit", m_doBs_Phi1020MuMuVertexFit = true); // kaon&kaon&mu&mu vertexing, default = true - // Lb->MuMuL - declareProperty("DoLambda_ProtonPionVertexFit", m_doLambda_ProtonPionVertexFit = true); // default = true - declareProperty("DoLb_LambdaMuMuVertexFit", m_doLb_LambdaMuMuVertexFit = false); // p&pi&mu&mu vertexing default = true - // Bc->MuMuDs - declareProperty("DoDs_PhiPionVertexFit", m_doDs_PhiPionVertexFit = true); // default = true - declareProperty("DoBc_DsMuMuVertexFit", m_doBc_DsMuMuVertexFit = false); // kaon&kaon&pi&mu&mu vertexing default = true - - -////////////////////////////// end of python configurables ///////////////////////////////////////////////// - -////////////////////////////// Declaration of vertexing tools - now in initialization ////////////////////////////////////////////// -// m_vertFitter("TrigVertexFitter",this), -// m_L2vertFitter("TrigL2VertexFitter",this), -// m_vertexingTool("TrigVertexingTool",this); - // Read properties -// declareProperty("TrigVertexFitter" , m_vertFitter); -// declareProperty("TrigL2VertexFitter", m_L2vertFitter); -// declareProperty("TrigVertexingTool" , m_vertexingTool, "TrigVertexingTool"); -////////////////////////////// end of vertexing tools ////////////////////////////////////////////////////// - -////////////////////////////// Declaration of variables for monitoring histograms ////////////////////////// -// main graphs with general content - declareMonitoredStdContainer("Errors" , m_mon_Errors , AutoClear); // OK add Bmumux to the name of the varible? - declareMonitoredStdContainer("Acceptance" , m_mon_Acceptance , AutoClear); // OK - -// graphs with LVL1 parameters - declareMonitoredStdContainer("ROIsEta" , m_mon_ROIsEta , AutoClear); // OK both rois parameters to this one - declareMonitoredStdContainer("ROIsPhi" , m_mon_ROIsPhi , AutoClear); // OK both rois parameters to this one - //declareMonitoredStdContainer("DeltaROIsEta" , m_mon_deltaROIsEta , AutoClear); // OK both rois parameters to this one - //declareMonitoredStdContainer("DeltaROIsPhi" , m_mon_deltaROIsPhi , AutoClear); // OK both rois parameters to this one - //declareMonitoredStdContainer("DeltaROIsR" , m_mon_deltaROIsR , AutoClear); // OK both rois parameters to this one - declareMonitoredStdContainer("nTracks" , m_mon_nTracks , AutoClear); // OK = number of tracks in collection? - //declareMonitoredStdContainer("DeltaEtaMuMu", , m_mon_dEtaMuMu , AutoClear); // OK = dEta for muons - //declareMonitoredStdContainer("DeltaPhiMuMu" , m_mon_dPhiMuMu , AutoClear); // OK = dPhi for muons - //declareMonitoredStdContainer("DeltaRMuMu" , m_mon_dRMuMu , AutoClear); // OK = dR for muons - declareMonitoredStdContainer("EtaTracks" , m_mon_etaTracks , AutoClear); // OK = eta of all tracks - declareMonitoredStdContainer("PhiTracks" , m_mon_phiTracks , AutoClear); // OK = phi of all tracks - declareMonitoredStdContainer("PtTracks" , m_mon_pTTracks , AutoClear); // OK = eta of all tracks - -// graphs with muons parameters - declareMonitoredStdContainer("Muon1Eta" , m_mon_muon1Eta , AutoClear); // OK - declareMonitoredStdContainer("Muon1Phi" , m_mon_muon1Phi , AutoClear); // OK - declareMonitoredStdContainer("Muon1Pt" , m_mon_muon1Pt , AutoClear); // OK - declareMonitoredStdContainer("Muon1Z0" , m_mon_muon1Z0 , AutoClear); // OK - declareMonitoredStdContainer("Muon1A0" , m_mon_muon1A0 , AutoClear); // OK - declareMonitoredStdContainer("Muon2Eta" , m_mon_muon2Eta , AutoClear); // OK - declareMonitoredStdContainer("Muon2Phi" , m_mon_muon2Phi , AutoClear); // OK - declareMonitoredStdContainer("Muon2Pt" , m_mon_muon2Pt , AutoClear); // OK - declareMonitoredStdContainer("Muon2Z0" , m_mon_muon2Z0 , AutoClear); // OK - declareMonitoredStdContainer("Muon2A0" , m_mon_muon2A0 , AutoClear); // OK - -// graphs with B+/- -> K+/- mu+ mu- - // before/no vertexing - declareMonitoredStdContainer("BMuMuK_InvMass_B" , m_mon_BMuMuK_InvMass_B , AutoClear); // OK = invariant mass of K+&Mu&Mu - declareMonitoredStdContainer("BMuMuK_PtB_K" , m_mon_BMuMuK_PtB_K , AutoClear); // OK = pt of K+ tracks - declareMonitoredStdContainer("BMuMuK_EtaB_K" , m_mon_BMuMuK_EtaB_K , AutoClear); // OK = eta of K+ tracks - declareMonitoredStdContainer("BMuMuK_PhiB_K" , m_mon_BMuMuK_PhiB_K , AutoClear); // OK = phi of K+ tracks - // after vertexing - declareMonitoredStdContainer("BMuMuK_VtxMass_B" , m_mon_BMuMuK_VtxMass_B , AutoClear); // OK = vertex mass of K&Mu&Mu - declareMonitoredStdContainer("BMuMuK_Chi2toNDoF_B" , m_mon_BMuMuK_Chi2toNDoF_B , AutoClear); // OK = chi2/ndof of B vertex - declareMonitoredStdContainer("BMuMuK_VtxPtB_K" , m_mon_BMuMuK_VtxPtB_K , AutoClear); // OK = pt of K tracks after vertexing - declareMonitoredStdContainer("BMuMuK_VtxEtaB_K" , m_mon_BMuMuK_VtxEtaB_K , AutoClear); // OK = eta of K tracks after vertexing - declareMonitoredStdContainer("BMuMuK_VtxPhiB_K" , m_mon_BMuMuK_VtxPhiB_K , AutoClear); // OK = phi of K tracks after vertexing - - -// graphs with Bs -> Phi mu+ mu- - // before/no vertexing - declareMonitoredStdContainer("BsMuMuPhi_InvMassBs_Phi" , m_mon_BsMuMuPhi_InvMassBs_Phi , AutoClear); // OK = invariant mass of Phi - declareMonitoredStdContainer("BsMuMuPhi_InvMass_Bs" , m_mon_BsMuMuPhi_InvMass_Bs , AutoClear); // OK = invariant mass of Phi&Mu&Mu - declareMonitoredStdContainer("BsMuMuPhi_PtPhi_Kp" , m_mon_BsMuMuPhi_PtPhi_Kp , AutoClear); // OK = pt of kstar's daughter tracks - declareMonitoredStdContainer("BsMuMuPhi_EtaPhi_Kp" , m_mon_BsMuMuPhi_EtaPhi_Kp , AutoClear); // OK = eta of kstar's daughter tracks - declareMonitoredStdContainer("BsMuMuPhi_PhiPhi_Kp" , m_mon_BsMuMuPhi_PhiPhi_Kp , AutoClear); // OK = phi of kstar's daughter tracks - declareMonitoredStdContainer("BsMuMuPhi_PtPhi_Km" , m_mon_BsMuMuPhi_PtPhi_Km , AutoClear); // OK = pt of kstar's daughter tracks - declareMonitoredStdContainer("BsMuMuPhi_EtaPhi_Km" , m_mon_BsMuMuPhi_EtaPhi_Km , AutoClear); // OK = eta of kstar's daughter tracks - declareMonitoredStdContainer("BsMuMuPhi_PhiPhi_Km" , m_mon_BsMuMuPhi_PhiPhi_Km , AutoClear); // OK = phi of kstar's daughter tracks - // after K* vertexing - declareMonitoredStdContainer("BsMuMuPhi_VtxMassBs_Phi" , m_mon_BsMuMuPhi_VtxMassBs_Phi , AutoClear); // OK = vertex mass of kaon&kaon - declareMonitoredStdContainer("BsMuMuPhi_Chi2toNDoFBs_Phi" , m_mon_BsMuMuPhi_Chi2toNDoFBs_Phi, AutoClear); // OK = chi2/ndof of Phi vertex - declareMonitoredStdContainer("BsMuMuPhi_VtxPtPhi_Kp" , m_mon_BsMuMuPhi_VtxPtPhi_Kp , AutoClear); // OK = pT of phi's daughter tracks after vertex - declareMonitoredStdContainer("BsMuMuPhi_VtxEtaPhi_Kp" , m_mon_BsMuMuPhi_VtxEtaPhi_Kp , AutoClear); // OK = eta of phi's daughter tracks after vertex - declareMonitoredStdContainer("BsMuMuPhi_VtxPhiPhi_Kp" , m_mon_BsMuMuPhi_VtxPhiPhi_Kp , AutoClear); // OK = phi of phi's daughter tracks after vertex - declareMonitoredStdContainer("BsMuMuPhi_VtxPtPhi_Km" , m_mon_BsMuMuPhi_VtxPtPhi_Km , AutoClear); // OK = pT of phi's daughter tracks after vertex - declareMonitoredStdContainer("BsMuMuPhi_VtxEtaPhi_Km" , m_mon_BsMuMuPhi_VtxEtaPhi_Km , AutoClear); // OK = eta of phi's daughter tracks after vertex - declareMonitoredStdContainer("BsMuMuPhi_VtxPhiPhi_Km" , m_mon_BsMuMuPhi_VtxPhiPhi_Km , AutoClear); // OK = phi of phi's daughter tracks after vertex - // after Bd vertexing - declareMonitoredStdContainer("BsMuMuPhi_VtxMass_Bs" , m_mon_BsMuMuPhi_VtxMass_Bs , AutoClear); // OK = vertex mass of phi&Mu&Mu - declareMonitoredStdContainer("BsMuMuPhi_Chi2toNDoF_Bs" , m_mon_BsMuMuPhi_Chi2toNDoF_Bs , AutoClear); // OK = chi2/ndof of Bs vertex - declareMonitoredStdContainer("BsMuMuPhi_VtxPtBs_Kp" , m_mon_BsMuMuPhi_VtxPtBs_Kp , AutoClear); // OK = pT of phi's daughter tracks after vertex - declareMonitoredStdContainer("BsMuMuPhi_VtxEtaBs_Kp" , m_mon_BsMuMuPhi_VtxEtaBs_Kp , AutoClear); // OK = eta of phi's daughter tracks after vertex - declareMonitoredStdContainer("BsMuMuPhi_VtxPhiBs_Kp" , m_mon_BsMuMuPhi_VtxPhiBs_Kp , AutoClear); // OK = phi of phi's daughter tracks after vertex - declareMonitoredStdContainer("BsMuMuPhi_VtxPtBs_Km" , m_mon_BsMuMuPhi_VtxPtBs_Km , AutoClear); // OK = pT of phi's daughter tracks after vertex - declareMonitoredStdContainer("BsMuMuPhi_VtxEtaBs_Km" , m_mon_BsMuMuPhi_VtxEtaBs_Km , AutoClear); // OK = eta of phi's daughter tracks after vertex - declareMonitoredStdContainer("BsMuMuPhi_VtxPhiBs_Km" , m_mon_BsMuMuPhi_VtxPhiBs_Km , AutoClear); // OK = phi of phi's daughter tracks after vertex -// graphs with B0 -> K* mu+ mu- - // before/no vertexing - declareMonitoredStdContainer("BdMuMuKs_InvMassBd_Ks" , m_mon_BdMuMuKs_InvMassBd_Ks , AutoClear); // OK = invariant mass of Kstar - declareMonitoredStdContainer("BdMuMuKs_InvMass_Bd" , m_mon_BdMuMuKs_InvMass_Bd , AutoClear); // OK = invariant mass of Kstar&Mu&Mu - declareMonitoredStdContainer("BdMuMuKs_PtKs_Ka" , m_mon_BdMuMuKs_PtKs_Ka , AutoClear); // OK = pt of kstar's daughter tracks - declareMonitoredStdContainer("BdMuMuKs_EtaKs_Ka" , m_mon_BdMuMuKs_EtaKs_Ka , AutoClear); // OK = eta of kstar's daughter tracks - declareMonitoredStdContainer("BdMuMuKs_PhiKs_Ka" , m_mon_BdMuMuKs_PhiKs_Ka , AutoClear); // OK = phi of kstar's daughter tracks - declareMonitoredStdContainer("BdMuMuKs_PtKs_Pi" , m_mon_BdMuMuKs_PtKs_Pi , AutoClear); // OK = pt of kstar's daughter tracks - declareMonitoredStdContainer("BdMuMuKs_EtaKs_Pi" , m_mon_BdMuMuKs_EtaKs_Pi , AutoClear); // OK = eta of kstar's daughter tracks - declareMonitoredStdContainer("BdMuMuKs_PhiKs_Pi" , m_mon_BdMuMuKs_PhiKs_Pi , AutoClear); // OK = phi of kstar's daughter tracks - // after K* vertexing - declareMonitoredStdContainer("BdMuMuKs_VtxMassBd_Ks" , m_mon_BdMuMuKs_VtxMassBd_Ks , AutoClear); // OK = vertex mass of kaon&pion - declareMonitoredStdContainer("BdMuMuKs_Chi2toNDoFBd_Ks" , m_mon_BdMuMuKs_Chi2toNDoFBd_Ks, AutoClear); // OK = chi2/ndof of K* vertex - declareMonitoredStdContainer("BdMuMuKs_VtxPtKs_Ka" , m_mon_BdMuMuKs_VtxPtKs_Ka , AutoClear); // OK = pT of kstar's daughter tracks after vertex - declareMonitoredStdContainer("BdMuMuKs_VtxEtaKs_Ka" , m_mon_BdMuMuKs_VtxEtaKs_Ka , AutoClear); // OK = eta of kstar's daughter tracks after vertex - declareMonitoredStdContainer("BdMuMuKs_VtxPhiKs_Ka" , m_mon_BdMuMuKs_VtxPhiKs_Ka , AutoClear); // OK = phi of kstar's daughter tracks after vertex - declareMonitoredStdContainer("BdMuMuKs_VtxPtKs_Pi" , m_mon_BdMuMuKs_VtxPtKs_Pi , AutoClear); // OK = pT of kstar's daughter tracks after vertex - declareMonitoredStdContainer("BdMuMuKs_VtxEtaKs_Pi" , m_mon_BdMuMuKs_VtxEtaKs_Pi , AutoClear); // OK = eta of kstar's daughter tracks after vertex - declareMonitoredStdContainer("BdMuMuKs_VtxPhiKs_Pi" , m_mon_BdMuMuKs_VtxPhiKs_Pi , AutoClear); // OK = phi of kstar's daughter tracks after vertex - // after Bd vertexing - declareMonitoredStdContainer("BdMuMuKs_VtxMass_Bd" , m_mon_BdMuMuKs_VtxMass_Bd , AutoClear); // OK = vertex mass of Kstar&Mu&Mu - declareMonitoredStdContainer("BdMuMuKs_Chi2toNDoF_Bd" , m_mon_BdMuMuKs_Chi2toNDoF_Bd , AutoClear); // OK = chi2/ndof of B0+/- vertex - declareMonitoredStdContainer("BdMuMuKs_VtxPtBd_Ka" , m_mon_BdMuMuKs_VtxPtBd_Ka , AutoClear); // OK = pT of kstar's daughter tracks after vertex - declareMonitoredStdContainer("BdMuMuKs_VtxEtaBd_Ka" , m_mon_BdMuMuKs_VtxEtaBd_Ka , AutoClear); // OK = eta of kstar's daughter tracks after vertex - declareMonitoredStdContainer("BdMuMuKs_VtxPhiBd_Ka" , m_mon_BdMuMuKs_VtxPhiBd_Ka , AutoClear); // OK = phi of kstar's daughter tracks after vertex - declareMonitoredStdContainer("BdMuMuKs_VtxPtBd_Pi" , m_mon_BdMuMuKs_VtxPtBd_Pi , AutoClear); // OK = pT of kstar's daughter tracks after vertex - declareMonitoredStdContainer("BdMuMuKs_VtxEtaBd_Pi" , m_mon_BdMuMuKs_VtxEtaBd_Pi , AutoClear); // OK = eta of kstar's daughter tracks after vertex - declareMonitoredStdContainer("BdMuMuKs_VtxPhiBd_Pi" , m_mon_BdMuMuKs_VtxPhiBd_Pi , AutoClear); // OK = phi of kstar's daughter tracks after vertex -// graphs with Lb -> L mu+ mu- - declareMonitoredStdContainer("LbMuMuL_InvMassLb_L" , m_mon_LbMuMuL_InvMassLb_L , AutoClear); // OK = invariant mass of Ltar - declareMonitoredStdContainer("LbMuMuL_InvMass_Lb" , m_mon_LbMuMuL_InvMass_Lb , AutoClear); // OK = invariant mass of Ltar&Mu&Mu - declareMonitoredStdContainer("LbMuMuL_PtL_Pr" , m_mon_LbMuMuL_PtL_Pr , AutoClear); // OK = pt of kstar's daughter tracks - declareMonitoredStdContainer("LbMuMuL_EtaL_Pr" , m_mon_LbMuMuL_EtaL_Pr , AutoClear); // OK = eta of kstar's daughter tracks - declareMonitoredStdContainer("LbMuMuL_PhiL_Pr" , m_mon_LbMuMuL_PhiL_Pr , AutoClear); // OK = phi of kstar's daughter tracks - declareMonitoredStdContainer("LbMuMuL_PtL_Pi" , m_mon_LbMuMuL_PtL_Pi , AutoClear); // OK = pt of kstar's daughter tracks - declareMonitoredStdContainer("LbMuMuL_EtaL_Pi" , m_mon_LbMuMuL_EtaL_Pi , AutoClear); // OK = eta of kstar's daughter tracks - declareMonitoredStdContainer("LbMuMuL_PhiL_Pi" , m_mon_LbMuMuL_PhiL_Pi , AutoClear); // OK = phi of kstar's daughter tracks - // after K* vertexing - declareMonitoredStdContainer("LbMuMuL_VtxMassLb_L" , m_mon_LbMuMuL_VtxMassLb_L , AutoClear); // OK = vertex mass of kaon&pion - declareMonitoredStdContainer("LbMuMuL_Chi2toNDoFLb_L" , m_mon_LbMuMuL_Chi2toNDoFLb_L, AutoClear); // OK = chi2/ndof of K* vertex - declareMonitoredStdContainer("LbMuMuL_VtxPtL_Pr" , m_mon_LbMuMuL_VtxPtL_Pr , AutoClear); // OK = pT of kstar's daughter tracks after vertex - declareMonitoredStdContainer("LbMuMuL_VtxEtaL_Pr" , m_mon_LbMuMuL_VtxEtaL_Pr , AutoClear); // OK = eta of kstar's daughter tracks after vertex - declareMonitoredStdContainer("LbMuMuL_VtxPhiL_Pr" , m_mon_LbMuMuL_VtxPhiL_Pr , AutoClear); // OK = phi of kstar's daughter tracks after vertex - declareMonitoredStdContainer("LbMuMuL_VtxPtL_Pi" , m_mon_LbMuMuL_VtxPtL_Pi , AutoClear); // OK = pT of kstar's daughter tracks after vertex - declareMonitoredStdContainer("LbMuMuL_VtxEtaL_Pi" , m_mon_LbMuMuL_VtxEtaL_Pi , AutoClear); // OK = eta of kstar's daughter tracks after vertex - declareMonitoredStdContainer("LbMuMuL_VtxPhiL_Pi" , m_mon_LbMuMuL_VtxPhiL_Pi , AutoClear); // OK = phi of kstar's daughter tracks after vertex - // after Lb vertexing - declareMonitoredStdContainer("LbMuMuL_VtxMass_Lb" , m_mon_LbMuMuL_VtxMass_Lb , AutoClear); // OK = vertex mass of Ltar&Mu&Mu - declareMonitoredStdContainer("LbMuMuL_Chi2toNDoF_Lb" , m_mon_LbMuMuL_Chi2toNDoF_Lb , AutoClear); // OK = chi2/ndof of B0+/- vertex - declareMonitoredStdContainer("LbMuMuL_VtxPtLb_Pr" , m_mon_LbMuMuL_VtxPtLb_Pr , AutoClear); // OK = pT of kstar's daughter tracks after vertex - declareMonitoredStdContainer("LbMuMuL_VtxEtaLb_Pr" , m_mon_LbMuMuL_VtxEtaLb_Pr , AutoClear); // OK = eta of kstar's daughter tracks after vertex - declareMonitoredStdContainer("LbMuMuL_VtxPhiLb_Pr" , m_mon_LbMuMuL_VtxPhiLb_Pr , AutoClear); // OK = phi of kstar's daughter tracks after vertex - declareMonitoredStdContainer("LbMuMuL_VtxPtLb_Pi" , m_mon_LbMuMuL_VtxPtLb_Pi , AutoClear); // OK = pT of kstar's daughter tracks after vertex - declareMonitoredStdContainer("LbMuMuL_VtxEtaLb_Pi" , m_mon_LbMuMuL_VtxEtaLb_Pi , AutoClear); // OK = eta of kstar's daughter tracks after vertex - declareMonitoredStdContainer("LbMuMuL_VtxPhiLb_Pi" , m_mon_LbMuMuL_VtxPhiLb_Pi , AutoClear); // OK = phi of kstar's daughter tracks after vertex - -// graphs with Bc -> Ds mu+ mu- - // before/no vertexing - declareMonitoredStdContainer("BcMuMuDs_InvMassBc_Phi" , m_mon_BcMuMuDs_InvMassBc_Phi , AutoClear); // OK = invariant mass of Phi - declareMonitoredStdContainer("BcMuMuDs_InvMassBc_Ds" , m_mon_BcMuMuDs_InvMassBc_Ds , AutoClear); // OK = invariant mass of Ds - declareMonitoredStdContainer("BcMuMuDs_InvMass_Bc" , m_mon_BcMuMuDs_InvMass_Bc , AutoClear); // OK = invariant mass of Ds&Mu&Mu - declareMonitoredStdContainer("BcMuMuDs_PtPhi_Kp" , m_mon_BcMuMuDs_PtPhi_Kp , AutoClear); // OK = pt of Phi's daughter tracks - declareMonitoredStdContainer("BcMuMuDs_EtaPhi_Kp" , m_mon_BcMuMuDs_EtaPhi_Kp , AutoClear); // OK = eta of Phi's daughter tracks - declareMonitoredStdContainer("BcMuMuDs_PhiPhi_Kp" , m_mon_BcMuMuDs_PhiPhi_Kp , AutoClear); // OK = phi of Phi's daughter tracks - declareMonitoredStdContainer("BcMuMuDs_PtPhi_Km" , m_mon_BcMuMuDs_PtPhi_Km , AutoClear); // OK = pt of Phi's daughter tracks - declareMonitoredStdContainer("BcMuMuDs_EtaPhi_Km" , m_mon_BcMuMuDs_EtaPhi_Km , AutoClear); // OK = eta of Phi's daughter tracks - declareMonitoredStdContainer("BcMuMuDs_PhiPhi_Km" , m_mon_BcMuMuDs_PhiPhi_Km , AutoClear); // OK = phi of Phi's daughter tracks - declareMonitoredStdContainer("BcMuMuDs_PtDs_pi" , m_mon_BcMuMuDs_PtDs_pi , AutoClear); // OK = pt of pion from Ds - declareMonitoredStdContainer("BcMuMuDs_EtaDs_pi" , m_mon_BcMuMuDs_EtaDs_pi , AutoClear); // OK = eta of pion from Ds - declareMonitoredStdContainer("BcMuMuDs_PhiDs_pi" , m_mon_BcMuMuDs_PhiDs_pi , AutoClear); // OK = phi of pion from Ds - // after Ds vertexing - declareMonitoredStdContainer("BcMuMuDs_VtxMassBc_Ds" , m_mon_BcMuMuDs_VtxMassBc_Ds , AutoClear); // OK = vertex mass of pion&kaon&kaon - declareMonitoredStdContainer("BcMuMuDs_Chi2toNDoFBc_Ds" , m_mon_BcMuMuDs_Chi2toNDoFBc_Ds , AutoClear); // OK = chi2/ndof of Ds vertex - declareMonitoredStdContainer("BcMuMuDs_VtxPtDs_Kp" , m_mon_BcMuMuDs_VtxPtDs_Kp , AutoClear); // OK = pT of phi's daughter tracks after vertex - declareMonitoredStdContainer("BcMuMuDs_VtxEtaDs_Kp" , m_mon_BcMuMuDs_VtxEtaDs_Kp , AutoClear); // OK = eta of phi's daughter tracks after vertex - declareMonitoredStdContainer("BcMuMuDs_VtxPhiDs_Kp" , m_mon_BcMuMuDs_VtxPhiDs_Kp , AutoClear); // OK = phi of phi's daughter tracks after vertex - declareMonitoredStdContainer("BcMuMuDs_VtxPtDs_Km" , m_mon_BcMuMuDs_VtxPtDs_Km , AutoClear); // OK = pT of phi's daughter tracks after vertex - declareMonitoredStdContainer("BcMuMuDs_VtxEtaDs_Km" , m_mon_BcMuMuDs_VtxEtaDs_Km , AutoClear); // OK = eta of phi's daughter tracks after vertex - declareMonitoredStdContainer("BcMuMuDs_VtxPhiDs_Km" , m_mon_BcMuMuDs_VtxPhiDs_Km , AutoClear); // OK = phi of phi's daughter tracks after vertex - declareMonitoredStdContainer("BcMuMuDs_VtxPtDs_pi" , m_mon_BcMuMuDs_VtxPtDs_pi , AutoClear); // OK = pT of pion from Ds after Ds vertex - declareMonitoredStdContainer("BcMuMuDs_VtxEtaDs_pi" , m_mon_BcMuMuDs_VtxEtaDs_pi , AutoClear); // OK = eta of pion from Ds after Ds vertex - declareMonitoredStdContainer("BcMuMuDs_VtxPhiDs_pi" , m_mon_BcMuMuDs_VtxPhiDs_pi , AutoClear); // OK = phi of pion from Ds after Ds vertex - // after Bc vertexing - declareMonitoredStdContainer("BcMuMuDs_VtxMass_Bc" , m_mon_BcMuMuDs_VtxMass_Bc , AutoClear); // OK = vertex mass of Ds&Mu&Mu - declareMonitoredStdContainer("BcMuMuDs_Chi2toNDoF_Bc" , m_mon_BcMuMuDs_Chi2toNDoF_Bc , AutoClear); // OK = chi2/ndof of Bc vertex - declareMonitoredStdContainer("BcMuMuDs_VtxPtBc_Kp" , m_mon_BcMuMuDs_VtxPtBc_Kp , AutoClear); // OK = pT of phi's daughter tracks after vertex - declareMonitoredStdContainer("BcMuMuDs_VtxEtaBc_Kp" , m_mon_BcMuMuDs_VtxEtaBc_Kp , AutoClear); // OK = eta of phi's daughter tracks after vertex - declareMonitoredStdContainer("BcMuMuDs_VtxPhiBc_Kp" , m_mon_BcMuMuDs_VtxPhiBc_Kp , AutoClear); // OK = phi of phi's daughter tracks after vertex - declareMonitoredStdContainer("BcMuMuDs_VtxPtBc_Km" , m_mon_BcMuMuDs_VtxPtBc_Km , AutoClear); // OK = pT of phi's daughter tracks after vertex - declareMonitoredStdContainer("BcMuMuDs_VtxEtaBc_Km" , m_mon_BcMuMuDs_VtxEtaBc_Km , AutoClear); // OK = eta of phi's daughter tracks after vertex - declareMonitoredStdContainer("BcMuMuDs_VtxPhiBc_Km" , m_mon_BcMuMuDs_VtxPhiBc_Km , AutoClear); // OK = phi of phi's daughter tracks after vertex - declareMonitoredStdContainer("BcMuMuDs_VtxPtBc_pi" , m_mon_BcMuMuDs_VtxPtBc_pi , AutoClear); // OK = pT of pion from Ds after Ds vertex - declareMonitoredStdContainer("BcMuMuDs_VtxEtaBc_pi" , m_mon_BcMuMuDs_VtxEtaBc_pi , AutoClear); // OK = eta of pion from Ds after Ds vertex - declareMonitoredStdContainer("BcMuMuDs_VtxPhiBc_pi" , m_mon_BcMuMuDs_VtxPhiBc_pi , AutoClear); // OK = phi of pion from Ds after Ds vertex -// review graphs - declareMonitoredVariable("nTriedCombinations", m_mon_nTriedCombinations ); // OK = number of track combination tried - declareMonitoredVariable("nBphys" , m_mon_nBphys ); // OK = number of stored bphys particle - declareMonitoredVariable("BMuMuK_n" , m_mon_BMuMuK_n ); // OK = number of stored B+ particle - declareMonitoredVariable("BdMuMuKs_n" , m_mon_BdMuMuKs_n ); // OK = number of stored Bd particle - declareMonitoredVariable("BsMuMuPhi_n" , m_mon_BsMuMuPhi_n ); // OK = number of stored Bs particle - declareMonitoredVariable("LbMuMuL_n" , m_mon_LbMuMuL_n ); // OK = number of stored Lb particle - declareMonitoredVariable("BcMuMuDs_n" , m_mon_BcMuMuDs_n ); // OK = number of stored Bc particle - declareMonitoredVariable("TotalRunTime" , m_mon_TotalRunTime ); // OK = total run time:) - declareMonitoredVariable("VertexingTime" , m_mon_VertexingTime ); // OK = vertexing time -////////////////////////////// end of variables for monitoring histograms ////////////////////////////////// - -/////////////////////////////// Zero the counters for monitoring purposes ////////////////////////////////// -// m_countTotalEvents = 0; // counter for events -// m_countTotalRoI = 0; // counter for RoIs = counter for events -/////////////////////////////// end of the counters for monitoring purposes //////////////////////////////// - - -////////////////////////////// Declaration of output collections /////////////////////////////////////////// - m_trigBphysColl_b = NULL; - m_trigBphysColl_bxAOD = NULL; - // temporary - m_trigBphysColl_kStarxAOD = NULL; - m_trigBphysColl_phixAOD = NULL; - m_trigBphysColl_lambdaxAOD = NULL; - m_trigBphysColl_dsxAOD = NULL; -// m_trigBphysColl_kSplus = NULL; - - //////////////////////////// end of output collections /////////////////////////////////////////////////// -} -/*----------------------------------------*/ -TrigL2BMuMuXFex::~TrigL2BMuMuXFex() -{ -// if(m_trigBphysColl_kSplus) delete m_trigBphysColl_kSplus; - -} -/*-----------------------------------------------*/ -HLT::ErrorCode TrigL2BMuMuXFex::hltInitialize() -{ - ATH_MSG_DEBUG("In initialize()"); -// only for performance test - obsolete now - - ATH_MSG_INFO("-------------------INFO TrigL2BMuMuXFex---------------------"); - ATH_MSG_INFO("Initialization ..."); - ATH_MSG_INFO("OppositeCharge check = " << (m_oppositeCharge==true ? "True" : "False")); -// ATH_MSG_INFO("InDetAlgo = " << m_inDetAlgo); -// ATH_MSG_INFO("UseAllAlgo = " -// << (m_useAllAlgo==true ? "True" : "False")); - ATH_MSG_INFO("LowerMuMuMassCut = " << m_lowerMuMuMassCut); - ATH_MSG_INFO("UpperMuMuMassCut = " << m_upperMuMuMassCut); - ATH_MSG_INFO("DoVertexFit = " << (m_doVertexFit==true ? "True" : "False")); - ATH_MSG_INFO("DoMuMuVertexFit = " - << (m_doMuMuVertexFit==true ? "True" : "False")); - ATH_MSG_INFO("LowerMuVtxMassCut = " << m_lowerMuVtxMassCut); - ATH_MSG_INFO("UpperMuVtxMassCut = " << m_upperMuVtxMassCut); - ATH_MSG_INFO("MuVtxChi2Cut = " << m_muVtxChi2Cut); - ATH_MSG_INFO("MaxNcombinations = " << m_maxNcombinations); - ATH_MSG_INFO(" Information for B^{+/-} -> K^{+/-} Mu^{+} Mu^{-} part! "); - ATH_MSG_INFO("Look for B+ -> K+MuMu = " << (m_doB_KMuMuDecay == true ? "TRUE" : "FALSE")); - //ATH_MSG_INFO("LowerKaonPtCut = " << m_lowerKaonPtCut); - //ATH_MSG_INFO("UpperKaonPtCut = " << m_upperKaonPtCut); - ATH_MSG_INFO("LowerKMuMuMassCut = " << m_lowerKMuMuMassCut); - ATH_MSG_INFO("UpperKMuMuMassCut = " << m_upperKMuMuMassCut); - ATH_MSG_INFO("DoKMuMuVertexFit = " << (m_doB_KMuMuVertexFit==true ? "True" : "False")); - ATH_MSG_INFO("LowerBVtxMassCut = " << m_lowerBVtxMassCut); - ATH_MSG_INFO("UpperBVtxMassCut = " << m_upperBVtxMassCut); - ATH_MSG_INFO("BVtxChi2Cut = " << m_bVtxChi2Cut); - ATH_MSG_INFO(" Information for B^{d} -> K^{*} Mu^{+} Mu^{-} part! "); - ATH_MSG_INFO("Look for Bd -> K*MuMu = " << (m_doBd_KstarMuMuDecay == true ? "TRUE" : "FALSE")); - ATH_MSG_INFO("LowerKstar_KaonMassCut = " << m_lowerKstar_KaonMassCut); - ATH_MSG_INFO("UpperKstar_KaonMassCut = " << m_upperKstar_KaonMassCut); - ATH_MSG_INFO("LowerBd_KstarMuMuMassCut = " << m_lowerBd_KstarMuMuMassCut); - ATH_MSG_INFO("UpperBd_KstarMuMuMassCut = " << m_upperBd_KstarMuMuMassCut); - ATH_MSG_INFO("DoKstar_KaonPionVertexFit = " << (m_doKstar_KaonPionVertexFit==true ? "True" : "False")); - ATH_MSG_INFO("LowerKstarVtxMassCut = " << m_lowerKstarVtxMassCut); - ATH_MSG_INFO("UpperKstarVtxMassCut = " << m_upperKstarVtxMassCut); - ATH_MSG_INFO("KstarVtxChi2Cut = " << m_kStarVtxChi2Cut); - ATH_MSG_INFO("DoBd_KstarMuMuVertexFit = " << (m_doBd_KstarMuMuVertexFit==true ? "True" : "False")); - ATH_MSG_INFO("LowerBdVtxMassCut = " << m_lowerBdVtxMassCut); - ATH_MSG_INFO("UpperBdVtxMassCut = " << m_upperBdVtxMassCut); - ATH_MSG_INFO("BdVtxChi2Cut = " << m_bDVtxChi2Cut); - ATH_MSG_INFO(" Information for B^{s} -> Phi Mu^{+} Mu^{-} part! "); - ATH_MSG_INFO("Look for Bs -> PhiMuMu = " << (m_doBs_Phi1020MuMuDecay == true ? "TRUE" : "FALSE" )); - ATH_MSG_INFO("LowerPhi1020_KaonMassCut = " << m_lowerPhi1020_KaonMassCut); - ATH_MSG_INFO("UpperPhi1020_KaonMassCut = " << m_upperPhi1020_KaonMassCut); - ATH_MSG_INFO("LowerBs_Phi1020MuMuMassCut = " << m_lowerBs_Phi1020MuMuMassCut); - ATH_MSG_INFO("UpperBs_Phi1020MuMuMassCut = " << m_upperBs_Phi1020MuMuMassCut); - ATH_MSG_INFO("DoPhi1020_KaonKaonVertexFit = " << (m_doPhi1020_KaonKaonVertexFit==true ? "True" : "False")); - ATH_MSG_INFO("LowerPhi1020VtxMassCut = " << m_lowerPhi1020VtxMassCut); - ATH_MSG_INFO("UpperPhi1020VtxMassCut = " << m_upperPhi1020VtxMassCut); - ATH_MSG_INFO("Phi1020VtxChi2Cut = " << m_phi1020VtxChi2Cut); - ATH_MSG_INFO("DoBs_Phi1020MuMuVertexFit = " << (m_doBs_Phi1020MuMuVertexFit==true ? "True" : "False")); - ATH_MSG_INFO("LowerBsVtxMassCut = " << m_lowerBsVtxMassCut); - ATH_MSG_INFO("UpperBsVtxMassCut = " << m_upperBsVtxMassCut); - ATH_MSG_INFO("BsVtxChi2Cut = " << m_bSVtxChi2Cut); - ATH_MSG_INFO(" Information for L_{b} -> Lambda Mu^{+} Mu^{-} part! "); - ATH_MSG_INFO("Look for Lb -> LMuMu = " << (m_doLb_LambdaMuMuDecay == true ? "TRUE" : "FALSE" )); - ATH_MSG_INFO("LowerLambda_PrPiMassCut = " << m_lowerLambda_PrPiMassCut); - ATH_MSG_INFO("UpperLambda_PrPiMassCut = " << m_upperLambda_PrPiMassCut); - ATH_MSG_INFO("LowerLb_LambdaMuMuMassCut = " << m_lowerLb_LambdaMuMuMassCut); - ATH_MSG_INFO("UpperLb_LambdaMuMuMassCut = " << m_upperLb_LambdaMuMuMassCut); - ATH_MSG_INFO("DoLambda_ProtonPionVertexFit = "<< (m_doLambda_ProtonPionVertexFit==true ? "True" : "False")); - ATH_MSG_INFO("LowerLambdaVtxMassCut = " << m_lowerLambdaVtxMassCut); - ATH_MSG_INFO("UpperLambdaVtxMassCut = " << m_upperLambdaVtxMassCut); - ATH_MSG_INFO("LambdaVtxChi2Cut = " << m_lambdaVtxChi2Cut); - ATH_MSG_INFO("DoLb_LambdaMuMuVertexFit = " << (m_doLb_LambdaMuMuVertexFit==true ? "True" : "False")); - ATH_MSG_INFO("LowerLbVtxMassCut = " << m_lowerLbVtxMassCut); - ATH_MSG_INFO("UpperLbVtxMassCut = " << m_upperLbVtxMassCut); -// ATH_MSG_INFO("LbVtxChi2Cut = " << m_lBVtxChi2Cut); -// ATH_MSG_INFO("LbVtxDistanceCut = " << m_lBVtxDistanceCut); -// ATH_MSG_INFO("PrImpactCut = " << m_prImpactCut); -// ATH_MSG_INFO("PiImpactCut = " << m_piImpactCut); - ATH_MSG_INFO(" Information for B_{c} -> D_s Mu^{+} Mu^{-} part! "); - ATH_MSG_INFO("Look for Bc -> DsMuMu = " << (m_doBc_DsMuMuDecay == true ? "TRUE" : "FALSE" )); - ATH_MSG_INFO("LowerPhiDs_MassCut = " << m_lowerPhiDs_MassCut); - ATH_MSG_INFO("UpperPhiDs_MassCut = " << m_upperPhiDs_MassCut); - ATH_MSG_INFO("LowerDs_MassCut = " << m_lowerDs_MassCut); - ATH_MSG_INFO("UpperDs_MassCut = " << m_upperDs_MassCut); - ATH_MSG_INFO("LowerBc_DsMuMuMassCut = " << m_lowerBc_DsMuMuMassCut); - ATH_MSG_INFO("UpperBc_DsMuMuMassCut = " << m_upperBc_DsMuMuMassCut); - ATH_MSG_INFO("DoDs_PhiPionVertexFit = " << (m_doDs_PhiPionVertexFit==true ? "True" : "False")); - ATH_MSG_INFO("LowerDsVtxMassCut = " << m_lowerDsVtxMassCut); - ATH_MSG_INFO("UpperDsVtxMassCut = " << m_upperDsVtxMassCut); - ATH_MSG_INFO("DsVtxChi2Cut = " << m_DsVtxChi2Cut); - ATH_MSG_INFO("DoBc_DsMuMuVertexFit = " << (m_doBc_DsMuMuVertexFit==true ? "True" : "False")); - ATH_MSG_INFO("LowerBcVtxMassCut = " << m_lowerBcVtxMassCut); - ATH_MSG_INFO("UpperBcVtxMassCut = " << m_upperBcVtxMassCut); - ATH_MSG_INFO("BcVtxChi2Cut = " << m_bCVtxChi2Cut); - ATH_MSG_INFO("-----------------------------------------------------"); - - // retrieving the vertex fitting tool - StatusCode sc = toolSvc()->retrieveTool("TrigL2VertexFitter","TrigL2VertexFitter",m_L2vertFitter); - if ( sc.isFailure() ) { - ATH_MSG_FATAL("Unable to locate TrigL2VertexFitter tool "); - return HLT::BAD_JOB_SETUP; - } - sc = toolSvc()->retrieveTool("TrigVertexingTool","TrigVertexingTool",m_vertexingTool); - if ( sc.isFailure() ) { - ATH_MSG_FATAL("Unable to locate TrigVertexingTool tool "); - return HLT::BAD_JOB_SETUP; - } - - if (m_bphysHelperTool.retrieve().isFailure()) { - ATH_MSG_ERROR("Can't find TrigBphysHelperUtilsTool"); - return HLT::BAD_JOB_SETUP; - } else { - ATH_MSG_DEBUG("TrigBphysHelperUtilsTool found"); - } - -/////////////////////////// end of retrive the vertexing tools////////////////// - - -/////////////////////////// add timers ///////////////////////////////////////// - if(timerSvc()){ - m_TotTimer = addTimer("L2BMuMuXFexTot"); - m_VtxFitTimer = addTimer("L2BMuMuXFexVFit"); - } -///////////////////////////// end of add timers //////////////////////////////// - - - return HLT::OK; - -} ///////// end of HLT - Errorcode - TrigL2BMuMuXFex - hltInitialize//////////// -/*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*/ -HLT::ErrorCode TrigL2BMuMuXFex::hltFinalize() -{ - - ATH_MSG_DEBUG("In finalize()"); - -///////////////////////// Declaration of monitoring histos ///////////////////// - // Define the bins for error-monitoring histogram - #define ERROR_No_EventInfo 0 - #define ERROR_No_RoIs 1 - #define ERROR_No_CombineMuon 2 - #define ERROR_No_TrackColl 3 - // more steps below - #define ERROR_Charge_Check 4 - #define ERROR_MuMu_MassCut 5 - // Separator - #define ERROR_AddMuonTrack_Fails 6 - #define ERROR_MuonVtxFit_Fails 7 - #define ERROR_CalcMuonVtxMass_Fails 8 - // Separator - #define ERROR_MuonVtx_MassCut 9 - #define ERROR_AddTrack_Fails 10 - #define ERROR_VtxFitFailed 11 - #define ERROR_MotherVtxFitFailed 12 - // Separator - #define ERROR_TooManyComb_Acc 13 - #define ERROR_TooManyComb_Rej 14 - -/* // more avalaible steps below - #define ERROR_Unique_AddTrack_Fails 6 - #define ERROR_CalcInvMass_Fails 7 - #define ERROR_CalcMother_Fails 8 - #define ERROR_CalcMassPull_Fails 9 - #define ERROR_BphysColl_Fails 10 -*/ - // Define the bins for acceptance-monitoring histogram - #define ACCEPT_Input 0 - #define ACCEPT_AcceptAll 1 - #define ACCEPT_Got_RoIs 2 - #define ACCEPT_Got_Muons 3 - #define ACCEPT_Got_Muon1idTrack 4 - #define ACCEPT_Got_Muon2idTrack 5 - #define ACCEPT_Got_TrackColl 6 - #define ACCEPT_First_TrackColl 7 - #define ACCEPT_Both_TrackColls 8 - #define ACCEPT_Full_IDTracks 9 - #define ACCEPT_Pass_OppChargeC 10 - #define ACCEPT_MuonTracks_Added 11 - #define ACCEPT_Muon_Vertexing 12 - #define ACCEPT_CalcInvMass 13 - #define ACCEPT_MuonVtx_Part 14 - #define ACCEPT_MuMu_Mass 15 - #define ACCEPT_MotherVtxCreated 16 - #define ACCEPT_BphysCollParticle 17 - -/* // more avalaible steps below - #define ACCEPT_BphysColl_not_Empty 24 - #define ACCEPT_Each_Vertex_not_NULL 42 - */ -///////////////////////// end of declaration of monitoring histos ////////////// - - return HLT::OK; - -} /////////////end of HLT - ErrorCode - TrigL2BMuMuXFex - hltFinalize/////////// -/*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*/ -HLT::ErrorCode TrigL2BMuMuXFex::acceptInputs(HLT::TEConstVec& inputTEs, bool& pass) -{ - //starts timer - if(timerSvc()) - m_TotTimer->start(); - - if(inputTEs.size() != 2) { - ATH_MSG_WARNING("Wrong number of input trigger elements ("<<inputTEs.size()<<")."); - pass = false; - return HLT::OK; - }else{ - ATH_MSG_VERBOSE("Right number of input trigger elements ("<<inputTEs.size()<<")."); - } - pass = true; - - return HLT::OK; - -} /////////end of HLT - ErrorCode - TrigL2BMuMuXFex - acceptInputs////////////// - -/*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*/ -HLT::ErrorCode TrigL2BMuMuXFex::hltExecute(HLT::TEConstVec& inputTEs, HLT::TriggerElement* outputTE) -{ - ATH_MSG_DEBUG("In execute()"); -//////////////// Initialization of the monitoring variables //////////////////// -// m_mon_nTracks = -1; - m_mon_nTriedCombinations = 0; - m_mon_nBphys = 0; - m_mon_BMuMuK_n = 0; - m_mon_BdMuMuKs_n = 0; - m_mon_BsMuMuPhi_n = 0; - m_mon_LbMuMuL_n = 0; - m_mon_BcMuMuDs_n = 0; - m_mon_TotalRunTime = 0; - m_mon_VertexingTime = 0; - -//////////////// end of initialization of the monitoring variables ///////////// - - ////list of muon candidates: RoI & Combined Muon Feature & Kaon candidates//// - //std::vector<const CombinedMuonFeature*> muonCandidates; - std::vector<const xAOD::L2CombinedMuon*> muonCandidates; - - - ATH_MSG_DEBUG(" After acceptInput"); - m_mon_Acceptance.push_back( ACCEPT_Input ); - - // Retrieve event info - int IdRun = 0; - int IdEvent = 0; - - uint32_t runNumber(0), evtNumber(0), lbBlock(0); - if (m_bphysHelperTool->getRunEvtLb( runNumber, evtNumber, lbBlock).isFailure()) { - ATH_MSG_ERROR("Error retriving EventInfo"); - } - IdRun = runNumber; - IdEvent = evtNumber; - - //event - // Accept-All mode: temporary patch; should be done with force-accept - if(m_acceptAll){ - ATH_MSG_DEBUG("AcceptAll property is set: taking all events"); - // pass = true; - m_mon_Acceptance.push_back( ACCEPT_AcceptAll ); - } - else{ - ATH_MSG_DEBUG("AcceptAll property not set: applying selection"); - // pass = false; - } - - ///////////////////////////////// RoI's //////////////////////////////////// - const TrigRoiDescriptor* roiDescriptor1; - const TrigRoiDescriptor* roiDescriptor2; - if ( getFeature(inputTEs.front(), roiDescriptor1) != HLT::OK ) roiDescriptor1 = 0; - if(roiDescriptor1) { - ATH_MSG_DEBUG("RoI id " << roiDescriptor1->roiId() - << " LVL1 id " << roiDescriptor1->l1Id() - << " located at phi = " << roiDescriptor1->phi() - << ", eta = " << roiDescriptor1->eta()); - }else{ - ATH_MSG_WARNING("No RoI for this Trigger Element! "); - if(timerSvc()) { - m_TotTimer->stop(); - m_mon_TotalRunTime = m_TotTimer->elapsed(); - } - m_mon_Errors.push_back( ERROR_No_RoIs ); - return HLT::NAV_ERROR; - } - if ( getFeature(inputTEs.back(), roiDescriptor2) != HLT::OK ) roiDescriptor2 = 0; - if(roiDescriptor2) { - ATH_MSG_DEBUG("RoI id " << roiDescriptor2->roiId() - << " LVL1 id " << roiDescriptor2->l1Id() - << " located at phi = " << roiDescriptor2->phi() - << ", eta = " << roiDescriptor2->eta()); - - }else{ - ATH_MSG_WARNING("No RoI for this Trigger Element! "); - if(timerSvc()) { - m_TotTimer->stop(); - m_mon_TotalRunTime = m_TotTimer->elapsed(); - } - m_mon_Errors.push_back( ERROR_No_RoIs ); - return HLT::NAV_ERROR; - } - - m_mon_Acceptance.push_back( ACCEPT_Got_RoIs ); - // RoI monitoring - m_mon_ROIsEta.push_back( roiDescriptor1->eta() ); - m_mon_ROIsPhi.push_back( roiDescriptor1->phi() ); - m_mon_ROIsEta.push_back( roiDescriptor2->eta() ); - m_mon_ROIsPhi.push_back( roiDescriptor2->phi() ); - - // Tried combinations counter - protection against timeouts - int nTriedCombinations(0); - - //////////////////////////// muon candidates /////////////////////////////// - //ElementLink<xAOD::L2CombinedMuonContainer> l2combinedMuonEL[2]; - - typedef ElementLinkVector<xAOD::L2CombinedMuonContainer> ELVMuons; - ELVMuons l2combinedMuonEL[2]; - - const xAOD::L2CombinedMuon* pCombinedMuonFeature1 = NULL; - const xAOD::L2CombinedMuon* pCombinedMuonFeature2 = NULL; - - // HLT::ErrorCode status = getFeature(inputTEs.front(), pCombinedMuonFeature1); - // HLT::ErrorCode status = getFeatureLink<xAOD::L2CombinedMuonContainer,xAOD::L2CombinedMuonContainer>(inputTEs.front(),l2combinedMuonEL[0]); - HLT::ErrorCode status = getFeaturesLinks<xAOD::L2CombinedMuonContainer,xAOD::L2CombinedMuonContainer>(inputTEs.front(),l2combinedMuonEL[0]); - if (l2combinedMuonEL[0].size()){ - pCombinedMuonFeature1 = l2combinedMuonEL[0][0].isValid() ? *(l2combinedMuonEL[0][0]): nullptr; - } - if (l2combinedMuonEL[0].size()>1){ - ATH_MSG_WARNING("Unexpected number of containers for comb feature: " << 0); - } - if(status!=HLT::OK || pCombinedMuonFeature1==NULL) { - ATH_MSG_ERROR("Unable to retrieve the CombinedMuonFeature1 from TE"); - if(timerSvc()) { - m_TotTimer->stop(); - m_mon_TotalRunTime = m_TotTimer->elapsed(); - } - m_mon_Errors.push_back( ERROR_No_CombineMuon ); - return HLT::NAV_ERROR; - } - //status = getFeature(inputTEs.back(), pCombinedMuonFeature2); - //status = getFeatureLink<xAOD::L2CombinedMuonContainer,xAOD::L2CombinedMuonContainer>(inputTEs.back(),l2combinedMuonEL[1]); - status = getFeaturesLinks<xAOD::L2CombinedMuonContainer,xAOD::L2CombinedMuonContainer>(inputTEs.back(),l2combinedMuonEL[1]); - // pCombinedMuonFeature2 = l2combinedMuonEL[1].isValid() ? *l2combinedMuonEL[1]: nullptr; - if (l2combinedMuonEL[1].size()){ - pCombinedMuonFeature2 = l2combinedMuonEL[1][0].isValid() ? *(l2combinedMuonEL[1][0]): nullptr; - } - if (l2combinedMuonEL[1].size()>1){ - ATH_MSG_WARNING("Unexpected number of containers for comb feature: " << 1); - } - - if(status!=HLT::OK || pCombinedMuonFeature2==NULL) { - ATH_MSG_ERROR("Unable to retrieve the CombinedMuonFeature2 from TE"); - if(timerSvc()) { - m_TotTimer->stop(); - m_mon_TotalRunTime = m_TotTimer->elapsed(); - } - m_mon_Errors.push_back( ERROR_No_CombineMuon ); - return HLT::NAV_ERROR; - } - if (pCombinedMuonFeature1->idTrack()) { - ATH_MSG_DEBUG("Muon candidate1: track with " - << "pt=" << pCombinedMuonFeature1->idTrack()->pt() - << ", eta=" << pCombinedMuonFeature1->idTrack()->eta() - << ", phi=" << pCombinedMuonFeature1->idTrack()->phi() - << ", q=" << pCombinedMuonFeature1->idTrack()->charge() - << ", Z0=" << pCombinedMuonFeature1->idTrack()->z0() - << ", d0=" << pCombinedMuonFeature1->idTrack()->d0() // JW was a0 in old code - ); - } else { - ATH_MSG_DEBUG("Muon candidate1: track with No track!"); - } - if (pCombinedMuonFeature2->idTrack()) { - ATH_MSG_DEBUG("Muon candidate2: track with " - << "pt=" << pCombinedMuonFeature2->idTrack()->pt() - << ", eta=" << pCombinedMuonFeature2->idTrack()->eta() - << ", phi=" << pCombinedMuonFeature2->idTrack()->phi() - << ", q=" << pCombinedMuonFeature1->idTrack()->charge() - << ", Z0=" << pCombinedMuonFeature2->idTrack()->z0() - << ", d0=" << pCombinedMuonFeature2->idTrack()->d0() // JW was a0 in old code - ); - } else { - ATH_MSG_DEBUG("Muon candidate2: track with No track!"); - } - - m_mon_Acceptance.push_back( ACCEPT_Got_Muons ); - - muonCandidates.push_back(pCombinedMuonFeature1); - muonCandidates.push_back(pCombinedMuonFeature2); - - if ( !pCombinedMuonFeature1->idTrack()) { - ATH_MSG_DEBUG("Muon candidate1: no id track!"); - const auto& idlink = pCombinedMuonFeature1->idTrackLink(); - ATH_MSG_DEBUG("Muon elementlink has "<< idlink.dataID() << " " << idlink.index() << " " << idlink.isValid() ); - if(timerSvc()) { - m_TotTimer->stop(); - m_mon_TotalRunTime = m_TotTimer->elapsed(); - } - //m_mon_Errors.push_back( ERROR_No_CombineMuon ); - return HLT::OK; - } else { - m_mon_Acceptance.push_back( ACCEPT_Got_Muon1idTrack ); - } - - if ( !pCombinedMuonFeature2->idTrack()) { - ATH_MSG_DEBUG("Muon candidate2: no id track!"); - const auto& idlink = pCombinedMuonFeature2->idTrackLink(); - ATH_MSG_DEBUG("Muon elementlink has "<< idlink.dataID() << " " << idlink.index() << " " << idlink.isValid() ); - if(timerSvc()) { - m_TotTimer->stop(); - m_mon_TotalRunTime = m_TotTimer->elapsed(); - } - //m_mon_Errors.push_back( ERROR_No_CombineMuon ); - return HLT::OK; - } else { - m_mon_Acceptance.push_back( ACCEPT_Got_Muon2idTrack ); - } - - - - // monitoring muons - m_mon_muon1Eta.push_back( pCombinedMuonFeature1->idTrack()->eta() ); - m_mon_muon1Phi.push_back( pCombinedMuonFeature1->idTrack()->phi() ); - m_mon_muon1Pt.push_back( pCombinedMuonFeature1->idTrack()->pt()/1000. ); - m_mon_muon1Z0.push_back( pCombinedMuonFeature1->idTrack()->z0() ); - m_mon_muon1A0.push_back( pCombinedMuonFeature1->idTrack()->d0() ); - - m_mon_muon2Eta.push_back( pCombinedMuonFeature2->idTrack()->eta() ); - m_mon_muon2Phi.push_back( pCombinedMuonFeature2->idTrack()->phi() ); - m_mon_muon2Pt.push_back( pCombinedMuonFeature2->idTrack()->pt()/1000. ); - m_mon_muon2Z0.push_back( pCombinedMuonFeature2->idTrack()->z0() ); - m_mon_muon2A0.push_back( pCombinedMuonFeature2->idTrack()->d0() ); - - ////////////////////////////////////////////////////////////////////////////// - /////////////////////////// loop over TE's//////////////////////////////////// - ////////////////////////////////////////////////////////////////////////////// - - - std::vector<const xAOD::TrackParticleContainer*> vectorOfTrackCollections1; - std::vector<const xAOD::TrackParticleContainer*> vectorOfTrackCollections2; - std::vector<const HLT::TriggerElement*>::const_iterator iTE = inputTEs.begin(); - ////////////////////////////// other particle candidates ////////////////////////////// - status = getFeatures(*iTE, vectorOfTrackCollections1); - if(status!=HLT::OK) { - ATH_MSG_ERROR("Unable to retrieve vector of InDetTrackCollections from TE"); - if(timerSvc()) { - m_TotTimer->stop(); - m_mon_TotalRunTime = m_TotTimer->elapsed(); - } - m_mon_Errors.push_back( ERROR_No_TrackColl ); - return HLT::NAV_ERROR; - } - m_mon_Acceptance.push_back( ACCEPT_Got_TrackColl ); - - if(vectorOfTrackCollections1.size()!=1) { - ATH_MSG_DEBUG(vectorOfTrackCollections1.size() << " TrackCollections in TE"); - } - m_mon_Acceptance.push_back( ACCEPT_First_TrackColl ); - ++iTE; // next trigger element, no more or less than two, checked by acceptInputs!! - status = getFeatures(*iTE, vectorOfTrackCollections2); - //status = getFeatures(*iTE, vectorOfTrackCollections2); - //status = getFeatures( *iTE, vectorOfTrackCollections); - if(status!=HLT::OK) { - ATH_MSG_ERROR("Unable to retrieve vector of InDetTrackCollections from TE"); - if(timerSvc()) { - m_TotTimer->stop(); - m_mon_TotalRunTime = m_TotTimer->elapsed(); - } - m_mon_Errors.push_back( ERROR_No_TrackColl ); - return HLT::NAV_ERROR; - } - - if(vectorOfTrackCollections2.size()!=1) { - ATH_MSG_DEBUG(vectorOfTrackCollections2.size() << " TrackCollections in TE"); - } - m_mon_Acceptance.push_back( ACCEPT_Both_TrackColls ); - - if(msgLvl() <= MSG::DEBUG){ - msg() << MSG::DEBUG << "Collection: " << IdRun << " " << IdEvent << " " << vectorOfTrackCollections1.size() << " " << vectorOfTrackCollections2.size() << " " - << ( vectorOfTrackCollections1[0] ? vectorOfTrackCollections1[0]->size() : 999) << " " << ( vectorOfTrackCollections2[0] ? vectorOfTrackCollections2[0]->size() : 999) << " " - << endmsg; - - if ( vectorOfTrackCollections1[0]) { - for (auto ptl: *vectorOfTrackCollections1[0] ) - msg() << MSG::DEBUG << " 1: " << ptl->pt() << " " << ptl->eta() << " " << ptl->phi() << endmsg; - } // 1 - if ( vectorOfTrackCollections2[0]) { - for (auto ptl: *vectorOfTrackCollections2[0] ) - msg() << MSG::DEBUG << " 2: " << ptl->pt() << " " << ptl->eta() << " " << ptl->phi() << endmsg; - } // 2 - } - - //////////////////////////////////// Muon part /////////////////////////////// - // opposite charge check - ATH_MSG_DEBUG("JWW: muon1 \n" << *muonCandidates[0]); - ATH_MSG_DEBUG("JWW: muon2 \n" << *muonCandidates[1]); - ATH_MSG_DEBUG("JWW: muon1 with IDTrack()->param()->pT(): " << (muonCandidates[0]->idTrack() ? muonCandidates[0]->idTrack()->pt() : 0)); - ATH_MSG_DEBUG("JWW: " << muonCandidates[0]->charge() << " " << muonCandidates[0]->pt()); - ATH_MSG_DEBUG("JWW: muon2 with IDTrack()->param()->pT(): " << (muonCandidates[1]->idTrack()? muonCandidates[1]->idTrack()->pt() : 0)); - ATH_MSG_DEBUG("JWW: " << muonCandidates[1]->charge() << " " << muonCandidates[1]->pt()); - - - if(m_oppositeCharge && muonCandidates[0]->idTrack()->charge()*muonCandidates[1]->idTrack()->charge() > 0) { - ATH_MSG_DEBUG("Muon combination rejected by opposite charge check"); - if(timerSvc()) { - m_TotTimer->stop(); - m_mon_TotalRunTime = m_TotTimer->elapsed(); - } - // m_mon_Errors.push_back(ERROR_Charge_Check); - return HLT::OK; - } - m_mon_Acceptance.push_back( ACCEPT_Pass_OppChargeC ); - // invariant mass cut - double muMuMass = XMass(muonCandidates[0]->idTrack(), muonCandidates[1]->idTrack(),di_to_muons); - if ( muMuMass < m_lowerMuMuMassCut || muMuMass > m_upperMuMuMassCut) { - ATH_MSG_DEBUG("Muon combination rejected by mass cut: " << muMuMass << "MeV"); - if(timerSvc()) { - m_TotTimer->stop(); - m_mon_TotalRunTime = m_TotTimer->elapsed(); - } - // m_mon_Errors.push_back(ERROR_MuMu_MassCut); - return HLT::OK; - } - m_mon_Acceptance.push_back( ACCEPT_MuMu_Mass); - ////////////////////////// vertexing - muons /////////////////////////////////// - if(m_doVertexFit && m_doMuMuVertexFit){ - - // Prepare the vertexing timer - if(timerSvc()){ - m_VtxFitTimer->start(); - m_VtxFitTimer->pause(); // resume it only for the vertexing periods - } - //////////////////////////////////// muons /////////////////////////////////// - // Vertexing time processing - if(timerSvc()) m_VtxFitTimer->resume(); - - TrigL2Vertex* muMuVtx = NULL; - //creates empty vertex - muMuVtx = new TrigL2Vertex(); - //add tracks and masses to the vertex - StatusCode status; - status = m_vertexingTool->addTrack(muonCandidates[0]->idTrack()->track(),muMuVtx,Trk::muon); - if( status.isFailure() ){ - ATH_MSG_DEBUG("Failed to add muon track 1 to vertexingTool of in DiMu vertex, with pT " <<muonCandidates[0]->idTrack()->pt() << " ."); - m_mon_Errors.push_back( ERROR_AddMuonTrack_Fails ); - delete muMuVtx; - return HLT::OK; - } - status = m_vertexingTool->addTrack(muonCandidates[1]->idTrack()->track(),muMuVtx,Trk::muon); - if( status.isFailure() ){ - ATH_MSG_DEBUG("Failed to add muon track 2 to vertexingTool of in DiMu vertex, with pT " <<muonCandidates[1]->idTrack()->pt() << " ."); - m_mon_Errors.push_back( ERROR_AddMuonTrack_Fails ); - delete muMuVtx; - return HLT::OK; - } - - m_mon_Acceptance.push_back( ACCEPT_MuonTracks_Added ); - - //vertex fit - status = m_L2vertFitter->fit(muMuVtx); - if(status.isSuccess()) { - m_mon_Acceptance.push_back( ACCEPT_Muon_Vertexing ); - status = m_vertexingTool->calculateInvariantMass(muMuVtx); - }else{ - m_mon_Errors.push_back( ERROR_MuonVtxFit_Fails ); - ATH_MSG_DEBUG("MuMu vertex fit failed!"); - delete muMuVtx; - if(timerSvc()) { - m_TotTimer->stop(); - m_mon_TotalRunTime = m_TotTimer->elapsed(); - m_VtxFitTimer->stop(); - m_mon_VertexingTime = m_VtxFitTimer->elapsed(); - } - return HLT::OK; - } - //cut on chi2 - if( status.isFailure()) { - ATH_MSG_DEBUG("MuMu vertex fit failed!"); - m_mon_Errors.push_back( ERROR_CalcMuonVtxMass_Fails ); - delete muMuVtx; - if(timerSvc()) { - m_TotTimer->stop(); - m_mon_TotalRunTime = m_TotTimer->elapsed(); - m_VtxFitTimer->stop(); - m_mon_VertexingTime = m_VtxFitTimer->elapsed(); - - } - return HLT::OK; - }else{ - m_mon_Acceptance.push_back( ACCEPT_CalcInvMass ); - if(muMuVtx->chi2() < m_muVtxChi2Cut && muMuVtx->mass() > m_lowerMuVtxMassCut && muMuVtx->mass() < m_upperMuVtxMassCut) - { - ATH_MSG_DEBUG("MuMu vertex fit success:" - << " x= " << muMuVtx->getParametersVector()[0] //x - << ", y= " << muMuVtx->getParametersVector()[1] //y - << ", z= " << muMuVtx->getParametersVector()[2] //z - << ", chi2= " << muMuVtx->chi2() - << ", ndof= " << muMuVtx->ndof()); - }else{ - ATH_MSG_DEBUG("Mu mu combination rejected by vertex fit."); - m_mon_Errors.push_back( ERROR_MuonVtx_MassCut ); - //muon vertex - delete muMuVtx; - if(timerSvc()) { - m_TotTimer->stop(); - m_mon_TotalRunTime = m_TotTimer->elapsed(); - m_VtxFitTimer->pause(); // changed stop to pause -> overall vertexing time - //m_mon_VertexingTime = m_VtxFitTimer->elapsed(); - } - return HLT::OK; - } - } - delete muMuVtx; -// } // end of loop over muons - - m_mon_Acceptance.push_back( ACCEPT_MuonVtx_Part ); - } // end of vertexing muon part - ////////////////////////// end of muons part /////////////////////////////// - - //////////////////// merge of vectorOfTrackCollections ///////////////////// - std::vector<const xAOD::TrackParticleContainer*> vectorOfTrackCollections= merge_no_dupl(vectorOfTrackCollections1, vectorOfTrackCollections2); - /////////////////////////////////////////////////////////////////////////////// - ////////////////////////// output trigger element ///////////////////////////// - // create vector for TrigL2Bphys particles - - - m_trigBphysColl_bxAOD = new xAOD::TrigBphysContainer(); - xAOD::TrigBphysAuxContainer trigBphysAuxColl_bxAOD; - m_trigBphysColl_bxAOD->setStore(&trigBphysAuxColl_bxAOD); - //temporary - m_trigBphysColl_kStarxAOD = new xAOD::TrigBphysContainer(); - xAOD::TrigBphysAuxContainer trigBphysAuxColl_kStarxAOD; - m_trigBphysColl_kStarxAOD->setStore(&trigBphysAuxColl_kStarxAOD); - - m_trigBphysColl_phixAOD = new xAOD::TrigBphysContainer(); - xAOD::TrigBphysAuxContainer trigBphysAuxColl_phixAOD; - m_trigBphysColl_phixAOD->setStore(&trigBphysAuxColl_phixAOD); - - m_trigBphysColl_lambdaxAOD = new xAOD::TrigBphysContainer(); - xAOD::TrigBphysAuxContainer trigBphysAuxColl_lambdaxAOD; - m_trigBphysColl_lambdaxAOD->setStore(&trigBphysAuxColl_lambdaxAOD); - - m_trigBphysColl_dsxAOD = new xAOD::TrigBphysContainer(); - xAOD::TrigBphysAuxContainer trigBphysAuxColl_dsxAOD; - m_trigBphysColl_dsxAOD->setStore(&trigBphysAuxColl_dsxAOD); - - - //////////////////////////////////////////////////////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////////////////////////////// - //////////////////////// loop over InDetTrackCollections - quality check ///////////////////// - std::vector<const xAOD::TrackParticleContainer*>::const_iterator iTrackCollection = vectorOfTrackCollections.begin(); - std::vector<const xAOD::TrackParticleContainer*>::const_iterator endTrackCollection = vectorOfTrackCollections.end(); - std::vector<bool> GoodTrack((*iTrackCollection)->size(), false); - - // Number of tracks monitoring - if((*iTrackCollection)->size() > 0 ) m_mon_Acceptance.push_back( ACCEPT_Full_IDTracks ); - //m_mon_nTracks.push_back((*iTrackCollection)->size()); - //Boolean flags indicating what stages were already reached (for monitoring purposes) - //std::vector<bool> flag_stages( 43, false ); - - ///////////////////////////////////////////////////////////////////////////////// - ///////////////////////////////////////////////////////////////////////////////// - /////////////////////////// loop over all track collections ///////////////////// - ///////////////////////////////////////////////////////////////////////////////// - for(; iTrackCollection!=endTrackCollection;iTrackCollection++) { - int nGoodTrack=0; - //loop over tracks - // Monitor the tracks that failed to be added into the vertexing procedure - //std::vector<bool> addTrackFails ( (*iTrackCollection)->size(), false ); - xAOD::TrackParticleContainer::const_iterator iTrack = (*iTrackCollection)->begin(); - xAOD::TrackParticleContainer::const_iterator endTrack = (*iTrackCollection)->end(); - GoodTrack.resize ((*iTrackCollection)->size()); - for(int itrk=0; iTrack != endTrack; ++itrk, ++iTrack) { - GoodTrack[itrk]=false; - - if( (*iTrack) != NULL && (*iTrack)->chiSquared() < 200000. ) { -// GoodTrack[itrk]=true; -// nGoodTrack++; - ATH_MSG_DEBUG("InDet tracks: AlgoId " - << (*iTrack)->trackProperties() // JW was AlgoId - << " track " << *iTrack << " with " - << "pt=" << (*iTrack)->pt() - << ", eta=" << (*iTrack)->eta() - << ", phi=" << (*iTrack)->phi0() - << ", Z0=" << (*iTrack)->z0() - << ", d0=" << (*iTrack)->d0() - << ", chi2" << (*iTrack)->chiSquared() ); - - // Check that the track is not matched to muon -// const Trk::Perigee* perigee = iTrack->perigeeParameters(); - if ( - ( fabs((*iTrack)->pt() - muonCandidates[0]->idTrack()->pt())<100. - && fabs((*iTrack)->eta() - muonCandidates[0]->idTrack()->eta())<0.02 - && fabs((*iTrack)->phi() - muonCandidates[0]->idTrack()->phi())<0.02 ) || - ( fabs((*iTrack)->pt() - muonCandidates[1]->idTrack()->pt())<100. - && fabs((*iTrack)->eta() - muonCandidates[1]->idTrack()->eta())<0.02 - && fabs((*iTrack)->phi() - muonCandidates[1]->idTrack()->phi())<0.02 ) - ) { - ATH_MSG_DEBUG( "Track " << (*iTrack) << " was matched to a muon, skip it"); -// GoodTrack[itrk]=false; -// continue; - } else { - GoodTrack[itrk]=true; - nGoodTrack++; - // addon monitoring tracks - m_mon_pTTracks.push_back((*iTrack)-> pt()); - m_mon_etaTracks.push_back((*iTrack)->eta()); - m_mon_phiTracks.push_back((*iTrack)->phi()); - // end of monitoring - } - - }else{ - ATH_MSG_DEBUG("AllTracks: In AlgoId found problem or bad chi2 of track or muon track, so rejected" - << "chi2 = "<<(*iTrack)->chiSquared()); - - } // end test of response ID algorithm to track produce - - } // end of loop over tracks - itrk, iTrack - - ATH_MSG_DEBUG( "Found " << nGoodTrack << " good tracks in the track collection"); - m_mon_nTracks.push_back(nGoodTrack); - -// // Protection against TimeOuts -- will stop searching for the B->mu mu X decays if there are too many tracks -// if(nGoodTrack > m_maxNtracks) { -// ATH_MSG(INFO) << "Found " << nGoodTrack << " in the track collection, while maxNtracks = " << m_maxNtracks -// ); -// ATH_MSG(INFO) << "Only first " << m_maxNtracks << " tracks will be processed" -// ); -// m_mon_Errors.push_back(ERROR_TooManyTracks); -// //continue; -// } - - - //////////////////////// first loop over tracks in track collections ///////////////////// - xAOD::TrackParticleContainer::const_iterator iTrack2 = (*iTrackCollection)->begin(); - xAOD::TrackParticleContainer::const_iterator lastiTrack2 = (*iTrackCollection)->end(); - - for (int itrk=0; iTrack2 !=lastiTrack2; ++itrk, iTrack2++) { - if (!(GoodTrack[itrk]) ) continue; - - /////////////////////////// mumu + X part //////////////////////// - // B->K mu mu - if(m_doB_KMuMuDecay) { - ATH_MSG_DEBUG("Try to build B+ -> mu mu K+ with track " << *iTrack2); - checkBMuMuK(muonCandidates[0],muonCandidates[1],(*iTrack2), (*iTrackCollection), itrk); - nTriedCombinations++; - } //end of B->KMuMu decay - - // Protection - if(nTriedCombinations > m_maxNcombinations) { - ATH_MSG_DEBUG("Too many track combinations: "); - ATH_MSG_DEBUG(" nTriedCombinations = " << nTriedCombinations - << ", while MaxNcombinations = " << m_maxNcombinations); - ATH_MSG_DEBUG("Terminate the loop"); - ATH_MSG_DEBUG(" Bphys Collection size is " << m_trigBphysColl_bxAOD->size()); - if(m_trigBphysColl_bxAOD->size() > 0) - m_mon_Errors.push_back(ERROR_TooManyComb_Acc); - else - m_mon_Errors.push_back(ERROR_TooManyComb_Rej); - break; - } - - xAOD::TrackParticleContainer::const_iterator iTrack3= iTrack2+1; - for (int jtrk=itrk+1; iTrack3 !=lastiTrack2; ++jtrk, ++iTrack3) { - if (!(GoodTrack[jtrk]) ) continue; - - //If timeout has happened in spite of the protection - if ( Athena::Timeout::instance().reached() ) { - return HLT::ErrorCode(HLT::Action::ABORT_EVENT, HLT::Reason::TIMEOUT); - } - - if((*iTrack2)->charge() * (*iTrack3)->charge() < 0 ) { - - ATH_MSG_DEBUG("Try to build X with tracks " << *iTrack2 << ", " << *iTrack3); - // Bd ->K* mu mu - if(m_doBd_KstarMuMuDecay){ - checkBdMuMuKstar(muonCandidates[0],muonCandidates[1],(*iTrack2),(*iTrack3), (*iTrackCollection), itrk, jtrk); - nTriedCombinations++; - checkBdMuMuKstar(muonCandidates[0],muonCandidates[1],(*iTrack3),(*iTrack2), (*iTrackCollection), jtrk, itrk); - nTriedCombinations++; - } // end of Bd -> K* Mu Mu decay - - - // Bs ->Phi mu mu - if(m_doBs_Phi1020MuMuDecay){ - checkBsMuMuPhi(muonCandidates[0],muonCandidates[1],(*iTrack2),(*iTrack3), (*iTrackCollection), itrk, jtrk); - nTriedCombinations++; - } // end of Bs -> Phi Mu Mu decay - - - // Lb ->L mu mu - if(m_doLb_LambdaMuMuDecay){ - checkLbMuMuLambda(muonCandidates[0],muonCandidates[1],(*iTrack2),(*iTrack3), (*iTrackCollection), itrk, jtrk); - nTriedCombinations++; - checkLbMuMuLambda(muonCandidates[0],muonCandidates[1],(*iTrack3),(*iTrack2), (*iTrackCollection), jtrk, itrk); - nTriedCombinations++; - } // end of Lb -> L Mu Mu decay - - - // Bc ->Ds(->Phi pi) mu mu - if(m_doBc_DsMuMuDecay){ - - double xPhiMass = XMass((*iTrack2), (*iTrack3), bS_to_Phi); // decay = bS_to_Phi to actually calculate Phi->KK mass - - if ( xPhiMass > m_lowerPhiDs_MassCut && xPhiMass < m_upperPhiDs_MassCut ) { - - double xPhiMuMuMass = XMuMuMass (muonCandidates[0]->idTrack(), muonCandidates[1]->idTrack(), (*iTrack2), (*iTrack3), bS_to_Phi); - - if ( xPhiMuMuMass < m_upperBc_DsMuMuMassCut - PIMASS ) { - - xAOD::TrackParticleContainer::const_iterator iTrack4 = (*iTrackCollection)->begin(); - xAOD::TrackParticleContainer::const_iterator lastiTrack4 = (*iTrackCollection)->end(); - - for (int ktrk=0; iTrack4 !=lastiTrack4; ++ktrk, iTrack4++) { - if (!(GoodTrack[ktrk]) ) continue; - if ( iTrack4 != iTrack2 && iTrack4 != iTrack3 ) { - - checkBcMuMuDs(muonCandidates[0],muonCandidates[1],(*iTrack2), (*iTrack3), (*iTrack4), (*iTrackCollection), itrk, jtrk, xPhiMass, ktrk); - nTriedCombinations++; - - } - } - } - } - } // end of Bc -> Ds(->Phi pi) Mu Mu decay - - } else { // cut on different X candidates signs - ATH_MSG_DEBUG("Track pair rejected by opposite charge check: " - << *iTrack2 << " = " << (*iTrack2)->charge() << ", " - << *iTrack3 << " = " << (*iTrack3)->charge()); - } - } // end of loop over iTrack3 (internal) - } // end of loop over iTrack2 (external) - } //////////////// end of loop over InDetTrackCollections ////////////////// - - - ////////////////////////////////////////////////////////////////////////////// - //////////////////////////// update output TE //////////////////////////////// - ////////////////////////////////////////////////////////////////////////////// - - ATH_MSG_DEBUG("Totally tried to build " << nTriedCombinations << " tracks cobinations"); - m_mon_nTriedCombinations = nTriedCombinations; - - if ((m_trigBphysColl_bxAOD!=NULL) && (m_trigBphysColl_bxAOD->size() > 0)) { - ATH_MSG_DEBUG("REGTEST: Store Bphys Collection size: " << m_trigBphysColl_bxAOD->size()); - m_mon_nBphys = m_trigBphysColl_bxAOD->size(); - - HLT::ErrorCode sc = attachFeature(outputTE, m_trigBphysColl_lambdaxAOD, "L2BMuMuXFex_Lambda" ); - if(sc != HLT::OK) { - ATH_MSG_WARNING("Failed to store Lambda trigBphys Collection"); - return sc; - } - sc = attachFeature(outputTE, m_trigBphysColl_phixAOD, "L2BMuMuXFex_Phi" ); - if(sc != HLT::OK) { - ATH_MSG_WARNING("Failed to store Phi trigBphys Collection"); - return sc; - } - sc = attachFeature(outputTE, m_trigBphysColl_kStarxAOD, "L2BMuMuXFex_Kstar" ); - if(sc != HLT::OK) { - ATH_MSG_WARNING("Failed to store Kstar trigBphys Collection"); - return sc; - } - sc = attachFeature(outputTE, m_trigBphysColl_dsxAOD, "L2BMuMuXFex_Ds" ); - if(sc != HLT::OK) { - ATH_MSG_WARNING("Failed to store Ds trigBphys Collection"); - return sc; - } - sc = attachFeature(outputTE, m_trigBphysColl_bxAOD, "L2BMuMuXFex" ); - if(sc != HLT::OK) { - ATH_MSG_WARNING("Failed to store B+/-, Bd, Bs or Lb (Bar) trigBphys Collection"); - return sc; - } - }else{ - ATH_MSG_DEBUG("REGTEST: no B+/-, Bd, Bs or Lb (Bar) bphys collection to store " ); - delete m_trigBphysColl_bxAOD; - delete m_trigBphysColl_lambdaxAOD; - delete m_trigBphysColl_phixAOD; - delete m_trigBphysColl_kStarxAOD; - delete m_trigBphysColl_dsxAOD; - } - m_trigBphysColl_bxAOD=NULL; - // try add other collections to delete them!! -// delete m_trigBphysColl_lambda; - m_trigBphysColl_lambdaxAOD = NULL; -// delete m_trigBphysColl_phi; - m_trigBphysColl_phixAOD = NULL; -// delete m_trigBphysColl_kStar; - m_trigBphysColl_kStarxAOD = NULL; -// delete m_trigBphysColl_ds; - m_trigBphysColl_dsxAOD = NULL; - - /////////////////////////////////////////////////////////////////////// - ATH_MSG_DEBUG("Stopping timer..."); - if(timerSvc()) { - m_TotTimer->stop(); - m_mon_TotalRunTime = m_TotTimer->elapsed(); - } - ATH_MSG_DEBUG("Leaving execute..."); - return HLT::OK; -} -/*----------------------------------------------------------------------------*/ - - -//NEW -void TrigL2BMuMuXFex::checkBMuMuK(const xAOD::L2CombinedMuon* mu1, const xAOD::L2CombinedMuon* mu2, const xAOD::TrackParticle* trk3, - const xAOD::TrackParticleContainer* trkCollection, int iTrk3) { - double kMuMumass = KMuMuMass(mu1->idTrack(), mu2->idTrack(), trk3); - - if(kMuMumass > m_lowerKMuMuMassCut && kMuMumass < m_upperKMuMuMassCut) { - // Now make L2Bphys object - initial addon - xAOD::TrigBphys* trigPartBmumuKplus = new xAOD::TrigBphys(); - trigPartBmumuKplus->makePrivateStore(); - trigPartBmumuKplus->initialise(0., 0., 0., xAOD::TrigBphys::BKMUMU, kMuMumass,xAOD::TrigBphys::L2); - ATH_MSG_DEBUG(" Create B+ Bphys particle with roIId - more RoIs => 0" << trigPartBmumuKplus->roiId() << " mass " << kMuMumass - << " phi, eta - more RoIs => 0" << trigPartBmumuKplus->phi() << " " << trigPartBmumuKplus->eta() << " vertex type " << trigPartBmumuKplus->particleType()); - const ElementLink<xAOD::TrackParticleContainer>& track1EL = mu1->idTrackLink(); - const ElementLink<xAOD::TrackParticleContainer>& track2EL = mu2->idTrackLink(); - ElementLink<xAOD::TrackParticleContainer> track3EL(*trkCollection, iTrk3); - - ATH_MSG_VERBOSE("Just check track links... "); - ATH_MSG_VERBOSE("Muon 1 pT " << (*track1EL)->pt() << " eta: " << (*track1EL)->eta() << " phi: " << (*track1EL)->phi()); - ATH_MSG_VERBOSE("Muon 2 pT " << (*track2EL)->pt() << " eta: " << (*track2EL)->eta() << " phi: " << (*track2EL)->phi()); - ATH_MSG_VERBOSE("Track 1 pT " << (*track3EL)->pt() << " eta: " << (*track3EL)->eta() << " phi: " << (*track3EL)->phi()); - - trigPartBmumuKplus->addTrackParticleLink(track1EL); - trigPartBmumuKplus->addTrackParticleLink(track2EL); - trigPartBmumuKplus->addTrackParticleLink(track3EL); - - ATH_MSG_DEBUG(" K candidate accept: " <<trk3->pt()<< "MeV and B invariant mass "<< kMuMumass<< "MeV"); - m_mon_BMuMuK_InvMass_B.push_back((kMuMumass*0.001)); - m_mon_BMuMuK_PtB_K.push_back(trk3->pt()); - m_mon_BMuMuK_EtaB_K.push_back(trk3->eta()); - m_mon_BMuMuK_PhiB_K.push_back(trk3->phi()); - //////////////////////////////// vertexing ///////////////////////////////// - - - //////////////////////////////// X particles /////////////////////////////// - // B+/- vertexing & mass cut - if(m_doB_KMuMuVertexFit && m_doVertexFit) { - // B -> K Mu Mu vertexing - bool vertex=true; - TrigL2Vertex* baplusVtx = NULL; - TrigVertex* mother_BplusVtx = NULL; - if(timerSvc()){ - m_VtxFitTimer->start(); - m_VtxFitTimer->pause(); // resume it only for the vertexing periods - } - // Vertexing time processing - if(timerSvc()) m_VtxFitTimer->resume(); - - baplusVtx = new TrigL2Vertex(); - StatusCode status; - status = m_vertexingTool->addTrack(mu1->idTrack()->track(),baplusVtx,Trk::muon); // - if( status.isFailure() ) { - ATH_MSG_DEBUG(" Failed to add muon track 1 to vertexingTool of B vertex, with pT " <<mu1->idTrack()->pt() << " ."); - m_mon_Errors.push_back( ERROR_AddMuonTrack_Fails ); - //delete baplusVtx; - //continue; - vertex = false; - } - if(vertex) status = m_vertexingTool->addTrack(mu2->idTrack()->track(),baplusVtx,Trk::muon); // - if( status.isFailure() ) { - ATH_MSG_DEBUG(" Failed to add muon track 2 to vertexingTool of B vertex, with pT " <<mu2->idTrack()->pt() << " ."); - m_mon_Errors.push_back( ERROR_AddMuonTrack_Fails ); - //delete baplusVtx; - //continue; - vertex = false; - } - if(vertex) status = m_vertexingTool->addTrack(trk3->track(),baplusVtx,Trk::kaon); - if( status.isFailure() ) { - ATH_MSG_DEBUG(" Failed to add particle track 3 to vertexingTool of B vertex with pT, chi2 " <<trk3->pt() << " MeV, " << trk3->chiSquared() <<" ."); - m_mon_Errors.push_back( ERROR_AddTrack_Fails ); - //delete baplusVtx; - //continue; - vertex = false; - } - - //vertex fit - if(vertex) status = m_L2vertFitter->fit(baplusVtx); - if(status.isSuccess()) status = m_vertexingTool->calculateInvariantMass(baplusVtx); - if(status.isFailure()){ - ATH_MSG_DEBUG(" B vertex fit failed!"); - delete baplusVtx; - delete trigPartBmumuKplus; - m_mon_Errors.push_back( ERROR_VtxFitFailed ); - //continue; - vertex = false; - }else{ - mother_BplusVtx = m_vertexingTool->createTrigVertex(baplusVtx); - status = m_vertexingTool->createMotherParticle(baplusVtx); - if(status.isSuccess()){ - m_mon_Acceptance.push_back( ACCEPT_MotherVtxCreated ); - ATH_MSG_DEBUG(" B created, with pt: " << baplusVtx->getMotherTrack()->pT()); - }else{ - vertex = false; - } - if(mother_BplusVtx == NULL){ - ATH_MSG_DEBUG(" Vertex fit failed for particle candidate track " << trk3); - //delete mother_BplusVtx; - m_mon_Errors.push_back( ERROR_MotherVtxFitFailed ); - //continue; - delete trigPartBmumuKplus; - vertex = false; - }else{ - ATH_MSG_DEBUG(" B vertex fit: x = " <<mother_BplusVtx->x() - <<", y = " <<mother_BplusVtx->y() - <<", z = " <<mother_BplusVtx->z() - <<", mass = " <<mother_BplusVtx->mass() - <<", chi2 = " <<mother_BplusVtx->chi2() - <<", ndof = " <<mother_BplusVtx->ndof() /// (number degrees of freedom) - <<", massVariance = " <<mother_BplusVtx->massVariance()); - - if(mother_BplusVtx->massVariance() != 0) { - ATH_MSG_VERBOSE(" B mass pull = " << (mother_BplusVtx->mass()-BPLUSMASS/mother_BplusVtx->massVariance())); - }else{ - ATH_MSG_VERBOSE(" B mass variance is zero, can't calculate the pull"); - } - /// add vertex results to L2Bphys - trigPartBmumuKplus->setFitmass(mother_BplusVtx->mass()); - trigPartBmumuKplus->setFitchi2(mother_BplusVtx->chi2()); - trigPartBmumuKplus->setFitndof(mother_BplusVtx->ndof()); - trigPartBmumuKplus->setFitx(mother_BplusVtx->x()); - trigPartBmumuKplus->setFity(mother_BplusVtx->y()); - trigPartBmumuKplus->setFitz(mother_BplusVtx->z()); - - ATH_MSG_DEBUG(" SigmaX = SigmaY = SigmaZ = " << sqrt(mother_BplusVtx->cov()[0]) << " " - << sqrt(mother_BplusVtx->cov()[2]) << " " << sqrt(mother_BplusVtx->cov()[5])); - - // cut on chi2 and invariant mass of bplus after vertexing. - if(baplusVtx->chi2() < m_bVtxChi2Cut && - baplusVtx->mass() > m_lowerBVtxMassCut && baplusVtx->mass() < m_upperBVtxMassCut) - { - ATH_MSG_DEBUG(" B vertex fit success: x= " << baplusVtx->getParametersVector()[0] //x - << ", y= " << baplusVtx->getParametersVector()[1] //y - << ", z= " << baplusVtx->getParametersVector()[2] //z - << ", chi2= " << baplusVtx->chi2() - <<", ndof = " <<baplusVtx->ndof()); - - // perferct -> Bphys particle was stored in Collection - m_trigBphysColl_bxAOD->push_back(trigPartBmumuKplus); - ATH_MSG_DEBUG(" Added B vertex to vertex collection"); - - // monitoring - m_mon_BMuMuK_n++; - m_mon_Acceptance.push_back( ACCEPT_BphysCollParticle ); - m_mon_BMuMuK_VtxMass_B.push_back((baplusVtx->mass())*0.001); - m_mon_BMuMuK_Chi2toNDoF_B.push_back((baplusVtx->chi2())/(baplusVtx->ndof())); - m_mon_BMuMuK_VtxPtB_K.push_back((trk3->pt())*0.001); - m_mon_BMuMuK_VtxEtaB_K.push_back(trk3->eta()); - m_mon_BMuMuK_VtxPhiB_K.push_back(trk3->phi()); - ATH_MSG_DEBUG(" Finnished Bphys particle with fitmass" << trigPartBmumuKplus->fitmass() << " mass " << trigPartBmumuKplus->mass() - << " phi, eta - more RoIs => 0" << trigPartBmumuKplus->phi() << " " << trigPartBmumuKplus->eta() << " vertex type " << trigPartBmumuKplus->particleType()); - - }else{ - ATH_MSG_DEBUG(" B rejected by mass or chi2 cuts after vertex fit!" << ", chi2= " << baplusVtx->chi2()); - - delete mother_BplusVtx; - delete trigPartBmumuKplus; - } - } // end of successful fit condition "mother" - delete baplusVtx; - } // end of successful fit condition initial vertex - if(timerSvc()) { - m_VtxFitTimer->pause(); // resume it only for the vertexing periods - } - } // end of K Mu Mu vertex fit - else{ // if doVertexFit,... == False if((!m_doB_KMuMuVertexFit || m_doVertexFit)){ UPGRADE NEEDED - - //////////////////////////////////////////////////////////////////////////////////////////////////////// - // B+/- end of mass cuts, vertexing off - if (kMuMumass > m_lowerB_KMuMuMassCutVtxOff && kMuMumass < m_upperB_KMuMuMassCutVtxOff) { - ATH_MSG_DEBUG(" K candidate accept after tight cuts: " <<trk3->pt()<< "MeV and B invariant mass "<< kMuMumass<< "MeV"); - m_trigBphysColl_bxAOD->push_back(trigPartBmumuKplus); - ATH_MSG_DEBUG(" Added B+ particle to Bphys particle collection " - //<< ", eta=" trigPartBmumuKplus->eta() << ", phi= " << trigPartBmumuKplus->phi() - << ", mass= " << trigPartBmumuKplus->mass() << ", particle type= " << trigPartBmumuKplus->particleType()); - // monitoring - m_mon_BMuMuK_n++; - m_mon_Acceptance.push_back( ACCEPT_BphysCollParticle ); - m_mon_BMuMuK_InvMass_B.push_back((kMuMumass*0.001)); - m_mon_BMuMuK_PtB_K.push_back(trk3->pt()); - m_mon_BMuMuK_EtaB_K.push_back(trk3->eta()); - m_mon_BMuMuK_PhiB_K.push_back(trk3->phi()); - }else{ - ATH_MSG_DEBUG(" No B+ particle stored due cuts! "); - delete trigPartBmumuKplus; - } - - } - ///////////////////////// end of B -> K Mu Mu part with vertexing off ///////////////////////// - } else {// end of invariant mass cuts - ATH_MSG_DEBUG(" B+ rejected due do B+ mass cut"); - } - //////////////////////////////////////////////////////////////////////////////// - -} //checkBMuMuK new - -// NEW -void TrigL2BMuMuXFex::checkBdMuMuKstar(const xAOD::L2CombinedMuon* mu1, const xAOD::L2CombinedMuon* mu2, - const xAOD::TrackParticle* trk3, const xAOD::TrackParticle* trk4, const xAOD::TrackParticleContainer* trkCollection, int iTrk3, int iTrk4) { - - double xMass = 0; - double xMuMuMass = 0; - - xMass = XMass(trk3,trk4, bD_to_Kstar); - xMuMuMass = XMuMuMass(mu1->idTrack(), mu2->idTrack(), trk3, trk4, bD_to_Kstar); - - if ((xMass > m_lowerKstar_KaonMassCut && xMass < m_upperKstar_KaonMassCut) && (xMuMuMass > m_lowerBd_KstarMuMuMassCut && xMuMuMass < m_upperBd_KstarMuMuMassCut)) { - // Now make L2Bphys object - initial addon - xAOD::TrigBphys* trigPartBmumuKstar = new xAOD::TrigBphys(); - trigPartBmumuKstar->makePrivateStore(); - trigPartBmumuKstar->initialise(0., 0., 0., xAOD::TrigBphys::PHIKK, xMass,xAOD::TrigBphys::L2); - - ATH_MSG_DEBUG(" Create K* Bphys particle with roIId - more RoIs => " << trigPartBmumuKstar->roiId() << " mass " << xMass - << " phi, eta - more RoIs => " << trigPartBmumuKstar->phi() << " " << trigPartBmumuKstar->eta() << " vertex type " << trigPartBmumuKstar->particleType()); - - // Store links to the tracks forming bphys particle - - ElementLink<xAOD::TrackParticleContainer> track3EL(*trkCollection, iTrk3); - ElementLink<xAOD::TrackParticleContainer> track4EL(*trkCollection, iTrk4); - - ATH_MSG_VERBOSE("Just check track links... "); - ATH_MSG_VERBOSE("Track 1 pT " << (*track3EL)->pt() << " eta: " << (*track3EL)->eta() << " phi: " << (*track3EL)->phi()); - ATH_MSG_VERBOSE("Track 2 pT " << (*track4EL)->pt() << " eta: " << (*track4EL)->eta() << " phi: " << (*track4EL)->phi()); - - trigPartBmumuKstar->addTrackParticleLink(track3EL); - trigPartBmumuKstar->addTrackParticleLink(track4EL); - // end of initial addon - - - // if(msgLvl() <= MSG::DEBUG) ATH_MSG_DEBUG(" Kstar's Pion and Kaon Candidates accepted with K* mass: " << xMass << "MeV" - // << " and with Bd mass : " << xMuMuMass << "MeV" - // << " kaon particle with pt: "<< (trk3)->pt() - // << " pion charged particle with pt: "<< (trk4)->pt() - // ); - m_mon_BdMuMuKs_InvMassBd_Ks.push_back((xMass*0.001)); - m_mon_BdMuMuKs_PtKs_Ka.push_back((trk3)->pt()); - m_mon_BdMuMuKs_EtaKs_Ka.push_back((trk3)->eta()); - m_mon_BdMuMuKs_PhiKs_Ka.push_back((trk3)->phi()); - m_mon_BdMuMuKs_PtKs_Pi.push_back((trk4)->pt()); - m_mon_BdMuMuKs_EtaKs_Pi.push_back((trk4)->eta()); - m_mon_BdMuMuKs_PhiKs_Pi.push_back((trk4)->phi()); - - bool goodKstar = false; - //K* vertexing & mass cut - if(m_doKstar_KaonPionVertexFit && m_doVertexFit) { - bool vertex = true; - TrigL2Vertex* kaStarVtx = NULL; - TrigVertex* mother_KstarVtx = NULL; - - // timer - if(timerSvc()) m_VtxFitTimer->resume(); - kaStarVtx = new TrigL2Vertex(); - - StatusCode status; - status = m_vertexingTool->addTrack(trk3->track(),kaStarVtx,Trk::kaon); - if( status.isFailure() ) { - //delete kaStarVtx; - //continue; - vertex = false; - } - if(vertex) status = m_vertexingTool->addTrack(trk4->track(),kaStarVtx,Trk::pion); - if( status.isFailure() ) { - //delete kaStarVtx; - //continue; - vertex = false; - } - - ////////////// - //vertex fit - if(vertex) status = m_L2vertFitter->fit(kaStarVtx); - if(status.isSuccess() && kaStarVtx != NULL) status = m_vertexingTool->calculateInvariantMass(kaStarVtx); - if(status.isFailure() || kaStarVtx == NULL){ - ATH_MSG_DEBUG(" Kstar vertex fit failed!"); - delete kaStarVtx; - if(timerSvc()) m_VtxFitTimer->pause(); - //continue; // for performance test not continue? - vertex=false; - }else{ - mother_KstarVtx = m_vertexingTool->createTrigVertex(kaStarVtx); - status = m_vertexingTool->createMotherParticle(kaStarVtx); - if(status.isSuccess()){ - ATH_MSG_DEBUG(" Kstar created, with pt: " << kaStarVtx->getMotherTrack()->pT()); - } - if(mother_KstarVtx == NULL){ - ATH_MSG_DEBUG(" Vertex fit failed for particle candidate tracks " << trk3<<" and " << trk4); - if(timerSvc()) m_VtxFitTimer->pause(); - //continue; // for performance test not continue? - vertex = false; - }else{ - ATH_MSG_DEBUG(" Kstar vertex fit: x = " <<mother_KstarVtx->x() - <<", y = " <<mother_KstarVtx->y() <<", z = " <<mother_KstarVtx->z() - <<", mass = " <<mother_KstarVtx->mass()<<", chi2 = " <<mother_KstarVtx->chi2() - <<", ndof = " <<mother_KstarVtx->ndof()<<", massVariance = " <<mother_KstarVtx->massVariance()); - - if(mother_KstarVtx->massVariance() != 0) { - ATH_MSG_VERBOSE(" Kstar mass pull = " << (mother_KstarVtx->mass()-KSTARMASS/mother_KstarVtx->massVariance())); - }else{ - ATH_MSG_VERBOSE(" Kstar mass variance is zero, can't calculate the pull"); - } - - /// add vertex results to L2Bphys - trigPartBmumuKstar->setFitmass(mother_KstarVtx->mass()); - trigPartBmumuKstar->setFitchi2(mother_KstarVtx->chi2()); - trigPartBmumuKstar->setFitndof(mother_KstarVtx->ndof()); - trigPartBmumuKstar->setFitx(mother_KstarVtx->x()); - trigPartBmumuKstar->setFity(mother_KstarVtx->y()); - trigPartBmumuKstar->setFitz(mother_KstarVtx->z()); - ATH_MSG_DEBUG(" SigmaX = SigmaY = SigmaZ = " << sqrt(mother_KstarVtx->cov()[0]) << " " << sqrt(mother_KstarVtx->cov()[2]) << " " << sqrt(mother_KstarVtx->cov()[5])); - - // cut on chi2 and invariant mass of kStar after vertexing. - if(kaStarVtx->chi2() < m_kStarVtxChi2Cut && - kaStarVtx->mass() > m_lowerKstarVtxMassCut && kaStarVtx->mass() < m_upperKstarVtxMassCut) - { - ATH_MSG_DEBUG(" Kstar vertex fit success: x= " - << kaStarVtx->getParametersVector()[0] //x - << ", y= " << kaStarVtx->getParametersVector()[1] //y - << ", z= " << kaStarVtx->getParametersVector()[2] //z - << ", chi2= " << kaStarVtx->chi2() <<", ndof = " <<kaStarVtx->ndof()); - goodKstar = true; - - - // monitoring - m_mon_BdMuMuKs_VtxMassBd_Ks.push_back((kaStarVtx->mass())*0.001); - m_mon_BdMuMuKs_Chi2toNDoFBd_Ks.push_back((kaStarVtx->chi2())/(kaStarVtx->ndof())); - - m_mon_BdMuMuKs_VtxPtKs_Ka.push_back((trk3->pt())*0.001); - m_mon_BdMuMuKs_VtxEtaKs_Ka.push_back(trk3->eta()); - m_mon_BdMuMuKs_VtxPhiKs_Ka.push_back(trk3->phi()); - m_mon_BdMuMuKs_VtxPtKs_Pi.push_back((trk4->pt())*0.001); - m_mon_BdMuMuKs_VtxEtaKs_Pi.push_back(trk4->eta()); - m_mon_BdMuMuKs_VtxPhiKs_Pi.push_back(trk4->phi()); - - ATH_MSG_DEBUG(" Finnished Bphys daughter particle with fitmass" << trigPartBmumuKstar->fitmass() << " mass " << trigPartBmumuKstar->mass() - << " phi, eta - more RoIs => 0" << trigPartBmumuKstar->phi() << " " << trigPartBmumuKstar->eta() << " vertex type " << trigPartBmumuKstar->particleType()); - - }else{ - ATH_MSG_DEBUG(" B0 rejected by mass or chi2 cuts after vertex fit!" << ", chi2= " << kaStarVtx->chi2()); - if(timerSvc()) m_VtxFitTimer->pause(); - //continue; // for performance test not continue - delete mother_KstarVtx; - } - } // end of successful fit condition "mother" - delete kaStarVtx; - } // end of successful fit condition initial vertex - if(timerSvc()) m_VtxFitTimer->pause(); - } // end Kstar_KaonPion vertex fit - - m_trigBphysColl_kStarxAOD->push_back(trigPartBmumuKstar); - int KstarIndex = m_trigBphysColl_kStarxAOD->size() - 1; - - if(m_doKstar_KaonPionVertexFit && goodKstar) { - ATH_MSG_DEBUG(" Well done in Kstar vertexing!!!"); - - // Bd+/- vertexing & mass cut - if(m_doBd_KstarMuMuVertexFit && m_doVertexFit){ - bool vertex = true; - if(timerSvc()) m_VtxFitTimer->resume(); - TrigL2Vertex* baDVtx = NULL; - TrigVertex* mother_BdVtx=NULL; - baDVtx = new TrigL2Vertex(); - StatusCode status; - status = m_vertexingTool->addTrack(mu1->idTrack()->track(),baDVtx,Trk::muon); // - if(status.isFailure()){ - //delete baDVtx; - if(timerSvc()) m_VtxFitTimer->pause(); - //continue; - vertex = false; - } - if(vertex) status = m_vertexingTool->addTrack(mu2->idTrack()->track(),baDVtx,Trk::muon); // - if(status.isFailure()){ - //delete baDVtx; - if(timerSvc()) m_VtxFitTimer->pause(); - //continue; - vertex = false; - } - if(vertex) status = m_vertexingTool->addTrack(trk3->track(),baDVtx,Trk::kaon); - if(status.isFailure()){ - //delete baDVtx; - if(timerSvc()) m_VtxFitTimer->pause(); - //continue; - vertex = false; - } - if(vertex) status = m_vertexingTool->addTrack(trk4->track(),baDVtx,Trk::pion); - if(status.isFailure()){ - //delete baDVtx; - if(timerSvc()) m_VtxFitTimer->pause(); - //continue; - vertex = false; - } - - //ElementLink<TrigL2BphysContainer> trigPartBdEL(*m_trigBphysColl_kStar,KstarIndex); - ElementLink<xAOD::TrigBphysContainer> trigPartBdEL(*m_trigBphysColl_kStarxAOD,KstarIndex); - - //TrigL2Bphys* trigPartBmumuBd = new TrigL2Bphys(0.0, 0.0, 0.0, TrigL2Bphys::BDKSTMUMU, xMuMuMass, trigPartBdEL); - xAOD::TrigBphys* trigPartBmumuBd = new xAOD::TrigBphys(); - trigPartBmumuBd->makePrivateStore(); - trigPartBmumuBd->initialise(0.0, 0.0, 0.0, xAOD::TrigBphys::BDKSTMUMU, xMuMuMass, trigPartBdEL,xAOD::TrigBphys::L2); - - //vertex fit - if(vertex) status = m_L2vertFitter->fit(baDVtx); - if(status.isSuccess()) status = m_vertexingTool->calculateInvariantMass(baDVtx); - if(status.isFailure()){ - ATH_MSG_DEBUG(" Bd vertex fit failed!"); - delete baDVtx; - delete trigPartBmumuBd; - //continue; // for performance test not continue - vertex = false; - }else{ - mother_BdVtx = m_vertexingTool->createTrigVertex(baDVtx); - status = m_vertexingTool->createMotherParticle(baDVtx); - if(status.isSuccess()){ - ATH_MSG_DEBUG(" Bd created, with pt: " << baDVtx->getMotherTrack()->pT()); - } - if(mother_BdVtx == NULL){ - ATH_MSG_DEBUG(" Vertex fit failed for particle candidate track " << trk3 <<" and "<<trk4); - delete trigPartBmumuBd; - //continue; // for performance test not continue - vertex = false; - }else{ - ATH_MSG_DEBUG(" Bd vertex fit: x = " <<mother_BdVtx->x() <<", y = " <<mother_BdVtx->y() - <<", z = " <<mother_BdVtx->z() <<", mass = " <<mother_BdVtx->mass() - <<", chi2 = " <<mother_BdVtx->chi2() <<", ndof = " <<mother_BdVtx->ndof() <<", massVariance = " <<mother_BdVtx->massVariance()); - if(mother_BdVtx->massVariance() != 0) { - ATH_MSG_VERBOSE(" Bd mass pull = " << (mother_BdVtx->mass()-BDMASS/mother_BdVtx->massVariance())); - }else{ - ATH_MSG_VERBOSE(" Bd mass variance is zero, can't calculate the pull"); - } - /// add vertex results to L2Bphys - trigPartBmumuBd->setFitmass(mother_BdVtx->mass()); - trigPartBmumuBd->setFitchi2(mother_BdVtx->chi2()); - trigPartBmumuBd->setFitndof(mother_BdVtx->ndof()); - trigPartBmumuBd->setFitx(mother_BdVtx->x()); - trigPartBmumuBd->setFity(mother_BdVtx->y()); - trigPartBmumuBd->setFitz(mother_BdVtx->z()); - - ATH_MSG_DEBUG(" SigmaX = SigmaY = SigmaZ = " << sqrt(mother_BdVtx->cov()[0]) << " " << sqrt(mother_BdVtx->cov()[2]) << " " << sqrt(mother_BdVtx->cov()[5])); - - // cut on chi2 and invariant mass of Bd after vertexing. - if(baDVtx->chi2() < m_bDVtxChi2Cut && baDVtx->mass() > m_lowerBdVtxMassCut && baDVtx->mass() < m_upperBdVtxMassCut) - { - ATH_MSG_DEBUG(" Bd vertex fit success: x= " - << baDVtx->getParametersVector()[0] //x - << ", y= " << baDVtx->getParametersVector()[1] //y - << ", z= " << baDVtx->getParametersVector()[2] //z - << ", chi2= " << baDVtx->chi2() <<", ndof = " <<baDVtx->ndof()); - - // PERFECT -> Bphys particle was stored in collection - m_trigBphysColl_bxAOD->push_back(trigPartBmumuBd); - ATH_MSG_DEBUG(" Added Bd vertex to vertex collection"); - - // monitoring of successfuly stored particles - m_mon_BdMuMuKs_n++; - m_mon_Acceptance.push_back( ACCEPT_BphysCollParticle ); - m_mon_BdMuMuKs_VtxMass_Bd.push_back((baDVtx->mass())*0.001); - m_mon_BdMuMuKs_Chi2toNDoF_Bd.push_back((baDVtx->chi2())/(baDVtx->ndof())); - - m_mon_BdMuMuKs_VtxPtBd_Ka.push_back((trk3->pt())*0.001); - m_mon_BdMuMuKs_VtxEtaBd_Ka.push_back(trk3->eta()); - m_mon_BdMuMuKs_VtxPhiBd_Ka.push_back(trk3->phi()); - m_mon_BdMuMuKs_VtxPtBd_Pi.push_back((trk4->pt())*0.001); - m_mon_BdMuMuKs_VtxEtaBd_Pi.push_back(trk4->eta()); - m_mon_BdMuMuKs_VtxPhiBd_Pi.push_back(trk4->phi()); - - ATH_MSG_DEBUG(" Finnished Bphys particle with fitmass" << trigPartBmumuBd->fitmass() << " mass " << trigPartBmumuBd->mass() - << " phi, eta - more RoIs => 0" << trigPartBmumuBd->phi() << " " << trigPartBmumuBd->eta() << " vertex type " << trigPartBmumuBd->particleType()); - - }else{ - ATH_MSG_DEBUG(" Bd rejected by mass or chi2 cuts after vertex fit!" << ", chi2= " << baDVtx->chi2()); - delete trigPartBmumuBd; - //continue; // for performance test not continue - vertex = false; - } - } // end of successful fit condition "mother" - if (vertex){ - } else { - delete mother_BdVtx; - } - delete baDVtx; - } // end of successful fit condition initial vertex - - } // Bd -> K* Mu Mu vertexing - } // test over failed vertexing - - //////////////////////////////// vertexing off /////////////////////////////////////////////// - if(!m_doBd_KstarMuMuVertexFit || !m_doVertexFit){ - if ((xMuMuMass > m_lowerBd_KstarMuMuMassCutVtxOff && xMuMuMass < m_upperBd_KstarMuMuMassCutVtxOff)) { - - // Store links to the tracks forming bphys particle - - const ElementLink<xAOD::TrackParticleContainer>& track1ELBd = mu1->idTrackLink(); - const ElementLink<xAOD::TrackParticleContainer>& track2ELBd = mu2->idTrackLink(); - ElementLink<xAOD::TrackParticleContainer> track3ELBd(*trkCollection, iTrk3); - ElementLink<xAOD::TrackParticleContainer> track4ELBd(*trkCollection, iTrk4); - - ATH_MSG_VERBOSE("Just check track links... "); - ATH_MSG_VERBOSE("Muon 1 pT " << (*track1ELBd)->pt() << " eta: " << (*track1ELBd)->eta() << " phi: " << (*track1ELBd)->phi()); - ATH_MSG_VERBOSE("Muon 2 pT " << (*track2ELBd)->pt() << " eta: " << (*track2ELBd)->eta() << " phi: " << (*track2ELBd)->phi()); - ATH_MSG_VERBOSE("Track 1 pT " << (*track3ELBd)->pt() << " eta: " << (*track3ELBd)->eta() << " phi: " << (*track3ELBd)->phi()); - ATH_MSG_VERBOSE("Track 2 pT " << (*track4ELBd)->pt() << " eta: " << (*track4ELBd)->eta() << " phi: " << (*track4ELBd)->phi()); - - ElementLink<xAOD::TrigBphysContainer> trigPartBdEL(*m_trigBphysColl_kStarxAOD,KstarIndex); - - xAOD::TrigBphys * trigPartBmumuBd = new xAOD::TrigBphys(); - trigPartBmumuBd->makePrivateStore(); - trigPartBmumuBd->initialise(0.0, 0.0, 0.0, xAOD::TrigBphys::BDKSTMUMU, xMuMuMass,trigPartBdEL, xAOD::TrigBphys::L2); - - trigPartBmumuBd->addTrackParticleLink(track1ELBd); - trigPartBmumuBd->addTrackParticleLink(track2ELBd); - trigPartBmumuBd->addTrackParticleLink(track3ELBd); - trigPartBmumuBd->addTrackParticleLink(track4ELBd); - m_trigBphysColl_bxAOD->push_back(trigPartBmumuBd); - - - ATH_MSG_DEBUG(" Kstar's Pion and Kaon Candidates accepted with K* mass: " << xMass << "MeV" << " and with Bd mass : " << xMuMuMass << "MeV" - << " kaon particle with pt: "<< trk3->pt() << " pion charged particle with pt: "<< trk4->pt()); - ATH_MSG_DEBUG(" Added Bd particle to Bphys particle collection " << ", mass= " << trigPartBmumuBd->mass() << ", particle type= " << trigPartBmumuBd->particleType()); - - m_mon_BdMuMuKs_n++; - m_mon_BdMuMuKs_InvMassBd_Ks.push_back((xMass*0.001)); - m_mon_BdMuMuKs_InvMass_Bd.push_back((xMuMuMass*0.001)); - m_mon_BdMuMuKs_PtKs_Ka.push_back(trk3->pt()); - m_mon_BdMuMuKs_EtaKs_Ka.push_back(trk3->eta()); - m_mon_BdMuMuKs_PhiKs_Ka.push_back(trk3->phi()); - m_mon_BdMuMuKs_PtKs_Pi.push_back(trk4->pt()); - m_mon_BdMuMuKs_EtaKs_Pi.push_back(trk4->eta()); - m_mon_BdMuMuKs_PhiKs_Pi.push_back(trk4->phi()); - - }else{// end of tighter mass cuts - ATH_MSG_DEBUG(" Bd rejected due to Bd mass cut (no vertexing) "); - } - - } // end of no vertexing part - - - } else { // end of if Kstar and Bd successful mass cuts - ATH_MSG_DEBUG(" Bd rejected due to K* or Bd mass cut "); - } - - - -} // checkBdMuMuKstar new - -//NEW -void TrigL2BMuMuXFex::checkBsMuMuPhi(const xAOD::L2CombinedMuon* mu1, const xAOD::L2CombinedMuon* mu2, const xAOD::TrackParticle* trk3, - const xAOD::TrackParticle* trk4, const xAOD::TrackParticleContainer* trkCollection, int iTrk3, int iTrk4){ - double xMass = XMass(trk3,trk4, bS_to_Phi); - double xMuMuMass = XMuMuMass(mu1->idTrack(), mu2->idTrack(),trk3,trk4, bS_to_Phi); - - if ((xMass > m_lowerPhi1020_KaonMassCut && xMass < m_upperPhi1020_KaonMassCut) && (xMuMuMass > m_lowerBs_Phi1020MuMuMassCut && xMuMuMass < m_upperBs_Phi1020MuMuMassCut)) { - // Now make L2Bphys object - initial addon - //TrigL2Bphys* trigPartBmumuPhi = new TrigL2Bphys(0., 0., 0., TrigL2Bphys::PHIKK, xMass); - xAOD::TrigBphys * trigPartBmumuPhi= new xAOD::TrigBphys(); - trigPartBmumuPhi->makePrivateStore(); - trigPartBmumuPhi->initialise(0., 0., 0., xAOD::TrigBphys::PHIKK, xMass,xAOD::TrigBphys::L2); - - ATH_MSG_DEBUG(" Create Phi1020 Bphys particle with roIId - more RoIs => " << trigPartBmumuPhi->roiId() << " mass " << xMass - << " phi, eta - more RoIs => " << trigPartBmumuPhi->phi() << " " << trigPartBmumuPhi->eta() << " vertex type " << trigPartBmumuPhi->particleType()); - - // Store links to the tracks forming bphys particle - - ElementLink<xAOD::TrackParticleContainer> track3EL(*trkCollection, iTrk3); - ElementLink<xAOD::TrackParticleContainer> track4EL(*trkCollection, iTrk4); - - ATH_MSG_VERBOSE("Just check track links... "); - ATH_MSG_VERBOSE("Track 1 pT " << (*track3EL)->pt() << " eta: " << (*track3EL)->eta() << " phi: " << (*track3EL)->phi()); - ATH_MSG_VERBOSE("Track 2 pT " << (*track4EL)->pt() << " eta: " << (*track4EL)->eta() << " phi: " << (*track4EL)->phi()); - - trigPartBmumuPhi->addTrackParticleLink(track3EL); - trigPartBmumuPhi->addTrackParticleLink(track4EL); - // end of initial addon - - if(trk3->pt()*trk3->charge() > 0) { - // if(msgLvl() <= MSG::DEBUG) ATH_MSG_DEBUG(" Phi's Pion and Kaon Candidates accepted with K* mass: " << xMass << "MeV" - // << " and with Bd mass : " << xMuMuMass << "MeV" - // << " positive charged particle with pt: "<< trk3->pt() - // << " negative charged particle with pt: "<< trk4->pt() - // ); - m_mon_BsMuMuPhi_InvMassBs_Phi.push_back((xMass*0.001)); - m_mon_BsMuMuPhi_InvMass_Bs.push_back((xMuMuMass*0.001)); - m_mon_BsMuMuPhi_PtPhi_Kp.push_back(trk3->pt()); - m_mon_BsMuMuPhi_EtaPhi_Kp.push_back(trk3->eta()); - m_mon_BsMuMuPhi_PhiPhi_Kp.push_back(trk3->phi()); - m_mon_BsMuMuPhi_PtPhi_Km.push_back(trk4->pt()); - m_mon_BsMuMuPhi_EtaPhi_Km.push_back(trk4->eta()); - m_mon_BsMuMuPhi_PhiPhi_Km.push_back(trk4->phi()); - }else{ - // if(msgLvl() <= MSG::DEBUG) ATH_MSG_DEBUG(" Phi's Pion and Kaon Candidates accepted with K* mass: " << xMass << "MeV" - // << " and with Bd mass : " << xMuMuMass << "MeV" - // << " positive charged particle with pt: "<< trk4->pt() - // << " negative charged particle with pt: "<< trk3->pt() - // <<endmsg; - m_mon_BsMuMuPhi_InvMassBs_Phi.push_back((xMass*0.001)); - m_mon_BsMuMuPhi_InvMass_Bs.push_back((xMuMuMass*0.001)); - m_mon_BsMuMuPhi_PtPhi_Kp.push_back(trk4->pt()); - m_mon_BsMuMuPhi_EtaPhi_Kp.push_back(trk4->eta()); - m_mon_BsMuMuPhi_PhiPhi_Kp.push_back(trk4->phi()); - m_mon_BsMuMuPhi_PtPhi_Km.push_back(trk3->pt()); - m_mon_BsMuMuPhi_EtaPhi_Km.push_back(trk3->eta()); - m_mon_BsMuMuPhi_PhiPhi_Km.push_back(trk3->phi()); - } - bool goodPhi = false; - //K* vertexing & mass cut - if(m_doPhi1020_KaonKaonVertexFit && m_doVertexFit) { - bool vertex = true; - TrigL2Vertex* phia1020Vtx = NULL; - TrigVertex* mother_PhiVtx = NULL; - // timer - if(timerSvc()) m_VtxFitTimer->resume(); - phia1020Vtx = new TrigL2Vertex(); - StatusCode status; - status = m_vertexingTool->addTrack(trk3->track(),phia1020Vtx,Trk::kaon); - if( status.isFailure() ) { - //delete phia1020Vtx; - //continue; - vertex = false; - } - if(vertex) status = m_vertexingTool->addTrack(trk4->track(),phia1020Vtx,Trk::kaon); - if( status.isFailure() ) { - //delete phia1020Vtx; - //continue; - vertex = false; - } - ////////////// - //vertex fit - if(vertex) status = m_L2vertFitter->fit(phia1020Vtx); - if(status.isSuccess() && phia1020Vtx != NULL) status = m_vertexingTool->calculateInvariantMass(phia1020Vtx); - if(status.isFailure() || phia1020Vtx == NULL){ - ATH_MSG_DEBUG(" Phi vertex fit failed!"); - delete phia1020Vtx; - if(timerSvc()) m_VtxFitTimer->pause(); - //continue; // for performance test not continue? - vertex = false; - }else{ - mother_PhiVtx = m_vertexingTool->createTrigVertex(phia1020Vtx); - status = m_vertexingTool->createMotherParticle(phia1020Vtx); - if(status.isSuccess()){ - ATH_MSG_DEBUG(" Phi created, with pt: " << phia1020Vtx->getMotherTrack()->pT()); - } - if(mother_PhiVtx == NULL){ - ATH_MSG_DEBUG(" Vertex fit failed for particle candidate tracks " << trk3<<" and "<<trk4); - if(timerSvc()) m_VtxFitTimer->pause(); - //continue; // for performance test not continue? - vertex = false; - }else{ - ATH_MSG_DEBUG(" Phi vertex fit: x = " <<mother_PhiVtx->x() - <<", y = " <<mother_PhiVtx->y() - <<", z = " <<mother_PhiVtx->z() - <<", mass = " <<mother_PhiVtx->mass() - <<", chi2 = " <<mother_PhiVtx->chi2() - <<", ndof = " <<mother_PhiVtx->ndof() /// (number degrees of freedom) - <<", massVariance = " <<mother_PhiVtx->massVariance()); - if(mother_PhiVtx->massVariance() != 0) { - ATH_MSG_VERBOSE(" Phi mass pull = " << (mother_PhiVtx->mass()-PHIMASS/mother_PhiVtx->massVariance())); - }else{ - ATH_MSG_VERBOSE(" Phi mass variance is zero, can't calculate the pull"); - } - - /// add vertex results to L2Bphys - trigPartBmumuPhi->setFitmass(mother_PhiVtx->mass()); - trigPartBmumuPhi->setFitchi2(mother_PhiVtx->chi2()); - trigPartBmumuPhi->setFitndof(mother_PhiVtx->ndof()); - trigPartBmumuPhi->setFitx(mother_PhiVtx->x()); - trigPartBmumuPhi->setFity(mother_PhiVtx->y()); - trigPartBmumuPhi->setFitz(mother_PhiVtx->z()); - ATH_MSG_DEBUG(" SigmaX = SigmaY = SigmaZ = " << sqrt(mother_PhiVtx->cov()[0]) << " " << sqrt(mother_PhiVtx->cov()[2]) << " " << sqrt(mother_PhiVtx->cov()[5])); - - // cut on chi2 and invariant mass of bplus after vertexing. - if(phia1020Vtx->chi2() < m_phi1020VtxChi2Cut && - phia1020Vtx->mass() > m_lowerPhi1020VtxMassCut && phia1020Vtx->mass() < m_upperPhi1020VtxMassCut) - { - ATH_MSG_DEBUG(" Phi vertex fit success: x= " - << phia1020Vtx->getParametersVector()[0] //x - << ", y= " << phia1020Vtx->getParametersVector()[1] //y - << ", z= " << phia1020Vtx->getParametersVector()[2] //z - << ", chi2= " << phia1020Vtx->chi2() - <<", ndof = " <<phia1020Vtx->ndof()); - - goodPhi = true; - // GREAT -> store daughter particle info - ATH_MSG_DEBUG(" Added Phi vertex to vertex collection"); - - // monitoring - m_mon_BsMuMuPhi_VtxMassBs_Phi.push_back((phia1020Vtx->mass())*0.001); - m_mon_BsMuMuPhi_Chi2toNDoFBs_Phi.push_back((phia1020Vtx->chi2())/(phia1020Vtx->ndof())); - if(trk3->pt() * trk3->charge() > 0) { - m_mon_BsMuMuPhi_VtxPtPhi_Kp.push_back((trk3->pt())*0.001); - m_mon_BsMuMuPhi_VtxEtaPhi_Kp.push_back(trk3->eta()); - m_mon_BsMuMuPhi_VtxPhiPhi_Kp.push_back(trk3->phi()); - m_mon_BsMuMuPhi_VtxPtPhi_Km.push_back((trk4->pt())*0.001); - m_mon_BsMuMuPhi_VtxEtaPhi_Km.push_back(trk4->eta()); - m_mon_BsMuMuPhi_VtxPhiPhi_Km.push_back(trk4->phi()); - }else{ - m_mon_BsMuMuPhi_VtxPtPhi_Kp.push_back((trk4->pt())*0.001); - m_mon_BsMuMuPhi_VtxEtaPhi_Kp.push_back(trk4->eta()); - m_mon_BsMuMuPhi_VtxPhiPhi_Kp.push_back(trk4->phi()); - m_mon_BsMuMuPhi_VtxPtPhi_Km.push_back((trk3->pt())*0.001); - m_mon_BsMuMuPhi_VtxEtaPhi_Km.push_back(trk3->eta()); - m_mon_BsMuMuPhi_VtxPhiPhi_Km.push_back(trk3->phi()); - } - ATH_MSG_DEBUG(" Finnished Bphys daughter particle with fitmass" << trigPartBmumuPhi->fitmass() << " mass " << trigPartBmumuPhi->mass() - << " phi, eta - more RoIs => 0" << trigPartBmumuPhi->phi() << " " << trigPartBmumuPhi->eta() << " vertex type " << trigPartBmumuPhi->particleType()); - }else{ - ATH_MSG_DEBUG(" Phi rejected by mass or chi2 cuts after vertex fit!" << ", chi2= " << phia1020Vtx->chi2()); - if(timerSvc()) m_VtxFitTimer->pause(); - //continue; // for performance test not continue - delete mother_PhiVtx; - } - } // end of successful fit condition "mother" - delete phia1020Vtx; - } // end of successful fit condition initial vertex - if(timerSvc()) m_VtxFitTimer->pause(); - } // end Phi_KaonPion vertex fit - - m_trigBphysColl_phixAOD->push_back(trigPartBmumuPhi); - int PhiIndex = m_trigBphysColl_phixAOD->size() - 1; - - if(m_doPhi1020_KaonKaonVertexFit && goodPhi) { - ATH_MSG_DEBUG(" Well done in Phi vertexing!!!"); - - // Bd+/- vertexing & mass cut - if(m_doBs_Phi1020MuMuVertexFit && m_doVertexFit){ - if(timerSvc()) m_VtxFitTimer->resume(); - bool vertex = true; - TrigL2Vertex* baSVtx = NULL; - TrigVertex* mother_BsVtx=NULL; - baSVtx = new TrigL2Vertex(); - StatusCode status; - status = m_vertexingTool->addTrack(mu1->idTrack()->track(),baSVtx,Trk::muon); // - if(status.isFailure()){ - //delete baSVtx; - if(timerSvc()) m_VtxFitTimer->pause(); - //continue; - vertex = false; - } - if (vertex) status = m_vertexingTool->addTrack(mu2->idTrack()->track(),baSVtx,Trk::muon); // - if(status.isFailure()){ - //delete baSVtx; - if(timerSvc()) m_VtxFitTimer->pause(); - //continue; - vertex = false; - } - if (vertex) status = m_vertexingTool->addTrack(trk3->track(),baSVtx,Trk::kaon); - if(status.isFailure()){ - //delete baSVtx; - if(timerSvc()) m_VtxFitTimer->pause(); - //continue; - vertex = false; - } - if (vertex) status = m_vertexingTool->addTrack(trk4->track(),baSVtx,Trk::kaon); - if(status.isFailure()){ - //delete baSVtx; - if(timerSvc()) m_VtxFitTimer->pause(); - //continue; - vertex = false; - } - //ElementLink<TrigL2BphysContainer> trigPartBsEL(*m_trigBphysColl_phi,PhiIndex); - ElementLink<xAOD::TrigBphysContainer> trigPartBsEL(*m_trigBphysColl_phixAOD,PhiIndex); - //TrigL2Bphys* trigPartBmumuBs = new TrigL2Bphys(0.0, 0.0, 0.0, TrigL2Bphys::BSPHIMUMU, xMuMuMass, trigPartBsEL); - xAOD::TrigBphys *trigPartBmumuBs = new xAOD::TrigBphys(); - trigPartBmumuBs->makePrivateStore(); - trigPartBmumuBs->initialise(0.0, 0.0, 0.0, xAOD::TrigBphys::BSPHIMUMU, xMuMuMass, trigPartBsEL,xAOD::TrigBphys::L2); - - //vertex fit - if (vertex) status = m_L2vertFitter->fit(baSVtx); - if(status.isSuccess()) status = m_vertexingTool->calculateInvariantMass(baSVtx); - if(status.isFailure()){ - ATH_MSG_DEBUG(" Bs vertex fit failed!"); - delete baSVtx; - delete trigPartBmumuBs; - //continue; // for performance test not continue - vertex = false; - }else{ - mother_BsVtx = m_vertexingTool->createTrigVertex(baSVtx); - status = m_vertexingTool->createMotherParticle(baSVtx); - if(status.isSuccess()){ - ATH_MSG_DEBUG(" Bs created, with pt: " << baSVtx->getMotherTrack()->pT()); - } - if(mother_BsVtx == NULL){ - ATH_MSG_DEBUG(" Vertex fit failed for particle candidate track " << trk3 <<" and "<<trk4); - vertex = false; - delete trigPartBmumuBs; - //continue; // for performance test not continue - }else{ - ATH_MSG_DEBUG(" Bs vertex fit: x = " <<mother_BsVtx->x() - <<", y = " <<mother_BsVtx->y() - <<", z = " <<mother_BsVtx->z() - <<", mass = " <<mother_BsVtx->mass() - <<", chi2 = " <<mother_BsVtx->chi2() - <<", ndof = " <<mother_BsVtx->ndof() /// (number degrees of freedom) - <<", massVariance = " <<mother_BsVtx->massVariance()); - if(mother_BsVtx->massVariance() != 0) { - ATH_MSG_VERBOSE(" Bs mass pull = " << (mother_BsVtx->mass()-BSMASS/mother_BsVtx->massVariance())); - }else{ - ATH_MSG_VERBOSE(" Bs mass variance is zero, can't calculate the pull"); - } - - /// add vertex results to L2Bphys - trigPartBmumuBs->setFitmass(mother_BsVtx->mass()); - trigPartBmumuBs->setFitchi2(mother_BsVtx->chi2()); - trigPartBmumuBs->setFitndof(mother_BsVtx->ndof()); - trigPartBmumuBs->setFitx(mother_BsVtx->x()); - trigPartBmumuBs->setFity(mother_BsVtx->y()); - trigPartBmumuBs->setFitz(mother_BsVtx->z()); - - ATH_MSG_DEBUG(" SigmaX = SigmaY = SigmaZ = " << sqrt(mother_BsVtx->cov()[0]) << " " << sqrt(mother_BsVtx->cov()[2]) << " "<< sqrt(mother_BsVtx->cov()[5])); - - // cut on chi2 and invariant mass of Bd after vertexing. - if(baSVtx->chi2() < m_bSVtxChi2Cut && baSVtx->mass() > m_lowerBsVtxMassCut && baSVtx->mass() < m_upperBsVtxMassCut) - { - ATH_MSG_DEBUG(" Bs vertex fit success: x= " - << baSVtx->getParametersVector()[0] //x - << ", y= " << baSVtx->getParametersVector()[1] //y - << ", z= " << baSVtx->getParametersVector()[2] //z - << ", chi2= " << baSVtx->chi2() - <<", ndof = " <<baSVtx->ndof()); - // PERFECT -> Bphys particle was stored in collection - m_trigBphysColl_bxAOD->push_back(trigPartBmumuBs); - ATH_MSG_DEBUG(" Added Bs vertex to vertex collection"); - // monitoring of successfuly stored particles - m_mon_BsMuMuPhi_n++; - m_mon_Acceptance.push_back( ACCEPT_BphysCollParticle ); - m_mon_BsMuMuPhi_VtxMass_Bs.push_back((baSVtx->mass())*0.001); - m_mon_BsMuMuPhi_Chi2toNDoF_Bs.push_back((baSVtx->chi2())/(baSVtx->ndof())); - if(trk3->pt() * trk3->charge() > 0) { - m_mon_BsMuMuPhi_VtxPtBs_Kp.push_back((trk3->pt())*0.001); - m_mon_BsMuMuPhi_VtxEtaBs_Kp.push_back(trk3->eta()); - m_mon_BsMuMuPhi_VtxPhiBs_Kp.push_back(trk3->phi()); - m_mon_BsMuMuPhi_VtxPtBs_Km.push_back((trk4->pt())*0.001); - m_mon_BsMuMuPhi_VtxEtaBs_Km.push_back(trk4->eta()); - m_mon_BsMuMuPhi_VtxPhiBs_Km.push_back(trk4->phi()); - }else{ - m_mon_BsMuMuPhi_VtxPtBs_Kp.push_back((trk4->pt())*0.001); - m_mon_BsMuMuPhi_VtxEtaBs_Kp.push_back(trk4->eta()); - m_mon_BsMuMuPhi_VtxPhiBs_Kp.push_back(trk4->phi()); - m_mon_BsMuMuPhi_VtxPtBs_Km.push_back((trk3->pt())*0.001); - m_mon_BsMuMuPhi_VtxEtaBs_Km.push_back(trk3->eta()); - m_mon_BsMuMuPhi_VtxPhiBs_Km.push_back(trk3->phi()); - } - ATH_MSG_DEBUG(" Finnished Bphys particle with fitmass" << trigPartBmumuBs->fitmass() << " mass " << trigPartBmumuBs->mass() - << " phi, eta - more RoIs => 0" << trigPartBmumuBs->phi() << " " << trigPartBmumuBs->eta() << " vertex type " << trigPartBmumuBs->particleType()); - }else{ - ATH_MSG_DEBUG(" Bs rejected by mass or chi2 cuts after vertex fit!" << ", chi2= " << baSVtx->chi2()); - delete trigPartBmumuBs; - //continue; // for performance test not continue - vertex = false; - } - } // end of successful fit condition "mother" - if(vertex) { - } else { - delete mother_BsVtx; - } - delete baSVtx; - } // end of successful fit condition initial vertex - - - } // Bs -> Phi Mu Mu vertexing - } // end of test over failed - //////////////////////////////// vertexing off /////////////////////////////////////////////// - if(!m_doBs_Phi1020MuMuVertexFit || !m_doVertexFit){ - if ((xMuMuMass > m_lowerBs_Phi1020MuMuMassCutVtxOff && xMuMuMass < m_upperBs_Phi1020MuMuMassCutVtxOff)) { - - // Store links to the tracks forming bphys particle - const ElementLink<xAOD::TrackParticleContainer>& track1ELBs = mu1->idTrackLink(); - const ElementLink<xAOD::TrackParticleContainer>& track2ELBs = mu2->idTrackLink(); - ElementLink<xAOD::TrackParticleContainer> track3ELBs(*trkCollection, iTrk3); - ElementLink<xAOD::TrackParticleContainer> track4ELBs(*trkCollection, iTrk4); - - ATH_MSG_VERBOSE("Just check track links... "); - ATH_MSG_VERBOSE("Muon 1 pT " << (*track1ELBs)->pt() << " eta: " << (*track1ELBs)->eta() << " phi: " << (*track1ELBs)->phi()); - ATH_MSG_VERBOSE("Muon 2 pT " << (*track2ELBs)->pt() << " eta: " << (*track2ELBs)->eta() << " phi: " << (*track2ELBs)->phi()); - ATH_MSG_VERBOSE("Track 1 pT " << (*track3ELBs)->pt() << " eta: " << (*track3ELBs)->eta() << " phi: " << (*track3ELBs)->phi()); - ATH_MSG_VERBOSE("Track 2 pT " << (*track4ELBs)->pt() << " eta: " << (*track4ELBs)->eta() << " phi: " << (*track4ELBs)->phi()); - - - - ElementLink<xAOD::TrigBphysContainer> trigPartBsEL(*m_trigBphysColl_phixAOD,PhiIndex); - xAOD::TrigBphys *trigPartBmumuBs = new xAOD::TrigBphys(); - trigPartBmumuBs->makePrivateStore(); - trigPartBmumuBs->initialise(0.0, 0.0, 0.0, xAOD::TrigBphys::BSPHIMUMU, xMuMuMass, trigPartBsEL,xAOD::TrigBphys::L2); - - trigPartBmumuBs->addTrackParticleLink(track1ELBs); - trigPartBmumuBs->addTrackParticleLink(track2ELBs); - trigPartBmumuBs->addTrackParticleLink(track3ELBs); - trigPartBmumuBs->addTrackParticleLink(track4ELBs); - m_trigBphysColl_bxAOD->push_back(trigPartBmumuBs); - - m_mon_BsMuMuPhi_n++; - if(trk3->pt() * trk3->charge() > 0) { - ATH_MSG_DEBUG(" Phi's Kplus and Kminus Candidates accepted with Phi mass: " << xMass << "MeV" - << " and with Phi1020 mass : " << xMuMuMass << "MeV" - << " positive charged particle with pt: "<< trk3->pt() * trk3->charge() - << " negative charged particle with pt: "<< trk4->pt() *trk4->charge()); - m_mon_BsMuMuPhi_InvMassBs_Phi.push_back((xMass*0.001)); - m_mon_BsMuMuPhi_InvMass_Bs.push_back((xMuMuMass*0.001)); - m_mon_BsMuMuPhi_PtPhi_Kp.push_back(trk3->pt()); - m_mon_BsMuMuPhi_EtaPhi_Kp.push_back(trk3->eta()); - m_mon_BsMuMuPhi_PhiPhi_Kp.push_back(trk3->phi()); - m_mon_BsMuMuPhi_PtPhi_Km.push_back(trk4->pt()); - m_mon_BsMuMuPhi_EtaPhi_Km.push_back(trk4->eta()); - m_mon_BsMuMuPhi_PhiPhi_Km.push_back(trk4->phi()); - }else{ - ATH_MSG_DEBUG(" Phi's Pion and Kaon Candidates accepted with K* mass: " << xMass << "MeV" - << " and with Bd mass : " << xMuMuMass << "MeV" << " positive charged particle with pt: "<< trk4->pt() *trk4->charge() - << " negative charged particle with pt: "<< trk3->pt() * trk3->charge()); - m_mon_BsMuMuPhi_InvMassBs_Phi.push_back((xMass*0.001)); - m_mon_BsMuMuPhi_InvMass_Bs.push_back((xMuMuMass*0.001)); - m_mon_BsMuMuPhi_PtPhi_Kp.push_back(trk4->pt() *trk4->charge()); - m_mon_BsMuMuPhi_EtaPhi_Kp.push_back(trk4->eta()); - m_mon_BsMuMuPhi_PhiPhi_Kp.push_back(trk4->phi()); - m_mon_BsMuMuPhi_PtPhi_Km.push_back(trk3->pt() * trk3->charge()); - m_mon_BsMuMuPhi_EtaPhi_Km.push_back(trk3->eta()); - m_mon_BsMuMuPhi_PhiPhi_Km.push_back(trk3->phi()); - } - ATH_MSG_DEBUG(" Added Bs particle to Bphys particle collection " << ", mass= " << trigPartBmumuBs->mass() << ", particle type= " << trigPartBmumuBs->particleType()); - } else {// end of tighter mass cuts - ATH_MSG_DEBUG(" Bs rejected due to Bs mass cut (no vertexing) "); - } - - } // end of no vertexing part - - - } else { // end of if Phi and Bs successful mass cuts - ATH_MSG_DEBUG(" Bs rejected due to Phi or Bs mass cut "); - } - - -} // checkBsMuMuPhi new - -//NEW -void TrigL2BMuMuXFex::checkLbMuMuLambda(const xAOD::L2CombinedMuon* mu1, const xAOD::L2CombinedMuon* mu2, const xAOD::TrackParticle* trk3, - const xAOD::TrackParticle* trk4, const xAOD::TrackParticleContainer* trkCollection, int iTrk3, int iTrk4) { - - double xMass = 0; - double xMuMuMass = 0; - xMass = XMass(trk3,trk4, lB_to_L); - xMuMuMass = XMuMuMass(mu1->idTrack(), mu2->idTrack(),trk3,trk4, lB_to_L); - - if ((xMass > m_lowerLambda_PrPiMassCut && xMass < m_upperLambda_PrPiMassCut) && (xMuMuMass > m_lowerLb_LambdaMuMuMassCut && xMuMuMass < m_upperLb_LambdaMuMuMassCut)) { - // Now make L2Bphys object - initial addon - // TrigL2Bphys* trigPartBmumuL = new TrigL2Bphys(0., 0., 0., TrigL2Bphys::PHIKK, xMass); - xAOD::TrigBphys * trigPartBmumuL = new xAOD::TrigBphys(); - trigPartBmumuL->makePrivateStore(); - trigPartBmumuL->initialise(0., 0., 0., xAOD::TrigBphys::PHIKK, xMass,xAOD::TrigBphys::L2); - - ATH_MSG_DEBUG(" Create Lambda Bphys particle with roIId - more RoIs => " << trigPartBmumuL->roiId() << " mass " << xMass - << " phi, eta - more RoIs => " << trigPartBmumuL->phi() << " " << trigPartBmumuL->eta() << " vertex type " << trigPartBmumuL->particleType()); - - // Store links to the tracks forming bphys particle - - ElementLink<xAOD::TrackParticleContainer> track3EL(*trkCollection, iTrk3); - ElementLink<xAOD::TrackParticleContainer> track4EL(*trkCollection, iTrk4); - - ATH_MSG_VERBOSE("Just check track links... "); - ATH_MSG_VERBOSE("Track 1 pT " << (*track3EL)->pt() << " eta: " << (*track3EL)->eta() << " phi: " << (*track3EL)->phi()); - ATH_MSG_VERBOSE("Track 2 pT " << (*track4EL)->pt() << " eta: " << (*track4EL)->eta() << " phi: " << (*track4EL)->phi()); - - trigPartBmumuL->addTrackParticleLink(track3EL); - trigPartBmumuL->addTrackParticleLink(track4EL); - // end of initial addon - - // if(msgLvl() <= MSG::DEBUG) ATH_MSG_DEBUG(" Lambda's Proton and Pion Candidates accepted with L mass: " << xMass << "MeV" - // << " and with Lb mass : " << xMuMuMass << "MeV" - // << " proton particle with pt: "<< trk3->pt() - // << " pion charged particle with pt: "<< trk4->pt() - // ); - m_mon_LbMuMuL_InvMassLb_L.push_back((xMass*0.001)); - m_mon_LbMuMuL_InvMass_Lb.push_back((xMuMuMass*0.001)); - m_mon_LbMuMuL_PtL_Pr.push_back(trk3->pt()); - m_mon_LbMuMuL_EtaL_Pr.push_back(trk3->eta()); - m_mon_LbMuMuL_PhiL_Pr.push_back(trk3->phi()); - m_mon_LbMuMuL_PtL_Pi.push_back(trk4->pt()); - m_mon_LbMuMuL_EtaL_Pi.push_back(trk4->eta()); - m_mon_LbMuMuL_PhiL_Pi.push_back(trk4->phi()); - - - bool goodL = false; - //Lambda vertexing & mass cut - if(m_doLambda_ProtonPionVertexFit && m_doVertexFit) { - bool vertex = true; - TrigL2Vertex* lambdaaVtx = NULL; - TrigVertex* mother_LVtx = NULL; - // timer - if(timerSvc()) m_VtxFitTimer->resume(); - lambdaaVtx = new TrigL2Vertex(); - StatusCode status; - - status = m_vertexingTool->addTrack(trk3->track(),lambdaaVtx,Trk::proton); - if( status.isFailure() ) { - //delete lambdaaVtx; - //continue; - vertex = false; - } - if(vertex) status = m_vertexingTool->addTrack(trk4->track(),lambdaaVtx,Trk::pion); - if( status.isFailure() ) { - //delete lambdaaVtx; - //continue; - vertex = false; - } - - ////////////// - //vertex fit - if(vertex) status = m_L2vertFitter->fit(lambdaaVtx); - if(status.isSuccess() && lambdaaVtx != NULL) status = m_vertexingTool->calculateInvariantMass(lambdaaVtx); - if(status.isFailure() || lambdaaVtx == NULL){ - ATH_MSG_DEBUG(" L vertex fit failed!"); - delete lambdaaVtx; - if(timerSvc()) m_VtxFitTimer->pause(); - //continue; // for performance test not continue? - vertex = false; - }else{ - mother_LVtx = m_vertexingTool->createTrigVertex(lambdaaVtx); - status = m_vertexingTool->createMotherParticle(lambdaaVtx); - if(status.isSuccess()){ - ATH_MSG_DEBUG(" L created, with pt: " << lambdaaVtx->getMotherTrack()->pT()); - } - if(mother_LVtx == NULL){ - ATH_MSG_DEBUG(" Vertex fit failed for particle candidate tracks " << trk3 <<" and "<<trk4); - if(timerSvc()) m_VtxFitTimer->pause(); - //continue; // for performance test not continue? - vertex = false; - }else{ - ATH_MSG_DEBUG(" L vertex fit: x = " <<mother_LVtx->x() - <<", y = " <<mother_LVtx->y() - <<", z = " <<mother_LVtx->z() - <<", mass = " <<mother_LVtx->mass() - <<", chi2 = " <<mother_LVtx->chi2() - <<", ndof = " <<mother_LVtx->ndof() /// (number degrees of freedom) - <<", massVariance = " <<mother_LVtx->massVariance()); - if(mother_LVtx->massVariance() != 0) { - ATH_MSG_VERBOSE(" L mass pull = " << (mother_LVtx->mass()-LAMBDAMASS/mother_LVtx->massVariance())); - }else{ - ATH_MSG_VERBOSE(" L mass variance is zero, can't calculate the pull"); - } - /// add vertex results to L2Bphys - trigPartBmumuL->setFitmass(mother_LVtx->mass()); - trigPartBmumuL->setFitchi2(mother_LVtx->chi2()); - trigPartBmumuL->setFitndof(mother_LVtx->ndof()); - trigPartBmumuL->setFitx(mother_LVtx->x()); - trigPartBmumuL->setFity(mother_LVtx->y()); - trigPartBmumuL->setFitz(mother_LVtx->z()); - ATH_MSG_DEBUG(" SigmaX = SigmaY = SigmaZ = " << sqrt(mother_LVtx->cov()[0]) << " " << sqrt(mother_LVtx->cov()[2]) << " " << sqrt(mother_LVtx->cov()[5])); - - // cut on chi2 and invariant mass of bplus after vertexing. - if(lambdaaVtx->chi2() < m_lambdaVtxChi2Cut && - lambdaaVtx->mass() > m_lowerLambdaVtxMassCut && lambdaaVtx->mass() < m_upperLambdaVtxMassCut) - { - ATH_MSG_DEBUG(" L vertex fit success: x= " - << lambdaaVtx->getParametersVector()[0] //x - << ", y= " << lambdaaVtx->getParametersVector()[1] //y - << ", z= " << lambdaaVtx->getParametersVector()[2] //z - << ", chi2= " << lambdaaVtx->chi2() - <<", ndof = " <<lambdaaVtx->ndof()); - goodL = true; - // GREAT -> store daughter particle info - - // monitoring - m_mon_LbMuMuL_VtxMassLb_L.push_back((lambdaaVtx->mass())*0.001); - m_mon_LbMuMuL_Chi2toNDoFLb_L.push_back((lambdaaVtx->chi2())/(lambdaaVtx->ndof())); - - m_mon_LbMuMuL_VtxPtL_Pr.push_back((trk3->pt())*0.001); - m_mon_LbMuMuL_VtxEtaL_Pr.push_back(trk3->eta()); - m_mon_LbMuMuL_VtxPhiL_Pr.push_back(trk3->phi()); - m_mon_LbMuMuL_VtxPtL_Pi.push_back((trk4->pt())*0.001); - m_mon_LbMuMuL_VtxEtaL_Pi.push_back(trk4->eta()); - m_mon_LbMuMuL_VtxPhiL_Pi.push_back(trk4->phi()); - - ATH_MSG_DEBUG(" Finnished Bphys daughter particle with fitmass" << trigPartBmumuL->fitmass() << " mass " << trigPartBmumuL->mass() - << " phi, eta - more RoIs => 0" << trigPartBmumuL->phi() << " " << trigPartBmumuL->eta() << " vertex type " << trigPartBmumuL->particleType()); - - }else{ - ATH_MSG_DEBUG(" L rejected by mass or chi2 cuts after vertex fit!" << ", chi2= " << lambdaaVtx->chi2()); - if(timerSvc()) m_VtxFitTimer->pause(); - //continue; // for performance test not continue - vertex = false; - delete mother_LVtx; - } - } // end of successful fit condition "mother" - delete lambdaaVtx; - } // end of successful fit condition initial vertex - if(timerSvc()) m_VtxFitTimer->pause(); - } // end Lambda_ProtonPion vertex fit - - m_trigBphysColl_lambdaxAOD->push_back(trigPartBmumuL); - int LIndex = m_trigBphysColl_lambdaxAOD->size() - 1; - - if(m_doLambda_ProtonPionVertexFit && goodL) { - ATH_MSG_DEBUG(" Well done in L vertexing!!!"); - //continue; // OBSOLETE, done inside vertexing - - // Bd+/- vertexing & mass cut - if(m_doLb_LambdaMuMuVertexFit && m_doVertexFit){ - bool vertex = true; - if(timerSvc()) m_VtxFitTimer->resume(); - TrigL2Vertex* laBVtx = NULL; - TrigVertex* mother_LbVtx=NULL; - laBVtx = new TrigL2Vertex(); - StatusCode status; - status = m_vertexingTool->addTrack(mu1->idTrack()->track(),laBVtx,Trk::muon); // - if(status.isFailure()){ - //delete laBVtx; - if(timerSvc()) m_VtxFitTimer->pause(); - //continue; - vertex = false; - } - if(vertex) status = m_vertexingTool->addTrack(mu2->idTrack()->track(),laBVtx,Trk::muon); // - if(status.isFailure()){ - //delete laBVtx; - if(timerSvc()) m_VtxFitTimer->pause(); - //continue; - vertex = false; - } - - if(vertex) status = m_vertexingTool->addTrack(trk3->track(),laBVtx,Trk::proton); - if(status.isFailure()){ - //delete laBVtx; - if(timerSvc()) m_VtxFitTimer->pause(); - //continue; - vertex = false; - } - if(vertex) status = m_vertexingTool->addTrack(trk4->track(),laBVtx,Trk::pion); - if(status.isFailure()){ - //delete laBVtx; - if(timerSvc()) m_VtxFitTimer->pause(); - //continue; - vertex = false; - } - - ElementLink<xAOD::TrigBphysContainer> trigPartLbEL(*m_trigBphysColl_lambdaxAOD,LIndex); - //TrigL2Bphys* trigPartBmumuLb = new TrigL2Bphys(0.0, 0.0, 0.0, TrigL2Bphys::LBLMUMU, xMuMuMass, trigPartLbEL); - xAOD::TrigBphys* trigPartBmumuLb = new xAOD::TrigBphys(); - trigPartBmumuLb->makePrivateStore(); - trigPartBmumuLb->initialise(0.0, 0.0, 0.0, xAOD::TrigBphys::LBLMUMU, xMuMuMass, trigPartLbEL,xAOD::TrigBphys::L2); - - //vertex fit - if(vertex) status = m_L2vertFitter->fit(laBVtx); - if(status.isSuccess()) status = m_vertexingTool->calculateInvariantMass(laBVtx); - if(status.isFailure()){ - ATH_MSG_DEBUG(" Lb vertex fit failed!"); - delete laBVtx; - delete trigPartBmumuLb; - //continue; // for performance test not continue - vertex = false; - }else{ - mother_LbVtx = m_vertexingTool->createTrigVertex(laBVtx); - status = m_vertexingTool->createMotherParticle(laBVtx); - if(status.isSuccess()){ - ATH_MSG_DEBUG(" Lb created, with pt: " << laBVtx->getMotherTrack()->pT()); - } - if(mother_LbVtx == NULL){ - ATH_MSG_DEBUG(" Vertex fit failed for particle candidate track " << trk3 <<" and "<<trk4); - delete trigPartBmumuLb; - //continue; // for performance test not continue - vertex = false; - }else{ - ATH_MSG_DEBUG(" Lb vertex fit: x = " <<mother_LbVtx->x() - <<", y = " <<mother_LbVtx->y() - <<", z = " <<mother_LbVtx->z() - <<", mass = " <<mother_LbVtx->mass() - <<", chi2 = " <<mother_LbVtx->chi2() - <<", ndof = " <<mother_LbVtx->ndof() /// (number degrees of freedom) - <<", massVariance = " <<mother_LbVtx->massVariance()); - if(mother_LbVtx->massVariance() != 0) { - ATH_MSG_VERBOSE(" Lb mass pull = " << (mother_LbVtx->mass()-LAMBDABMASS/mother_LbVtx->massVariance())); - }else{ - ATH_MSG_VERBOSE(" Lb mass variance is zero, can't calculate the pull"); - } - /// add vertex results to L2Bphys - trigPartBmumuLb->setFitmass(mother_LbVtx->mass()); - trigPartBmumuLb->setFitchi2(mother_LbVtx->chi2()); - trigPartBmumuLb->setFitndof(mother_LbVtx->ndof()); - trigPartBmumuLb->setFitx(mother_LbVtx->x()); - trigPartBmumuLb->setFity(mother_LbVtx->y()); - trigPartBmumuLb->setFitz(mother_LbVtx->z()); - - ATH_MSG_DEBUG(" SigmaX = SigmaY = SigmaZ = " << sqrt(mother_LbVtx->cov()[0]) << " " << sqrt(mother_LbVtx->cov()[2]) << " " << sqrt(mother_LbVtx->cov()[5])); - - // cut on chi2 and invariant mass of Bd after vertexing. - if(laBVtx->chi2() < m_bSVtxChi2Cut && laBVtx->mass() > m_lowerLbVtxMassCut && laBVtx->mass() < m_upperLbVtxMassCut) - { - ATH_MSG_DEBUG(" Lb vertex fit success: x= " - << laBVtx->getParametersVector()[0] //x - << ", y= " << laBVtx->getParametersVector()[1] //y - << ", z= " << laBVtx->getParametersVector()[2] //z - << ", chi2= " << laBVtx->chi2() - <<", ndof = " <<laBVtx->ndof()); - - // PERFECT -> Bphys particle was stored in collection - m_trigBphysColl_bxAOD->push_back(trigPartBmumuLb); - ATH_MSG_DEBUG(" Added Lb vertex to vertex collection"); - - // monitoring of successfuly stored particles - m_mon_LbMuMuL_n++; - m_mon_Acceptance.push_back( ACCEPT_BphysCollParticle ); - m_mon_LbMuMuL_VtxMass_Lb.push_back((laBVtx->mass())*0.001); - m_mon_LbMuMuL_Chi2toNDoF_Lb.push_back((laBVtx->chi2())/(laBVtx->ndof())); - - m_mon_LbMuMuL_VtxPtLb_Pr.push_back((trk3->pt())*0.001); - m_mon_LbMuMuL_VtxEtaLb_Pr.push_back(trk3->eta()); - m_mon_LbMuMuL_VtxPhiLb_Pr.push_back(trk3->phi()); - m_mon_LbMuMuL_VtxPtLb_Pi.push_back((trk4->pt())*0.001); - m_mon_LbMuMuL_VtxEtaLb_Pi.push_back(trk4->eta()); - m_mon_LbMuMuL_VtxPhiLb_Pi.push_back(trk4->phi()); - - ATH_MSG_DEBUG(" Finnished Bphys particle with fitmass" << trigPartBmumuLb->fitmass() << " mass " << trigPartBmumuLb->mass() - << " phi, eta - more RoIs => 0" << trigPartBmumuLb->phi() << " " << trigPartBmumuLb->eta() << " vertex type " << trigPartBmumuLb->particleType()); - - }else{ - ATH_MSG_DEBUG(" Lb rejected by mass or chi2 cuts after vertex fit!" << ", chi2= " << laBVtx->chi2()); - delete trigPartBmumuLb; - //continue; // for performance test not continue - vertex = false; - } - } // end of successful fit condition "mother" - if(vertex) { - } else { - delete mother_LbVtx; - } - delete laBVtx; - } // end of successful fit condition initial vertex - - - } // Lb -> L Mu Mu vertexing - } // end of check over failed vertexing - - //////////////////////////////// vertexing off /////////////////////////////////////////////// - if(!m_doLb_LambdaMuMuVertexFit || !m_doVertexFit){ - if ((xMuMuMass > m_lowerLb_LambdaMuMuMassCutVtxOff && xMuMuMass < m_upperLb_LambdaMuMuMassCutVtxOff)) { - - // Store links to the tracks forming bphys particle - const ElementLink<xAOD::TrackParticleContainer>& track1ELLb = mu1->idTrackLink(); - const ElementLink<xAOD::TrackParticleContainer>& track2ELLb = mu2->idTrackLink(); - ElementLink<xAOD::TrackParticleContainer> track3ELLb(*trkCollection, iTrk3); - ElementLink<xAOD::TrackParticleContainer> track4ELLb(*trkCollection, iTrk4); - - ATH_MSG_VERBOSE("Just check track links... "); - ATH_MSG_VERBOSE("Muon 1 pT " << (*track1ELLb)->pt() << " eta: " << (*track1ELLb)->eta() << " phi: " << (*track1ELLb)->phi()); - ATH_MSG_VERBOSE("Muon 2 pT " << (*track2ELLb)->pt() << " eta: " << (*track2ELLb)->eta() << " phi: " << (*track2ELLb)->phi()); - ATH_MSG_VERBOSE("Track 1 pT " << (*track3ELLb)->pt() << " eta: " << (*track3ELLb)->eta() << " phi: " << (*track3ELLb)->phi()); - ATH_MSG_VERBOSE("Track 2 pT " << (*track4ELLb)->pt() << " eta: " << (*track4ELLb)->eta() << " phi: " << (*track4ELLb)->phi()); - - ElementLink<xAOD::TrigBphysContainer> trigPartLbEL(*m_trigBphysColl_lambdaxAOD,LIndex); - xAOD::TrigBphys* trigPartBmumuLb = new xAOD::TrigBphys(); - trigPartBmumuLb->makePrivateStore(); - trigPartBmumuLb->initialise(0.0, 0.0, 0.0, xAOD::TrigBphys::LBLMUMU, xMuMuMass, trigPartLbEL,xAOD::TrigBphys::L2); - - trigPartBmumuLb->addTrackParticleLink(track1ELLb); - trigPartBmumuLb->addTrackParticleLink(track2ELLb); - trigPartBmumuLb->addTrackParticleLink(track3ELLb); - trigPartBmumuLb->addTrackParticleLink(track4ELLb); - m_trigBphysColl_bxAOD->push_back(trigPartBmumuLb); - - ATH_MSG_DEBUG(" Lambda's Proton and Pion Candidates accepted with L mass: " << xMass << "MeV" - << " and with LambdaB mass : " << xMuMuMass << "MeV" << " proton particle with pt: "<< trk3->pt() << " pion particle with pt: "<< trk4->pt()); - - ATH_MSG_DEBUG(" Added Lambda_b particle to Bphys particle collection " - << ", mass= " << trigPartBmumuLb->mass() << ", particle type= " << trigPartBmumuLb->particleType()); - m_mon_LbMuMuL_n++; - m_mon_LbMuMuL_InvMassLb_L.push_back((xMass*0.001)); - m_mon_LbMuMuL_InvMass_Lb.push_back((xMuMuMass*0.001)); - m_mon_LbMuMuL_PtL_Pr.push_back(trk3->pt()); - m_mon_LbMuMuL_EtaL_Pr.push_back(trk3->eta()); - m_mon_LbMuMuL_PhiL_Pr.push_back(trk3->phi()); - m_mon_LbMuMuL_PtL_Pi.push_back(trk4->pt()); - m_mon_LbMuMuL_EtaL_Pi.push_back(trk4->eta()); - m_mon_LbMuMuL_PhiL_Pi.push_back(trk4->phi()); - - }else{// end of tighter mass cuts - ATH_MSG_DEBUG(" Lb rejected due to Lb mass cut (no vertexing) "); - } - - } // end of no vertexing part - - - } else { // end of if L and Lb successful mass cuts - ATH_MSG_DEBUG(" Lambda_b rejected due to Lambda or Lambda_b mass cut "); - } - - -} // checkLbMuMuLambda new - - -//NEW -void TrigL2BMuMuXFex::checkBcMuMuDs(const xAOD::L2CombinedMuon* mu1, const xAOD::L2CombinedMuon* mu2, const xAOD::TrackParticle* trk3, - const xAOD::TrackParticle* trk4, const xAOD::TrackParticle* trk5, const xAOD::TrackParticleContainer* trkCollection, - int iTrk3, int iTrk4, double xPhiMass, int iTrk5) { - double xMass = X3Mass(trk3, trk4, trk5); - double xMuMuMass = X3MuMuMass(mu1->idTrack(), mu2->idTrack(), trk3, trk4, trk5); - - if ((xMass > m_lowerDs_MassCut && xMass < m_upperDs_MassCut) && (xMuMuMass > m_lowerBc_DsMuMuMassCut && xMuMuMass < m_upperBc_DsMuMuMassCut)) { - - // Now make L2Bphys objects - initial addon - // TrigL2Bphys* trigPartBmumuPhiDs = new TrigL2Bphys(0., 0., 0., TrigL2Bphys::PHIKK, xPhiMass); - //TrigL2Bphys* trigPartBmumuDs = new TrigL2Bphys(0., 0., 0., TrigL2Bphys::DSPHIPI, xMass); - xAOD::TrigBphys* trigPartBmumuDs = new xAOD::TrigBphys(); - trigPartBmumuDs->makePrivateStore(); - trigPartBmumuDs->initialise(0., 0., 0., xAOD::TrigBphys::DSPHIPI, xMass,xAOD::TrigBphys::L2); - - ATH_MSG_DEBUG(" Create Ds Bphys particle with roIId - more RoIs => " << trigPartBmumuDs->roiId() << " mass " << xMass - << " phi, eta - more RoIs => " << trigPartBmumuDs->phi() << " " << trigPartBmumuDs->eta() << " vertex type " << trigPartBmumuDs->particleType()); - - // Store links to the tracks forming bphys particle - - ElementLink<xAOD::TrackParticleContainer> track3EL(*trkCollection, iTrk3); //kaon - ElementLink<xAOD::TrackParticleContainer> track4EL(*trkCollection, iTrk4); //kaon - ElementLink<xAOD::TrackParticleContainer> track5EL(*trkCollection, iTrk5); //pion - - ATH_MSG_VERBOSE("Just check track links... "); - ATH_MSG_VERBOSE("Track 1 pT " << (*track3EL)->pt() << " eta: " << (*track3EL)->eta() << " phi: " << (*track3EL)->phi()); - ATH_MSG_VERBOSE("Track 2 pT " << (*track4EL)->pt() << " eta: " << (*track4EL)->eta() << " phi: " << (*track4EL)->phi()); - ATH_MSG_VERBOSE("Track 3 pT " << (*track5EL)->pt() << " eta: " << (*track5EL)->eta() << " phi: " << (*track5EL)->phi()); - - - trigPartBmumuDs->addTrackParticleLink(track3EL); - trigPartBmumuDs->addTrackParticleLink(track4EL); - trigPartBmumuDs->addTrackParticleLink(track5EL); - // end of initial addon - - if(trk3->pt()*trk3->charge() > 0) { - m_mon_BcMuMuDs_InvMassBc_Phi.push_back((xPhiMass*0.001)); - m_mon_BcMuMuDs_InvMassBc_Ds.push_back((xMass*0.001)); - m_mon_BcMuMuDs_InvMass_Bc.push_back((xMuMuMass*0.001)); - m_mon_BcMuMuDs_PtPhi_Kp.push_back(trk3->pt()); - m_mon_BcMuMuDs_EtaPhi_Kp.push_back(trk3->eta()); - m_mon_BcMuMuDs_PhiPhi_Kp.push_back(trk3->phi()); - m_mon_BcMuMuDs_PtPhi_Km.push_back(trk4->pt()); - m_mon_BcMuMuDs_EtaPhi_Km.push_back(trk4->eta()); - m_mon_BcMuMuDs_PhiPhi_Km.push_back(trk4->phi()); - m_mon_BcMuMuDs_PtDs_pi.push_back(trk5->pt()); - m_mon_BcMuMuDs_EtaDs_pi.push_back(trk5->eta()); - m_mon_BcMuMuDs_PhiDs_pi.push_back(trk5->phi()); - }else{ - m_mon_BcMuMuDs_InvMassBc_Phi.push_back((xPhiMass*0.001)); - m_mon_BcMuMuDs_InvMassBc_Ds.push_back((xMass*0.001)); - m_mon_BcMuMuDs_InvMass_Bc.push_back((xMuMuMass*0.001)); - m_mon_BcMuMuDs_PtPhi_Kp.push_back(trk4->pt()); - m_mon_BcMuMuDs_EtaPhi_Kp.push_back(trk4->eta()); - m_mon_BcMuMuDs_PhiPhi_Kp.push_back(trk4->phi()); - m_mon_BcMuMuDs_PtPhi_Km.push_back(trk3->pt()); - m_mon_BcMuMuDs_EtaPhi_Km.push_back(trk3->eta()); - m_mon_BcMuMuDs_PhiPhi_Km.push_back(trk3->phi()); - m_mon_BcMuMuDs_PtDs_pi.push_back(trk5->pt()); - m_mon_BcMuMuDs_EtaDs_pi.push_back(trk5->eta()); - m_mon_BcMuMuDs_PhiDs_pi.push_back(trk5->phi()); - } - bool goodDs = false; - //Ds vertexing & mass cut - if(m_doDs_PhiPionVertexFit && m_doVertexFit) { - bool vertex = true; - TrigL2Vertex* DsVtx = NULL; - TrigVertex* mother_DsVtx = NULL; - // timer - if(timerSvc()) m_VtxFitTimer->resume(); - DsVtx = new TrigL2Vertex(); - StatusCode status; - status = m_vertexingTool->addTrack(trk3->track(),DsVtx,Trk::kaon); - if( status.isFailure() ) { - vertex = false; - } - if(vertex) status = m_vertexingTool->addTrack(trk4->track(),DsVtx,Trk::kaon); - if( status.isFailure() ) { - vertex = false; - } - if(vertex) status = m_vertexingTool->addTrack(trk5->track(),DsVtx,Trk::pion); - if( status.isFailure() ) { - vertex = false; - } - ////////////// - //vertex fit - if(vertex) status = m_L2vertFitter->fit(DsVtx); - if(status.isSuccess()) status = m_vertexingTool->calculateInvariantMass(DsVtx); - if(status.isFailure()){ - ATH_MSG_DEBUG(" Ds vertex fit failed!"); - delete DsVtx; - if(timerSvc()) m_VtxFitTimer->pause(); - //continue; // for performance test not continue? - vertex = false; - }else{ - mother_DsVtx = m_vertexingTool->createTrigVertex(DsVtx); - status = m_vertexingTool->createMotherParticle(DsVtx); - if(status.isSuccess()){ - ATH_MSG_DEBUG(" Ds created, with pt: " << DsVtx->getMotherTrack()->pT()); - } - if(mother_DsVtx == NULL){ - ATH_MSG_DEBUG(" Vertex fit failed for particle candidate tracks " << trk3 <<" and "<<trk4<<" and "<<trk5); - if(timerSvc()) m_VtxFitTimer->pause(); - //continue; // for performance test not continue? - vertex = false; - }else{ - ATH_MSG_DEBUG(" Ds vertex fit: x = " <<mother_DsVtx->x() - <<", y = " <<mother_DsVtx->y() - <<", z = " <<mother_DsVtx->z() - <<", mass = " <<mother_DsVtx->mass() - <<", chi2 = " <<mother_DsVtx->chi2() - <<", ndof = " <<mother_DsVtx->ndof() /// (number degrees of freedom) - <<", massVariance = " <<mother_DsVtx->massVariance()); - if(mother_DsVtx->massVariance() != 0) { - ATH_MSG_VERBOSE(" Ds mass pull = " << ((mother_DsVtx->mass()-DSMASS)/mother_DsVtx->massVariance())); - }else{ - ATH_MSG_VERBOSE(" Ds mass variance is zero, can't calculate the pull"); - } - - /// add vertex results to L2Bphys - trigPartBmumuDs->setFitmass(mother_DsVtx->mass()); - trigPartBmumuDs->setFitchi2(mother_DsVtx->chi2()); - trigPartBmumuDs->setFitndof(mother_DsVtx->ndof()); - trigPartBmumuDs->setFitx(mother_DsVtx->x()); - trigPartBmumuDs->setFity(mother_DsVtx->y()); - trigPartBmumuDs->setFitz(mother_DsVtx->z()); - ATH_MSG_DEBUG(" SigmaX = SigmaY = SigmaZ = " << sqrt(mother_DsVtx->cov()[0]) << " " << sqrt(mother_DsVtx->cov()[2]) << " " << sqrt(mother_DsVtx->cov()[5])); - - // cut on chi2 and invariant mass of bplus after vertexing. - if(DsVtx->chi2() < m_DsVtxChi2Cut && - DsVtx->mass() > m_lowerDsVtxMassCut && DsVtx->mass() < m_upperDsVtxMassCut) - { - ATH_MSG_DEBUG(" Ds vertex fit success: x= " - << DsVtx->getParametersVector()[0] //x - << ", y= " << DsVtx->getParametersVector()[1] //y - << ", z= " << DsVtx->getParametersVector()[2] //z - << ", chi2= " << DsVtx->chi2() - <<", ndof = " <<DsVtx->ndof()); - - goodDs = true; - // GREAT -> store daughter particle info - ATH_MSG_DEBUG(" Added Ds vertex to vertex collection"); - - // monitoring - m_mon_BcMuMuDs_VtxMassBc_Ds.push_back((DsVtx->mass())*0.001); - m_mon_BcMuMuDs_Chi2toNDoFBc_Ds.push_back((DsVtx->chi2())/(DsVtx->ndof())); - if(trk3->pt()*trk3->charge() > 0) { - m_mon_BcMuMuDs_VtxPtDs_Kp.push_back((trk3->pt())*0.001); - m_mon_BcMuMuDs_VtxEtaDs_Kp.push_back(trk3->eta()); - m_mon_BcMuMuDs_VtxPhiDs_Kp.push_back(trk3->phi()); - m_mon_BcMuMuDs_VtxPtDs_Km.push_back((trk4->pt())*0.001); - m_mon_BcMuMuDs_VtxEtaDs_Km.push_back(trk4->eta()); - m_mon_BcMuMuDs_VtxPhiDs_Km.push_back(trk4->phi()); - m_mon_BcMuMuDs_VtxPtDs_pi.push_back((trk5->pt())*0.001); - m_mon_BcMuMuDs_VtxEtaDs_pi.push_back(trk5->eta()); - m_mon_BcMuMuDs_VtxPhiDs_pi.push_back(trk5->phi()); - }else{ - m_mon_BcMuMuDs_VtxPtDs_Kp.push_back((trk4->pt())*0.001); - m_mon_BcMuMuDs_VtxEtaDs_Kp.push_back(trk4->eta()); - m_mon_BcMuMuDs_VtxPhiDs_Kp.push_back(trk4->phi()); - m_mon_BcMuMuDs_VtxPtDs_Km.push_back((trk3->pt())*0.001); - m_mon_BcMuMuDs_VtxEtaDs_Km.push_back(trk3->eta()); - m_mon_BcMuMuDs_VtxPhiDs_Km.push_back(trk3->phi()); - m_mon_BcMuMuDs_VtxPtDs_pi.push_back((trk5->pt())*0.001); - m_mon_BcMuMuDs_VtxEtaDs_pi.push_back(trk5->eta()); - m_mon_BcMuMuDs_VtxPhiDs_pi.push_back(trk5->phi()); - } - ATH_MSG_DEBUG(" Finnished Bphys daughter particle with fitmass" << trigPartBmumuDs->fitmass() << " mass " << trigPartBmumuDs->mass() - << " phi, eta - more RoIs => 0" << trigPartBmumuDs->phi() << " " << trigPartBmumuDs->eta() << " vertex type " << trigPartBmumuDs->particleType()); - - - }else{ - ATH_MSG_DEBUG(" Ds rejected by mass or chi2 cuts after vertex fit!" << ", chi2= " << DsVtx->chi2()); - if(timerSvc()) m_VtxFitTimer->pause(); - //continue; // for performance test not continue - vertex = false; - delete mother_DsVtx; - } - } // end of successful fit condition "mother" - delete DsVtx; - } // end of successful fit condition initial vertex - if(timerSvc()) m_VtxFitTimer->pause(); - } // end DS_KaonKaonPion vertex fit - - m_trigBphysColl_dsxAOD->push_back(trigPartBmumuDs); - int DsIndex = m_trigBphysColl_dsxAOD->size() - 1; - - if(m_doDs_PhiPionVertexFit && goodDs) { - ATH_MSG_DEBUG(" Well done in Ds vertexing!!!"); - - // Bc+/- vertexing & mass cut - if(m_doBc_DsMuMuVertexFit && m_doVertexFit){ - if(timerSvc()) m_VtxFitTimer->resume(); - bool vertex = true; - TrigL2Vertex* BcVtx = NULL; - TrigVertex* mother_BcVtx=NULL; - BcVtx = new TrigL2Vertex(); - StatusCode status; - status = m_vertexingTool->addTrack(mu1->idTrack()->track(),BcVtx,Trk::muon); // - if(status.isFailure()){ - //delete BcVtx; - if(timerSvc()) m_VtxFitTimer->pause(); - //continue; - vertex = false; - } - if (vertex) status = m_vertexingTool->addTrack(mu2->idTrack()->track(),BcVtx,Trk::muon); // - if(status.isFailure()){ - //delete BcVtx; - if(timerSvc()) m_VtxFitTimer->pause(); - //continue; - vertex = false; - } - if (vertex) status = m_vertexingTool->addTrack(trk3->track(),BcVtx,Trk::kaon); - if(status.isFailure()){ - //delete BcVtx; - if(timerSvc()) m_VtxFitTimer->pause(); - //continue; - vertex = false; - } - if (vertex) status = m_vertexingTool->addTrack(trk4->track(),BcVtx,Trk::kaon); - if(status.isFailure()){ - //delete BcVtx; - if(timerSvc()) m_VtxFitTimer->pause(); - //continue; - vertex = false; - } - if (vertex) status = m_vertexingTool->addTrack(trk5->track(),BcVtx,Trk::pion); - if(status.isFailure()){ - //delete BcVtx; - if(timerSvc()) m_VtxFitTimer->pause(); - //continue; - vertex = false; - } - - ElementLink<xAOD::TrigBphysContainer> trigPartBcEL(*m_trigBphysColl_dsxAOD,DsIndex); - xAOD::TrigBphys* trigPartBmumuBc = new xAOD::TrigBphys(); - trigPartBmumuBc->makePrivateStore(); - trigPartBmumuBc->initialise(0.0, 0.0, 0.0, xAOD::TrigBphys::BCDSMUMU, xMuMuMass, trigPartBcEL,xAOD::TrigBphys::L2); - - //vertex fit - if (vertex) status = m_L2vertFitter->fit(BcVtx); - if(status.isSuccess()) status = m_vertexingTool->calculateInvariantMass(BcVtx); - if(status.isFailure()){ - ATH_MSG_DEBUG(" Bc vertex fit failed!"); - delete BcVtx; - delete trigPartBmumuBc; - //continue; // for performance test not continue - vertex = false; - }else{ - mother_BcVtx = m_vertexingTool->createTrigVertex(BcVtx); - status = m_vertexingTool->createMotherParticle(BcVtx); - if(status.isSuccess()){ - ATH_MSG_DEBUG(" Bc created, with pt: " << BcVtx->getMotherTrack()->pT()); - } - if(mother_BcVtx == NULL){ - ATH_MSG_DEBUG(" Vertex fit failed for particle candidate tracks " << trk3 <<" and "<<trk4<<" and "<<trk5); - vertex = false; - delete trigPartBmumuBc; - //continue; // for performance test not continue - }else{ - ATH_MSG_DEBUG(" Bc vertex fit: x = " <<mother_BcVtx->x() - <<", y = " <<mother_BcVtx->y() - <<", z = " <<mother_BcVtx->z() - <<", mass = " <<mother_BcVtx->mass() - <<", chi2 = " <<mother_BcVtx->chi2() - <<", ndof = " <<mother_BcVtx->ndof() /// (number degrees of freedom) - <<", massVariance = " <<mother_BcVtx->massVariance() ); - if(mother_BcVtx->massVariance() != 0) { - ATH_MSG_VERBOSE(" Bc mass pull = " << ((mother_BcVtx->mass()-BCMASS)/mother_BcVtx->massVariance())); - }else{ - ATH_MSG_VERBOSE(" Bc mass variance is zero, can't calculate the pull"); - } - - /// add vertex results to L2Bphys - trigPartBmumuBc->setFitmass(mother_BcVtx->mass()); - trigPartBmumuBc->setFitchi2(mother_BcVtx->chi2()); - trigPartBmumuBc->setFitndof(mother_BcVtx->ndof()); - trigPartBmumuBc->setFitx(mother_BcVtx->x()); - trigPartBmumuBc->setFity(mother_BcVtx->y()); - trigPartBmumuBc->setFitz(mother_BcVtx->z()); - - ATH_MSG_DEBUG(" SigmaX = SigmaY = SigmaZ = " << sqrt(mother_BcVtx->cov()[0]) << " " << sqrt(mother_BcVtx->cov()[2]) << " " << sqrt(mother_BcVtx->cov()[5])); - - // cut on chi2 and invariant mass of Bc after vertexing. - if(BcVtx->chi2() < m_bCVtxChi2Cut && BcVtx->mass() > m_lowerBcVtxMassCut && BcVtx->mass() < m_upperBcVtxMassCut) - { - ATH_MSG_DEBUG(" Bc vertex fit success: x= " - << BcVtx->getParametersVector()[0] //x - << ", y= " << BcVtx->getParametersVector()[1] //y - << ", z= " << BcVtx->getParametersVector()[2] //z - << ", chi2= " << BcVtx->chi2() - <<", ndof = " <<BcVtx->ndof()); - - // PERFECT -> Bphys particle was stored in collection - m_trigBphysColl_bxAOD->push_back(trigPartBmumuBc); - ATH_MSG_DEBUG(" Added Bc vertex to vertex collection"); - // monitoring of successfuly stored particles - m_mon_BcMuMuDs_n++; - m_mon_Acceptance.push_back( ACCEPT_BphysCollParticle ); - m_mon_BcMuMuDs_VtxMass_Bc.push_back((BcVtx->mass())*0.001); - m_mon_BcMuMuDs_Chi2toNDoF_Bc.push_back((BcVtx->chi2())/(BcVtx->ndof())); - if(trk3->pt()*trk3->charge() > 0) { - m_mon_BcMuMuDs_VtxPtBc_Kp.push_back((trk3->pt())*0.001); - m_mon_BcMuMuDs_VtxEtaBc_Kp.push_back(trk3->eta()); - m_mon_BcMuMuDs_VtxPhiBc_Kp.push_back(trk3->phi()); - m_mon_BcMuMuDs_VtxPtBc_Km.push_back((trk4->pt())*0.001); - m_mon_BcMuMuDs_VtxEtaBc_Km.push_back(trk4->eta()); - m_mon_BcMuMuDs_VtxPhiBc_Km.push_back(trk4->phi()); - m_mon_BcMuMuDs_VtxPtBc_pi.push_back((trk5->pt())*0.001); - m_mon_BcMuMuDs_VtxEtaBc_pi.push_back(trk5->eta()); - m_mon_BcMuMuDs_VtxPhiBc_pi.push_back(trk5->phi()); - }else{ - m_mon_BcMuMuDs_VtxPtBc_Kp.push_back((trk4->pt())*0.001); - m_mon_BcMuMuDs_VtxEtaBc_Kp.push_back(trk4->eta()); - m_mon_BcMuMuDs_VtxPhiBc_Kp.push_back(trk4->phi()); - m_mon_BcMuMuDs_VtxPtBc_Km.push_back((trk3->pt())*0.001); - m_mon_BcMuMuDs_VtxEtaBc_Km.push_back(trk3->eta()); - m_mon_BcMuMuDs_VtxPhiBc_Km.push_back(trk3->phi()); - m_mon_BcMuMuDs_VtxPtBc_pi.push_back((trk5->pt())*0.001); - m_mon_BcMuMuDs_VtxEtaBc_pi.push_back(trk5->eta()); - m_mon_BcMuMuDs_VtxPhiBc_pi.push_back(trk5->phi()); - } - ATH_MSG_DEBUG(" Finished Bphys particle with fitmass" << trigPartBmumuBc->fitmass() << " mass " << trigPartBmumuBc->mass() - << " phi, eta - more RoIs => 0" << trigPartBmumuBc->phi() << " " << trigPartBmumuBc->eta() << " vertex type " << trigPartBmumuBc->particleType()); - }else{ - ATH_MSG_DEBUG(" Bc rejected by mass or chi2 cuts after vertex fit!" << ", chi2= " << BcVtx->chi2()); - delete trigPartBmumuBc; - vertex = false; - } - } // end of successful fit condition "mother" - if(vertex) { - } else { - delete mother_BcVtx; - } - delete BcVtx; - } // end of successful fit condition initial vertex - - - } // Bc -> Ds Mu Mu vertexing - } // end of test over failed - //////////////////////////////// vertexing off /////////////////////////////////////////////// - if(!m_doBc_DsMuMuVertexFit || !m_doVertexFit){ - if ((xMuMuMass > m_lowerBc_DsMuMuMassCutVtxOff && xMuMuMass < m_upperBc_DsMuMuMassCutVtxOff)) { - - // Store links to the tracks forming bphys particle - - const ElementLink<xAOD::TrackParticleContainer>& track1ELBc = mu1->idTrackLink(); - const ElementLink<xAOD::TrackParticleContainer>& track2ELBc = mu2->idTrackLink(); - ElementLink<xAOD::TrackParticleContainer> track3ELBc(*trkCollection, iTrk3); - ElementLink<xAOD::TrackParticleContainer> track4ELBc(*trkCollection, iTrk4); - ElementLink<xAOD::TrackParticleContainer> track5ELBc(*trkCollection, iTrk5); - - ATH_MSG_VERBOSE("Just check track links... "); - ATH_MSG_VERBOSE("Muon 1 pT " << (*track1ELBc)->pt() << " eta: " << (*track1ELBc)->eta() << " phi: " << (*track1ELBc)->phi()); - ATH_MSG_VERBOSE("Muon 2 pT " << (*track2ELBc)->pt() << " eta: " << (*track2ELBc)->eta() << " phi: " << (*track2ELBc)->phi()); - ATH_MSG_VERBOSE("Track 1 pT " << (*track3ELBc)->pt() << " eta: " << (*track3ELBc)->eta() << " phi: " << (*track3ELBc)->phi()); - ATH_MSG_VERBOSE("Track 2 pT " << (*track4ELBc)->pt() << " eta: " << (*track4ELBc)->eta() << " phi: " << (*track4ELBc)->phi()); - ATH_MSG_VERBOSE("Track 3 pT " << (*track5ELBc)->pt() << " eta: " << (*track5ELBc)->eta() << " phi: " << (*track5ELBc)->phi()); - - ElementLink<xAOD::TrigBphysContainer> trigPartBcEL(*m_trigBphysColl_dsxAOD,DsIndex); - xAOD::TrigBphys* trigPartBmumuBc = new xAOD::TrigBphys(); - trigPartBmumuBc->makePrivateStore(); - trigPartBmumuBc->initialise(0.0, 0.0, 0.0, xAOD::TrigBphys::BCDSMUMU, xMuMuMass, trigPartBcEL,xAOD::TrigBphys::L2); - - trigPartBmumuBc->addTrackParticleLink(track1ELBc); - trigPartBmumuBc->addTrackParticleLink(track2ELBc); - trigPartBmumuBc->addTrackParticleLink(track3ELBc); - trigPartBmumuBc->addTrackParticleLink(track4ELBc); - trigPartBmumuBc->addTrackParticleLink(track5ELBc); - m_trigBphysColl_bxAOD->push_back(trigPartBmumuBc); - - m_mon_BcMuMuDs_n++; - if(trk3->pt()*trk3->charge() > 0) { - ATH_MSG_DEBUG(" Ds's Kplus, Kminus and pion Candidates accepted with Ds mass: " << xMass << "MeV" - << " and with B_c mass : " << xMuMuMass << "MeV" - << " positive charged particle with pt: "<< trk3->pt() - << " negative charged particle with pt: "<< trk4->pt() - << " pion charged particle with pt: "<< trk5->pt()); - m_mon_BcMuMuDs_InvMassBc_Phi.push_back((xPhiMass*0.001)); - m_mon_BcMuMuDs_InvMassBc_Ds.push_back((xMass*0.001)); - m_mon_BcMuMuDs_InvMass_Bc.push_back((xMuMuMass*0.001)); - m_mon_BcMuMuDs_PtPhi_Kp.push_back(trk3->pt()); - m_mon_BcMuMuDs_EtaPhi_Kp.push_back(trk3->eta()); - m_mon_BcMuMuDs_PhiPhi_Kp.push_back(trk3->phi()); - m_mon_BcMuMuDs_PtPhi_Km.push_back(trk4->pt()); - m_mon_BcMuMuDs_EtaPhi_Km.push_back(trk4->eta()); - m_mon_BcMuMuDs_PhiPhi_Km.push_back(trk4->phi()); - m_mon_BcMuMuDs_PtDs_pi.push_back(trk5->pt()); - m_mon_BcMuMuDs_EtaDs_pi.push_back(trk5->eta()); - m_mon_BcMuMuDs_PhiDs_pi.push_back(trk5->phi()); - }else{ - ATH_MSG_DEBUG(" Ds's Kplus, Kminus and pion Candidates accepted with Ds mass: " << xMass << "MeV" - << " and with B_c mass : " << xMuMuMass << "MeV" - << " positive charged particle with pt: "<< trk4->pt() - << " negative charged particle with pt: "<< trk3->pt() - << " pion charged particle with pt: "<< trk5->pt()); - m_mon_BcMuMuDs_InvMassBc_Phi.push_back((xPhiMass*0.001)); - m_mon_BcMuMuDs_InvMassBc_Ds.push_back((xMass*0.001)); - m_mon_BcMuMuDs_InvMass_Bc.push_back((xMuMuMass*0.001)); - m_mon_BcMuMuDs_PtPhi_Kp.push_back(trk4->pt()); - m_mon_BcMuMuDs_EtaPhi_Kp.push_back(trk4->eta()); - m_mon_BcMuMuDs_PhiPhi_Kp.push_back(trk4->phi()); - m_mon_BcMuMuDs_PtPhi_Km.push_back(trk3->pt()); - m_mon_BcMuMuDs_EtaPhi_Km.push_back(trk3->eta()); - m_mon_BcMuMuDs_PhiPhi_Km.push_back(trk3->phi()); - m_mon_BcMuMuDs_PtDs_pi.push_back(trk5->pt()); - m_mon_BcMuMuDs_EtaDs_pi.push_back(trk5->eta()); - m_mon_BcMuMuDs_PhiDs_pi.push_back(trk5->phi()); - } - ATH_MSG_DEBUG(" Added Bc particle to Bphys particle collection " - //<< ", eta=" trigPartBmumuKplus->eta() - //<< ", phi= " << trigPartBmumuKplus->phi() - << ", mass= " << trigPartBmumuBc->mass() - << ", particle type= " << trigPartBmumuBc->particleType()); - } else {// end of tighter mass cuts - ATH_MSG_DEBUG(" Bc rejected due to Bc mass cut (no vertexing) "); - } - - } // end of no vertexing part - - - } else { // end of if Ds and Bc successful mass cuts - ATH_MSG_DEBUG(" Bc rejected due to Ds or Bc mass cut "); - } - -} //checkBcMuMuDs new - - -//New -/*----------------------------------------------------------------------------*/ -double TrigL2BMuMuXFex::XMass(const xAOD::TrackParticle* particle1, const xAOD::TrackParticle* particle2,int decay) -{ - std::array<double, 2> massHypo; - if(decay == di_to_muons){ - massHypo[0] = MUMASS; - massHypo[1] = MUMASS; - } - if(decay == bD_to_Kstar){ - massHypo[0] = KPLUSMASS; - massHypo[1] = PIMASS; - } - if(decay == bS_to_Phi){ - massHypo[0] = KPLUSMASS; - massHypo[1] = KPLUSMASS; - } - if(decay == lB_to_L){ - massHypo[0] = PROTONMASS; - massHypo[1] = PIMASS; - } - std::array<const xAOD::TrackParticle*,2> bTracks; - bTracks[0] = particle1; - bTracks[1] = particle2; - return TrigBphysHelperUtilsTool::invariantMass(bTracks, massHypo); -} - -double TrigL2BMuMuXFex::KMuMuMass(const xAOD::TrackParticle* mu1, const xAOD::TrackParticle* mu2, - const xAOD::TrackParticle* kaon) -{ - const std::array<double, 3> massHypo{ MUMASS, MUMASS, KPLUSMASS}; //K - const std::array<const xAOD::TrackParticle*, 3> bTracks{ mu1, mu2, kaon}; - return TrigBphysHelperUtilsTool::invariantMass(bTracks, massHypo); -} -double TrigL2BMuMuXFex::XMuMuMass(const xAOD::TrackParticle* mu1, const xAOD::TrackParticle* mu2, - const xAOD::TrackParticle* particle1, const xAOD::TrackParticle* particle2, int decay) -{ - std::array<double, 4> massHypo; - massHypo[0] = MUMASS; - massHypo[1] = MUMASS; - if(decay == bD_to_Kstar){ - massHypo[2] = KPLUSMASS; - massHypo[3] = PIMASS; - } - if(decay == bS_to_Phi){ - massHypo[2] = KPLUSMASS; - massHypo[3] = KPLUSMASS; - } - if(decay == lB_to_L){ - massHypo[2] = PROTONMASS; - massHypo[3] = PIMASS; - } - std::array<const xAOD::TrackParticle*, 4> bTracks; - bTracks[0] = mu1; - bTracks[1] = mu2; - bTracks[2] = particle1; - bTracks[3] = particle2; - return TrigBphysHelperUtilsTool::invariantMass(bTracks, massHypo); -} -double TrigL2BMuMuXFex::X3Mass(const xAOD::TrackParticle* particle1, const xAOD::TrackParticle* particle2, const xAOD::TrackParticle* particle3) -{ - const std::array<double, 3> massHypo{KPLUSMASS,KPLUSMASS,PIMASS}; - const std::array<const xAOD::TrackParticle*, 3> bTracks{particle1, particle2, particle3}; - return TrigBphysHelperUtilsTool::invariantMass(bTracks, massHypo); -} -double TrigL2BMuMuXFex::X3MuMuMass(const xAOD::TrackParticle* mu1, const xAOD::TrackParticle* mu2, - const xAOD::TrackParticle* particle1, const xAOD::TrackParticle* particle2, const xAOD::TrackParticle* particle3) -{ - const std::array<double, 5> massHypo{ MUMASS, MUMASS, KPLUSMASS, KPLUSMASS, PIMASS}; - const std::array<const xAOD::TrackParticle*, 5> bTracks{mu1, mu2, particle1, particle2, particle3}; - return TrigBphysHelperUtilsTool::invariantMass(bTracks, massHypo); -} diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuXFex.h b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuXFex.h deleted file mode 100644 index ecd33b40a907cb04eb09a77fe5f9f571b55006e7..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuXFex.h +++ /dev/null @@ -1,403 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - - /************************************************************************** - ** - ** File: Trigger/TrigHypothesis/TrigBphysHypo/TrigL2BMuMuXFex.h - ** - ** Description: L2 hypothesis algorithms for B+/- -> K+/- mu+ mu- - ** Create TrigL2Bphys - ** - ** Author: Pavel.Strachota@cern.ch - ** Semen.Turchikhin@cern.ch - ** - ** Created: 10.01.2010 based on C. Adorisio's code TrigL2DiMuFex.h & D. Scheirich's code TrigL2LbMuMuLFex.h - ** - ** Modified: 26.09.2012 : "B_c -> D_s(*) (->Phi(->K+K-)) mu+mu-" added (Leonid Gladilin <gladilin@mail.cern.ch>) - ** Modified: - ** - **************************************************************************/ - -#ifndef TrigL2BMuMuXFex_h -#define TrigL2BMuMuXFex_h - -#include "TrigInterfaces/ComboAlgo.h" -#include "BtrigUtils.h" - - -#include "TrigInDetToolInterfaces/ITrigVertexingTool.h" - -#include "TrigInDetToolInterfaces/ITrigL2VertexFitter.h" - -#include "xAODTrigBphys/TrigBphysContainer.h" -#include "xAODTrigBphys/TrigBphysAuxContainer.h" -#include "xAODTrigBphys/TrigBphys.h" -#include "xAODTracking/TrackParticle.h" -#include "xAODTrigMuon/L2CombinedMuon.h" -#include "xAODTrigMuon/L2CombinedMuonContainer.h" - -class TrigBphysHelperUtilsTool; - -/// addon, not needed -class TriggerElement; -class ITrigVertexFitter; -class ITrigL2VertexFitter; -class ITrigVertexingTool; -// - -class TrigL2BMuMuXFex: public HLT::ComboAlgo -{ - public: - TrigL2BMuMuXFex(const std::string & name, ISvcLocator* pSvcLocator); - ~TrigL2BMuMuXFex(); - HLT::ErrorCode hltInitialize(); - HLT::ErrorCode hltFinalize(); - HLT::ErrorCode acceptInputs(HLT::TEConstVec& inputTEs, bool& pass ); - HLT::ErrorCode hltExecute(HLT::TEConstVec& inputTEs, HLT::TriggerElement* outputTE ); - - private: - ToolHandle <TrigBphysHelperUtilsTool> m_bphysHelperTool; - - - void checkBMuMuK(const xAOD::L2CombinedMuon* mu1, const xAOD::L2CombinedMuon* mu2, const xAOD::TrackParticle* trk3, - const xAOD::TrackParticleContainer* trkCollection, int iTrk3); - void checkBdMuMuKstar(const xAOD::L2CombinedMuon* mu1, const xAOD::L2CombinedMuon* mu2, - const xAOD::TrackParticle* trk3, const xAOD::TrackParticle* trk4, const xAOD::TrackParticleContainer* trkCollection, int iTrk3, int iTrk4); - void checkBsMuMuPhi(const xAOD::L2CombinedMuon* mu1, const xAOD::L2CombinedMuon* mu2, const xAOD::TrackParticle* trk3, - const xAOD::TrackParticle* trk4, const xAOD::TrackParticleContainer* trkCollection, int iTrk3, int iTrk4); - void checkLbMuMuLambda(const xAOD::L2CombinedMuon* mu1, const xAOD::L2CombinedMuon* mu2, const xAOD::TrackParticle* trk3, - const xAOD::TrackParticle* trk4, const xAOD::TrackParticleContainer* trkCollection, int iTrk3, int iTrk4); - void checkBcMuMuDs(const xAOD::L2CombinedMuon* mu1, const xAOD::L2CombinedMuon* mu2, const xAOD::TrackParticle* trk3, - const xAOD::TrackParticle* trk4, const xAOD::TrackParticle* trk5, const xAOD::TrackParticleContainer* trkCollection, - int iTrk3, int iTrk4, double xPhiMass, int iTrk5); - - - double KMuMuMass(const xAOD::TrackParticle* mu1, const xAOD::TrackParticle* mu2, const xAOD::TrackParticle* kaon); - double XMass (const xAOD::TrackParticle* particle1, const xAOD::TrackParticle* particle2, int decay); - double XMuMuMass(const xAOD::TrackParticle* mu1, const xAOD::TrackParticle* mu2, - const xAOD::TrackParticle* particle1, const xAOD::TrackParticle* particle2, int decay); - double X3Mass (const xAOD::TrackParticle* particle1, const xAOD::TrackParticle* particle2, const xAOD::TrackParticle* particle3); - double X3MuMuMass(const xAOD::TrackParticle* mu1, const xAOD::TrackParticle* mu2, - const xAOD::TrackParticle* particle1, const xAOD::TrackParticle* particle2, const xAOD::TrackParticle* particle3); - - - // cuts - configurable by python config file - BooleanProperty m_oppositeCharge; //require opposite charge for muons -// float m_cutMuon; - float m_lowerMuMuMassCut; //mass of Mu Mu pair - float m_upperMuMuMassCut; - float m_lowerMuVtxMassCut; //mass of Mu Mu pair after vertexing - float m_upperMuVtxMassCut; - float m_muVtxChi2Cut; - - // Maximum number of track combinations to try -- protection against TimeOuts - int m_maxNcombinations; - - // B+->K+MuMu cuts - float m_lowerKMuMuMassCut; // cut on mass of combination K Mu Mu - float m_upperKMuMuMassCut; - float m_lowerBVtxMassCut; //mass of B after vertexing - float m_upperBVtxMassCut; - float m_bVtxChi2Cut; - // vertexing off - float m_lowerB_KMuMuMassCutVtxOff; - float m_upperB_KMuMuMassCutVtxOff; - - - // Bd->K*MuMu cuts - float m_lowerKstarVtxMassCut; - float m_upperKstarVtxMassCut; - float m_lowerKstar_KaonMassCut; - float m_upperKstar_KaonMassCut; - float m_lowerBd_KstarMuMuMassCut; - float m_upperBd_KstarMuMuMassCut; - float m_kStarVtxChi2Cut; - float m_lowerBdVtxMassCut; - float m_upperBdVtxMassCut; - float m_bDVtxChi2Cut; - // vertexing off - float m_lowerBd_KstarMuMuMassCutVtxOff; - float m_upperBd_KstarMuMuMassCutVtxOff; - - // Bs->PhiMuMu cuts - float m_lowerPhi1020VtxMassCut; - float m_upperPhi1020VtxMassCut; - float m_lowerPhi1020_KaonMassCut; - float m_upperPhi1020_KaonMassCut; - float m_phi1020VtxChi2Cut; - float m_lowerBs_Phi1020MuMuMassCut; - float m_upperBs_Phi1020MuMuMassCut; - float m_lowerBsVtxMassCut; - float m_upperBsVtxMassCut; - float m_bSVtxChi2Cut; - // vertexing off - float m_lowerBs_Phi1020MuMuMassCutVtxOff; - float m_upperBs_Phi1020MuMuMassCutVtxOff; - - // Lb->LMuMu cuts - float m_lowerLambda_PrPiMassCut; - float m_upperLambda_PrPiMassCut; - float m_lowerLb_LambdaMuMuMassCut; - float m_upperLb_LambdaMuMuMassCut; - float m_lowerLambdaVtxMassCut; - float m_upperLambdaVtxMassCut; - float m_lowerLbVtxMassCut; - float m_upperLbVtxMassCut; - float m_lambdaVtxChi2Cut; - float m_lBVtxChi2Cut; -// float m_lBVtxDistanceCut; -// float m_prImpactCut; -// float m_piImpactCut; - // vertexing off - float m_lowerLb_LambdaMuMuMassCutVtxOff; - float m_upperLb_LambdaMuMuMassCutVtxOff; - - // Bc->DsMuMu cuts - float m_lowerDsVtxMassCut; - float m_upperDsVtxMassCut; - float m_lowerPhiDs_MassCut; - float m_upperPhiDs_MassCut; - float m_lowerDs_MassCut; - float m_upperDs_MassCut; - float m_DsVtxChi2Cut; - float m_lowerBc_DsMuMuMassCut; - float m_upperBc_DsMuMuMassCut; - float m_lowerBcVtxMassCut; - float m_upperBcVtxMassCut; - float m_bCVtxChi2Cut; - // vertexing off - float m_lowerBc_DsMuMuMassCutVtxOff; - float m_upperBc_DsMuMuMassCutVtxOff; - - // to set Accept-All mode: should be done with force-accept when possible - BooleanProperty m_acceptAll; - - BooleanProperty m_doVertexFit; - BooleanProperty m_doMuMuVertexFit; - - // B+->K+MuMu - BooleanProperty m_doB_KMuMuDecay; - BooleanProperty m_doB_KMuMuVertexFit; - - // Bd->K*MuMu - BooleanProperty m_doBd_KstarMuMuDecay; - BooleanProperty m_doKstar_KaonPionVertexFit; - BooleanProperty m_doBd_KstarMuMuVertexFit; - - // Bs->PhiMuMu - BooleanProperty m_doBs_Phi1020MuMuDecay; - BooleanProperty m_doPhi1020_KaonKaonVertexFit; - BooleanProperty m_doBs_Phi1020MuMuVertexFit; - - // Lb->LMuMu cuts - BooleanProperty m_doLb_LambdaMuMuDecay; - BooleanProperty m_doLambda_ProtonPionVertexFit; - BooleanProperty m_doLb_LambdaMuMuVertexFit; - - // Bc->DsMuMu - BooleanProperty m_doBc_DsMuMuDecay; - BooleanProperty m_doDs_PhiPionVertexFit; - BooleanProperty m_doBc_DsMuMuVertexFit; - - TrigTimer* m_TotTimer; - TrigTimer* m_VtxFitTimer; - - // Configurable properties - vertexing tools - ITrigL2VertexFitter* m_L2vertFitter; // L2 vertex - ITrigVertexingTool* m_vertexingTool; - - //output collections - TrigL2BphysContainer* m_trigBphysColl_b; - xAOD::TrigBphysContainer* m_trigBphysColl_bxAOD; // revert back to non-aod naming once complete - - xAOD::TrigBphysContainer* m_trigBphysColl_kStarxAOD; - xAOD::TrigBphysContainer* m_trigBphysColl_phixAOD; - xAOD::TrigBphysContainer* m_trigBphysColl_lambdaxAOD; - xAOD::TrigBphysContainer* m_trigBphysColl_dsxAOD; - - - // Counters -/* unsigned int m_countTotalEvents; - unsigned int m_countTotalRoI; - unsigned int m_countPassedEvents; - unsigned int m_countPassedRoIs; - unsigned int m_countPassedRoIMatch; - unsigned int m_countPassedMass; -*/ - - // Monitored variables - // general - std::vector<int> m_mon_Errors; - std::vector<int> m_mon_Acceptance; - // lvl1 - std::vector<float> m_mon_ROIsEta; - std::vector<float> m_mon_ROIsPhi; - - // muons - std::vector<float> m_mon_muon1Eta; - std::vector<float> m_mon_muon1Phi; - std::vector<float> m_mon_muon1Pt; - std::vector<float> m_mon_muon1Z0; - std::vector<float> m_mon_muon1A0; - std::vector<float> m_mon_muon2Eta; - std::vector<float> m_mon_muon2Phi; - std::vector<float> m_mon_muon2Pt; - std::vector<float> m_mon_muon2Z0; - std::vector<float> m_mon_muon2A0; - - // tracks - std::vector<int> m_mon_nTracks; - std::vector<float> m_mon_etaTracks; - std::vector<float> m_mon_pTTracks; - std::vector<float> m_mon_phiTracks; - - // B+/- - int m_mon_BMuMuK_n; - std::vector<float> m_mon_BMuMuK_InvMass_B; - std::vector<float> m_mon_BMuMuK_PtB_K; - std::vector<float> m_mon_BMuMuK_EtaB_K; - std::vector<float> m_mon_BMuMuK_PhiB_K; - std::vector<float> m_mon_BMuMuK_VtxMass_B; - std::vector<float> m_mon_BMuMuK_Chi2toNDoF_B; - std::vector<float> m_mon_BMuMuK_VtxPtB_K; - std::vector<float> m_mon_BMuMuK_VtxEtaB_K; - std::vector<float> m_mon_BMuMuK_VtxPhiB_K; - - // Bs+/- before vertexing - int m_mon_BsMuMuPhi_n; - std::vector<float> m_mon_BsMuMuPhi_InvMassBs_Phi; - std::vector<float> m_mon_BsMuMuPhi_InvMass_Bs; - std::vector<float> m_mon_BsMuMuPhi_PtPhi_Kp; - std::vector<float> m_mon_BsMuMuPhi_EtaPhi_Kp; - std::vector<float> m_mon_BsMuMuPhi_PhiPhi_Kp; - std::vector<float> m_mon_BsMuMuPhi_PtPhi_Km; - std::vector<float> m_mon_BsMuMuPhi_EtaPhi_Km; - std::vector<float> m_mon_BsMuMuPhi_PhiPhi_Km; - // after Phi vertexing - std::vector<float> m_mon_BsMuMuPhi_VtxMassBs_Phi; - std::vector<float> m_mon_BsMuMuPhi_Chi2toNDoFBs_Phi; - std::vector<float> m_mon_BsMuMuPhi_VtxPtPhi_Kp; - std::vector<float> m_mon_BsMuMuPhi_VtxEtaPhi_Kp; - std::vector<float> m_mon_BsMuMuPhi_VtxPhiPhi_Kp; - std::vector<float> m_mon_BsMuMuPhi_VtxPtPhi_Km; - std::vector<float> m_mon_BsMuMuPhi_VtxEtaPhi_Km; - std::vector<float> m_mon_BsMuMuPhi_VtxPhiPhi_Km; - // after Bs vertexing - std::vector<float> m_mon_BsMuMuPhi_VtxMass_Bs; - std::vector<float> m_mon_BsMuMuPhi_Chi2toNDoF_Bs; - std::vector<float> m_mon_BsMuMuPhi_VtxPtBs_Kp; - std::vector<float> m_mon_BsMuMuPhi_VtxEtaBs_Kp; - std::vector<float> m_mon_BsMuMuPhi_VtxPhiBs_Kp; - std::vector<float> m_mon_BsMuMuPhi_VtxPtBs_Km; - std::vector<float> m_mon_BsMuMuPhi_VtxEtaBs_Km; - std::vector<float> m_mon_BsMuMuPhi_VtxPhiBs_Km; - - // Bd - int m_mon_BdMuMuKs_n; - std::vector<float> m_mon_BdMuMuKs_InvMassBd_Ks; - std::vector<float> m_mon_BdMuMuKs_InvMass_Bd; - std::vector<float> m_mon_BdMuMuKs_PtKs_Ka; - std::vector<float> m_mon_BdMuMuKs_EtaKs_Ka; - std::vector<float> m_mon_BdMuMuKs_PhiKs_Ka; - std::vector<float> m_mon_BdMuMuKs_PtKs_Pi; - std::vector<float> m_mon_BdMuMuKs_EtaKs_Pi; - std::vector<float> m_mon_BdMuMuKs_PhiKs_Pi; - // after K* vertexing - std::vector<float> m_mon_BdMuMuKs_VtxMassBd_Ks; - std::vector<float> m_mon_BdMuMuKs_Chi2toNDoFBd_Ks; - std::vector<float> m_mon_BdMuMuKs_VtxPtKs_Ka; - std::vector<float> m_mon_BdMuMuKs_VtxEtaKs_Ka; - std::vector<float> m_mon_BdMuMuKs_VtxPhiKs_Ka; - std::vector<float> m_mon_BdMuMuKs_VtxPtKs_Pi; - std::vector<float> m_mon_BdMuMuKs_VtxEtaKs_Pi; - std::vector<float> m_mon_BdMuMuKs_VtxPhiKs_Pi; - // after Bd vertexing - std::vector<float> m_mon_BdMuMuKs_VtxMass_Bd; - std::vector<float> m_mon_BdMuMuKs_Chi2toNDoF_Bd; - std::vector<float> m_mon_BdMuMuKs_VtxPtBd_Ka; - std::vector<float> m_mon_BdMuMuKs_VtxEtaBd_Ka; - std::vector<float> m_mon_BdMuMuKs_VtxPhiBd_Ka; - std::vector<float> m_mon_BdMuMuKs_VtxPtBd_Pi; - std::vector<float> m_mon_BdMuMuKs_VtxEtaBd_Pi; - std::vector<float> m_mon_BdMuMuKs_VtxPhiBd_Pi; - - // Lb+/- before vertexing - // Lb+/- - int m_mon_LbMuMuL_n; - std::vector<float> m_mon_LbMuMuL_InvMassLb_L; - std::vector<float> m_mon_LbMuMuL_InvMass_Lb; - std::vector<float> m_mon_LbMuMuL_PtL_Pr; - std::vector<float> m_mon_LbMuMuL_EtaL_Pr; - std::vector<float> m_mon_LbMuMuL_PhiL_Pr; - std::vector<float> m_mon_LbMuMuL_PtL_Pi; - std::vector<float> m_mon_LbMuMuL_EtaL_Pi; - std::vector<float> m_mon_LbMuMuL_PhiL_Pi; - // after L vertexing - std::vector<float> m_mon_LbMuMuL_VtxMassLb_L; - std::vector<float> m_mon_LbMuMuL_Chi2toNDoFLb_L; - std::vector<float> m_mon_LbMuMuL_VtxPtL_Pr; - std::vector<float> m_mon_LbMuMuL_VtxEtaL_Pr; - std::vector<float> m_mon_LbMuMuL_VtxPhiL_Pr; - std::vector<float> m_mon_LbMuMuL_VtxPtL_Pi; - std::vector<float> m_mon_LbMuMuL_VtxEtaL_Pi; - std::vector<float> m_mon_LbMuMuL_VtxPhiL_Pi; - // after Lb vertexing - std::vector<float> m_mon_LbMuMuL_VtxMass_Lb; - std::vector<float> m_mon_LbMuMuL_Chi2toNDoF_Lb; - std::vector<float> m_mon_LbMuMuL_VtxPtLb_Pr; - std::vector<float> m_mon_LbMuMuL_VtxEtaLb_Pr; - std::vector<float> m_mon_LbMuMuL_VtxPhiLb_Pr; - std::vector<float> m_mon_LbMuMuL_VtxPtLb_Pi; - std::vector<float> m_mon_LbMuMuL_VtxEtaLb_Pi; - std::vector<float> m_mon_LbMuMuL_VtxPhiLb_Pi; - - // Bc+/- before vertexing - int m_mon_BcMuMuDs_n; - std::vector<float> m_mon_BcMuMuDs_InvMassBc_Phi; - std::vector<float> m_mon_BcMuMuDs_InvMassBc_Ds; - std::vector<float> m_mon_BcMuMuDs_InvMass_Bc; - std::vector<float> m_mon_BcMuMuDs_PtPhi_Kp; - std::vector<float> m_mon_BcMuMuDs_EtaPhi_Kp; - std::vector<float> m_mon_BcMuMuDs_PhiPhi_Kp; - std::vector<float> m_mon_BcMuMuDs_PtPhi_Km; - std::vector<float> m_mon_BcMuMuDs_EtaPhi_Km; - std::vector<float> m_mon_BcMuMuDs_PhiPhi_Km; - std::vector<float> m_mon_BcMuMuDs_PtDs_pi; - std::vector<float> m_mon_BcMuMuDs_EtaDs_pi; - std::vector<float> m_mon_BcMuMuDs_PhiDs_pi; - // after Ds vertexing - std::vector<float> m_mon_BcMuMuDs_VtxMassBc_Ds; - std::vector<float> m_mon_BcMuMuDs_Chi2toNDoFBc_Ds; - std::vector<float> m_mon_BcMuMuDs_VtxPtDs_Kp; - std::vector<float> m_mon_BcMuMuDs_VtxEtaDs_Kp; - std::vector<float> m_mon_BcMuMuDs_VtxPhiDs_Kp; - std::vector<float> m_mon_BcMuMuDs_VtxPtDs_Km; - std::vector<float> m_mon_BcMuMuDs_VtxEtaDs_Km; - std::vector<float> m_mon_BcMuMuDs_VtxPhiDs_Km; - std::vector<float> m_mon_BcMuMuDs_VtxPtDs_pi; - std::vector<float> m_mon_BcMuMuDs_VtxEtaDs_pi; - std::vector<float> m_mon_BcMuMuDs_VtxPhiDs_pi; - // after Bc vertexing - std::vector<float> m_mon_BcMuMuDs_VtxMass_Bc; - std::vector<float> m_mon_BcMuMuDs_Chi2toNDoF_Bc; - std::vector<float> m_mon_BcMuMuDs_VtxPtBc_Kp; - std::vector<float> m_mon_BcMuMuDs_VtxEtaBc_Kp; - std::vector<float> m_mon_BcMuMuDs_VtxPhiBc_Kp; - std::vector<float> m_mon_BcMuMuDs_VtxPtBc_Km; - std::vector<float> m_mon_BcMuMuDs_VtxEtaBc_Km; - std::vector<float> m_mon_BcMuMuDs_VtxPhiBc_Km; - std::vector<float> m_mon_BcMuMuDs_VtxPtBc_pi; - std::vector<float> m_mon_BcMuMuDs_VtxEtaBc_pi; - std::vector<float> m_mon_BcMuMuDs_VtxPhiBc_pi; - - // summary - int m_mon_nBphys; - int m_mon_nTriedCombinations; - float m_mon_TotalRunTime; - float m_mon_VertexingTime; - - -}; - -#endif diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuXHypo.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuXHypo.cxx deleted file mode 100644 index 172599b877baee6f3e54340cfe9565e2782cb4c1..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuXHypo.cxx +++ /dev/null @@ -1,300 +0,0 @@ -// -*- C++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/************************************************************************** - ** - ** File: Trigger/TrigHypothesis/TrigBPhysHypo/TrigL2BMuMuXHypo.cxx - ** - ** Description: L2 hypothesis algorithms for B+/- -> K+/- mu+ mu- - ** Create TrigL2Bphys - ** - ** Author: Pavel.Strachota@cern.ch - ** - ** Created: 10.01.2010 based on C. Adorisio's code TrigL2DiMuHypo.cxx & D. Scheirich's code TrigL2LbMuMuLHypo.cxx - ** - ** Modified: 26.09.2012 : "B_c -> D_s(*) (->Phi(->K+K-)) mu+mu-" added (Leonid Gladilin <gladilin@mail.cern.ch>) - ** - **************************************************************************/ - -#include "TrigL2BMuMuXHypo.h" - -#include "xAODTrigger/TrigPassBits.h" -#include "TrigNavigation/Navigation.h" - -// additions of xAOD objects -#include "TrigBphysHelperUtilsTool.h" -// additions of xAOD objects -#include "xAODTrigBphys/TrigBphys.h" -#include "xAODTrigBphys/TrigBphysContainer.h" - -/*------------------------------------------------------------------------------------------*/ -TrigL2BMuMuXHypo::TrigL2BMuMuXHypo(const std::string & name, ISvcLocator* pSvcLocator): - HLT::HypoAlgo(name, pSvcLocator) -,m_bphysHelperTool("TrigBphysHelperUtilsTool") -{ - - // Read cuts - declareProperty("AcceptAll", m_acceptAll = false); - // false - declareProperty("LowerBMassCut", m_lowerBMassCut = 4500.); //4500.00 - declareProperty("UpperBMassCut", m_upperBMassCut = 5900.); //5900.00 - declareProperty("LowerBdMassCut", m_lowerBdMassCut = 4600.); //4600.00 - declareProperty("UpperBdMassCut", m_upperBdMassCut = 6000.); //6000.00 - declareProperty("LowerKstarMassCut", m_lowerKstarMassCut = 600.); //4600.00 - declareProperty("UpperKstarMassCut", m_upperKstarMassCut = 1500.); //6000.00 - declareProperty("LowerBsMassCut", m_lowerBsMassCut = 4600.); //4600.00 - declareProperty("UpperBsMassCut", m_upperBsMassCut = 6000.); //6000.00 - declareProperty("LowerPhi1020MassCut", m_lowerPhi1020MassCut = 990.); //4600.00 - declareProperty("UpperPhi1020MassCut", m_upperPhi1020MassCut = 1050.); //6000.00 - declareProperty("LowerLbMassCut", m_lowerLbMassCut = 4600.); //4600.00 - declareProperty("UpperLbMassCut", m_upperLbMassCut = 6400.); //6400.00 - declareProperty("LowerLambdaMassCut", m_lowerLambdaMassCut = 1040.); //4600.00 - declareProperty("UpperLambdaMassCut", m_upperLambdaMassCut = 1220.); //6400.00 - - declareProperty("LowerBcMassCut", m_lowerBcMassCut = 1800.); // 1800.00 - declareProperty("UpperBcMassCut", m_upperBcMassCut = 7050.); // 7050.00 - declareProperty("LowerDsMassCut", m_lowerDsMassCut = 1600.); // 1600.00 - declareProperty("UpperDsMassCut", m_upperDsMassCut = 2400.); // 2400.00 - - // zero counters - m_lastEvent = 999; - m_lastEventPassed = 999; - m_countTotalEvents=0; - m_countTotalRoI=0; - m_countPassedEvents=0; - m_countPassedRoIs=0; - m_countPassedBMass=0; - m_countPassedBdMass=0; - m_countPassedBsMass=0; - m_countPassedLbMass=0; - m_countPassedBcMass=0; - -} -/*------------------------------------------------------------------------------------------*/ -TrigL2BMuMuXHypo::~TrigL2BMuMuXHypo() -{ } -/*------------------------------------------------------------------------------------------*/ -HLT::ErrorCode TrigL2BMuMuXHypo::hltInitialize() -{ - - ATH_MSG_DEBUG("In Initialize "); - if (m_bphysHelperTool.retrieve().isFailure()) { - ATH_MSG_ERROR("Can't find TrigBphysHelperUtilsTool"); - return HLT::BAD_JOB_SETUP; - } else { - ATH_MSG_DEBUG("TrigBphysHelperUtilsTool found"); - } - - - return HLT::OK; -} -/*------------------------------------------------------------------------------------------*/ -HLT::ErrorCode TrigL2BMuMuXHypo::hltFinalize() -{ - ATH_MSG_INFO("In Finalize()" ); - ATH_MSG_INFO("|----------------------- SUMMARY FROM TrigL2BMuMuXHypo -------------|" ); - ATH_MSG_INFO("Run on events/RoIs " << m_countTotalEvents << "/" << m_countTotalRoI ); - ATH_MSG_INFO("Passed events/RoIs " << m_countPassedEvents << "/" << m_countPassedRoIs ); - ATH_MSG_INFO("RoIs Passed BMass: " << m_countPassedBMass ); - ATH_MSG_INFO("RoIs Passed BdMass: " << m_countPassedBdMass ); - ATH_MSG_INFO("RoIs Passed BsMass: " << m_countPassedBsMass ); - ATH_MSG_INFO("RoIs Passed LbMass: " << m_countPassedLbMass ); - ATH_MSG_INFO("|-----------------------------------------------------------------------|" ); - - return HLT::OK; -} - -//----------------------------------------------------------------------------------------------- -HLT::ErrorCode TrigL2BMuMuXHypo::hltExecute(const HLT::TriggerElement* outputTE, bool& pass) -{ - ATH_MSG_DEBUG("In Execute()" ); - - bool PassedBplus=false; - bool PassedBd=false; - bool PassedBs=false; - bool PassedLb=false; - bool PassedBc=false; - bool result = false; - - // Retrieve event info - int IdRun = 0; - int IdEvent = 0; - - // event info - uint32_t runNumber(0), evtNumber(0), lbBlock(0); - if (m_bphysHelperTool->getRunEvtLb( runNumber, evtNumber, lbBlock).isFailure()) { - ATH_MSG_ERROR("Error retriving EventInfo" ); - } - IdRun = runNumber; - IdEvent = evtNumber; - - if (IdEvent != (int) m_lastEvent) { - m_countTotalEvents++; - m_lastEvent=IdEvent; - } - m_countTotalRoI++; - - // Accept-All mode: temporary patch; should be done with force-accept - if (m_acceptAll) { - ATH_MSG_DEBUG("AcceptAll property is set: taking all events" ); - pass = true; - return HLT::OK; - } else { - ATH_MSG_DEBUG("AcceptAll property not set: applying selection" ); - } - - ATH_MSG_DEBUG("Using outputTE ( " << outputTE << " ) ->getId(): " << outputTE->getId() ); - - // create vector for TrigL2Bphys particles - // const TrigL2BphysContainer* trigBphysColl_b = 0; - const xAOD::TrigBphysContainer* trigBphysColl_b(nullptr); - - // bplus part - HLT::ErrorCode status = getFeature(outputTE, trigBphysColl_b, "L2BMuMuXFex"); - - if ( status != HLT::OK ) { - ATH_MSG_WARNING("Failed to get TrigBphysics collection" ); - return HLT::OK; - } - - ATH_MSG_DEBUG("Retrieved Bphys collection trigBphysColl_b = " << trigBphysColl_b ); - if ( trigBphysColl_b == 0 ) { - ATH_MSG_DEBUG("No Bphys particles to analyse, leaving!" ); - return HLT::OK; - } - - ATH_MSG_DEBUG("Got TrigBphys collection with " << trigBphysColl_b->size() << " TrigBphys particles " ); - - // if no Bphys particles were found, just leave TrigBphysColl. empty and leave - if ( trigBphysColl_b->size() == 0 ) { - ATH_MSG_DEBUG("No Bphys particles to analyse, leaving!" ); - return HLT::OK; - } - - //TrigPassBits *bits = HLT::makeTrigPassBits(trigBphysColl_b); - std::unique_ptr<xAOD::TrigPassBits> xBits = xAOD::makeTrigPassBits<xAOD::TrigBphysContainer>(trigBphysColl_b); - - // now loop over Bphys particles to see if one passes cuts - for ( xAOD::TrigBphysContainer::const_iterator bphysIter = trigBphysColl_b->begin(); bphysIter != trigBphysColl_b->end(); ++bphysIter) { - - //determine decay mode - xAOD::TrigBphys::pType decayType = (*bphysIter)->particleType(); - std::string decayName("Unknown"); - if(decayType == xAOD::TrigBphys::BKMUMU) decayName = "B+ -> mu mu K+"; - if(decayType == xAOD::TrigBphys::BDKSTMUMU) decayName = "Bd -> mu mu K*"; - if(decayType == xAOD::TrigBphys::BSPHIMUMU) decayName = "Bs -> mu mu Phi"; - if(decayType == xAOD::TrigBphys::LBLMUMU) decayName = "Lambda_b -> mu mu Lambda"; - if(decayType == xAOD::TrigBphys::BCDSMUMU) decayName = "Bc -> mu mu Ds"; - - ATH_MSG_DEBUG("Bphys particle type " << decayName << ", " << decayType << " with mass " << (*bphysIter)->mass() ); - - - if (decayType == xAOD::TrigBphys::BKMUMU || decayType == xAOD::TrigBphys::BDKSTMUMU || - decayType == xAOD::TrigBphys::BSPHIMUMU || decayType == xAOD::TrigBphys::LBLMUMU || - decayType == xAOD::TrigBphys::BCDSMUMU ) { - - bool thisPassedBplus=false; - bool thisPassedBd=false; - bool thisPassedBs=false; - bool thisPassedLb=false; - bool thisPassedBc=false; - - float BMass = (*bphysIter)->mass(); - ATH_MSG_DEBUG("BMass = " << BMass ); - - if(decayType == xAOD::TrigBphys::BKMUMU) { - if ( BMass > m_lowerBMassCut && BMass < m_upperBMassCut ) { - ATH_MSG_DEBUG(" Mass = " << BMass << " -> B+ Mass passed " ); - PassedBplus=true; - thisPassedBplus=true; - } - } else { // Bd, Bs, Lb, Bc - const xAOD::TrigBphys* trigPartX = (*bphysIter)->secondaryDecay(); - if(!trigPartX) { - ATH_MSG_DEBUG("No secondary decay pointer in Bphys particle of type " << (*bphysIter)->particleType() ); - } else { - float XMass = trigPartX->mass(); - ATH_MSG_DEBUG("XMass = " << XMass ); - - if(decayType == xAOD::TrigBphys::BDKSTMUMU) { - if ( BMass > m_lowerBdMassCut && BMass < m_upperBdMassCut ) { - ATH_MSG_DEBUG(" BMass = " << BMass << " -> Bd Mass passed " ); - if( XMass > m_lowerKstarMassCut && XMass < m_upperKstarMassCut ) { - ATH_MSG_DEBUG(" XMass = " << XMass << " -> K* Mass passed " ); - PassedBd=true; - thisPassedBd=true; - } - } - } - if(decayType == xAOD::TrigBphys::BSPHIMUMU) { - if ( BMass > m_lowerBsMassCut && BMass < m_upperBsMassCut ) { - ATH_MSG_DEBUG(" BMass = " << BMass << " -> Bs Mass passed " ); - if( XMass > m_lowerPhi1020MassCut && XMass < m_upperPhi1020MassCut ) { - ATH_MSG_DEBUG(" XMass = " << XMass << " -> Phi Mass passed " ); - PassedBs=true; - thisPassedBs=true; - } - } - } - if(decayType == xAOD::TrigBphys::LBLMUMU) { - if ( BMass > m_lowerLbMassCut && BMass < m_upperLbMassCut ) { - ATH_MSG_DEBUG(" BMass = " << BMass << " -> Lb Mass passed " ); - if( XMass > m_lowerLambdaMassCut && XMass < m_upperLambdaMassCut ) { - ATH_MSG_DEBUG(" XMass = " << XMass << " -> Lambda Mass passed " ); - PassedLb=true; - thisPassedLb=true; - } - } - } - if(decayType == xAOD::TrigBphys::BCDSMUMU) { - if ( BMass > m_lowerBcMassCut && BMass < m_upperBcMassCut ) { - ATH_MSG_DEBUG(" BMass = " << BMass << " -> Bc Mass passed " ); - if( XMass > m_lowerDsMassCut && XMass < m_upperDsMassCut ) { - ATH_MSG_DEBUG(" XMass = " << XMass << " -> Ds Mass passed " ); - PassedBc=true; - thisPassedBc=true; - } - } - } - } // end if trigPartX - } // end Bd, Bs, Lb, Bc - - if ( thisPassedBplus || thisPassedBd || thisPassedBs || thisPassedLb || thisPassedBc ) { - result=true; - //HLT::markPassing(bits, *bphysIter, trigBphysColl_b); - xBits->markPassing((*bphysIter),trigBphysColl_b,true); - } - } - } - - if (PassedBplus) m_countPassedBMass++; - if (PassedBd) m_countPassedBdMass++; - if (PassedBs) m_countPassedBsMass++; - if (PassedLb) m_countPassedLbMass++; - if (PassedBc) m_countPassedBcMass++; - if (result) { - m_countPassedRoIs++; - if (IdEvent!= (int) m_lastEventPassed) { - m_countPassedEvents++; - m_lastEventPassed=IdEvent; - } - } - - // Reach this point successfully - ATH_MSG_DEBUG("Run: " << IdRun << " Event: " << IdEvent << " result is " << result ); - - - if (!m_acceptAll) pass = result; - - // store result - //if ( attachBits(outputTE, bits) != HLT::OK ) { - // msg() << MSG::ERROR << "Problem attaching TrigPassBits! " ); - //} - if(attachFeature(outputTE, xBits.release(),"passbits") != HLT::OK) - ATH_MSG_ERROR("Could not store TrigPassBits! "); - - return HLT::OK; -} diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuXHypo.h b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuXHypo.h deleted file mode 100644 index ae11481d5ff83025d95eaebfe445424874b8db31..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuXHypo.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/************************************************************************** - ** - ** File: Trigger/TrigHypothesis/TrigBphysHypo/TrigL2BMuMuXHypo.h - ** - ** Description: L2 hypothesis algorithms for B+/- -> K+/- mu+ mu- - ** Create TrigL2Bphys - ** - ** Author: Pavel.Strachota@cern.ch - ** - ** Created: 10.01.2010 based on C. Adorisio's code TrigL2DiMuHypo.h & D. Scheirich's code TrigL2LbMuMuLHypo.h - ** Modified: - ** - **************************************************************************/ - -#ifndef TrigL2BMuMuXHypo_h -#define TrigL2BMuMuXHypo_h - -#include "TrigInterfaces/HypoAlgo.h" - -#include "Constants.h" - -class TrigBphysHelperUtilsTool; - - -class TrigL2BMuMuXHypo: public HLT::HypoAlgo { - - public: - TrigL2BMuMuXHypo(const std::string & name, ISvcLocator* pSvcLocator); - ~TrigL2BMuMuXHypo(); - HLT::ErrorCode hltInitialize(); - HLT::ErrorCode hltFinalize(); - HLT::ErrorCode hltExecute(const HLT::TriggerElement* outputTE, bool& pass); - - // private: - - bool m_acceptAll; - float m_lowerBMassCut; - float m_upperBMassCut; - float m_lowerBdMassCut; - float m_upperBdMassCut; - float m_lowerKstarMassCut; - float m_upperKstarMassCut; - float m_lowerBsMassCut; - float m_upperBsMassCut; - float m_lowerPhi1020MassCut; - float m_upperPhi1020MassCut; - float m_lowerLbMassCut; - float m_upperLbMassCut; - float m_lowerLambdaMassCut; - float m_upperLambdaMassCut; - float m_lowerBcMassCut; - float m_upperBcMassCut; - float m_lowerDsMassCut; - float m_upperDsMassCut; - - - unsigned int m_lastEvent; - unsigned int m_lastEventPassed; - unsigned int m_countTotalEvents; - unsigned int m_countTotalRoI; - unsigned int m_countPassedEvents; - unsigned int m_countPassedRoIs; - unsigned int m_countPassedBMass; - unsigned int m_countPassedBdMass; - unsigned int m_countPassedBsMass; - unsigned int m_countPassedLbMass; - unsigned int m_countPassedBcMass; - -private: - ToolHandle <TrigBphysHelperUtilsTool> m_bphysHelperTool; - - -}; - -#endif diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2MultiMuFex.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2MultiMuFex.cxx deleted file mode 100644 index 8d53edd535d778fd15b507937101fc984a8aed99..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2MultiMuFex.cxx +++ /dev/null @@ -1,625 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -// ******************************************************************* -// -// NAME: TrigL2MultiMuFex.h -// PACKAGE: Trigger/TrigHypothesis/TrigBphysHypo -// AUTHOR: Julie Kirk -// -// ******************************************************************* - -#include <math.h> - -#include "TrigL2MultiMuFex.h" - -#include "CLHEP/GenericFunctions/CumulativeChiSquare.hh" - -#include "TrigInDetToolInterfaces/ITrigVertexingTool.h" -#include "TrigInDetEvent/TrigL2Vertex.h" - -#include "Constants.h" -#include "BtrigUtils.h" - -// additions of xAOD objects -#include "xAODEventInfo/EventInfo.h" -#include "xAODTracking/TrackParticle.h" -#include "xAODTracking/TrackParticleContainer.h" - -#include "TrigBphysHelperUtilsTool.h" - -//class ISvcLocator; - -/*--------------------------------------------------------------------------------*/ -TrigL2MultiMuFex::TrigL2MultiMuFex(const std::string & name, ISvcLocator* pSvcLocator): - HLT::ComboAlgo(name, pSvcLocator), - m_bphysHelperTool("TrigBphysHelperUtilsTool"), - m_checkNinputTE(true), - m_L2vertFitter("TrigL2VertexFitter",this), - m_vertexingTool("TrigVertexingTool",this), - m_BmmHypTot(0), - m_BmmHypVtx(0), - // counters - m_lastEvent(-1), - m_lastEventPassed(-1), - m_countTotalEvents(0), - m_countTotalRoI(0), - m_countPassedEvents(0), - m_countPassedRoIs(0), - m_countPassedmumuPairs(0), - m_countPassedBsMass(0), - m_countPassedVtxFit(0), - - m_passInvMass(false), - m_massMuon(105.6583715) -/*--------------------------------------------------------------------------------*/ -{ - - // Read properties - boolean switches - declareProperty("AcceptAll" , m_acceptAll = true ); - declareProperty("NInputMuon" , m_NInputMuon = 3 ); - declareProperty("OppositeSign" , m_oppositeCharge = true ); - declareProperty("NMassMuon" , m_NMassMuon = 2 ); - declareProperty("doVertexFit" , m_doVertexFit = true ); - declareProperty("CheckNinputTE", m_checkNinputTE=true); - - // Read properties - mass widnow cuts - declareProperty("LowerMassCut", m_lowerMassCut = 2000.0 ); - declareProperty("UpperMassCut", m_upperMassCut = 10000.0 ); - - // Read properties - vertexing tools - declareProperty("TrigL2VertexFitter", m_L2vertFitter ); - declareProperty("TrigVertexingTool" , m_vertexingTool, "TrigVertexingTool" ); - - declareProperty("MassTrack" , m_massMuon, "Mass of the muon" ); - - - // Variables for monitoring histograms - declareMonitoredStdContainer("Errors" , m_mon_Errors , AutoClear); - declareMonitoredStdContainer("Acceptance" , m_mon_Acceptance , AutoClear); - // declareMonitoredStdContainer("ROIEta" , m_mon_ROIEta , AutoClear); - // declareMonitoredStdContainer("ROIPhi" , m_mon_ROIPhi , AutoClear); - // - two combined muons - declareMonitoredStdContainer("MucombPt" , m_mon_MucombPt , AutoClear); - declareMonitoredStdContainer("MutrkPt" , m_mon_MutrkPt , AutoClear); - // declareMonitoredStdContainer("MutrkPt_wideRange" , m_mon_MutrkPt_wideRange , AutoClear); - declareMonitoredStdContainer("MutrkEta" , m_mon_MutrkEta , AutoClear); - declareMonitoredStdContainer("MutrkPhi" , m_mon_MutrkPhi , AutoClear); - // declareMonitoredStdContainer("Mutrk1Mutrk2dEta" , m_mon_Mutrk1Mutrk2dEta , AutoClear); - //declareMonitoredStdContainer("Mutrk1Mutrk2dPhi" , m_mon_Mutrk1Mutrk2dPhi , AutoClear); - //declareMonitoredStdContainer("Mutrk1Mutrk2dR" , m_mon_Mutrk1Mutrk2dR , AutoClear); - //declareMonitoredStdContainer("SumPtMutrk12" , m_mon_SumPtMutrk12 , AutoClear); - declareMonitoredStdContainer("InvMass_comb" , m_mon_InvMass_comb , AutoClear); - declareMonitoredStdContainer("InvMass_comb_wideRange" , m_mon_InvMass_comb , AutoClear); - declareMonitoredStdContainer("FitMass" , m_mon_FitMass , AutoClear); - declareMonitoredStdContainer("FitMass_wideRange" , m_mon_FitMass , AutoClear); - declareMonitoredStdContainer("InvMass_comb_okFit" , m_mon_InvMass_comb_okFit , AutoClear); - declareMonitoredStdContainer("Chi2toNDoF" , m_mon_Chi2toNDoF , AutoClear); - declareMonitoredStdContainer("FitTotalPt" , m_mon_FitTotalPt , AutoClear); - declareMonitoredStdContainer("SumPtMutrk12_okFit" , m_mon_SumPtMutrk12_okFit , AutoClear); - declareMonitoredStdContainer("FitVtxR" , m_mon_FitVtxR , AutoClear); - declareMonitoredStdContainer("FitVtxZ" , m_mon_FitVtxZ , AutoClear); - - // Initialize the collections - m_trigBphysColl = NULL; -} - -/*------------------------------*/ -TrigL2MultiMuFex::~TrigL2MultiMuFex() -/*------------------------------*/ -{ -} - -/*-------------------------------------------*/ -HLT::ErrorCode TrigL2MultiMuFex::hltInitialize() -/*-------------------------------------------*/ -{ - - // Print out properties, cuts - ATH_MSG_DEBUG("Initialization ..." ); - ATH_MSG_DEBUG("AcceptAll = " << (m_acceptAll==true ? "True" : "False") ); - ATH_MSG_DEBUG("Number of input muons expected = " << m_NInputMuon ); - ATH_MSG_DEBUG("Number of muons for mass = " << m_NMassMuon ); - ATH_MSG_DEBUG("OppositeCharge = " << (m_oppositeCharge==true ? "True" : "False") ); - ATH_MSG_DEBUG("LowerMassCut = " << m_lowerMassCut ); - ATH_MSG_DEBUG("UpperMassCut = " << m_upperMassCut ); - - // Retrieving the vertex fitting tool - // StatusCode sc = toolSvc()->retrieveTool("TrigVertexFitter","TrigVertexFitter",m_vertFitter); - // if ( sc.isFailure() ) { - // ATH_MSG_FATAL("Unable to locate TrigVertexFitter tool " ); - // return HLT::BAD_JOB_SETUP; - // } - - StatusCode sc = m_L2vertFitter.retrieve(); - if ( sc.isFailure() ) { - ATH_MSG_FATAL("Unable to locate TrigL2VertexFitter tool " ); - return HLT::BAD_JOB_SETUP; - } - else { - ATH_MSG_INFO("TrigL2VertexFitter retrieved"); - } - - sc = m_vertexingTool.retrieve(); - if ( sc.isFailure() ) { - ATH_MSG_FATAL("Unable to locate TrigVertexingTool tool " ); - return HLT::BAD_JOB_SETUP; - } else { - ATH_MSG_INFO("TrigVertexingTool retrieved"); - } - - if (m_bphysHelperTool.retrieve().isFailure()) { - ATH_MSG_ERROR("Can't find TrigBphysHelperUtilsTool" ); - return HLT::BAD_JOB_SETUP; - } else { - ATH_MSG_DEBUG("TrigBphysHelperUtilsTool found" ); - } - - - // Add the timers - if ( timerSvc() ) { - m_BmmHypTot = addTimer("BmmHypTot"); - m_BmmHypVtx = addTimer("BmmHypVtxFit"); - } - - // TODO: shouldn't be initialized in the constructor (does it matter ?) - m_lastEvent = -1; - m_lastEventPassed = -1; - m_countTotalEvents = 0; - m_countTotalRoI = 0; - m_countPassedEvents = 0; - m_countPassedRoIs = 0; - m_countPassedmumuPairs = 0; - m_countPassedBsMass = 0; - m_countPassedVtxFit = 0; - - return HLT::OK; -} - -/*-----------------------------------------*/ -HLT::ErrorCode TrigL2MultiMuFex::hltFinalize() -/*-----------------------------------------*/ -{ - - ATH_MSG_INFO("in finalize()" ); - MsgStream log(msgSvc(), name()); - - ATH_MSG_INFO("|----------------------- SUMMARY FROM TrigL2MultiMuFex -------------|"); - ATH_MSG_INFO("Run on events/2xRoIs " << m_countTotalEvents << "/" << m_countTotalRoI); - ATH_MSG_INFO("Passed events/2xRoIs " << m_countPassedEvents << "/" << m_countPassedRoIs); - ATH_MSG_INFO("RoIs Passed MuMu pairs: " << m_countPassedmumuPairs); - ATH_MSG_INFO("RoIs Passed BsMass: " << m_countPassedBsMass); - ATH_MSG_INFO("RoIs Passed Vtx Fit: " << m_countPassedVtxFit); - - return HLT::OK; -} - -// Define the bins for error-monitoring histogram -#define ERROR_No_EventInfo 0 -#define ERROR_WrongNum_Input_TE 1 -#define ERROR_GetMuonFailed 2 -#define ERROR_AddTrack_Fails 3 -#define ERROR_CalcInvMass_Fails 4 -#define ERROR_BphysColl_Fails 5 - -// Define the bins for acceptance-monitoring histogram -#define ACCEPT_Input 0 -#define ACCEPT_GotMuons 1 -#define ACCEPT_InvMass_Cut 2 - - -/*------------------------------------------------------------------------------*/ -HLT::ErrorCode TrigL2MultiMuFex::acceptInputs(HLT::TEConstVec& inputTE, bool& pass) -/*------------------------------------------------------------------------------*/ -{ - - - ATH_MSG_DEBUG("Running TrigL2MultiMuFex::acceptInputS" ); - m_mon_Acceptance.push_back( ACCEPT_Input ); - - if ( m_acceptAll ) { - pass = true; - ATH_MSG_DEBUG("Accept property is set: taking all the events"); - return HLT::OK; - } - - // Processing timers - if ( timerSvc() ) m_BmmHypTot->start(); - - - // Check consistency of the number of input Trigger Elements - if (m_checkNinputTE && inputTE.size() != m_NInputMuon ) { - ATH_MSG_ERROR("Got wrong number of input TEs, expect " << m_NInputMuon << " got " << inputTE.size() ); - if ( timerSvc() ) { - m_BmmHypTot->stop(); - } - m_mon_Errors.push_back( ERROR_WrongNum_Input_TE ); - return HLT::BAD_JOB_SETUP; - } - - ATH_MSG_DEBUG(" Number of input TEs " << inputTE.size() ); - - pass = true; - return HLT::OK; -} - - - -/*----------------------------------------------------------------------------------------*/ -HLT::ErrorCode TrigL2MultiMuFex::hltExecute(HLT::TEConstVec& inputTE, HLT::TriggerElement* outputTE) -/*----------------------------------------------------------------------------------------*/ -{ - ATH_MSG_DEBUG(" In hltExecute " ); - - m_trigBphysColl = new xAOD::TrigBphysContainer; - xAOD::TrigBphysAuxContainer xAODTrigBphysAuxColl; - m_trigBphysColl->setStore(&xAODTrigBphysAuxColl); - - if (m_NInputMuon==3) { - ATH_MSG_DEBUG(" Call processTriMuon " ); - processTriMuon(inputTE); - } - - if ((m_trigBphysColl!=0) && (m_trigBphysColl->size() > 0)) { - // m_mon_Acceptance.push_back( ACCEPT_BphysColl_not_Empty ); - ATH_MSG_DEBUG("REGTEST: Store Bphys Collection size: " << m_trigBphysColl->size() ); - - HLT::ErrorCode sc = attachFeature(outputTE, m_trigBphysColl, "L2MultiMuFex" ); - if(sc != HLT::OK) { - ATH_MSG_WARNING("Failed to store trigBphys Collection" ); - m_mon_Errors.push_back( ERROR_BphysColl_Fails ); - m_trigBphysColl = nullptr; // delete it? - return HLT::ERROR; - } - } else { - ATH_MSG_DEBUG("REGTEST: no bphys collection to store " ); - delete m_trigBphysColl; - m_trigBphysColl = nullptr; - } - - - return HLT::OK; -} - - -void TrigL2MultiMuFex::processTriMuon(HLT::TEConstVec& inputTE) -{ - ATH_MSG_VERBOSE(" In processTriMuon " ); - - const xAOD::L2CombinedMuon *muon1(nullptr), *muon2(nullptr), *muon3(nullptr); - ElementLinkVector<xAOD::L2CombinedMuonContainer> l2combinedMuonEL[3]; - - if( m_checkNinputTE ){ - - const HLT::TriggerElement* te1 = inputTE[0]; - const HLT::TriggerElement* te2 = inputTE[1]; - const HLT::TriggerElement* te3 = inputTE[2]; - - - //if(getFeature(te1,muon1)!= HLT::OK) { - if(getFeaturesLinks<xAOD::L2CombinedMuonContainer,xAOD::L2CombinedMuonContainer>(te1,l2combinedMuonEL[0]) != HLT::OK - || !l2combinedMuonEL[0].size()) { - ATH_MSG_DEBUG("Failed to get muon Feature for TE 1" ); - m_mon_Errors.push_back( ERROR_GetMuonFailed ); - return; - } - muon1 = l2combinedMuonEL[0][0].isValid() ? *(l2combinedMuonEL[0][0]) : nullptr; - if ( muon1 == NULL ) { - ATH_MSG_DEBUG("NULL pointer of muon Feature for TE 1" ); - m_mon_Errors.push_back( ERROR_GetMuonFailed ); - return; - } - //if(getFeature(te2,muon2)!= HLT::OK) { - if(getFeaturesLinks<xAOD::L2CombinedMuonContainer,xAOD::L2CombinedMuonContainer>(te2,l2combinedMuonEL[1]) != HLT::OK - || !l2combinedMuonEL[1].size()) { - ATH_MSG_DEBUG("Failed to get muon Feature for TE 2" ); - m_mon_Errors.push_back( ERROR_GetMuonFailed ); - return; - } - muon2 = l2combinedMuonEL[1][0].isValid() ? *(l2combinedMuonEL[1][0]) : nullptr; - if ( muon2 == NULL ) { - ATH_MSG_DEBUG("NULL pointer of muon Feature for TE 2" ); - m_mon_Errors.push_back( ERROR_GetMuonFailed ); - return; - } - if(getFeaturesLinks<xAOD::L2CombinedMuonContainer,xAOD::L2CombinedMuonContainer>(te3,l2combinedMuonEL[2]) != HLT::OK - || !l2combinedMuonEL[2].size()) { - //if(getFeature(te3,muon3)!= HLT::OK) { - ATH_MSG_DEBUG("Failed to get muon Feature for TE 3" ); - m_mon_Errors.push_back( ERROR_GetMuonFailed ); - return; - } - muon3 = l2combinedMuonEL[2][0].isValid() ? *(l2combinedMuonEL[2][0]) : nullptr; - if ( muon3 == NULL ) { - ATH_MSG_DEBUG("NULL pointer of muon Feature for TE 3" ); - m_mon_Errors.push_back( ERROR_GetMuonFailed ); - return; - } - - }else{ - std::vector<ElementLinkVector<xAOD::L2CombinedMuonContainer> >vec_elv_muons ; - unsigned int nTEs = 3; - if( ! m_checkNinputTE ) nTEs = inputTE.size(); - - - for ( unsigned int i=0; i < nTEs; ++i) { - ElementLinkVector<xAOD::L2CombinedMuonContainer> elvmuon; - ATH_MSG_DEBUG("Try to retrieve L2CombinedMuon " << i ); - if(getFeaturesLinks<xAOD::L2CombinedMuonContainer,xAOD::L2CombinedMuonContainer>(inputTE[i], elvmuon)!=HLT::OK ) { - ATH_MSG_DEBUG("Failed to get L2CombinedMuon " << i << ", exiting" ); - m_mon_Errors.push_back( ERROR_GetMuonFailed ); - return; - } - if(msgLvl() <= MSG::DEBUG) ATH_MSG_DEBUG("Found L2CombinedMuon " << i << " Feature, size = " << elvmuon.size() ); - vec_elv_muons.push_back(elvmuon); - } // loop over each roi - - if( vec_elv_muons.size() > 3 ){ - if(msgLvl() <= MSG::DEBUG) ATH_MSG_DEBUG("More than 3 muons found, use first 3 out of " << vec_elv_muons.size() ); - }else if( vec_elv_muons.size() < 3 ){ - if(msgLvl() <= MSG::DEBUG) ATH_MSG_DEBUG("Less than 3 muons found " << vec_elv_muons.size() << " , exiting"); - m_mon_Errors.push_back( ERROR_GetMuonFailed ); - return; - } - muon1 = vec_elv_muons[0][0].isValid() ? *(vec_elv_muons[0][0]) : nullptr; - if ( muon1 == NULL ) { - ATH_MSG_DEBUG("NULL pointer of muon Feature for TE 1" ); - m_mon_Errors.push_back( ERROR_GetMuonFailed ); - return; - } - muon2 = vec_elv_muons[1][0].isValid() ? *(vec_elv_muons[1][0]) : nullptr; - if ( muon2 == NULL ) { - ATH_MSG_DEBUG("NULL pointer of muon Feature for TE 2" ); - m_mon_Errors.push_back( ERROR_GetMuonFailed ); - return; - } - muon3 = vec_elv_muons[2][0].isValid() ? *(vec_elv_muons[2][0]) : nullptr; - if ( muon3 == NULL ) { - ATH_MSG_DEBUG("NULL pointer of muon Feature for TE 3" ); - m_mon_Errors.push_back( ERROR_GetMuonFailed ); - return; - } - - } - - m_mon_Acceptance.push_back( ACCEPT_GotMuons ); - - - const ElementLink< xAOD::TrackParticleContainer >& ELidtrack1 = muon1->idTrackLink(); - const ElementLink< xAOD::TrackParticleContainer >& ELidtrack2 = muon2->idTrackLink(); - const ElementLink< xAOD::TrackParticleContainer >& ELidtrack3 = muon3->idTrackLink(); - if (!ELidtrack1.isValid()) { - ATH_MSG_DEBUG("Failed to get muon Feature for TE 3" ); - m_mon_Errors.push_back( ERROR_GetMuonFailed ); - return; - } - if (!ELidtrack2.isValid()) { - ATH_MSG_DEBUG("Failed to get muon Feature for TE 3" ); - m_mon_Errors.push_back( ERROR_GetMuonFailed ); - return; - } - if (!ELidtrack3.isValid()) { - ATH_MSG_DEBUG("Failed to get muon Feature for TE 3" ); - m_mon_Errors.push_back( ERROR_GetMuonFailed ); - return; - } - - - //monitoring - m_mon_MucombPt.push_back( muon1->pt() * muon1->charge() / CLHEP::GeV ); - m_mon_MucombPt.push_back( muon2->pt() * muon2->charge() / CLHEP::GeV ); - m_mon_MucombPt.push_back( muon3->pt() * muon3->charge() / CLHEP::GeV ); - m_mon_MutrkPt.push_back( (*ELidtrack1)->pt() / CLHEP::GeV ); - m_mon_MutrkPt.push_back( (*ELidtrack2)->pt() / CLHEP::GeV ); - m_mon_MutrkPt.push_back( (*ELidtrack3)->pt() / CLHEP::GeV ); - m_mon_MutrkEta.push_back( (*ELidtrack1)->eta() ); - m_mon_MutrkEta.push_back( (*ELidtrack2)->eta() ); - m_mon_MutrkEta.push_back( (*ELidtrack3)->eta() ); - m_mon_MutrkPhi.push_back( (*ELidtrack1)->phi0() ); - m_mon_MutrkPhi.push_back( (*ELidtrack2)->phi0() ); - m_mon_MutrkPhi.push_back( (*ELidtrack3)->phi0() ); - - if (m_NMassMuon ==2) { // check mass of opposite sign muon pairs - - m_passInvMass=false; - double Mass(0.); - if (muon1->charge() * muon2->charge() < 0) { - Mass = m_bphysHelperTool->invariantMass( *ELidtrack1,*ELidtrack2, m_massMuon,m_massMuon ); - m_mon_InvMass_comb.push_back(Mass/1000.); - } - checkInvMass2(muon1, muon2, Mass); - - - Mass = 0.; - if (muon2->charge() * muon3->charge() < 0) { - Mass = m_bphysHelperTool->invariantMass( *ELidtrack2,*ELidtrack3, m_massMuon,m_massMuon ); - m_mon_InvMass_comb.push_back(Mass/1000.); - } - checkInvMass2(muon2, muon3, Mass); - - - Mass = 0.; - if (muon1->charge() * muon3->charge() < 0) { - Mass = m_bphysHelperTool->invariantMass( *ELidtrack1,*ELidtrack3, m_massMuon,m_massMuon ); - m_mon_InvMass_comb.push_back(Mass/1000.); - } - checkInvMass2(muon1, muon3, Mass); - - if (m_passInvMass) { - m_mon_Acceptance.push_back( ACCEPT_InvMass_Cut ); - } - - } // 2 muon - - if (m_NMassMuon == 3) { // check mass of all 3 muons - m_passInvMass=false; - double Mass(0.); - Mass = m_bphysHelperTool->invariantMass( {*ELidtrack1,*ELidtrack2,*ELidtrack3}, {m_massMuon,m_massMuon,m_massMuon} ); - checkInvMass3(muon1, muon2,muon3, Mass); - - if (m_passInvMass) { - m_mon_Acceptance.push_back( ACCEPT_InvMass_Cut ); - } - } // 3 muon - - return; -} - -xAOD::TrigBphys* TrigL2MultiMuFex::checkInvMass2(const xAOD::L2CombinedMuon *muon1,const xAOD::L2CombinedMuon *muon2, double Mass) { - ATH_MSG_DEBUG(" In checkInvMass2, cuts " << m_lowerMassCut << " " << m_upperMassCut ); - if ( Mass < m_lowerMassCut || Mass > m_upperMassCut ) { - ATH_MSG_DEBUG("Mass : " << Mass << " cut failed " ); - return nullptr; - } - ATH_MSG_DEBUG("Mass cut passed, creat TrigL2Bphys " ); - m_passInvMass=true; - - xAOD::TrigBphys *trigPart = new xAOD::TrigBphys(); - m_trigBphysColl->push_back(trigPart); - trigPart->initialise(0, 0., 0., xAOD::TrigBphys::MULTIMU, Mass, xAOD::TrigBphys::L2); - - trigPart->addTrackParticleLink(muon1->idTrackLink()); - trigPart->addTrackParticleLink(muon2->idTrackLink()); - - - TrigVertex* trigVx = fitToVertex({muon1,muon2}); - if (trigVx) { - trigPart->setFitmass(trigVx->mass()); - trigPart->setFitchi2(trigVx->chi2()); - trigPart->setFitndof(trigVx->ndof()); - trigPart->setFitx(trigVx->x()); - trigPart->setFity(trigVx->y()); - trigPart->setFitz(trigVx->z()); - delete trigVx; - trigVx = nullptr; - } // if fitted - return trigPart; -} //checkInvMass2 (xAOD) - -xAOD::TrigBphys* TrigL2MultiMuFex::checkInvMass3(const xAOD::L2CombinedMuon *muon1,const xAOD::L2CombinedMuon *muon2, const xAOD::L2CombinedMuon *muon3,double Mass) { - ATH_MSG_DEBUG(" In checkInvMass3, cuts " << m_lowerMassCut << " " << m_upperMassCut ); - - if ( Mass < m_lowerMassCut || Mass > m_upperMassCut ) { - ATH_MSG_DEBUG("Mass : " << Mass << " cut failed " ); - return NULL; - } - ATH_MSG_DEBUG("Mass cut passed, creat TrigL2Bphys " ); - m_passInvMass=true; - - xAOD::TrigBphys *trigPart = new xAOD::TrigBphys(); - m_trigBphysColl->push_back(trigPart); - trigPart->initialise(0, 0., 0., xAOD::TrigBphys::MULTIMU, Mass, xAOD::TrigBphys::L2); - - trigPart->addTrackParticleLink(muon1->idTrackLink()); - trigPart->addTrackParticleLink(muon2->idTrackLink()); - trigPart->addTrackParticleLink(muon3->idTrackLink()); - - TrigVertex* trigVx = fitToVertex({muon1,muon2,muon3}); - if (trigVx) { - trigPart->setFitmass(trigVx->mass()); - trigPart->setFitchi2(trigVx->chi2()); - trigPart->setFitndof(trigVx->ndof()); - trigPart->setFitx(trigVx->x()); - trigPart->setFity(trigVx->y()); - trigPart->setFitz(trigVx->z()); - delete trigVx; - trigVx = nullptr; - } // if fitted - return trigPart; - - -} //checkInvMass3 (xAOD) - -TrigVertex* TrigL2MultiMuFex::fitToVertex(const std::vector<const xAOD::L2CombinedMuon*> & muons) { - // note, on sucessful return of the function, calling method owns the returned pointer; please delete it. - int counter(0); - std::vector<const xAOD::L2CombinedMuon*>::const_iterator itmu = muons.begin(); - std::vector<const xAOD::L2CombinedMuon*>::const_iterator itmu_end = muons.end(); - - if ( msgLvl() <= MSG::DEBUG ) { - msg() << MSG::DEBUG << "Just check track links... " << endmsg; - for (;itmu != itmu_end; ++itmu,++counter) { - msg() << MSG::DEBUG << "Track " << counter << " pT " << (*itmu)->idTrack()->pt() - << " eta " << (*itmu)->idTrack()->eta() << " phi " << (*itmu)->idTrack()->phi() - << " q " << (*itmu)->idTrack()->charge() << endmsg; - - } // for loop over muons - msg() << MSG::DEBUG << "Now do vertexing" << endmsg; - } - - bool addTracks = true; - itmu = muons.begin(); // reset the iterator to the start - counter =0; - - TrigL2Vertex* pL2V = new TrigL2Vertex(); - for (;itmu != itmu_end; ++itmu,++counter) { - // #FIXME - previous code used MuonFeature::IDTrack()::chi2() / are these equivalent ... ? - if ((*itmu)->idTrack()->chiSquared() > 1e7) { //#FIME JW don't hardcode - addTracks = false; - ATH_MSG_DEBUG("Failed to add track " << counter << " to vertexingTool" ); - m_mon_Errors.push_back( ERROR_AddTrack_Fails ); - // break; // may be useful to record all track outputs, so comment out for now - } // if bad chi2 - - if (m_vertexingTool->addTrack((*itmu)->idTrack()->track(),pL2V,Trk::muon).isFailure()) { - ATH_MSG_DEBUG("Failed to add track " << counter << " to vertexingTool" ); - addTracks = false; - m_mon_Errors.push_back( ERROR_AddTrack_Fails ); - } // if addTrack - - } // loop over muons - - if (!addTracks) { - ATH_MSG_DEBUG("Bad tracks in fit input; return before fitter" ); - delete pL2V; - pL2V = nullptr; - return nullptr; - } - - - if (m_L2vertFitter->fit(pL2V).isFailure()) { - ATH_MSG_DEBUG("TrigL2VertexFitter failed" ); - delete pL2V; - pL2V = nullptr; - return nullptr; - } // if failed fit - - if (m_vertexingTool->calculateInvariantMass(pL2V).isFailure()) { - m_mon_Errors.push_back( ERROR_CalcInvMass_Fails ); - ATH_MSG_DEBUG("calculateInvariantMass failed" ); - delete pL2V; - pL2V = nullptr; - return nullptr; - } // failed inv mass #FIXME - assumes some mass hypothesis?? - - TrigVertex* p_mumuV = m_vertexingTool->createTrigVertex(pL2V); - - delete pL2V; - pL2V = nullptr; - - ATH_MSG_DEBUG("Sucessful fit" ); - double chi2prob = 0.; - chi2prob = 1.0 - Genfun::CumulativeChiSquare(p_mumuV->ndof())(p_mumuV->chi2()); - - if ( msgLvl() <= MSG::DEBUG ) { - ATH_MSG_DEBUG("REGTEST: mumu vertex Fit: x= y= z=" << p_mumuV->x() << " " << p_mumuV->y() << " " << p_mumuV->z() ); - ATH_MSG_DEBUG("REGTEST: mumu mass = " << p_mumuV->mass() ); - if (p_mumuV->massVariance() !=0) { - ATH_MSG_DEBUG("REGTEST: mumu mass pull = " << (p_mumuV->mass()-BSMASS)/p_mumuV->massVariance() ); - } else { - ATH_MSG_DEBUG("REGTEST: MuMu mass variance is 0 can't calculate the pull " ); - } - - ATH_MSG_DEBUG("REGTEST: Chi2 vtx fit = " << p_mumuV->chi2() << ", prob. " << chi2prob ); - ATH_MSG_DEBUG("SigmaX = SigmaY = SigmaZ = " << sqrt(p_mumuV->cov()[0]) << " " << sqrt(p_mumuV->cov()[2]) << " " << sqrt(p_mumuV->cov()[5]) ); - - } - m_mon_FitMass.push_back(p_mumuV->mass()/1000.); - m_mon_Chi2toNDoF.push_back(p_mumuV->chi2()/ p_mumuV->ndof()); -// m_mon_FitTotalPt.push_back(p_mumuV->getMotherTrack()->pT()); // crashes -- no mother particle is created? - m_mon_FitVtxR.push_back( pow(p_mumuV->x(),2) + pow(p_mumuV->y(),2) ); - m_mon_FitVtxZ.push_back( p_mumuV->z() ); - - return p_mumuV; -} //fitToVertex diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2MultiMuFex.h b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2MultiMuFex.h deleted file mode 100644 index 8fe510b81e0dbd196fb69b02f3145af3bb9b21d6..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2MultiMuFex.h +++ /dev/null @@ -1,145 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// ******************************************************************* -// -// NAME: TrigL2MultiMuFex.h -// PACKAGE: Trigger/TrigHypothesis/TrigBphysHypo -// AUTHOR: Sergey Sivoklokov -// -// ******************************************************************* - -#ifndef TRIG_TrigL2MultiMuCombo_H -#define TRIG_TrigL2MultiMuCombo_H - -#include <string> - -#include "TrigInterfaces/ComboAlgo.h" - -#include "TrigInDetToolInterfaces/ITrigVertexFitter.h" -#include "TrigInDetToolInterfaces/ITrigL2VertexFitter.h" - -#include "TrigTimeAlgs/TrigTimerSvc.h" - -#include "Constants.h" - -#include "xAODTrigBphys/TrigBphysContainer.h" -#include "xAODTrigBphys/TrigBphysAuxContainer.h" -#include "xAODTrigBphys/TrigBphys.h" -#include "xAODTrigMuon/L2CombinedMuon.h" -#include "xAODTrigMuon/L2CombinedMuonContainer.h" - - -class TriggerElement; -//class CombinedMuonFeature; - -class ITrigVertexFitter; -class ITrigL2VertexFitter; -class ITrigVertexingTool; - -class TrigBphysHelperUtilsTool; - - -class TrigL2MultiMuFex: public HLT::ComboAlgo { - - public: - - TrigL2MultiMuFex(const std::string & name, ISvcLocator* pSvcLocator); - ~TrigL2MultiMuFex(); - - HLT::ErrorCode hltInitialize(); - HLT::ErrorCode hltFinalize(); - HLT::ErrorCode hltExecute(HLT::TEConstVec& inputTE, HLT::TriggerElement* outputTE); - HLT::ErrorCode acceptInputs(HLT::TEConstVec& inputTE, bool& pass ); // TODO: move all to hltExecute ? - - private: - ToolHandle <TrigBphysHelperUtilsTool> m_bphysHelperTool; - - // Invariant mass helper calculators (TODO: move to InvMass.cxx tool-box) - // double invariantMass(const CombinedMuonFeature* mu1, const CombinedMuonFeature* mu2); - //double invariantMass(const CombinedMuonFeature* mu1, const MuonFeature* mu2); - - void processTriMuon(HLT::TEConstVec& inputTE); -// double getInvMass2(const CombinedMuonFeature *muon1,const CombinedMuonFeature *muon2); -// double getInvMass3(const CombinedMuonFeature *muon1,const CombinedMuonFeature *muon2,const CombinedMuonFeature *muon3); -// TrigL2Bphys* checkInvMass2(const CombinedMuonFeature *muon1,const CombinedMuonFeature *muon2, double Mass); -// TrigL2Bphys* checkInvMass3(const CombinedMuonFeature *muon1,const CombinedMuonFeature *muon2, const CombinedMuonFeature *muon3, double Mass); - - xAOD::TrigBphys* checkInvMass2(const xAOD::L2CombinedMuon *muon1,const xAOD::L2CombinedMuon *muon2, double Mass); - xAOD::TrigBphys* checkInvMass3(const xAOD::L2CombinedMuon *muon1,const xAOD::L2CombinedMuon *muon2, const xAOD::L2CombinedMuon *muon3,double Mass); - - TrigVertex* fitToVertex(const std::vector<const xAOD::L2CombinedMuon*> & muons); - - // Configurable properties - mass window cuts - float m_lowerMassCut; - float m_upperMassCut; - - // Configurable properties - boolean switches - bool m_doVertexFit; - bool m_acceptAll; - bool m_oppositeCharge; - unsigned int m_NInputMuon; - int m_NMassMuon; - bool m_checkNinputTE; - - // Configurable properties - vertexing tools - ToolHandle<ITrigL2VertexFitter> m_L2vertFitter; - ToolHandle<ITrigVertexingTool> m_vertexingTool; - - // Timers - TrigTimer* m_BmmHypTot; - TrigTimer* m_BmmHypVtx; - - // Counters - int m_lastEvent; - int m_lastEventPassed; - unsigned int m_countTotalEvents; - unsigned int m_countTotalRoI; - unsigned int m_countPassedEvents; - unsigned int m_countPassedRoIs; - unsigned int m_countPassedmumuPairs; - unsigned int m_countPassedBsMass; - unsigned int m_countPassedVtxFit; - - bool m_passInvMass; - - // Output collections - xAOD::TrigBphysContainer* m_trigBphysColl; - - // Monitored variables - std::vector<int> m_mon_Errors; - std::vector<int> m_mon_Acceptance; - std::vector<float> m_mon_ROIEta; - std::vector<float> m_mon_ROIPhi; - std::vector<float> m_mon_Roi1Roi2dEta; - std::vector<float> m_mon_Roi1Roi2dPhi; - std::vector<float> m_mon_Roi1Roi2dR; - // - two combined muons - std::vector<float> m_mon_MucombROIdR; - std::vector<float> m_mon_MucombTrkdR; - std::vector<float> m_mon_MucombPt; - std::vector<float> m_mon_MutrkPt; - std::vector<float> m_mon_MutrkPt_wideRange; - std::vector<float> m_mon_MutrkEta; - std::vector<float> m_mon_MutrkPhi; - std::vector<float> m_mon_Mutrk1Mutrk2dEta; - std::vector<float> m_mon_Mutrk1Mutrk2dPhi; - std::vector<float> m_mon_Mutrk1Mutrk2dR; - std::vector<float> m_mon_SumPtMutrk12; - std::vector<float> m_mon_InvMass_comb; - std::vector<float> m_mon_InvMass_comb_wideRange; - std::vector<float> m_mon_FitMass; - std::vector<float> m_mon_FitMass_wideRange; - std::vector<float> m_mon_InvMass_comb_okFit; - std::vector<float> m_mon_Chi2toNDoF; - std::vector<float> m_mon_Chi2toNDoFProb; - std::vector<float> m_mon_FitTotalPt; - std::vector<float> m_mon_SumPtMutrk12_okFit; - std::vector<float> m_mon_FitVtxR; - std::vector<float> m_mon_FitVtxZ; - - double m_massMuon; -}; - -#endif diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2MultiMuHypo.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2MultiMuHypo.cxx deleted file mode 100644 index fe7bfa2d22e25143ef26e8ce7ecc564a31e9f27b..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2MultiMuHypo.cxx +++ /dev/null @@ -1,219 +0,0 @@ -// -*- C++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/************************************************************************** - ** - ** File: Trigger/TrigHypothesis/TrigBPhysHypo/TrigL2MultiMuHypo.cxx - ** - ** Description: L2 hypothesis algorithms for 3 or 4 muon events - ** Create TrigL2Bphys - ** - ** Author: J.Kirk - ** - ** - **************************************************************************/ - - -#include "TrigL2MultiMuHypo.h" - -#include <math.h> -#include "xAODTrigger/TrigPassBits.h" - -#include "TrigBphysHelperUtilsTool.h" -// additions of xAOD objects -#include "xAODTrigBphys/TrigBphys.h" -#include "xAODTrigBphys/TrigBphysContainer.h" -//#include "xAODTrigBphys/TrigBphysAuxContainer.h" - -//class ISvcLocator; - -TrigL2MultiMuHypo::TrigL2MultiMuHypo(const std::string & name, ISvcLocator* pSvcLocator): - HLT::HypoAlgo(name, pSvcLocator) -,m_bphysHelperTool("TrigBphysHelperUtilsTool") -,m_lastEvent(-1) -,m_lastEventPassed(-1) -,m_countTotalEvents(0) -,m_countTotalRoI(0) -,m_countPassedEvents(0) -,m_countPassedRoIs(0) -,m_countPassedBsMass(0) -,m_countPassedChi2Cut(0) -{ - - // Read cuts - declareProperty("AcceptAll", m_acceptAll=true); - declareProperty("OppositeSign", m_oppositeCharge=true); - declareProperty("LowerMassCut", m_lowerMassCut=4000.0); - declareProperty("UpperMassCut", m_upperMassCut=6000.0); - declareProperty("ApplyUpperMassCut", m_ApplyupperMassCut=true); - declareProperty("ApplyChi2Cut", m_ApplyChi2Cut=true); - declareProperty("Chi2VtxCut", m_Chi2VtxCut=20.0); - - declareMonitoredVariable( "CutCounter", m_mon_cutCounter); - declareMonitoredStdContainer("MuMumass", m_mon_MuMumass , AutoClear); - - -} - -TrigL2MultiMuHypo::~TrigL2MultiMuHypo() -{ } - -HLT::ErrorCode TrigL2MultiMuHypo::hltInitialize() -{ - - ATH_MSG_DEBUG("AcceptAll = " << (m_acceptAll==true ? "True" : "False") ); - ATH_MSG_DEBUG("OppositeCharge = " << (m_oppositeCharge==true ? "True" : "False") ); - ATH_MSG_DEBUG("LowerMassCut = " << m_lowerMassCut ); - ATH_MSG_DEBUG("UpperMassCut = " << m_upperMassCut ); - ATH_MSG_DEBUG("ApplyUpperMassCut = " << m_ApplyupperMassCut ); - - m_lastEvent = -1; - m_lastEventPassed = -1; - m_countTotalEvents =0; - m_countTotalRoI =0; - m_countPassedEvents =0; - m_countPassedRoIs =0; - m_countPassedBsMass =0; - m_countPassedChi2Cut =0; - - if (m_bphysHelperTool.retrieve().isFailure()) { - ATH_MSG_ERROR("Can't find TrigBphysHelperUtilsTool" ); - return HLT::BAD_JOB_SETUP; - } else { - ATH_MSG_DEBUG("TrigBphysHelperUtilsTool found" ); - } - - return HLT::OK; -} - -HLT::ErrorCode TrigL2MultiMuHypo::hltFinalize() -{ - ATH_MSG_INFO("in finalize()" ); - ATH_MSG_INFO("|----------------------- SUMMARY FROM TrigL2MultiMuHypo -------------|" ); - ATH_MSG_INFO("Run on events/2xRoIs " << m_countTotalEvents << "/" << m_countTotalRoI ); - ATH_MSG_INFO("Passed events/2xRoIs " << m_countPassedEvents << "/" << m_countPassedRoIs ); - ATH_MSG_INFO("RoIs Passed BsMass: " << m_countPassedBsMass ); - - return HLT::OK; -} - -//------------------------------------------------------------------------------------- -HLT::ErrorCode TrigL2MultiMuHypo::hltExecute(const HLT::TriggerElement* outputTE, bool& pass) -{ - - //const double BSMASS = 5369.3; - //const double BDMASS = 5279.2; - - //bool PassedMuMuPair=false; - bool PassedBsMass=false; - bool PassedChi2Cut=false; - bool result = false; - m_mon_cutCounter = -1; - // Retrieve event info - //int IdRun = 0; - int IdEvent = 0; - - // event info - uint32_t runNumber(0), evtNumber(0), lbBlock(0); - if (m_bphysHelperTool->getRunEvtLb( runNumber, evtNumber, lbBlock).isFailure()) { - ATH_MSG_ERROR("Error retriving EventInfo" ); - } - //IdRun = runNumber; - IdEvent = evtNumber; - - - if (IdEvent != m_lastEvent) { - m_countTotalEvents++; - m_lastEvent=IdEvent; - } - m_countTotalRoI++; - - - // Accept-All mode: temporary patch; should be done with force-accept - if (m_acceptAll) { - pass = true; - //return HLT::OK; - } - ATH_MSG_DEBUG("AcceptAll is set to : " << (m_acceptAll ? "True, taking all events " : "False, applying selection" )); - -// create vector for TrigL2Bphys particles - const xAOD::TrigBphysContainer* trigBphysColl(nullptr); - - HLT::ErrorCode status = getFeature(outputTE, trigBphysColl, "L2MultiMuFex"); - if ( status != HLT::OK ) { - ATH_MSG_WARNING("Failed to get TrigBphysics collection L2MultiMuFex" ); - return HLT::OK; - } - - ATH_MSG_DEBUG(" Retrieved Bphys collection trigBphysColl = " << trigBphysColl ); - if ( trigBphysColl == 0 ) { - ATH_MSG_DEBUG("No Bphys particles to analyse, leaving!" ); - - return HLT::OK; - } - - ATH_MSG_DEBUG("Got TrigBphys collection with " << trigBphysColl->size() << " TrigBphys particles " ); - // if no Bphys particles were found, just leave TrigBphysColl. empty and leave - if ( trigBphysColl->size() == 0 ) { - ATH_MSG_DEBUG("No Bphys particles to analyse, leaving!" ); - return HLT::OK; - } - - - m_mon_cutCounter = 0; - - //TrigPassBits *bits = HLT::makeTrigPassBits(trigBphysColl); - std::unique_ptr<xAOD::TrigPassBits> xBits = xAOD::makeTrigPassBits<xAOD::TrigBphysContainer>(trigBphysColl); - - // now loop over Bphys particles to see if one passes cuts - for (xAOD::TrigBphysContainer::const_iterator bphysIter = trigBphysColl->begin(); bphysIter != trigBphysColl->end(); ++bphysIter) { - - if ((*bphysIter)->particleType() == xAOD::TrigBphys::MULTIMU ) { - ATH_MSG_DEBUG("Got Bphys particle with mass " << (*bphysIter)->mass() << " and chi2 " << (*bphysIter)->fitchi2() ); - float BsMass = (*bphysIter)->mass(); - bool thisPassedBsMass = (m_lowerMassCut < BsMass && (BsMass < m_upperMassCut || (!m_ApplyupperMassCut))); - PassedBsMass |= thisPassedBsMass; - - bool thisPassedChi2Cut = ((!m_ApplyChi2Cut) || ((*bphysIter)->fitchi2() < m_Chi2VtxCut && (*bphysIter)->fitchi2() != -99) ); - PassedChi2Cut |= thisPassedBsMass; - if (thisPassedBsMass) m_mon_MuMumass.push_back((BsMass*0.001)); - - if( thisPassedBsMass && thisPassedChi2Cut ) - { - //HLT::markPassing(bits, *bphysIter, trigBphysColl); - xBits->markPassing((*bphysIter),trigBphysColl,true); - } - } - } - - if (PassedBsMass) { - m_countPassedBsMass++; - m_mon_cutCounter++; - } - if (PassedChi2Cut) { m_countPassedChi2Cut++; m_mon_cutCounter++; } - if ( PassedBsMass && PassedChi2Cut ) { - result = true; - } - - if (result) { - m_countPassedRoIs++; - if (IdEvent!= m_lastEventPassed) { - m_countPassedEvents++; - m_lastEventPassed=IdEvent; - } - pass=true; - } - - // store result - //if ( attachBits(outputTE, bits) != HLT::OK ) { - // ATH_MSG_ERROR("Problem attaching TrigPassBits! " ); - //} - if(attachFeature(outputTE, xBits.release(),"passbits") != HLT::OK) - ATH_MSG_ERROR("Could not store TrigPassBits! "); - - - return HLT::OK; -} diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2MultiMuHypo.h b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2MultiMuHypo.h deleted file mode 100644 index 7edefeee3cfbbc44688d73a5a27e3ff121c9a35c..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2MultiMuHypo.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/************************************************************************** - ** - ** File: Trigger/TrigHypothesis/TrigBphysHypo/TrigL2MultiMuFex.h - ** - ** Description: L2 hypothesis algorithms for B0_s -> mu+ mu- - ** Create TrigL2Bphys - ** - ** Author: S.Sivoklokov (on the base of Carlo Schiavi example) - ** - ** Created: 05.092006 - ** Modified: - ** - **************************************************************************/ - -#ifndef TRIG_TrigL2MultiMuHypo_H -#define TRIG_TrigL2MultiMuHypo_H - -// standard stuff -#include <string> -#include "TrigInterfaces/HypoAlgo.h" - -class TrigBphysHelperUtilsTool; - - -class TrigL2MultiMuHypo: public HLT::HypoAlgo { - - public: - TrigL2MultiMuHypo(const std::string & name, ISvcLocator* pSvcLocator); - ~TrigL2MultiMuHypo(); - HLT::ErrorCode hltInitialize(); - //StatusCode execute(); - HLT::ErrorCode hltFinalize(); - HLT::ErrorCode hltExecute(const HLT::TriggerElement* outputTE, bool& pass); - - private: - ToolHandle <TrigBphysHelperUtilsTool> m_bphysHelperTool; - - - // Mass window cuts - bool m_oppositeCharge; - float m_lowerMassCut; - float m_upperMassCut; - bool m_ApplyupperMassCut; - bool m_ApplyChi2Cut; - float m_Chi2VtxCut; - - // to set Accept-All mode: should be done with force-accept when possible - bool m_acceptAll; - - - //Counters - int m_lastEvent; - int m_lastEventPassed; - unsigned int m_countTotalEvents; - unsigned int m_countTotalRoI; - unsigned int m_countPassedEvents; - unsigned int m_countPassedRoIs; - unsigned int m_countPassedBsMass; - unsigned int m_countPassedChi2Cut; - - /* monitored variables */ - int m_mon_cutCounter; - std::vector<float> m_mon_MuMumass; - -}; - -#endif diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigMultiTrkFex.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigMultiTrkFex.cxx deleted file mode 100644 index 019fa776baacff1d488aacc07ad6baa7fc35e4d2..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigMultiTrkFex.cxx +++ /dev/null @@ -1,724 +0,0 @@ -// -*- C++ -*- - -/* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -*/ - -/************************************************************************** - ** - ** File: Trigger/TrigHypothesis/TrigBphysHypo/TrigL2MultiMuFex.cxx - ** - ** Description: EF hypothesis algorithms for 3mu and 4mu signatures - ** - ** author Olya Igonkina (Nikhef) - ** - **************************************************************************/ - -#include "TrigMultiTrkFex.h" -#include "TrigBphysHelperUtilsTool.h" - -#include "xAODBase/IParticle.h" -#include "xAODTracking/TrackParticle.h" -#include "xAODMuon/MuonContainer.h" -#include "TrigTimeAlgs/TrigTimerSvc.h" -#include "FourMomUtils/P4Helpers.h" - - -// Define the bins for acceptance-monitoring histogram -#define ACCEPT_Input 0 -#define ACCEPT_hltExecute 1 -#define ACCEPT_PassNL2SAMuons 2 -#define ACCEPT_PassNL2CombMuons 3 -#define ACCEPT_PassNEFMuons 4 -#define ACCEPT_PassNTracks 5 -#define ACCEPT_HighPtTrack 6 -#define ACCEPT_NTrkCharge 7 -#define ACCEPT_NTrkMass 8 -#define ACCEPT_NTrkVertexChi2 9 -#define ACCEPT_PairCharge 10 -#define ACCEPT_PairMass 11 -#define ACCEPT_RecordedCollection 12 - -#define ERROR_AlgorithmProblem 0 -#define ERROR_BphysColl_Fails 1 -#define ERROR_BphysTrackColl_Fails 2 - - -TrigMultiTrkFex::TrigMultiTrkFex(const std::string & name, ISvcLocator* pSvcLocator): - HLT::AllTEAlgo(name, pSvcLocator) - , m_bphysHelperTool("TrigBphysHelperUtilsTool") - , m_BmmHypTot(0) - , m_maxNOutputObject(5000) - , m_trackCollectionKey() - , m_outputTrackCollectionKey() - , m_bphysCollectionKey() - , m_nTrk (2) - , m_nTrkQ (-1) - , m_nTrkVertexChi2 (-1) - , m_trkMass(139.57018) // pion - , m_ptTrkMin() - , m_nTrkMassMin() // this has to be in pair - , m_nTrkMassMax() - , m_diTrkMassMin() // this has to be in pair - , m_diTrkMassMax() - , m_nEfMuon(0) - , m_nL2CombMuon (0) - , m_nL2SAMuon (0) - , m_ptMuonMin() - , m_mindR(0.005) - ,m_acceptAll(false) - //counters - , m_countTotalEvents(0) - , m_countPassedEvents(0) - , m_countPassedCombination(0) - -{ - - // Read cuts - - declareProperty("AcceptAll", m_acceptAll=true); - declareProperty("maxNOutputObject", m_maxNOutputObject = 5000 ); // set this to -1 to avoid cut completely - declareProperty("trackCollectionKey", m_trackCollectionKey = "" ); - declareProperty("outputTrackCollectionKey", m_outputTrackCollectionKey = "MultiTrkFex" ); - declareProperty("bphysCollectionKey", m_bphysCollectionKey = "MultiTrkFex" ); - declareProperty("nTrk" , m_nTrk = 2 ); - declareProperty("nTrkCharge" , m_nTrkQ = -1 ); - declareProperty("nTrkVertexChi2" , m_nTrkVertexChi2 = -1 ); - declareProperty("trkMass" , m_trkMass = 139.57018 ); - declareProperty("ptTrkMin" , m_ptTrkMin ); - declareProperty("diTrkMassMin" , m_diTrkMassMin ); - declareProperty("diTrkMassMax" , m_diTrkMassMax ); - declareProperty("diTrkCharge" , m_diTrkQ = 0 ); - declareProperty("nTrkMassMin" , m_nTrkMassMin ); - declareProperty("nTrkMassMax" , m_nTrkMassMax ); - declareProperty("nEfMuon" , m_nEfMuon = 0 ); - declareProperty("nL2CombMuon" , m_nL2CombMuon = 0 ); - declareProperty("nL2SAMuon" , m_nL2SAMuon =0 ); - declareProperty("ptMuonMin" , m_ptMuonMin ); - declareProperty("overlapdR" , m_mindR = 0.01 ); - - declareMonitoredStdContainer("Errors" , m_mon_Errors , AutoClear); - declareMonitoredStdContainer("Acceptance" , m_mon_Acceptance , AutoClear); - declareMonitoredStdContainer("NTrkMass", m_mon_NTrkMass , AutoClear ); - declareMonitoredStdContainer("NTrkFitMass", m_mon_NTrkFitMass , AutoClear ); - declareMonitoredStdContainer("NTrkChi2", m_mon_NTrkChi2 , AutoClear ); - declareMonitoredStdContainer("PairMass", m_mon_pairMass , AutoClear ); - declareMonitoredVariable("NTrk_all", m_mon_NTrk); - declareMonitoredVariable("NTrk_highpt", m_mon_highptNTrk); - declareMonitoredVariable("NTrkHighPt_accepted", m_mon_accepted_highptNTrk); - declareMonitoredVariable("NPair_all", m_mon_NPair); - declareMonitoredVariable("NPair_accepted", m_mon_acceptedNPair); - declareMonitoredVariable("logNCombinations_processed", m_mon_NComb); - declareMonitoredVariable("logNCombinations_accepted", m_mon_acceptedNComb); -} - -TrigMultiTrkFex::~TrigMultiTrkFex() -{ } - - - - -bool TrigMultiTrkFex::passNTracks(int nObjMin, - const std::vector<float> & ptObjMin, - std::vector<std::vector<HLT::TriggerElement*> >& inputTE , - std::vector<ElementLink<xAOD::TrackParticleContainer> > & outVec, - const std::string& collectionKey, - float mindR) - -{ - if( nObjMin <= 0 ) return true; - ElementLinkVector<xAOD::TrackParticleContainer> inVecColl; - outVec.clear(); - - float mindR2 = mindR*mindR; - - unsigned int nTEs = inputTE.size(); - for ( unsigned int i=0; i < nTEs; ++i) { - ATH_MSG_DEBUG( " TE input array " << i ); - unsigned int mTEs = inputTE[i].size(); - for ( unsigned int j=0; j < mTEs; ++j) { - ATH_MSG_DEBUG( " TE input " << j ); - if(getFeaturesLinks<xAOD::TrackParticleContainer,xAOD::TrackParticleContainer>(inputTE[i][j], inVecColl, collectionKey)==HLT::OK ) { - ATH_MSG_DEBUG( "got track container " << inVecColl.size() ); - for( const ElementLink<xAOD::TrackParticleContainer> efmu : inVecColl){ //auto const & inVec: inVecColl ) - // check for overlap - bool found = false; - for(const auto& part : outVec ){ - if( (*part)->charge() * (*efmu)->charge() < 0 ) continue; - double deta = (*part)->eta() - (*efmu)->eta(); - double dphi = (*part)->phi() - (*efmu)->phi(); - double deltaR2 = deta*deta +dphi*dphi; - if( deltaR2 <= mindR2){ - found = true; - ATH_MSG_DEBUG( "Duplicated track pt/eta/phi/q " - << (*efmu)->pt()<< " / " - << (*efmu)->eta()<< " / " - << (*efmu)->phi()<< " / " - << (*efmu)->charge()<< " skip " <<deltaR2 ); - } - } - if( !found ) { - outVec.push_back(efmu); - ATH_MSG_DEBUG( "Found track pt/eta/phi/q " - << (*efmu)->pt()<< " / " - << (*efmu)->eta()<< " / " - << (*efmu)->phi()<< " / " - << (*efmu)->charge()); - } - }//}// end loop over muons in one TE - } // end getFeaturesLinks - }} // end loop over all TEs - - //=== check if it is enough muons - if( (int)outVec.size() < nObjMin ) { - ATH_MSG_DEBUG("Rejecting: "<<" #Ntracks= " << outVec.size() << " while need "<< nObjMin ); - return false; - } - //== check that muons have correct pts - //OI easy sorting does not seem to work - std::sort( std::begin(outVec), std::end(outVec), sortTracks); - - unsigned int Ncheck = std::min( nObjMin, int(ptObjMin.size()) ); - bool failMuonPt = false; - for ( unsigned int ipt=0; ipt < Ncheck; ++ipt) { - float pt = (*outVec[ipt])->pt(); - // check if value in GeV or MeV, if it was >350 GeV and multiplied by 1000, it does not matter - if( pt < 350. && pt>0.01 ) pt *= 1000.; - if( pt < ptObjMin[ipt] ) failMuonPt = true; - } - if( failMuonPt ){ - ATH_MSG_DEBUG( "Fail track pt cut" ); - return false; - } - // here would be good to limit number of objects to the minimum - - return true; -} - -HLT::ErrorCode TrigMultiTrkFex::hltInitialize() -{ - m_countTotalEvents = 0; - m_countPassedEvents = 0; - m_countPassedCombination = 0; - - if (msgLvl() <= MSG::INFO) { - msg() << MSG::INFO << "AcceptAll = " << (m_acceptAll==true ? "True" : "False") << endmsg; - - std::sort(m_ptTrkMin.begin(),m_ptTrkMin.end(), std::greater<float>()); - std::sort(m_ptMuonMin.begin(),m_ptMuonMin.end(), std::greater<float>()); - - if( m_trackCollectionKey != "" ) msg() << MSG::INFO << "trackCollectionKey"<< m_trackCollectionKey << endmsg; - msg() << MSG::INFO << "Select " << m_nTrk << " tracks " << endmsg; - msg() << MSG::INFO << " with pts "; - for(float pt : m_ptTrkMin) msg() << MSG::INFO << pt<<", "; - msg() << MSG::INFO << endmsg; - } - - if( m_nTrkMassMin.size() != m_nTrkMassMax.size() ){ - ATH_MSG_ERROR(" Unequal size of n-track mass cuts, please fix" ); - return HLT::BAD_JOB_SETUP; - } - if( m_diTrkMassMin.size() != m_diTrkMassMax.size() ){ - ATH_MSG_ERROR(" Unequal size of di-track mass cuts, please fix" ); - return HLT::BAD_JOB_SETUP; - } - - if( m_nTrkQ >= 0 ) { - ATH_MSG_INFO(" N-track system has to have charge "<< m_nTrk); - if( m_nTrkQ%2 != m_nTrk%2 ) { - ATH_MSG_ERROR(" nTrkCharge parameter makes no sense "); - return HLT::BAD_JOB_SETUP; - } - } - - if( m_nTrkVertexChi2 >= 0 ) { - ATH_MSG_INFO(" N-track system has to have vertex chi2 "<< m_nTrkVertexChi2); - } - - if (msgLvl() <= MSG::INFO && m_nTrkMassMin.size() > 0 ){ - msg() << MSG::INFO << "Require N-track Mass in "; - for( size_t imass = 0; imass < m_nTrkMassMin.size(); ++imass ){ - msg() << MSG::INFO << "[" << m_nTrkMassMin[imass]<<","<<m_nTrkMassMax[imass] <<"]"; - } - msg() << MSG::INFO << endmsg; - } - - if (msgLvl() <= MSG::INFO && m_diTrkMassMin.size() > 0 ){ - msg() << MSG::INFO << "Require di-track Mass in "; - for( size_t imass = 0; imass < m_diTrkMassMin.size(); ++imass ){ - msg() << MSG::INFO << "[" << m_diTrkMassMin[imass]<<","<<m_diTrkMassMax[imass] <<"]"; - } - msg() << MSG::INFO << endmsg; - if( m_diTrkQ >= 0 ) { - msg() << MSG::INFO << " pair has to have charge "<< m_diTrkQ <<endmsg; - if( m_diTrkQ != 0 && m_diTrkQ != 2 ) { - ATH_MSG_ERROR(" diTrkCharge parameter makes no sense "); - return HLT::BAD_JOB_SETUP; - } - } - } - if (msgLvl() <= MSG::INFO) { - if( m_nEfMuon ) msg() << MSG::INFO << "require at least "<< m_nEfMuon <<" EF Muons" << endmsg; - if( m_nL2CombMuon ) msg() << MSG::INFO << "require at least "<< m_nL2CombMuon <<" EF Muons" << endmsg; - if( m_nL2SAMuon ) msg() << MSG::INFO << "require at least "<< m_nL2SAMuon <<" EF Muons" << endmsg; - if( m_nEfMuon ||m_nL2CombMuon || m_nL2SAMuon ){ - msg() << MSG::INFO << " Muons should have pts "; - for(float pt : m_ptMuonMin) msg() << MSG::INFO << pt <<", "; - msg() << MSG::INFO << endmsg; - } - msg() << MSG::INFO << " Overlap removal dR<"<<m_mindR << endmsg; - if ( m_maxNOutputObject > 0 ){ - msg() << MSG::INFO << " Will consider only first " << m_maxNOutputObject << " good combinations " << endmsg; - } - } - - - if ( timerSvc() ) { - m_BmmHypTot = addTimer("TrigMultiTrkFex"); - } - - if (m_bphysHelperTool.retrieve().isFailure()) { - ATH_MSG_ERROR("Can't find TrigBphysHelperUtilsTool" ); - return HLT::BAD_JOB_SETUP; - } else { - ATH_MSG_DEBUG("TrigBphysHelperUtilsTool found" ); - } - - - - return HLT::OK; -} - -HLT::ErrorCode TrigMultiTrkFex::hltFinalize() -{ - ATH_MSG_INFO("in finalize()" ); - MsgStream log(msgSvc(), name()); - - ATH_MSG_INFO("|----------------------- SUMMARY FROM TrigMultiTrkFex -------------|" ); - ATH_MSG_INFO("Run on events " << m_countTotalEvents ); - ATH_MSG_INFO("Passed events " << m_countPassedEvents); - ATH_MSG_INFO("Passed combinations " << m_countPassedCombination); - - return HLT::OK; -} - - -HLT::ErrorCode TrigMultiTrkFex::hltExecute(std::vector<std::vector<HLT::TriggerElement*> >& inputTE, unsigned int output) -{ - // start monitoring - beforeExecMonitors().ignore(); - - m_mon_Errors.clear(); - m_mon_Acceptance.clear(); - m_mon_NTrk = 0; - m_mon_highptNTrk = 0; - m_mon_accepted_highptNTrk = 0; - m_mon_NTrkMass.clear(); - m_mon_NTrkFitMass.clear(); - m_mon_NTrkChi2.clear(); - m_mon_NPair = 0; - m_mon_acceptedNPair = 0; - m_mon_pairMass.clear(); - - m_mon_acceptedNComb = 0; - m_mon_NComb = 0; - - m_mon_Acceptance.push_back( ACCEPT_hltExecute ); - ATH_MSG_DEBUG(" In TrigMultiTrk hltExecute" ); - - - - //unsigned int nTEs = inputTE.size(); - - // here we loop over tracks - // Check if muons are required. - - //======== check if we have enough SA muons : ===================== - std::vector<ElementLink<xAOD::L2StandAloneMuonContainer> > l2samuons; - ATH_MSG_DEBUG("Checking L2SA muon cut"); - bool passMuon = passNObjects<xAOD::L2StandAloneMuonContainer, - std::vector<ElementLink<xAOD::L2StandAloneMuonContainer> > > ( - m_nL2SAMuon, m_ptMuonMin, inputTE, l2samuons, "", m_mindR); - if( !passMuon ){ - if ( timerSvc() ) m_BmmHypTot->stop(); - ATH_MSG_DEBUG("Failed L2SA muon cut"); - //pass = false; - afterExecMonitors().ignore(); - return HLT::OK; - }else{ - ATH_MSG_DEBUG("Passed L2SA cut"); - } - - m_mon_Acceptance.push_back( ACCEPT_PassNL2SAMuons ); - //======== check if we have enough L2 Combined muons : ===================== - std::vector<ElementLink<xAOD::L2CombinedMuonContainer> > l2combmuons; - // passMuon = passNObjects<std::vector<const xAOD::L2CombinedMuonContainer*>, - // ElementLinkVector<xAOD::L2CombinedMuonContainer> >( - passMuon = passNObjects<xAOD::L2CombinedMuonContainer, - std::vector<ElementLink<xAOD::L2CombinedMuonContainer> > >( - m_nL2CombMuon, m_ptMuonMin, inputTE, l2combmuons, "", m_mindR); - if( !passMuon ){ - if ( timerSvc() ) m_BmmHypTot->stop(); - //pass = false; - ATH_MSG_DEBUG("Failed L2Comb muon cut"); - afterExecMonitors().ignore(); - return HLT::OK; - } - m_mon_Acceptance.push_back( ACCEPT_PassNL2CombMuons ); - - //======== check if we have enough EF muons : ===================== - std::vector<ElementLink<xAOD::MuonContainer> > efmuons; // just a collection of pointers, not copies - passMuon = passNObjects<xAOD::MuonContainer, - std::vector<ElementLink<xAOD::MuonContainer> > >( m_nEfMuon, m_ptMuonMin, - inputTE, efmuons, "", m_mindR); - if( !passMuon ){ - if ( timerSvc() ) m_BmmHypTot->stop(); - ATH_MSG_DEBUG("Failed EF muon cut"); - afterExecMonitors().ignore(); - return HLT::OK; - } - m_mon_Acceptance.push_back( ACCEPT_PassNEFMuons ); - //======== now make track container : ======================= - - - std::vector<ElementLink<xAOD::TrackParticleContainer> > tracks; - bool passTrack = passNTracks( m_nTrk, m_ptTrkMin, inputTE, tracks, m_trackCollectionKey , m_mindR); - if( !passTrack || int(tracks.size()) < m_nTrk ){ - if ( timerSvc() ) m_BmmHypTot->stop(); - ATH_MSG_DEBUG("Failed nTrack cut"); //pass = false; - afterExecMonitors().ignore(); - return HLT::OK; - }else{ - ATH_MSG_DEBUG("Passed nTrack cut"); - } - - - if( (int)tracks.size() < m_nTrk ) { - if ( timerSvc() ) m_BmmHypTot->stop(); - ATH_MSG_ERROR("You should never get to this point - check code"); - m_mon_Errors.push_back(ERROR_AlgorithmProblem); - afterExecMonitors().ignore(); - return HLT::OK; - } - m_mon_Acceptance.push_back( ACCEPT_PassNTracks ); - m_mon_NTrk = tracks.size() ; - //============= limit list to Ntrack leading tracks =========== - bool passHighPtTrack = false; - bool passNTrkCharge = false; - bool passNTrkVertexChi2 = false; - bool passNTrkMass = false; - bool passPairCharge = false; - bool passPairMass = false; - - //std::vector<const xAOD::TrackParticle*> highptTracks; - std::vector<ElementLink<xAOD::TrackParticleContainer> > highptTracks; - highptTracks.reserve(tracks.size()); - - // preserve all tracks with pt passing lowest requested - float lowestPt = m_ptTrkMin.back(); - for(const auto& trk : tracks ){ - if( (*trk)->pt() < lowestPt ) continue; - highptTracks.push_back( trk ); - ATH_MSG_DEBUG("Select track: " << " pt: " << (*trk)->pt()<< " eta: " << (*trk)->eta()<< " phi: " << (*trk)->phi()<< " q: " << (*trk)->charge()); - } - - m_mon_highptNTrk = highptTracks.size() ; - passHighPtTrack = true; - // now all preselection cuts passed, make output collection now - - xAOD::TrigBphysContainer * xAODTrigBphysColl = new xAOD::TrigBphysContainer; - xAOD::TrigBphysAuxContainer xAODTrigBphysAuxColl; - xAODTrigBphysColl->setStore(&xAODTrigBphysAuxColl); - xAODTrigBphysColl->reserve(highptTracks.size()); // hard to give here good estimate - std::vector<double> masses(2,m_trkMass); - - // record also tracks that are used in any collection - xAOD::TrackParticleContainer* outputTrackColl = new xAOD::TrackParticleContainer(); - xAOD::TrackParticleAuxContainer outputTrackCollAuxCont; - outputTrackColl->setStore( &outputTrackCollAuxCont ); - outputTrackColl->reserve(highptTracks.size()); - - - //=====make all requested m_nTrk combinations ================= - - std::string bitmask( m_nTrk, 1); // K leading 1's - size_t NtracksTotal = highptTracks.size(); - bitmask.resize(NtracksTotal, 0); // N-K trailing 0's - - ATH_MSG_DEBUG(" Making combinations with "<< m_nTrk<<" tracks out of "<<NtracksTotal); - - // permute bitmask - std::vector<ElementLink<xAOD::TrackParticleContainer> > thisIterationTracks; - std::vector<int> thisIterationTracksIndex; - thisIterationTracks.reserve(m_nTrk); - thisIterationTracksIndex.reserve(m_nTrk); - std::unordered_set<int> index_0; - index_0.reserve(NtracksTotal); - do { - m_mon_NComb += 1; - - thisIterationTracks.clear(); - thisIterationTracksIndex.clear(); - - for (size_t i = 0; i < NtracksTotal; ++i) // [0..N-1] integers - { - if (bitmask[i]) { - thisIterationTracks.push_back( highptTracks[i] );// std::cout << " " << i; - thisIterationTracksIndex.push_back( i ); - } - } - //=== now check if combination is OK - // OI : here we need a print out, need to figure out how to do this efficienctly - //combinationIndex++; - //ATH_MSG_DEBUG( " Combination "<< combinationIndex - // << ", Ntrk="<< thisIterationTracks.size() - // << " pts=["<< hpts.str() << " ]" ); - - - //==== re-check pts - bool passPts = true; - for(size_t ipt = 0; ipt < thisIterationTracks.size(); ++ipt ) - if( (*thisIterationTracks[ipt])->pt() < m_ptTrkMin[ipt] ){ - passPts = false; - ATH_MSG_DEBUG(" fail pt cuts" ); - break; - } - if( !passPts ) continue; - - //== first check charge - if( m_nTrkQ >= 0 ){ - int charge = 0; - //for(const auto& trk : thisIterationTracks) - for(const ElementLink<xAOD::TrackParticleContainer>& trk : thisIterationTracks) - charge += ( (*trk)->charge() > 0 ) ? 1 : -1 ; - if( abs(charge) != m_nTrkQ ){ - ATH_MSG_DEBUG(" |Charge| = "<< abs(charge) << " required "<<m_nTrkQ << " thus fail" ); - continue; - }else{ - ATH_MSG_DEBUG(" |Charge| = "<< abs(charge) << " required "<<m_nTrkQ << " thus pass" ); - } - passNTrkCharge = true; - } - - // now check if muonMatch is requested, and if we have enough muons here - - //=== calculate total mass of m_nTrk objects ================ - double totalMass = 0; - float trkMassSqr = m_trkMass*m_trkMass; - - if( m_nTrkMassMin.size() > 0 ){ - double px =0; - double py =0; - double pz =0; - double E =0; - for( size_t itrk0 = 0; itrk0 <thisIterationTracks.size() ; ++itrk0){ - auto mom = (*thisIterationTracks[itrk0])->p4(); - - px += mom.Px(); - py += mom.Py(); - pz += mom.Pz(); - // treat them all as muons - double e2 = mom.P()*mom.P() + trkMassSqr; // 105.65^2 - if( e2 > 0 ) E += sqrt(e2); - } - double m2 = E*E - px*px - py*py -pz*pz; - totalMass = (m2 < 0) ? 0 : sqrt(m2); - m_mon_NTrkMass.push_back(totalMass*0.001); - ATH_MSG_DEBUG("combination mass = "<< totalMass ); - // check mass window now - bool foundMass = false; - if( m_nTrkMassMin.size() == 0 ) foundMass = true; - for(size_t im = 0; im < m_nTrkMassMin.size(); ++im) - if( totalMass >=m_nTrkMassMin[im] && totalMass <= m_nTrkMassMax[im]) - { foundMass = true; break; } - if( !foundMass ){ - ATH_MSG_DEBUG(" combination Mass Failed " ); - continue; // loop over Ntrk combinations - }else{ - ATH_MSG_DEBUG(" combination Mass Accepted " ); - } - passNTrkMass =true; - } - - //== calculate mass of pairs if requested ================ - - std::vector<double> dimasses; - dimasses.reserve(m_nTrk*m_nTrk); - - int npair = 0; - int npairAcc = 0; - - if( m_diTrkMassMin.size() > 0 ){ - bool foundPair = false; - for( int itrk0 = 0; itrk0 < m_nTrk && !foundPair; ++itrk0){ - ElementLink<xAOD::TrackParticleContainer> trk0 = thisIterationTracks[itrk0]; - - for( int itrk1 = itrk0+1; itrk1 < m_nTrk && !foundPair; ++itrk1) { - ElementLink<xAOD::TrackParticleContainer> trk1 = thisIterationTracks[itrk1]; - npair++; - if( m_diTrkQ >= 0 ){ - int charge = 0; - charge += ( (*trk0)->charge() > 0 ) ? 1 : -1 ; - charge += ( (*trk1)->charge() > 0 ) ? 1 : -1 ; - if( abs(charge) != m_diTrkQ ){ - ATH_MSG_DEBUG("| Charge| = "<< abs(charge) - << " required "<<m_diTrkQ << " thus fail" ); - continue; - }else{ - ATH_MSG_DEBUG(" |Charge| = "<< abs(charge) - << " required "<<m_diTrkQ << " thus pass" ); - } - } - passPairCharge = true; - - // simple mass - double dimass = m_bphysHelperTool->invariantMass(*trk0,*trk1,masses[0], masses[1]); - m_mon_pairMass.push_back(dimass); - - ATH_MSG_DEBUG("pair pt1=" << (*trk0)->pt() << ", pt2="<< (*trk1)->pt()<<", mass = "<< dimass ); - // check di-mass now - for(size_t im = 0; im < m_diTrkMassMin.size(); ++im) - if( dimass >=m_diTrkMassMin[im] && dimass <= m_diTrkMassMax[im]) - { - - foundPair = true; - //index_0.push_back(thisIterationTracksIndex[itrk0]); // record index in original highpt track container - //index_0.push_back(thisIterationTracksIndex[itrk1]); - dimasses.push_back(dimass); - } - }} // end loop over track pairs - - npairAcc += dimasses.size(); - - if( !foundPair ) { - ATH_MSG_DEBUG(" di-Mass Failed " ); - continue; // - }else{ - ATH_MSG_DEBUG(" di-Mass cut succeeded " ); - } - passPairMass = true; - } - - - m_mon_NPair += npair; - m_mon_acceptedNPair += npairAcc; - - // first add big object and then di-masses - xAOD::TrigBphys* xaodobj = new xAOD::TrigBphys; - xAODTrigBphysColl->push_back(xaodobj); - xaodobj->initialise(0, 0., 0.,0., xAOD::TrigBphys::MULTIMU, totalMass,xAOD::TrigBphys::EF); - ATH_MSG_DEBUG("Adding TrigBphys xAOD obj with mass "<< totalMass ); - - std::vector<double> masses1(thisIterationTracks.size(), m_trkMass); - if (m_bphysHelperTool->vertexFit(xaodobj,thisIterationTracks,masses1).isFailure()) { - delete xaodobj; xaodobj = nullptr; - ATH_MSG_DEBUG("Problems with vertex fit in TrigMultiTrkFex" ); - continue; - }else{ - // check chi2 - float chi2 = xaodobj->fitchi2(); - m_mon_NTrkChi2.push_back(chi2); - m_mon_NTrkFitMass.push_back( xaodobj->mass() ); - if( m_nTrkVertexChi2 >= 0 ){ - if( chi2 > m_nTrkVertexChi2 ){ - ATH_MSG_DEBUG(" nTrk Vertex chi2 "<< chi2 << " required "<<m_nTrkVertexChi2 << " thus fail" ); - //delete created object - //xAODTrigBphysColl->pop_back() ; - //delete xaodobj; xaodobj = nullptr; - continue; - }else{ - ATH_MSG_DEBUG( " nTrk Vertex chi2 "<< chi2 << " required "<<m_nTrkVertexChi2 << " is good" ); - index_0.insert( thisIterationTracksIndex.begin(), thisIterationTracksIndex.end() ); - m_mon_acceptedNComb +=1 ; - } - }else{ - index_0.insert( thisIterationTracksIndex.begin(), thisIterationTracksIndex.end() ); - m_mon_acceptedNComb +=1 ; - } - } // end of vertexFit.isFailure - - passNTrkVertexChi2 = true; - - m_mon_accepted_highptNTrk = highptTracks.size() ; - - // now check if the number of output objects is too large for further processing. In principle a few candidate is already enough for further steps. - if( m_maxNOutputObject> 0 && ((int)xAODTrigBphysColl->size() > m_maxNOutputObject || (int)index_0.size() > m_maxNOutputObject*m_nTrk) ){ - ATH_MSG_DEBUG("Found "<< xAODTrigBphysColl->size() << " suitable objects and "<< index_0.size()<< " tracks, enough for acceptance, stopping"); - break; - } - - - } while (std::prev_permutation(bitmask.begin(), bitmask.end())); - //------------- end of combination loop - if( m_mon_NComb > 0 ) m_mon_NComb = log10(m_mon_NComb); - if( m_mon_acceptedNComb > 0 ) m_mon_acceptedNComb = log10(m_mon_acceptedNComb); - - if( passHighPtTrack ) m_mon_Acceptance.push_back( ACCEPT_HighPtTrack ); - if( passNTrkCharge ) m_mon_Acceptance.push_back( ACCEPT_NTrkCharge ); - if( passNTrkVertexChi2) m_mon_Acceptance.push_back( ACCEPT_NTrkVertexChi2 ); - if( passNTrkMass ) m_mon_Acceptance.push_back( ACCEPT_NTrkMass ); - if( passPairCharge ) m_mon_Acceptance.push_back( ACCEPT_PairCharge ); - if( passPairMass ) m_mon_Acceptance.push_back( ACCEPT_PairMass ); - - // record collection now - if ( timerSvc() ) m_BmmHypTot->stop(); - - HLT::TriggerElement* outputTE = addRoI(output); - - if (xAODTrigBphysColl && xAODTrigBphysColl->size()) { - ATH_MSG_DEBUG("REGTEST: Store Bphys Collection size: " << xAODTrigBphysColl->size() ); - - // OI do we always need to create outputTE? or only when there is something to write ? - outputTE->setActiveState(true); - - HLT::ErrorCode sc = attachFeature(outputTE, xAODTrigBphysColl, m_bphysCollectionKey ); - if(sc != HLT::OK) { - ATH_MSG_WARNING("Failed to store trigBphys Collection" ); - m_mon_Errors.push_back( ERROR_BphysColl_Fails ); - delete xAODTrigBphysColl; xAODTrigBphysColl = nullptr; // assume deletion responsibility - afterExecMonitors().ignore(); - return HLT::ERROR; - } - m_mon_Acceptance.push_back( ACCEPT_RecordedCollection ); - m_countPassedCombination += xAODTrigBphysColl->size(); - } else { - ATH_MSG_DEBUG("REGTEST: no bphys collection to store " ); - delete xAODTrigBphysColl; xAODTrigBphysColl = nullptr; - } - - //OI if we did not reach this point, then we do not have a good combination at all, nothing to save - ATH_MSG_DEBUG( " got # of indexes " << index_0.size() ); - //sort( index_0.begin(), index_0.end() ); - //index_0.erase( unique( index_0.begin(), index_0.end() ), index_0.end() ); - //ATH_MSG_DEBUG( " got unique # of indexes " << index_0.size() ); - outputTrackColl->reserve(index_0.size()); - for( auto ind : index_0 ){ - xAOD::TrackParticle *trk1 = new xAOD::TrackParticle(); - trk1->makePrivateStore(*highptTracks[ind]); - outputTrackColl->push_back(trk1); - } - - ATH_MSG_DEBUG(" OI size of output Track collection " << outputTrackColl->size() ); - - // add also containter with tracks for seeded EF Muon - if (m_outputTrackCollectionKey!= "" && outputTrackColl && outputTrackColl->size()) { - ATH_MSG_DEBUG("REGTEST: Store Bphys track Collection size: " << outputTrackColl->size() ); - outputTE->setActiveState(true); - - HLT::ErrorCode sc = attachFeature(outputTE, outputTrackColl, m_outputTrackCollectionKey ); - if(sc != HLT::OK) { - ATH_MSG_WARNING("Failed to store bphys track Collection" ); - m_mon_Errors.push_back( ERROR_BphysTrackColl_Fails ); - delete outputTrackColl; outputTrackColl = nullptr; // assume deletion responsibility - afterExecMonitors().ignore(); - return HLT::ERROR; - } - } else { - ATH_MSG_DEBUG("REGTEST: no bphys track collection to store " ); - delete outputTrackColl; outputTrackColl = nullptr; - } - m_countPassedEvents++; - // stop monitoring - afterExecMonitors().ignore(); - return HLT::OK; -} diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigMultiTrkFex.h b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigMultiTrkFex.h deleted file mode 100644 index c8ab104cdc03db073ee327ff347aea4135071a41..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigMultiTrkFex.h +++ /dev/null @@ -1,189 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/************************************************************************** - ** - ** File: Trigger/TrigHypothesis/TrigBphysHypo/TrigMultiTrkFex.h - ** - ** - ** Author:Olya Igonkina (Nikhef) - ** - ** Created: 15/07/2016 - ** Modified: - ** - **************************************************************************/ - -#ifndef TRIG_TrigMultiTrk_H -#define TRIG_TrigMultiTrk_H - -// standard stuff -#include <string> -#include <algorithm> - -#include "TrigInterfaces/AllTEAlgo.h" - -class TrigBphysHelperUtilsTool; -class TrigTimer; - -class TrigMultiTrkFex: public HLT::AllTEAlgo { - - public: - TrigMultiTrkFex(const std::string & name, ISvcLocator* pSvcLocator); - ~TrigMultiTrkFex(); - HLT::ErrorCode hltInitialize(); - HLT::ErrorCode hltFinalize(); - - HLT::ErrorCode hltExecute(std::vector<std::vector<HLT::TriggerElement*> >& inputTEs, unsigned int output); - - private: - - // OI I would have loved to make it template, but templates outsmarted me.. - static bool sortTracks(const ElementLink<xAOD::TrackParticleContainer> &l1, const ElementLink<xAOD::TrackParticleContainer> &l2) - { - const xAOD::TrackParticle* xTrack1 = *l1; - const xAOD::TrackParticle* xTrack2 = *l2; - - return xTrack1->pt()>xTrack2->pt(); - } - - - template<class Tin, class Tout> bool passNObjects(int nObjMin, - const std::vector<float>& ptObjMin, - std::vector<std::vector<HLT::TriggerElement*> >& inputTE , - Tout & outVec, - //std::string printTag, - const std::string& collectionKey, - float mindR) ; - - bool passNTracks(int nObjMin, - const std::vector<float>& ptObjMin, - std::vector<std::vector<HLT::TriggerElement*> >& inputTE , - std::vector<ElementLink<xAOD::TrackParticleContainer> > & outVec, - const std::string& collectionKey, - float mindR) ; - - - - ToolHandle <TrigBphysHelperUtilsTool> m_bphysHelperTool; - - - TrigTimer* m_BmmHypTot; - - int m_maxNOutputObject; - std::string m_trackCollectionKey; - std::string m_outputTrackCollectionKey; - std::string m_bphysCollectionKey; - int m_nTrk ; - int m_nTrkQ; // if negative - no cut - int m_nTrkVertexChi2; // if negative - no cut - float m_trkMass; // track mass hypothesis for all tracks selected - std::vector<float> m_ptTrkMin; - std::vector<float> m_nTrkMassMin; // this has to be in pair - std::vector<float> m_nTrkMassMax; - std::vector<float> m_diTrkMassMin; // this has to be in pair - std::vector<float> m_diTrkMassMax; - int m_diTrkQ; // if negative - no cut - int m_nEfMuon ; // muons have to be present in TE, but are not required to match to tracks - int m_nL2CombMuon ; - int m_nL2SAMuon ; - std::vector<float> m_ptMuonMin; - float m_mindR; - - // to set Accept-All mode: should be done with force-accept when possible - bool m_acceptAll; - - - //Counters - uint32_t m_countTotalEvents; - uint32_t m_countPassedEvents; - uint32_t m_countPassedCombination; - - - //Monitored variables - std::vector<int> m_mon_Errors; - std::vector<int> m_mon_Acceptance; - int m_mon_NTrk; - int m_mon_highptNTrk; - int m_mon_accepted_highptNTrk; - std::vector<float> m_mon_NTrkMass; - std::vector<float> m_mon_NTrkFitMass; - std::vector<float> m_mon_NTrkChi2; - int m_mon_NPair; - int m_mon_acceptedNPair; - std::vector<float> m_mon_pairMass; - float m_mon_NComb; - float m_mon_acceptedNComb; - -}; - - -template<class Tin, class Tout> bool TrigMultiTrkFex::passNObjects(int nObjMin, - const std::vector<float>& ptObjMin, - std::vector<std::vector<HLT::TriggerElement*> >& inputTE , - Tout & outVec, - //std::string printTag, - const std::string& collectionKey, - float mindR) -{ - if( nObjMin <= 0 ) return true; - ElementLinkVector<Tin> inVecColl; - outVec.clear(); - std::vector<float> pts; - - float mindR2 = mindR*mindR; - - unsigned int nTEs = inputTE.size(); - for ( unsigned int i=0; i < nTEs; ++i) { - unsigned int mTEs = inputTE[i].size(); - for ( unsigned int j=0; j < mTEs; ++j) { - if(getFeaturesLinks<Tin,Tin>(inputTE[i][j], inVecColl, collectionKey)==HLT::OK ) { - for( const auto& efmu : inVecColl){ - // check for overlap - bool found = false; - for(const auto& part : outVec ){ - double deta = (*part)->eta() - (*efmu)->eta(); - double dphi = (*part)->phi() - (*efmu)->phi(); - double deltaR2 = deta*deta +dphi*dphi; - if( deltaR2 <= mindR2) found = true; - } - if( !found ){ - float pt = fabs((*efmu)->pt()) ; - // check if value in GeV or MeV, if it was >350 GeV and multiplied by 1000, it does not matter - if( pt < 350. && pt>0.01 ) pt *= 1000.; - pts.push_back(pt); - outVec.push_back(efmu); - ATH_MSG_DEBUG( "Found muon, pt= " << pt); - } - }//}// end loop over muons in one TE - } // end getFeaturesLinks - }} // end loop over all TEs - - //=== check if it is enough muons - if( (int)outVec.size() < nObjMin ) { - ATH_MSG_DEBUG( "Rejecting: " - <<" #muons= " << outVec.size() - << " while need "<< nObjMin ); - return false; - } - //== check that muons have correct pts - std::sort(pts.begin(), pts.end(), std::greater<float>()); - - unsigned int Ncheck = std::min( nObjMin, int(ptObjMin.size()) ); - bool failMuonPt = false; - for ( unsigned int ipt=0; ipt < Ncheck; ++ipt) { - if( pts[ipt] < ptObjMin[ipt] ) - failMuonPt = true; - } - if( failMuonPt ){ - ATH_MSG_DEBUG( "Fail muon pt cut" ); - return false; - } - // here would be good to limit number of objects to the minimum - - return true; - -} - - -#endif diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/components/TrigBphysHypo_entries.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/components/TrigBphysHypo_entries.cxx index de541a5cd9d2e76f66b169e146eeab6deb518f0c..e3ffd29184b0027f64b2972e404f2f89043ba64d 100644 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/components/TrigBphysHypo_entries.cxx +++ b/Trigger/TrigHypothesis/TrigBphysHypo/src/components/TrigBphysHypo_entries.cxx @@ -1,34 +1,3 @@ -#include "../TrigL2BMuMuXHypo.h" -#include "../TrigL2BMuMuXFex.h" -#include "../TrigL2BMuMuHypo.h" -#include "../TrigL2MultiMuFex.h" -#include "../TrigL2MultiMuHypo.h" -#include "../TrigL2BMuMuFex.h" -#include "../TrigEFBMuMuXHypo.h" -#include "../TrigEFBMuMuXFex.h" -#include "../TrigEFBEEXFex.h" -#include "../TrigEFBMuMuHypo.h" -#include "../TrigEFMultiMuHypo.h" -//#include "../TrigL2DiMuHypo.h" -//#include "../TrigEFDiMuFex.h" -//#include "../TrigEFDiMuHypo.h" -//#include "TrigBphysHypo/TrigL2DsPhiPiHypo.h" -//#include "TrigBphysHypo/TrigL2DsPhiPiFex.h" -//#include "../TrigL2DiMuXHypo.h" -//#include "../TrigL2DiMuXFex.h" -#include "../TrigEFTrkMassHypo.h" -#include "../TrigMultiTrkFex.h" -#include "../TrigBphysMuonCounter.h" -#include "../TrigBphysTrackRoiMaker.h" -#include "../TrigBphysElectronCounter.h" - -//#include "../TrigL2LooseMuonHypo.h" - -#include "../TrigBphysHelperUtilsTool.h" -#include "../TrigEFBMuMuFex.h" -#include "../TrigEFMultiMuFex.h" -#include "../TrigEFTrkMassFex.h" - #include "src/TrigBphysStreamerHypo.h" #include "src/TrigBphysStreamerHypoTool.h" #include "src/TrigMultiTrkComboHypo.h" @@ -37,37 +6,6 @@ #include "src/TrigBmumuxComboHypoTool.h" -//DECLARE_COMPONENT( TrigL2DiMuXHypo ) -//DECLARE_COMPONENT( TrigL2DiMuXFex ) -DECLARE_COMPONENT( TrigL2BMuMuXHypo ) -DECLARE_COMPONENT( TrigL2BMuMuXFex ) -DECLARE_COMPONENT( TrigL2BMuMuHypo ) -DECLARE_COMPONENT( TrigL2BMuMuFex ) -DECLARE_COMPONENT( TrigL2MultiMuHypo ) -DECLARE_COMPONENT( TrigL2MultiMuFex ) -DECLARE_COMPONENT( TrigEFBMuMuXHypo ) -DECLARE_COMPONENT( TrigEFBMuMuXFex ) -DECLARE_COMPONENT( TrigEFBEEXFex ) -DECLARE_COMPONENT( TrigEFBMuMuHypo ) -DECLARE_COMPONENT( TrigEFMultiMuHypo ) -//DECLARE_COMPONENT( TrigL2DiMuHypo ) -//DECLARE_COMPONENT( TrigL2DsPhiPiHypo ) -//DECLARE_COMPONENT( TrigL2DsPhiPiFex ) - -DECLARE_COMPONENT( TrigEFTrkMassHypo ) -//DECLARE_COMPONENT( TrigL2LooseMuonHypo ) - -DECLARE_COMPONENT( TrigBphysHelperUtilsTool ) - -DECLARE_COMPONENT( TrigEFBMuMuFex ) -DECLARE_COMPONENT( TrigEFMultiMuFex ) -DECLARE_COMPONENT( TrigMultiTrkFex ) - -DECLARE_COMPONENT( TrigEFTrkMassFex ) -DECLARE_COMPONENT( TrigBphysMuonCounter ) -DECLARE_COMPONENT( TrigBphysTrackRoiMaker ) -DECLARE_COMPONENT( TrigBphysElectronCounter ) - DECLARE_COMPONENT( TrigBphysStreamerHypo ) DECLARE_COMPONENT( TrigBphysStreamerHypoTool ) DECLARE_COMPONENT( TrigMultiTrkComboHypo )