diff --git a/reco/L1/L1Algo/L1BaseStationInfo.cxx b/reco/L1/L1Algo/L1BaseStationInfo.cxx index 0bbeafbf0ecefcaa09fbc8ba97282d566097244a..5025369a6c74186189d2a5379afd0cb8fa2c5594 100644 --- a/reco/L1/L1Algo/L1BaseStationInfo.cxx +++ b/reco/L1/L1Algo/L1BaseStationInfo.cxx @@ -124,53 +124,12 @@ void L1BaseStationInfo::Print(int verbosity) const } else if (verbosity > 0) { LOG(info) << "L1BaseStationInfo object: at " << this; - LOG(info) << "- Station ID: " << fStationID; - LOG(info) << "- Detector ID: " << static_cast<int>(fDetectorID); - LOG(info) << "- L1Station fields:"; - LOG(info) << "--- Station type ID: " << fL1Station.type; - LOG(info) << "--- Time info ID: " << fL1Station.timeInfo; - LOG(info) << "--- z position: " << fL1Station.z[0]; - LOG(info) << "--- Rmin: " << fL1Station.Rmin[0]; - LOG(info) << "--- Rmax: " << fL1Station.Rmax[0]; - LOG(info) << "--- Thickness (X), cm: " << fL1Station.materialInfo.thick[0]; - LOG(info) << "--- Radiational length (X0), cm: " << fL1Station.materialInfo.RL[0]; - if (verbosity > 1) { - LOG(info) << "--- X / X0: " << fL1Station.materialInfo.RadThick[0]; - LOG(info) << "--- log(X / X0): " << fL1Station.materialInfo.logRadThick[0]; - LOG(info) << "--- Field approximation coefficients:"; - LOG(info) << " idx CX CY CZ"; - for (int idx = 0; idx < L1Parameters::kMaxNFieldApproxCoefficients; ++idx) { - LOG(info) << std::setw(9) << std::setfill(' ') << idx << ' ' << std::setw(10) << std::setfill(' ') - << fL1Station.fieldSlice.cx[idx][0] << ' ' << std::setw(10) << std::setfill(' ') - << fL1Station.fieldSlice.cy[idx][0] << ' ' << std::setw(10) << std::setfill(' ') - << fL1Station.fieldSlice.cz[idx][0]; - } - LOG(info) << "--- Strips geometry:"; - LOG(info) << "----- Front:"; - LOG(info) << "------- cos(phi): " << fL1Station.frontInfo.cos_phi[0]; - LOG(info) << "------- sin(phi): " << fL1Station.frontInfo.sin_phi[0]; - LOG(info) << "------- sigma2: " << fL1Station.frontInfo.sigma2[0]; - LOG(info) << "----- Back:"; - LOG(info) << "------- cos(phi): " << fL1Station.backInfo.cos_phi[0]; - LOG(info) << "------- sin(phi): " << fL1Station.backInfo.sin_phi[0]; - LOG(info) << "------- sigma2: " << fL1Station.backInfo.sigma2[0]; - LOG(info) << "----- XY cov matrix:"; - LOG(info) << "------- C00: " << fL1Station.XYInfo.C00[0]; - LOG(info) << "------- C10: " << fL1Station.XYInfo.C10[0]; - LOG(info) << "------- C11: " << fL1Station.XYInfo.C11[0]; - LOG(info) << "----- X layer:"; - LOG(info) << "------- cos(phi): " << fL1Station.xInfo.cos_phi[0]; - LOG(info) << "------- sin(phi): " << fL1Station.xInfo.sin_phi[0]; - LOG(info) << "------- sigma2: " << fL1Station.xInfo.sigma2[0]; - LOG(info) << "----- Y layer:"; - LOG(info) << "------- cos(phi): " << fL1Station.yInfo.cos_phi[0]; - LOG(info) << "------- sin(phi): " << fL1Station.yInfo.sin_phi[0]; - LOG(info) << "------- sigma2: " << fL1Station.yInfo.sigma2[0]; - LOG(info) << ""; - } - LOG(info) << "- Additional fields:"; - LOG(info) << "--- Xmax: " << fXmax; - LOG(info) << "--- Ymax: " << fYmax; + LOG(info) << "\tStation ID: " << fStationID; + LOG(info) << "\tDetector ID: " << static_cast<int>(fDetectorID); + fL1Station.Print(verbosity - 1); + LOG(info) << "\tAdditional fields:"; + LOG(info) << "\t\tXmax: " << fXmax; + LOG(info) << "\t\tYmax: " << fYmax; } } diff --git a/reco/L1/L1Algo/L1InitManager.cxx b/reco/L1/L1Algo/L1InitManager.cxx index d3ebf080e44c9571961ecb47d45d8ffb31fe2e81..8fa77643efebb317e95782519a30c387115d28ab 100644 --- a/reco/L1/L1Algo/L1InitManager.cxx +++ b/reco/L1/L1Algo/L1InitManager.cxx @@ -106,10 +106,10 @@ void L1InitManager::PrintCAIterations(int verbosityLevel) const void L1InitManager::PushBackCAIteration(const L1CAIteration& iteration) { // TODO: probably some checks must be inserted here - if (!fInitFlags[L1InitManager::kECAIterationsNumberCrosscheck]) { + if (!fInitFlags[L1InitManager::keCAIterationsNumberCrosscheck]) { LOG(error) << "L1InitManager::PushBackCAIteration: attempt to push back a CA track finder iteration before the " << "number of iterations was defined"; - assert((fInitFlags[L1InitManager::kECAIterationsNumberCrosscheck])); + assert((fInitFlags[L1InitManager::keCAIterationsNumberCrosscheck])); } fCAIterationsContainer.push_back(iteration); } @@ -230,7 +230,7 @@ void L1InitManager::SetStationsNumberCrosscheck(L1DetectorID detectorID, int nSt void L1InitManager::SetCAIterationsNumberCrosscheck(int nIterations) { fCAIterationsNumberCrosscheck = nIterations; - fInitFlags[L1InitManager::kECAIterationsNumberCrosscheck] = true; + fInitFlags[L1InitManager::keCAIterationsNumberCrosscheck] = true; } //----------------------------------------------------------------------------------------------------------------------- @@ -346,18 +346,18 @@ bool L1InitManager::CheckStationsInfo() bool L1InitManager::CheckCAIterations() { // Check number of iterations - if (!fInitFlags[L1InitManager::kECAIterations]) { + if (!fInitFlags[L1InitManager::keCAIterations]) { int actualIterationsNumber = fCAIterationsContainer.size(); int expectedIterationsNumber = fCAIterationsNumberCrosscheck; if (actualIterationsNumber != expectedIterationsNumber) { LOG(warn) << "L1InitManager::CheckCAIterations: incorrect number of iterations registered: " << actualIterationsNumber << " of " << expectedIterationsNumber << " expected"; - fInitFlags[L1InitManager::kECAIterations] = false; + fInitFlags[L1InitManager::keCAIterations] = false; } else { - fInitFlags[L1InitManager::kECAIterations] = true; + fInitFlags[L1InitManager::keCAIterations] = true; } } - return fInitFlags[L1InitManager::kECAIterations]; + return fInitFlags[L1InitManager::keCAIterations]; } diff --git a/reco/L1/L1Algo/L1Station.cxx b/reco/L1/L1Algo/L1Station.cxx index 9339317413a0d20422cd4d7cfa3f30b44bdea822..b37b25a276acfa47fb3fcd757461747ebf9ce515 100644 --- a/reco/L1/L1Algo/L1Station.cxx +++ b/reco/L1/L1Algo/L1Station.cxx @@ -9,44 +9,49 @@ #include <iomanip> // TODO: Improve log style (S.Zh.) -void L1Station::Print() const +void L1Station::Print(int verbosity) const { - LOG(info) << "==== L1Station object at " << this; - LOG(info) << "- L1Station fields:"; - LOG(info) << "--- Station type ID: " << type; - LOG(info) << "--- z position: " << z[0]; - LOG(info) << "--- Rmin: " << Rmin[0]; - LOG(info) << "--- Rmax: " << Rmax[0]; - LOG(info) << "--- Thickness (X), cm: " << materialInfo.thick[0]; - LOG(info) << "--- Radiational length (X0), cm: " << materialInfo.RL[0]; - LOG(info) << "--- X / X0: " << materialInfo.RadThick[0]; - LOG(info) << "--- log(X / X0): " << materialInfo.logRadThick[0]; - LOG(info) << "--- Field approximation coefficients:"; - LOG(info) << " idx CX CY CZ"; - for (int idx = 0; idx < 21; ++idx) { - LOG(info) << std::setw(9) << std::setfill(' ') << idx << ' ' << std::setw(10) << std::setfill(' ') - << fieldSlice.cx[idx][0] << ' ' << std::setw(10) << std::setfill(' ') << fieldSlice.cy[idx][0] << ' ' - << std::setw(10) << std::setfill(' ') << fieldSlice.cz[idx][0]; + // TODO: Probably, it would be nice to use constexpr char indent (S.Zh.) + LOG(info) << "\tL1Station object at " << this; + LOG(info) << "\t\tStation type ID: " << fL1Station.type; + LOG(info) << "\t\tTime info ID: " << fL1Station.timeInfo; + LOG(info) << "\t\tz position: " << fL1Station.z[0]; + LOG(info) << "\t\tRmin: " << fL1Station.Rmin[0]; + LOG(info) << "\t\tRmax: " << fL1Station.Rmax[0]; + // TODO: Insert correct units (S.Zh.) + LOG(info) << "\t\tThickness (X) : " << fL1Station.materialInfo.thick[0]; + LOG(info) << "\t\tRadiational length (X0): " << fL1Station.materialInfo.RL[0]; + if (verbosity > 0) { + LOG(info) << "\t\tX / X0: " << fL1Station.materialInfo.RadThick[0]; + LOG(info) << "\t\tlog(X / X0): " << fL1Station.materialInfo.logRadThick[0]; + LOG(info) << "\t\tField approximation coefficients:"; + LOG(info) << " idx CX CY CZ"; + for (int idx = 0; idx < L1Parameters::kMaxNFieldApproxCoefficients; ++idx) { + LOG(info) << std::setw(9) << std::setfill(' ') << idx << ' ' << std::setw(10) << std::setfill(' ') + << fL1Station.fieldSlice.cx[idx][0] << ' ' << std::setw(10) << std::setfill(' ') + << fL1Station.fieldSlice.cy[idx][0] << ' ' << std::setw(10) << std::setfill(' ') + << fL1Station.fieldSlice.cz[idx][0]; + } + LOG(info) << "\t\tStrips geometry:"; + LOG(info) << "\t\t\tFront:"; + LOG(info) << "\t\t\t\tcos(phi): " << fL1Station.frontInfo.cos_phi[0]; + LOG(info) << "\t\t\t\tsin(phi): " << fL1Station.frontInfo.sin_phi[0]; + LOG(info) << "\t\t\t\tsigma2: " << fL1Station.frontInfo.sigma2[0]; + LOG(info) << "\t\t\tBack:"; + LOG(info) << "\t\t\t\tcos(phi): " << fL1Station.backInfo.cos_phi[0]; + LOG(info) << "\t\t\t\tsin(phi): " << fL1Station.backInfo.sin_phi[0]; + LOG(info) << "\t\t\t\tsigma2: " << fL1Station.backInfo.sigma2[0]; + LOG(info) << "\t\t\tXY cov matrix:"; + LOG(info) << "\t\t\t\tC00: " << fL1Station.XYInfo.C00[0]; + LOG(info) << "\t\t\t\tC10: " << fL1Station.XYInfo.C10[0]; + LOG(info) << "\t\t\t\tC11: " << fL1Station.XYInfo.C11[0]; + LOG(info) << "\t\t\tX layer:"; + LOG(info) << "\t\t\t\tcos(phi): " << fL1Station.xInfo.cos_phi[0]; + LOG(info) << "\t\t\t\tsin(phi): " << fL1Station.xInfo.sin_phi[0]; + LOG(info) << "\t\t\t\tsigma2: " << fL1Station.xInfo.sigma2[0]; + LOG(info) << "\t\t\tY layer:"; + LOG(info) << "\t\t\t\tcos(phi): " << fL1Station.yInfo.cos_phi[0]; + LOG(info) << "\t\t\t\tsin(phi): " << fL1Station.yInfo.sin_phi[0]; + LOG(info) << "\t\t\t\tsigma2: " << fL1Station.yInfo.sigma2[0]; } - LOG(info) << "--- Strips geometry:"; - LOG(info) << "----- Front:"; - LOG(info) << "------- cos(phi): " << frontInfo.cos_phi[0]; - LOG(info) << "------- sin(phi): " << frontInfo.sin_phi[0]; - LOG(info) << "------- sigma2: " << frontInfo.sigma2[0]; - LOG(info) << "----- Back:"; - LOG(info) << "------- cos(phi): " << backInfo.cos_phi[0]; - LOG(info) << "------- sin(phi): " << backInfo.sin_phi[0]; - LOG(info) << "------- sigma2: " << backInfo.sigma2[0]; - LOG(info) << "----- XY cov matrix:"; - LOG(info) << "------- C00: " << XYInfo.C00[0]; - LOG(info) << "------- C10: " << XYInfo.C10[0]; - LOG(info) << "------- C11: " << XYInfo.C11[0]; - LOG(info) << "----- X layer:"; - LOG(info) << "------- cos(phi): " << xInfo.cos_phi[0]; - LOG(info) << "------- sin(phi): " << xInfo.sin_phi[0]; - LOG(info) << "------- sigma2: " << xInfo.sigma2[0]; - LOG(info) << "----- Y layer:"; - LOG(info) << "------- cos(phi): " << yInfo.cos_phi[0]; - LOG(info) << "------- sin(phi): " << yInfo.sin_phi[0]; - LOG(info) << "------- sigma2: " << yInfo.sigma2[0]; } diff --git a/reco/L1/L1Algo/L1Station.h b/reco/L1/L1Algo/L1Station.h index eb8acd6b826eeba776f2aa829311911e70db266b..74c2e790171ee051b8ec5603b0766420523f701a 100644 --- a/reco/L1/L1Algo/L1Station.h +++ b/reco/L1/L1Algo/L1Station.h @@ -34,7 +34,7 @@ public: L1XYMeasurementInfo XYInfo {}; /// Prints object fields - void Print() const; + void Print(int verbosity = 0) const; } _fvecalignment;