Skip to content
Snippets Groups Projects
Commit aee5a8b8 authored by Martin Beyer's avatar Martin Beyer Committed by Florian Uhlig
Browse files

Rich: Track projection fix using the CFV

parent 54f2cd02
No related branches found
No related tags found
1 merge request!2082Rich: Track projection fix using the CFV
Pipeline #33850 passed
......@@ -200,14 +200,21 @@ void CbmRichGeoManager::InitPmtCyl()
}
}
for (map<string, CbmRichRecGeoParPmt>::iterator it = fGP->fPmtMap.begin(); it != fGP->fPmtMap.end(); it++) {
for (map<string, CbmRichRecGeoParPmt>::iterator it = fGP->fPmtMap.begin(); it != fGP->fPmtMap.end();) {
it->second.fPlaneX = mapPmtPlaneMinMax[it->first].GetMeanX();
it->second.fPlaneY = mapPmtPlaneMinMax[it->first].GetMeanY();
it->second.fPlaneZ = mapPmtPlaneMinMax[it->first].GetMeanZ();
// cout << "name:" << it->first << " strip(x,y,z):" <<it->second.fX << "," << it->second.fY << "," << it->second.fZ <<
// LOG(info) << "name:" << it->first << " strip(x,y,z):" <<it->second.fX << "," << it->second.fY << "," << it->second.fZ <<
// " pmtPlane(x,y,z):" <<it->second.fPlaneX << "," << it->second.fPlaneY << "," << it->second.fPlaneZ << ", " <<
// "theta:" << it->second.fTheta << ", phi:" << it->second.fPhi << endl;
// "theta:" << it->second.fTheta << ", phi:" << it->second.fPhi;
if (!mapPmtPlaneMinMax[it->first].fPointAdded) {
it = fGP->fPmtMap.erase(it);
}
else {
++it;
}
}
// Calculate gap between camera_strip
......@@ -220,6 +227,7 @@ void CbmRichGeoManager::InitPmtCyl()
geoIterator.GetPath(nodePath);
string nodePathStr = string(nodePath.Data()) + "/";
if (fGP->fPmtMap.find(nodePathStr) == fGP->fPmtMap.end()) continue;
const TGeoMatrix* curMatrix = geoIterator.GetCurrentMatrix();
const Double_t* curNodeTr = curMatrix->GetTranslation();
// const Double_t* curNodeRot = curMatrix->GetRotationMatrix();
......
......
......@@ -262,6 +262,7 @@ public:
fMaxPmtY = TMath::Max(fMaxPmtY, y);
fMinPmtZ = TMath::Min(fMinPmtZ, z);
fMaxPmtZ = TMath::Max(fMaxPmtZ, z);
fPointAdded = true;
}
Double_t GetMeanX() { return (fMinPmtX + fMaxPmtX) / 2.; }
......@@ -270,6 +271,8 @@ public:
Double_t GetMeanZ() { return (fMinPmtZ + fMaxPmtZ) / 2.; }
bool fPointAdded{false}; // true if at least one point was added
private:
Double_t fMinPmtX;
Double_t fMaxPmtX;
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment