38 theTrackerRecHitBuilderName = parameterSet.
getParameter<
string>(
"TrackerRecHitBuilder");
39 theMuonRecHitBuilderName = parameterSet.
getParameter<
string>(
"MuonRecHitBuilder");
41 theRPCInTheFit = parameterSet.
getParameter<
bool>(
"RefitRPCHits");
43 theCacheId_TC = theCacheId_GTG = theCacheId_MG = theCacheId_TRH = 0;
44 theSkipStationDT = parameterSet.
getParameter<
int>(
"SkipStationDT");
45 theSkipStationCSC = parameterSet.
getParameter<
int>(
"SkipStationCSC");
46 theSkipWheelDT = parameterSet.
getParameter<
int>(
"SkipWheelDT");
47 theTrackerSkipSystem = parameterSet.
getParameter<
int>(
"TrackerSkipSystem");
48 theTrackerSkipSection =
65 if (newCacheId_TC != theCacheId_TC) {
66 LogTrace(metname) <<
"Tracking Component changed!";
67 theCacheId_TC = newCacheId_TC;
74 if (newCacheId_GTG != theCacheId_GTG) {
75 LogTrace(metname) <<
"GlobalTrackingGeometry changed!";
76 theCacheId_GTG = newCacheId_GTG;
82 if (newCacheId_MG != theCacheId_MG) {
83 LogTrace(metname) <<
"Magnetic Field changed!";
84 theCacheId_MG = newCacheId_MG;
90 if (newCacheId_TRH != theCacheId_TRH) {
91 theCacheId_TRH = newCacheId_TRH;
92 LogTrace(metname) <<
"TransientRecHitRecord changed!";
109 if ((*hit)->isValid()) {
110 if ((*hit)->geographicalId().det() ==
DetId::Tracker && TrackerKeep((*hit)->geographicalId())) {
111 tkHits.push_back(theTrackerRecHitBuilder->build(&**
hit));
112 }
else if ((*hit)->geographicalId().det() ==
DetId::Muon && MuonKeep((*hit)->geographicalId())) {
113 if ((*hit)->geographicalId().subdetId() == 3 && !theRPCInTheFit) {
114 LogTrace(
"Reco|TrackingTools|TrackTransformer") <<
"RPC Rec Hit discarged";
117 staHits.push_back(theMuonRecHitBuilder->build(&**
hit));
133 copy(staHits.begin(), staHits.end(), back_inserter(tkHits));
135 for (TransientTrackingRecHit::ConstRecHitContainer::const_iterator
hit = tkHits.begin();
hit != tkHits.end(); ++
hit) {
136 DetId hitId = (*hit)->geographicalId();
137 GlobalPoint glbpoint = trackingGeometry()->idToDet(hitId)->position();
141 LogTrace(
"TrackFitters") << glbpoint <<
" I am TIB " << tTopo_->tibLayer(hitId);
143 LogTrace(
"TrackFitters") << glbpoint <<
" I am TOB " << tTopo_->tobLayer(hitId);
145 LogTrace(
"TrackFitters") << glbpoint <<
" I am TEC " << tTopo_->tecWheel(hitId);
147 LogTrace(
"TrackFitters") << glbpoint <<
" I am TID " << tTopo_->tidWheel(hitId);
149 LogTrace(
"TrackFitters") << glbpoint <<
" I am PixBar " << tTopo_->pxbLayer(hitId);
151 LogTrace(
"TrackFitters") << glbpoint <<
" I am PixFwd " << tTopo_->pxfDisk(hitId);
153 LogTrace(
"TrackFitters") <<
" UNKNOWN TRACKER HIT TYPE ";
162 LogTrace(
"TrackFitters") <<
" UNKNOWN MUON HIT TYPE ";
164 LogTrace(
"TrackFitters") <<
" UNKNOWN HIT TYPE ";
181 return theSmootherOI;
183 return theSmootherIO;
188 return thePropagatorIO;
190 return thePropagatorOI;
202 if (recHitsForReFit.size() < 2)
203 return vector<Trajectory>();
205 bool up = recHitsForReFit.back()->globalPosition().y() > 0 ?
true :
false;
212 LogTrace(metname) <<
"Prop Dir: " << propagationDirection <<
" FirstId " << innerId <<
" firstTSOS " << firstTSOS;
216 if (recHitsForReFit.front()->geographicalId() !=
DetId(innerId)) {
217 LogTrace(metname) <<
"Propagation occurring" << endl;
218 firstTSOS =
propagator(up)->propagate(firstTSOS, recHitsForReFit.front()->det()->surface());
219 LogTrace(metname) <<
"Final destination: " << recHitsForReFit.front()->det()->surface().position() << endl;
220 if (!firstTSOS.isValid()) {
221 LogTrace(metname) <<
"Propagation error!" << endl;
222 return vector<Trajectory>();
226 vector<Trajectory>
trajectories = fitter(up)->fit(seed, recHitsForReFit, firstTSOS);
228 if (trajectories.empty()) {
229 LogTrace(metname) <<
"No Track refitted!" << endl;
230 return vector<Trajectory>();
233 Trajectory trajectoryBW = trajectories.front();
235 vector<Trajectory> trajectoriesSM = smoother(up)->trajectories(trajectoryBW);
237 if (trajectoriesSM.empty()) {
238 LogTrace(metname) <<
"No Track smoothed!" << endl;
239 return vector<Trajectory>();
242 return trajectoriesSM;
251 if (theTrackerSkipSystem < 0)
257 if (
id.subdetId() == theTrackerSkipSystem)
258 layer = tTopo_->layer(
id);
260 if (theTrackerSkipSection > -998 && layer == theTrackerSkipSection)
271 if (theSkipStationDT < 0 && theSkipStationCSC < 0)
295 if (isRPC && (station == theSkipStationCSC || station == theSkipStationDT))
297 if (isDT && station == theSkipStationDT)
299 if (isCSC && station == theSkipStationCSC)
302 if (isDT && theSkipWheelDT > -998 && wheel == theSkipWheelDT)
T getParameter(std::string const &) const
static constexpr auto TEC
const std::string metname
bool isDT(GeomDetEnumerators::SubDetector m)
TrajectoryStateOnSurface innermostMeasurementState() const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
unsigned int outerDetId() const
DetId of the detector on which surface the outermost state is located.
static constexpr auto TOB
TrajectoryStateOnSurface outermostMeasurementState() const
trackingRecHit_iterator recHitsEnd() const
last iterator to RecHits
std::vector< ConstRecHitPointer > ConstRecHitContainer
static constexpr auto TIB
bool isRPC(GeomDetEnumerators::SubDetector m)
const Track & track() const
bool isCSC(GeomDetEnumerators::SubDetector m)
int station() const
Return the station number.
int wheel() const
Return the wheel number.
static constexpr auto TID
unsigned int innerDetId() const
DetId of the detector on which surface the innermost state is located.
T const * product() const
trackingRecHit_iterator recHitsBegin() const
first iterator to RecHits
ParameterSet const & parameterSet(Provenance const &provenance)
constexpr Detector det() const
get the detector field from this detid