18#include "CbmGeoStsPar.h"
21#include "CbmStsDigiPar.h"
24#include "CbmStsSector.h"
25#include "CbmStsSensor.h"
26#include "CbmStsStation.h"
27#include "FairRootManager.h"
28#include "FairRunAna.h"
29#include "FairRuntimeDb.h"
114 int findParticleMode_)
187 FairRuntimeDb* rtdb = FairRuntimeDb::instance();
189 rtdb->getContainer(
"FairGeoPassivePar");
190 rtdb->getContainer(
"CbmGeoStsPar");
191 rtdb->getContainer(
"CbmStsDigiPar");
205 char y[20] =
" [0;33;44m";
206 char Y[20] =
" [1;33;44m";
207 char W[20] =
" [1;37;44m";
208 char o[20] =
" [0m\n";
209 Y[0] = y[0] =
W[0] = o[0] = 0x1B;
211 cout << endl << endl;
212 cout <<
" " <<
W <<
" " << o;
213 cout <<
" " <<
W <<
" ===////====================================================== " << o;
214 cout <<
" " <<
W <<
" = = " << o;
215 cout <<
" " <<
W <<
" = " << Y <<
"L1 on-line finder" <<
W <<
" = "
217 cout <<
" " <<
W <<
" = = " << o;
218 cout <<
" " <<
W <<
" = " <<
W <<
"Cellular Automaton 3.1 Vector" << y <<
" with " <<
W <<
"KF Quadro" << y
219 <<
" technology" <<
W <<
" = " << o;
220 cout <<
" " <<
W <<
" = = " << o;
221 cout <<
" " <<
W <<
" = " << y <<
"Designed for CBM collaboration" <<
W <<
" = "
223 cout <<
" " <<
W <<
" = " << y <<
"All rights reserved" <<
W <<
" = "
225 cout <<
" " <<
W <<
" = = " << o;
226 cout <<
" " <<
W <<
" ========================================================////= " << o;
227 cout <<
" " <<
W <<
" " << o;
228 cout << endl << endl;
231 FairRootManager* fManger = FairRootManager::Instance();
236 FairRuntimeDb* RunDB = FairRuntimeDb::instance();
242 StsDigi->Init(StsPar, digiPar);
294 for (
int i = 0;
i < 3;
i++) {
299 geo[ind++] = 2.5 *
i;
314 const int N = (M + 1) * (M + 2) / 2;
380 fscal f_phi = 0, f_sigma = 5.e-4, b_phi = 3.14159265358 / 2., b_sigma = 5.e-4;
383 b_phi = 3.14159265358 / 2.;
386 geo[ind++] = f_sigma;
388 geo[ind++] = b_sigma;
395 geo[ind++] = st->
GetZ();
396 geo[ind++] = st->
GetD();
402 fscal f_phi, f_sigma, b_phi, b_sigma;
406 b_phi += 3.14159265358 / 2.;
424 geo[ind++] = f_sigma;
426 geo[ind++] = b_sigma;
433 for (
int isec = 0; isec < st->
GetNSectors(); isec++) {
435 for (
int isen = 0; isen < sect->
GetNSensors(); isen++) {
447 <<
" " << Xmax <<
" " << Ymax << endl;
455 if (dx > Xmax / N / 2)
457 if (dy > Ymax / N / 2)
460 for (
int i = 0;
i < 3;
i++)
461 for (
int k = 0; k < N; k++)
465 for (
int i = 0;
i < N;
i++) {
466 for (
int j = 0; j < N; j++)
468 b0(
i) = b1(
i) = b2(
i) = 0.;
470 for (
double x = -Xmax; x <= Xmax; x += dx)
471 for (
double y = -Ymax; y <= Ymax; y += dy) {
472 double r =
sqrt(
fabs(x * x / Xmax / Xmax + y / Ymax * y / Ymax));
481 for (
int i = 1;
i <= M;
i++) {
482 int k = (
i - 1) * (
i) / 2;
483 int l =
i * (
i + 1) / 2;
484 for (
int j = 0; j <
i; j++)
485 m(l + j) = x *
m(k + j);
486 m(l +
i) = y *
m(k +
i - 1);
490 for (
int i = 0;
i < N;
i++) {
491 for (
int j = 0; j < N; j++)
492 A(
i, j) += w *
m(
i) *
m(j);
493 b0(
i) += w * B[0] *
m(
i);
494 b1(
i) += w * B[1] *
m(
i);
495 b2(
i) += w * B[2] *
m(
i);
500 TVectorD c0 = A * b0, c1 = A * b1, c2 = A * b2;
501 for (
int i = 0;
i < N;
i++) {
508 for (
int k = 0; k < 3; k++) {
509 for (
int j = 0; j < N; j++)
510 geo[ind++] = C[k][j];
526 cout <<
"-E- CbmL1: Read geometry from file " <<
fSTAPDataDir +
"geo_algo.txt was NOT successful."
533 algo->fRadThick.resize(
algo->NStations);
535 for (
int iSta = 0; iSta <
algo->NMvdStations; iSta++) {
536 algo->fRadThick[iSta].SetBins(1, 100);
537 algo->fRadThick[iSta].table.resize(1);
538 algo->fRadThick[iSta].table[0].resize(1);
539 algo->fRadThick[iSta].table[0][0] =
algo->vStations[iSta].materialInfo.RadThick[0];
548 for (
int j = 0, iSta =
algo->NMvdStations; iSta < algo->NStations; iSta++, j++) {
549 TString name =
"Radiation Thickness [%]";
559 const int NBins = hStaRadLen->
GetNbinsX();
561 algo->fRadThick[iSta].SetBins(NBins, RMax);
562 algo->fRadThick[iSta].table.resize(NBins);
564 for (
int iB = 0; iB < NBins; iB++) {
565 algo->fRadThick[iSta].table[iB].resize(NBins);
566 for (
int iB2 = 0; iB2 < NBins; iB2++) {
567 algo->fRadThick[iSta].table[iB][iB2] =
569 if (
algo->fRadThick[iSta].table[iB][iB2] <
algo->vStations[iSta].materialInfo.RadThick[0])
570 algo->fRadThick[iSta].table[iB][iB2] =
algo->vStations[iSta].materialInfo.RadThick[0];
580 cout <<
"No material budget file is found. Homogenious budget will be used" << endl;
581 for (
int iSta =
algo->NMvdStations; iSta < algo->NStations; iSta++) {
583 algo->fRadThick[iSta].SetBins(1, 100);
584 algo->fRadThick[iSta].table.resize(1);
585 algo->fRadThick[iSta].table[0].resize(1);
586 algo->fRadThick[iSta].table[0][0] =
algo->vStations[iSta].materialInfo.RadThick[0];
597 static int nevent = 0;
599 cout << endl <<
"CbmL1::Exec event " << ++nevent <<
" ..." << endl << endl;
617 vector<int> sF, sB, zP;
621 for (
unsigned int iH = 0; iH <
algo->vStsHits.size(); ++iH) {
623 if (
vStsHits[iH].mcPointIds.size() == 0)
627 const int ista =
algo->vSFlag[h.
f] / 4;
629 if (std::find(sF.begin(), sF.end(), h.
f) != sF.end()) {
630 algo->vSFlag.push_back(
algo->vSFlag[h.
f]);
631 h.
f =
algo->vStsStrips.size();
635 if (std::find(sB.begin(), sB.end(), h.
b) != sB.end()) {
636 algo->vSFlagB.push_back(
algo->vSFlagB[h.
b]);
637 h.
b =
algo->vStsStripsB.size();
641 if (std::find(zP.begin(), zP.end(), h.
iz) != zP.end()) {
642 h.
iz =
algo->vStsZPos.size();
643 algo->vStsZPos.push_back(0);
654 algo->vStsStrips[h.
f] =
657 algo->vStsStripsB[h.
b] =
673 cout <<
"L1 Track finder..." << endl;
674 algo->CATrackFinder();
677 cout <<
"L1 Track finder ok" << endl;
681 cout <<
"L1 Track fitter ok" << endl;
686 for (vector<L1Track>::iterator it =
algo->vTracks.begin(); it !=
algo->vTracks.end(); it++) {
688 for (
int i = 0;
i < 6;
i++)
689 t.
T[
i] = it->TFirst[
i];
690 for (
int i = 0;
i < 15;
i++)
691 t.
C[
i] = it->CFirst[
i];
692 for (
int i = 0;
i < 6;
i++)
694 for (
int i = 0;
i < 15;
i++)
699 for (
int i = 0;
i < it->NHits;
i++) {
715 cout <<
"Performance..." << endl;
740 cout <<
"End of L1" << endl;
745 std::cout << std::endl <<
"L1 run (any/r/q) > ";
747 std::cin.get(symbol);
750 if ((symbol ==
'e') || (symbol ==
'q'))
752 }
while (symbol !=
'\n');
762 TFile* outfile =
new TFile(
"L1_histo.root",
"RECREATE");
791 algo->vTracks.clear();
792 algo->vRecoHits.clear();
806 int lastStation = -1;
807 for (
unsigned int iH = 0; iH < MC.
StsHits.size(); iH++) {
808 const int hitI = MC.
StsHits[iH];
814 algo->vRecoHits.push_back(hitI);
819 algo->vTracks.push_back(algoTr);
831 ofstream fgeo(fgeo_name);
832 fgeo.setf(ios::scientific, ios::floatfield);
834 for (
int i = 0;
i < size;
i++) {
835 fgeo << geo[
i] << endl;
838 cout <<
"-I- CbmL1: Geometry data has been written in " << fgeo_name << endl;
844 static int vNEvent = 1;
852 fadata.open(fadata_name, fstream::out);
854 fadata.open(fadata_name, fstream::out | fstream::app);
856 fadata <<
"Event:" <<
" ";
857 fadata << vNEvent << endl;
859 int n =
algo->vStsStrips.size();
861 for (
int i = 0;
i <
n;
i++) {
862 fadata <<
algo->vStsStrips[
i] << endl;
865 cout <<
"vStsStrips[" <<
n <<
"]" <<
" have been written." << endl;
867 n =
algo->vStsStripsB.size();
869 for (
int i = 0;
i <
n;
i++) {
870 fadata <<
algo->vStsStripsB[
i] << endl;
873 cout <<
"vStsStripsB[" <<
n <<
"]" <<
" have been written." << endl;
875 n =
algo->vStsZPos.size();
877 for (
int i = 0;
i <
n;
i++) {
878 fadata <<
algo->vStsZPos[
i] << endl;
881 cout <<
"vStsZPos[" <<
n <<
"]" <<
" have been written." << endl;
883 n =
algo->vSFlag.size();
885 unsigned char element;
886 for (
int i = 0;
i <
n;
i++) {
887 element =
algo->vSFlag[
i];
888 fadata << static_cast<int>(element) << endl;
891 cout <<
"vSFlag[" <<
n <<
"]" <<
" have been written." << endl;
893 n =
algo->vSFlagB.size();
895 for (
int i = 0;
i <
n;
i++) {
896 element =
algo->vSFlagB[
i];
897 fadata << static_cast<int>(element) << endl;
900 cout <<
"vSFlagB[" <<
n <<
"]" <<
" have been written." << endl;
902 n =
algo->vStsHits.size();
904 for (
int i = 0;
i <
n;
i++) {
905 fadata << static_cast<int>(
algo->vStsHits[
i].f) <<
" ";
906 fadata << static_cast<int>(
algo->vStsHits[
i].b) <<
" ";
907 fadata << static_cast<int>(
algo->vStsHits[
i].iz) << endl;
910 cout <<
"vStsHits[" <<
n <<
"]" <<
" have been written." << endl;
913 for (
int i = 0;
i <
n;
i++) {
914 if (
algo->MaxNStations + 1 >
i)
915 fadata <<
algo->StsHitsStartIndex[
i] << endl;
919 for (
int i = 0;
i <
n;
i++) {
920 if (
algo->MaxNStations + 1 >
i)
921 fadata <<
algo->StsHitsStopIndex[
i] << endl;
928 cout <<
"-I- CbmL1: CATrackFinder data for event number " << vNEvent <<
" have been written in file " << fadata_name
936 fpdata << setprecision(8);
938 static int vNEvent = 1;
946 fpdata.open(fpdata_name, fstream::out);
948 fpdata.open(fpdata_name, fstream::out | fstream::app);
951 fpdata << vNEvent << endl;
955 for (
int i = 0;
i <
n;
i++) {
979 fpdata << nhits << endl <<
" ";
980 for (
int k = 0; k < nhits; k++) {
986 cout <<
"vMCPoints[" <<
n <<
"]" <<
" have been written." << endl;
991 for (
int i = 0;
i <
n;
i++) {
1007 fpdata <<
" " << nhits << endl <<
" ";
1008 for (
int k = 0; k < nhits; k++) {
1013 const int nPoints =
vMCTracks[
i].Points.size();
1014 fpdata << nPoints << endl <<
" ";
1015 for (
int k = 0; k < nPoints; k++) {
1020 fpdata <<
vMCTracks[
i].nMCContStations <<
" ";
1021 fpdata <<
vMCTracks[
i].nHitContStations <<
" ";
1028 cout <<
"vMCTracks[" <<
n <<
"]" <<
" have been written." << endl;
1032 fpdata <<
n << endl;
1033 for (
int i = 0;
i <
n;
i++) {
1037 cout <<
"vHitMCRef[" <<
n <<
"]" <<
" have been written." << endl;
1041 fpdata <<
n << endl;
1042 for (
int i = 0;
i <
n;
i++) {
1050 cout <<
"vHitStore[" <<
n <<
"]" <<
" have been written." << endl;
1054 fpdata <<
n << endl;
1055 for (
int i = 0;
i <
n;
i++) {
1059 const int nPoints =
vStsHits[
i].mcPointIds.size();
1060 fpdata << nPoints << endl <<
" ";
1061 for (
int k = 0; k < nPoints; k++) {
1062 fpdata <<
vStsHits[
i].mcPointIds[k] <<
" ";
1067 cout <<
"vStsHits[" <<
n <<
"]" <<
" have been written." << endl;
1071 cout <<
"-I- CbmL1: Data for performance of event number " << vNEvent <<
" have been written in file "
1072 << fpdata_name << endl;
1080 if (isspace(c) == 0) {
1092 ifstream fgeo(fgeo_name);
1094 cout <<
"-I- CbmL1: Read geometry from file " << fgeo_name << endl;
1096 for (
i = 0; !fgeo.eof();
i++) {
1107 static int nEvent = 1;
1108 static fstream fadata;
1113 fadata.open(fadata_name, fstream::in);
1116 algo->vStsHits.clear();
1117 algo->vStsStrips.clear();
1118 algo->vStsStripsB.clear();
1119 algo->vStsZPos.clear();
1120 algo->vSFlag.clear();
1121 algo->vSFlagB.clear();
1124 char s[] =
"Event: ";
1129 cout <<
"-E- CbmL1: Can't read event number " << nEvent <<
" from file " << fadata_name << endl;
1134 for (
int i = 0;
i <
n;
i++) {
1137 algo->vStsStrips.push_back(element);
1140 cout <<
"vStsStrips[" <<
n <<
"]" <<
" have been read." << endl;
1143 for (
int i = 0;
i <
n;
i++) {
1146 algo->vStsStripsB.push_back(element);
1149 cout <<
"vStsStripsB[" <<
n <<
"]" <<
" have been read." << endl;
1152 for (
int i = 0;
i <
n;
i++) {
1155 algo->vStsZPos.push_back(element);
1158 cout <<
"vStsZPos[" <<
n <<
"]" <<
" have been read." << endl;
1161 for (
int i = 0;
i <
n;
i++) {
1164 algo->vSFlag.push_back(
static_cast<unsigned char>(element));
1167 cout <<
"vSFlag[" <<
n <<
"]" <<
" have been read." << endl;
1170 for (
int i = 0;
i <
n;
i++) {
1173 algo->vSFlagB.push_back(
static_cast<unsigned char>(element));
1176 cout <<
"vSFlagB[" <<
n <<
"]" <<
" have been read." << endl;
1182 for (
int i = 0;
i <
n;
i++) {
1184 fadata >> element_f >> element_b >> element_iz;
1185 element.
f =
static_cast<THitI>(element_f);
1186 element.
b =
static_cast<THitI>(element_b);
1187 element.
iz =
static_cast<TZPosI>(element_iz);
1188 algo->vStsHits.push_back(element);
1191 cout <<
"vStsHits[" <<
n <<
"]" <<
" have been read." << endl;
1194 for (
int i = 0;
i <
n;
i++) {
1197 if (
algo->MaxNStations + 1 >
i)
1198 algo->StsHitsStartIndex[
i] = tmp;
1200 for (
int i = 0;
i <
n;
i++) {
1203 if (
algo->MaxNStations + 1 >
i)
1204 algo->StsHitsStopIndex[
i] = tmp;
1207 cout <<
"-I- CbmL1: CATrackFinder data for event " << nEvent <<
" has been read from file " << fadata_name
1208 <<
" successfully." << endl;
1216 static int nEvent = 1;
1217 static fstream fpdata;
1222 fpdata.open(fpdata_name, fstream::in);
1232 char s[] =
"EVENT: ";
1238 cout <<
"-E- CbmL1: Performance: can't read event number " << nEvent <<
" from file " <<
"data_perfo.txt"
1243 for (
int i = 0;
i <
n;
i++) {
1246 fpdata >> element.
xIn;
1247 fpdata >> element.
yIn;
1248 fpdata >> element.
zIn;
1249 fpdata >> element.
pxIn;
1250 fpdata >> element.
pyIn;
1251 fpdata >> element.
pzIn;
1253 fpdata >> element.
xOut;
1254 fpdata >> element.
yOut;
1255 fpdata >> element.
zOut;
1256 fpdata >> element.
pxOut;
1257 fpdata >> element.
pyOut;
1258 fpdata >> element.
pzOut;
1260 fpdata >> element.
p;
1261 fpdata >> element.
q;
1262 fpdata >> element.
mass;
1264 fpdata >> element.
pdg;
1265 fpdata >> element.
ID;
1271 for (
int k = 0; k < nhits; k++) {
1274 element.
hitIds.push_back(helement);
1280 cout <<
"vMCPoints[" <<
n <<
"]" <<
" have been read." << endl;
1284 for (
int i = 0;
i <
n;
i++) {
1287 fpdata >> element.
x;
1288 fpdata >> element.
y;
1289 fpdata >> element.
z;
1290 fpdata >> element.
px;
1291 fpdata >> element.
py;
1292 fpdata >> element.
pz;
1293 fpdata >> element.
p;
1294 fpdata >> element.
q;
1295 fpdata >> element.
mass;
1297 fpdata >> element.
pdg;
1298 fpdata >> element.
ID;
1303 for (
int k = 0; k < nhits; k++) {
1306 element.
StsHits.push_back(helement);
1309 for (
int k = 0; k < nhits; k++) {
1312 element.
Points.push_back(helement);
1326 cout <<
"vMCTracks[" <<
n <<
"]" <<
" have been read." << endl;
1330 for (
int i = 0;
i <
n;
i++) {
1336 cout <<
"vHitMCRef[" <<
n <<
"]" <<
" have been read." << endl;
1340 for (
int i = 0;
i <
n;
i++) {
1345 fpdata >> element.
x;
1346 fpdata >> element.
y;
1350 cout <<
"vHitStore[" <<
n <<
"]" <<
" have been read." << endl;
1354 for (
int i = 0;
i <
n;
i++) {
1356 fpdata >> element.
hitId;
1361 for (
int k = 0; k < nPoints; k++) {
1369 cout <<
"vStsHits[" <<
n <<
"]" <<
" have been read." << endl;
1375 cout <<
"-I- CbmL1: L1Performance data for event " << nEvent <<
" has been read from file " << fpdata_name
1376 <<
" successfully." << endl;
1384 static bool first = 1;
1391 FileGeo.open(
"geo.dat", ios::out);
1394 FieldCheck.open(
"field.dat", ios::out);
1401 dMF->GetFieldValue(rfg, bfg);
1402 FileGeo << rfg[2] <<
" " << bfg[0] <<
" " << bfg[1] <<
" " << bfg[2] <<
" " << endl;
1407 dMF->GetFieldValue(rfg, bfg);
1408 FileGeo << rfg[2] <<
" " << bfg[0] <<
" " << bfg[1] <<
" " << bfg[2] <<
" " << endl;
1413 dMF->GetFieldValue(rfg, bfg);
1414 FileGeo << rfg[2] <<
" " << bfg[0] <<
" " << bfg[1] <<
" " << bfg[2] <<
" " << endl << endl;
1418 const int N = (M + 1) * (M + 2) / 2;
1421 fscal f_phi, f_sigma, b_phi, b_sigma;
1430 b_phi = 3.14159265358 / 2.;
1441 b_phi += 3.14159265358 / 2.;
1458 for (
int isec = 0; isec < st->
GetNSectors(); isec++) {
1460 for (
int isen = 0; isen < sect->
GetNSensors(); isen++) {
1474 if (dx > Xmax / N / 2)
1476 if (dy > Ymax / N / 2)
1479 for (
int i = 0;
i < 3;
i++)
1480 for (
int k = 0; k < N; k++)
1484 for (
int i = 0;
i < N;
i++) {
1485 for (
int j = 0; j < N; j++)
1487 b0(
i) = b1(
i) = b2(
i) = 0.;
1489 for (
double x = -Xmax; x <= Xmax; x += dx)
1490 for (
double y = -Ymax; y <= Ymax; y += dy) {
1491 double r =
sqrt(
fabs(x * x / Xmax / Xmax + y / Ymax * y / Ymax));
1500 for (
int i = 1;
i <= M;
i++) {
1501 int k = (
i - 1) * (
i) / 2;
1502 int l =
i * (
i + 1) / 2;
1503 for (
int j = 0; j <
i; j++)
1504 m(l + j) = x *
m(k + j);
1505 m(l +
i) = y *
m(k +
i - 1);
1509 for (
int i = 0;
i < N;
i++) {
1510 for (
int j = 0; j < N; j++)
1511 A(
i, j) += w *
m(
i) *
m(j);
1512 b0(
i) += w * B[0] *
m(
i);
1513 b1(
i) += w * B[1] *
m(
i);
1514 b2(
i) += w * B[2] *
m(
i);
1519 TVectorD c0 = A * b0, c1 = A * b1, c2 = A * b2;
1520 for (
int i = 0;
i < N;
i++) {
1526 double c_f =
cos(f_phi);
1527 double s_f =
sin(f_phi);
1528 double c_b =
cos(b_phi);
1529 double s_b =
sin(b_phi);
1531 double det_m = c_f * s_b - s_f * c_b;
1539 FileGeo <<
" " << ist <<
" ";
1542 FileGeo << t.
z <<
" ";
1543 FileGeo << t.
dz <<
" ";
1548 FileGeo << st->
GetZ() <<
" ";
1549 FileGeo << st->
GetD() <<
" ";
1552 FileGeo << f_sigma <<
" ";
1553 FileGeo << b_sigma <<
" ";
1554 FileGeo << f_phi <<
" ";
1555 FileGeo << b_phi << endl;
1556 FileGeo <<
" " << N << endl;
1558 for (
int ik = 0; ik < N; ik++)
1559 FileGeo << C[0][ik] <<
" ";
1562 for (
int ik = 0; ik < N; ik++)
1563 FileGeo << C[1][ik] <<
" ";
1566 for (
int ik = 0; ik < N; ik++)
1567 FileGeo << C[2][ik] <<
" ";
1575 static int TrNumber = 0;
1576 fstream Tracks, McTracksCentr, McTracksIn, McTracksOut;
1578 Tracks.open(
"tracks.dat", fstream::out);
1579 McTracksCentr.open(
"mctrackscentr.dat", fstream::out);
1580 McTracksIn.open(
"mctracksin.dat", fstream::out);
1581 McTracksOut.open(
"mctracksout.dat", fstream::out);
1584 Tracks.open(
"tracks.dat", fstream::out | fstream::app);
1585 McTracksCentr.open(
"mctrackscentr.dat", fstream::out | fstream::app);
1586 McTracksIn.open(
"mctracksin.dat", fstream::out | fstream::app);
1587 McTracksOut.open(
"mctracksout.dat", fstream::out | fstream::app);
1590 for (vector<CbmL1Track>::iterator RecTrack =
vRTracks.begin(); RecTrack !=
vRTracks.end(); ++RecTrack) {
1591 if (RecTrack->IsGhost())
1598 int NHits = (RecTrack->StsHits).size();
1599 float x[20], y[20], z[20];
1602 for (
int iHit = 0; iHit < NHits; iHit++) {
1607 x[jHit] = MvdH->GetX();
1608 y[jHit] = MvdH->GetY();
1609 z[jHit] = MvdH->GetZ();
1613 x[jHit] = StsH->GetX();
1614 y[jHit] = StsH->GetY();
1615 z[jHit] = StsH->GetZ();
1620 Tracks << TrNumber <<
" " << MCTrack->
x <<
" " << MCTrack->
y <<
" " << MCTrack->
z <<
" " << MCTrack->
px <<
" "
1621 << MCTrack->
py <<
" " << MCTrack->
pz <<
" " << MCTrack->
q <<
" " << NHits << endl;
1623 float AngleXAxis = 0, AngleYAxis = 0;
1624 for (
int i = 0;
i < NHits;
i++)
1625 Tracks <<
" " << st[
i] <<
" " << x[
i] <<
" " << y[
i] <<
" " << z[
i] <<
" " << AngleXAxis <<
" "
1626 << AngleYAxis << endl;
1629 int NMCPoints = (MCTrack->
Points).size();
1631 McTracksIn << TrNumber <<
" " << MCTrack->
x <<
" " << MCTrack->
y <<
" " << MCTrack->
z <<
" " << MCTrack->
px
1632 <<
" " << MCTrack->
py <<
" " << MCTrack->
pz <<
" " << MCTrack->
q <<
" " << NMCPoints << endl;
1633 McTracksOut << TrNumber <<
" " << MCTrack->
x <<
" " << MCTrack->
y <<
" " << MCTrack->
z <<
" " << MCTrack->
px
1634 <<
" " << MCTrack->
py <<
" " << MCTrack->
pz <<
" " << MCTrack->
q <<
" " << NMCPoints << endl;
1635 McTracksCentr << TrNumber <<
" " << MCTrack->
x <<
" " << MCTrack->
y <<
" " << MCTrack->
z <<
" " << MCTrack->
px
1636 <<
" " << MCTrack->
py <<
" " << MCTrack->
pz <<
" " << MCTrack->
q <<
" " << NMCPoints << endl;
1638 for (
int iPoint = 0; iPoint < NMCPoints; iPoint++) {
1640 McTracksIn <<
" " << MCPoint.
iStation <<
" " << MCPoint.
xIn <<
" " << MCPoint.
yIn <<
" " << MCPoint.
zIn
1641 <<
" " << MCPoint.
pxIn <<
" " << MCPoint.
pyIn <<
" " << MCPoint.
pzIn << endl;
1642 McTracksOut <<
" " << MCPoint.
iStation <<
" " << MCPoint.
xOut <<
" " << MCPoint.
yOut <<
" "
1643 << MCPoint.
zOut <<
" " << MCPoint.
pxOut <<
" " << MCPoint.
pyOut <<
" " << MCPoint.
pzOut << endl;
1644 McTracksCentr <<
" " << MCPoint.
iStation <<
" " << MCPoint.
x <<
" " << MCPoint.
y <<
" " << MCPoint.
z
1645 <<
" " << MCPoint.
px <<
" " << MCPoint.
py <<
" " << MCPoint.
pz << endl;
1648 McTracksOut << endl;
1649 McTracksCentr << endl;
vector< Double_t > W(vector< Double_t > dist, Double_t sig)
unsigned short int TZPosI
friend F32vec4 fabs(const F32vec4 &a)
TMatrixT< Double_t > TMatrixD
TVectorT< Double_t > TVectorD
BmnTask()
Default constructor.
static CbmKF * Instance()
BmnNewFieldMap * GetMagneticField()
std::vector< CbmKFTube > vMvdMaterial
void CalculateIsReconstructable()
bool IsReconstructable() const
vector< CbmL1HitStore > vHitStore
vector< KFMCParticle > vMCParticles
reco particles
void FindReconstructableMCParticles()
void TrackMatch()
Reconstruction Performance.
TClonesArray * listMCTracks
Input data.
static istream & eatwhite(istream &is)
vector< CbmL1MCTrack > vMCTracks
vector< CbmL1MCPoint > vMCPoints
hits with hit-mcpoint match information
TClonesArray * listMvdHitMatches
void WriteSIMDKFData()
SIMD KF Banchmark service-functions.
vector< CbmL1StsHit > vStsHits
Used data = Repacked input data.
virtual InitStatus Init()
void PartHistoPerformance()
vector< KFMatchParticles > MCtoRParticleId
MC particles.
TClonesArray * listStsClusters
TClonesArray * listMvdPts
vector< CbmL1Track > vRTracks
vector< CbmKFParticle > vRParticles
TClonesArray * listStsPts
TClonesArray * listMvdHits
Mvd MC points.
void IdealTrackFinder()
--— Ideal Tracking --------------------------—
TClonesArray * listStsDigi
Sts MC points.
void TrackFitPerformance()
void Exec(Option_t *option)
void ReadEvent()
Read information about hits, mcPoints and mcTracks into L1 classes.
CbmL1ParticlesFinder * PF
for access to L1 Algorithm from L1::Instance
bool fExtrapolateToTheEndOfSTS
void MatchParticles()
Procedure for match Reconstructed and MC Particles. Should be called before Performances.
TString fMatBudgetFileName
void ReadSTAPGeoData(void *geo, int &size)
TClonesArray * listStsHits
void EfficienciesPerformance()
friend class CbmL1MCTrack
vector< KFMatchParticles > RtoMCParticleId
array for match
void WriteSTAPGeoData(void *geo, int size)
STandAlone Package service-functions.
void PartEffPerformance()
static void writedir2current(TObject *obj)
virtual InitStatus ReInit()
CbmStsDigiScheme * StsDigi
static CbmStsDigiScheme * Instance(int version=1)
Double_t GetStereoF() const
Double_t GetRotation() const
CbmStsSensor * GetSensor(Int_t iSensor)
Double_t GetStereoB() const
Int_t GetNSensors() const
Double_t GetRadLength() const
Int_t GetNSectors() const
Double_t GetZ(Int_t it=0)
CbmStsSector * GetSector(Int_t iSector)
L1UMeasurementInfo backInfo
L1UMeasurementInfo frontInfo
T * Get(const char *namecycle)
virtual TDirectory * mkdir(const char *name, const char *title="", Bool_t returnExistingDirectory=kFALSE)
void Delete(const char *namecycle="") override
void Close(Option_t *option="") override
virtual Int_t GetNbinsX() const
TMatrixT< Element > & Invert(Double_t *det=nullptr)
virtual Bool_t IsFolder() const
virtual const char * GetName() const
virtual Int_t Write(const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
Double_t GetBinContent(Int_t bin) const override
virtual Double_t Gaus(Double_t mean=0, Double_t sigma=1)
virtual Double_t Uniform(Double_t x1, Double_t x2)
RVec< PromoteType< T > > cos(const RVec< T > &v)
RVec< PromoteType< T > > sqrt(const RVec< T > &v)
RVec< PromoteType< T > > sin(const RVec< T > &v)
*brief user defined string literal for JSON values *sa std::size_t n
Double_t Sqrt(Double_t x)
constexpr Double_t RadToDeg()