27 if (dynamic_cast<const RecSegment*>(
hit()))
34 if (dynamic_cast<const RecSegment*>(
hit()))
57 if (
err.num_row() == 1) {
64 }
else if (
err.num_row() == 2) {
72 lapeMatrix[1][1] = lape.
cxx();
74 lapeMatrix[0][1] = lape.
cphixx();
76 if (
err.num_row() != lapeMatrix.num_row())
77 throw cms::Exception(
"MuonTransientTrackingRecHit::parametersError")
78 <<
"Discrepancy between alignment error matrix and error matrix: APE " << lapeMatrix.num_row()
79 <<
", error matrix " <<
err.num_row() << std::endl;
82 }
else if (
err.num_row() == 4) {
83 positions[0] = par[2];
84 positions[1] = par[3];
91 lapeMatrix[2][2] = lape.
cxx();
92 lapeMatrix[2][3] = lape.
cyx();
93 lapeMatrix[3][3] = lape.
cyy();
98 lapeMatrix[0][2] = lape.
cphixx();
99 lapeMatrix[0][3] = lape.
cphixy();
100 lapeMatrix[1][3] = lape.
cphiyy();
101 lapeMatrix[1][2] = lape.
cphiyx();
103 if (
err.num_row() != lapeMatrix.num_row())
104 throw cms::Exception(
"MuonTransientTrackingRecHit::parametersError")
105 <<
"Discrepancy between alignment error matrix and error matrix: APE " << lapeMatrix.num_row()
106 <<
", error matrix " <<
err.num_row() << std::endl;
115 if (dynamic_cast<const RecSegment*>(
hit()))
122 if (dynamic_cast<const RecSegment*>(
hit()))
144 std::vector<const TrackingRecHit*> ownRecHits =
recHits();
146 if (ownRecHits.empty()) {
148 return theSubTransientRecHits;
154 if (
isDT() &&
dimension() == 2 && ownRecHits.front()->dimension() == 1 &&
155 (geomDets.size() == 3 || geomDets.size() == 2)) {
157 std::vector<const GeomDet*> subGeomDets;
160 for (std::vector<const GeomDet*>::const_iterator geoDet = geomDets.begin(); geoDet != geomDets.end(); ++geoDet) {
162 std::vector<const GeomDet*>
tmp = (*geoDet)->components();
168 geomDets = subGeomDets;
172 std::map<DetId, const GeomDet*> gemDetMap;
174 for (std::vector<const GeomDet*>::const_iterator subDet = geomDets.begin(); subDet != geomDets.end(); ++subDet)
175 gemDetMap[(*subDet)->geographicalId()] = *subDet;
177 std::map<DetId, const GeomDet*>::iterator gemDetMap_iter;
180 for (std::vector<const TrackingRecHit*>::const_iterator rechit = ownRecHits.begin(); rechit != ownRecHits.end();
182 gemDetMap_iter = gemDetMap.find((*rechit)->geographicalId());
184 if (gemDetMap_iter != gemDetMap.end())
185 theSubTransientRecHits.push_back(
188 theSubTransientRecHits.push_back(
191 return theSubTransientRecHits;
200 std::vector<TrackingRecHit*> seg2D =
recHits();
202 for (std::vector<TrackingRecHit*>::iterator it = seg2D.begin(); it != seg2D.end(); ++it) {
203 std::vector<TrackingRecHit*> hits1D = (*it)->recHits();
205 for (std::vector<TrackingRecHit*>::iterator it2 = hits1D.begin(); it2 != hits1D.end(); ++it2)
206 (*it2)->setType(
bad);
212 for (std::vector<TrackingRecHit*>::iterator it =
hits.begin(); it !=
hits.end(); ++it)
virtual std::vector< const GeomDet * > components() const
Returns direct components, if any.
bool isRPC() const
if this rec hit is a RPC rec hit
AlgebraicSymMatrix parametersError() const override
Local3DVector LocalVector
MuonTransientTrackingRecHit::RecHitContainer MuonRecHitContainer
const Surface * surface() const final
virtual LocalError localDirectionError() const
Error on the local direction.
const TrackingRecHit * hit() const override
std::vector< ConstRecHitPointer > RecHitContainer
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
virtual int degreesOfFreedom() const
Degrees of freedom for segments, else 0.
bool isME0() const
if this rec hit is a ME0 rec hit
virtual LocalVector localDirection() const
Direction in 3D for segments, otherwise (0,0,0)
bool isDT() const
if this rec hit is a DT rec hit
const GeomDet * det() const
MuonTransientTrackingRecHit(const GeomDet *geom, const TrackingRecHit *rh)
Construct from a TrackingRecHit and its GeomDet.
LocalPoint localPosition() const override
std::shared_ptr< MuonTransientTrackingRecHit > MuonRecHitPointer
AlgebraicVector parameters() const override
bool isGEM() const
if this rec hit is a GEM rec hit
AlignmentPositionError const * alignmentPositionError() const
Return pointer to alignment errors.
bool isCSC() const
if this rec hit is a CSC rec hit
DetId geographicalId() const
The label of this GeomDet.
std::shared_ptr< TrackingRecHit const > RecHitPointer
std::vector< ConstRecHitPointer > ConstRecHitContainer
CLHEP::HepVector AlgebraicVector
DetId geographicalId() const
virtual GlobalError globalDirectionError() const
Error on the global direction.
const GlobalErrorExtended & globalError() const
MuonTransientTrackingRecHit::MuonRecHitPointer MuonRecHitPointer
ConstRecHitContainer transientHits() const override
return the sub components of this transient rechit
AlgebraicSymMatrix parametersError() const override
CLHEP::HepSymMatrix AlgebraicSymMatrix
TrackingRecHit * trackingRecHit_
int dimension() const override
virtual GlobalVector globalDirection() const
Direction in 3D for segments, otherwise (0,0,0)
virtual double chi2() const
Chi square of the fit for segments, else 0.
MuonTransientTrackingRecHit * clone() const override