32 if (dynamic_cast<const RecSegment*>(
hit()) )
40 if (dynamic_cast<const RecSegment*>(
hit()))
61 if (
det()->alignmentPositionError() != 0) {
66 if(err.num_row() == 1) err[0][0] += lape.
xx();
69 lapeMatrix[3][3] = lape.
xx();
70 lapeMatrix[3][4] = lape.
xy();
71 lapeMatrix[4][4] = lape.
yy();
75 if(err.num_row() != lapeMatrixProj.num_row())
76 throw cms::Exception(
"MuonTransientTrackingRecHit::parametersError")
77 <<
"Discrepancy between alignment error matrix and error matrix: APE "
78 << lapeMatrixProj.num_row()
79 <<
", error matrix " << err.num_row()
82 err += lapeMatrixProj;
90 if (dynamic_cast<const RecSegment*>(
hit()))
97 if (dynamic_cast<const RecSegment*>(
hit()))
121 std::vector<const TrackingRecHit*> ownRecHits =
recHits();
123 if(ownRecHits.size() == 0){
124 theSubTransientRecHits.push_back(
this);
125 return theSubTransientRecHits;
131 if(
isDT() &&
dimension() == 2 && ownRecHits.front()->dimension() == 1
132 && (geomDets.size() == 3 || geomDets.size() == 2) ){
134 std::vector<const GeomDet *> subGeomDets;
137 for(std::vector<const GeomDet *>::const_iterator geoDet = geomDets.begin();
138 geoDet != geomDets.end(); ++geoDet){
140 std::vector<const GeomDet *>
tmp = (*geoDet)->components();
141 std::copy(tmp.begin(),tmp.end(),back_inserter(subGeomDets));
146 geomDets = subGeomDets;
150 std::map<DetId,const GeomDet*> gemDetMap;
152 for (std::vector<const GeomDet*>::const_iterator subDet = geomDets.begin();
153 subDet != geomDets.end(); ++subDet)
154 gemDetMap[ (*subDet)->geographicalId() ] = *subDet;
156 std::map<DetId,const GeomDet*>::iterator gemDetMap_iter;
159 for (std::vector<const TrackingRecHit*>::const_iterator rechit = ownRecHits.begin();
160 rechit != ownRecHits.end(); ++rechit){
162 gemDetMap_iter = gemDetMap.find( (*rechit)->geographicalId() );
164 if(gemDetMap_iter != gemDetMap.end() )
171 return theSubTransientRecHits;
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 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.
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)
const GeomDet * det() const
The GomeDet* can be zero for InvalidTransientRecHits and for TConstraintRecHit2Ds.
CLHEP::HepSymMatrix AlgebraicSymMatrix
virtual const Surface * surface() const
MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer
DetId geographicalId() const