40 theCacheId_TC = theCacheId_GTG = theCacheId_MG = theCacheId_TRH = 0;
56 if (newCacheId_TC != theCacheId_TC) {
58 theCacheId_TC = newCacheId_TC;
65 if (newCacheId_GTG != theCacheId_GTG) {
67 theCacheId_GTG = newCacheId_GTG;
73 if (newCacheId_MG != theCacheId_MG) {
75 theCacheId_MG = newCacheId_MG;
81 if (newCacheId_TRH != theCacheId_TRH) {
82 theCacheId_TRH = newCacheId_TRH;
94 bool printout =
false;
102 if ((*hit)->isValid())
103 if ((*hit)->geographicalId().det() ==
DetId::Muon) {
104 if ((*hit)->geographicalId().subdetId() == 3 && !theRPCInTheFit) {
105 LogTrace(
"Reco|TrackingTools|TrackTransformer") <<
"RPC Rec Hit discarged";
108 staHits.push_back(theMuonRecHitBuilder->build(&**
hit));
109 DetId hitId = staHits.back()->geographicalId();
110 GlobalPoint glbpoint = trackingGeometry()->idToDet(hitId)->position();
111 float gpy = glbpoint.
y();
112 float gpz = glbpoint.
z();
115 if (gpy > 0 && gpz > 0)
117 else if (gpy > 0 && gpz < 0)
119 else if (gpy < 0 && gpz < 0)
121 else if (gpy < 0 && gpz > 0)
143 bool doReverse = staHits.front()->globalPosition().y() > 0 ?
true :
false;
146 doReverse = SlopeSum(staHits);
148 doReverse = SlopeSum(staHits);
150 doReverse = SlopeSum(staHits);
152 doReverse = SlopeSum(staHits);
154 reverse(staHits.begin(), staHits.end());
157 copy(staHits.begin(), staHits.end(), back_inserter(tkHits));
168 for (TransientTrackingRecHit::ConstRecHitContainer::const_iterator
hit = tkHits.begin();
hit != tkHits.end();
170 DetId hitId = (*hit)->geographicalId();
171 GlobalPoint glbpoint = trackingGeometry()->idToDet(hitId)->position();
183 LogTrace(
"TrackFitters") <<
" UNKNOWN MUON HIT TYPE ";
226 return theSmootherOI;
228 return theSmootherIO;
232 return theSmootherOI;
234 return theSmootherIO;
238 return theSmootherOI;
240 return theSmootherIO;
244 return theSmootherOI;
246 return theSmootherIO;
249 return theSmootherOI;
251 return theSmootherIO;
257 return thePropagatorOI;
259 return thePropagatorIO;
263 return thePropagatorOI;
265 return thePropagatorIO;
269 return thePropagatorOI;
271 return thePropagatorIO;
275 return thePropagatorOI;
277 return thePropagatorIO;
280 return thePropagatorIO;
282 return thePropagatorOI;
302 if ((*hit)->isValid())
303 if ((*hit)->geographicalId().det() ==
DetId::Muon) {
304 if ((*hit)->geographicalId().subdetId() == 3 && !theRPCInTheFit) {
305 LogTrace(
"Reco|TrackingTools|TrackTransformer") <<
"RPC Rec Hit discarged";
308 staHits.push_back(theMuonRecHitBuilder->build(&**
hit));
309 DetId hitId = staHits.back()->geographicalId();
310 GlobalPoint glbpoint = trackingGeometry()->idToDet(hitId)->position();
311 float gpy = glbpoint.
y();
312 float gpz = glbpoint.
z();
315 if (gpy > 0 && gpz > 0) {
318 }
else if (gpy > 0 && gpz < 0) {
321 }
else if (gpy < 0 && gpz < 0) {
324 }
else if (gpy < 0 && gpz > 0) {
328 return vector<Trajectory>();
332 return vector<Trajectory>();
335 return vector<Trajectory>();
337 return vector<Trajectory>();
339 return vector<Trajectory>();
341 return vector<Trajectory>();
343 return vector<Trajectory>();
345 return vector<Trajectory>();
347 bool doReverse =
false;
350 doReverse = SlopeSum(staHits);
352 doReverse = SlopeSum(staHits);
354 doReverse = SlopeSum(staHits);
356 doReverse = SlopeSum(staHits);
359 reverse(staHits.begin(), staHits.end());
362 copy(staHits.begin(), staHits.end(), back_inserter(recHitsForReFit));
370 if (recHitsForReFit.size() < 2)
371 return vector<Trajectory>();
373 bool up = recHitsForReFit.back()->globalPosition().y() > 0 ?
true :
false;
376 float sumdy = SumDy(recHitsForReFit);
380 doReverse ?
track.outermostMeasurementState() :
track.innermostMeasurementState();
381 unsigned int innerId = doReverse ?
track.track().outerDetId() :
track.track().innerDetId();
383 LogTrace(
metname) <<
"Prop Dir: " << propagationDirection <<
" FirstId " << innerId <<
" firstTSOS " << firstTSOS;
387 if (recHitsForReFit.front()->geographicalId() !=
DetId(innerId)) {
389 firstTSOS =
propagator(
up,
quadrant, sumdy)->propagate(firstTSOS, recHitsForReFit.front()->det()->surface());
390 LogTrace(
metname) <<
"Final destination: " << recHitsForReFit.front()->det()->surface().position() << endl;
391 if (!firstTSOS.isValid()) {
392 std::cout <<
"Propagation error! Dumping RecHits..." << std::endl;
394 for (TransientTrackingRecHit::ConstRecHitContainer::const_iterator
hit = recHitsForReFit.begin();
395 hit != recHitsForReFit.end();
397 DetId hitId = (*hit)->geographicalId();
398 GlobalPoint glbpoint = trackingGeometry()->idToDet(hitId)->position();
406 return vector<Trajectory>();
414 return vector<Trajectory>();
419 vector<Trajectory> trajectoriesSM = smoother(
up,
quadrant, sumdy)->trajectories(trajectoryBW);
421 if (trajectoriesSM.empty()) {
425 return trajectoriesSM;
436 std::vector<float>
py;
437 std::vector<float> pz;
443 for (TransientTrackingRecHit::ConstRecHitContainer::const_iterator
hit = tkHits.begin();
hit != tkHits.end(); ++
hit) {
444 DetId hitId = (*hit)->geographicalId();
445 GlobalPoint glbpoint = trackingGeometry()->idToDet(hitId)->position();
449 float y2 = glbpoint.
y();
450 float z2 = glbpoint.
z();
492 std::vector<float>
py;
493 std::vector<float> pz;
499 for (TransientTrackingRecHit::ConstRecHitContainer::const_iterator
hit = tkHits.begin();
hit != tkHits.end(); ++
hit) {
500 DetId hitId = (*hit)->geographicalId();
501 GlobalPoint glbpoint = trackingGeometry()->idToDet(hitId)->position();
505 float y2 = glbpoint.
y();
506 float z2 = glbpoint.
z();