20#include "GaudiKernel/ITHistSvc.h"
43 ATH_MSG_INFO(
"Test statistics output ---------------------- (start) -------------");
44 for (
size_t it = 0; it <
m_surfaces.size(); ++it){
47 ATH_MSG_INFO(
" -> Result [ attempts / successful (percentage)] : "
52 ATH_MSG_INFO(
"Test statistics output ----------------------- (end) --------------");
60 ATH_MSG_FATAL(
"Could not retrieve surface builder. Aborting.");
61 return StatusCode::FAILURE;
64 return StatusCode::SUCCESS;
91 TString treeName =
"IntersectionTest_Event";
93 TTree* currentTree =
new TTree(treeName.Data(),
"Intersection");
95 TTree* currentInfoTree =
new TTree(treeName.Data(),
"Surface Information");
97 SmartIF<ITHistSvc> tHistSvc;
99 ATH_MSG_FATAL(
"initialize() Could not find Hist Service! Aborting." );
100 return StatusCode::FAILURE;
103 TString fullTreeName =
m_treeFolder+
"Intersection_Event";
105 fullTreeName +=
"_Number";
107 fullTreeName +=
"_"+sf->name();
109 if (
m_writeTTree && tHistSvc->regTree(fullTreeName.Data(), currentTree).isFailure()) {
110 ATH_MSG_ERROR(
"initialize() Could not register the validation Tree! Aborting." );
112 return StatusCode::FAILURE;
115 TString fullInfoTreeName =
m_treeFolder+
"SurfaceInfo_Event";
117 fullInfoTreeName +=
"_Number";
118 fullInfoTreeName += it;
119 fullInfoTreeName +=
"_"+sf->name();
120 if (
m_writeTTree && tHistSvc->regTree(fullInfoTreeName.Data(), currentInfoTree).isFailure()) {
121 ATH_MSG_ERROR(
"initialize() Could not register the validation Tree! Aborting." );
122 delete currentInfoTree;
123 return StatusCode::FAILURE;
129 surfaceBranch.
fill(*sf);
132 intersectionBranch.
initForWrite(*currentTree,
"Intersection_",3);
147 direction = direction.normalized();
171 return StatusCode::SUCCESS;
#define ATH_MSG_VERBOSE(x)
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
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
SurfaceIntersectionTest(const std::string &name, ISvcLocator *pSvcLocator)
Standard Athena-Algorithm Constructor.
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.
TrkDetDescrUnitTestBase(const std::string &name, ISvcLocator *pSvcLocator)
Standard Athena-Algorithm Constructor.
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
Ensure that the ATLAS eigen extensions are properly loaded.
SurfaceType
This enumerator simplifies the persistency & calculations,.
This class provides a simple interface to write Surfaces to a root tree.
void initForWrite(TTree &tree, const std::string &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, const std::string &varname, int nrow, const std::string &prefix="")
initialize class for writing
bool fill(const Amg::VectorX &matrix)
fill a vector