26 const DTLayer*
layer = dtGeom->layer(theWireId.layerId());
48 throw cms::Exception(
"DTHitPairForFit") <<
" localPosition called with undef LR code" << endl;
55 LocalPoint segPosAtZLeft = posIni + dirIni * (theLeftPos.z() - posIni.
z()) / dirIni.
z();
56 LocalPoint segPosAtZRight = posIni + dirIni * (theRightPos.z() - posIni.
z()) / dirIni.
z();
57 float dxLeft = fabs(theLeftPos.x() - segPosAtZLeft.
x());
58 float dxRight = fabs(theRightPos.x() - segPosAtZRight.
x());
59 float exx =
sqrt(theError.xx());
63 if (
std::max(dxLeft, dxRight) < 3 * exx) {
64 ret = make_pair(
true,
true);
65 }
else if (
std::min(dxLeft, dxRight) >= 10 * exx) {
66 ret = make_pair(
false,
false);
68 float sigmasL = floorf(dxLeft / exx), sigmasR = floorf(dxRight / exx);
69 ret.first = (sigmasL < sigmasR);
70 ret.second = (sigmasR < sigmasL);
79 return (
id() < hit.
id());
83 return (
id() == hit.
id() && fabs(digiTime() - hit.
digiTime()) < 0.1);
tuple ret
prodAgent to be discontinued
Point3DBase< Scalar, LocalTag > LocalPoint
bool operator<(const DTHitPairForFit &hit) const
define the order by increasing z
LocalPoint localPosition(DTEnums::DTCellSide s) const
Returns the local position in the layer.
std::ostream & operator<<(std::ostream &out, const std::tuple< Types...> &value)
const DTWireId & id() const
Returns the Id of the wire on which the rechit rely.
float digiTime() const
Return the digi time (ns) used to build the rechits.
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
std::pair< bool, bool > isCompatible(const LocalPoint &posIni, const LocalVector &dirIni) const
DTCellSide
Which side of the DT cell.
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
const DTRecHit1D * componentRecHit(DTEnums::DTCellSide lrSide) const
Return the left/right DTRecHit1D.
constexpr std::array< uint8_t, layerIndexSize > layer
~DTHitPairForFit()
Destructor.
float digiTime() const
Returns the time of the corresponding digi.
DTHitPairForFit(const DTRecHit1DPair &pair, const DTSuperLayer &sl, const edm::ESHandle< DTGeometry > &dtGeom)
Constructor.
LocalPoint leftPos() const
Returns the position in the layer r.f. of the left rechit.
LocalError localPositionError() const override
Return the 3-dimensional error on the local position.
bool operator==(const DTHitPairForFit &hit) const
LocalPoint rightPos() const
Returns the position in the layer r.f. of the right rechit.
LocalPoint localPosition() const override
Return the 3-dimensional local position.