21 if (tau.
jet() ==
nullptr) {
23 return StatusCode::FAILURE;
29 std::vector<const xAOD::CaloCluster*> clusterList =
getClusterList(*jetSeed);
32 if (cluster ==
nullptr) {
33 ATH_MSG_WARNING(
"Find cluster with nullptr, please check the configuration !");
38 auto original_cluster_link = acc_originalObject(*cluster);
39 if (!original_cluster_link.isValid()){
42 cluster = *original_cluster_link;
47 if (cluster->rawE() <= 0.)
continue;
56 return StatusCode::SUCCESS;
62 std::vector<const xAOD::CaloCluster*> clusterList;
67 ATH_MSG_DEBUG(
"eta: " << constituent->eta() <<
" phi: " << constituent->phi() <<
" e: " << constituent->e());
72 ATH_MSG_DEBUG(
"eta: " << cluster->
eta() <<
" phi: " << cluster->
phi() <<
" e: " << cluster->
e());
82 clusterList.push_back(cluster);
112 if ( std::find(clusterList.begin(), clusterList.end(), cluster) == clusterList.end() ) {
113 clusterList.push_back(cluster);
#define ATH_MSG_WARNING(x)
ElementLink implementation for ROOT usage.
bool toContainedElement(BaseConstReference data, ElementType element, IProxyDict *sg=0)
Set from element pointer and a reference to the container (storable)
Helper class to provide constant type-safe access to aux data.
virtual StatusCode execute(xAOD::TauJet &tau) const override
Execution of this tool.
Gaudi::Property< bool > m_useOrigCluster
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.
void clearClusterLinks()
Remove all clusters from the tau.
void addClusterLink(const ElementLink< IParticleContainer > &tr)
add a cluster link to the tau
@ 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.