68 return StatusCode::SUCCESS;
80 return StatusCode::FAILURE;
86 return StatusCode::FAILURE;
88 return StatusCode::SUCCESS;
95 std::vector<const xAOD::IParticle*>& tclist,
106 TLorentzVector clusterP4 = cluster->
p4();
111 clusterP4 = vertexedCluster.
p4();
114 if (clusterP4.DeltaR(tauAxis) > 0.2)
continue;
116 tclist.push_back(particle);
119 return StatusCode::SUCCESS;
124 std::vector<const xAOD::IParticle*>& constlist,
129 if(tauTrk->trackLinks().empty() || !tauTrk->trackLinks().at(0).isValid()){
130 ATH_MSG_DEBUG(
"Skipping absent tau track, probably thinned");
135 ATH_MSG_VERBOSE(
"Accept tau track " << trk <<
" px, py = " << trk->
p4().Px() <<
", " << trk->
p4().Py());
136 constlist.push_back(trk);
140 return StatusCode::SUCCESS;
145 std::vector<const xAOD::IParticle*>& pfolist,
147 std::map<const IParticle*,MissingETBase::Types::constvec_t> &)
const
151 TLorentzVector momentum;
152 for(
const auto *
const pfo : *constits.
pfoCont) {
154 if (!pfo->isCharged()) {
163 if(ttrk->trackLinks().empty() || !ttrk->trackLinks().at(0).isValid()){
164 ATH_MSG_DEBUG(
"Skipping absent tau track, probably thinned");
178 pfolist.push_back(pfo);
181 return StatusCode::SUCCESS;
185 std::vector<const xAOD::IParticle*>& felist,
187 std::map<const IParticle*,MissingETBase::Types::constvec_t> &)
const
195 return StatusCode::SUCCESS;
200 std::vector<const xAOD::IParticle*>& felist,
206 std::vector<FELink_t> nFELinks;
207 std::vector<FELink_t> cFELinks;
211 nFELinks=neutralFEReadDecorHandle(*tau);
212 cFELinks=chargedFEReadDecorHandle(*tau);
215 for (
const FELink_t& feLink : cFELinks) {
216 if (!feLink.isValid())
continue;
218 for (
const auto *
const fe : *constits.
feCont){
219 if (fe->index() == fe_init->
index() && fe->isCharged()){
222 ATH_MSG_DEBUG(
"Accept cFE with pt " << fe->pt() <<
", e " << fe->e() <<
", eta " << fe->eta() <<
", phi " << fe->phi() );
223 felist.push_back(fe);
230 for (
const FELink_t& feLink : nFELinks) {
231 if (!feLink.isValid())
continue;
233 for (
const auto *
const fe : *constits.
feCont){
234 if (fe->index() == fe_init->
index() && !fe->isCharged()){
235 if( ( !fe->isCharged()&& fe->e() > FLT_MIN ) ){
236 ATH_MSG_DEBUG(
"Accept nFE with pt " << fe->pt() <<
", e " << fe->e() <<
", eta " << fe->eta() <<
", phi " << fe->phi() <<
" in sum.");
237 felist.push_back(fe);
244 return StatusCode::SUCCESS;
250 std::vector<const xAOD::IParticle*>& felist,
255 ATH_MSG_ERROR(
"Tau seed jet link is invalid. Cannot extract FlowElements.");
256 return StatusCode::FAILURE;
259 TLorentzVector momentum;
271 if(ttrk->trackLinks().empty() || !ttrk->trackLinks().at(0).isValid()){
272 ATH_MSG_DEBUG(
"Skipping absent tau track, probably thinned");
286 felist.push_back(pfo);
289 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
Test to see if the link can be dereferenced.
SG::ConstAccessor< T, ALLOC > ConstAccessor
size_t index() const
Return the index of this element within its container.
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.
StatusCode executeTool(xAOD::MissingETContainer *metCont, xAOD::MissingETAssociationMap *metMap) const final
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 final
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 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
StatusCode extractFEsFromLinks(const xAOD::TauJet *tau, std::vector< const xAOD::IParticle * > &felist, const met::METAssociator::ConstitHolder &constits) const
SG::ReadDecorHandleKey< xAOD::TauJetContainer > m_neutralFEReadDecorKey
SG::ReadDecorHandleKey< xAOD::TauJetContainer > m_chargedFEReadDecorKey
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 final
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.