20#include "GaudiKernel/ITHistSvc.h"
25 ATH_MSG_INFO(
"Test statistics output ---------------------- (start) -------------");
26 for (
size_t it = 0; it <
m_surfaces.size(); ++it){
29 ATH_MSG_INFO(
" -> Result [ attempts / successful (percentage)] : "
34 ATH_MSG_INFO(
"Test statistics output ----------------------- (end) --------------");
42 ATH_MSG_FATAL(
"Could not retrieve surface builder. Aborting.");
43 return StatusCode::FAILURE;
46 return StatusCode::SUCCESS;
73 TString treeName =
"IntersectionTest_Event";
75 TTree* currentTree =
new TTree(treeName.Data(),
"Intersection");
77 TTree* currentInfoTree =
new TTree(treeName.Data(),
"Surface Information");
79 SmartIF<ITHistSvc> tHistSvc;
81 ATH_MSG_FATAL(
"initialize() Could not find Hist Service! Aborting." );
82 return StatusCode::FAILURE;
85 TString fullTreeName =
m_treeFolder+
"Intersection_Event";
87 fullTreeName +=
"_Number";
89 fullTreeName +=
"_"+sf->name();
91 if (
m_writeTTree && tHistSvc->regTree(fullTreeName.Data(), currentTree).isFailure()) {
92 ATH_MSG_ERROR(
"initialize() Could not register the validation Tree! Aborting." );
94 return StatusCode::FAILURE;
97 TString fullInfoTreeName =
m_treeFolder+
"SurfaceInfo_Event";
99 fullInfoTreeName +=
"_Number";
100 fullInfoTreeName += it;
101 fullInfoTreeName +=
"_"+sf->name();
102 if (
m_writeTTree && tHistSvc->regTree(fullInfoTreeName.Data(), currentInfoTree).isFailure()) {
103 ATH_MSG_ERROR(
"initialize() Could not register the validation Tree! Aborting." );
104 delete currentInfoTree;
105 return StatusCode::FAILURE;
111 surfaceBranch.
fill(*sf);
114 intersectionBranch.
initForWrite(*currentTree,
"Intersection_",3);
153 return StatusCode::SUCCESS;
bool isValid() const
Test to see if the link can be dereferenced.
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_VERBOSE(x,...)
#define ATH_MSG_INFO(x,...)
#define ATH_MSG_FATAL(x,...)
Gaudi::Property< bool > m_writeTTree
StatusCode initializeTest()
initialize the test, i.e.
std::vector< bool > m_surfaceNamesSet
ToolHandle< ISurfaceBuilder > m_surfaceBuilder
std::vector< size_t > m_surfaceAttempts
std::vector< size_t > m_surfaceSuccessful
std::vector< size_t > m_surfaces
Gaudi::Property< size_t > m_testsPerSurface
std::vector< std::string > m_surfaceNames
Abstract Base Class for tracking surfaces.
StatusCode finalize()
standard Athena-Algorithm method
Rndm::Numbers * m_gaussDist
Random Number setup.
Gaudi::Property< size_t > m_numTests
number of tests
std::vector< std::string > intersection(std::vector< std::string > &v1, std::vector< std::string > &v2)
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Eigen::Matrix< double, 3, 1 > Vector3D
SurfaceType
This enumerator simplifies the persistency & calculations,.
const Amg::Vector3D & direction() const
Method to retrieve the direction at the Intersection.
This class provides a simple interface to write Surfaces to a root tree.
void initForWrite(TTree &tree, std::string_view prefix="")
initialize class for writing
void fill(const Trk::Surface &surface)
fill a vector
This class provides a simple interface to write Vectors to a root tree The size of the vectors cannot...
bool initForWrite(TTree &tree, std::string_view varname, int nrow, std::string_view prefix="")
initialize class for writing
bool fill(const Amg::VectorX &matrix)
fill a vector