74 Mscale = 1250 / 900.0;
81 vector<Int_t> effstaUp = {0, 0, 0, 0, 0, 0, 0};
82 vector<Int_t> effstaDown = {0, 0, 0, 0, 0, 0, 0};
87 TFile out(histFile,
"RECREATE");
89 Float_t xext, yext, zhit, dXext, dYext, prec, chi2, xsmo, ysmo, dXsmo, dYsmo, dXZ, dYZ, precPT, precPX, precNOf,
91 Int_t flag, ista, nhits, nsecGEM, evNo, nsecGEMhot;
95 txyz->
Branch(
"evNo", &evNo,
"evNo/I");
96 txyz->
Branch(
"xext", &xext,
"xext/F");
97 txyz->
Branch(
"yext", &yext,
"yext/F");
98 txyz->
Branch(
"zhit", &zhit,
"zhit/F");
99 txyz->
Branch(
"dXext", &dXext,
"dXext/F");
100 txyz->
Branch(
"dYext", &dYext,
"dYext/F");
101 txyz->
Branch(
"xsmo", &xsmo,
"xsmo/F");
102 txyz->
Branch(
"ysmo", &ysmo,
"ysmo/F");
103 txyz->
Branch(
"dXsmo", &dXsmo,
"dXsmo/F");
104 txyz->
Branch(
"dYsmo", &dYsmo,
"dYsmo/F");
107 txyz->
Branch(
"prec", &prec,
"prec/F");
111 txyz->
Branch(
"chi2", &chi2,
"chi2/F");
112 txyz->
Branch(
"ista", &ista,
"ista/I");
113 txyz->
Branch(
"nhits", &nhits,
"nhits/I");
114 txyz->
Branch(
"nsec", &nsec,
"nsec/I");
115 txyz->
Branch(
"nsecGEM", &nsecGEM,
"nsecGEM/I");
117 txyz->
Branch(
"trkAng", &trkAng,
"trkAng/F");
118 txyz->
Branch(
"Qf", &Qf,
"Qf/F");
119 txyz->
Branch(
"Qb", &Qb,
"Qb/F");
132 TObjString stsDigiFile =
"sts_v1_BMN_SI_GEM.digi.par";
134 parFileList->
Add(&stsDigiFile);
140 FairRunAna* fRun =
new FairRunAna();
142 fRun->SetOutputFile(outFile);
144 FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
146 FairParRootFileIo* parIo1 =
new FairParRootFileIo();
147 FairParAsciiFileIo* parIo2 =
new FairParAsciiFileIo();
148 parIo1->open(parFile.
Data());
149 parIo2->open(parFileList,
"in");
150 gSystem->Unlink(parIo2->getFilename());
151 rtdb->setFirstInput(parIo1);
152 rtdb->setSecondInput(parIo2);
153 rtdb->setOutput(parIo1);
182 fRun->SetField(magField);
183 cout <<
"FIELD SCALE: " << magField->
GetScale() << endl;
191 cout <<
"FIELD SCALE: " << magField->
GetScale() << endl;
210 TChain* rec = FairRootManager::Instance()->GetInChain();
216 CbmVertex* primVtx = (
CbmVertex*)FairRootManager::Instance()->GetObject(
"PrimaryVertex.");
222 Int_t events0 = events;
228 FairRuntimeDb* db = fRun->GetRuntimeDb();
230 Fatal(
"SetParContainers",
"No runtime database");
233 digiPar->
init(parIo2);
238 digiScheme->
Init(NULL, digiPar);
244 FairTrackParam param, pIter1;
246 for (
Int_t iev = 0; iev < events; ++iev) {
247 if (iev % 10000 == 0)
251 FairRootManager::Instance()->ReadEvent(iev);
287 for (
Int_t i = 0;
i < nTracks; ++
i) {
371 std::vector<int> v1 = {1, 1, 1, 1, 1, 1};
372 std::vector<int> v2 = {1, 1, 1, 3, 3, 3};
373 std::vector<int> v3 = {0, 0, 0, 0, 0, 0};
384 for (
Int_t iHit = 0; iHit < nhits; ++iHit) {
388 cout <<
"-E- CbmStsMatchTracks::Exec: " <<
"No StsHit " << iHit <<
" for track " <<
i << endl;
414 for (
Int_t j = 0; j < nhits; ++j) {
446 dXext = pos[0] - xext;
447 dYext = pos[1] - yext;
459 dXsmo = pos[0] - xsmo;
460 dYsmo = pos[1] - ysmo;
580 const int ip_r7[6][2] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
597 cout <<
"-E- CbmBmnStsDigitize::ApplyAlignment: Cannot find top GEM node" << endl;
606 cout <<
"STATIONS : " << nStat0 << endl;
636 Double_t xAlign[26] = {3.33029, -2.67835, 2.82585, -3.14615,
638 8.91918, 2.92088, -3.09752, -9.09492, 8.91198, 2.94528, -2.98182, -8.98402,
639 -40.718, 40.916, 41.087, -40.6, 42.28, -39.431, -38.452, 43.252,
640 44.078, -37.598, -36.8112, 44.8227};
643 4.46297, 5.07597, -1.48803, -0.910531,
645 7.84856, 7.80306, 7.92256, 7.85506, -4.57154, -4.61864, -4.43934, -4.51954,
648 22.5211, 22.2759, 22.574, 22.6124, 22.8827, 22.516, 22.5385, 22.9377, 22.5828, 22.3481, 22.7875,
651 Double_t zAlign3[9] = {14.352475, 17.68975, 26.2729875,
652 42.19995, 67.76995, 115.569, 137.8325, 163.54, 186.103};
655 -0.406375, 0.430925, 0.274025, -0.298575,
657 0.540813, -1.06009, 0.653113, -0.915988, -0.719887, 0.761012, -0.386287, 1.12281,
658 0.08685, -0.08685, -0.07145, 0.07145, -0.128, 0.128, 0.0115, -0.0115,
659 -0.004, 0.004, 0, 0};
661 Int_t stn = 0, SensCh = 0;
663 for (
Int_t iNode = 0; iNode < nStat0; iNode++) {
668 if (!statName.
Contains(
"station")) {
688 cout <<
"statNr : " << statNr <<
", " << statTrans[2] <<
" zal: " << zAlign3[statNr - 1] << endl;
689 statTrans[2] = zAlign3[statNr - 1];
729 Int_t moduleNr = 0, copy_no = 0;
737 for (
Int_t iStatD = 0; iStatD < nModules; iStatD++) {
745 cout << iStatD <<
" " << module->
GetName() <<
" stn: " << statNr << endl;
750 Int_t nOfModSi = SensCh;
751 cout <<
"modSI: " << nOfModSi <<
" " << zAlign23[nOfModSi] << endl;
759 modTrans[0] = xAlign[nOfModSi];
760 modTrans[1] = yAlign[nOfModSi];
761 modTrans[2] = zAlign23[nOfModSi];
814 cout <<
" aaaa ^^^^^^^^^^^^^^^^^^^ : " << statNr - 1;
815 cout <<
"\n" << moduleNr;
816 cout <<
"\n" <<
ip_r7[(statNr - 1) - 3][moduleNr] << endl;
818 modTrans[0] = xAlign[
ip_r7[(statNr - 1) - 3][moduleNr] + 14];
819 modTrans[1] = yAlign[
ip_r7[(statNr - 1) - 3][moduleNr]
821 modTrans[2] = zAlign23[
ip_r7[(statNr - 1) - 3][moduleNr] + 14];
855 vector<TGeoNode*> removNodes;
857 for (
Int_t iNode = 0; iNode < nStat0; iNode++) {
862 cout <<
" st name del: " << stationNode->
GetName() <<
" iNode: " << iNode << endl;
863 removNodes.push_back(stationNode);
867 for (
Int_t o = 0; o < removNodes.size(); o++)
871 for (
Int_t iNode = 0; iNode < nStat0; iNode++) {
878 if (!statName.
Contains(
"station")) {
884 for (
Int_t iStatD = 0; iStatD < nMod; iStatD++) {
896 for (
Int_t iStatD = 0; iStatD < currNodes; iStatD++) {
921 cout <<
" Check-in STATION: " << stationNode->
GetName()
922 <<
" zpos : " <<
gGeoManager->GetCurrentMatrix()->GetTranslation()[2] << endl;
928 if (gName.Contains(
"frame")) {
935 cout <<
" Check-in st name : " << stationNode->
GetName() <<
" mod name : " << moduleNode->
GetName() << endl;
937 cout <<
"trans mod: " << sensTrans[0] <<
" " << sensTrans[1] <<
" " << sensTrans[2] << endl;
950 cout <<
" Check-in st name : " << stationNode->
GetName() <<
" hot name : " << moduleNode2->
GetName()
953 cout <<
"trans hot: " << sensTrans[0] <<
" " << sensTrans[1] <<
" " << sensTrans[2] << endl;