Skip to content
Snippets Groups Projects
Commit 4ea45757 authored by Eoin Clerkin's avatar Eoin Clerkin Committed by Pierre-Alain Loizeau
Browse files

MVD support for CFV

Allow two station MVD as requested. Update geometry hash.
parent 0b2cf448
No related branches found
No related tags found
1 merge request!1971MVD support for CFV
Pipeline #32054 passed
......@@ -105,6 +105,7 @@ void CbmMvdGeoHandler::Init(Bool_t isSimulation)
case FourStation:
case FourStationShift: fStationPar->Init(4); break;
case ThreeStation: fStationPar->Init(3); break;
case TwoStation: fStationPar->Init(2); break;
case MiniCbm: fStationPar->Init(2); break;
default: fStationPar->Init(0);
}
......@@ -191,7 +192,7 @@ Int_t CbmMvdGeoHandler::GetStation(const TString& path)
//--------------------------------------------------------------------------
void CbmMvdGeoHandler::NavigateTo(const TString& path)
{
// LOG(info) << "path : " << path.Data();
//LOG(info) << "path : " << path.Data();
if (fIsSimulation) { LOG(fatal) << "This method is not supported in simulation mode"; }
else {
gGeoManager->cd(path.Data());
......@@ -333,8 +334,13 @@ void CbmMvdGeoHandler::GetGeometryTyp()
fDetectorName = "/MVDomCBMorotated_0";
fGeoTyp = MiniCbm;
}
else if (gGeoManager->CheckPath(fMother + "/TwoStation_0")) {
LOG(info) << "Found two station scripted MVD configuration";
fDetectorName = "/TwoStation_0";
fGeoTyp = TwoStation;
}
else if (gGeoManager->CheckPath(fMother + "/MVDscripted_0")) {
LOG(debug) << "Found scripted MVD configuration";
LOG(info) << "Found scripted MVD configuration";
fDetectorName = "/MVDscripted_0";
fGeoTyp = scripted;
}
......@@ -438,6 +444,7 @@ void CbmMvdGeoHandler::FillDetector()
fSensorName = "sensorActive";
if (!fDetector) LOG(fatal) << "GeometryHandler couldn't find a valid Detector";
Int_t iStation = 0;
for (Int_t StatNr = 0; StatNr < 4; StatNr++) {
fStationNumber = StatNr;
......@@ -472,6 +479,43 @@ void CbmMvdGeoHandler::FillDetector()
}
}
else if (fGeoTyp == TwoStation) {
fSensorName = "sensorActive";
if (!fDetector) LOG(fatal) << "GeometryHandler couldn't find a valid Detector";
Int_t iStation = 0;
for (Int_t StatNr = 0; StatNr < 2; StatNr++) {
fStationNumber = StatNr;
fStationName = Form("/station_S%d_1", StatNr);
for (Int_t QuadNr = 0; QuadNr < 4; QuadNr++) {
fQuadrantName = Form("/quadrant_S%d_%d", StatNr, QuadNr);
for (Int_t SensNr = 0; SensNr < 50; SensNr++) {
fSensorHolding = Form("/sensor_%d", SensNr);
fnodeName =
fMother + fDetectorName + fStationName + fQuadrantName + fSensorHolding + "/" + fSensorName + "_1";
LOG(debug1) << "looking for " << fnodeName;
Bool_t nodeFound = gGeoManager->CheckPath(fnodeName.Data());
if (nodeFound) {
gGeoManager->cd(fnodeName);
fVolId = GetIDfromPath(fnodeName);
if (fSensorTyp == CbmMvdSensorTyp::MIMOSIS)
fDetector->AddSensor(fSensorName, fSensorName, fnodeName, new CbmMvdMimosis, iStation, fVolId, 0.0,
StatNr);
else
fDetector->AddSensor(fSensorName, fSensorName, fnodeName, new CbmMvdMimosa26AHR, iStation, fVolId, 0.0,
StatNr);
iStation++;
FillParameter();
LOG(debug1) << "found " << fSensorHolding + "/" + fSensorName << " number: " << fVolId
<< " and added to MVD Detector";
}
else
break;
}
}
}
}
else if (fGeoTyp == MiniCbm) {
......@@ -591,6 +635,34 @@ void CbmMvdGeoHandler::FillStationMap()
}
}
}
else if (fGeoTyp == TwoStation) {
fSensorName = "sensorActive";
Int_t iStation = 0;
for (Int_t StatNr = 0; StatNr < 2; StatNr++) {
fStationName = Form("/station_S%d_1", StatNr);
for (Int_t QuadNr = 0; QuadNr < 4; QuadNr++) {
fQuadrantName = Form("/quadrant_S%d_%d", StatNr, QuadNr);
for (Int_t SensNr = 0; SensNr < 50; SensNr++) {
fSensorHolding = Form("/sensor_%d", SensNr);
fnodeName =
fMother + fDetectorName + fStationName + fQuadrantName + fSensorHolding + "/" + fSensorName + "_1";
LOG(debug) << "looking for " << fnodeName;
Bool_t nodeFound = gGeoManager->CheckPath(fnodeName.Data());
if (nodeFound) {
gGeoManager->cd(fnodeName);
fVolId = GetIDfromPath(fnodeName);
LOG(debug) << "found " << fnodeName << " number: " << iStation << " ID: " << fVolId
<< " and added to station map";
fStationMap[fVolId] = iStation;
iStation++;
LOG(debug) << "Map now size: " << fStationMap.size();
}
else
break;
}
}
}
}
else if (fGeoTyp == Default) {
Int_t iStation = 1;
Int_t volId = -1;
......
set(GEOMETRY_VERSION 4489953e3400c49528036b6c509dec80edc3f00f)
set(GEOMETRY_VERSION 6ce5fd03c7d8cde2fa83ae72bff4d51916508c85)
set(GEOMETRY_SRC_URL "https://git.cbm.gsi.de/CbmSoft/cbmroot_geometry.git")
download_project_if_needed(PROJECT Geometry_source
......
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