|
ATLAS Offline Software
|
Go to the documentation of this file.
12 #include "CaloGeoHelpers/CaloSampling.h"
19 #undef JetECPSFractionTool_DEBUG
24 :
asg::AsgTool(myname) {
32 ATH_MSG_ERROR(
"JetECPSFractionTool needs to have its input jet container name configured!");
33 return StatusCode::FAILURE;
40 return StatusCode::SUCCESS;
50 return StatusCode::SUCCESS;
57 double jetECPSEnergy = 0.0;
58 double jetConstitEnergy = 0.0;
60 if ( pcon ==
nullptr ) {
64 const IParticle* ppar = pcon->rawConstituent();
69 double conEnergy = pcon->e();
77 if ( pclu !=
nullptr )
ATH_MSG_VERBOSE(
" Constituent is a PFO pointing to a cluster");
78 else ATH_MSG_WARNING(
" Constituent is cluster-based PFO but the cluster is not found.");
86 ATH_MSG_WARNING(
" Constituent is a FlowElement but not a PFO. This isn't supported; skipping.");
91 if ( pclu !=
nullptr )
ATH_MSG_VERBOSE(
" Constituent is a PFO pointing to a cluster");
92 else ATH_MSG_WARNING(
" Constituent is a non-charge PFO but no cluster is found.");
101 if ( pclu ==
nullptr ) {
111 double layerEnergy = 0.0;
115 ATH_MSG_DEBUG(
"Constit ecps/all/cluster = " << ecpsEnergy <<
"/" << layerEnergy <<
"/" << conEnergy);
118 if ( ecpsEnergy >
m_fraclimit*layerEnergy ) jetECPSEnergy += conEnergy;
119 jetConstitEnergy += conEnergy;
121 if ( jetConstitEnergy <= 0.0 ) {
124 #ifdef JetECPSFractionTool_DEBUG
125 double jetEnergy =
jet.jetP4(
"JetConstitScaleMomentum").e();
126 ATH_MSG_INFO(
"Jet ecps/all/jetE = " << jetECPSEnergy <<
"/" << jetConstitEnergy <<
"/" << jetEnergy);
128 double frac = jetECPSEnergy/jetConstitEnergy;
129 ATH_MSG_DEBUG(
"Jet ecps/all = " << jetECPSEnergy <<
"/" << jetConstitEnergy <<
" = " <<
frac);
double eSample(sampling_type sampling) const
Retrieve energy in a given sampling.
#define ATH_MSG_VERBOSE(x)
Class providing the definition of the 4-vector interface.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
::StatusCode StatusCode
StatusCode definition for legacy code.
FlowElement_v1 FlowElement
Definition of the current "pfo version".
Handle class for adding a decoration to an object.
signal_t signalType() const
Principal data class for CaloCell clusters.
@ ParticleFlow
The object is a particle-flow object.
bool isCharged() const
is a charged PFO
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
Class describing a particle flow object.
#define ATH_MSG_WARNING(x)
const xAOD::IParticle * otherObject(std::size_t i) const
4-vector of jet constituent at the scale used during jet finding.
const CaloCluster * cluster(unsigned int index) const
Retrieve a const pointer to a CaloCluster.
A detector object made of other lower level object(s)