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
No related merge requests found
...@@ -200,14 +200,21 @@ void CbmRichGeoManager::InitPmtCyl() ...@@ -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.fPlaneX = mapPmtPlaneMinMax[it->first].GetMeanX();
it->second.fPlaneY = mapPmtPlaneMinMax[it->first].GetMeanY(); it->second.fPlaneY = mapPmtPlaneMinMax[it->first].GetMeanY();
it->second.fPlaneZ = mapPmtPlaneMinMax[it->first].GetMeanZ(); 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 << ", " << // " 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 // Calculate gap between camera_strip
...@@ -220,6 +227,7 @@ void CbmRichGeoManager::InitPmtCyl() ...@@ -220,6 +227,7 @@ void CbmRichGeoManager::InitPmtCyl()
geoIterator.GetPath(nodePath); geoIterator.GetPath(nodePath);
string nodePathStr = string(nodePath.Data()) + "/"; string nodePathStr = string(nodePath.Data()) + "/";
if (fGP->fPmtMap.find(nodePathStr) == fGP->fPmtMap.end()) continue;
const TGeoMatrix* curMatrix = geoIterator.GetCurrentMatrix(); const TGeoMatrix* curMatrix = geoIterator.GetCurrentMatrix();
const Double_t* curNodeTr = curMatrix->GetTranslation(); const Double_t* curNodeTr = curMatrix->GetTranslation();
// const Double_t* curNodeRot = curMatrix->GetRotationMatrix(); // const Double_t* curNodeRot = curMatrix->GetRotationMatrix();
......
...@@ -262,6 +262,7 @@ public: ...@@ -262,6 +262,7 @@ public:
fMaxPmtY = TMath::Max(fMaxPmtY, y); fMaxPmtY = TMath::Max(fMaxPmtY, y);
fMinPmtZ = TMath::Min(fMinPmtZ, z); fMinPmtZ = TMath::Min(fMinPmtZ, z);
fMaxPmtZ = TMath::Max(fMaxPmtZ, z); fMaxPmtZ = TMath::Max(fMaxPmtZ, z);
fPointAdded = true;
} }
Double_t GetMeanX() { return (fMinPmtX + fMaxPmtX) / 2.; } Double_t GetMeanX() { return (fMinPmtX + fMaxPmtX) / 2.; }
...@@ -270,7 +271,9 @@ public: ...@@ -270,7 +271,9 @@ public:
Double_t GetMeanZ() { return (fMinPmtZ + fMaxPmtZ) / 2.; } Double_t GetMeanZ() { return (fMinPmtZ + fMaxPmtZ) / 2.; }
private: bool fPointAdded{false}; // true if at least one point was added
private:
Double_t fMinPmtX; Double_t fMinPmtX;
Double_t fMaxPmtX; Double_t fMaxPmtX;
Double_t fMinPmtY; Double_t fMinPmtY;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment