36 std::string folderId = tvol ? tvol->
volumeName() : std::string(
"Unknown");
38 folderName.ReplaceAll(
"::",
"_");
46 if (!lMaterial)
return StatusCode::SUCCESS;
55 float centerX = lCenter.x();
56 float centerY = lCenter.y();
57 float centerZ = lCenter.z();
80 bins0 = lBinUtility ? lBinUtility->
max(0)+1 : 1;
81 bins1 = lBinUtility ? lBinUtility->
max(1)+1 : 1;
86 TString hName = ( lType == 1 ) ?
"CylinderLayer_" :
"DiscLayer_";
90 TString info =
"_Information";
92 TH2F* lMaterialHist = lType == 1 ?
93 new TH2F(hName+pXo, hName, bins0, -
M_PI*dim0,
M_PI*dim0, bins1, -dim1, dim1) :
94 new TH2F(hName+pXo, hName, bins0, dim0, dim1, bins1, -
M_PI,
M_PI);
96 TTree* lTreeInformation =
new TTree(hName+info,hName);
97 lTreeInformation->Branch(
"LayerCenterX", ¢erX,
"cX/F");
98 lTreeInformation->Branch(
"LayerCenterY", ¢erY,
"cY/F");
99 lTreeInformation->Branch(
"LayerCenterZ", ¢erZ,
"cZ/F");
100 lTreeInformation->Branch(
"LayerIndex", &lIndex,
"idx/I");
102 lTreeInformation->Branch(
"Radius", &dim0,
"r/F");
103 lTreeInformation->Branch(
"HalflengthZ", &dim1,
"hz/F");
104 lTreeInformation->Branch(
"BinsRPhi", &bins0,
"bin0/I");
105 lTreeInformation->Branch(
"BinsHalfZ", &bins1,
"bin1/I");
106 }
else if (lType == 2){
107 lTreeInformation->Branch(
"InnerRadius", &dim0,
"rmin/F");
108 lTreeInformation->Branch(
"OuterRadius", &dim1,
"rmax/F");
109 lTreeInformation->Branch(
"BinsR", &bins0,
"bin0/I");
110 lTreeInformation->Branch(
"BinsPhi", &bins1,
"bin1/I");
114 TString regHistName = folderName+
"/"+hName+
"/"+hName+pXo;
115 TString regTreeName = folderName+
"/"+hName+
"/"+hName+info;
117 SmartIF<ITHistSvc> tHistSvc{service(
"THistSvc")};
120 if ( (tHistSvc->regTree(std::string(regTreeName.Data()),lTreeInformation)).isFailure() ){
123 lTreeInformation->Fill();
125 if ( (tHistSvc->regHist(std::string(regHistName.Data()),lMaterialHist)).isFailure() ){
131 for (
int ib0 = 0; ib0 < bins0; ++ib0 )
132 for (
int ib1 = 0; ib1 < bins1; ++ib1 ){
136 lMaterialHist->SetBinContent(ib0+1,ib1+1,mps->
thicknessInX0());
140 return StatusCode::SUCCESS;