Skip to content

Commit

Permalink
Code check
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunanda committed Apr 8, 2021
1 parent 4e94341 commit 36c916f
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 11 deletions.
1 change: 0 additions & 1 deletion Geometry/HGCalCommonData/plugins/DDHGCalCell.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion Geometry/HGCalCommonData/plugins/DDHGCalEEFileAlgo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
6 changes: 4 additions & 2 deletions Geometry/HGCalCommonData/plugins/DDHGCalWafer8.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions Geometry/HGCalCommonData/plugins/dd4hep/DDHGCalCell.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
18 changes: 13 additions & 5 deletions Geometry/HGCalCommonData/plugins/dd4hep/DDHGCalHEFileAlgo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<int> 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) {
Expand All @@ -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)
Expand All @@ -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
}
}
Expand Down

0 comments on commit 36c916f

Please sign in to comment.