ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
PFlow
PFlowUtils
Root
FEMuonHelper.cxx
Go to the documentation of this file.
1
#include "
PFlowUtils/FEMuonHelper.h
"
2
3
FEMuonHelper::FEMuonHelper
() :
AsgMessaging
(
"FEMuonHelper"
) {};
4
5
bool
FEMuonHelper::checkMuonLinks
(
const
std::vector <
ElementLink< xAOD::MuonContainer >
>& FE_MuonLinks,
const
std::string& qualityString)
const
{
6
7
for
(
const
ElementLink<xAOD::MuonContainer>
&
MuonLink
: FE_MuonLinks){
8
if
(!
MuonLink
.isValid()){
9
ATH_MSG_WARNING
(
"JetPFlowSelectionAlg encountered an invalid muon element link. Skipping. "
);
10
continue
;
11
}
12
13
//Details of muon working points are here:
14
//https://twiki.cern.ch/twiki/bin/view/Atlas/MuonSelectionTool
15
const
xAOD::Muon
* muon = *
MuonLink
;
16
xAOD::Muon::Quality quality = xAOD::Muon::Quality::VeryLoose;
17
18
if
(qualityString ==
"Loose"
) quality = xAOD::Muon::Quality::Loose;
19
else
if
(qualityString ==
"Medium"
) quality = xAOD::Muon::Quality::Medium;
20
else
if
(qualityString ==
"Tight"
) quality = xAOD::Muon::Quality::Tight;
21
22
if
( muon->quality() <= quality && muon->muonType() == xAOD::Muon::MuonType::Combined ){
23
return
true
;
24
}
25
}
26
27
return
false
;
28
}
29
30
TLorentzVector
FEMuonHelper::adjustNeutralCaloEnergy
(
const
std::vector<double>& clusterMuonEnergyFracs,
const
xAOD::FlowElement
& theFE)
const
{
31
32
double
totalMuonCaloEnergy = 0.0;
33
for
(
auto
energy : clusterMuonEnergyFracs ) totalMuonCaloEnergy += energy;
34
35
TLorentzVector newP4;
36
newP4.SetPxPyPzE(theFE.
p4
().Px(),theFE.
p4
().Py(),theFE.
p4
().Pz(),theFE.
e
() - totalMuonCaloEnergy);
37
return
newP4;
38
39
}
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition
AthMsgStreamMacros.h:32
MuonLink
ElementLink< xAOD::MuonContainer > MuonLink
Definition
BPhysHelper.cxx:21
FEMuonHelper.h
ElementLink< xAOD::MuonContainer >
FEMuonHelper::FEMuonHelper
FEMuonHelper()
Definition
FEMuonHelper.cxx:3
FEMuonHelper::checkMuonLinks
bool checkMuonLinks(const std::vector< ElementLink< xAOD::MuonContainer > > &FE_MuonLinks, const std::string &qualityString) const
Verify if at least one combined muon in a list passes the relevant quality criteria Details of muon w...
Definition
FEMuonHelper.cxx:5
FEMuonHelper::adjustNeutralCaloEnergy
TLorentzVector adjustNeutralCaloEnergy(const std::vector< double > &clusterMuonEnergyFracs, const xAOD::FlowElement &theFE) const
Definition
FEMuonHelper.cxx:30
asg::AsgMessaging::AsgMessaging
AsgMessaging(const std::string &name)
Constructor with a name.
Definition
AsgMessaging.cxx:17
xAOD::FlowElement_v1::e
virtual double e() const override
The total energy of the particle.
Definition
FlowElement_v1.cxx:25
xAOD::FlowElement_v1::p4
virtual FourMom_t p4() const override
The full 4-momentum of the particle.
Definition
FlowElement_v1.cxx:33
xAOD::FlowElement
FlowElement_v1 FlowElement
Definition of the current "pfo version".
Definition
FlowElement.h:16
xAOD::Muon
Muon_v1 Muon
Reference the current persistent version:
Definition
Event/xAOD/xAODMuon/xAODMuon/Muon.h:13
Generated on
for ATLAS Offline Software by
1.17.0