30 theRPCInTheFit(parameterSet.getParameter<bool>(
"RefitRPCHits")),
31 theDoPredictionsOnly(parameterSet.getParameter<bool>(
"DoPredictionsOnly")),
32 theRefitDirection(parameterSet.getParameter<
string>(
"RefitDirection")),
33 theFitterName(parameterSet.getParameter<
string>(
"Fitter")),
34 theSmootherName(parameterSet.getParameter<
string>(
"Smoother")),
36 theTrackerRecHitBuilderName(parameterSet.getParameter<
string>(
"TrackerRecHitBuilder")),
37 theMuonRecHitBuilderName(parameterSet.getParameter<
string>(
"MuonRecHitBuilder"))
58 LogTrace(metname) <<
"Tracking Component changed!";
66 LogTrace(metname) <<
"GlobalTrackingGeometry changed!";
74 LogTrace(metname) <<
"Magnetic Field changed!";
83 LogTrace(metname) <<
"TransientRecHitRecord changed!";
107 if((*hit)->isValid()) {
109 result.emplace_back((**hit).cloneForFit(*tkbuilder->geometry()->idToDet( (**hit).geographicalId() ) ) );
110 }
else if ( (*hit)->geographicalId().det() ==
DetId::Muon ){
112 LogTrace(
"Reco|TrackingTools|TrackTransformer") <<
"RPC Rec Hit discarged";
127 if (!recHits.empty()){
132 auto rFirst = first.
mag2();
133 auto rLast = last.
mag2();
137 LogDebug(
"Reco|TrackingTools|TrackTransformer") <<
"Impossible to determine the rechits order" <<endl;
150 return transform(track, recHitsForReFit);
160 if(recHitsForReFit.size() < 2)
return vector<Trajectory>();
194 LogTrace(metname) <<
"RH order (0-insideOut, 1-outsideIn): " << recHitsOrder;
205 LogTrace(metname) <<
"P (0-insideOut, 1-outsideIn): " <<
p;
206 LogTrace(metname) <<
"FD (0-OM, 1-AM, 2-ANY): " << propagationDirection;
214 reverse(recHitsForReFit.begin(),recHitsForReFit.end());}
243 LogTrace(metname)<<
"Error wrong initial state!"<<endl;
244 return vector<Trajectory>();
249 if(recHitsForReFit.front()->geographicalId() !=
DetId(innerId)){
250 LogTrace(metname)<<
"Propagation occured"<<endl;
253 LogTrace(metname)<<
"Propagation error!"<<endl;
254 return vector<Trajectory>();
261 for(
auto const &
hit : recHitsForReFit) {
265 return vector<Trajectory>(1, aTraj);
271 if(trajectories.empty()){
272 LogTrace(metname)<<
"No Track refitted!"<<endl;
276 auto const & trajectoryBW = trajectories.front();
278 auto const & trajectoriesSM =
theSmoother->trajectories(trajectoryBW);
280 if(trajectoriesSM.empty()){
281 LogTrace(metname)<<
"No Track smoothed!"<<endl;
284 return trajectoriesSM;
PropagationDirection propagationDirection() const
const std::string metname
GeometricalDirection geometricalDirection() const
Global3DPoint GlobalPoint
def setup(process, global_tag, zero_tesla=False)
GlobalPoint globalPosition() const
TrajectoryStateOnSurface innermostMeasurementState() const
virtual TrajectorySmoother * clone() const =0
virtual std::unique_ptr< TrajectoryFitter > clone() const =0
const SurfaceType & surface() const
unsigned int outerDetId() const
DetId of the detector on which surface the outermost state is located.
TrajectoryStateOnSurface outermostMeasurementState() const
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
trackingRecHit_iterator recHitsEnd() const
last iterator to RecHits
std::vector< ConstRecHitPointer > ConstRecHitContainer
const Track & track() const
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
GlobalVector globalMomentum() const
static int position[264][3]
const GeomDet * idToDet(DetId) const override
unsigned int innerDetId() const
DetId of the detector on which surface the innermost state is located.
T const * product() const
void push(const TrajectoryMeasurement &tm)
trackingRecHit_iterator recHitsBegin() const
first iterator to RecHits
ParameterSet const & parameterSet(Provenance const &provenance)