27#include "GaudiKernel/ITHistSvc.h"
60 declareInterface<Trk::ILayerMaterialAnalyser>(
this);
117 SmartIF<ITHistSvc> tHistSvc{service(
"THistSvc")};
119 ATH_MSG_ERROR(
"initialize() Could not find Hist Service -> Switching ValidationMode Off !" );
121 return StatusCode::SUCCESS;
124 ATH_MSG_ERROR(
"initialize() Could not register the validation Tree -> Switching ValidationMode Off !" );
126 return StatusCode::SUCCESS;
129 return StatusCode::SUCCESS;
147 return StatusCode::SUCCESS;
157 if (!lMaterial)
return StatusCode::SUCCESS;
169 ATH_MSG_DEBUG(
"Recieved BinnedLayerMaterial - analyzing it." );
175 size_t mBins0 = bUtility ? bUtility->
max(0)+1 : 1;
176 size_t mBins1 = bUtility ? bUtility->
max(1)+1 : 1;
179 for (
size_t ibin1 = 0; ibin1 < mBins1; ++ ibin1){
180 for (
size_t ibin0 = 0; ibin0 < mBins0; ++ibin0)
181 mpMatrix[ibin1][ibin0] = lMaterial.
material(ibin0, ibin1);
184 return analyse(layer, mpMatrix);
190 ATH_MSG_DEBUG(
"Recieved MaterialPropertyMatrix - analyzing it." );
191 return analyse(layer, mpMatrix);
197 ATH_MSG_DEBUG(
"Recieved LayerMaterialRecord - analyzing it." );
203 const std::vector< std::vector< unsigned int > >* bCounter )
const
208 const Trk::Surface& lSurface = layer.surfaceRepresentation();
248 for (
const auto & outerIter : mpMatrix){
250 for (
const auto & innerIter : outerIter ){
285 return StatusCode::SUCCESS;
#define AmgMatrix(rows, cols)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
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::string m_layerMaterialName
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
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::string m_validationTreeDescription
validation tree description - second argument in TTree
std::vector< float > * m_X0
gathered X0 from material mapping/material properties
std::vector< float > * m_Z
gathered Z from material mapping/material properties
std::string m_validationTreeName
validation tree name - to be accessed by this from root
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.
std::string m_validationTreeFolder
stream/folder to for the TTree to be written out
~LayerMaterialAnalyser()
Destructor.
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
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