24#include "GaudiKernel/ITHistSvc.h"
38 return StatusCode::SUCCESS;
45 TString folderId = tvol ? tvol->
volumeName() : std::string(
"Unknown");
47 folderName.ReplaceAll(
"::",
"_");
55 if (!lMaterial)
return StatusCode::SUCCESS;
64 float centerX = lCenter.x();
65 float centerY = lCenter.y();
66 float centerZ = lCenter.z();
89 bins0 = lBinUtility ? lBinUtility->
max(0)+1 : 1;
90 bins1 = lBinUtility ? lBinUtility->
max(1)+1 : 1;
95 TString hName = ( lType == 1 ) ?
"CylinderLayer_" :
"DiscLayer_";
99 TString info =
"_Information";
101 TH2F* lMaterialHist = lType == 1 ?
102 new TH2F(hName+pXo, hName, bins0, -
M_PI*dim0,
M_PI*dim0, bins1, -dim1, dim1) :
103 new TH2F(hName+pXo, hName, bins0, dim0, dim1, bins1, -
M_PI,
M_PI);
105 TTree* lTreeInformation =
new TTree(hName+info,hName);
106 lTreeInformation->Branch(
"LayerCenterX", ¢erX,
"cX/F");
107 lTreeInformation->Branch(
"LayerCenterY", ¢erY,
"cY/F");
108 lTreeInformation->Branch(
"LayerCenterZ", ¢erZ,
"cZ/F");
109 lTreeInformation->Branch(
"LayerIndex", &lIndex,
"idx/I");
111 lTreeInformation->Branch(
"Radius", &dim0,
"r/F");
112 lTreeInformation->Branch(
"HalflengthZ", &dim1,
"hz/F");
113 lTreeInformation->Branch(
"BinsRPhi", &bins0,
"bin0/I");
114 lTreeInformation->Branch(
"BinsHalfZ", &bins1,
"bin1/I");
115 }
else if (lType == 2){
116 lTreeInformation->Branch(
"InnerRadius", &dim0,
"rmin/F");
117 lTreeInformation->Branch(
"OuterRadius", &dim1,
"rmax/F");
118 lTreeInformation->Branch(
"BinsR", &bins0,
"bin0/I");
119 lTreeInformation->Branch(
"BinsPhi", &bins1,
"bin1/I");
123 TString regHistName = folderName+
"/"+hName+
"/"+hName+pXo;
124 TString regTreeName = folderName+
"/"+hName+
"/"+hName+info;
126 SmartIF<ITHistSvc> tHistSvc{service(
"THistSvc")};
129 if ( (tHistSvc->regTree(std::string(regTreeName.Data()),lTreeInformation)).isFailure() ){
132 lTreeInformation->Fill();
134 if ( (tHistSvc->regHist(std::string(regHistName.Data()),lMaterialHist)).isFailure() ){
140 for (
int ib0 = 0; ib0 < bins0; ++ib0 )
141 for (
int ib1 = 0; ib1 < bins1; ++ib1 ){
145 lMaterialHist->SetBinContent(ib0+1,ib1+1,mps->
thicknessInX0());
149 return StatusCode::SUCCESS;
154 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
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.
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.
int value() const
layerIndex expressed in an integer
virtual ~LayerMaterialInspector()
Destructor.
virtual StatusCode processNode(const TrackingVolume &tvol, size_t level=0) const
Processor Action to work on TrackingVolumes - the level is for the hierachy tree.
LayerMaterialInspector(const std::string &, const std::string &, const IInterface *)
Constructor.
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.
Base Class for a Detector Layer in the Tracking realm.
virtual const Surface & surfaceRepresentation() const =0
Transforms the layer into a Surface representation for extrapolation.
const LayerMaterialProperties * layerMaterialProperties() const
getting the LayerMaterialProperties including full/pre/post update
const LayerIndex & layerIndex() const
get the layerIndex
const TrackingVolume * enclosingTrackingVolume() const
get the confining TrackingVolume
Material with information about thickness of material.
float thicknessInX0() const
Return the radiationlength fraction.
RecursiveGeometryProcessor(const std::string &, const std::string &, const IInterface *)
Constructor.
Abstract Base Class for tracking surfaces.
virtual constexpr SurfaceType type() const =0
Returns the Surface type to avoid dynamic casts.
const Amg::Vector3D & center() const
Returns the center position of the Surface.
Full Volume description used in Tracking, it inherits from Volume to get the geometrical structure,...
const std::string & volumeName() const
Returns the VolumeName - for debug reason, might be depreciated later.
Eigen::Matrix< double, 3, 1 > Vector3D
Ensure that the ATLAS eigen extensions are properly loaded.