180 for (
Int_t iHit = 0; iHit < nHits; iHit++) {
183 cout <<
"-W- " << GetName() <<
"::Exec: Empty hit at index " << iHit << endl;
208 cout <<
"-E- " << GetName() <<
"::Exec: "
209 <<
"No DigiMatchF for hit " << iHit << endl;
210 hit->SetRefIndex(-1);
222 cout <<
"-E- " << GetName() <<
"::Exec: "
223 <<
"No DigiMatchB for hit " << iHit << endl;
224 hit->SetRefIndex(-1);
238 for (
Int_t jMatchF = 0; jMatchF < 3; jMatchF++) {
246 cout <<
"-E- " << GetName() <<
"::Exec: "
247 <<
"No StsPoint (" << iPointF <<
") for pixel hit " << iHit << endl;
260 else if (iType == 2 || iType == 3)
264 for (
Int_t jMatchF = 0; jMatchF < 3; jMatchF++) {
270 for (
Int_t iMatchB = 0; iMatchB < 3; iMatchB++) {
277 if (iPointB != iPointF)
282 cout <<
"-E- " << GetName() <<
"::Exec: "
283 <<
"No StsPoint (" << iPointF <<
") for strip hit " << iHit << endl;
299 cout <<
"-E- " << GetName() <<
"::Exec: Unknwon sensor type " << iType << endl;
300 Fatal(
"Exec",
"Unknwon sensor type");
304 cout <<
"-I- " << GetName() <<
": Hit " << iHit <<
", type " << iType <<
", points " << nPointsF <<
" / "
305 << nPointsB <<
", candidates " <<
fCandMap.size();
311 hit->SetRefIndex(-1);
313 cout <<
", background " << endl;
322 if ((*fIter).first < distMin) {
323 distMin = (*fIter).first;
324 iPoint = (*fIter).second;
328 cout <<
"-E- " << GetName() <<
"::Exec: "
329 <<
"No closest point found in candidate map!" << endl;
330 Fatal(
"Exec",
"No closest point");
334 cout <<
", matched to " << iPoint <<
", distance " << distMin <<
" cm";
343 hit->SetRefIndex(-2);
346 cout <<
", distant" << endl;
347 if (iType == 1 || iType == 2) {
348 cout <<
"-W- " << fName <<
"::Exec: "
349 <<
"Distant hit in pixel / strip MSU station" << endl;
350 cout <<
"Hit " << iHit <<
" coordinates " << xH <<
", " << yH << endl;
351 cout <<
"Matched point " << iPoint <<
", distance " << distMin << endl;
352 cout <<
"Distance y " <<
TMath::Abs(xP - xH) <<
" Error " << dX << endl;
353 cout <<
"Distance y " <<
TMath::Abs(yP - yH) <<
" Error " << dY << endl;
360 hit->SetRefIndex(iPoint);
363 cout <<
", good match" << endl;
367 if (
TMath::Abs(hit->GetZ() - point->GetZ()) > 1.) {
368 cout <<
"-E- " << GetName() <<
"::Exec: Hit " << iHit <<
" is at z = " << hit->GetZ()
369 <<
" cm, but matched point " << iPoint <<
" is at z = " << point->GetZ() <<
"cm " << endl;
370 Fatal(
"Exec",
"Different stations for hit and point");
381 cout << setw(15) << left << fName <<
": " << setprecision(4) << setw(8) << fixed << right <<
fTimer.RealTime()
382 <<
" s, hits " << nHits <<
", matched " << nMatched <<
", distant " << nDistant <<
", background " << setw(6)
420 nofSiPoints =
fPointsSi->GetEntriesFast();
422 Int_t hitStationLimits[2][100];
429 hitStationLimits[0][ist] = -1;
430 hitStationLimits[1][ist] = -1;
434 for (
Int_t ihit = 0; ihit < nofStsHits; ihit++) {
436 stsHit->SetRefIndex(-1);
437 if (hitStationLimits[0][stsHit->
GetStationNr() - 1] == -1)
440 if (hitStationLimits[1][stsHitBack->
GetStationNr() - 1] == -1) {
441 hitStationLimits[1][stsHitBack->
GetStationNr() - 1] = nofStsHits - ihit;
448 int nTotPoints = nofSiPoints + nofStsPoints;
452 for (
Int_t iii = 0; iii < nTotPoints; iii++) {
454 int ipnt = (iii < nofSiPoints) ? iii : iii - nofSiPoints;
455 if (iii < nofSiPoints)
480 std::cerr <<
"-E- " << fName <<
"::ExecReal:: sensor " << curNode->
GetName()
481 <<
" not found in digi scheme!" << endl;
492 Int_t startHit = hitStationLimits[0][stationNr];
493 Int_t finalHit = hitStationLimits[1][stationNr];
495 if (startHit == -1 && finalHit == -1)
497 if (startHit < 0 || finalHit < 0 || startHit >
fHits->GetEntriesFast() || finalHit >
fHits->GetEntriesFast())
500 Int_t NofMatched = 0;
504 Int_t GoodHitIndex[50000];
505 for (
Int_t ihit = startHit; ihit < finalHit; ihit++) {
507 if (NULL == stsHit) {
508 std::cout <<
"CbmStsMatchHits::ExecReal: CbmStsHit NULL pointer: ihit=" << ihit <<
" "
509 <<
"startHit=" << startHit <<
" finalHit=" << finalHit << std::endl;
514 Int_t iL = 0, nMatch = 0;
515 FairLink link = stsHit->GetLink(iL);
517 Int_t nLinks2 = stsCluster->GetNLinks();
518 for (
Int_t iL2 = 0; iL2 < nLinks2; ++iL2) {
519 FairLink link2 = stsCluster->GetLink(iL2);
524 const Int_t nLinks3 = 3;
525 for (
Int_t iL3 = 0; iL3 < nLinks3; ++iL3) {
529 if (stsPointId == ipnt) {
532 }
else if (stsPointId < 0)
541 link = stsHit->GetLink(iL);
543 nLinks2 = stsCluster->GetNLinks();
544 for (
Int_t iL2 = 0; iL2 < nLinks2; ++iL2) {
545 FairLink link2 = stsCluster->GetLink(iL2);
550 const Int_t nLinks3 = 3;
551 for (
Int_t iL3 = 0; iL3 < nLinks3; ++iL3) {
555 if (stsPointId == ipnt) {
558 }
else if (stsPointId < 0)
575 GoodHitIndex[NofMatched] = ihit;
576 GoodHit[NofMatched] =
dist;
581 Int_t k = NofMatched;
582 if (NofMatched > 1) {
583 for (
Int_t i = NofMatched - 1;
i > 0;
i--) {
584 if (GoodHit[
i] < GoodHit[k])
588 if (NofMatched > 0) {
590 stsHit->SetRefIndex(ipnt);
600 cout << setw(15) << left << fName <<
": " << setprecision(4) << setw(8) << fixed << right <<
fTimer.RealTime()
601 <<
" s, hits " << nHits <<
", matched " << nMatched <<
", distant " << nDistant <<
", background " << setw(6)
859 cout <<
"-W- " << endl;
862 cout <<
"-W- " << GetName() <<
"::GetGeometry: No passive geometry!" << endl;
868 cout <<
"-W- " << GetName() <<
"::GetGeometry: No passive node array" << endl;
888 cout <<
"-W- " << GetName() <<
"::GetGeometry: No passive geometry!" << endl;
894 cout <<
"-E- " << GetName() <<
"::GetGeometry: No STS node array" << endl;
899 cout <<
"Nodes in STS: " << tempNofStations << endl;
901 cout <<
"There are " << tempNofStations <<
" nodes" << (tempNofStations > 10 ?
"!!!" :
"") << endl;
906 for (
Int_t ist = 0; ist < tempNofStations; ist++) {
907 FairGeoNode* stsNode = (FairGeoNode*)stsNodes->
At(ist);
909 cout <<
"-W- CbmStsDigiScheme::Init: station#" << ist <<
" not found among sensitive nodes " << endl;
912 geoNodeName = stsNode->getName();
918 if (geoNodeName.Contains(stationNames[ikst])) {
920 stationKnown =
kTRUE;
932 geoNodeName.Remove(12, geoNodeName.Length() - 12);
936 cout <<
"station #" <<
fNStations <<
" has MCID = " << stsNode->getMCid() <<
" and name " << stsNode->GetName()
941 cout <<
"There are " <<
fNStations <<
" stations" << endl;