|
ATLAS Offline Software
|
Go to the documentation of this file.
14 m_caloCellAssociationTool(
"Rec::ParticleCaloCellAssociationTool/ParticleCaloCellAssociationTool", this) {
30 return StatusCode::SUCCESS;
44 ATH_CHECK(xaoda.
record (std::make_unique<xAOD::TrackParticleClusterAssociationContainer>(),
45 std::make_unique<xAOD::TrackParticleClusterAssociationAuxContainer>()));
49 unsigned int ntracks = 0;
50 for(
unsigned int i=0;
i<trackParticles->size();++
i ){
57 ATH_MSG_DEBUG(
" Selected track: pt " <<
tp->pt() <<
" eta " <<
tp->eta() <<
" phi " <<
tp->phi() );
58 std::unique_ptr<const Rec::ParticleCellAssociation>
association
61 ATH_MSG_DEBUG(
"failed to obtain the ParticleCellAssociation");
67 ATH_MSG_WARNING(
"Failed to obtain CaloCellContainer from ParticleCellAssociation");
76 ATH_MSG_WARNING(
"Failed to create cluster from ParticleCellAssociation");
79 ATH_MSG_DEBUG(
" New cluster: eta " << cluster->
eta() <<
" phi " << cluster->
phi() <<
" cells " << cluster->
size() <<
" nclusters " << clusColl->
size() );
91 std::vector< ElementLink< xAOD::CaloClusterContainer > > caloClusterLinks;
92 caloClusterLinks.push_back( clusterLink );
102 ATH_MSG_DEBUG(
" Total number of selected tracks: " << ntracks );
107 return StatusCode::SUCCESS;
113 return StatusCode::SUCCESS;
virtual double phi() const
The azimuthal angle ( ) of the particle.
static StatusCode finalizeClusters(SG::WriteHandle< CaloClusterCellLinkContainer > &h, xAOD::CaloClusterContainer *pClusterColl)
Finalize clusters (move CaloClusterCellLink to a separate container).
void setTrackParticleLink(const ElementLink< TrackParticleContainer > &trackParticleLink)
Sets.
static StatusCode AddContainerWriteHandle(SG::WriteHandle< xAOD::CaloClusterContainer > &clusColl)
Creates a new xAOD::CaloClusterContainer in the given WriteHandle + CaloClusterAuxContainer and recor...
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StatusCode execute(const EventContext &ctx) const override
const std::string & key() const
Return the StoreGate ID for the referenced object.
bool isValid() const
Test to see if the link can be dereferenced.
StatusCode finalize() override
An algorithm that can be simultaneously executed in multiple threads.
SG::WriteHandleKey< CaloClusterCellLinkContainer > m_clusterCellLinkName
Description of a calorimeter cluster.
SG::WriteHandleKey< xAOD::TrackParticleClusterAssociationContainer > m_associationContainerName
virtual double eta() const
The pseudorapidity ( ) of the particle.
::StatusCode StatusCode
StatusCode definition for legacy code.
pointer_type ptr()
Dereference the pointer.
size_t size() const
size method (forwarded from CaloClusterCellLink obj)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
static xAOD::CaloCluster * crossedCells(const Rec::ParticleCellAssociation &association, const CaloCellContainer &cellContainer, xAOD::CaloClusterContainer &clusterContainer)
Class describing a TrackParticleClusterAssociation.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
#define ATH_MSG_WARNING(x)
ToolHandle< Rec::IParticleCaloCellAssociationTool > m_caloCellAssociationTool
SG::WriteHandleKey< xAOD::CaloClusterContainer > m_clusterContainerName
~TrackParticleCellAssociationAlg()
StatusCode initialize() override
Class describing a TrackParticle.
TrackParticleCellAssociationAlg(const std::string &name, ISvcLocator *pSvcLocator)
TrackParticleClusterAssociation_v1 TrackParticleClusterAssociation
Reference the current persistent version:
void setCaloClusterLinks(const std::vector< ElementLink< CaloClusterContainer > > &caloClusterLinks)
Sets.
size_type size() const noexcept
Returns the number of elements in the collection.
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackParticleCollectionName