File tree Expand file tree Collapse file tree 4 files changed +14
-5
lines changed
DataFormats/Detectors/Common
include/DetectorsCommonDataFormats Expand file tree Collapse file tree 4 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ class AlignParam
5555 double getZ () const { return mZ ; }
5656
5757 // / apply object to geoemetry
58- bool applyToGeometry () const ;
58+ bool applyToGeometry (bool print = false ) const ;
5959
6060 // / extract global delta matrix
6161 TGeoHMatrix createMatrix () const ;
Original file line number Diff line number Diff line change 1212// / \file AlignParam.cxx
1313// / \brief Implementation of the base alignment parameters class
1414
15- #include < fairlogger/Logger.h>
1615#include < TGeoManager.h>
1716#include < TGeoMatrix.h>
1817#include < TGeoOverlap.h>
1918#include < TGeoPhysicalNode.h>
2019
20+ #include " Framework/Logger.h"
2121#include " DetectorsCommonDataFormats/AlignParam.h"
2222
2323using namespace o2 ::detectors;
@@ -261,7 +261,7 @@ bool AlignParam::createLocalMatrix(TGeoHMatrix& m) const
261261}
262262
263263// _____________________________________________________________________________
264- bool AlignParam::applyToGeometry () const
264+ bool AlignParam::applyToGeometry (bool print ) const
265265{
266266 // / Apply the current alignment object to the TGeo geometry
267267 // / This method returns FALSE if the symname of the object was not
@@ -311,10 +311,16 @@ bool AlignParam::applyToGeometry() const
311311 TGeoHMatrix* g = node->GetMatrix (node->GetLevel () - 1 );
312312 align->MultiplyLeft (node->GetMatrix (node->GetLevel () - 1 )->Inverse ());
313313 }
314- LOG (debug) << " Aligning volume " << symname;
315314
316315 node->Align (align);
317316
317+ if (print) {
318+ LOGP (info, " {:*^100}" , symname);
319+ this ->print ();
320+ align->Print ();
321+ node->Print ();
322+ }
323+
318324 return true ;
319325}
320326
Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ struct GeometryManagerParam : public o2::conf::ConfigurableParamHelper<GeometryM
2323 bool usePwGeoBVH = false ;
2424 bool usePwCaching = false ;
2525
26+ bool verbose = false ;
27+
2628 O2ParamDef (GeometryManagerParam, " GeometryManagerParam" );
2729};
2830
Original file line number Diff line number Diff line change 2424#include < numeric>
2525
2626#include " DetectorsBase/GeometryManager.h"
27+ #include " DetectorsBase/GeometryManagerParam.h"
2728#include " DetectorsCommonDataFormats/AlignParam.h"
2829#include " CommonUtils/NameConf.h"
2930#include " DetectorsBase/Aligner.h"
@@ -256,7 +257,7 @@ bool GeometryManager::applyAlignment(const std::vector<o2::detectors::AlignParam
256257
257258 bool res = true ;
258259 for (int i = 0 ; i < nvols; i++) {
259- if (!algPars[ord[i]].applyToGeometry ()) {
260+ if (!algPars[ord[i]].applyToGeometry (GeometryManagerParam::Instance (). verbose )) {
260261 res = false ;
261262 LOG (error) << " Error applying alignment object for volume" << algPars[ord[i]].getSymName ();
262263 }
You can’t perform that action at this time.
0 commit comments