63 return StatusCode::SUCCESS;
75 return StatusCode::FAILURE;
81 return StatusCode::FAILURE;
83 return StatusCode::SUCCESS;
90 std::vector<const xAOD::IParticle*>& tclist,
101 TLorentzVector clusterP4 = cluster->
p4();
106 clusterP4 = vertexedCluster.
p4();
109 if (clusterP4.DeltaR(tauAxis) > 0.2)
continue;
111 tclist.push_back(particle);
114 return StatusCode::SUCCESS;
119 std::vector<const xAOD::IParticle*>& constlist,
124 if(tauTrk->trackLinks().empty() || !tauTrk->trackLinks().at(0).isValid()){
125 ATH_MSG_DEBUG(
"Skipping absent tau track, probably thinned");
130 ATH_MSG_VERBOSE(
"Accept tau track " << trk <<
" px, py = " << trk->
p4().Px() <<
", " << trk->
p4().Py());
131 constlist.push_back(trk);
135 return StatusCode::SUCCESS;
140 std::vector<const xAOD::IParticle*>& pfolist,
142 std::map<const IParticle*,MissingETBase::Types::constvec_t> &,
const EventContext&)
const
146 TLorentzVector momentum;
147 for(
const auto *
const pfo : *constits.
pfoCont) {
149 if (!pfo->isCharged()) {
158 if(ttrk->trackLinks().empty() || !ttrk->trackLinks().at(0).isValid()){
159 ATH_MSG_DEBUG(
"Skipping absent tau track, probably thinned");
173 pfolist.push_back(pfo);
176 return StatusCode::SUCCESS;
180 std::vector<const xAOD::IParticle*>& felist,
182 std::map<const IParticle*,MissingETBase::Types::constvec_t> &,
const EventContext& ctx)
const
190 return StatusCode::SUCCESS;
195 std::vector<const xAOD::IParticle*>& felist,
201 std::vector<FELink_t> nFELinks;
202 std::vector<FELink_t> cFELinks;
206 nFELinks=neutralFEReadDecorHandle(*tau);
207 cFELinks=chargedFEReadDecorHandle(*tau);
210 for (
const FELink_t& feLink : cFELinks) {
211 if (!feLink.isValid())
continue;
213 for (
const auto *
const fe : *constits.
feCont){
214 if (fe->index() == fe_init->index() && fe->
isCharged()){
217 ATH_MSG_DEBUG(
"Accept cFE with pt " << fe->pt() <<
", e " << fe->e() <<
", eta " << fe->eta() <<
", phi " << fe->phi() );
218 felist.push_back(fe);
225 for (
const FELink_t& feLink : nFELinks) {
226 if (!feLink.isValid())
continue;
228 for (
const auto *
const fe : *constits.
feCont){
229 if (fe->index() == fe_init->index() && !fe->
isCharged()){
230 if( ( !fe->isCharged()&& fe->e() > FLT_MIN ) ){
231 ATH_MSG_DEBUG(
"Accept nFE with pt " << fe->pt() <<
", e " << fe->e() <<
", eta " << fe->eta() <<
", phi " << fe->phi() <<
" in sum.");
232 felist.push_back(fe);
239 return StatusCode::SUCCESS;
245 std::vector<const xAOD::IParticle*>& felist,
250 ATH_MSG_ERROR(
"Tau seed jet link is invalid. Cannot extract FlowElements.");
251 return StatusCode::FAILURE;
254 TLorentzVector momentum;
266 if(ttrk->trackLinks().empty() || !ttrk->trackLinks().at(0).isValid()){
267 ATH_MSG_DEBUG(
"Skipping absent tau track, probably thinned");
281 felist.push_back(pfo);
284 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
Evaluate cluster kinematics with a different vertex / signal state.
ElementLink< xAOD::TauJetContainer > TauLink_t
ElementLink< xAOD::FlowElementContainer > FELink_t
ElementLink implementation for ROOT usage.
bool isValid() const
Check if the element can be found.
Helper class to provide constant type-safe access to aux data.
Handle class for reading a decoration on an object.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
SG::ReadHandleKey< xAOD::TauJetContainer > m_tauContKey
StatusCode extractFEs(const xAOD::TauJet *tau, std::vector< const xAOD::IParticle * > &felist, const met::METAssociator::ConstitHolder &constits) const
METTauAssociator()
Default constructor:
StatusCode extractTopoClusters(const xAOD::IParticle *obj, std::vector< const xAOD::IParticle * > &tclist, const met::METAssociator::ConstitHolder &constits, const EventContext &ctx) const final
StatusCode extractFEsFromLinks(const xAOD::TauJet *tau, std::vector< const xAOD::IParticle * > &felist, const met::METAssociator::ConstitHolder &constits, const EventContext &ctx) const
StatusCode extractPFO(const xAOD::IParticle *obj, std::vector< const xAOD::IParticle * > &pfolist, const met::METAssociator::ConstitHolder &constits, std::map< const xAOD::IParticle *, MissingETBase::Types::constvec_t > &momenta, const EventContext &ctx) const final
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
StatusCode extractTracks(const xAOD::IParticle *obj, std::vector< const xAOD::IParticle * > &constlist, const met::METAssociator::ConstitHolder &constits) const final
SG::ReadDecorHandleKey< xAOD::TauJetContainer > m_neutralFEReadDecorKey
StatusCode extractFE(const xAOD::IParticle *obj, std::vector< const xAOD::IParticle * > &felist, const met::METAssociator::ConstitHolder &constits, std::map< const xAOD::IParticle *, MissingETBase::Types::constvec_t > &momenta, const EventContext &ctx) const final
StatusCode executeTool(xAOD::MissingETContainer *metCont, xAOD::MissingETAssociationMap *metMap, const EventContext &ctx) const final
SG::ReadDecorHandleKey< xAOD::TauJetContainer > m_chargedFEReadDecorKey
virtual FourMom_t p4() const
The full 4-momentum of the particle.
virtual FourMom_t p4() const final
The full 4-momentum of the particle.
Evaluate cluster kinematics with a different vertex / signal state.
const xAOD::IParticle * chargedObject(std::size_t i) const
virtual double e() const override
The total energy of the particle.
virtual FourMom_t p4() const override
The full 4-momentum of the particle.
Class providing the definition of the 4-vector interface.
virtual FourMom_t p4() const
The full 4-momentum of the particle.
virtual double pt() const
The transverse momentum ( ) of the particle.
const JetLink_t & jetLink() const
const Vertex * vertex() const
std::vector< const IParticle * > clusters() const
virtual Type::ObjectType type() const
The type of the object as a simple enumeration.
std::vector< const TauTrack * > tracks(TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged) const
Get the v<const pointer> to a given tauTrack collection associated with this tau.
virtual FourMom_t p4() const override final
The full 4-momentum of the particle.
const Amg::Vector3D & position() const
Returns the 3-pos.
bool match(std::string s1, std::string s2)
match the individual directories of two strings
static const SG::ConstAccessor< char > PVMatchedAcc("matchedToPV")
bool isInDeltaR(const xAOD::IParticle &p1, const xAOD::IParticle &p2, double dR, bool useRapidity=true)
Check if 2 xAOD::IParticle are in a cone.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
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".
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Vertex_v1 Vertex
Define the latest version of the vertex class.
TauTrack_v1 TauTrack
Definition of the current version.
TauJet_v3 TauJet
Definition of the current "tau version".
MissingETContainer_v1 MissingETContainer
MissingETAssociationMap_v1 MissingETAssociationMap
Version control by type defintion.