From 36c916f4a86e4b01f87ae64b50536d0d9c2d09d1 Mon Sep 17 00:00:00 2001 From: Sunanda Date: Thu, 8 Apr 2021 23:00:14 +0200 Subject: [PATCH] Code check --- .../HGCalCommonData/plugins/DDHGCalCell.cc | 1 - .../plugins/DDHGCalEEFileAlgo.cc | 5 ++++- .../HGCalCommonData/plugins/DDHGCalWafer8.cc | 6 ++++-- .../plugins/dd4hep/DDHGCalCell.cc | 4 ++-- .../plugins/dd4hep/DDHGCalHEFileAlgo.cc | 18 +++++++++++++----- 5 files changed, 23 insertions(+), 11 deletions(-) diff --git a/Geometry/HGCalCommonData/plugins/DDHGCalCell.cc b/Geometry/HGCalCommonData/plugins/DDHGCalCell.cc index 8599981d66eaa..eecd077e2388c 100644 --- a/Geometry/HGCalCommonData/plugins/DDHGCalCell.cc +++ b/Geometry/HGCalCommonData/plugins/DDHGCalCell.cc @@ -88,7 +88,6 @@ void DDHGCalCell::initialize(const DDNumericArguments& nArgs, } void DDHGCalCell::execute(DDCompactView& cpv) { - DDName matName(DDSplit(material_).first, DDSplit(material_).second); DDMaterial matter(matName); #ifdef EDM_ML_DEBUG diff --git a/Geometry/HGCalCommonData/plugins/DDHGCalEEFileAlgo.cc b/Geometry/HGCalCommonData/plugins/DDHGCalEEFileAlgo.cc index ee8ac7be96728..ea365dde75317 100644 --- a/Geometry/HGCalCommonData/plugins/DDHGCalEEFileAlgo.cc +++ b/Geometry/HGCalCommonData/plugins/DDHGCalEEFileAlgo.cc @@ -286,7 +286,10 @@ void DDHGCalEEFileAlgo::constructLayers(const DDLogicalPart& module, DDCompactVi DDSolid solid = DDSolidFactory::tubs(DDName(name, nameSpace_), hthick, rins, routs, 0.0, 2._pi); glog = DDLogicalPart(solid.ddname(), matter, solid); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("HGCalGeom") << "DDHGCalEEFileAlgo: " << solid.name() << " Tubs made of " << matName << " of dimensions " << rinB << ":" << rins << ", " << routF << ":" << routs << ", " << hthick << ", 0.0, 360.0 and position " << glog.name() << " number " << copy << ":" << layerCenter_[copy - firstLayer_]; + edm::LogVerbatim("HGCalGeom") << "DDHGCalEEFileAlgo: " << solid.name() << " Tubs made of " << matName + << " of dimensions " << rinB << ":" << rins << ", " << routF << ":" << routs + << ", " << hthick << ", 0.0, 360.0 and position " << glog.name() << " number " + << copy << ":" << layerCenter_[copy - firstLayer_]; #endif positionSensitive(glog, rins, routs, zz, layerSense_[ly], (copy - firstLayer_), cpv); } diff --git a/Geometry/HGCalCommonData/plugins/DDHGCalWafer8.cc b/Geometry/HGCalCommonData/plugins/DDHGCalWafer8.cc index 0a0305cadcd97..d14168404c213 100644 --- a/Geometry/HGCalCommonData/plugins/DDHGCalWafer8.cc +++ b/Geometry/HGCalCommonData/plugins/DDHGCalWafer8.cc @@ -53,14 +53,16 @@ void DDHGCalWafer8::initialize(const DDNumericArguments& nArgs, cellNames_ = vsArgs["CellNames"]; nameSpace_ = DDCurrentNamespace::ns(); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("HGCalGeom") << "DDHGCalWafer8: Wafer 2r " << waferSize_ << " T " << waferT_ << " Half Separation " << waferSepar_ << " Cells/Wafer " << nCells_ << " Cell Type " << cellType_ << " Material " << material_ << " Names " << parent().name() << " NameSpace " << nameSpace_ << ": # of cells " << cellNames_.size(); + edm::LogVerbatim("HGCalGeom") << "DDHGCalWafer8: Wafer 2r " << waferSize_ << " T " << waferT_ << " Half Separation " + << waferSepar_ << " Cells/Wafer " << nCells_ << " Cell Type " << cellType_ + << " Material " << material_ << " Names " << parent().name() << " NameSpace " + << nameSpace_ << ": # of cells " << cellNames_.size(); for (unsigned int k = 0; k < cellNames_.size(); ++k) edm::LogVerbatim("HGCalGeom") << "DDHGCalWafer8: Cell[" << k << "] " << cellNames_[k]; #endif } void DDHGCalWafer8::execute(DDCompactView& cpv) { - static const double sqrt3 = std::sqrt(3.0); double rM = 0.5 * (waferSize_ + waferSepar_); double RM2 = rM / sqrt3; diff --git a/Geometry/HGCalCommonData/plugins/dd4hep/DDHGCalCell.cc b/Geometry/HGCalCommonData/plugins/dd4hep/DDHGCalCell.cc index 77618309f4213..c30f102548ebc 100644 --- a/Geometry/HGCalCommonData/plugins/dd4hep/DDHGCalCell.cc +++ b/Geometry/HGCalCommonData/plugins/dd4hep/DDHGCalCell.cc @@ -52,8 +52,8 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext #ifdef EDM_ML_DEBUG edm::LogVerbatim("HGCalGeom") << "DDHGCalCell: Wafer r " << cms::convert2mm(waferSize) << " T " << cms::convert2mm(waferT) << " Cell T " << cms::convert2mm(cellT) << " Cells/Wafer " - << nCells << " Material " << material << "Sensitive Position " << posSens << " NameSpace " << ns.name() - << " Full Cell: " << fullCN << ":" << fullSensN; + << nCells << " Material " << material << "Sensitive Position " << posSens + << " NameSpace " << ns.name() << " Full Cell: " << fullCN << ":" << fullSensN; for (int k = 0; k < 3; ++k) edm::LogVerbatim("HGCalGeom") << "DDHGCalCell: Truncated Cell[" << k << "] " << truncCN[k] << ":" << truncSensN[k]; for (int k = 0; k < 3; ++k) diff --git a/Geometry/HGCalCommonData/plugins/dd4hep/DDHGCalHEFileAlgo.cc b/Geometry/HGCalCommonData/plugins/dd4hep/DDHGCalHEFileAlgo.cc index f421bf848cebe..52ef2236c155f 100644 --- a/Geometry/HGCalCommonData/plugins/dd4hep/DDHGCalHEFileAlgo.cc +++ b/Geometry/HGCalCommonData/plugins/dd4hep/DDHGCalHEFileAlgo.cc @@ -483,7 +483,11 @@ struct HGCalHEFileAlgo { #ifdef EDM_ML_DEBUG int ium(0), ivm(0), iumAll(0), ivmAll(0), kount(0), ntot(0), nin(0); std::vector ntype(6, 0); - edm::LogVerbatim("HGCalGeom") << "DDHGCalHEFileAlgo: " << glog.name() << " rin:rout " << cms::convert2mm(rin) << ":" << cms::convert2mm(rout) << " zpos " << cms::convert2mm(zpos) << " N " << N << " for maximum u, v Offset; Shift " << cms::convert2mm(xyoff.first) << ":" << cms::convert2mm(xyoff.second) << " WaferSize " << cms::convert2mm((waferSize_ + waferSepar_)); + edm::LogVerbatim("HGCalGeom") << "DDHGCalHEFileAlgo: " << glog.name() << " rin:rout " << cms::convert2mm(rin) << ":" + << cms::convert2mm(rout) << " zpos " << cms::convert2mm(zpos) << " N " << N + << " for maximum u, v Offset; Shift " << cms::convert2mm(xyoff.first) << ":" + << cms::convert2mm(xyoff.second) << " WaferSize " + << cms::convert2mm((waferSize_ + waferSepar_)); #endif for (int u = -N; u <= N; ++u) { for (int v = -N; v <= N; ++v) { @@ -503,10 +507,12 @@ struct HGCalHEFileAlgo { int type = HGCalWaferType::getType(indx, waferIndex_, waferProperty_); if (corner.first > 0 && type >= 0) { int copy = HGCalTypes::packTypeUV(type, u, v); - if (layertype > 1) - type += 3; + if (layertype > 1) + type += 3; #ifdef EDM_ML_DEBUG - edm::LogVerbatim("HGCalGeom") << " DDHGCalHEFileAlgo: " << waferNames_[type] << " number " << copy << " type " << type << " layer:u:v:indx " << (layer + firstLayer_) << ":" << u << ":" << v << ":" << indx; + edm::LogVerbatim("HGCalGeom") << " DDHGCalHEFileAlgo: " << waferNames_[type] << " number " << copy << " type " + << type << " layer:u:v:indx " << (layer + firstLayer_) << ":" << u << ":" << v + << ":" << indx; if (iu > ium) ium = iu; if (iv > ivm) @@ -528,7 +534,9 @@ struct HGCalHEFileAlgo { #ifdef EDM_ML_DEBUG ++ntype[type]; edm::LogVerbatim("HGCalGeom") - << "DDHGCalHEFileAlgo: " << waferNames_[type] << " number " << copy << " type " << layertype << ":" << type << " positioned in " << glog.name() << " at (" << cms::convert2mm(xpos) << ", " << cms::convert2mm(ypos) << ", 0) with no rotation"; + << "DDHGCalHEFileAlgo: " << waferNames_[type] << " number " << copy << " type " << layertype << ":" + << type << " positioned in " << glog.name() << " at (" << cms::convert2mm(xpos) << ", " + << cms::convert2mm(ypos) << ", 0) with no rotation"; #endif } }