6#ifndef TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECTOOLS_TCCHELPERS_H
7#define TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECTOOLS_TCCHELPERS_H
8#include "GaudiKernel/MsgStream.h"
61 std::map<const xAOD::TrackParticle*, bool> isIsolatedMatchedTrack;
63 if( ! pfo->isCharged() )
continue;
67 asg::msgUserCode::ANA_MSG_ERROR(
"TCCHelpers.h: Dense environ variable not found, skipping given FE");
70 if(acc_isInDenseEnvironment(*pfo)==1){
76 isIsolatedMatchedTrack[pfoTrack] =
true;
80 asg::msgUserCode::ANA_MSG_ERROR(
"TCCHelpers.h m_linkdecorkey is not initialised in the struct to do anything, not sure what this means? Skip this case");
83 const EventContext& ctx =Gaudi::Hive::currentContext();
87 asg::msgUserCode::ANA_MSG_ERROR(
"TCCHelpers.h: no link between track and cluster. We need these links : "<<
m_linkdecorkey->key());
92 if (isIsolatedMatchedTrack.find(trk) != isIsolatedMatchedTrack.end() )
continue;
102 const auto& clustLinks=trackcalodecor(*trk);
103 if(clustLinks.empty() ){
109 for(
const auto& clLink : clustLinks) {
115 if(pfo->pt()<=0.)
continue;
118 if ( orig_pfo.
isAvailable(*pfo) ) pfo_orig = *orig_pfo( *pfo ) ;
121 if( !(std::abs(pfo_orig->
eta() - cluster->
rawEta() )<0.01 && std::abs( pfo_orig->
phi() - cluster->
rawPhi() )<0.01))
continue;
123 if( ! pfo->isCharged() ){
SG::ConstAccessor< T, ALLOC > ConstAccessor
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Handle class for reading a decoration on an object.
bool isPresent() const
Is the referenced container present in SG?
flt_t rawPhi() const
Get in signal state UNCALIBRATED.
flt_t rawEta() const
Get in signal state UNCALIBRATED.
Class providing the definition of the 4-vector interface.
virtual double eta() const =0
The pseudorapidity ( ) of the particle.
virtual double phi() const =0
The azimuthal angle ( ) of the particle.
\bried Internal helper class for TCC & UFO building.
FlowElementContainer_v1 FlowElementContainer
Definition of the current "pfo container 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:
Implements a loop over tracks and pflow object to build UFOs.
const SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > * m_linkdecorkey
std::string m_orig_FlowElemK
virtual ~CombinedUFOLoop()
const CP::ITrackVertexAssociationTool * m_trackVertexAssoTool
virtual void processPFO(const xAOD::TrackParticle *trk, const xAOD::FlowElement *pfo)=0
virtual void processTrk(const xAOD::TrackParticle *trk)=0
virtual void combinedUFOLoop(const TrackCaloClusterInfo *tccInfo, const xAOD::FlowElementContainer *pfos)
std::string m_clustersLinkK
Holds all the necessary information to build TrackCaloCluster objects.
const xAOD::TrackParticleContainer * allTracks