Commit 1c28e04d authored by Vladimir Lyubushkin's avatar Vladimir Lyubushkin Committed by Adam Edward Barton
Browse files

Configuration of the vertexing tools in TrigMultiTrkHypo algorithm (ATR-20853, ATR-17404)

* Rename TrigMultiTrkHypoMT to TrigMultiTrkHypo;
* Trk::TrkVKalVrtFitter is called directly from TrigMultiTrkHypo (remove obsolete TrigBphysHelperUtilsTool);
* vertex fitter is configurated in the same way as for common BLS Onia studies (see for example JpsiFinder);
* use InDet::VertexPointEstimator to find the rough position of the vertex before performing the fit.
parent 763441f4
......@@ -29,6 +29,7 @@ atlas_depends_on_subdirs( PRIVATE
Generators/GeneratorObjects
InnerDetector/InDetConditions/BeamSpotConditionsData
InnerDetector/InDetConditions/InDetBeamSpotService
InnerDetector/InDetRecTools/InDetConversionFinderTools
PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools
Reconstruction/Particle
Tracking/TrkEvent/TrkParameters
......@@ -58,7 +59,7 @@ atlas_add_component( TrigBphysHypo
src/*.cxx
src/components/*.cxx
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps AthenaKernel AthLinks BeamSpotConditionsData DecisionHandlingLib FourMomUtils StoreGateLib SGtests GeoPrimitives EventInfo xAODEventInfo xAODMuon xAODTracking xAODTrigBphys xAODTrigMuon GaudiKernel GeneratorObjects Particle ElectronPhotonSelectorToolsLib TrkParameters TrkTrack VxVertex TrkVKalVrtFitterLib TrigBphysicsEvent TrigCaloEvent TrigInDetEvent TrigMuonEvent TrigNavigationLib TrigParticle TrigSteeringEvent TrigInterfacesLib TrigT1Interfaces TrigTimeAlgsLib AthViews )
LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps AthenaKernel AthLinks BeamSpotConditionsData InDetConversionFinderToolsLib DecisionHandlingLib FourMomUtils StoreGateLib SGtests GeoPrimitives EventInfo xAODEventInfo xAODMuon xAODTracking xAODTrigBphys xAODTrigMuon GaudiKernel GeneratorObjects Particle ElectronPhotonSelectorToolsLib TrkParameters TrkTrack VxVertex TrkVKalVrtFitterLib TrigBphysicsEvent TrigCaloEvent TrigInDetEvent TrigMuonEvent TrigNavigationLib TrigParticle TrigSteeringEvent TrigInterfacesLib TrigT1Interfaces TrigTimeAlgsLib AthViews )
# Install files from the package:
atlas_install_python_modules( python/*.py )
......
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
from TrigBphysHypo.TrigBphysHypoConf import TrigMultiTrkHypo, TrigMultiTrkHypoTool
from TrigBphysHypo.TrigMultiTrkHypoMonitoringConfig import TrigMultiTrkHypoMonitoring, TrigMultiTrkHypoToolMonitoring
from AthenaCommon.Logging import logging
log = logging.getLogger('TrigMultiTrkHypoConfig')
def TrigMultiTrkHypoToolFromDict(chainDict):
config = TrigMultiTrkHypoConfig()
tool = config.ConfigurationHypoTool(chainDict)
return tool
class TrigMultiTrkHypoConfig(object):
def ConfigurationHypo(self, trigSequenceName='Dimu', trigLevel='L2', trackCollection='', muonCollection=''):
trigLevelDict = {'L2':0, 'EF':1}
try:
value = trigLevelDict[trigLevel]
log.debug('TrigMultiTrkHypo.trigLevelString = %s ', value)
except KeyError:
log.error('TrigMultiTrkHypo.trigLevelString should be L2 or EF, but %s provided.', trigLevel)
from TrkVKalVrtFitter.TrkVKalVrtFitterConf import Trk__TrkVKalVrtFitter
VertexFitter = Trk__TrkVKalVrtFitter(
name = 'TrigBphysFitter_'+trigSequenceName+trigLevel,
FirstMeasuredPoint = False,
MakeExtendedVertex = False,
Extrapolator = 'Trk::Extrapolator/InDetExtrapolator')
from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__VertexPointEstimator
VertexPointEstimator = InDet__VertexPointEstimator(
name = 'VertexPointEstimator_'+trigSequenceName+trigLevel,
MinDeltaR = [-10000., -10000., -10000.],
MaxDeltaR = [ 10000., 10000., 10000.],
MaxPhi = [ 10000., 10000., 10000.],
MaxChi2OfVtxEstimation = 2000.)
tool = TrigMultiTrkHypo(
name = trigSequenceName+'HypoAlg'+trigLevel,
trigLevelString = trigLevel,
trackCollectionKey = trackCollection,
MuonCollectionKey = muonCollection,
nTrk = 2,
nTrackMassMin = [100.],
nTrackMassMax = [20000.],
VertexFitter = VertexFitter,
VertexPointEstimator = VertexPointEstimator,
MonTool = TrigMultiTrkHypoMonitoring('TrigMultiTrkHypoMonitoring_'+trigSequenceName+trigLevel))
if trigLevel == 'L2':
tool.particleType = 0
tool.bphysCollectionKey = "TrigBphys"+trigSequenceName
elif trigLevel == 'EF':
tool.particleType = 1
tool.bphysCollectionKey = "TrigBphysEF"+trigSequenceName
return tool
def ConfigurationHypoTool(self, chainDict):
topoAlgs = chainDict['chainName']
log.debug("Set for algorithm %s", topoAlgs)
tool = TrigMultiTrkHypoTool(topoAlgs)
if 'nocut' in topoAlgs:
tool.AcceptAll = True
if 'noos' in topoAlgs:
tool.OppositeSign = True
tool.ApplyUpperMassCut = True
tool.ApplyChi2Cut = True
tool.Chi2VtxCut = 20
tool.nBphysObjects = 1
tool.trkPtThresholds = getBphysThresholds(chainDict)
if 'bJpsimumu' in topoAlgs:
tool.LowerMassCut = 2500 #MeV
tool.UpperMassCut = 4300 #MeV
elif 'bUpsimumu' in topoAlgs:
tool.LowerMassCut = 8000 #MeV
tool.UpperMassCut = 12000 #MeV
elif 'bBmumu' in topoAlgs:
tool.LowerMassCut = 4000 #MeV
tool.UpperMassCut = 8500 #MeV
tool.Chi2VtxCut = 60
elif 'bDimu' in topoAlgs:
tool.LowerMassCut = 100 #MeV
tool.UpperMassCut = 14000 #MeV
tool.MonTool = TrigMultiTrkHypoToolMonitoring('MonTool')
return tool
def getBphysThresholds(chainDict):
mult = 0
trkmuons = []
for part in chainDict['chainParts']:
mult = mult + int(part['multiplicity'])
for dictpart in chainDict['chainParts']:
if 'mu' in dictpart['trigType']:
for x in range(0,int(dictpart['multiplicity'])):
if dictpart['threshold']!='0':
dthr = float(dictpart['threshold'] )
thr= dthr * 1000. # in MeV;
#lower to match EF muon threshols
if dthr < 9.5 :
thr = thr - 350.
elif dthr < 11.5 :
thr = thr - 550.
elif dthr < 21.5 :
thr = thr - 750.
else :
thr = thr - 1000.
else :
thr = 900.
trkmuons.append(thr)
return trkmuons
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
from TrigBphysHypo.TrigBphysHypoConf import TrigMultiTrkHypoMT, TrigMultiTrkHypoToolMT # noqa: F401
from TrigBphysHypo.TrigMultiTrkHypoMTMonitoringConfig import TrigMultiTrkHypoToolMTMonitoring
from AthenaCommon.Logging import logging
log = logging.getLogger('TrigMultiTrkHypoMTConfig')
def findL2teBaseName(cName,topos):
indices = []
for topo in topos:
indices.append(cName.find(topo))
firstTopoOccurance = sorted(indices,key=int)[0]
return cName[:firstTopoOccurance-1]
def TrigMultiTrkHypoToolMTFromDict( chainDict ):
config = TrigMultiTrkHypoMTConfig()
tool = config.ConfigurationHypoTool( chainDict )
tool.MonTool = TrigMultiTrkHypoToolMTMonitoring('MonTool')
return tool
def TrigMultiTrkHypoToolFromName( name, thresholdsHLT ):
from TriggerMenuMT.HLTMenuConfig.Menu.DictFromChainName import dictFromChainName
decodedDict = dictFromChainName(thresholdsHLT)
decodedDict['chainName'] = name # override
return TrigMultiTrkHypoToolMTFromDict( decodedDict )
class TrigMultiTrkHypoMTConfig(object):
def ConfigurationHypoTool( self, chainDict):
topoAlgs = chainDict['topo']
topoAlgs = chainDict['chainName']
#print findL2teBaseName(chainDict['chainName'],topoAlgs)
tool = TrigMultiTrkHypoToolMT( chainDict['chainName'] )
log.debug("Set for algorithm %s", topoAlgs)
if 'nocut' in topoAlgs:
tool.AcceptAll = True
if 'noos' in topoAlgs:
tool.OppositeSign = True
tool.ApplyUpperMassCut = True
tool.ApplyChi2Cut = True
tool.Chi2VtxCut = 20
tool.nBphysObjects = 1
trkmuons = getBphysThresholds(chainDict)
tool.trkPtThresholds = trkmuons
if 'bJpsimumu' in topoAlgs:
tool.LowerMassCut = 2500 #MeV
tool.UpperMassCut = 4300 #MeV
elif 'bUpsimumu' in topoAlgs:
tool.LowerMassCut = 8000 #MeV
tool.UpperMassCut = 12000 #MeV
elif 'bBmumu' in topoAlgs:
tool.LowerMassCut = 4000 #MeV
tool.UpperMassCut = 8500 #MeV
tool.Chi2VtxCut = 60
elif 'bDimu' in topoAlgs:
tool.LowerMassCut = 100 #MeV
tool.UpperMassCut = 14000 #MeV
return tool
def getBphysThresholds(chainDict) :
mult = 0
trkmuons = []
fexNameExt = ""
for part in chainDict['chainParts'] :
mult = mult + int(part['multiplicity'])
for dictpart in chainDict['chainParts']:
if 'mu' in dictpart['trigType']:
for x in range(0,int(dictpart['multiplicity'])):
if dictpart['threshold']!='0':
dthr = float(dictpart['threshold'] )
thr= dthr * 1000. # in MeV;
#lower to match EF muon threshols
if dthr < 9.5 :
thr = thr - 350.
elif dthr < 11.5 :
thr = thr - 550.
elif dthr < 21.5 :
thr = thr - 750.
else :
thr = thr -1000.
else :
thr = 900.
trkmuons.append(thr)
fexNameExt = fexNameExt + "_"+str(int(dictpart['threshold']))
return trkmuons
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool, defineHistogram
class TrigMultiTrkHypoAlgMTMonitoring(GenericMonitoringTool):
class TrigMultiTrkHypoMonitoring(GenericMonitoringTool):
def __init__ (self, name):
super(TrigMultiTrkHypoAlgMTMonitoring, self).__init__(name)
super(TrigMultiTrkHypoMonitoring, self).__init__(name)
self.Histograms = [
defineHistogram('pairMass', type='TH1F', path='EXPERT', title="mass of track pairs; m_{#mu#mu} [GeV]", xbins=200, xmin=0, xmax=100),
defineHistogram('nTrk', type='TH1F',path='EXPERT', title="number of tracks input; N tracks", xbins=100, xmin=0, xmax=100),
......@@ -12,15 +12,14 @@ class TrigMultiTrkHypoAlgMTMonitoring(GenericMonitoringTool):
defineHistogram('nPair', type='TH1F',path='EXPERT', title="number of pairs input; N tracks", xbins=100, xmin=0, xmax=100),
defineHistogram('accepted_nPair', type='TH1F', path='EXPERT', title="Number of pairs selected; N selected tracks", xbins=100, xmin=0, xmax=100),
defineHistogram('totCharge', type='TH1F', path='EXPERT', title="Total Charge of tracks", xbins=21, xmin=-10, xmax=10),
defineHistogram('nTrkMass', type='TH1F', path='EXPERT', title="mass of N tracks; mass of N selected tracks [GeV]", xbins=100, xmin=0, xmax=20),
defineHistogram('nTrkFitMass', type='TH1F', path='EXPERT', title="fit mass of N tracks; fit mass of N selected tracks", xbins=100, xmin=0, xmax=20),
defineHistogram('nTrkChi2', type='TH1F', path='EXPERT', title="chi2 fit of N tracks; fit chi2 of N selected tracks", xbins=100, xmin=0, xmax=100),
]
class TrigMultiTrkHypoToolMTMonitoring(GenericMonitoringTool):
class TrigMultiTrkHypoToolMonitoring(GenericMonitoringTool):
def __init__ (self, name):
super(TrigMultiTrkHypoToolMTMonitoring, self).__init__(name)
super(TrigMultiTrkHypoToolMonitoring, self).__init__(name)
self.Histograms = [
defineHistogram('totCharge', type='TH1F', path='EXPERT', title="Total Charge of tracks", xbins=21, xmin=-10, xmax=10),
defineHistogram('CutCounter', type='TH1F', path='EXPERT', title="mass of track pairs; m_{#mu#mu} [GeV]", xbins=5, xmin=-0.5, xmax=4.5),
......
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
/**************************************************************************
**
** File: Trigger/TrigHypothesis/TrigBphysHypo/TrigMultiTrkHypoMT.h
** File: Trigger/TrigHypothesis/TrigBphysHypo/TrigMultiTrkHypo.h
**
** Description: multi-track hypothesis algorithm
** Description: multi-track hypothesis algorithm
**
** Author: H. Russell
**
**************************************************************************/
**************************************************************************/
#ifndef TRIG_TrigMultiTrkHypoMT_H
#define TRIG_TrigMultiTrkHypoMT_H
#ifndef TRIG_TrigMultiTrkHypo_H
#define TRIG_TrigMultiTrkHypo_H
// standard stuff
#include <string>
......@@ -23,7 +23,6 @@
#include "GaudiKernel/StatusCode.h"
#include "xAODMuon/MuonContainer.h"
#include "AthenaBaseComps/AthReentrantAlgorithm.h"
#include "AthViews/View.h"
#include "TrigSteeringEvent/TrigRoiDescriptorCollection.h"
......@@ -32,7 +31,7 @@
#include "DecisionHandling/TrigCompositeUtils.h"
#include "TrigMultiTrkHypoToolMT.h"
#include "TrigMultiTrkHypoTool.h"
#include "TrigBphysHelperUtilsTool.h"
#include "DecisionHandling/HypoBase.h"
......@@ -42,12 +41,15 @@
#include "AthenaMonitoringKernel/Monitored.h"
#include "AthenaMonitoringKernel/GenericMonitoringTool.h"
#include "TrkVKalVrtFitter/TrkVKalVrtFitter.h"
#include "InDetConversionFinderTools/VertexPointEstimator.h"
class TrigMultiTrkHypoMT: public ::HypoBase {
class TrigMultiTrkHypo: public ::HypoBase {
enum { MaxNumberTools = 20 };
public:
TrigMultiTrkHypoMT(const std::string & name, ISvcLocator* pSvcLocator);
~TrigMultiTrkHypoMT();
TrigMultiTrkHypo(const std::string & name, ISvcLocator* pSvcLocator);
~TrigMultiTrkHypo();
virtual StatusCode initialize() override;
virtual StatusCode execute( const EventContext& context ) const override;
......@@ -59,15 +61,15 @@ class TrigMultiTrkHypoMT: public ::HypoBase {
private:
TrigMultiTrkHypoMT();
ToolHandleArray< TrigMultiTrkHypoToolMT > m_hypoTools {this, "HypoTools", {}, "Tools to perform selection"};
TrigMultiTrkHypo();
ToolHandleArray< TrigMultiTrkHypoTool > m_hypoTools {this, "HypoTools", {}, "Tools to perform selection"};
bool passNTracks(int nObjMin,
const std::vector<float> & ptObjMin,
const std::vector<ElementLink<xAOD::TrackParticleContainer> > & inputTrkVec,
std::vector<ElementLink<xAOD::TrackParticleContainer> > & outputTrkVec,
float mindR) const;
SG::ReadHandleKey<xAOD::TrackParticleContainer> m_trackParticleContainerKey{ this,
"trackCollectionKey", // property name
"Tracks", // default value of StoreGate key
......@@ -84,15 +86,15 @@ class TrigMultiTrkHypoMT: public ::HypoBase {
"Output TrigBphysContainer name"};
static bool sortTracks(ElementLink<xAOD::TrackParticleContainer> &l1, ElementLink<xAOD::TrackParticleContainer> &l2)
{
{
return (*l1)->pt() > (*l2)->pt();
}
ToolHandle <TrigBphysHelperUtilsTool> m_bphysHelperTool { this,
"TrigBphysHelperUtilsTool","TrigBphysHelperUtilsTool","Select bphys helper utils tool you want to use"};
//need to implement a timer still!
//TrigTimer* m_BmmHypTot;
xAOD::TrigBphys* fit(const std::vector<ElementLink<xAOD::TrackParticleContainer>>& tracklist) const;
ToolHandle<InDet::VertexPointEstimator> m_vertexPointEstimator{this, "VertexPointEstimator", "", "find starting point for the vertex fitter"};
ToolHandle<Trk::TrkVKalVrtFitter> m_vertexFitter{this, "VertexFitter", "", "VKalVrtFitter tool to fit tracks into the common vertex"};
std::unique_ptr<Trk::IVKalState> m_vertexFitterState;
Gaudi::Property<int> m_nTrk { this, "nTrk",2,"Number of tracks in the vertex"};
Gaudi::Property<int> m_nTrkQ { this, "nTrkCharge",-1,"sum of track charges"}; // if negative - no cut
......@@ -103,15 +105,15 @@ class TrigMultiTrkHypoMT: public ::HypoBase {
Gaudi::Property<std::vector<float>> m_nTrkMassMax { this, "nTrackMassMax", {100000},"list of maxes for nTrk mass windows"};
Gaudi::Property<float> m_mindR { this, "overlapdR",0.01 ,"Minimum dR between tracks (overlap removal)"};
Gaudi::Property<int> m_particleType { this, "particleType", 0, "Types of particles to use. 0 = tracks, 1 = EF Muons, 2 = tbd..."};
Gaudi::Property<std::string> m_trigLevelString { this, "trigLevelString", "", "Trigger Level to set for created TrigBphys objects."};
Gaudi::Property<int> m_particleType { this, "particleType", 0, "Types of particles to use. 0 = tracks, 1 = EF Muons, 2 = tbd..."};
Gaudi::Property<std::string> m_trigLevelString { this, "trigLevelString", "", "Trigger Level to set for created TrigBphys objects."};
ToolHandle< GenericMonitoringTool > m_monTool { this, "MonTool", "", "Monitoring tool" };
xAOD::TrigBphys::levelType m_trigLevel;
};
#endif
#endif // TRIG_TrigMultiTrkHypo_H
// -*- C++ -*-
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
/**************************************************************************
**
** File: Trigger/TrigHypothesis/TrigBPhysHypo/TrigMultiTrkHypoToolMT.cxx
** File: Trigger/TrigHypothesis/TrigBPhysHypo/TrigMultiTrkHypoTool.cxx
**
** Description: Multi-track hypothesis tool for bphys triggers
** Description: Multi-track hypothesis tool for bphys triggers
**
** Author: H. Russell
**
**************************************************************************/
#include "TrigMultiTrkHypoToolMT.h"
#include "TrigMultiTrkHypoTool.h"
#include <math.h>
......@@ -31,17 +29,17 @@
class ISvcLocator;
TrigMultiTrkHypoToolMT::TrigMultiTrkHypoToolMT(const std::string & type,
TrigMultiTrkHypoTool::TrigMultiTrkHypoTool(const std::string & type,
const std::string & name,
const IInterface* parent )
: AthAlgTool( type, name, parent ),
m_decisionId( HLT::Identifier::fromToolName( name ) )
{}
TrigMultiTrkHypoToolMT::~TrigMultiTrkHypoToolMT()
TrigMultiTrkHypoTool::~TrigMultiTrkHypoTool()
{ }
StatusCode TrigMultiTrkHypoToolMT::initialize()
StatusCode TrigMultiTrkHypoTool::initialize()
{
ATH_MSG_DEBUG("AcceptAll = " << (m_acceptAll==true ? "True" : "False") );
ATH_MSG_DEBUG("OppositeCharge = " << (m_oppositeCharge==true ? "True" : "False") );
......@@ -50,19 +48,19 @@ StatusCode TrigMultiTrkHypoToolMT::initialize()
ATH_MSG_DEBUG("ApplyUpperMassCut = " << m_applyUpperMassCut );
ATH_MSG_DEBUG("ApplyChi2Cut = " << m_applyChi2Cut );
ATH_MSG_DEBUG("Chi2VtxCut = " << m_chi2VtxCut );
if ( not m_monTool.name().empty() ) {
ATH_CHECK( m_monTool.retrieve() );
ATH_MSG_DEBUG("m_monTool name: " << m_monTool);
}
if(static_cast<int>(m_ptTrkMin.size()) != m_nTrk){
ATH_MSG_ERROR("Requested " << m_nTrk << " tracks per vertex, but only provided "
<< m_ptTrkMin.size() << " track pTs!");
<< m_ptTrkMin.size() << " track pTs!");
return StatusCode::FAILURE;
} else if(msgLvl(MSG::DEBUG)){
msg() << MSG::DEBUG << "requiring " << m_nTrk << " tracks with pT: ";
for(float pt : m_ptTrkMin) msg() << MSG::INFO << pt <<", ";
msg() << MSG::DEBUG << endmsg;
msg() << MSG::DEBUG << endmsg;
}
ATH_MSG_DEBUG("Initialization completed successfully");
......@@ -72,18 +70,18 @@ StatusCode TrigMultiTrkHypoToolMT::initialize()
//-------------------------------------------------------------------------------------
bool TrigMultiTrkHypoToolMT::decideOnSingleObject( const xAOD::TrigBphys* trigBphys, size_t ) const{
bool TrigMultiTrkHypoTool::decideOnSingleObject( const xAOD::TrigBphys* trigBphys, size_t ) const{
using namespace Monitored;
ATH_MSG_DEBUG( "in TrigMultiTrkHypoToolMT::decideOnSingleObject(), looking at TrigBphys object");
ATH_MSG_DEBUG( "in TrigMultiTrkHypoTool::decideOnSingleObject(), looking at TrigBphys object");
bool thisPassedMassCut = false;
bool thisPassedChi2Cut = false;
bool thisPassedTrkPtCut = false;
bool result = false;
std::vector<float> ini_trkPts(0);
auto mon_cutCounter = Monitored::Scalar<int>("CutCounter",-1);
......@@ -94,10 +92,10 @@ bool TrigMultiTrkHypoToolMT::decideOnSingleObject( const xAOD::TrigBphys* trigBp
auto mon = Monitored::Group( m_monTool, mon_cutCounter, mon_fitChi2, mon_vtxMass, mon_trkPts, mon_totCharge);
mon_cutCounter = 0;
if (trigBphys->particleType() == xAOD::TrigBphys::MULTIMU ) {
ATH_MSG_DEBUG("Got Bphys particle with mass " << trigBphys->mass() << " chi2 : " << trigBphys->fitchi2() );
ATH_MSG_DEBUG("Got Bphys particle with mass " << trigBphys->mass() << " chi2 : " << trigBphys->fitchi2() );
float vertexMass = trigBphys->mass();
thisPassedMassCut = (m_lowerMassCut < vertexMass && ((vertexMass < m_upperMassCut) || (!m_applyUpperMassCut) ));
thisPassedChi2Cut = ((!m_applyChi2Cut) || (trigBphys->fitchi2() < m_chi2VtxCut && trigBphys->fitchi2() >= -1e-10) );
......@@ -117,10 +115,10 @@ bool TrigMultiTrkHypoToolMT::decideOnSingleObject( const xAOD::TrigBphys* trigBp
std::vector<float> trackPts;
for(unsigned int i=0; i < nTrk; i++ ){
const auto tp = trigBphys->trackParticle(i);
ATH_MSG_DEBUG("Track pt/eta/phi/charge: " <<
ATH_MSG_DEBUG("Track pt/eta/phi/charge: " <<
trigBphys->trackParticle(i)->pt() << ", " <<
trigBphys->trackParticle(i)->eta() << ", " <<
trigBphys->trackParticle(i)->phi() << ", " <<
trigBphys->trackParticle(i)->eta() << ", " <<
trigBphys->trackParticle(i)->phi() << ", " <<
trigBphys->trackParticle(i)->charge());
totq += (tp->qOverP() > 0) ? 1 : ((tp->qOverP() < 0) ? -1 : 0);
trackPts.push_back(tp->pt());
......@@ -132,41 +130,41 @@ bool TrigMultiTrkHypoToolMT::decideOnSingleObject( const xAOD::TrigBphys* trigBp
ini_trkPts.push_back(trackPts.at(i)*0.001);
if(trackPts.at(i) > m_ptTrkMin[i]) nTrk_pass++;
ATH_MSG_DEBUG("track pt " << trackPts.at(i) << " >? " << m_ptTrkMin[i]);
}
}
ATH_MSG_DEBUG("Passed " << nTrk_pass << " tracks, out of " << nTrk << " tracks");
if(nTrk_pass == nTrk){
thisPassedTrkPtCut = true;
}
if(!thisPassedMassCut && !thisPassedChi2Cut && !thisPassedTrkPtCut){
ATH_MSG_DEBUG("Did not pass mass & chi2 & trk pT cuts ");
}
}
}
if ( thisPassedMassCut ) {
mon_cutCounter++;
if ( thisPassedChi2Cut ) {
mon_cutCounter++;
if ( thisPassedMassCut ) {
mon_cutCounter++;
if ( thisPassedChi2Cut ) {
mon_cutCounter++;
if ( thisPassedTrkPtCut ){
mon_cutCounter++;
}
}
}
if ( thisPassedMassCut && thisPassedChi2Cut && thisPassedTrkPtCut ) {
result = true;
ATH_MSG_DEBUG("accepting event");
if ( thisPassedMassCut && thisPassedChi2Cut && thisPassedTrkPtCut ) {
result = true;
ATH_MSG_DEBUG("accepting event");
}
ATH_MSG_DEBUG("AcceptAll is set to : " << (m_acceptAll ? "True, taking all events " : "False, applying selection" ));
// Accept-All mode: temporary patch; should be done with force-accept