|
|
Go to the documentation of this file.
27 if (dynamic_cast<const RecSegment*>(
hit()))
28 return dynamic_cast<const RecSegment*>(
hit())->localDirection();
34 if (dynamic_cast<const RecSegment*>(
hit()))
35 return dynamic_cast<const RecSegment*>(
hit())->localDirectionError();
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()))
116 return dynamic_cast<const RecSegment*>(
hit())->chi2();
122 if (dynamic_cast<const RecSegment*>(
hit()))
123 return dynamic_cast<const RecSegment*>(
hit())->degreesOfFreedom();
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 int degreesOfFreedom() const
Degrees of freedom for segments, else 0.
bool isDT() const
if this rec hit is a DT rec hit
TrackingRecHit * trackingRecHit_
virtual GlobalVector globalDirection() const
Direction in 3D for segments, otherwise (0,0,0)
bool isGEM() const
if this rec hit is a GEM rec hit
int dimension() const override
const GeomDet * det() const
virtual std::vector< const GeomDet * > components() const
Returns direct components, if any.
std::shared_ptr< TrackingRecHit const > RecHitPointer
MuonTransientTrackingRecHit * clone() const override
DetId geographicalId() const
std::shared_ptr< MuonTransientTrackingRecHit > MuonRecHitPointer
const TrackingRecHit * hit() const override
const GlobalErrorExtended & globalError() const
CLHEP::HepVector AlgebraicVector
std::vector< ConstRecHitPointer > RecHitContainer
virtual double chi2() const
Chi square of the fit for segments, else 0.
ConstRecHitContainer transientHits() const override
return the sub components of this transient rechit
DetId geographicalId() const
The label of this GeomDet.
AlignmentPositionError const * alignmentPositionError() const
Return pointer to alignment errors.
std::vector< ConstRecHitPointer > ConstRecHitContainer
AlgebraicSymMatrix parametersError() const override
AlgebraicSymMatrix parametersError() const override
Local3DVector LocalVector
virtual LocalError localDirectionError() const
Error on the local direction.
CLHEP::HepSymMatrix AlgebraicSymMatrix
AlgebraicVector parameters() const override
bool isCSC() const
if this rec hit is a CSC rec hit
bool isRPC() const
if this rec hit is a RPC rec hit
const Surface * surface() const final
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
MuonTransientTrackingRecHit::MuonRecHitPointer MuonRecHitPointer
MuonTransientTrackingRecHit::RecHitContainer MuonRecHitContainer
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.
bool isME0() const
if this rec hit is a ME0 rec hit
virtual GlobalError globalDirectionError() const
Error on the global direction.
LocalPoint localPosition() const override