ATLAS Offline Software
Loading...
Searching...
No Matches
TrigMultiTrkComboHypoTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5/**************************************************************************
6 **
7 ** File: Trigger/TrigHypothesis/TrigBphysHypo/TrigMultiTrkComboHypoTool.h
8 **
9 ** Description: multi-track hypothesis tool
10 **
11 ** Author: Heather Russell
12 **
13 **************************************************************************/
14
15#ifndef TRIG_TrigMultiTrkComboHypoTool_H
16#define TRIG_TrigMultiTrkComboHypoTool_H
17
18#include <string>
19#include <vector>
20#include <cmath>
21
23
26
29
32
33
35 public:
36 TrigMultiTrkComboHypoTool(const std::string& type, const std::string& name, const IInterface* parent);
37 virtual StatusCode initialize() override;
38 virtual StatusCode decideOnSingleObject(TrigCompositeUtils::Decision*, const std::vector<const TrigCompositeUtils::DecisionIDContainer*>&) const override;
39
40 private:
41 bool passed(const xAOD::TrigBphys*) const;
42 virtual bool executeAlg(const std::vector<Combo::LegDecision>&, const EventContext&) const override;
43 bool checkPreviousDecisionIDs(const std::vector<const TrigCompositeUtils::DecisionIDContainer*>&) const;
44 int totalCharge(const xAOD::TrigBphys*) const;
45 bool isInMassRange(double mass) const;
46 bool passedDeltaRcut(const xAOD::TrigBphys*) const;
47 bool passedPtCut(const xAOD::TrigBphys*) const;
48 inline bool passedChi2Cut(int chi2) const { return (m_chi2 < 0. || chi2 < m_chi2); }
49 inline bool passedChargeCut(int charge) const { return (m_totalCharge < 0 || std::abs(charge) == m_totalCharge); }
50
51 Gaudi::Property<unsigned int> m_nTrk {this, "nTrk", 2, "number of tracks in the vertex"};
52 Gaudi::Property<std::vector<double>> m_trkPt {this, "trackPtThresholds", {-1., 3000.}, "minimum track transverse momenta (as they appear in TrigBphys)"};
53 Gaudi::Property<int> m_totalCharge {this, "totalCharge", 0, "magnitude of the total charge to accept, negative is none" };
54 Gaudi::Property<std::pair<double, double>> m_massRange {this, "massRange", {-99., -9.}, "range for the fitted mass, no selection applied if negative"};
55 Gaudi::Property<float> m_chi2 {this, "chi2", -99. , "Chi2 cut for vertex (0 < chi2 < cut), no selection applied if negative" };
56 Gaudi::Property<bool> m_acceptAll {this, "AcceptAll", false, "if AcceptAll flag is set to true, no selection will be applied for xAOD::TrigBphys object"};
57 Gaudi::Property<float> m_LxyCut {this, "LxyCut", -99., "Applies an Lxy Cut if set >= 0"};
58 Gaudi::Property<float> m_sigmaLxyCut {this, "sigmaLxyCut", -99., "Applies an Lxy/LxyError Cut if set >= 0"};
59 Gaudi::Property<float> m_deltaRMax {this, "deltaRMax", std::numeric_limits<float>::max(),
60 "maximum deltaR between tracks in a candidate"};
61 Gaudi::Property<float> m_deltaRMin {this, "deltaRMin", std::numeric_limits<float>::lowest(),
62 "maximum deltaR between tracks in a candidate"};
63 Gaudi::Property<bool> m_isCombinedChain {this, "isCombinedChain", false, "true for chains with different signatures, e.g. HLT_e9_mu6"};
64 Gaudi::Property<bool> m_isMergedElectronChain {this, "isMergedElectronChain", false, "true for close-by electrons, e.g. HLT_e5_lhvloose_L1BPH-0DR3-EM7J15"};
65 Gaudi::Property<bool> m_isMuonTrkPEB {this, "isMuonTrkPEB", false, "chains like HLT_mu6_bJpsimutrk_MuonTrkPEB_L1MU5VF"};
66 Gaudi::Property<std::vector<unsigned int>> m_legMultiplicities {this, "legMultiplicities", {2}, "taken from dict[chainMultiplicities]"};
67 ToolHandle<GenericMonitoringTool> m_monTool {this, "MonTool", "", "Monitoring tool" };
68
69 std::vector<TrigCompositeUtils::DecisionID> m_legDecisionIDs;
70};
71
72#endif // TRIG_TrigMultiTrkComboHypoTool_H
double charge(const T &p)
Definition AtlasPID.h:997
Header file to be included by clients of the Monitored infrastructure.
ComboHypoToolBase(const std::string &type, const std::string &name, const IInterface *parent)
Gaudi::Property< float > m_LxyCut
virtual bool executeAlg(const std::vector< Combo::LegDecision > &, const EventContext &) const override
Only a dummy implementation exists in ComboHypoToolBase.
int totalCharge(const xAOD::TrigBphys *) const
bool passedDeltaRcut(const xAOD::TrigBphys *) const
ToolHandle< GenericMonitoringTool > m_monTool
Gaudi::Property< float > m_chi2
virtual StatusCode decideOnSingleObject(TrigCompositeUtils::Decision *, const std::vector< const TrigCompositeUtils::DecisionIDContainer * > &) const override
Alternate method called by BPhysics ComboHypoAlgs instead of the base method decide(....
bool checkPreviousDecisionIDs(const std::vector< const TrigCompositeUtils::DecisionIDContainer * > &) const
Gaudi::Property< std::pair< double, double > > m_massRange
Gaudi::Property< float > m_sigmaLxyCut
Gaudi::Property< bool > m_isMergedElectronChain
Gaudi::Property< bool > m_acceptAll
Gaudi::Property< unsigned int > m_nTrk
Gaudi::Property< float > m_deltaRMax
Gaudi::Property< std::vector< unsigned int > > m_legMultiplicities
bool passedPtCut(const xAOD::TrigBphys *) const
Gaudi::Property< float > m_deltaRMin
TrigMultiTrkComboHypoTool(const std::string &type, const std::string &name, const IInterface *parent)
Gaudi::Property< std::vector< double > > m_trkPt
Gaudi::Property< bool > m_isCombinedChain
bool passedChargeCut(int charge) const
Gaudi::Property< int > m_totalCharge
virtual StatusCode initialize() override
Gaudi::Property< bool > m_isMuonTrkPEB
bool passed(const xAOD::TrigBphys *) const
std::vector< TrigCompositeUtils::DecisionID > m_legDecisionIDs
double chi2(TH1 *h0, TH1 *h1)
TrigBphys_v1 TrigBphys
Definition TrigBphys.h:18