1 #ifndef _ClusterShapeHitFilter_h_
2 #define _ClusterShapeHitFilter_h_
18 #include <unordered_map>
27 operator unsigned int()
const {
return key;}
30 if ( dx<0 || dy<0 )
return N;
31 if ( dx>10 || dy>4 )
return N;
36 if ( dx<0 || dy<0 )
return N;
37 if ( dx>10 || dy>15 )
return N;
38 if (dx<8)
return dx*16+dy;
40 return 128 + (dx-8)*3+dy;
62 static const int N=40;
66 operator unsigned int()
const {
return key;}
96 bool isInside(
const std::pair<float,float> & pred)
const {
98 bool one = (pred.first >
limit[0][0]) && ( pred.first <
limit[0][1] )
99 && (pred.second >
limit[1][0]) && (pred.second <
limit[1][1]);
102 bool two = (pred.first >
limit[0][0]) && ( pred.first <
limit[0][1] )
103 && (pred.second >
limit[1][0]) && (pred.second <
limit[1][1]);
124 bool one = pred > limit[0] && pred < limit[1];
126 bool two = pred > limit[0] && pred < limit[1];
146 namespace ClusterShapeHitFilterTest {
181 bool cutOnStripCharge,
float minGoodStripCharge) {
189 std::pair<float,float> & predr,
190 PixelData
const * pd=
nullptr)
const;
194 PixelData
const * pd=
nullptr)
const;
198 PixelData
const * pd=
nullptr )
const;
202 int & meas,
float & pred)
const;
204 int & meas,
float & pred)
const {
const std::string * PixelShapeFile
const MagneticField * theMagneticField
const SiStripLorentzAngle * theSiStripLorentzAngle
const PixelData & getpd(const SiPixelRecHit &recHit, PixelData const *pd=0) const
bool operator<(const PixelKeys &right) const
static unsigned char barrelPacking(int dx, int dy)
std::pair< float, float > cotangent
bool isCompatible(const SiStripRecHit2D &recHit, const LocalPoint &lpos, const LocalVector &ldir) const
bool checkClusterCharge(DetId detId, const SiStripCluster &cluster, const LocalVector &ldir) const
bool isCompatible(const SiStripRecHit2D &recHit, const GlobalVector &gdir) const
bool isCompatible(const SiStripRecHit2D &recHit, const GlobalPoint &gpos, const GlobalVector &gdir) const
bool isInside(const std::pair< float, float > &pred) const
float minGoodStripCharge_
static const int N_endcap
static const int N_barrel
PixelLimits pixelLimits[PixelKeys::N+1]
std::unordered_map< unsigned int, PixelData > pixelData
bool isCompatible(DetId detId, const SiStripCluster &cluster, const LocalVector &ldir) const
const TrackerGeometry * theTracker
std::pair< float, float > getCotangent(const PixelGeomDetUnit *pixelDet) const
StripLimits stripLimits[StripKeys::N+1]
static unsigned char endcapPacking(int dx, int dy)
const PixelGeomDetUnit * det
bool isInside(float pred) const
std::pair< float, float > drift
static const int offset_endcap_dx
void setShapeCuts(bool cutOnPixelShape, bool cutOnStripShape)
float minGoodPixelCharge_
const SiPixelLorentzAngle * theSiPixelLorentzAngle
bool isCompatible(const SiStripRecHit2D &recHit, const LocalVector &ldir) const
bool isNormalOriented(const GeomDetUnit *geomDet) const
bool isCompatible(const SiPixelRecHit &recHit, const LocalVector &ldir, const SiPixelClusterShapeCache &clusterShapeCache, PixelData const *pd=0) const
std::pair< float, float > getDrift(const PixelGeomDetUnit *pixelDet) const
SiStripCluster const & stripCluster() const
void setChargeCuts(bool cutOnPixelCharge, float minGoodPixelCharge, bool cutOnStripCharge, float minGoodStripCharge)
TrajectoryFilter::Record Record
bool getSizes(const SiPixelRecHit &recHit, const LocalVector &ldir, const SiPixelClusterShapeCache &clusterShapeCache, int &part, ClusterData::ArrayType &meas, std::pair< float, float > &predr, PixelData const *pd=0) const
Pixel cluster – collection of neighboring pixels above threshold.
PixelKeys(int part, int dx, int dy)
bool getSizes(const SiStripRecHit2D &recHit, const LocalPoint &lpos, const LocalVector &ldir, int &meas, float &pred) const
DetId geographicalId() const
bool operator<(const StripKeys &right) const
static const int offset_endcap_dy