30 if (dynamic_cast<const RecSegment*>(
hit()) )
38 if (dynamic_cast<const RecSegment*>(
hit()))
63 if(err.num_row() == 1) err[0][0] += lape.
xx();
66 lapeMatrix[3][3] = lape.
xx();
67 lapeMatrix[3][4] = lape.
xy();
68 lapeMatrix[4][4] = lape.
yy();
72 if(err.num_row() != lapeMatrixProj.num_row())
73 throw cms::Exception(
"MuonTransientTrackingRecHit::parametersError")
74 <<
"Discrepancy between alignment error matrix and error matrix: APE "
75 << lapeMatrixProj.num_row()
76 <<
", error matrix " << err.num_row()
79 err += lapeMatrixProj;
87 if (dynamic_cast<const RecSegment*>(
hit()))
94 if (dynamic_cast<const RecSegment*>(
hit()))
118 std::vector<const TrackingRecHit*> ownRecHits =
recHits();
120 if(ownRecHits.size() == 0){
122 return theSubTransientRecHits;
128 if(
isDT() &&
dimension() == 2 && ownRecHits.front()->dimension() == 1
129 && (geomDets.size() == 3 || geomDets.size() == 2) ){
131 std::vector<const GeomDet *> subGeomDets;
134 for(std::vector<const GeomDet *>::const_iterator geoDet = geomDets.begin();
135 geoDet != geomDets.end(); ++geoDet){
137 std::vector<const GeomDet *>
tmp = (*geoDet)->components();
138 std::copy(tmp.begin(),tmp.end(),back_inserter(subGeomDets));
143 geomDets = subGeomDets;
147 std::map<DetId,const GeomDet*> gemDetMap;
149 for (std::vector<const GeomDet*>::const_iterator subDet = geomDets.begin();
150 subDet != geomDets.end(); ++subDet)
151 gemDetMap[ (*subDet)->geographicalId() ] = *subDet;
153 std::map<DetId,const GeomDet*>::iterator gemDetMap_iter;
156 for (std::vector<const TrackingRecHit*>::const_iterator rechit = ownRecHits.begin();
157 rechit != ownRecHits.end(); ++rechit){
159 gemDetMap_iter = gemDetMap.find( (*rechit)->geographicalId() );
161 if(gemDetMap_iter != gemDetMap.end() )
168 return theSubTransientRecHits;
179 std::vector<TrackingRecHit*> seg2D =
recHits();
181 for(std::vector<TrackingRecHit*>::iterator it = seg2D.begin(); it != seg2D.end(); ++it){
182 std::vector<TrackingRecHit*> hits1D = (*it)->recHits();
184 for(std::vector<TrackingRecHit*>::iterator it2 = hits1D.begin(); it2 != hits1D.end(); ++it2)
185 (*it2)->setType(
bad);
191 std::vector<TrackingRecHit*> hits =
recHits();
192 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 MuonTransientTrackingRecHit * clone() const override
virtual const TrackingRecHit * hit() const
virtual GlobalVector globalDirection() const
Direction in 3D for segments, otherwise (0,0,0)
std::vector< ConstRecHitPointer > RecHitContainer
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
virtual std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
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
const GeomDet * det() const
DetId geographicalId() const
The label of this GeomDet.
virtual std::vector< const GeomDet * > components() const =0
Returns direct components, if any.
std::shared_ptr< TrackingRecHit const > RecHitPointer
std::vector< ConstRecHitPointer > ConstRecHitContainer
LocalError const & localAlignmentError() const
Return local alligment error.
virtual LocalError localDirectionError() const
Error on the local direction.
virtual ConstRecHitContainer transientHits() const override
return the sub components of this transient rechit
std::vector< std::vector< double > > tmp
virtual AlgebraicSymMatrix parametersError() const override
CLHEP::HepSymMatrix AlgebraicSymMatrix
MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer
TrackingRecHit * trackingRecHit_
DetId geographicalId() const
virtual const Surface * surface() const