27 const DTLayer* layer = dtGeom->
layer(theWireId.layerId());
51 throw cms::Exception(
"DTHitPairForFit")<<
" localPosition called with undef LR code"<<endl;
62 LocalPoint segPosAtZLeft = posIni+dirIni*(theLeftPos.z() -posIni.
z())/dirIni.
z();
63 LocalPoint segPosAtZRight = posIni+dirIni*(theRightPos.z()-posIni.
z())/dirIni.
z();
64 float dxLeft = fabs(theLeftPos.x() - segPosAtZLeft.
x());
65 float dxRight = fabs(theRightPos.x() - segPosAtZRight.
x());
66 float exx =
sqrt(theError.xx());
70 if (
std::max(dxLeft, dxRight) < 3*exx) {
71 ret = make_pair(
true,
true);
72 }
else if (
std::min(dxLeft, dxRight) >= 10*exx) {
73 ret = make_pair(
false,
false);
75 float sigmasL = floorf(dxLeft/exx), sigmasR = floorf(dxRight/exx);
76 ret.first = ( sigmasL < sigmasR );
77 ret.second = ( sigmasR < sigmasL );
86 return (
id() < hit.
id());
90 return (
id() == hit.
id() && fabs(digiTime() - hit.
digiTime()) < 0.1 );
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.
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.
~DTHitPairForFit()
Destructor.
const DTLayer * layer(DTLayerId id) const
Return a layer given its id.
float digiTime() const
Returns the time of the corresponding digi.
DTHitPairForFit(const DTRecHit1DPair &pair, const DTSuperLayer &sl, const edm::ESHandle< DTGeometry > &dtGeom)
Constructor.
std::ostream & operator<<(std::ostream &out, const std::tuple< Types... > &value)
virtual LocalError localPositionError() const
Return the 3-dimensional error on the local position.
virtual LocalPoint localPosition() const
Return the 3-dimensional local position.
LocalPoint leftPos() const
Returns the position in the layer r.f. of the left rechit.
bool operator==(const DTHitPairForFit &hit) const
LocalPoint rightPos() const
Returns the position in the layer r.f. of the right rechit.