197 const auto& wafers =
args.value<std::vector<std::string> >(
"WaferName");
198 const auto& covers =
args.value<std::vector<std::string> >(
"CoverName");
201 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalTBModuleX: Material " << genMat <<
" with " << wafers.size() <<
" wafers";
203 for (
auto wafer : wafers) {
207 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalTBModuleX: " << covers.size() <<
" covers";
209 for (
auto cover : covers) {
214 const auto& materials =
args.value<std::vector<std::string> >(
"MaterialNames");
215 const auto&
names =
args.value<std::vector<std::string> >(
"VolumeNames");
216 const auto& layerThick =
args.value<std::vector<double> >(
"Thickness");
217 std::vector<int> copyNumber;
218 copyNumber.resize(materials.size(), 1);
220 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalTBModuleX: " << materials.size() <<
" types of volumes";
221 for (
unsigned int i = 0;
i <
names.size(); ++
i)
224 <<
" first copy number " << copyNumber[
i];
226 const auto& blockThick =
args.value<std::vector<double> >(
"BlockThick");
227 const auto& inOut =
args.value<
int>(
"InOut");
228 const auto& layerFrontIn =
args.value<std::vector<int> >(
"LayerFrontIn");
229 const auto& layerBackIn =
args.value<std::vector<int> >(
"LayerBackIn");
230 std::vector<int> layerFrontOut;
231 std::vector<int> layerBackOut;
233 layerFrontOut =
args.value<std::vector<int> >(
"LayerFrontOut");
234 layerBackOut =
args.value<std::vector<int> >(
"LayerBackOut");
237 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalTBModuleX: " << blockThick.size() <<
" blocks with in/out " << inOut;
238 for (
unsigned int i = 0;
i < blockThick.size(); ++
i) {
241 <<
" with inner layers " << layerFrontIn[
i] <<
":" << layerBackIn[
i]
242 <<
" and outer layers " << layerFrontOut[
i] <<
":" << layerBackOut[
i];
245 <<
" with inner layers " << layerFrontIn[
i] <<
":" << layerBackIn[
i];
248 const auto& layerType =
args.value<std::vector<int> >(
"LayerType");
249 const auto& layerSense =
args.value<std::vector<int> >(
"LayerSense");
250 const auto& maxModule =
args.value<std::vector<int> >(
"MaxModule");
252 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalTBModuleX: " << layerType.size() <<
" layers";
253 for (
unsigned int i = 0;
i < layerType.size(); ++
i)
254 edm::LogVerbatim(
"HGCalGeom") <<
"Layer [" <<
i <<
"] with material type " << layerType[
i] <<
" sensitive class " 255 << layerSense[
i] <<
" and " << maxModule[
i] <<
" maximum row/columns";
257 const auto& zMinBlock =
args.value<
double>(
"zMinBlock");
258 const auto& rMaxFine =
args.value<
double>(
"rMaxFine");
259 const auto& waferW =
args.value<
double>(
"waferW");
260 const auto& waferGap =
args.value<
double>(
"waferGap");
261 const auto& absorbW =
args.value<
double>(
"absorberW");
262 const auto& absorbH =
args.value<
double>(
"absorberH");
263 const auto&
rMax =
args.value<
double>(
"rMax");
264 const auto& rMaxB =
args.value<
double>(
"rMaxB");
265 double waferTot = waferW + waferGap;
270 <<
" gap among wafers " <<
cms::convert2mm(waferGap) <<
" absorber width " 273 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalTBModuleX: NameSpace " << ns.name() <<
" Parent Name " <<
idName;
275 std::unordered_set<int> copies;
279 double zi(zMinBlock);
280 for (
unsigned int i = 0;
i < blockThick.size();
i++) {
281 double zo = zi + blockThick[
i];
289 dd4hep::Solid solid = dd4hep::Tube(0, rMaxB, 0.5 * blockThick[
i], 0.0, 2._pi);
290 ns.addSolidNS(ns.prepend(
name), solid);
292 double zz = zi + 0.5 * blockThick[
i];
296 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalTBModuleX: " << glog.name() <<
" number " <<
i <<
" positioned in " 298 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalTBModuleX: \t\tInside Block " <<
i <<
" Layers " << layerFrontIn[
i] <<
":" 320 -0.5 * blockThick[
i],
326 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalTBModuleX: \t\tInside Block " <<
i <<
" Layers " << layerFrontOut[
i]
348 -0.5 * blockThick[
i],
357 <<
cms::convert2mm(zi) <<
" with " << copies.size() <<
" different wafer copy numbers";
Log< level::Info, true > LogVerbatim
constexpr NumType convert2mm(NumType length)
std::string to_string(const V &value)
const std::string names[nVars_]
static constexpr long s_executed
void constructLayers(const cms::DDNamespace &ns, const std::vector< std::string > &wafers, const std::vector< std::string > &covers, const std::vector< int > &layerType, const std::vector< int > &layerSense, const std::vector< int > &maxModule, const std::vector< std::string > &names, const std::vector< std::string > &materials, std::vector< int > ©Number, const std::vector< double > &layerThick, const double &absorbW, const double &absorbH, const double &waferTot, const double &rMax, const double &rMaxFine, std::unordered_set< int > &copies, int firstLayer, int lastLayer, double zFront, double totalWidth, bool ignoreCenter, dd4hep::Volume &module)
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'