ATLAS Offline Software
TrigMultiTrkComboHypoTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 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 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
TrigMultiTrkComboHypoTool::m_acceptAll
Gaudi::Property< bool > m_acceptAll
Definition: TrigMultiTrkComboHypoTool.h:64
TrigMultiTrkComboHypoTool::passedDeltaRcut
bool passedDeltaRcut(const xAOD::TrigBphys *) const
Definition: TrigMultiTrkComboHypoTool.cxx:203
TrigMultiTrkComboHypoTool::m_deltaRMax
Gaudi::Property< float > m_deltaRMax
Definition: TrigMultiTrkComboHypoTool.h:67
max
#define max(a, b)
Definition: cfImp.cxx:41
TrigMultiTrkComboHypoTool::passed
bool passed(const xAOD::TrigBphys *) const
Definition: TrigMultiTrkComboHypoTool.cxx:75
TrigMultiTrkComboHypoTool::m_sigmaLxyCut
Gaudi::Property< float > m_sigmaLxyCut
Definition: TrigMultiTrkComboHypoTool.h:66
TrigCompositeUtils.h
Base_Fragment.mass
mass
Definition: Sherpa_i/share/common/Base_Fragment.py:59
TrigMultiTrkComboHypoTool::m_trkPt
Gaudi::Property< std::vector< double > > m_trkPt
Definition: TrigMultiTrkComboHypoTool.h:60
TrigMultiTrkComboHypoTool::TrigMultiTrkComboHypoTool
TrigMultiTrkComboHypoTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TrigMultiTrkComboHypoTool.cxx:27
TrigMultiTrkComboHypoTool::passedChargeCut
bool passedChargeCut(int charge) const
Definition: TrigMultiTrkComboHypoTool.h:57
TrigMultiTrkComboHypoTool::m_isMuonTrkPEB
Gaudi::Property< bool > m_isMuonTrkPEB
Definition: TrigMultiTrkComboHypoTool.h:73
ComboHypoToolBase
Base class for tools which cut on properties of multi-object or multi-leg chains. User should derive ...
Definition: ComboHypoToolBase.h:26
TrigMultiTrkComboHypoTool::m_massRange
Gaudi::Property< std::pair< double, double > > m_massRange
Definition: TrigMultiTrkComboHypoTool.h:62
GenericMonitoringTool.h
TrigMultiTrkComboHypoTool::initialize
virtual StatusCode initialize() override
Definition: TrigMultiTrkComboHypoTool.cxx:31
TrigMultiTrkComboHypoTool::isInMassRange
bool isInMassRange(double mass) const
Definition: TrigMultiTrkComboHypoTool.cxx:195
TrigMultiTrkComboHypoTool::passedPtCut
bool passedPtCut(const xAOD::TrigBphys *) const
Definition: TrigMultiTrkComboHypoTool.cxx:219
TrigMultiTrkComboHypoTool::m_isCombinedChain
Gaudi::Property< bool > m_isCombinedChain
Definition: TrigMultiTrkComboHypoTool.h:71
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TrigMultiTrkComboHypoTool
Definition: TrigMultiTrkComboHypoTool.h:34
TrigBphys.h
TrigMultiTrkComboHypoTool::m_deltaRMin
Gaudi::Property< float > m_deltaRMin
Definition: TrigMultiTrkComboHypoTool.h:69
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:522
test_pyathena.parent
parent
Definition: test_pyathena.py:15
TrigMultiTrkComboHypoTool::m_nTrk
Gaudi::Property< unsigned int > m_nTrk
Definition: TrigMultiTrkComboHypoTool.h:59
TrigMultiTrkComboHypoTool::m_isMergedElectronChain
Gaudi::Property< bool > m_isMergedElectronChain
Definition: TrigMultiTrkComboHypoTool.h:72
xAOD::TrigComposite_v1
Class used to describe composite objects in the HLT.
Definition: TrigComposite_v1.h:52
TrigMultiTrkComboHypoTool::m_legDecisionIDs
std::vector< TrigCompositeUtils::DecisionID > m_legDecisionIDs
Definition: TrigMultiTrkComboHypoTool.h:77
Monitored.h
Header file to be included by clients of the Monitored infrastructure.
ComboHypoToolBase.h
TrigMultiTrkComboHypoTool::passedChi2Cut
bool passedChi2Cut(int chi2) const
Definition: TrigMultiTrkComboHypoTool.h:56
TrigMultiTrkComboHypoTool::decideOnSingleObject
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(....
Definition: TrigMultiTrkComboHypoTool.cxx:118
TrigMultiTrkComboHypoTool::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: TrigMultiTrkComboHypoTool.h:75
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
charge
double charge(const T &p)
Definition: AtlasPID.h:538
TrigMultiTrkComboHypoTool::m_legMultiplicities
Gaudi::Property< std::vector< unsigned int > > m_legMultiplicities
Definition: TrigMultiTrkComboHypoTool.h:74
TrigMultiTrkComboHypoTool::m_totalCharge
Gaudi::Property< int > m_totalCharge
Definition: TrigMultiTrkComboHypoTool.h:61
TrigMultiTrkComboHypoTool::executeAlg
virtual bool executeAlg(const std::vector< Combo::LegDecision > &) const override
Only a dummy implementation exists in ComboHypoToolBase.
Definition: TrigMultiTrkComboHypoTool.cxx:239
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TrigMultiTrkComboHypoTool::checkPreviousDecisionIDs
bool checkPreviousDecisionIDs(const std::vector< const TrigCompositeUtils::DecisionIDContainer * > &) const
Definition: TrigMultiTrkComboHypoTool.cxx:146
TrigMultiTrkComboHypoTool::totalCharge
int totalCharge(const xAOD::TrigBphys *) const
Definition: TrigMultiTrkComboHypoTool.cxx:229
HLTIdentifier.h
TrigMultiTrkComboHypoTool::m_chi2
Gaudi::Property< float > m_chi2
Definition: TrigMultiTrkComboHypoTool.h:63
TrigBphysContainer.h
TrigMultiTrkComboHypoTool::m_LxyCut
Gaudi::Property< float > m_LxyCut
Definition: TrigMultiTrkComboHypoTool.h:65
xAOD::TrigBphys_v1
Class describing a Bphysics online composite object.
Definition: TrigBphys_v1.h:44