ATLAS Offline Software
Loading...
Searching...
No Matches
ParticleCellAssociation.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef REC_PARTICLECELLASSOCIATION_H
6#define REC_PARTICLECELLASSOCIATION_H
7
10
11#include "CaloEvent/CaloCell.h"
13
14#include <vector>
15#include <algorithm>
16
17namespace Rec {
18
20 class ParticleCellAssociation : public ParticleCaloAssociation<const CaloCell*> {
21 public:
23 typedef std::vector< std::pair<const CaloCell*,ParticleCellIntersection*> > CellIntersections;
24
27 const CellIntersections&& intersections, const CaloCellContainer* container=0 );
28
31
34
36 const ParticleCellIntersection* cellIntersection( const CaloCell& cell ) const;
37
39 const CaloCellContainer* container() const;
40
41 private:
45
48
51
52 };
53
55 auto pos = std::find_if( m_cellIntersections.begin(), m_cellIntersections.end(),
56 [&]( const std::pair<const CaloCell*,ParticleCellIntersection*>& entry ){
57 return entry.first == &cell;
58 });
59 if( pos != m_cellIntersections.end() ) return pos->second;
60 return 0;
61 }
62
64 return m_container;
65 }
66
67}
68
69#endif
Container class for CaloCell.
Data object for each calorimeter readout cell.
Definition CaloCell.h:57
ParticleCaloAssociation(const Trk::CaloExtension *caloExtension, Data &&data, float coneSize)
ParticleCellAssociation(const ParticleCellAssociation &)=delete
no copying nor deletion
std::vector< std::pair< const CaloCell *, ParticleCellIntersection * > > CellIntersections
typedef for vector of cell intersections
CellIntersections m_cellIntersections
list of intersected cells
const ParticleCellAssociation & operator=(const ParticleCellAssociation &)=delete
const CellIntersections & cellIntersections() const
access to all intersected cells
const CaloCellContainer * container() const
access to container
const CaloCellContainer * m_container
pointer to the container
ParticleCellAssociation(const Trk::CaloExtension *caloExtension, Data &&data, float coneSize, const CellIntersections &&intersections, const CaloCellContainer *container=0)
constructor
const ParticleCellIntersection * cellIntersection(const CaloCell &cell) const
access to cell intersection of a give cell, returns zero if the cell was not intersected
class storing information on the intersection of a track with a cell
Tracking class to hold the extrapolation through calorimeter Layers Both the caloEntryLayerIntersecti...
namespace for combined reconstruction tools and interfaces