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]);
123 float const *
limit = data[0];
124 bool one = pred > limit[0] && pred < limit[1];
126 bool two = pred > limit[0] && pred < limit[1];
148 namespace ClusterShapeHitFilterTest {
190 cutOnPixelShape_ = cutOnPixelShape; cutOnStripShape_ = cutOnStripShape;}
194 cutOnPixelCharge_ = cutOnPixelCharge; minGoodPixelCharge_= minGoodPixelCharge;
201 std::pair<float,float> & predr,
214 int & meas,
float & pred)
const;
216 int & meas,
float & pred)
const {
219 bool isCompatible(
DetId detId,
226 return isCompatible(detId, cluster,
LocalPoint(0,0,0), ldir);
229 bool isCompatible(
DetId detId,
233 bool isCompatible(
DetId detId,
262 loadPixelLimits(f1,pixelLimits);
263 loadPixelLimits(f2,pixelLimitsL1);
271 auto p = pixelData.find(
id);
278 void loadStripLimits();
279 void fillPixelData();
280 void fillStripData();
283 std::pair<float,float> getCotangent(
const PixelGeomDetUnit * pixelDet)
const;
289 bool isNormalOriented(
const GeomDetUnit * geomDet)
const;
std::unordered_map< unsigned int, StripData > stripData
Point3DBase< Scalar, LocalTag > LocalPoint
const MagneticField * theMagneticField
const SiStripLorentzAngle * theSiStripLorentzAngle
const PixelData & getpd(const SiPixelRecHit &recHit, PixelData const *pd=0) const
bool operator<(const PixelKeys &right) const
const StripGeomDetUnit * det
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 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_
const StripData & getsd(DetId id) const
static const int N_endcap
static const int N_barrel
std::unordered_map< unsigned int, PixelData > pixelData
bool isCompatible(DetId detId, const SiStripCluster &cluster, const LocalVector &ldir) const
const TrackerGeometry * theTracker
ClusterShapeHitFilter(std::string const &f1, std::string const &f2)
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)
const SiPixelLorentzAngle * theSiPixelLorentzAngle
bool isCompatible(const SiStripRecHit2D &recHit, const LocalVector &ldir) const
const TrackerTopology * theTkTopol
SiStripCluster const & stripCluster() const
void setChargeCuts(bool cutOnPixelCharge, float minGoodPixelCharge, bool cutOnStripCharge, float minGoodStripCharge)
TrajectoryFilter::Record Record
Pixel cluster – collection of neighboring pixels above threshold.
char data[epos_bytes_allocation]
PixelKeys(int part, int dx, int dy)
StripTopology const * topology
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