|
ATLAS Offline Software
|
Go to the documentation of this file.
26 return StatusCode::SUCCESS;
35 ATH_CHECK( tccInfo.
record( std::make_unique<TrackCaloClusterInfo>() ) );
46 if(!vertices->
empty()) {
47 tccInfo->
pv0=(*vertices)[0];
50 return StatusCode::FAILURE;
56 return StatusCode::SUCCESS;
62 std::multimap <const xAOD::IParticle*, const xAOD::TrackParticle*> clusterToTracksMap;
68 const auto & clustLinks = clusterLinks( *trk );
69 if(clustLinks.empty() )
continue;
71 for(
const auto& clLink : clustLinks) {
73 clusterToTracksMap.insert(std::make_pair(cluster, trk));
76 totalP4 += cluster->
p4();
82 for (std::pair<const xAOD::IParticle*, const xAOD::TrackParticle*>
entry : clusterToTracksMap)
90 totalP4 +=
entry.second->p4() * (cluster_pt/totalcluster_pt);
94 return StatusCode::SUCCESS;
111 std::multimap <const xAOD::IParticle*, const xAOD::TrackParticle*>
pfoToTracksMap;
121 totalP4 += pfo->
p4();
166 return StatusCode::SUCCESS;
187 ATH_MSG_VERBOSE(
"ReadDecorHandle's default container: "<<clusterLinks.key());
205 for (std::pair<const xAOD::IParticle*, const xAOD::TrackParticle*>
entry : wcoll.
pfoToTracksMap){
211 totalP4 +=
entry.second->p4() * (cluster_pt/totalcluster_pt);
214 return StatusCode::SUCCESS;
virtual StatusCode initialize() override
Gaudi::Property< std::string > m_orig_pfo
virtual StatusCode initialize() override
TrackCaloClusterInfoAlg(const std::string &name, ISvcLocator *pSvcLocator)
const_pointer_type cptr()
Dereference the pointer.
std::string decorKeyFromKey(const std::string &key)
Extract the decoration part of key.
Gaudi::Property< float > m_clusterEcut
cluster with E below this cut won't be considered in the TCC alg. WARNING cut must be configured as i...
const xAOD::TrackParticleContainer * allTracks
std::map< const xAOD::TrackParticle *, FourMom_t > trackTotalClusterPt
const_pointer_type cptr() const
Dereference the pointer.
virtual StatusCode fillInfo(SG::WriteHandle< TrackCaloClusterInfo > &tccInfo) const override
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
Class providing the definition of the 4-vector interface.
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_assoClustersKey
Decoration of tracks expected by this alg (set by TrackParticleClusterAssociationAlg)
Some common helper functions used by decoration handles.
TrackCaloClusterInfoUFOAlg(const std::string &name, ISvcLocator *pSvcLocator)
ToolHandle< CP::ITrackVertexAssociationTool > m_trackVertexAssoTool
const xAOD::IParticle::FourMom_t nullV
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_inputClustersHandle
Original clusters from which the m_inputObjectName are build ()
const CP::ITrackVertexAssociationTool * m_trackVertexAssoTool
TLorentzVector FourMom_t
Definition of the 4-momentum type.
SG::WriteHandleKey< TrackCaloClusterInfo > m_tccInfoHandle
TrackCaloClusterInfo created by this alg.
Handle class for reading a decoration on an object.
TrackCaloClusterInfo * tccInfo_nonconst
::StatusCode StatusCode
StatusCode definition for legacy code.
pointer_type ptr()
Dereference the pointer.
std::multimap< const xAOD::IParticle *, const xAOD::TrackParticle * > pfoToTracksMap
const std::string & decorKey() const
Return the name of the decoration alias (CONT.DECOR).
SG::ReadHandleKey< xAOD::FlowElementContainer > m_inputPFOHandle
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual void combinedUFOLoop(const TrackCaloClusterInfo *tccInfo, const xAOD::FlowElementContainer *pfos)
virtual bool isValid() override final
Can the handle be successfully dereferenced?
std::string m_clustersLinkK
virtual double pt() const =0
The transverse momentum ( ) of the particle.
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_inputTracksHandle
Tracks used by this alg.
Gaudi::Property< bool > m_useEnergy
use cluster energy or pt?
\bried Internal helper class for TCC & UFO building.
virtual void processTrk(const xAOD::TrackParticle *)
std::map< const xAOD::IParticle *, FourMom_t > clusterToTracksWeightMap
virtual FourMom_t p4() const =0
The full 4-momentum of the particle.
virtual StatusCode execute() override
virtual FourMom_t p4() const override
The full 4-momentum of the particle.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
SG::ReadHandleKey< xAOD::VertexContainer > m_inputVertexHandle
Implement a concrete CombinedUFOLoop dedicated to collection of energy sharing weights for UFO see TC...
virtual void processPFO(const xAOD::TrackParticle *trk, const xAOD::FlowElement *pfo)
Handle class for reading a decoration on an object.
Class describing a TrackParticle.
virtual StatusCode fillInfo(SG::WriteHandle< TrackCaloClusterInfo > &tccInfo) const
Implements a loop over tracks and pflow object to build UFOs.
bool isAvailable()
Test to see if this variable exists in the store, for the referenced object.
const xAOD::CaloClusterContainer * allClusters
const SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > * m_linkdecorkey
bool empty() const noexcept
Returns true if the collection is empty.
virtual double e() const =0
The total energy of the particle.
A detector object made of other lower level object(s)