Matches a muon to a jet via ghost association or a delta-R.
More...
#include <MuJetGhostDRMatcher.h>
|
| void | initMessaging () const |
| | Initialize our message level and MessageSvc.
|
Matches a muon to a jet via ghost association or a delta-R.
Ghost association is done by looking for the muon's ID track in the jet's list of ghost tracks. The Delta-R matching is implemented via the DeltaRMatcher. The final result is a match if either the ghost association or the delta-R succeeds.
- Author
- Steve Farrell Steve.nosp@m.n.Fa.nosp@m.rrell.nosp@m.@cer.nosp@m.n.ch
Definition at line 37 of file MuJetGhostDRMatcher.h.
◆ MyTrackDef
◆ MuJetGhostDRMatcher()
| ORUtils::MuJetGhostDRMatcher::MuJetGhostDRMatcher |
( |
double | dR, |
|
|
bool | useRapidity = true ) |
Constructor takes same arguments as the DeltaRMatcher.
Definition at line 23 of file MuJetGhostDRMatcher.cxx.
24 : asg::AsgMessaging("MuJetGhostDRMatcher"),
25 m_drMatcher (std::make_unique<DeltaRMatcher>(dR, useRapidity))
26 {
28 }
std::unique_ptr< IParticleAssociator > m_drMatcher
The delta-R matcher.
◆ initMessaging()
| void AthMessaging::initMessaging |
( |
| ) |
const |
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
40{
42
43 if (
m_lvl == MSG::NIL) {
47 }
48}
std::string m_nm
Message source name.
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
std::atomic< MSG::Level > m_lvl
Current logging level.
IMessageSvc * getMessageSvc(bool quiet=false)
◆ msg() [1/2]
| MsgStream & asg::AsgMessaging::msg |
( |
| ) |
const |
|
inherited |
The standard message stream.
- Returns
- A reference to the default message stream of this object.
Definition at line 49 of file AsgMessaging.cxx.
49 {
50#ifndef XAOD_STANDALONE
51 return ::AthMessaging::msg();
52#else
53 return m_msg;
54#endif
55 }
◆ msg() [2/2]
| MsgStream & asg::AsgMessaging::msg |
( |
const MSG::Level | lvl | ) |
const |
|
inherited |
The standard message stream.
- Parameters
-
| lvl | The message level to set the stream to |
- Returns
- A reference to the default message stream, set to level "lvl"
Definition at line 57 of file AsgMessaging.cxx.
57 {
58#ifndef XAOD_STANDALONE
59 return ::AthMessaging::msg( lvl );
60#else
61 m_msg << lvl;
62 return m_msg;
63#endif
64 }
◆ msgLvl()
| bool asg::AsgMessaging::msgLvl |
( |
const MSG::Level | lvl | ) |
const |
|
inherited |
Test the output level of the object.
- Parameters
-
| lvl | The message level to test against |
- Returns
- boolean Indicting if messages at given level will be printed
-
true If messages at level "lvl" will be printed
Definition at line 41 of file AsgMessaging.cxx.
41 {
42#ifndef XAOD_STANDALONE
43 return ::AthMessaging::msgLvl( lvl );
44#else
45 return m_msg.msgLevel( lvl );
46#endif
47 }
◆ objectsMatch() [1/2]
Definition at line 37 of file IObjectAssociator.h.
virtual bool objectsMatch(columnar::Particle1Id p1, columnar::Particle2Id p2, bool swapArgs=false) const =0
Test association between two IParticles.
◆ objectsMatch() [2/2]
Check for a match via ghost association or delta-R.
Implements ORUtils::IParticleAssociator.
Definition at line 51 of file MuJetGhostDRMatcher.cxx.
54 {
55 if (swapArgs) {
57 return false;
58 }
59
60
61
63 {
66 return false;
67 }
70 return false;
71 }
72 }
73
74
77 return true;
78 }
79
80
82 if(!muTrk) return false;
83
84
86 if(ghostLink.has_value() && muTrk == ghostLink) {
88 return true;
89 }
90 }
91
92 return false;
93 }
#define ATH_MSG_WARNING(x)
columnar::Particle2Accessor< std::vector< columnar::LinkCastColumn< MyTrackDef, xAOD::IParticleContainer > > > m_ghostAcc
columnar::Particle1Accessor< columnar::ObjectLink< MyTrackDef > > m_muonTrkAcc
@ Jet
The object is a jet.
@ Muon
The object is a muon.
static constexpr bool isXAOD
Whether this is the xAOD mode.
◆ setLevel()
| void AthMessaging::setLevel |
( |
MSG::Level | lvl | ) |
|
|
inherited |
◆ setObjectTypes()
Set the object types to be used in the association.
Implements ORUtils::IParticleAssociator.
Definition at line 32 of file MuJetGhostDRMatcher.cxx.
34 {
36 ATH_MSG_ERROR(
"First particle arg to setObjectTypes is not a muon!");
37 return StatusCode::FAILURE;
38 }
40 ATH_MSG_ERROR(
"Second particle arg to setObjectTypes is not a jet!");
41 return StatusCode::FAILURE;
42 }
45 return StatusCode::SUCCESS;
46 }
#define ATH_CHECK
Evaluate an expression and check for errors.
◆ ATLAS_THREAD_SAFE
| std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ m_drMatcher
◆ m_ghostAcc
◆ m_imsg
| std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_lvl
| std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ m_msg_tls
| boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
◆ m_muonTrkAcc
◆ m_nm
| std::string AthMessaging::m_nm |
|
privateinherited |
The documentation for this class was generated from the following files: