29 const DTLayer* layer = dtGeom->layer(theWireId.layerId());
53 throw cms::Exception(
"DTHitPairForFit")<<
" localPosition called with undef LR code"<<endl;
64 LocalPoint segPosAtZLeft = posIni+dirIni*(theLeftPos.z() -posIni.
z())/dirIni.
z();
65 LocalPoint segPosAtZRight = posIni+dirIni*(theRightPos.z()-posIni.
z())/dirIni.
z();
66 float dxLeft = fabs(theLeftPos.x() - segPosAtZLeft.
x());
67 float dxRight = fabs(theRightPos.x() - segPosAtZRight.
x());
68 float exx =
sqrt(theError.xx());
72 if (
std::max(dxLeft, dxRight) < 3*exx) {
73 ret = make_pair(
true,
true);
74 }
else if (
std::min(dxLeft, dxRight) >= 10*exx) {
75 ret = make_pair(
false,
false);
77 float sigmasL = floorf(dxLeft/exx), sigmasR = floorf(dxRight/exx);
78 ret.first = ( sigmasL < sigmasR );
79 ret.second = ( sigmasR < sigmasL );
88 return (
id() < hit.
id());
92 return (
id() == hit.
id() && fabs(digiTime() - hit.
digiTime()) < 0.1 );
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.
ostream & operator<<(std::ostream &o, vector< std::string > const &iValue)
const DTRecHit1D * componentRecHit(DTEnums::DTCellSide lrSide) const
Return the left/right DTRecHit1D.
~DTHitPairForFit()
Destructor.
const T & max(const T &a, const T &b)
float digiTime() const
Returns the time of the corresponding digi.
DTHitPairForFit(const DTRecHit1DPair &pair, const DTSuperLayer &sl, const edm::ESHandle< DTGeometry > &dtGeom)
Constructor.
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.