5#ifndef TRIGONLINESPACEPOINTTOOL_SPACEPOINT_CONVERSION_UTILS_H
6#define TRIGONLINESPACEPOINTTOOL_SPACEPOINT_CONVERSION_UTILS_H
48 return (
m_sctId->barrel_ec(
id)==0);
59 layerId =
m_sctId->layer_disk(
id);
119 std::vector<TrigSiSpacePointBase>&
m_vec;
128 bool filter_phi=
true,
136 const std::pair<const Trk::PrepRawData*, const Trk::PrepRawData*> clusterList = p->clusterList();
137 if (clusterList.first) {
138 Identifier id1=(clusterList.first)->identify();
141 if (clusterList.second) {
168 auto collIt =
m_pIDC->indexFindPtr(
id);
169 if(collIt!=
nullptr) {
172 int layerId =
m_hash2layer->at((
int)collIt->identifyHash());
173 if(layerId<0)
return;
174 m_filter.setLayer(layerId,collIt->identify());
176 std::for_each(collIt->begin(),collIt->end(),
m_filter);
190 std::for_each(idVec.begin(),idVec.end(),*
this);
206 double Phi = atan2(ys,xs);
207 double r = std::sqrt(xs*xs+ys*ys);
226 double xs =
sp.offlineSpacePoint()->globalPosition().x()-
m_xtrf[0];
227 double ys =
sp.offlineSpacePoint()->globalPosition().y()-
m_ytrf[0];
228 double zs =
sp.offlineSpacePoint()->globalPosition().z()-
m_ztrf[0];
233 double Phi = atan2(ys,xs);
234 double r = std::sqrt(xr*xr+yr*yr);
std::vector< size_t > vec
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
void setLayer(const Identifier &id)
std::vector< TrigSiSpacePointBase > & m_vec
BaseSpacePointFilter(std::vector< TrigSiSpacePointBase > &vec, LayerCalculator &lc)
LayerCalculator m_layerCalculator
void setErrors(const Identifier &id)
void setLayer(short layerId, const Identifier &id)
virtual ~BaseSpacePointFilter()
void createSpacePoint(const Trk::SpacePoint *p)
virtual void operator()(const Trk::SpacePoint *)=0
bool isBarrel(const Identifier &id)
const PixelID * m_pixelId
const AtlasDetectorID * m_atlasId
LayerCalculator(const AtlasDetectorID *aId, const PixelID *pId, const SCT_ID *sId, int offs[3])
bool isPixel(const Identifier &id)
friend class BaseSpacePointFilter
int getLayer(const Identifier &id)
virtual void operator()(const Trk::SpacePoint *p)
const IRoiDescriptor * m_roi
const std::map< Identifier, std::vector< long int > > * m_clusterMap
RoI_Filter(std::vector< TrigSiSpacePointBase > &vec, LayerCalculator &lc, const IRoiDescriptor *roi, bool filter_phi=true, const std::map< Identifier, std::vector< long int > > *clusterMap=nullptr)
void operator()(const SpacePointCollection *coll)
int select(const SpacePointContainer &p, const std::vector< IdentifierHash > &idVec, const std::vector< short > *h2l=nullptr)
const std::vector< short > * m_hash2layer
const SpacePointContainer * m_pIDC
void operator()(const IdentifierHash &id)
void operator()(TrigSiSpacePointBase &sp)
SpacePointShifter(double dx, double dy)
Describes the API of the Region of Ineterest geometry.
This is a "hash" representation of an Identifier.
This is an Identifier helper class for the Pixel subdetector.
This is an Identifier helper class for the SCT subdetector.
virtual Identifier identify() const override final
virtual IdentifierHash identifyHash() const override final
header for factorised IRoiDescriptor interface
bool contains(const IRoiDescriptor &roi, double z0, double dzdr)
see whether a segment is contained within the roi in r-z
bool containsZed(const IRoiDescriptor &roi, double z, double r)
Ensure that the ATLAS eigen extensions are properly loaded.