Commit afd2331c authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

Merge branch 'master-TrigMultiTrkComboHypo' into 'master'

TrigBphysHypo: TrigMultiTrkHypo algorithm is modified to be used as ComboHypo at muComb and muEFCB steps of BLS trigger chains (ATR-20836, ATR-21092, ATR-21112)

See merge request atlas/athena!31872
parents 9b9beaea 5510e31e
# 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 TrigBphysHypo.TrigBphysHypoConf import TrigMultiTrkComboHypo, TrigMultiTrkComboHypoTool
from TrigBphysHypo.TrigMultiTrkComboHypoMonitoringConfig import TrigMultiTrkComboHypoMonitoring, TrigMultiTrkComboHypoToolMonitoring
from AthenaCommon.Logging import logging
log = logging.getLogger('TrigMultiTrkHypoConfig')
def TrigMultiTrkHypoToolFromDict(chainDict):
config = TrigMultiTrkHypoConfig()
tool = config.ConfigurationHypoTool(chainDict)
log = logging.getLogger('TrigMultiTrkComboHypoConfig')
def DimuL2ComboHypoCfg(name):
log.debug('DimuL2ComboHypoCfg.name = %s ', name)
config = TrigMultiTrkComboHypoConfig()
hypo = config.ConfigurationComboHypo(
trigSequenceName = 'Dimu',
trigLevel = 'L2',
trackCollection='HLT_IDTrack_Muon_FTF')
return hypo
def DimuEFComboHypoCfg(name):
from TriggerMenuMT.HLTMenuConfig.Muon.MuonSetup import muonNames
log.debug('DimuEFComboHypoCfg.name = %s ', name)
config = TrigMultiTrkComboHypoConfig()
hypo = config.ConfigurationComboHypo(
trigSequenceName = 'Dimu',
trigLevel = 'EF',
muonCollection = muonNames().getNames('RoI').EFCBName)
return hypo
def TrigMultiTrkComboHypoToolFromDict(chainDict):
config = TrigMultiTrkComboHypoConfig()
tool = config.ConfigurationComboHypoTool(chainDict)
return tool
class TrigMultiTrkComboHypoConfig(object):
class TrigMultiTrkHypoConfig(object):
def ConfigurationHypo(self, trigSequenceName='Dimu', trigLevel='L2', trackCollection='', muonCollection=''):
def ConfigurationComboHypo(self, trigSequenceName='Dimu', trigLevel='L2', trackCollection='', muonCollection=''):
trigLevelDict = {'L2':0, 'EF':1}
try:
value = trigLevelDict[trigLevel]
log.debug('TrigMultiTrkHypo.trigLevel = %s ', value)
log.debug('TrigMultiTrkComboHypo.trigLevel = %s ', value)
except KeyError:
log.error('TrigMultiTrkHypo.trigLevel should be L2 or EF, but %s provided.', trigLevel)
log.error('TrigMultiTrkComboHypo.trigLevel should be L2 or EF, but %s provided.', trigLevel)
from TrkExTools.AtlasExtrapolator import AtlasExtrapolator
from TrkVKalVrtFitter.TrkVKalVrtFitterConf import Trk__TrkVKalVrtFitter
......@@ -41,26 +60,29 @@ class TrigMultiTrkHypoConfig(object):
MaxPhi = [ 10000., 10000., 10000.],
MaxChi2OfVtxEstimation = 2000.)
tool = TrigMultiTrkHypo(
name = trigSequenceName+'HypoAlg'+trigLevel,
tool = TrigMultiTrkComboHypo(
name = trigSequenceName+trigLevel+'ComboHypo',
trigLevel = trigLevel,
nTracks = 2,
massRanges = [ (100., 20000.) ],
TrackCollectionKey = trackCollection,
MuonCollectionKey = muonCollection,
TrigBphysCollectionKey = ('TrigBphys' if trigLevel == 'L2' else 'TrigBphysEF') + trigSequenceName,
VertexFitter = VertexFitter,
VertexPointEstimator = VertexPointEstimator,
MonTool = TrigMultiTrkHypoMonitoring('TrigMultiTrkHypoMonitoring_'+trigSequenceName+trigLevel))
CheckMultiplicityMap = False,
MonTool = TrigMultiTrkComboHypoMonitoring('TrigMultiTrkComboHypoMonitoring_'+trigSequenceName+trigLevel))
if trigLevel == 'EF':
tool.TrigBphysCollectionKey = 'HLT_'+trigSequenceName+trigLevel
return tool
def ConfigurationHypoTool(self, chainDict):
def ConfigurationComboHypoTool(self, chainDict):
topoAlgs = chainDict['chainName']
log.debug("Set for algorithm %s", topoAlgs)
tool = TrigMultiTrkHypoTool(topoAlgs)
tool = TrigMultiTrkComboHypoTool(topoAlgs)
if 'nocut' in topoAlgs:
tool.AcceptAll = True
......@@ -71,7 +93,6 @@ class TrigMultiTrkHypoConfig(object):
tool.ApplyUpperMassCut = True
tool.ApplyChi2Cut = True
tool.Chi2VtxCut = 20
tool.nBphysObjects = 1
tool.trkPtThresholds = getBphysThresholds(chainDict)
if 'bJpsimumu' in topoAlgs:
......@@ -91,7 +112,7 @@ class TrigMultiTrkHypoConfig(object):
tool.LowerMassCut = 100 #MeV
tool.UpperMassCut = 14000 #MeV
tool.MonTool = TrigMultiTrkHypoToolMonitoring('MonTool')
tool.MonTool = TrigMultiTrkComboHypoToolMonitoring('MonTool')
return tool
......
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool, defineHistogram
class TrigMultiTrkComboHypoMonitoring(GenericMonitoringTool):
def __init__ (self, name):
super(TrigMultiTrkComboHypoMonitoring, self).__init__(name)
if 'L2' in name:
self.Histograms = [
defineHistogram('nTrk', type='TH1F', path='EXPERT', title="number of tracks in input views", xbins=100, xmin=0, xmax=100),
defineHistogram('nAcceptedTrk', type='TH1F', path='EXPERT', title="number of selected input tracks", xbins=100, xmin=0, xmax=100),
defineHistogram('acceptance', type='TH1F',path='EXPERT', title="filter acceptance", xbins=2, xmin=0, xmax=2),
defineHistogram('TIME_all', type='TH1F', path='EXPERT', title='execution time; [microseconds]', xbins=100, xmin=0, xmax=1000),
]
elif 'EF' in name:
self.Histograms = [
defineHistogram('nTrk', type='TH1F', path='EXPERT', title="number of tracks in input views", xbins=100, xmin=0, xmax=100),
defineHistogram('nAcceptedTrk', type='TH1F', path='EXPERT', title="number of selected input tracks", xbins=100, xmin=0, xmax=100),
defineHistogram('nCombination', type='TH1F',path='EXPERT', title="number of track combinations before mass preselection", xbins=100, xmin=0, xmax=100),
defineHistogram('nCombinationBeforeFit', type='TH1F', path='EXPERT', title="number of inputs to the vertex fitter", xbins=100, xmin=0, xmax=100),
defineHistogram('nBPhysObject', type='TH1F', path='EXPERT', title="number of fitted BPhysObjects", xbins=100, xmin=0, xmax=100),
defineHistogram('trkMassBeforeFit', type='TH1F', path='EXPERT', title="mass of track combinations BEFORE fit [GeV]", xbins=200, xmin=0, xmax=100),
defineHistogram('bphysChi2', type='TH1F', path='EXPERT', title="chi2 fit of N tracks; fit chi2 of N selected tracks", xbins=100, xmin=0, xmax=100),
defineHistogram('bphysFitMass', type='TH1F', path='EXPERT', title="fit mass of N tracks; fit mass of N selected tracks [GeV]", xbins=100, xmin=0, xmax=20),
defineHistogram('bphysMass', type='TH1F', path='EXPERT', title="mass of N tracks; mass of N selected tracks [GeV]", xbins=100, xmin=0, xmax=20),
defineHistogram('bphysCharge', type='TH1F', path='EXPERT', title="total charge of N tracks", xbins=20, xmin=-10, xmax=10),
defineHistogram('TIME_all', type='TH1F', path='EXPERT', title='execution time; [microseconds]', xbins=100, xmin=0, xmax=1000),
]
class TrigMultiTrkComboHypoToolMonitoring(GenericMonitoringTool):
def __init__ (self, name):
super(TrigMultiTrkComboHypoToolMonitoring, 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),
defineHistogram('FitChi2', type='TH1F', path='EXPERT', title="chi2 fit of N tracks; fit chi2 of N selected tracks", xbins=100, xmin=0, xmax=100),
defineHistogram('VertexMass', type='TH1F', path='EXPERT', title="Number of tracks selected; N selected tracks", xbins=100, xmin=0, xmax=20),
defineHistogram('trackPts', type='TH1F', path='EXPERT', title="pair mass of N tracks; pair mass of N selected tracks [GeV]", xbins=100, xmin=0, xmax=20)
]
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool, defineHistogram
class TrigMultiTrkHypoMonitoring(GenericMonitoringTool):
def __init__ (self, name):
super(TrigMultiTrkHypoMonitoring, self).__init__(name)
self.Histograms = [
defineHistogram('nTrk', type='TH1F', path='EXPERT', title="number of tracks in input views", xbins=100, xmin=0, xmax=100),
defineHistogram('nAcceptedTrk', type='TH1F', path='EXPERT', title="number of selected input tracks", xbins=100, xmin=0, xmax=100),
defineHistogram('nCombination', type='TH1F',path='EXPERT', title="number of track combinations before mass preselection", xbins=100, xmin=0, xmax=100),
defineHistogram('nCombinationBeforeFit', type='TH1F', path='EXPERT', title="number of inputs to the vertex fitter", xbins=100, xmin=0, xmax=100),
defineHistogram('nBPhysObject', type='TH1F', path='EXPERT', title="number of fitted BPhysObjects", xbins=100, xmin=0, xmax=100),
defineHistogram('trkMassBeforeFit', type='TH1F', path='EXPERT', title="mass of track combinations BEFORE fit [GeV]", xbins=200, xmin=0, xmax=100),
defineHistogram('bphysChi2', type='TH1F', path='EXPERT', title="chi2 fit of N tracks; fit chi2 of N selected tracks", xbins=100, xmin=0, xmax=100),
defineHistogram('bphysFitMass', type='TH1F', path='EXPERT', title="fit mass of N tracks; fit mass of N selected tracks [GeV]", xbins=100, xmin=0, xmax=20),
defineHistogram('bphysMass', type='TH1F', path='EXPERT', title="mass of N tracks; mass of N selected tracks [GeV]", xbins=100, xmin=0, xmax=20),
defineHistogram('bphysCharge', type='TH1F', path='EXPERT', title="total charge of N tracks", xbins=20, xmin=-10, xmax=10),
defineHistogram('TIME_all', type='TH1F', path='EXPERT', title='execution time; [microseconds]', xbins=100, xmin=0, xmax=100),
]
class TrigMultiTrkHypoToolMonitoring(GenericMonitoringTool):
def __init__ (self, 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),
defineHistogram('FitChi2', type='TH1F', path='EXPERT', title="chi2 fit of N tracks; fit chi2 of N selected tracks", xbins=100, xmin=0, xmax=100),
defineHistogram('VertexMass', type='TH1F', path='EXPERT', title="Number of tracks selected; N selected tracks", xbins=100, xmin=0, xmax=20),
defineHistogram('trackPts', type='TH1F', path='EXPERT', title="pair mass of N tracks; pair mass of N selected tracks [GeV]", xbins=100, xmin=0, xmax=20)
]
......@@ -4,7 +4,7 @@
/**************************************************************************
**
** File: Trigger/TrigHypothesis/TrigBphysHypo/TrigMultiTrkHypo.h
** File: Trigger/TrigHypothesis/TrigBphysHypo/TrigMultiTrkComboHypo.h
**
** Description: multi-track hypothesis algorithm
**
......@@ -12,8 +12,8 @@
**
**************************************************************************/
#ifndef TRIG_TrigMultiTrkHypo_H
#define TRIG_TrigMultiTrkHypo_H
#ifndef TRIG_TrigMultiTrkComboHypo_H
#define TRIG_TrigMultiTrkComboHypo_H
#include <string>
#include <vector>
......@@ -22,13 +22,14 @@
#include "GaudiKernel/Property.h"
#include "xAODTracking/TrackParticleContainer.h"
#include "xAODMuon/MuonContainer.h"
#include "xAODTrigger/TrigComposite.h"
#include "xAODTrigBphys/TrigBphysContainer.h"
#include "StoreGate/ReadHandleKey.h"
#include "StoreGate/WriteHandleKey.h"
#include "TrigCompositeUtils/TrigCompositeUtils.h"
#include "DecisionHandling/HypoBase.h"
#include "DecisionHandling/ComboHypo.h"
#include "TrkVKalVrtFitter/TrkVKalVrtFitter.h"
#include "InDetConversionFinderTools/VertexPointEstimator.h"
......@@ -36,13 +37,13 @@
#include "AthenaMonitoringKernel/Monitored.h"
#include "AthenaMonitoringKernel/GenericMonitoringTool.h"
#include "TrigMultiTrkHypoTool.h"
#include "TrigMultiTrkComboHypoTool.h"
class TrigMultiTrkHypo: public ::HypoBase {
class TrigMultiTrkComboHypo: public ::ComboHypo {
public:
TrigMultiTrkHypo(const std::string& name, ISvcLocator* pSvcLocator);
TrigMultiTrkHypo() = delete;
TrigMultiTrkComboHypo(const std::string& name, ISvcLocator* pSvcLocator);
TrigMultiTrkComboHypo() = delete;
virtual StatusCode initialize() override;
virtual StatusCode execute(const EventContext& context) const override;
......@@ -53,7 +54,8 @@ class TrigMultiTrkHypo: public ::HypoBase {
bool isReEntrant() const override { return false; }
private:
StatusCode executeL2(const EventContext& context) const;
StatusCode executeEF(const EventContext& context) const;
xAOD::TrigBphys* fit(const std::vector<ElementLink<xAOD::TrackParticleContainer>>& tracklist) const;
bool isIdenticalTracks(const xAOD::TrackParticle* lhs, const xAOD::TrackParticle* rhs) const;
bool isInMassRange(double mass) const;
......@@ -61,7 +63,6 @@ class TrigMultiTrkHypo: public ::HypoBase {
SG::ReadHandleKey<xAOD::TrackParticleContainer>
m_trackParticleContainerKey {this, "TrackCollectionKey", "Tracks", "input TrackParticle container name"};
SG::ReadHandleKey<xAOD::MuonContainer>
m_muonContainerKey {this, "MuonCollectionKey", "CBCombinedMuon", "input EF Muon container name"};
......@@ -80,9 +81,10 @@ class TrigMultiTrkHypo: public ::HypoBase {
ToolHandle<InDet::VertexPointEstimator> m_vertexPointEstimator {this, "VertexPointEstimator", "", "tool to find starting point for the vertex fitter"};
ToolHandle<Trk::TrkVKalVrtFitter> m_vertexFitter {this, "VertexFitter", "", "VKalVrtFitter tool to fit tracks into the common vertex"};
ToolHandleArray<TrigMultiTrkHypoTool> m_hypoTools {this, "HypoTools", {}, "tools to perform selection"};
ToolHandle<GenericMonitoringTool> m_monTool {this, "MonTool", "", "monitoring tool"};
TrigCompositeUtils::DecisionIDContainer m_allowedIDs;
};
#endif // TRIG_TrigMultiTrkHypo_H
#endif // TRIG_TrigMultiTrkComboHypo_H
......@@ -6,40 +6,22 @@
**
** 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
** Author: Heather Russell
**
**************************************************************************/
#include "TrigMultiTrkHypoTool.h"
#include "TrigMultiTrkComboHypoTool.h"
#include <math.h>
#include <cmath>
// additions of xAOD objects
#include "xAODTracking/TrackParticle.h"
#include "xAODTrigBphys/TrigBphys.h"
#include "xAODTrigBphys/TrigBphysContainer.h"
TrigMultiTrkComboHypoTool::TrigMultiTrkComboHypoTool(const std::string& type, const std::string& name, const IInterface* parent)
: ComboHypoToolBase(type, name, parent) {}
#include "AthenaMonitoringKernel/Monitored.h"
#include "TrigCompositeUtils/TrigCompositeUtils.h"
class ISvcLocator;
TrigMultiTrkHypoTool::TrigMultiTrkHypoTool(const std::string & type,
const std::string & name,
const IInterface* parent )
: AthAlgTool( type, name, parent ),
m_decisionId( HLT::Identifier::fromToolName( name ) )
{}
TrigMultiTrkHypoTool::~TrigMultiTrkHypoTool()
{ }
StatusCode TrigMultiTrkHypoTool::initialize()
StatusCode TrigMultiTrkComboHypoTool::initialize()
{
ATH_MSG_DEBUG("AcceptAll = " << (m_acceptAll==true ? "True" : "False") );
if(m_TotChargeCut >=0)ATH_MSG_DEBUG("Total Charge Cut = " << m_TotChargeCut);
......@@ -70,8 +52,7 @@ StatusCode TrigMultiTrkHypoTool::initialize()
}
//-------------------------------------------------------------------------------------
bool TrigMultiTrkHypoTool::decideOnSingleObject( const xAOD::TrigBphys* trigBphys, size_t ) const{
bool TrigMultiTrkComboHypoTool::passed(const xAOD::TrigBphys* trigBphys) const {
using namespace Monitored;
......@@ -125,7 +106,7 @@ bool TrigMultiTrkHypoTool::decideOnSingleObject( const xAOD::TrigBphys* trigBphy
trackPts.push_back(tp->pt());
}
mon_totCharge = totq;
thisPassedChargeCut = m_TotChargeCut <= -1 || (std::abs(totq) != m_TotChargeCut);
thisPassedChargeCut = m_TotChargeCut <= -1 || (std::abs(totq) == m_TotChargeCut);
if(thisPassedChargeCut){
ATH_MSG_DEBUG("Passed charge cut with " << totq);
}
......@@ -172,40 +153,25 @@ bool TrigMultiTrkHypoTool::decideOnSingleObject( const xAOD::TrigBphys* trigBphy
return result;
}
StatusCode TrigMultiTrkHypoTool::inclusiveSelection(std::vector<TrigMultiTrkHypoTool::TrigMultiTrkInfo>& toolInput) const{
for ( auto& i: toolInput ) {
//should this be configured to do something slightly differently? maybe we don't want the previous decision to pass this way??
ATH_MSG_DEBUG("what is this? " << m_decisionId.numeric()); //hashing of the chain name
//Make sure that BOTH tracks come from a previous muon that passed (for this chain)
//How could this not happen? no idea!
if ( TrigCompositeUtils::passed( m_decisionId.numeric(), i.previousDecisionIDs0 ) &&
TrigCompositeUtils::passed( m_decisionId.numeric(), i.previousDecisionIDs1 ) ) {
if ( decideOnSingleObject( i.trigBphys, 0 )==true ) {
ATH_MSG_DEBUG("Passed through selection, decisionID:" << m_decisionId );
TrigCompositeUtils::addDecisionID(m_decisionId, i.decision);
} else {
ATH_MSG_DEBUG("Didn't pass through selection, decisionID:" << m_decisionId );
}
} else {
ATH_MSG_DEBUG("Didn't pass previous decision, decisionID:" << m_decisionId );
}
}
return StatusCode::SUCCESS;
}
StatusCode TrigMultiTrkHypoTool::decide( std::vector<TrigMultiTrkHypoTool::TrigMultiTrkInfo> &input) const {
StatusCode TrigMultiTrkComboHypoTool::decideOnSingleObject(Decision* decision, const std::vector<DecisionIDContainer*>& previousDecisionIDs) const {
ATH_CHECK( decision->hasObjectLink(TrigCompositeUtils::featureString()) );
if ( m_nBphysObjects == 1 ) {
return inclusiveSelection( input );
} else {
ATH_MSG_WARNING("TrigMultiTrkHypoTool is not configured to do multiple dimuon objects selection.");
ATH_MSG_WARNING("Clever overlap removal needed to ensure that dimuon objectss do not contain identical RoIs!");
ATH_MSG_WARNING("I'm returning the inclusive selection result!");
return inclusiveSelection( input );
auto trigBphysEL = decision->objectLink<xAOD::TrigBphysContainer>(TrigCompositeUtils::featureString());
ATH_CHECK( trigBphysEL.isValid() );
ATH_CHECK( previousDecisionIDs.size() == legDecisionIds().size() );
for (size_t i = 0; i < previousDecisionIDs.size(); ++i) {
if (!TrigCompositeUtils::passed(legDecisionId(i).numeric(), *previousDecisionIDs[i])) {
ATH_MSG_DEBUG( "Didn't pass previous decision: " << legDecisionId(i) );
return StatusCode::SUCCESS;
}
}
}
if (passed(*trigBphysEL)) {
TrigCompositeUtils::addDecisionID(decisionId(), decision);
}
return StatusCode::SUCCESS;
}
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
/**************************************************************************
**
** File: Trigger/TrigHypothesis/TrigBphysHypo/TrigMultiTrkComboHypoTool.h
**
** Description: multi-track hypothesis tool
**
** Author: Heather Russell
**
**************************************************************************/
#ifndef TRIG_TrigMultiTrkComboHypoTool_H
#define TRIG_TrigMultiTrkComboHypoTool_H
#include <string>
#include <vector>
#include "DecisionHandling/ComboHypoToolBase.h"
#include "xAODTrigBphys/TrigBphys.h"
#include "xAODTrigBphys/TrigBphysContainer.h"
#include "TrigCompositeUtils/HLTIdentifier.h"
#include "TrigCompositeUtils/TrigCompositeUtils.h"
#include "AthenaMonitoringKernel/Monitored.h"
#include "AthenaMonitoringKernel/GenericMonitoringTool.h"
using TrigCompositeUtils::Decision;
using TrigCompositeUtils::DecisionIDContainer;
class TrigMultiTrkComboHypoTool: public ComboHypoToolBase {
public:
TrigMultiTrkComboHypoTool(const std::string& type, const std::string& name, const IInterface* parent);
virtual StatusCode initialize() override;
virtual StatusCode decideOnSingleObject(Decision*, const std::vector<DecisionIDContainer*>&) const override;
private:
bool passed(const xAOD::TrigBphys*) const;
virtual bool executeAlg(std::vector<LegDecision>&) const override { return true; }
// Mass window cuts
Gaudi::Property<int> m_nTrk { this, "nTrk",2,"Number of tracks in the vertex"};
Gaudi::Property< int > m_TotChargeCut{this, "TotChargeCut", 0, "The Magnitude of the total charge to accept, negative is none" };
Gaudi::Property< float > m_lowerMassCut{this, "LowerMassCut", -99. , "Lower mass cut for vertex " };
Gaudi::Property< float > m_upperMassCut{this, "UpperMassCut", -99. , "Upper mass cut for vertex" };
Gaudi::Property< bool >m_applyUpperMassCut{this, "ApplyUpperMassCut", false, "Apply the upper mass cut" };
Gaudi::Property< bool > m_applyChi2Cut{this, "ApplyChi2Cut", false, "Apply a chi2 cut to vertex" };
Gaudi::Property< float > m_chi2VtxCut{this, "Chi2VtxCut", -99. , "Chi2 cut for vertex (0 < chi2 < cut)" };
Gaudi::Property<std::vector<float>> m_ptTrkMin { this, "trkPtThresholds", {3650, 3650} ,"minimum track pTs (one per track, sorted descending!)"};
// to set Accept-All mode: should be done with force-accept when possible
Gaudi::Property< bool > m_acceptAll {this, "AcceptAll", false, "Ignore selection" };
ToolHandle<GenericMonitoringTool> m_monTool { this, "MonTool", "", "Monitoring tool" };
};
#endif // TRIG_TrigMultiTrkComboHypoTool_H
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
/**************************************************************************
**
** File: Trigger/TrigHypothesis/TrigBphysHypo/TrigMultiTrkHypoTool.h
**
** Description: multi track hypothesis tool
**
** Author: H. Russell
**
**************************************************************************/
#ifndef TRIG_TrigMultiTrkHypoTool_H
#define TRIG_TrigMultiTrkHypoTool_H
// standard stuff
#include <string>
// general athena stuff
#include "GaudiKernel/MsgStream.h"
#include "GaudiKernel/IToolSvc.h"
#include "GaudiKernel/StatusCode.h"
#include "Constants.h"
#include "AthenaBaseComps/AthAlgTool.h"
#include "TrigCompositeUtils/HLTIdentifier.h"
#include "CLHEP/Units/SystemOfUnits.h"
#include "xAODTrigBphys/TrigBphys.h"
#include "xAODTrigBphys/TrigBphysContainer.h"
#include "TrigCompositeUtils/TrigCompositeUtils.h"
#include "AthenaMonitoringKernel/GenericMonitoringTool.h"
#include "TrigCompositeUtils/Combinators.h"
class TrigMultiTrkHypoTool: public ::AthAlgTool {
enum { MaxNumberTools = 20 };
public:
TrigMultiTrkHypoTool(const std::string& type,
const std::string & name,
const IInterface* parent );
virtual ~TrigMultiTrkHypoTool();
struct TrigMultiTrkInfo {
TrigMultiTrkInfo( TrigCompositeUtils::Decision* d, const xAOD::TrigBphys* c,
const TrigCompositeUtils::DecisionIDContainer previousDecisionIDs0,
const TrigCompositeUtils::DecisionIDContainer previousDecisionIDs1 )
: decision( d ),
trigBphys( c ),
previousDecisionIDs0 ( previousDecisionIDs0 ),
previousDecisionIDs1( previousDecisionIDs1 )
{}
TrigCompositeUtils::Decision* decision;
const xAOD::TrigBphys* trigBphys;
const TrigCompositeUtils::DecisionIDContainer previousDecisionIDs0;
const TrigCompositeUtils::DecisionIDContainer previousDecisionIDs1;
};
virtual StatusCode initialize() override;
virtual StatusCode decide(std::vector<TrigMultiTrkHypoTool::TrigMultiTrkInfo>& toolInput) const;
bool decideOnSingleObject(const xAOD::TrigBphys* trigBphys, size_t cutIndex) const;
StatusCode inclusiveSelection(std::vector<TrigMultiTrkHypoTool::TrigMultiTrkInfo>& toolInput) const;
private:
HLT::Identifier m_decisionId;
// Mass window cuts
Gaudi::Property<int> m_nTrk { this, "nTrk",2,"Number of tracks in the vertex"};
Gaudi::Property< int > m_TotChargeCut{this, "TotChargeCut", 0, "The Magnitude of the total charge to accept, negative is none" };
Gaudi::Property< float > m_lowerMassCut{this, "LowerMassCut", -99. , "Lower mass cut for vertex " };
Gaudi::Property< float > m_upperMassCut{this, "UpperMassCut", -99. , "Upper mass cut for vertex" };
Gaudi::Property< bool >m_applyUpperMassCut{this, "ApplyUpperMassCut", false, "Apply the upper mass cut" };
Gaudi::Property< bool > m_applyChi2Cut{this, "ApplyChi2Cut", false, "Apply a chi2 cut to vertex" };
Gaudi::Property< float > m_chi2VtxCut{this, "Chi2VtxCut", -99. , "Chi2 cut for vertex (0 < chi2 < cut)" };
Gaudi::Property< int > m_nBphysObjects {this, "nBphysObjects", 1, "Number of good b-phys objects required per event" };
Gaudi::Property<std::vector<float>> m_ptTrkMin { this, "trkPtThresholds", {3650, 3650} ,"minimum track pTs (one per track, sorted descending!)"};
// to set Accept-All mode: should be done with force-accept when possible
Gaudi::Property< bool > m_acceptAll {this, "AcceptAll", false, "Ignore selection" };
ToolHandle< GenericMonitoringTool > m_monTool { this, "MonTool", "", "Monitoring tool" };
};
#endif // TRIG_TrigMultiTrkHypoTool_H
......@@ -31,8 +31,8 @@
#include "../TrigEFMultiMuFex.h"
#include "../TrigEFTrkMassFex.h"
#include "src/TrigMultiTrkHypo.h"
#include "src/TrigMultiTrkHypoTool.h"
#include "src/TrigMultiTrkComboHypo.h"
#include "src/TrigMultiTrkComboHypoTool.h"