diff --git a/mvd/CbmMvdStationPar.cxx b/mvd/CbmMvdStationPar.cxx index 97056bf6b0c7bd2fd08b1473be7bcf7fd4b5e4ec..224bc7c8dc123c4d7d4c7e76ec6d8ca778e57774 100644 --- a/mvd/CbmMvdStationPar.cxx +++ b/mvd/CbmMvdStationPar.cxx @@ -12,6 +12,7 @@ #include <Logger.h> #include <iostream> +#include <limits> #include <math.h> @@ -20,20 +21,7 @@ using std::endl; // ----- Default constructor ------------------------------------------- -CbmMvdStationPar::CbmMvdStationPar() - : TNamed() - , fStationCount() - , fZPositions() - , fThicknesses() - , fHeights() - , fWidths() - , fXResolutions() - , fYResolutions() - , fRadiationLength() - , fBeamHeights() - , fBeamWidths() -{ -} +CbmMvdStationPar::CbmMvdStationPar() : TNamed() {} // ------------------------------------------------------------------------- // ----- Destructor ---------------------------------------------------- @@ -43,225 +31,142 @@ CbmMvdStationPar::~CbmMvdStationPar() {} // ----- Public method Print ------------------------------------------- void CbmMvdStationPar::Print(Option_t* /*opt*/) const { + LOG(info) << "MvdStationPar: Initialized parameter file with " << fStationCount << " stations"; - LOG(info) << "MvdStationPar: Initialized parameter file with " << fZPositions.size() << " stations"; - - LOG(debug) << "Z Postion station 0: " << GetZPosition(0); - LOG(debug) << "Z Postion station 1: " << GetZPosition(1); - LOG(debug) << "Z Postion station 2: " << GetZPosition(2); - LOG(debug) << "Z Postion station 3: " << GetZPosition(3); + for (int i = 0; i < fStationCount; i++) { + LOG(debug) << "Z Postion station " << i << ": " << GetZPosition(i); + } - LOG(debug) << "Thickness station 0: " << GetThickness(0); - LOG(debug) << "Thickness station 1: " << GetThickness(1); - LOG(debug) << "Thickness station 2: " << GetThickness(2); - LOG(debug) << "Thickness station 3: " << GetThickness(3); + for (int i = 0; i < fStationCount; i++) { + LOG(debug) << "Z Thickness station " << i << ": " << GetZThickness(i); + } - LOG(debug) << "Width station 0: " << GetWidth(0); - LOG(debug) << "Width station 1: " << GetWidth(1); - LOG(debug) << "Width station 2: " << GetWidth(2); - LOG(debug) << "Width station 3: " << GetWidth(3); + for (int i = 0; i < fStationCount; i++) { + LOG(debug) << "Width station " << i << ": " << GetWidth(i); + } - LOG(debug) << "Height station 0: " << GetHeight(0); - LOG(debug) << "Height station 1: " << GetHeight(1); - LOG(debug) << "Height station 2: " << GetHeight(2); - LOG(debug) << "Height station 3: " << GetHeight(3); -} -// ------------------------------------------------------------------------- + for (int i = 0; i < fStationCount; i++) { + LOG(debug) << "Height station " << i << ": " << GetHeight(i); + } -// ------------------------------------------------------------------------- -Bool_t CbmMvdStationPar::Init() -{ - for (Int_t i = 0; i < fStationCount; i++) { - fZPositions[i] = 0.; - fThicknesses[i] = 0.; - fHeights[i] = 0.; - fWidths[i] = 0.; - fXResolutions[i] = 0.; - fYResolutions[i] = 0.; - fRadiationLength[i] = 0.; - fBeamHeights[i] = 0.; - fBeamWidths[i] = 0.; + for (int i = 0; i < fStationCount; i++) { + LOG(debug) << "Z Radiation Thickness station " << i << ": " << GetZRadThickness(i); } - return 1; } // ------------------------------------------------------------------------- -// ------------------------------------------------------------------------- -Double_t CbmMvdStationPar::GetZPosition(Int_t stationNumber) const +void CbmMvdStationPar::Init(Int_t nrOfStations) { - if (stationNumber <= fStationCount) { return fZPositions.at(stationNumber); } - else { - cout << "Station number out of Range " << endl; - } - return 0.; + fStationCount = nrOfStations; + + constexpr float kNaN {std::numeric_limits<float>::signaling_NaN()}; + + // resize the arrays and set all initial values to NaN + // to ensure that they will be initialized later + + fZPositions.resize(fStationCount, kNaN); + fZPositionMin.resize(fStationCount, std::numeric_limits<float>::max()); + fZPositionMax.resize(fStationCount, -std::numeric_limits<float>::max()); + fZThicknesses.resize(fStationCount, kNaN); + fHeights.resize(fStationCount, 0.); + fWidths.resize(fStationCount, 0.); + fXResolutions.resize(fStationCount, kNaN); + fYResolutions.resize(fStationCount, kNaN); + fZRadThickness.resize(fStationCount, kNaN); + fBeamHeights.resize(fStationCount, kNaN); + fBeamWidths.resize(fStationCount, kNaN); } -// ------------------------------------------------------------------------- // ------------------------------------------------------------------------- -Double_t CbmMvdStationPar::GetThickness(Int_t stationNumber) const +Double_t CbmMvdStationPar::GetParameter(const std::vector<Double_t>& parArray, Int_t iStation) const { - if (stationNumber <= fStationCount) { return fThicknesses.at(stationNumber); } - else { - cout << "Station number out of Range " << endl; + // return a parameter after out-of-range check + if ((iStation < 0) || (iStation >= fStationCount)) { + LOG(error) << "Station number out of Range "; + return 0.; } - return 0.; + return parArray.at(iStation); } - // ------------------------------------------------------------------------- // ------------------------------------------------------------------------- -Double_t CbmMvdStationPar::GetHeight(Int_t stationNumber) const +void CbmMvdStationPar::SetParameterMax(std::vector<Double_t>& parArray, Int_t iStation, Double_t value) { - if (stationNumber <= fStationCount) { return fHeights.at(stationNumber); } + // add a parameter after out-of-range check + value = fabs(value); + if ((iStation < 0) || (iStation >= fStationCount)) { LOG(error) << "Station number out of Range "; } else { - cout << "Station number out of Range " << endl; + Double_t& v = parArray[iStation]; + if (isnan(v) || (v < value)) { v = value; } } - return 0.; } - // ------------------------------------------------------------------------- // ------------------------------------------------------------------------- -Double_t CbmMvdStationPar::GetWidth(Int_t stationNumber) const +void CbmMvdStationPar::SetParameterMin(std::vector<Double_t>& parArray, Int_t iStation, Double_t value) { - if (stationNumber <= fStationCount) { return fWidths.at(stationNumber); } + // add a parameter after out-of-range check + value = fabs(value); + if ((iStation < 0) || (iStation >= fStationCount)) { LOG(error) << "Station number out of Range "; } else { - cout << "Station number out of Range " << endl; + Double_t& v = parArray[iStation]; + if (isnan(v) || (v > value)) { v = value; } } - return 0.; } - // ------------------------------------------------------------------------- -// ------------------------------------------------------------------------- -Double_t CbmMvdStationPar::GetXRes(Int_t stationNumber) const -{ - if (stationNumber <= fStationCount) { return fXResolutions.at(stationNumber); } - else { - cout << "Station number out of Range " << endl; - } - return 0.; -} // ------------------------------------------------------------------------- -// ------------------------------------------------------------------------- -Double_t CbmMvdStationPar::GetYRes(Int_t stationNumber) const -{ - if (stationNumber <= fStationCount) { return fYResolutions.at(stationNumber); } - else { - cout << "Station number out of Range " << endl; - } - return 0.; -} +Double_t CbmMvdStationPar::GetZPosition(Int_t iStation) const { return GetParameter(fZPositions, iStation); } -// ------------------------------------------------------------------------- +Double_t CbmMvdStationPar::GetZThickness(Int_t iStation) const { return GetParameter(fZThicknesses, iStation); } -// ------------------------------------------------------------------------- -Double_t CbmMvdStationPar::GetRadLength(Int_t stationNumber) const -{ - if (stationNumber <= fStationCount) { return fRadiationLength.at(stationNumber); } - else { - cout << "Station number out of Range " << endl; - } - return 0.; -} +Double_t CbmMvdStationPar::GetHeight(Int_t iStation) const { return GetParameter(fHeights, iStation); } -// ------------------------------------------------------------------------- +Double_t CbmMvdStationPar::GetWidth(Int_t iStation) const { return GetParameter(fWidths, iStation); } -// ------------------------------------------------------------------------- -Double_t CbmMvdStationPar::GetBeamHeight(Int_t stationNumber) const -{ - if (stationNumber <= fStationCount) { return fBeamHeights.at(stationNumber); } - else { - cout << "Station number out of Range " << endl; - } - return 0.; -} +Double_t CbmMvdStationPar::GetXRes(Int_t iStation) const { return GetParameter(fXResolutions, iStation); } -// ------------------------------------------------------------------------- +Double_t CbmMvdStationPar::GetYRes(Int_t iStation) const { return GetParameter(fYResolutions, iStation); } -// ------------------------------------------------------------------------- -Double_t CbmMvdStationPar::GetBeamWidth(Int_t stationNumber) const -{ - if (stationNumber <= fStationCount) { return fBeamWidths.at(stationNumber); } - else { - cout << "Station number out of Range " << endl; - } - return 0.; -} +Double_t CbmMvdStationPar::GetZRadThickness(Int_t iStation) const { return GetParameter(fZRadThickness, iStation); } -// ------------------------------------------------------------------------- +Double_t CbmMvdStationPar::GetBeamHeight(Int_t iStation) const { return GetParameter(fBeamHeights, iStation); } +Double_t CbmMvdStationPar::GetBeamWidth(Int_t iStation) const { return GetParameter(fBeamWidths, iStation); } -// ------------------------------------------------------------------------- -void CbmMvdStationPar::SetZPosition(Int_t stationNumber, Double_t z) -{ - if (fZPositions[stationNumber] != 0) { - fZPositions[stationNumber] = Int_t(((fZPositions[stationNumber] + z) / 2) + 0.5); - } - else { - fZPositions[stationNumber] = z; - } -} // ------------------------------------------------------------------------- -// ------------------------------------------------------------------------- -void CbmMvdStationPar::SetThickness(Int_t stationNumber, Double_t thickness) -{ - Float_t Sensorthickness = fabs(thickness - fZPositions[stationNumber]); - if (Sensorthickness > fThicknesses[stationNumber]) fThicknesses[stationNumber] = Sensorthickness; -} -// ------------------------------------------------------------------------- // ------------------------------------------------------------------------- -void CbmMvdStationPar::SetHeight(Int_t stationNumber, Double_t height) +void CbmMvdStationPar::AddZPosition(Int_t iStation, Double_t z, Double_t zThickness) { - if (fHeights[stationNumber] < height) { fHeights[stationNumber] = height; } + Double_t& zMin = fZPositionMin[iStation]; + Double_t& zMax = fZPositionMax[iStation]; + assert(zThickness >= 0.); + if (z - zThickness < zMin) zMin = z - zThickness; + if (z + zThickness > zMax) zMax = z + zThickness; + fZPositions[iStation] = 0.5 * (zMin + zMax); + fZThicknesses[iStation] = zMax - zMin; } -// ------------------------------------------------------------------------- -// ------------------------------------------------------------------------- -void CbmMvdStationPar::SetWidth(Int_t stationNumber, Double_t width) -{ - if (fWidths[stationNumber] < width) { fWidths[stationNumber] = width; } -} -// ------------------------------------------------------------------------- +void CbmMvdStationPar::AddHeight(Int_t iStation, Double_t value) { SetParameterMax(fHeights, iStation, value); } -// ------------------------------------------------------------------------- -void CbmMvdStationPar::SetXRes(Int_t stationNumber, Double_t xres) { fXResolutions[stationNumber] = xres; } -// ------------------------------------------------------------------------- +void CbmMvdStationPar::AddWidth(Int_t iStation, Double_t value) { SetParameterMax(fWidths, iStation, value); } -// ------------------------------------------------------------------------- -void CbmMvdStationPar::SetYRes(Int_t stationNumber, Double_t yres) { fYResolutions[stationNumber] = yres; } -// ------------------------------------------------------------------------- +void CbmMvdStationPar::AddXRes(Int_t iStation, Double_t value) { SetParameterMax(fXResolutions, iStation, value); } -// ------------------------------------------------------------------------- -void CbmMvdStationPar::SetRadLength(Int_t stationNumber, Double_t length) { fRadiationLength[stationNumber] = length; } -// ------------------------------------------------------------------------- +void CbmMvdStationPar::AddYRes(Int_t iStation, Double_t value) { SetParameterMax(fYResolutions, iStation, value); } -// ------------------------------------------------------------------------- -void CbmMvdStationPar::SetBeamHeight(Int_t stationNumber, Double_t beamheight) +void CbmMvdStationPar::AddZRadThickness(Int_t iStation, Double_t value) { - if (fBeamHeights[stationNumber] != 0) { - if (fBeamHeights[stationNumber] > beamheight) { fBeamHeights[stationNumber] = beamheight; } - } - else { - fBeamHeights[stationNumber] = beamheight; - } + SetParameterMax(fZRadThickness, iStation, value); } -// ------------------------------------------------------------------------- -// ------------------------------------------------------------------------- -void CbmMvdStationPar::SetBeamWidth(Int_t stationNumber, Double_t beamwidth) -{ - if (fBeamWidths[stationNumber] != 0) { - if (fBeamWidths[stationNumber] > beamwidth) { fBeamWidths[stationNumber] = beamwidth; } - } - else { - fBeamWidths[stationNumber] = beamwidth; - } -} +void CbmMvdStationPar::AddBeamHeight(Int_t iStation, Double_t value) { SetParameterMin(fBeamHeights, iStation, value); } + +void CbmMvdStationPar::AddBeamWidth(Int_t iStation, Double_t value) { SetParameterMin(fBeamWidths, iStation, value); } // ------------------------------------------------------------------------- diff --git a/mvd/CbmMvdStationPar.h b/mvd/CbmMvdStationPar.h index ad6c59543cd3c3d8c82b0414f8034ab4a70625d4..7b34f4a7d9073024d0c5a9d70cfad67de92bd07e 100644 --- a/mvd/CbmMvdStationPar.h +++ b/mvd/CbmMvdStationPar.h @@ -33,53 +33,53 @@ public: /** Destructor **/ virtual ~CbmMvdStationPar(); - Bool_t Init(); + void Init(Int_t nrOfStations); /** Accessors **/ Int_t GetStationCount() const { return fStationCount; }; Double_t GetZPosition(Int_t stationNumber) const; - Double_t GetThickness(Int_t stationNumber) const; + Double_t GetZThickness(Int_t stationNumber) const; Double_t GetHeight(Int_t stationNumber) const; Double_t GetWidth(Int_t stationNumber) const; Double_t GetXRes(Int_t stationNumber) const; Double_t GetYRes(Int_t stationNumber) const; - Double_t GetRadLength(Int_t stationNumber) const; + Double_t GetZRadThickness(Int_t stationNumber) const; Double_t GetBeamHeight(Int_t stationNumber) const; Double_t GetBeamWidth(Int_t stationNumber) const; - /** Data interface */ - void SetStationCount(Int_t count) { fStationCount = count; }; - void SetZPosition(Int_t stationNumber, Double_t z); - void SetThickness(Int_t stationNumber, Double_t thickness); - void SetHeight(Int_t stationNumber, Double_t height); - void SetWidth(Int_t stationNumber, Double_t width); - void SetXRes(Int_t stationNumber, Double_t xres); - void SetYRes(Int_t stationNumber, Double_t yres); - void SetRadLength(Int_t stationNumber, Double_t length); - void SetBeamHeight(Int_t stationNumber, Double_t beamheight); - void SetBeamWidth(Int_t stationNumber, Double_t beamwidth); - void SetNofStations(Int_t nrOfStations) { fStationCount = nrOfStations; }; + void AddZPosition(Int_t stationNumber, Double_t z, Double_t zThickness); + void AddHeight(Int_t stationNumber, Double_t height); + void AddWidth(Int_t stationNumber, Double_t width); + void AddXRes(Int_t stationNumber, Double_t xres); + void AddYRes(Int_t stationNumber, Double_t yres); + void AddZRadThickness(Int_t stationNumber, Double_t length); + void AddBeamHeight(Int_t stationNumber, Double_t beamheight); + void AddBeamWidth(Int_t stationNumber, Double_t beamwidth); /** Output to screen **/ void Print(Option_t* opt = "") const; - -protected: - Int_t fStationCount; // Number of Stations, station numbering starts at 0!!! - - std::map<Int_t, Int_t> fZPositions; // map of the z positions of all Stations - std::map<Int_t, Double_t> fThicknesses; // in cm - std::map<Int_t, Double_t> fHeights; // in cm - std::map<Int_t, Double_t> fWidths; // in cm - std::map<Int_t, Double_t> fXResolutions; // in mu m - std::map<Int_t, Double_t> fYResolutions; // in mu m - std::map<Int_t, Double_t> fRadiationLength; // in %x0 - std::map<Int_t, Double_t> fBeamHeights; // in cm - std::map<Int_t, Double_t> fBeamWidths; // in cm - - - ClassDef(CbmMvdStationPar, 1); +private: + Double_t GetParameter(const std::vector<Double_t>& parArray, Int_t iStation) const; + void SetParameterMax(std::vector<Double_t>& parArray, Int_t iStation, Double_t value); + void SetParameterMin(std::vector<Double_t>& parArray, Int_t iStation, Double_t value); + + Int_t fStationCount {-1}; // Number of Stations, station numbering starts at 0!!! + + std::vector<Double_t> fZPositions {}; // map of the z positions of all Stations + std::vector<Double_t> fZPositionMin {}; // a helper array for filling the fZPositions + std::vector<Double_t> fZPositionMax {}; // a helper array for filling the fZPositions + std::vector<Double_t> fZThicknesses {}; // in cm + std::vector<Double_t> fHeights {}; // in cm + std::vector<Double_t> fWidths {}; // in cm + std::vector<Double_t> fXResolutions {}; // in mu m + std::vector<Double_t> fYResolutions {}; // in mu m + std::vector<Double_t> fZRadThickness {}; // Z thickness [in radiation lengths] + std::vector<Double_t> fBeamHeights {}; // in cm + std::vector<Double_t> fBeamWidths {}; // in cm + + ClassDef(CbmMvdStationPar, 2); }; diff --git a/mvd/tools/CbmMvdGeoHandler.cxx b/mvd/tools/CbmMvdGeoHandler.cxx index d0171c79c31f48e45d6bbf73dc29f805dbad50a4..9f6ae9a82086b4ed3fe23c27f4ddf01e6aeea195 100644 --- a/mvd/tools/CbmMvdGeoHandler.cxx +++ b/mvd/tools/CbmMvdGeoHandler.cxx @@ -27,6 +27,7 @@ #include "TVirtualMC.h" #include <cstdlib> + using std::atoi; @@ -62,10 +63,10 @@ CbmMvdGeoHandler::CbmMvdGeoHandler() , fStationNumber(-1) , fWidth(0.) , fHeight(0.) - , fRadLength(0.) + , fZRadThickness(0.) , fBeamwidth(0.) , fBeamheight(0.) - , fThickness(0.) + , fZThickness(0.) , fXres(0.) , fYres(0.) , fStationName("") @@ -104,12 +105,11 @@ void CbmMvdGeoHandler::Init(Bool_t isSimulation) switch (fGeoTyp) { case scripted: case FourStation: - case FourStationShift: fStationPar->SetNofStations(4); break; - case ThreeStation: fStationPar->SetNofStations(3); break; - case MiniCbm: fStationPar->SetNofStations(2); break; - default: fStationPar->SetNofStations(0); + case FourStationShift: fStationPar->Init(4); break; + case ThreeStation: fStationPar->Init(3); break; + case MiniCbm: fStationPar->Init(2); break; + default: fStationPar->Init(0); } - fStationPar->Init(); } } //-------------------------------------------------------------------------- @@ -224,11 +224,13 @@ void CbmMvdGeoHandler::NavigateTo(const TString& path) local[0] = fVolumeShape->GetDX(); local[1] = fVolumeShape->GetDY(); + local[2] = fVolumeShape->GetDZ(); Double_t fGlobalMax[3]; gGeoManager->LocalToMaster(local, fGlobalMax); local[0] = -1 * fVolumeShape->GetDX(); local[1] = -1 * fVolumeShape->GetDY(); + local[2] = -1 * fVolumeShape->GetDZ(); Double_t fGlobalMin[3]; gGeoManager->LocalToMaster(local, fGlobalMin); @@ -249,14 +251,9 @@ void CbmMvdGeoHandler::NavigateTo(const TString& path) fBeamheight = fGlobalMax[1]; } - // TODO: hard coded numbers, find other way only for Mvd_v14a / v14b / v15a - if (fStationNumber == 0) fRadLength = 0.24; - else if (fStationNumber == 1) - fRadLength = 0.31; - else if (fStationNumber == 2) - fRadLength = 0.47; - else - fRadLength = 0.49; + fZThickness = fabs(fGlobalMax[2] - fGlobalMin[2]); + Double_t radLength = fCurrentVolume->GetMaterial()->GetRadLen(); + fZRadThickness = fZThickness / radLength; fXres = 3.8; // TODO: pixelSizeX / sqrt{12} fYres = 3.8; // TODO: pixelSizeY / sqrt{12} @@ -517,18 +514,15 @@ void CbmMvdGeoHandler::FillDetector() //-------------------------------------------------------------------------- void CbmMvdGeoHandler::FillParameter() { - - if (fGeoPathHash != fnodeName.Hash()) { NavigateTo(fnodeName); } - fStationPar->SetZPosition(fStationNumber, fGlobal[2]); - fStationPar->SetWidth(fStationNumber, fWidth); - fStationPar->SetHeight(fStationNumber, fHeight); - fStationPar->SetThickness(fStationNumber, fGlobal[2]); - fStationPar->SetXRes(fStationNumber, fXres); - fStationPar->SetYRes(fStationNumber, fYres); - fStationPar->SetRadLength(fStationNumber, fRadLength); - if (fBeamheight > 0) fStationPar->SetBeamHeight(fStationNumber, fBeamheight); - if (fBeamwidth > 0) fStationPar->SetBeamWidth(fStationNumber, fBeamwidth); + fStationPar->AddZPosition(fStationNumber, fGlobal[2], fZThickness); + fStationPar->AddWidth(fStationNumber, fWidth); + fStationPar->AddHeight(fStationNumber, fHeight); + fStationPar->AddXRes(fStationNumber, fXres); + fStationPar->AddYRes(fStationNumber, fYres); + fStationPar->AddZRadThickness(fStationNumber, fZRadThickness); + fStationPar->AddBeamHeight(fStationNumber, fBeamheight); + fStationPar->AddBeamWidth(fStationNumber, fBeamwidth); } //-------------------------------------------------------------------------- diff --git a/mvd/tools/CbmMvdGeoHandler.h b/mvd/tools/CbmMvdGeoHandler.h index b746a58965f56e31ddfda50bd09410763cad92a8..2d1d0b652f794849afc450762018249df70530fe 100644 --- a/mvd/tools/CbmMvdGeoHandler.h +++ b/mvd/tools/CbmMvdGeoHandler.h @@ -112,10 +112,10 @@ private: Double_t fWidth; Double_t fHeight; - Double_t fRadLength; + Double_t fZRadThickness; Double_t fBeamwidth; Double_t fBeamheight; - Double_t fThickness; + Double_t fZThickness; Double_t fXres; Double_t fYres; @@ -130,7 +130,7 @@ private: CbmMvdGeoHandler(const CbmMvdGeoHandler&); CbmMvdGeoHandler operator=(const CbmMvdGeoHandler&); - ClassDef(CbmMvdGeoHandler, 4) + ClassDef(CbmMvdGeoHandler, 5) }; #endif //CbmMvdGeoHandler_H diff --git a/reco/KF/CbmKF.cxx b/reco/KF/CbmKF.cxx index 8d8c2f8c31f72d85492104c3edca0634746ba13a..0e00c9de1c8168c4aef95461c36ab6d140231ec2 100644 --- a/reco/KF/CbmKF.cxx +++ b/reco/KF/CbmKF.cxx @@ -158,8 +158,9 @@ InitStatus CbmKF::Init() tube.ID = 1101 + ist; // tube.F = 1.; tube.z = mvdStationPar->GetZPosition(ist); - tube.dz = mvdStationPar->GetThickness(ist); - tube.RadLength = 100 * tube.dz / mvdStationPar->GetRadLength(ist); + tube.dz = mvdStationPar->GetZThickness(ist); + // TODO: verify the thickness of MVD stations + tube.RadLength = tube.dz / (10. * mvdStationPar->GetZRadThickness(ist)); tube.r = std::min(mvdStationPar->GetBeamHeight(ist), mvdStationPar->GetBeamWidth(ist)); tube.R = std::max(mvdStationPar->GetHeight(ist), mvdStationPar->GetWidth(ist)); tube.rr = tube.r * tube.r; diff --git a/reco/L1/CbmL1.cxx b/reco/L1/CbmL1.cxx index 39d49953b89573395f24f3d703d0d73fc7a76479..c944e7b45885ab1eedcab24f7461542b75f080e7 100644 --- a/reco/L1/CbmL1.cxx +++ b/reco/L1/CbmL1.cxx @@ -792,7 +792,7 @@ InitStatus CbmL1::Init() const float RMax = hStaRadLen->GetXaxis()->GetXmax(); // should be same as min algo->fRadThick[iSta].SetBins(NBins, RMax); algo->fRadThick[iSta].table.resize(NBins); - double sumRL = 0., nRL = 0.; + double sumRF = 0., nRF = 0.; for (int iB = 0; iB < NBins; iB++) { algo->fRadThick[iSta].table[iB].resize(NBins); for (int iB2 = 0; iB2 < NBins; iB2++) { @@ -805,11 +805,11 @@ InitStatus CbmL1::Init() // Correction for the incorrect harcoded value of RadThick of MVD stations if (algo->fRadThick[iSta].table[iB][iB2] < 0.0015) algo->fRadThick[iSta].table[iB][iB2] = 0.0015; // algo->fRadThick[iSta].table[iB][iB2] = algo->vStations[iSta].materialInfo.RadThick[0]; - sumRL += algo->fRadThick[iSta].table[iB][iB2]; - nRL++; + sumRF += algo->fRadThick[iSta].table[iB][iB2]; + nRF++; } } - cout << " iSta " << iSta << " average RadLength in the material map " << sumRL / nRL << endl; + cout << " iSta " << iSta << " average RadThick in the material map " << sumRF / nRF << endl; } rlFile->Close(); rlFile->Delete(); @@ -847,7 +847,7 @@ InitStatus CbmL1::Init() const float RMax = hStaRadLen->GetXaxis()->GetXmax(); // should be same as min algo->fRadThick[iSta].SetBins(NBins, RMax); algo->fRadThick[iSta].table.resize(NBins); - double sumRL = 0., nRL = 0.; + double sumRF = 0., nRF = 0.; for (int iB = 0; iB < NBins; iB++) { algo->fRadThick[iSta].table[iB].resize(NBins); for (int iB2 = 0; iB2 < NBins; iB2++) { @@ -855,11 +855,11 @@ InitStatus CbmL1::Init() if (algo->fRadThick[iSta].table[iB][iB2] < algo->vStations[iSta].materialInfo.RadThick[0]) algo->fRadThick[iSta].table[iB][iB2] = algo->vStations[iSta].materialInfo.RadThick[0]; // cout << " iSta " << iSta << " iB " << iB << "iB2 " << iB2 << " RadThick " << algo->fRadThick[iSta].table[iB][iB2] << endl; - sumRL += algo->fRadThick[iSta].table[iB][iB2]; - nRL++; + sumRF += algo->fRadThick[iSta].table[iB][iB2]; + nRF++; } } - cout << " iSta " << iSta << " average RadLength in the material map " << sumRL / nRL << endl; + cout << " iSta " << iSta << " average RadThick in the material map " << sumRF / nRF << endl; } rlFile->Close(); rlFile->Delete();