Go to the source code of this file.
|
static long | algorithm (dd4hep::Detector &, cms::DDParsingContext &ctxt, xml_h e, dd4hep::SensitiveDetector &) |
|
void | DDHGCalGeom::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) |
|
| DD4HEP_OPEN_PLUGIN (dd4hep, ddcms_det_element_DDCMS_hgcal_DDHGCalTBModuleX) |
|
◆ algorithm()
static long algorithm |
( |
dd4hep::Detector & |
, |
|
|
cms::DDParsingContext & |
ctxt, |
|
|
xml_h |
e, |
|
|
dd4hep::SensitiveDetector & |
|
|
) |
| |
|
static |
Definition at line 191 of file DDHGCalTBModuleX.cc.
198 const auto& wafers =
args.value<std::vector<std::string> >(
"WaferName");
199 const auto& covers =
args.value<std::vector<std::string> >(
"CoverName");
202 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalTBModuleX: Material " << genMat <<
" with " << wafers.size() <<
" wafers";
204 for (
auto wafer : wafers) {
208 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalTBModuleX: " << covers.size() <<
" covers";
210 for (
auto cover : covers) {
215 const auto& materials =
args.value<std::vector<std::string> >(
"MaterialNames");
216 const auto&
names =
args.value<std::vector<std::string> >(
"VolumeNames");
217 const auto& layerThick =
args.value<std::vector<double> >(
"Thickness");
218 std::vector<int> copyNumber;
219 for (
unsigned int k = 0;
k < layerThick.size(); ++
k) {
220 copyNumber.emplace_back(1);
223 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalTBModuleX: " << materials.size() <<
" types of volumes";
224 for (
unsigned int i = 0;
i <
names.size(); ++
i)
227 <<
" first copy number " << copyNumber[
i];
229 const auto& blockThick =
args.value<std::vector<double> >(
"BlockThick");
230 const auto& inOut =
args.value<
int>(
"InOut");
231 const auto& layerFrontIn =
args.value<std::vector<int> >(
"LayerFrontIn");
232 const auto& layerBackIn =
args.value<std::vector<int> >(
"LayerBackIn");
233 std::vector<int> layerFrontOut;
234 std::vector<int> layerBackOut;
236 layerFrontOut =
args.value<std::vector<int> >(
"LayerFrontOut");
237 layerBackOut =
args.value<std::vector<int> >(
"LayerBackOut");
240 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalTBModuleX: " << blockThick.size() <<
" blocks with in/out " << inOut;
241 for (
unsigned int i = 0;
i < blockThick.size(); ++
i) {
244 <<
" with inner layers " << layerFrontIn[
i] <<
":" << layerBackIn[
i]
245 <<
" and outer layers " << layerFrontOut[
i] <<
":" << layerBackOut[
i];
248 <<
" with inner layers " << layerFrontIn[
i] <<
":" << layerBackIn[
i];
251 const auto& layerType =
args.value<std::vector<int> >(
"LayerType");
252 const auto& layerSense =
args.value<std::vector<int> >(
"LayerSense");
253 const auto& maxModule =
args.value<std::vector<int> >(
"MaxModule");
255 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalTBModuleX: " << layerType.size() <<
" layers";
256 for (
unsigned int i = 0;
i < layerType.size(); ++
i)
257 edm::LogVerbatim(
"HGCalGeom") <<
"Layer [" <<
i <<
"] with material type " << layerType[
i] <<
" sensitive class "
258 << layerSense[
i] <<
" and " << maxModule[
i] <<
" maximum row/columns";
260 const auto& zMinBlock =
args.value<
double>(
"zMinBlock");
261 const auto& rMaxFine =
args.value<
double>(
"rMaxFine");
262 const auto& waferW =
args.value<
double>(
"waferW");
263 const auto& waferGap =
args.value<
double>(
"waferGap");
264 const auto& absorbW =
args.value<
double>(
"absorberW");
265 const auto& absorbH =
args.value<
double>(
"absorberH");
266 const auto&
rMax =
args.value<
double>(
"rMax");
267 const auto& rMaxB =
args.value<
double>(
"rMaxB");
268 double waferTot = waferW + waferGap;
273 <<
" gap among wafers " <<
convertCmToMm(waferGap) <<
" absorber width "
276 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalTBModuleX: NameSpace " << ns.name() <<
" Parent Name " <<
idName;
278 std::unordered_set<int> copies;
282 double zi(zMinBlock);
283 for (
unsigned int i = 0;
i < blockThick.size();
i++) {
284 double zo = zi + blockThick[
i];
292 dd4hep::Solid solid = dd4hep::Tube(0, rMaxB, 0.5 * blockThick[
i], 0.0, 2._pi);
293 ns.addSolidNS(ns.prepend(
name), solid);
295 double zz = zi + 0.5 * blockThick[
i];
299 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalTBModuleX: " << glog.name() <<
" number " <<
i <<
" positioned in "
300 <<
args.parentName() <<
" at " <<
r1 <<
" with no rotation";
301 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalTBModuleX: \t\tInside Block " <<
i <<
" Layers " << layerFrontIn[
i] <<
":"
303 <<
" thickness " <<
convertCmToMm(blockThick[
i]) <<
" ignore Center 0";
323 -0.5 * blockThick[
i],
329 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalTBModuleX: \t\tInside Block " <<
i <<
" Layers " << layerFrontOut[
i]
330 <<
":" << layerBackOut[
i] <<
" zFront " <<
convertCmToMm(-0.5 * blockThick[
i])
331 <<
" thickness " <<
convertCmToMm(blockThick[
i]) <<
" ignore Center 1";
351 -0.5 * blockThick[
i],
360 <<
convertCmToMm(zi) <<
" with " << copies.size() <<
" different wafer copy numbers";
References cms::DDNamespace::addSolidNS(), writedatasetfile::args, DDHGCalGeom::constructLayers(), geant_units::operators::convertCmToMm(), DDSplit(), MillePedeFileConverter_cfg::e, dqmdumpme::first, mps_fire::i, versionedElectronIDProducer_cfi::idName, dqmdumpme::k, cms::DDNamespace::material(), g4SimHits_cfi::Material, Skims_PA_cff::name, cms::DDNamespace::name(), names, class-composition::parent, PixelTestBeamValidation_cfi::Position, cms::DDNamespace::prepend(), diffTwoXMLs::r1, photonAnalyzer_cfi::rMax, AlCaHLTBitMon_QueryRunRegistry::string, cms::DDNamespace::volume(), and geometryCSVtoXML::zz.
◆ DD4HEP_OPEN_PLUGIN()
DD4HEP_OPEN_PLUGIN |
( |
dd4hep |
, |
|
|
ddcms_det_element_DDCMS_hgcal_DDHGCalTBModuleX |
|
|
) |
| |
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 = ':'