44 theTkRecHitBuildToken(
46 theMuonRecHitBuildToken(
103 bool printout =
false;
111 if ((*hit)->isValid())
112 if ((*hit)->geographicalId().det() ==
DetId::Muon) {
113 if ((*hit)->geographicalId().subdetId() == 3 && !
theRPCInTheFit) {
114 LogTrace(
"Reco|TrackingTools|TrackTransformer") <<
"RPC Rec Hit discarged";
118 DetId hitId = staHits.back()->geographicalId();
120 float gpy = glbpoint.
y();
121 float gpz = glbpoint.
z();
124 if (gpy > 0 && gpz > 0)
126 else if (gpy > 0 && gpz < 0)
128 else if (gpy < 0 && gpz < 0)
130 else if (gpy < 0 && gpz > 0)
152 bool doReverse = staHits.front()->globalPosition().y() > 0 ?
true :
false;
163 reverse(staHits.begin(), staHits.end());
166 copy(staHits.begin(), staHits.end(), back_inserter(tkHits));
177 for (TransientTrackingRecHit::ConstRecHitContainer::const_iterator
hit = tkHits.begin();
hit != tkHits.end();
179 DetId hitId = (*hit)->geographicalId();
192 LogTrace(
"TrackFitters") <<
" UNKNOWN MUON HIT TYPE ";
311 if ((*hit)->isValid())
312 if ((*hit)->geographicalId().det() ==
DetId::Muon) {
313 if ((*hit)->geographicalId().subdetId() == 3 && !
theRPCInTheFit) {
314 LogTrace(
"Reco|TrackingTools|TrackTransformer") <<
"RPC Rec Hit discarged";
318 DetId hitId = staHits.back()->geographicalId();
320 float gpy = glbpoint.
y();
321 float gpz = glbpoint.
z();
324 if (gpy > 0 && gpz > 0) {
327 }
else if (gpy > 0 && gpz < 0) {
330 }
else if (gpy < 0 && gpz < 0) {
333 }
else if (gpy < 0 && gpz > 0) {
337 return vector<Trajectory>();
341 return vector<Trajectory>();
344 return vector<Trajectory>();
346 return vector<Trajectory>();
348 return vector<Trajectory>();
350 return vector<Trajectory>();
352 return vector<Trajectory>();
354 return vector<Trajectory>();
356 bool doReverse =
false;
368 reverse(staHits.begin(), staHits.end());
371 copy(staHits.begin(), staHits.end(), back_inserter(recHitsForReFit));
379 if (recHitsForReFit.size() < 2)
380 return vector<Trajectory>();
382 bool up = recHitsForReFit.back()->globalPosition().y() > 0 ?
true :
false;
385 float sumdy =
SumDy(recHitsForReFit);
389 doReverse ?
track.outermostMeasurementState() :
track.innermostMeasurementState();
390 unsigned int innerId = doReverse ?
track.track().outerDetId() :
track.track().innerDetId();
392 LogTrace(
metname) <<
"Prop Dir: " << propagationDirection <<
" FirstId " << innerId <<
" firstTSOS " << firstTSOS;
396 if (recHitsForReFit.front()->geographicalId() !=
DetId(innerId)) {
399 LogTrace(
metname) <<
"Final destination: " << recHitsForReFit.front()->det()->surface().position() << endl;
400 if (!firstTSOS.isValid()) {
401 std::cout <<
"Propagation error! Dumping RecHits..." << std::endl;
403 for (TransientTrackingRecHit::ConstRecHitContainer::const_iterator
hit = recHitsForReFit.begin();
404 hit != recHitsForReFit.end();
406 DetId hitId = (*hit)->geographicalId();
415 return vector<Trajectory>();
423 return vector<Trajectory>();
430 if (trajectoriesSM.empty()) {
434 return trajectoriesSM;
445 std::vector<float>
py;
446 std::vector<float> pz;
452 for (TransientTrackingRecHit::ConstRecHitContainer::const_iterator
hit = tkHits.begin();
hit != tkHits.end(); ++
hit) {
453 DetId hitId = (*hit)->geographicalId();
458 float y2 = glbpoint.
y();
459 float z2 = glbpoint.
z();
501 std::vector<float>
py;
502 std::vector<float> pz;
508 for (TransientTrackingRecHit::ConstRecHitContainer::const_iterator
hit = tkHits.begin();
hit != tkHits.end(); ++
hit) {
509 DetId hitId = (*hit)->geographicalId();
514 float y2 = glbpoint.
y();
515 float z2 = glbpoint.
z();
T getParameter(std::string const &) const
virtual TrajectoryContainer trajectories(const Trajectory &traj) const
const std::string metname
int quadrant(const DetId &detid, const TrackerTopology *tTopo_, bool phase_)
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
const GeomDet * idToDet(DetId) const override
constexpr Detector det() const
get the detector field from this detid
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
std::vector< ConstRecHitPointer > ConstRecHitContainer
const Surface::PositionType & position() const
The position (origin of the R.F.)
std::vector< Trajectory > fit(const Trajectory &traj, fitType type=standard) const