![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
24 #include "GaudiKernel/ITHistSvc.h"
38 return StatusCode::SUCCESS;
45 TString folderId = tvol ? tvol->
volumeName() : std::string(
"Unknown");
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;
126 ITHistSvc* tHistSvc =
nullptr;
127 if (service(
"THistSvc",tHistSvc).isFailure()) {
128 ATH_MSG_FATAL(
"initialize() Could not find Hist Service! Aborting." );
129 return StatusCode::FAILURE;
132 if ( (tHistSvc->regTree(std::string(regTreeName.Data()),lTreeInformation)).isFailure() ){
135 lTreeInformation->Fill();
137 if ( (tHistSvc->regHist(std::string(regHistName.Data()),lMaterialHist)).isFailure() ){
143 for (
int ib0 = 0; ib0 < bins0; ++ib0 )
144 for (
int ib1 = 0; ib1 < bins1; ++ib1 ){
152 return StatusCode::SUCCESS;
157 return StatusCode::SUCCESS;
size_t max(size_t ba=0) const
First bin maximal value.
float thicknessInX0() const
Return the radiationlength fraction.
virtual const MaterialProperties * material(size_t ib0, size_t ib1) const =0
Direct access via bins to the MaterialProperties.
const Amg::Vector3D & center() const
Returns the center position of the Surface.
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
virtual const Surface & surfaceRepresentation() const =0
Transforms the layer into a Surface representation for extrapolation.
::StatusCode StatusCode
StatusCode definition for legacy code.
LayerMaterialInspector(const std::string &, const std::string &, const IInterface *)
Constructor.
int value() const
layerIndex expressed in an integer
virtual const BinUtility * binUtility() const =0
Return the BinUtility.
void SetBinContent(int, double)
Ensure that the ATLAS eigen extensions are properly loaded.
const std::string & volumeName() const
Returns the VolumeName - for debug reason, might be depreciated later.
virtual const SurfaceBounds & bounds() const =0
Surface Bounds method.
virtual ~LayerMaterialInspector()
Destructor.
Eigen::Matrix< double, 3, 1 > Vector3D
#define ATH_MSG_WARNING(x)
const TrackingVolume * enclosingTrackingVolume() const
get the confining TrackingVolume
const LayerMaterialProperties * layerMaterialProperties() const
getting the LayerMaterialProperties including full/pre/post update
virtual StatusCode processNode(const TrackingVolume &tvol, size_t level=0) const
Processor Action to work on TrackingVolumes - the level is for the hierachy tree.
constexpr virtual SurfaceType type() const =0
Returns the Surface type to avoid dynamic casts.
double halflengthZ() const
This method returns the halflengthZ.
virtual double r() const override final
This method returns the radius.
const LayerIndex & layerIndex() const
get the layerIndex