19 const EventContext& )
const {
20 tau.clearClusterLinks();
22 if (tau.jet() ==
nullptr) {
24 return StatusCode::FAILURE;
30 std::vector<const xAOD::CaloCluster*> clusterList =
getClusterList(*jetSeed);
33 if (cluster ==
nullptr) {
34 ATH_MSG_WARNING(
"Find cluster with nullptr, please check the configuration !");
39 auto original_cluster_link = acc_originalObject(*cluster);
40 if (!original_cluster_link.isValid()){
43 cluster = *original_cluster_link;
48 if (cluster->rawE() <= 0.)
continue;
54 tau.addClusterLink(linkToCluster);
57 return StatusCode::SUCCESS;
63 std::vector<const xAOD::CaloCluster*> clusterList;
68 ATH_MSG_DEBUG(
"eta: " << constituent->eta() <<
" phi: " << constituent->phi() <<
" e: " << constituent->e());
73 ATH_MSG_DEBUG(
"eta: " << cluster->
eta() <<
" phi: " << cluster->
phi() <<
" e: " << cluster->
e());
83 clusterList.push_back(cluster);
113 if ( std::find(clusterList.begin(), clusterList.end(), cluster) == clusterList.end() ) {
114 clusterList.push_back(cluster);
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_WARNING(x,...)
ElementLink implementation for ROOT usage.
bool toContainedElement(BaseConstReference container, ElementType element)
Set link to point to given element (slowest).
Helper class to provide constant type-safe access to aux data.
Gaudi::Property< bool > m_useOrigCluster
virtual StatusCode executeTool(xAOD::TauJet &tau, const EventContext &ctx) const override
Execute - called for each tau candidate.
TauClusterFinder(const std::string &name)
Constructor.
std::vector< const xAOD::CaloCluster * > getClusterList(const xAOD::Jet &jet) const
virtual double eta() const
The pseudorapidity ( ) of the particle.
virtual double e() const
The total energy of the particle.
virtual double phi() const
The azimuthal angle ( ) of the particle.
std::size_t nOtherObjects() const
const xAOD::IParticle * otherObject(std::size_t i) const
Class providing the definition of the 4-vector interface.
A vector of jet constituents at the scale used during jet finding.
4-vector of jet constituent at the scale used during jet finding.
@ FlowElement
The object is a track-calo-cluster.
@ CaloCluster
The object is a calorimeter cluster.
Jet_v1 Jet
Definition of the current "jet version".
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
FlowElement_v1 FlowElement
Definition of the current "pfo version".
const IParticle * getOriginalObject(const IParticle ©)
This function can be used to conveniently get a pointer back to the original object from which a copy...
TauJet_v3 TauJet
Definition of the current "tau version".
DataVector< IParticle > IParticleContainer
Simple convenience declaration of IParticleContainer.