46 : m_straightline (rhs.m_straightline),
47 m_fieldprop (rhs.m_fieldprop),
50 m_prevchi2 (rhs.m_prevchi2),
51 m_nperpars (rhs.m_nperpars),
52 m_nscatterers (rhs.m_nscatterers),
53 m_ncaloscatterers (rhs.m_ncaloscatterers),
54 m_nbrems (rhs.m_nbrems),
55 m_nupstreamstates (rhs.m_nupstreamstates),
56 m_nupstreamscatterers (rhs.m_nupstreamscatterers),
57 m_nupstreamcaloscatterers (rhs.m_nupstreamcaloscatterers),
58 m_nupstreambrems (rhs.m_nupstreambrems),
59 m_nhits (rhs.m_nhits),
60 m_noutl (rhs.m_noutl),
61 m_nsihits (rhs.m_nsihits),
62 m_ntrthits (rhs.m_ntrthits),
63 m_ntrtprechits (rhs.m_ntrtprechits),
64 m_ntrttubehits (rhs.m_ntrttubehits),
65 m_npseudo (rhs.m_npseudo),
66 m_nmeasoutl (rhs.m_nmeasoutl),
67 m_refpar(rhs.m_refpar != nullptr ? rhs.m_refpar->
clone() : nullptr),
68 m_converged (rhs.m_converged),
69 m_scatteringangles (rhs.m_scatteringangles),
70 m_scatteringsigmas (rhs.m_scatteringsigmas),
71 m_brems (rhs.m_brems),
73 m_errors (rhs.m_errors),
74 m_weightresderiv (rhs.m_weightresderiv),
75 m_totx0 (rhs.m_totx0),
76 m_toteloss (rhs.m_toteloss),
78 m_prefit (rhs.m_prefit),
79 m_caloelossstate (nullptr),
80 m_upstreammat (rhs.m_upstreammat)
84 for (
const std::unique_ptr<GXFTrackState> &
i : rhs.
m_states) {
85 m_states.emplace_back(std::make_unique<GXFTrackState>(*
i));
123 for (
const std::unique_ptr<GXFTrackState> &
i : rhs.
m_states) {
124 m_states.push_back(std::make_unique<GXFTrackState>(*
i));
149 constexpr
double perpThreshold = 1400;
150 constexpr
double zThreshold = 3700;
160 (
par->position().perp() > perpThreshold || std::abs(
par->position().z()) > zThreshold)
181 double *
errors = state->measurementErrors();
183 for (
int i = 0;
i < 5;
i++) {
216 m_states.push_back(std::move(state));
230 if (meff->
deltaE() == 0) {
244 m_states.push_back(std::move(state));
251 int previousbrems = 0;
254 if ((
m_states[
i]->materialEffects() !=
nullptr)
255 &&
m_states[
i]->materialEffects()->sigmaDeltaE() > 0) {
268 m_states.push_back(std::move(state));
286 bool isdownstream =
false;
288 if ((**it2).trackParameters() !=
nullptr) {
290 double inprod =
m_refpar->momentum().dot((**it2).position() -
m_refpar->position());
302 std::abs(distsol.
first()) < std::abs(distsol.
second()) ?
323 (**it2).materialEffects()->sigmaDeltaTheta() != 0
327 if ((**it2).materialEffects()->deltaE() == 0) {
332 ((**it2).materialEffects() !=
nullptr) &&
333 (**it2).materialEffects()->sigmaDeltaE() > 0
368 for (
int i = 0;
i < 5;
i++) {
394 if (
error>1 && oldError<1) {
398 else if (error<1 && oldError>1) {
530 && ((
m_prefit == 0) || (*state).materialEffects()->deltaE() == 0)) {
531 double scatphi = (*state).materialEffects()->deltaPhi();
532 double scattheta = (*state).materialEffects()->deltaTheta();
534 double sigmascatphi = (*state).materialEffects()->sigmaDeltaPhi();
535 double sigmascattheta = (*state).materialEffects()->sigmaDeltaTheta();
537 emplace_back(sigmascatphi, sigmascattheta);
544 std::vector < std::pair < double, double >>&
559 double > >&scatteringangles) {
564 && ((
m_prefit == 0) || (*state).materialEffects()->deltaE() == 0)) {
565 double scatphi = scatteringangles[scatno].first;
566 double scattheta = scatteringangles[scatno].second;
567 (*state).materialEffects()->setScatteringAngles(scatphi, scattheta);
579 if (((*state).materialEffects() !=
nullptr)
580 && (*state).materialEffects()->sigmaDeltaE() > 0) {
581 (*state).materialEffects()->setdelta_p(
m_brems[bremno]);
596 if (
m_res.size() == 0) {
643 std::vector < std::pair < const Layer *, const Layer *>>&
652 for (std::unique_ptr<GXFTrackState> & hit :
trackStates()) {
653 if (hit->measurement() !=
nullptr) {
654 if (firstmeasstate ==
nullptr) {
655 firstmeasstate = hit.get();
657 lastmeasstate = hit.get();
661 if (firstmeasstate ==
nullptr) {
662 throw std::logic_error(
"no first measurement.");
665 return std::make_pair(firstmeasstate, lastmeasstate);
678 (hit->materialEffects() !=
nullptr) &&
679 hit->materialEffects()->isKink()
689 for (std::unique_ptr<GXFTrackState> & hit :
trackStates()) {
690 hit->setTrackCovariance(
nullptr);
695 return std::make_unique<const FitQuality>(
chi2(),
nDOF());