48 : theTracker(theTracker_),
49 theMagneticField(theMagneticField_),
50 theSiPixelLorentzAngle(theSiPixelLorentzAngle_),
51 theSiStripLorentzAngle(theSiStripLorentzAngle_)
71 fileInPath(
"RecoPixelVertexing/PixelLowPtUtilities/data/pixelShape.par");
72 ifstream inFile(fileInPath.
fullPath().c_str());
75 while(inFile.eof() ==
false)
84 auto & pl = pixelLimits[
key];
86 for(
int b = 0;
b<2 ;
b++)
87 for(
int d = 0; d<2 ; d++)
88 for(
int k = 0;
k<2 ;
k++)
89 inFile >> pl.data[
b][d][
k];
103 LogTrace(
"MinBiasTracking|ClusterShapeHitFilter")
104 <<
" [ClusterShapeHitFilter] pixel-cluster-shape filter loaded";
112 fileInPath(
"RecoPixelVertexing/PixelLowPtUtilities/data/stripShape.par");
113 ifstream inFile(fileInPath.
fullPath().c_str());
116 while(inFile.eof() ==
false)
122 auto & sl = stripLimits[
key];
124 for(
int b = 0;
b<2 ;
b++)
125 for(
int k = 0;
k<2 ;
k++)
126 inFile >> sl.data[
b][
k];
132 LogTrace(
"MinBiasTracking|ClusterShapeHitFilter")
133 <<
" [ClusterShapeHitFilter] strip-cluster-width filter loaded";
141 for (
auto det : theTracker->detsPXB()) {
150 pd.
drift=getDrift(pixelDet);
154 for (
auto det : theTracker->detsPXF()) {
163 pd.
drift=getDrift(pixelDet);
173 pair<float,float> cotangent;
198 theMagneticField->inTesla(
201 double theTanLorentzAnglePerTesla =
202 theSiPixelLorentzAngle->getLorentzAngle(
205 pair<float,float>
dir;
206 dir.first = - theTanLorentzAnglePerTesla * lBfield.
y();
207 dir.second = theTanLorentzAnglePerTesla * lBfield.
x();
218 theMagneticField->inTesla(
221 double theTanLorentzAnglePerTesla =
222 theSiStripLorentzAngle->getLorentzAngle(
225 float dir = theTanLorentzAnglePerTesla * lBfield.
y();
238 return (perp1 > perp0);
244 return (rot * pos > 0);
253 int &
part, vector<pair<int,int> > & meas, pair<float,float> & pred,
257 const PixelData & pd = getpd(recHit,ipd);
271 pred.first = ldir.
x() / ldir.
z();
272 pred.second = ldir.
y() / ldir.
z();
274 if(data.
size.front().second < 0)
275 pred.second = - pred.second;
277 meas.reserve(data.
size.size());
278 for(vector<pair<int,int> >::const_iterator
s = data.
size.begin();
283 if(data.
size.front().second < 0)
284 meas.back().second = - meas.back().second;
288 std::pair<float,float>
const &
drift = pd.
drift;
289 pred.first += drift.first;
290 pred.second += drift.second;
293 std::pair<float,float>
const & cotangent = pd.
cotangent;
294 pred.first *= cotangent.first;
295 pred.second *= cotangent.second;
307 const PixelData & pd = getpd(recHit,ipd);
310 vector<pair<int,int> > meas;
311 pair<float,float> pred;
313 if(getSizes(recHit, ldir, part,meas, pred,&pd))
315 for(vector<pair<int,int> >::const_iterator
m = meas.begin();
319 if (!key.
isValid())
return true;
320 if (pixelLimits[key].isInside(pred))
return true;
334 const PixelData & pd = getpd(recHit,ipd);
338 return isCompatible(recHit, ldir,&pd);
346 int & meas,
float & pred)
const
359 bool usable = (fs >= 1 && fs + meas - 1 <= ns);
365 pred = ldir.
x() / ldir.
z();
368 float drift = getDrift(stripDet);
372 pred *= getCotangent(stripDet);
386 if(getSizes(detId, cluster, ldir, meas, pred))
390 return stripLimits[key].isInside(pred);
402 LocalVector ldir = theTracker->idToDet(detId)->toLocal(gdir);
403 return isCompatible(detId, cluster, ldir);
std::vector< std::pair< int, int > > size
virtual int nstrips() const =0
std::pair< float, float > cotangent
bool isCompatible(const SiPixelRecHit &recHit, const LocalVector &ldir, PixelData const *pd=0) const
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
LocalVector drift(const StripGeomDetUnit *, const MagneticField &, const SiStripLorentzAngle &)
void determineShape(const PixelGeomDetUnit &pixelDet, const SiPixelRecHit &recHit, ClusterData &data)
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
uint16_t firstStrip() const
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
uint32_t rawId() const
get the raw id
virtual float thickness() const =0
virtual float localPitch(const LocalPoint &) const =0
std::pair< float, float > getCotangent(const PixelGeomDetUnit *pixelDet) const
const PixelGeomDetUnit * det
std::pair< float, float > drift
DetId geographicalId() const
The label of this GeomDet.
virtual const GeomDetType & type() const =0
bool isNormalOriented(const GeomDetUnit *geomDet) const
#define TYPELOOKUP_DATA_REG(_dataclass_)
virtual std::pair< float, float > pitch() const =0
Point3DBase< float, LocalTag > Local3DPoint
const Bounds & bounds() const
std::pair< float, float > getDrift(const PixelGeomDetUnit *pixelDet) const
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
char data[epos_bytes_allocation]
bool getSizes(const SiPixelRecHit &recHit, const LocalVector &ldir, int &part, std::vector< std::pair< int, int > > &meas, std::pair< float, float > &predr, PixelData const *pd=0) const
const BoundPlane & surface() const
The nominal surface of the GeomDet.
std::string fullPath() const
const PositionType & position() const
const std::vector< uint8_t > & amplitudes() const