ATLAS Offline Software
Loading...
Searching...
No Matches
ParticleCellAssociation.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef REC_PARTICLECELLASSOCIATION_H
6#define REC_PARTICLECELLASSOCIATION_H
7
10#include <vector>
11#include <algorithm>
12
13#include "CaloEvent/CaloCell.h"
15
16namespace Rec {
17
19 class ParticleCellAssociation : public ParticleCaloAssociation<const CaloCell*> {
20 public:
22 typedef std::vector< std::pair<const CaloCell*,ParticleCellIntersection*> > CellIntersections;
23
26 const CellIntersections&& intersections, const CaloCellContainer* container=0 );
27
30
33
35 const ParticleCellIntersection* cellIntersection( const CaloCell& cell ) const;
36
38 const CaloCellContainer* container() const;
39
40 private:
44
47
50
51 };
52
54 auto pos = std::find_if( m_cellInteresections.begin(), m_cellInteresections.end(),
55 [&]( const std::pair<const CaloCell*,ParticleCellIntersection*>& entry ){
56 return entry.first == &cell;
57 });
58 if( pos != m_cellInteresections.end() ) return pos->second;
59 return 0;
60 }
61
63 return m_container;
64 }
65
66}
67
68#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
const ParticleCellAssociation & operator=(const ParticleCellAssociation &)=delete
const CellIntersections & cellIntersections() const
access to all intersected cells
const CaloCellContainer * container() const
access to container
CellIntersections m_cellInteresections
list of intersected cells
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...
Gaudi Tools.