Evaluation of fit.
849 {
852
854
857
858 for (data_type::const_iterator p =
data.begin(); p !=
data.end(); ++p) {
859
861 const JMODEL ::JString& parameters =
value.
string[p->first.getString()];
863
864 for (data_type::mapped_type::const_iterator emitter = p->second.begin(); emitter != p->second.end(); ++emitter) {
865
866 const double D = emitter->first.getDistance(position);
867 const double Vi = velocity.getInverseVelocity(D, emitter->first.getZ(), position.
getZ());
868
869 const H_t H0(1.0, string.getGradient(parameters, emitter->first.getPosition(), p->first.getFloor()) * Vi);
870
871 for (data_type::mapped_type::mapped_type::const_iterator hit = emitter->second.begin(); hit != emitter->second.end(); ++hit) {
872
873 const double toa_s =
value.
emission[hit->getEKey()].t1 + D * Vi;
874
875 const double u = (toa_s - hit->getValue()) / hit->getSigma();
876 const double W = sqrt(hit->getWeight());
877
878 successor += (W*W) * estimator->getRho(u);
879
880 const H_t
H = H0 * (W * estimator->getPsi(u) / hit->getSigma());
881
882 I_t i;
883
890
891 V(i.t1, i.t1) +=
H.t1 *
H.t1;
892
894
895 if (hit->getFloor() != 0) {
896
897 switch (this->option) {
898
900 V(i.t1, i.vs) +=
H.t1 *
H.vs;
V(i.tx, i.vs) +=
H.tx *
H.vs;
V(i.ty, i.vs) +=
H.ty *
H.vs;
V(i.tx2, i.vs) +=
H.tx2 *
H.vs;
V(i.ty2, i.vs) +=
H.ty2 *
H.vs;
901
902 V(i.vs, i.t1) =
V(i.t1, i.vs);
903 V(i.vs, i.tx) =
V(i.tx, i.vs);
904 V(i.vs, i.ty) =
V(i.ty, i.vs);
905 V(i.vs, i.tx2) =
V(i.tx2, i.vs);
906 V(i.vs, i.ty2) =
V(i.ty2, i.vs);
907
908 V(i.vs, i.vs) +=
H.vs *
H.vs;
909
911
913 V(i.t1, i.tx2) +=
H.t1 *
H.tx2;
V(i.tx, i.tx2) +=
H.tx *
H.tx2;
V(i.ty, i.tx2) +=
H.ty *
H.tx2;
914
915 V(i.tx2, i.t1) =
V(i.t1, i.tx2);
916 V(i.tx2, i.tx) =
V(i.tx, i.tx2);
917 V(i.tx2, i.ty) =
V(i.ty, i.tx2);
918
919 V(i.t1, i.ty2) +=
H.t1 *
H.ty2;
V(i.tx, i.ty2) +=
H.tx *
H.ty2;
V(i.ty, i.ty2) +=
H.ty *
H.ty2;
920
921 V(i.ty2, i.t1) =
V(i.t1, i.ty2);
922 V(i.ty2, i.tx) =
V(i.tx, i.ty2);
923 V(i.ty2, i.ty) =
V(i.ty, i.ty2);
924
925 V(i.tx2, i.tx2) +=
H.tx2 *
H.tx2;
V(i.tx2, i.ty2) +=
H.tx2 *
H.ty2;
926 V(i.ty2, i.tx2) =
V(i.tx2, i.ty2);
V(i.ty2, i.ty2) +=
H.ty2 *
H.ty2;
927
928 Y[i.tx2] += W *
H.tx2;
929 Y[i.ty2] += W *
H.ty2;
930
932 V(i.t1, i.tx) +=
H.t1 *
H.tx;
V(i.t1, i.ty) +=
H.t1 *
H.ty;
933 V(i.tx, i.t1) =
V(i.t1, i.tx);
V(i.ty, i.t1) =
V(i.t1, i.ty);
934
935 V(i.tx, i.tx) +=
H.tx *
H.tx;
V(i.tx, i.ty) +=
H.tx *
H.ty;
936 V(i.ty, i.tx) =
V(i.tx, i.ty);
V(i.ty, i.ty) +=
H.ty *
H.ty;
937
940 break;
941
942 default:
943 break;
944 }
945 }
946 }
947 }
948 }
949 }
Data structure for position in three dimensions.
const JPosition3D & getPosition() const
Get position.
double getZ() const
Get z position.
@ FIT_EMITTERS_AND_STRINGS_1st_ORDER_t
fit times of emission of emitters and tilt angles of strings
@ FIT_EMITTERS_AND_STRINGS_2nd_ORDER_t
fit times of emission of emitters and tilt angles of strings with second order correction
@ FIT_EMITTERS_AND_STRINGS_2nd_ORDER_AND_STRETCHING_t
fit times of emission of emitters and tilt angles of strings with second order correction and stretch...
static const double H
Planck constant [eV s].
JACOUSTICS::JModel::emission_type emission
size_t getIndex(int id, double JString::*p) const
Get index of fit parameter for given string.
JACOUSTICS::JModel::string_type string
JMatrixND & reset()
Set matrix to the null matrix.