32 if (dynamic_cast<const RecSegment*>(
hit()) )
40 if (dynamic_cast<const RecSegment*>(
hit()))
65 if(err.num_row() == 1) err[0][0] += lape.
xx();
68 lapeMatrix[3][3] = lape.
xx();
69 lapeMatrix[3][4] = lape.
xy();
70 lapeMatrix[4][4] = lape.
yy();
74 if(err.num_row() != lapeMatrixProj.num_row())
75 throw cms::Exception(
"MuonTransientTrackingRecHit::parametersError")
76 <<
"Discrepancy between alignment error matrix and error matrix: APE "
77 << lapeMatrixProj.num_row()
78 <<
", error matrix " << err.num_row()
81 err += lapeMatrixProj;
89 if (dynamic_cast<const RecSegment*>(
hit()))
96 if (dynamic_cast<const RecSegment*>(
hit()))
120 std::vector<const TrackingRecHit*> ownRecHits =
recHits();
122 if(ownRecHits.size() == 0){
123 theSubTransientRecHits.push_back(
this);
124 return theSubTransientRecHits;
130 if(
isDT() &&
dimension() == 2 && ownRecHits.front()->dimension() == 1
131 && (geomDets.size() == 3 || geomDets.size() == 2) ){
133 std::vector<const GeomDet *> subGeomDets;
136 for(std::vector<const GeomDet *>::const_iterator geoDet = geomDets.begin();
137 geoDet != geomDets.end(); ++geoDet){
139 std::vector<const GeomDet *>
tmp = (*geoDet)->components();
140 std::copy(tmp.begin(),tmp.end(),back_inserter(subGeomDets));
145 geomDets = subGeomDets;
149 std::map<DetId,const GeomDet*> gemDetMap;
151 for (std::vector<const GeomDet*>::const_iterator subDet = geomDets.begin();
152 subDet != geomDets.end(); ++subDet)
153 gemDetMap[ (*subDet)->geographicalId() ] = *subDet;
155 std::map<DetId,const GeomDet*>::iterator gemDetMap_iter;
158 for (std::vector<const TrackingRecHit*>::const_iterator rechit = ownRecHits.begin();
159 rechit != ownRecHits.end(); ++rechit){
161 gemDetMap_iter = gemDetMap.find( (*rechit)->geographicalId() );
163 if(gemDetMap_iter != gemDetMap.end() )
170 return theSubTransientRecHits;
181 std::vector<TrackingRecHit*> seg2D =
recHits();
183 for(std::vector<TrackingRecHit*>::iterator it = seg2D.begin(); it != seg2D.end(); ++it){
184 std::vector<TrackingRecHit*> hits1D = (*it)->recHits();
186 for(std::vector<TrackingRecHit*>::iterator it2 = hits1D.begin(); it2 != hits1D.end(); ++it2)
187 (*it2)->setType(
bad);
193 std::vector<TrackingRecHit*> hits =
recHits();
194 for(std::vector<TrackingRecHit*>::iterator it = hits.begin(); it != hits.end(); ++it)
virtual int degreesOfFreedom() const
Degrees of freedom for segments, else 0.
bool isCSC() const
if this rec hit is a CSC rec hit
Local3DVector LocalVector
MuonTransientTrackingRecHit::MuonRecHitPointer MuonRecHitPointer
virtual double chi2() const
Chi square of the fit for segments, else 0.
virtual const TrackingRecHit * hit() const
virtual GlobalVector globalDirection() const
Direction in 3D for segments, otherwise (0,0,0)
virtual const GeomDet * det() const GCC11_FINAL
The GomeDet* can be zero for InvalidTransientRecHits and for TConstraintRecHit2Ds.
virtual AlgebraicSymMatrix parametersError() const
virtual AlgebraicMatrix projectionMatrix() const
virtual int dimension() const
virtual GlobalError globalDirectionError() const
Error on the global direction.
bool isRPC() const
if this rec hit is a RPC rec hit
bool isDT() const
if this rec hit is a DT rec hit
std::vector< ConstRecHitPointer > RecHitContainer
virtual ConstRecHitContainer transientHits() const
return the sub components of this transient rechit
virtual LocalVector localDirection() const
Direction in 3D for segments, otherwise (0,0,0)
MuonTransientTrackingRecHit(const GeomDet *geom, const TrackingRecHit *rh)
Construct from a TrackingRecHit and its GeomDet.
virtual AlgebraicSymMatrix parametersError() const
DetId geographicalId() const
The label of this GeomDet.
virtual std::vector< const GeomDet * > components() const =0
Returns direct components, if any.
LocalError const & localAlignmentError() const
Return local alligment error.
std::vector< ConstRecHitPointer > ConstRecHitContainer
virtual LocalError localDirectionError() const
Error on the local direction.
std::vector< std::vector< double > > tmp
virtual std::vector< const TrackingRecHit * > recHits() const
Access to component RecHits (if any)
CLHEP::HepSymMatrix AlgebraicSymMatrix
MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer
TrackingRecHit * trackingRecHit_
virtual const Surface * surface() const GCC11_FINAL
DetId geographicalId() const