101 cerr <<
"-E- " << fName <<
"::Exec: No digi scheme!" << endl;
113 Int_t nClustersF = 0;
114 Int_t nClustersB = 0;
118 for (
Int_t iStation = 0; iStation < nStations; iStation++) {
122 Int_t nClustersFInStation = 0;
123 Int_t nClustersBInStation = 0;
124 Int_t nHitsInStation = 0;
126 for (
Int_t iSector = 0; iSector < nSectors; iSector++) {
128 set<Int_t> fSet, bSet;
130 cout <<
"-E- " << fName <<
"::Exec: sector " << sector->
GetSectorNr() <<
" of station "
131 << station->
GetStationNr() <<
"not found in front map!" << endl;
138 cout <<
"-E- " << fName <<
"::Exec: sector " << sector->
GetSectorNr() <<
" of station "
139 << station->
GetStationNr() <<
"not found in back map!" << endl;
145 Int_t nClustersFInSector = fSet.size();
146 Int_t nClustersBInSector = bSet.size();
149 cout <<
"Sector " << sector->
GetSectorNr() <<
", Clusters front " << nClustersFInSector
150 <<
", Clusters Back " << nClustersBInSector <<
", Hits " << nHitsInSector << endl;
151 nHitsInStation += nHitsInSector;
152 nClustersFInStation += nClustersFInSector;
153 nClustersBInStation += nClustersBInSector;
157 cout <<
"Total for station " << station->
GetStationNr() <<
": Clusters front " << nClustersFInStation
158 <<
", clusters back " << nClustersBInStation <<
", hits " << nHitsInStation << endl;
159 nClustersB += nClustersBInStation;
160 nClustersF += nClustersFInStation;
161 nHits += nHitsInStation;
169 cout <<
"-I- " << fName <<
":Event " << FairRunAna::Instance()->GetEventHeader()->GetMCEntryNumber()
170 <<
" summary" << endl;
171 cout <<
" Clusters front side : " << nClustersF << endl;
172 cout <<
" Clusters back side : " << nClustersB << endl;
173 cout <<
" Hits created : " << nHits << endl;
174 cout <<
" Real time : " <<
fTimer.RealTime() << endl;
180 cout << setw(15) << left << fName <<
": " << setprecision(4) << setw(8) << fixed << right <<
fTimer.RealTime()
181 <<
" s, clusters " << nClustersF <<
" / " << nClustersB <<
", hits: " << nHits << endl;
354 static Int_t ifield = -1;
356 FairRunAna* run = FairRunAna::Instance();
428 set<Int_t>::iterator it1;
429 set<Int_t>::iterator it2;
433 Fatal(
"FindHits",
"Sorry, not implemented yet");
447 else if (iType == 2 || iType == 3)
462 if (stereoF == 0. && stereoB * 180 /
TMath::Pi() < 80) {
465 vXY = -1. * dx * dx / 12. /
TMath::Tan(stereoB);
466 }
else if (stereoF == 0. && stereoB * 180 /
TMath::Pi() > 80) {
476 for (it1 = fSet.begin(); it1 != fSet.end(); it1++) {
480 cout <<
"-W- " << GetName() <<
"::FindHits: Invalid cluster index " << iClusF
486 for (it2 = bSet.begin(); it2 != bSet.end(); it2++) {
490 cout <<
"-W- " << GetName() <<
"::FindHits: Invalid cluster index " << iClusB
491 <<
" in back set of sector " << sector->
GetSectorNr() <<
", station "
507 if (sensorDetId == -1)
521 Double_t lorShift = 0.1575, zShift = -0.27;
526 else if (ifield == 6)
532 else if (ifield == 7)
537 else if (ifield == 9)
545 if (sector->
GetDx() < 0.02)
546 lorShift = zShift = 0.0;
558 pos.
SetXYZ(xHit, yHit, zHit);
562 Double_t wX = vX * vX * cosrot * cosrot - 2. * vXY * cosrot * sinrot + vY * vY * sinrot * sinrot;
563 Double_t wY = vX * vX * sinrot * sinrot + 2. * vXY * cosrot * sinrot + vY * vY * cosrot * cosrot;
564 Double_t wXY = (vX * vX - vY * vY) * cosrot * sinrot + vXY * (cosrot * cosrot - sinrot * sinrot);
568 if (stereoF == 0. && stereoB * 180 /
TMath::Pi() < 80) {
574 vXYTemp = -vXTemp * vXTemp / (
TMath::Tan(stereoB));
576 wX = vXTemp * vXTemp * cosrot * cosrot - 2. * vXYTemp * cosrot * sinrot
577 + vYTemp * vYTemp * sinrot * sinrot;
578 wY = vXTemp * vXTemp * sinrot * sinrot + 2. * vXYTemp * cosrot * sinrot
579 + vYTemp * vYTemp * cosrot * cosrot;
580 wXY = (vXTemp * vXTemp - vYTemp * vYTemp) * cosrot * sinrot
581 + vXYTemp * (cosrot * cosrot - sinrot * sinrot);
595 if (sector->
GetDx() < 0.02)
599 dpos.
SetXYZ(0.015, 0.058, 0.);
604 }
else if (stereoF == 0. && stereoB * 180 /
TMath::Pi() > 80) {
614 wX = vXTemp * vXTemp * cosrot * cosrot - 2. * vXYTemp * cosrot * sinrot
615 + vYTemp * vYTemp * sinrot * sinrot;
616 wY = vXTemp * vXTemp * sinrot * sinrot + 2. * vXYTemp * cosrot * sinrot
617 + vYTemp * vYTemp * cosrot * cosrot;
618 wXY = (vXTemp * vXTemp - vYTemp * vYTemp) * cosrot * sinrot
619 + vXYTemp * (cosrot * cosrot - sinrot * sinrot);
621 dpos.
SetXYZ(vX * 6, vX * 6, 0.);
634 vXYTemp = (vX * vX / (4. * (
TMath::Tan(stereoB))))
638 wX = vXTemp * vXTemp * cosrot * cosrot - 2. * vXYTemp * cosrot * sinrot
639 + vYTemp * vYTemp * sinrot * sinrot;
640 wY = vXTemp * vXTemp * sinrot * sinrot + 2. * vXYTemp * cosrot * sinrot
641 + vYTemp * vYTemp * cosrot * cosrot;
642 wXY = (vXTemp * vXTemp - vYTemp * vYTemp) * cosrot * sinrot
643 + vXYTemp * (cosrot * cosrot - sinrot * sinrot);
647 Int_t statLayer = -1;
648 for (
Int_t istatL = station->
GetNofZ(); istatL > 0; istatL--)
650 statLayer = istatL - 1;
655 cout <<
"unknown layer for hit at z = " << zHit << endl;
657 if (sector->
GetDx() > 0.03)
660 CbmStsHit* hhNew =
new ((*fHits)[nHits++])
661 CbmStsHit(sensorDetId, pos, dpos, wXY, iClusF, iClusB, (
Int_t)chanF, (
Int_t)chanB, statLayer);
667 cout <<
"New StsHit at (" << xHit <<
", " << yHit <<
", " << zHit <<
"), station " << stationNr
668 <<
", sector " << sectorNr <<
", channel " << chanF <<
" / " << chanB << endl;