22 : thePropagatorAlongName(conf.getParameter<
std::
string>(
"propagatorAlongTISE")),
23 thePropagatorOppositeName(conf.getParameter<
std::
string>(
"propagatorOppositeTISE")),
24 thePropagatorAlong(nullptr),
25 thePropagatorOpposite(nullptr),
26 theNumberMeasurementsForFit(conf.getParameter<
int>(
"numberMeasurementsForFit")) {}
41 bool doBackFit)
const {
43 LogDebug(
"TransientInitialStateEstimator")
44 <<
"a backward fit will not be done. assuming that the state on first measurement is OK";
47 return std::pair<TrajectoryStateOnSurface, const GeomDet*>(
std::move(firstStateFromForward),
51 LogDebug(
"TransientInitialStateEstimator")
52 <<
"told to not do a back fit, but the forward state of the first measurement is not valid. doing a back fit.";
57 if (nMeas - 1 < lastFitted)
58 lastFitted = nMeas - 1;
63 bool foundLast =
false;
66 for (
int i = lastFitted;
i >= 0;
i--) {
67 if (measvec[
i].
recHit()->det()) {
72 firstHits.push_back(measvec[
i].
recHit());
75 TSOS startingState = measvec[actualLast].updatedState();
81 KFTrajectoryFitter backFitter(
92 LogDebug(
"TransientInitialStateEstimator")
93 <<
"using a backward fit of :" << firstHits.size() <<
" hits, starting from:\n"
94 << startingState <<
" to get the estimate of the initial state of the track.";
97 LogDebug(
"TransientInitialStateEstimator") <<
"FitTester: first hits fit failed!";
98 return std::pair<TrajectoryStateOnSurface, const GeomDet*>();
116 LogDebug(
"TransientInitialStateEstimator")
117 <<
"the initial state is found to be:\n:" << firstState
118 <<
"\n it's field pointer is: " << firstState.magneticField()
121 return std::pair<TrajectoryStateOnSurface, const GeomDet*>(
std::move(firstState), firstMeas.
recHit()->det());