17 #define ader_ref(a_1,a_2) ader[(a_2)*(vkalNTrkM*3+3) + (a_1)]
26 for (
i=0;
i<NPar;
i++) {
for (j=0; j<NPar; j++) {
ader_ref(
i, j)=0.;} }
39 for (
it=0;
it<NTRK; ++
it) {
51 for (
it=0;
it<NTRK; ++
it) {
63 for (
i=0;
i<NPar-1;
i++) {
64 for (j=
i+1; j<NPar; ++j) {
89 int NPar = 3*NTRK+3+totNC;
92 for (
i=0;
i<NPar;
i++) {
for (j=0; j<NPar; j++) ader[
i+j*NPar]=0.; }
93 std::vector<std::vector< const Vect3DF*> > tf0t;
94 std::vector< const Vect3DF* > th0t;
95 std::vector< double > taa;
96 std::vector< const Vect3DF* > tmpVec;
106 tf0t.push_back( std::move(tmpVec) );
110 ader[0*NPar+ 0] += vk->
wa[0];
111 ader[0*NPar+ 1] += vk->
wa[1];
112 ader[1*NPar+ 1] += vk->
wa[2];
113 ader[0*NPar+ 2] += vk->
wa[3];
114 ader[1*NPar+ 2] += vk->
wa[4];
115 ader[2*NPar+ 2] += vk->
wa[5];
116 ader[1*NPar+ 0] = ader[0*NPar+ 1];
117 ader[2*NPar+ 0] = ader[0*NPar+ 2];
118 ader[2*NPar+ 1] = ader[1*NPar+ 2];
121 for (
it=0;
it<NTRK; ++
it) {
122 ader[0 + (
it*3 + 3)*NPar] += vk->
tmpArr[
it]->wb[0];
123 ader[1 + (
it*3 + 3)*NPar] += vk->
tmpArr[
it]->wb[1];
124 ader[2 + (
it*3 + 3)*NPar] += vk->
tmpArr[
it]->wb[2];
125 ader[0 + (
it*3 + 4)*NPar] += vk->
tmpArr[
it]->wb[3];
126 ader[1 + (
it*3 + 4)*NPar] += vk->
tmpArr[
it]->wb[4];
127 ader[2 + (
it*3 + 4)*NPar] += vk->
tmpArr[
it]->wb[5];
128 ader[0 + (
it*3 + 5)*NPar] += vk->
tmpArr[
it]->wb[6];
129 ader[1 + (
it*3 + 5)*NPar] += vk->
tmpArr[
it]->wb[7];
130 ader[2 + (
it*3 + 5)*NPar] += vk->
tmpArr[
it]->wb[8];
133 for (
it=0;
it<NTRK; ++
it) {
134 ader[(
it*3 + 3) + (
it*3 + 3)*NPar] += vk->
tmpArr[
it]->wc[0];
135 ader[(
it*3 + 3) + (
it*3 + 4)*NPar] += vk->
tmpArr[
it]->wc[1];
136 ader[(
it*3 + 4) + (
it*3 + 4)*NPar] += vk->
tmpArr[
it]->wc[2];
137 ader[(
it*3 + 3) + (
it*3 + 5)*NPar] += vk->
tmpArr[
it]->wc[3];
138 ader[(
it*3 + 4) + (
it*3 + 5)*NPar] += vk->
tmpArr[
it]->wc[4];
139 ader[(
it*3 + 5) + (
it*3 + 5)*NPar] += vk->
tmpArr[
it]->wc[5];
140 ader[(
it*3 + 4) + (
it*3 + 3)*NPar] += vk->
tmpArr[
it]->wc[1];
141 ader[(
it*3 + 5) + (
it*3 + 3)*NPar] += vk->
tmpArr[
it]->wc[3];
142 ader[(
it*3 + 5) + (
it*3 + 4)*NPar] += vk->
tmpArr[
it]->wc[4];
145 for (
i=0;
i<NPar-1;
i++) {
146 for (j=
i+1; j<NPar; ++j) {
147 ader[j +
i*NPar] = ader[
i + j*NPar];
153 double drdpy[2][3],dpipj[3][3];
154 for (
it = 0;
it < NTRK; ++
it) {
161 for (jt = 0; jt < NTRK; ++jt) {
162 for (
k=0;
k<3; ++
k) {
163 for (
l=0;
l<3; ++
l) {
165 for (j=0; j<2; ++j) {
166 dpipj[
k][
l] += vk->
tmpArr[jt]->drdp[j][
k] * drdpy[j][
l];
170 for (
k=0;
k<3; ++
k) {
171 for (
l=0;
l<3; ++
l) {
172 ader[(
it*3+3 +
k) + (jt*3+3 +
l)*NPar] += dpipj[
l][
k];
182 for(
ic=0;
ic<totNC;
ic++){
183 ader[(0) + (NTrP+
ic)*NPar] = -2.*th0t[
ic]->X;
184 ader[(1) + (NTrP+
ic)*NPar] = -2.*th0t[
ic]->Y;
185 ader[(2) + (NTrP+
ic)*NPar] = -2.*th0t[
ic]->Z;
186 ader[(0)*NPar + (NTrP+
ic) ] = -2.*th0t[
ic]->X;
187 ader[(1)*NPar + (NTrP+
ic) ] = -2.*th0t[
ic]->Y;
188 ader[(2)*NPar + (NTrP+
ic) ] = -2.*th0t[
ic]->Z;
189 for (
it=0;
it<NTRK; ++
it) {
190 ader[(
it*3+3+0) + (NTrP+
ic)*NPar] = - 2.*tf0t[
ic][
it]->X;
191 ader[(
it*3+3+1) + (NTrP+
ic)*NPar] = - 2.*tf0t[
ic][
it]->Y;
192 ader[(
it*3+3+2) + (NTrP+
ic)*NPar] = - 2.*tf0t[
ic][
it]->Z;
193 ader[(
it*3+3+0)*NPar + (NTrP+
ic)] = - 2.*tf0t[
ic][
it]->X;
194 ader[(
it*3+3+1)*NPar + (NTrP+
ic)] = - 2.*tf0t[
ic][
it]->Y;
195 ader[(
it*3+3+2)*NPar + (NTrP+
ic)] = - 2.*tf0t[
ic][
it]->Z;
205 for (
it=0;
it<NTRK; ++
it) {
210 for(
ic=0;
ic<totNC;
ic++){
211 LSide[NTRK*3+3+
ic]=taa[
ic];