22 thePropagatorAlongName(conf.getParameter<std::
string>(
"propagatorAlongTISE")),
23 thePropagatorOppositeName(conf.getParameter<std::
string>(
"propagatorOppositeTISE")),
26 theNumberMeasurementsForFit(conf.getParameter<int>(
"numberMeasurementsForFit"))
41 std::pair<TrajectoryStateOnSurface, const GeomDet*>
45 LogDebug(
"TransientInitialStateEstimator")
46 <<
"a backward fit will not be done. assuming that the state on first measurement is OK";
49 return std::pair<TrajectoryStateOnSurface, const GeomDet*>( std::move(firstStateFromForward),
53 LogDebug(
"TransientInitialStateEstimator")
54 <<
"told to not do a back fit, but the forward state of the first measurement is not valid. doing a back fit.";
59 if (nMeas-1 < lastFitted) lastFitted = nMeas-1;
64 bool foundLast =
false;
67 for (
int i=lastFitted;
i >= 0;
i--) {
68 if(measvec[
i].recHit()->det()){
73 firstHits.push_back( measvec[
i].recHit());
76 TSOS startingState = measvec[actualLast].updatedState();
84 &aChi2MeasurementEstimator,
96 LogDebug(
"TransientInitialStateEstimator")
97 <<
"using a backward fit of :"<<firstHits.size()<<
" hits, starting from:\n"<<startingState
98 <<
" to get the estimate of the initial state of the track.";
101 LogDebug(
"TransientInitialStateEstimator")
102 <<
"FitTester: first hits fit failed!";
103 return std::pair<TrajectoryStateOnSurface, const GeomDet*>();
122 LogDebug(
"TransientInitialStateEstimator")
123 <<
"the initial state is found to be:\n:"<<firstState
124 <<
"\n it's field pointer is: "<<firstState.magneticField()
128 return std::pair<TrajectoryStateOnSurface, const GeomDet*>( std::move(firstState),
129 firstMeas.
recHit()->det());
void rescaleError(double factor)
ConstRecHitPointer const & recHit() const
const LocalTrajectoryParameters & localParameters() const
const std::string thePropagatorAlongName
const MagneticField * magneticField() const
const Propagator * thePropagatorOpposite
signed char nLoops() const
PropagationDirection const & direction() const
DataContainer const & measurements() const
const SurfaceType & surface() const
void setEventSetup(const edm::EventSetup &es, const TkClonerImpl &hc)
const Propagator * thePropagatorAlong
TrajectoryMeasurement const & lastMeasurement() const
const std::string thePropagatorOppositeName
const LocalTrajectoryError & localError() const
TrajectoryStateOnSurface const & forwardPredictedState() const
Access to forward predicted state (from fitter or builder)
std::vector< ConstRecHitPointer > ConstRecHitContainer
TrajectoryMeasurement const & firstMeasurement() const
T const * product() const
const int theNumberMeasurementsForFit
virtual const MagneticField * magneticField() const =0
TransientInitialStateEstimator(const edm::ParameterSet &conf)
TrajectoryStateOnSurface const & updatedState() const
std::pair< TrajectoryStateOnSurface, const GeomDet * > innerState(const Trajectory &traj, bool doBackFit=true) const
TkClonerImpl theHitCloner