27#include "GaudiKernel/ITHistSvc.h"
35 declareInterface<Trk::ILayerMaterialAnalyser>(
this);
84 SmartIF<ITHistSvc> tHistSvc{service(
"THistSvc")};
86 ATH_MSG_ERROR(
"initialize() Could not find Hist Service -> Switching ValidationMode Off !" );
88 return StatusCode::SUCCESS;
91 ATH_MSG_ERROR(
"initialize() Could not register the validation Tree -> Switching ValidationMode Off !" );
93 return StatusCode::SUCCESS;
96 return StatusCode::SUCCESS;
114 return StatusCode::SUCCESS;
124 if (!lMaterial)
return StatusCode::SUCCESS;
136 ATH_MSG_DEBUG(
"Recieved BinnedLayerMaterial - analyzing it." );
142 size_t mBins0 = bUtility ? bUtility->
max(0)+1 : 1;
143 size_t mBins1 = bUtility ? bUtility->
max(1)+1 : 1;
146 for (
size_t ibin1 = 0; ibin1 < mBins1; ++ ibin1){
147 for (
size_t ibin0 = 0; ibin0 < mBins0; ++ibin0)
148 mpMatrix[ibin1][ibin0] = lMaterial.
material(ibin0, ibin1);
151 return analyse(layer, mpMatrix);
157 ATH_MSG_DEBUG(
"Recieved MaterialPropertyMatrix - analyzing it." );
158 return analyse(layer, mpMatrix);
164 ATH_MSG_DEBUG(
"Recieved LayerMaterialRecord - analyzing it." );
170 const std::vector< std::vector< unsigned int > >* bCounter )
const
175 const Trk::Surface& lSurface = layer.surfaceRepresentation();
215 for (
const auto & outerIter : mpMatrix){
217 for (
const auto & innerIter : outerIter ){
252 return StatusCode::SUCCESS;
#define AmgMatrix(rows, cols)
A generic symmetric BinUtility, for fully symmetric binning in terms of binning grid and binning type...
size_t max(size_t ba=0) const
First bin maximal value.
It extends the LayerMaterialProperties base class.
const MaterialPropertiesMatrix & fullMaterial() const
Return method for full material description of the Layer - for all bins.
Bounds for a cylindrical Surface.
virtual double r() const override final
This method returns the radius.
double halflengthZ() const
This method returns the halflengthZ.
Class to describe the bounds for a planar DiscSurface.
std::vector< int > * m_bin0
bin 0
std::vector< float > * m_Rho
gathered rho from material mapping/material properties
float m_layerDimension1
dimension 1 : cylinder z, disk r_max
LayerMaterialAnalyser(const std::string &, const std::string &, const IInterface *)
Constructor.
std::vector< int > * m_binCounter
how often was this bin hit / used
StatusCode analyse(const Layer &lay, const MaterialPropertiesMatrix &lmr, const std::vector< std::vector< unsigned int > > *bCounter=0) const
std::vector< float > * m_thickness
gathered thickness from material mapping/material properties
Gaudi::Property< std::string > m_validationTreeFolder
std::vector< float > * m_layerTranslation
center of the transform
std::vector< int > * m_bin1
bin 1
int m_layerIndex
the layer index given by the TrackingGeometry
std::vector< float > * m_A
gathered A from material mapping/material properties
std::vector< float > * m_X0
gathered X0 from material mapping/material properties
std::vector< float > * m_Z
gathered Z from material mapping/material properties
StatusCode analyseLayerMaterial(const Layer &lay) const
process the layer - after material creation and loading
float m_layerDimension0
dimension 0 : cylinder r, disk r_min
int m_layerBins1
total number of bins - loc 0
TTree * m_validationTree
The validation tree.
Gaudi::Property< std::string > m_validationTreeDescription
int m_layerBins
total number of bins - loc0 * loc 1
int m_layerType
the type of the layer 1 - cylinder, 2 - disk
std::vector< float > * m_layerRotation
orientation of the layer
Gaudi::Property< std::string > m_validationTreeName
std::vector< int > * m_elements
gathered number of elements from material mapping/material properties
StatusCode initialize()
AlgTool initialize method.
StatusCode finalize()
AlgTool finalize method.
std::vector< float > * m_L0
gathered L0 from material mapping/material properties
int m_layerBins0
total number of bins - loc 0
This virtual base class encapsulates the logics to build pre/post/full update material for Layer stru...
virtual const BinUtility * binUtility() const =0
Return the BinUtility.
virtual const MaterialProperties * material(size_t ib0, size_t ib1) const =0
Direct access via bins to the MaterialProperties.
Helper Class to record the material during the GeantinoNtupleMappingProcess.
const std::vector< std::vector< unsigned int > > & binCounts() const
return method for the events used for this
const MaterialPropertiesMatrix & associatedLayerMaterial() const
return method for the LayerMaterial
Base Class for a Detector Layer in the Tracking realm.
Material with information about thickness of material.
float averageRho() const
Return the average density of the material.
float averageA() const
Return the average A of the material [gram/mole].
float averageZ() const
Returns the average Z of the material.
const Material & material() const
Return the stored Material.
float l0() const
Return the nuclear interaction length.
float x0() const
Return the radiation length.
float thickness() const
Return the thickness in mm.
MaterialComposition * composition
Abstract Base Class for tracking surfaces.
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
virtual constexpr SurfaceType type() const =0
Returns the Surface type to avoid dynamic casts.
virtual const SurfaceBounds & bounds() const =0
Surface Bounds method.
const Amg::Vector3D & center() const
Returns the center position of the Surface.
std::vector< std::vector< const MaterialProperties * > > MaterialPropertiesMatrix