23 return StatusCode::SUCCESS;
31 std::vector<size_t> cluster_indices;
32 cluster_indices.reserve(constituents.
size());
34 for (
const auto *constituent : constituents)
36 cluster_indices.push_back(constituent->rawConstituent()->index());
41 constituentAcc(
"constituentLinks" );
43 constituentWeightAcc(
"constituentWeights" );
46 if( constituentWeightAcc.
isAvailable(
jet) ) constituentWeightAcc(
jet ).resize(0);
50 unsubtractedP4 =
jet.p4();
62 for(
auto index : cluster_indices)
66 jet.addConstituent(cl);
69 subtractedP4+=subtractedClusterP4;
70 ATH_MSG_DEBUG(
"Subracted Cluster #: " << cl->index() <<
" :: E: " << subtractedClusterP4.E() <<
" :: Eta: " << subtractedClusterP4.Eta() <<
" :: Phi: " << subtractedClusterP4.Phi());
75 subtractedOriginCorrP4+=subtractedOriginCorrClusterP4;
76 ATH_MSG_DEBUG(
"Subrtracted OC Cluster #: " << cl->index() <<
" :: E: " << subtractedOriginCorrClusterP4.E() <<
" :: Eta: " << subtractedOriginCorrClusterP4.Eta() <<
" :: Phi: " << subtractedOriginCorrClusterP4.Phi());
82 if(subtractedP4.E()/std::cosh(subtractedP4.Eta()) < E_min)
84 subtractedP4=unsubtractedP4;
88 if(subtractedOriginCorrP4.E()/std::cosh(subtractedOriginCorrP4.Eta()) < E_min &&
m_originCorrection )
90 subtractedOriginCorrP4=unsubtractedP4;
91 subtractedOriginCorrP4*=1e-7;
94 subtractedJet4vec.SetCoordinates(subtractedP4.Pt(),subtractedP4.Eta(),
95 subtractedP4.Phi(),subtractedP4.M());
99 subtractedOriginCorrJet4vec.SetCoordinates(subtractedOriginCorrP4.Pt(),subtractedOriginCorrP4.Eta(),
100 subtractedOriginCorrP4.Phi(),subtractedOriginCorrP4.M());
102 jet.setJetP4(subtractedOriginCorrJet4vec);
107 jet.setJetP4(subtractedJet4vec);
#define ATH_CHECK
Evaluate an expression and check for errors.
This file defines helper classes to deal with jet constituents.
Handle class for reading from StoreGate.
const T * at(size_type n) const
Access an element, as an rvalue.
JetModifierBase(const std::string &myname)
Ctor.
SG::Accessor< T, ALLOC > Accessor
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
const_pointer_type get() const
Dereference the pointer, but don't cache anything.
TLorentzVector FourMom_t
Definition of the 4-momentum type.
A vector of jet constituents at the scale used during jet finding.
size_t size() const
number of constituents
constexpr const char * unsubtractedJetState()
constexpr xAOD::JetConstitScale subtractedOriginCorrectedConstitState()
constexpr const char * subtractedJetState()
TLorentzVector getClusterP4(const xAOD::CaloCluster *cl, xAOD::CaloCluster::State s)
: getClusterP4 Added during Rel22 migration.
constexpr const char * subtractedOriginCorrectedJetState()
constexpr xAOD::CaloCluster::State subtractedClusterState()
constexpr xAOD::JetConstitScale subtractedConstitState()
constexpr xAOD::CaloCluster::State subtractedOriginCorrectedClusterState()
Jet_v1 Jet
Definition of the current "jet version".
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.