21 VKVertex *startCascade(std::unique_ptr<VKVertex> vk) {
23 ptr->vk_fitterControl->getCascadeEvent()->cascadeNV = 1;
24 ptr->vk_fitterControl->getCascadeEvent()->nearPrmVertex = 0;
25 ptr->vk_fitterControl->getCascadeEvent()->cascadeVertexList.clear();
26 ptr->vk_fitterControl->getCascadeEvent()->cascadeVertexList.push_back(
28 return ptr->vk_fitterControl->getCascadeEvent()
29 ->cascadeVertexList.back()
33 VKVertex *addCascadeEntry(std::unique_ptr<VKVertex> vk) {
35 ptr->vk_fitterControl->getCascadeEvent()->cascadeNV++;
36 ptr->vk_fitterControl->getCascadeEvent()->cascadeVertexList.push_back(
38 return ptr->vk_fitterControl->getCascadeEvent()
39 ->cascadeVertexList.back()
43 VKVertex *addCascadeEntry(std::unique_ptr<VKVertex> vk,
44 const std::vector<int> &
index) {
47 ->cascadeVertexList.at(
index[
i])
50 std::cout <<
"VKalVrtCore: ERROR 1 in CASCADE creation !!!" <<
'\n';
56 ptr->vk_fitterControl->getCascadeEvent()->cascadeNV++;
57 ptr->vk_fitterControl->getCascadeEvent()->cascadeVertexList.push_back(
59 return ptr->vk_fitterControl->getCascadeEvent()
60 ->cascadeVertexList.back()
69 long int IERR = 0, iv,
i;
71 for (
i = 0;
i < 4;
i++) {
72 for (iv = 0; iv < cascadeEvent_.
cascadeNV; iv++) {
117 double *wm,
double *inp_Trk5,
double *inp_CovTrk5,
118 const std::vector<std::vector<int> > &vertexDefinition,
119 const std::vector<std::vector<int> > &cascadeDefinition,
120 double definedCnstAccuracy ) {
123 if (vertexDefinition.size() != cascadeDefinition.size()) {
124 std::cout <<
" WRONG INPUT!!!" <<
'\n';
129 int NV = vertexDefinition.size();
130 double xyz[3] = {0.};
131 double tmp[15] = {0.};
132 double tmpWgt[15],
out[3];
133 double vBx, vBy, vBz;
137 for (iv = 0; iv < NV; iv++) {
138 auto VRT = std::make_unique<VKVertex>(FitCONTROL);
143 auto arr = std::make_unique<double[]>(vertexDefinition[iv].
size() * 5);
144 int NTv = vertexDefinition[iv].size();
145 for (
it = 0;
it < NTv;
it++) {
146 tk = vertexDefinition[iv][
it];
151 tk, &inp_Trk5[tk * 5], &inp_CovTrk5[tk * 15], VRT.get(), wm[tk]));
156 inp_Trk5[tk * 5 + 2];
157 trk->
iniP[1] = trk->
cnstP[1] = trk->
fitP[1] = inp_Trk5[tk * 5 + 3];
158 trk->
iniP[2] = trk->
cnstP[2] = trk->
fitP[2] = inp_Trk5[tk * 5 + 4];
159 IERR =
cfInv5(&inp_CovTrk5[tk * 15], tmpWgt);
161 IERR =
cfdinv(&inp_CovTrk5[tk * 15], tmpWgt, 5);
166 arr[
it * 5] = inp_Trk5[tk * 5];
167 arr[
it * 5 + 1] = inp_Trk5[tk * 5 + 1];
168 arr[
it * 5 + 2] = inp_Trk5[tk * 5 + 2];
169 arr[
it * 5 + 3] = inp_Trk5[tk * 5 + 3];
170 arr[
it * 5 + 4] = inp_Trk5[tk * 5 + 4];
178 double aVrt[3] = {0., 0., 0.};
179 for (
int i = 0;
i < NTv - 1;
i++)
180 for (
int j =
i + 1; j < NTv; j++) {
186 aVrt[0] /= (NTv * (NTv - 1) / 2);
187 aVrt[1] /= (NTv * (NTv - 1) / 2);
188 aVrt[2] /= (NTv * (NTv - 1) / 2);
192 startCascade(std::move(VRT));
195 int includeNV = cascadeDefinition[iv].size();
197 addCascadeEntry(std::move(VRT));
199 auto *vrttemp = addCascadeEntry(std::move(VRT), cascadeDefinition[iv]);
200 for (
it = 0;
it < includeNV;
202 vrttemp->TrackList.emplace_back(
204 vrttemp->tmpArr.emplace_back(
new TWRK());
218 for (
it = 0;
it < NTv;
it++) {
261 std::vector<int> &trkInVrt,
262 std::vector<int> &pseudoInVrt,
double Mass) {
263 std::vector<int> tmpIndex;
272 for (
it = 0;
it < (
int)trkInVrt.size();
it++) {
280 if ((
int)trkInVrt.size() > NTRK) {
283 for (
it = 0;
it < (
int)trkInVrt.size();
it++) {
284 if (trkInVrt[
it] < 0) {
287 if (trkInVrt[
it] >= NTRK) {
290 tmpIndex.push_back(trkInVrt[
it]);
295 if ((
int)pseudoInVrt.size() > NTRK) {
298 for (
int it = 0;
it < (
int)pseudoInVrt.size();
it++) {
299 if (pseudoInVrt[
it] < 0) {
302 if (pseudoInVrt[
it] >= NTRK) {
305 tmpIndex.push_back(pseudoInVrt[
it] + nRealTrk);