Evaluation of fit.
850 {
853
855
858
859 for (data_type::const_iterator p =
data.begin(); p !=
data.end(); ++p) {
860
862 const JMODEL ::JString& parameters =
value.
string[p->first.getString()];
864
865 for (data_type::mapped_type::const_iterator emitter = p->second.begin(); emitter != p->second.end(); ++emitter) {
866
867 const double D = emitter->first.getDistance(position);
868 const double Vi = velocity.getInverseVelocity(D, emitter->first.getZ(), position.
getZ());
869
870 const H_t H0(1.0, string.getGradient(parameters, emitter->first.getPosition(), p->first.getFloor()) * Vi);
871
872 for (data_type::mapped_type::mapped_type::const_iterator hit = emitter->second.begin(); hit != emitter->second.end(); ++hit) {
873
874 const double toa_s =
value.
emission[hit->getEKey()].t1 + D * Vi;
875
876 const double u = (toa_s - hit->getValue()) / hit->getSigma();
877 const double W = sqrt(hit->getWeight());
878
880
881 const H_t
H = H0 * (W * estimator->getPsi(
u) / hit->getSigma());
882
883 I_t i;
884
891
892 V(i.t1, i.t1) +=
H.t1 *
H.t1;
893
895
896 if (hit->getFloor() != 0) {
897
898 switch (this->option) {
899
901 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;
902
903 V(i.vs, i.t1) =
V(i.t1, i.vs);
904 V(i.vs, i.tx) =
V(i.tx, i.vs);
905 V(i.vs, i.ty) =
V(i.ty, i.vs);
906 V(i.vs, i.tx2) =
V(i.tx2, i.vs);
907 V(i.vs, i.ty2) =
V(i.ty2, i.vs);
908
909 V(i.vs, i.vs) +=
H.vs *
H.vs;
910
912
914 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;
915
916 V(i.tx2, i.t1) =
V(i.t1, i.tx2);
917 V(i.tx2, i.tx) =
V(i.tx, i.tx2);
918 V(i.tx2, i.ty) =
V(i.ty, i.tx2);
919
920 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;
921
922 V(i.ty2, i.t1) =
V(i.t1, i.ty2);
923 V(i.ty2, i.tx) =
V(i.tx, i.ty2);
924 V(i.ty2, i.ty) =
V(i.ty, i.ty2);
925
926 V(i.tx2, i.tx2) +=
H.tx2 *
H.tx2;
V(i.tx2, i.ty2) +=
H.tx2 *
H.ty2;
927 V(i.ty2, i.tx2) =
V(i.tx2, i.ty2);
V(i.ty2, i.ty2) +=
H.ty2 *
H.ty2;
928
929 Y[i.tx2] += W *
H.tx2;
930 Y[i.ty2] += W *
H.ty2;
931
933 V(i.t1, i.tx) +=
H.t1 *
H.tx;
V(i.t1, i.ty) +=
H.t1 *
H.ty;
934 V(i.tx, i.t1) =
V(i.t1, i.tx);
V(i.ty, i.t1) =
V(i.t1, i.ty);
935
936 V(i.tx, i.tx) +=
H.tx *
H.tx;
V(i.tx, i.ty) +=
H.tx *
H.ty;
937 V(i.ty, i.tx) =
V(i.tx, i.ty);
V(i.ty, i.ty) +=
H.ty *
H.ty;
938
941 break;
942
943 default:
944 break;
945 }
946 }
947 }
948 }
949 }
950 }
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.