35 std::vector<std::vector< const Vect3DF*> > tf0t;
36 std::vector< const Vect3DF* > th0t;
37 std::vector< double > taa;
46 std::vector< const Vect3DF* > tmpVec;
51 tf0t.push_back( std::move(tmpVec) );
56 std::vector< std::vector<double> >
denom;
58 for(
int ic=0;
ic<totNC;
ic++)
denom.emplace_back( totNC, 0 );
63 std::unique_ptr< Vect3DF[] > al0(
new Vect3DF[ totNC ]);
64 for(
ic=0;
ic<totNC;
ic++){ al0[
ic].X=0.; al0[
ic].Y=0.; al0[
ic].Z=0.;}
65 std::vector<double> anum(totNC,0.);
66 for (
ic=0;
ic<totNC; ++
ic) {
67 for (
it = 0;
it<NTRK; ++
it) {
85 al0[
ic].X -= th0t[
ic]->X;
86 al0[
ic].Y -= th0t[
ic]->Y;
87 al0[
ic].Z -= th0t[
ic]->Z;
88 anum[
ic] = 2.*anum[
ic] + dxyz[0] * 2. * th0t[
ic]->X
89 + dxyz[1] * 2. * th0t[
ic]->Y
90 + dxyz[2] * 2. * th0t[
ic]->Z
102 for (
ic=0;
ic<totNC; ++
ic) {
103 for (jc=0; jc<totNC; ++jc) {
121 + al0[jc].Z * vk->
fitVcov[5] * al0[
ic].Z;
123 for (
it=0;
it<NTRK; ++
it) {
126 + tf0t[
ic][
it]->Y * t_trk->
wci[1] * tf0t[jc][
it]->X
127 + tf0t[
ic][
it]->Z * t_trk->
wci[3] * tf0t[jc][
it]->X
128 + tf0t[
ic][
it]->X * t_trk->
wci[1] * tf0t[jc][
it]->Y
129 + tf0t[
ic][
it]->Y * t_trk->
wci[2] * tf0t[jc][
it]->Y
130 + tf0t[
ic][
it]->Z * t_trk->
wci[4] * tf0t[jc][
it]->Y
131 + tf0t[
ic][
it]->X * t_trk->
wci[3] * tf0t[jc][
it]->Z
132 + tf0t[
ic][
it]->Y * t_trk->
wci[4] * tf0t[jc][
it]->Z
133 + tf0t[
ic][
it]->Z * t_trk->
wci[5] * tf0t[jc][
it]->Z
134 + tf0t[jc][
it]->X * t_trk->
wci[0] * tf0t[
ic][
it]->X
135 + tf0t[jc][
it]->Y * t_trk->
wci[1] * tf0t[
ic][
it]->X
136 + tf0t[jc][
it]->Z * t_trk->
wci[3] * tf0t[
ic][
it]->X
137 + tf0t[jc][
it]->X * t_trk->
wci[1] * tf0t[
ic][
it]->Y
138 + tf0t[jc][
it]->Y * t_trk->
wci[2] * tf0t[
ic][
it]->Y
139 + tf0t[jc][
it]->Z * t_trk->
wci[4] * tf0t[
ic][
it]->Y
140 + tf0t[jc][
it]->X * t_trk->
wci[3] * tf0t[
ic][
it]->Z
141 + tf0t[jc][
it]->Y * t_trk->
wci[4] * tf0t[
ic][
it]->Z
142 + tf0t[jc][
it]->Z * t_trk->
wci[5] * tf0t[
ic][
it]->Z;
151 auto coef = std::unique_ptr<double[]>(
new double[totNC]);
153 if (
denom[0][0] != 0.) {
160 std::unique_ptr<double[]> adenom(
new double[totNC*totNC] );
162 for (
ic=0;
ic<totNC;
ic++) {
163 for (jc=0; jc<totNC; jc++) {
168 dsinv(totNC, adenom.get(), totNC, &IERR);
172 for (
ic=0;
ic<totNC; ++
ic) {
174 for (jc=0; jc<totNC; ++jc) {
188 auto tmpVec = std::unique_ptr<Vect3DF[]>(
new Vect3DF[totNC]);
189 for (
ic=0;
ic<totNC; ++
ic) {
211 for (
it=0;
it<NTRK; ++
it) {
216 for (
ic=0;
ic<totNC; ++
ic) {
218 + t_trk->
wb[1]*tmpVec[
ic].Y
219 + t_trk->
wb[2]*tmpVec[
ic].Z);
221 + t_trk->
wb[4]*tmpVec[
ic].Y
222 + t_trk->
wb[5]*tmpVec[
ic].Z);
224 + t_trk->
wb[7]*tmpVec[
ic].Y
225 + t_trk->
wb[8]*tmpVec[
ic].Z);
233 if( (trk->
fitP[2] - concor)*trk->
fitP[2] < 0) { concor=trk->
fitP[2]/4.; }
234 trk->
fitP[2] -= concor;
246 if (vk->ConstraintList.empty())
return 0.;
248 for(
int ii=0; ii<(
int)vk->ConstraintList.size();ii++){
249 for(
int ic=0;
ic<(
int)vk->ConstraintList[ii]->NCDim;
ic++){
250 sumSQ += (vk->ConstraintList[ii]->aa[
ic])*(vk->ConstraintList[ii]->aa[
ic]);