CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
DDTIBRadCableAlgo_MTCC Class Reference

#include <DDTIBRadCableAlgo_MTCC.h>

Inheritance diagram for DDTIBRadCableAlgo_MTCC:

Public Member Functions

 DDTIBRadCableAlgo_MTCC ()
 
void execute (DDCompactView &cpv) override
 
void initialize (const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
 
 ~DDTIBRadCableAlgo_MTCC () override
 

Private Attributes

std::vector< std::string > cableMat
 
double cableT
 
double cylinderT
 
double deltaR
 
std::string idNameSpace
 
std::vector< double > layers
 
std::vector< double > layRin
 
double rMax
 
double rMin
 
std::vector< std::string > strucMat
 
double supportDR
 
std::string supportMat
 
double supportT
 

Detailed Description

Definition at line 10 of file DDTIBRadCableAlgo_MTCC.h.

Constructor & Destructor Documentation

◆ DDTIBRadCableAlgo_MTCC()

DDTIBRadCableAlgo_MTCC::DDTIBRadCableAlgo_MTCC ( )

Definition at line 19 of file DDTIBRadCableAlgo_MTCC.cc.

19  : layRin(0), cableMat(0), strucMat(0), layers(0) {
20  LogDebug("TIBGeom") << "DDTIBRadCableAlgo_MTCC info: Creating an instance";
21 }

References LogDebug.

◆ ~DDTIBRadCableAlgo_MTCC()

DDTIBRadCableAlgo_MTCC::~DDTIBRadCableAlgo_MTCC ( )
override

Definition at line 23 of file DDTIBRadCableAlgo_MTCC.cc.

23 {}

Member Function Documentation

◆ execute()

void DDTIBRadCableAlgo_MTCC::execute ( DDCompactView cpv)
override

Definition at line 70 of file DDTIBRadCableAlgo_MTCC.cc.

70  {
71  LogDebug("TIBGeom") << "==>> Constructing DDTIBRadCableAlgo_MTCC...";
72  DDName diskName = parent().name();
73 
74  DDSolid solid;
76  double rin, rout;
77 
78  // Loop over sub disks
80  DDMaterial suppMatter(suppName);
81  double diskDz = 0.5 * (supportT + cableT * layRin.size());
82  double dz = 0.5 * supportT;
83 
84  for (unsigned int i = 0; i < layRin.size(); i++) {
85  // fill only layers in layers list
86  bool empty = true;
87  for (double layer : layers) {
88  if (i + 1 == (unsigned int)layer) {
89  empty = false;
90  }
91  }
92 
93  if (!empty) {
94  //Support disks
95  name = "TIBSupportSideDisk" + std::to_string(i);
96  rin = layRin[i] + 0.5 * (deltaR - cylinderT) - supportDR;
97  rout = layRin[i] + 0.5 * (deltaR + cylinderT) + supportDR;
98  solid = DDSolidFactory::tubs(DDName(name, idNameSpace), dz, rin, rout, 0, CLHEP::twopi);
99  LogDebug("TIBGeom") << "DDTIBRadCableAlgo_MTCC test: " << DDName(name, idNameSpace) << " Tubs made of "
100  << supportMat << " from 0 to " << CLHEP::twopi / CLHEP::deg << " with Rin " << rin << " Rout "
101  << rout << " ZHalf " << dz;
102  DDLogicalPart suppLogic(DDName(name, idNameSpace), suppMatter, solid);
103 
104  DDTranslation r1(0, 0, (dz - diskDz));
105  cpv.position(DDName(name, idNameSpace), diskName, i + 1, r1, DDRotation());
106  LogDebug("TIBGeom") << "DDTIBRadCableAlgo_MTCC test: " << DDName(name, idNameSpace) << " number " << i + 1
107  << " positioned in " << diskName << " at " << r1 << " with no rotation";
108 
109  //Open Structure
110  name = "TIBOpenZone" + std::to_string(i);
111  rout = rin;
112  if (i == 0)
113  rin = rMin;
114  else
115  rin = layRin[i - 1] + 0.5 * (deltaR + cylinderT) + supportDR;
116  solid = DDSolidFactory::tubs(DDName(name, idNameSpace), dz, rin, rout, 0, CLHEP::twopi);
117  LogDebug("TIBGeom") << "DDTIBRadCableAlgo_MTCC test: " << DDName(name, idNameSpace) << " Tubs made of "
118  << strucMat[i] << " from 0 to " << CLHEP::twopi / CLHEP::deg << " with Rin " << rin
119  << " Rout " << rout << " ZHalf " << dz;
121  DDMaterial strucMatter(strucName);
122  DDLogicalPart strucLogic(DDName(name, idNameSpace), strucMatter, solid);
123 
124  DDTranslation r2(0, 0, (dz - diskDz));
125  cpv.position(DDName(name, idNameSpace), diskName, i + 1, r2, DDRotation());
126  LogDebug("TIBGeom") << "DDTIBRadCableAlgo_MTCC test: " << DDName(name, idNameSpace) << " number " << i + 1
127  << " positioned in " << diskName << " at " << r2 << " with no rotation";
128 
129  //Now the radial cable
130  name = "TIBRadCable" + std::to_string(i);
131  double rv = layRin[i] + 0.5 * deltaR;
132  std::vector<double> pgonZ;
133  pgonZ.emplace_back(-0.5 * cableT);
134  pgonZ.emplace_back(cableT * (rv / rMax - 0.5));
135  pgonZ.emplace_back(0.5 * cableT);
136  std::vector<double> pgonRmin;
137  pgonRmin.emplace_back(rv);
138  pgonRmin.emplace_back(rv);
139  pgonRmin.emplace_back(rv);
140  std::vector<double> pgonRmax;
141  pgonRmax.emplace_back(rMax);
142  pgonRmax.emplace_back(rMax);
143  pgonRmax.emplace_back(rv);
144  solid = DDSolidFactory::polycone(DDName(name, idNameSpace), 0, CLHEP::twopi, pgonZ, pgonRmin, pgonRmax);
145  LogDebug("TIBGeom") << "DDTIBRadCableAlgo_MTCC test: " << DDName(name, idNameSpace) << " Polycone made of "
146  << cableMat[i] << " from 0 to " << CLHEP::twopi / CLHEP::deg << " and with " << pgonZ.size()
147  << " sections";
148  for (unsigned int ii = 0; ii < pgonZ.size(); ii++)
149  LogDebug("TIBGeom") << "\t"
150  << "\tZ = " << pgonZ[ii] << "\tRmin = " << pgonRmin[ii] << "\tRmax = " << pgonRmax[ii];
152  LogDebug("TIBGeom") << " material cableName " << i << " " << cableName;
153  DDMaterial cableMatter(cableName);
154  DDLogicalPart cableLogic(DDName(name, idNameSpace), cableMatter, solid);
155 
156  DDTranslation r3(0, 0, (diskDz - (i + 0.5) * cableT));
157  cpv.position(DDName(name, idNameSpace), diskName, i + 1, r3, DDRotation());
158  LogDebug("TIBGeom") << "DDTIBRadCableAlgo_MTCC test: " << DDName(name, idNameSpace) << " number " << i + 1
159  << " positioned in " << diskName << " at " << r3 << " with no rotation";
160  }
161  //
162 
163  // fill only layers in layers list
164  empty = true;
165  for (double layer : layers) {
166  if (i + 1 == (unsigned int)layer) {
167  empty = false;
168  }
169  }
170 
171  if (!empty) {
172  //Now the last open zone
173  unsigned int i = layRin.size();
174  rin = layRin[i - 1] + 0.5 * (deltaR + cylinderT) + supportDR;
175  rout = rMax;
176  name = "TIBOpenZone" + std::to_string(i);
177  solid = DDSolidFactory::tubs(DDName(name, idNameSpace), dz, rin, rout, 0, CLHEP::twopi);
178  LogDebug("TIBGeom") << "DDTIBRadCableAlgo_MTCC test: " << DDName(name, idNameSpace) << " Tubs made of "
179  << strucMat[i] << " from 0 to " << CLHEP::twopi / CLHEP::deg << " with Rin " << rin
180  << " Rout " << rout << " ZHalf " << dz;
182  DDMaterial strucMatter(strucName);
183  DDLogicalPart strucLogic(DDName(name, idNameSpace), strucMatter, solid);
184 
185  DDTranslation r2(0, 0, (dz - diskDz));
186  cpv.position(DDName(name, idNameSpace), diskName, i + 1, r2, DDRotation());
187  LogDebug("TIBGeom") << "DDTIBRadCableAlgo_MTCC test: " << DDName(name, idNameSpace) << " number " << i + 1
188  << " positioned in " << diskName << " at " << r2 << " with no rotation";
189  }
190  }
191  LogDebug("TIBGeom") << "<<== End of DDTIBRadCableAlgo_MTCC construction ...";
192 }

References cableMat, cableT, cylinderT, DDSplit(), deltaR, PVValHelper::dz, relativeConstraints::empty, dqmdumpme::first, mps_fire::i, idNameSpace, cuy::ii, layers, layRin, LogDebug, Skims_PA_cff::name, class-composition::parent, DDSolidFactory::polycone(), DDCompactView::position(), diffTwoXMLs::r1, diffTwoXMLs::r2, rMax, rMin, edm::second(), AlCaHLTBitMon_QueryRunRegistry::string, strucMat, supportDR, supportMat, supportT, and DDSolidFactory::tubs().

◆ initialize()

void DDTIBRadCableAlgo_MTCC::initialize ( const DDNumericArguments nArgs,
const DDVectorArguments vArgs,
const DDMapArguments mArgs,
const DDStringArguments sArgs,
const DDStringVectorArguments vsArgs 
)
override

Definition at line 25 of file DDTIBRadCableAlgo_MTCC.cc.

29  {
31  unsigned int i;
32  DDName parentName = parent().name();
33  LogDebug("TIBGeom") << "DDTIBRadCableAlgo_MTCC debug: Parent " << parentName << " NameSpace " << idNameSpace;
34 
35  rMin = nArgs["RMin"];
36  rMax = nArgs["RMax"];
37  layRin = vArgs["RadiusLo"];
38  deltaR = nArgs["DeltaR"];
39  LogDebug("TIBGeom") << "DDTIBRadCableAlgo_MTCC debug: Disk Rmin " << rMin << "\tRMax " << rMax
40  << "\tSeparation of layers " << deltaR << " with " << layRin.size() << " layers at R =";
41  for (i = 0; i < layRin.size(); i++)
42  LogDebug("TIBGeom") << " " << i << " : " << layRin[i];
43 
44  cylinderT = nArgs["CylinderThick"];
45  supportT = nArgs["SupportThick"];
46  supportDR = nArgs["SupportDR"];
47  supportMat = sArgs["SupportMaterial"];
48  LogDebug("TIBGeom") << "DDTIBRadCableAlgo_MTCC debug: SupportCylinder "
49  << "Thickness " << cylinderT << "\tSupportDisk "
50  << "Thickness " << supportT << "\tExtra width along R " << supportDR
51  << "\tMaterial: " << supportMat;
52 
53  cableT = nArgs["CableThick"];
54  cableMat = vsArgs["CableMaterial"];
55  LogDebug("TIBGeom") << "DDTIBRadCableAlgo_MTCC debug: Cable Thickness " << cableT << " with materials: ";
56  for (i = 0; i < cableMat.size(); i++)
57  LogDebug("TIBGeom") << " " << i << " : " << cableMat[i];
58 
59  strucMat = vsArgs["StructureMaterial"];
60  LogDebug("TIBGeom") << "DDTIBRadCableAlgo_MTCC debug: " << strucMat.size() << " materials for open structure:";
61  for (i = 0; i < strucMat.size(); i++)
62  LogDebug("TIBGeom") << " " << i << " : " << strucMat[i];
63 
64  layers = vArgs["Layers"];
65  LogDebug("TIBGeom") << "DDTIBRadCableAlgo_MTCC debug: " << layers.size() << " layers:";
66  for (i = 0; i < layers.size(); i++)
67  LogDebug("TIBGeom") << " " << i << " : " << layers[i];
68 }

References cableMat, cableT, cylinderT, deltaR, mps_fire::i, idNameSpace, layers, layRin, LogDebug, DDCurrentNamespace::ns(), class-composition::parent, rMax, rMin, strucMat, supportDR, supportMat, and supportT.

Member Data Documentation

◆ cableMat

std::vector<std::string> DDTIBRadCableAlgo_MTCC::cableMat
private

Definition at line 36 of file DDTIBRadCableAlgo_MTCC.h.

Referenced by execute(), and initialize().

◆ cableT

double DDTIBRadCableAlgo_MTCC::cableT
private

Definition at line 35 of file DDTIBRadCableAlgo_MTCC.h.

Referenced by execute(), and initialize().

◆ cylinderT

double DDTIBRadCableAlgo_MTCC::cylinderT
private

Definition at line 31 of file DDTIBRadCableAlgo_MTCC.h.

Referenced by execute(), and initialize().

◆ deltaR

double DDTIBRadCableAlgo_MTCC::deltaR
private

Definition at line 30 of file DDTIBRadCableAlgo_MTCC.h.

Referenced by execute(), and initialize().

◆ idNameSpace

std::string DDTIBRadCableAlgo_MTCC::idNameSpace
private

Definition at line 25 of file DDTIBRadCableAlgo_MTCC.h.

Referenced by execute(), and initialize().

◆ layers

std::vector<double> DDTIBRadCableAlgo_MTCC::layers
private

Definition at line 38 of file DDTIBRadCableAlgo_MTCC.h.

Referenced by execute(), and initialize().

◆ layRin

std::vector<double> DDTIBRadCableAlgo_MTCC::layRin
private

Definition at line 29 of file DDTIBRadCableAlgo_MTCC.h.

Referenced by execute(), and initialize().

◆ rMax

double DDTIBRadCableAlgo_MTCC::rMax
private

Definition at line 28 of file DDTIBRadCableAlgo_MTCC.h.

Referenced by execute(), and initialize().

◆ rMin

double DDTIBRadCableAlgo_MTCC::rMin
private

Definition at line 27 of file DDTIBRadCableAlgo_MTCC.h.

Referenced by execute(), and initialize().

◆ strucMat

std::vector<std::string> DDTIBRadCableAlgo_MTCC::strucMat
private

Definition at line 37 of file DDTIBRadCableAlgo_MTCC.h.

Referenced by execute(), and initialize().

◆ supportDR

double DDTIBRadCableAlgo_MTCC::supportDR
private

Definition at line 33 of file DDTIBRadCableAlgo_MTCC.h.

Referenced by execute(), and initialize().

◆ supportMat

std::string DDTIBRadCableAlgo_MTCC::supportMat
private

Definition at line 34 of file DDTIBRadCableAlgo_MTCC.h.

Referenced by execute(), and initialize().

◆ supportT

double DDTIBRadCableAlgo_MTCC::supportT
private

Definition at line 32 of file DDTIBRadCableAlgo_MTCC.h.

Referenced by execute(), and initialize().

DDTIBRadCableAlgo_MTCC::cableT
double cableT
Definition: DDTIBRadCableAlgo_MTCC.h:35
mps_fire.i
i
Definition: mps_fire.py:355
DDName
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
DDTIBRadCableAlgo_MTCC::supportMat
std::string supportMat
Definition: DDTIBRadCableAlgo_MTCC.h:34
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:215
dqmdumpme.first
first
Definition: dqmdumpme.py:55
DDMaterial
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:45
DDTIBRadCableAlgo_MTCC::layers
std::vector< double > layers
Definition: DDTIBRadCableAlgo_MTCC.h:38
DDTIBRadCableAlgo_MTCC::rMin
double rMin
Definition: DDTIBRadCableAlgo_MTCC.h:27
DDTIBRadCableAlgo_MTCC::deltaR
double deltaR
Definition: DDTIBRadCableAlgo_MTCC.h:30
DDTIBRadCableAlgo_MTCC::rMax
double rMax
Definition: DDTIBRadCableAlgo_MTCC.h:28
DDTranslation
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
DDSolidFactory::tubs
static DDSolid tubs(const DDName &name, double zhalf, double rIn, double rOut, double startPhi, double deltaPhi)
Definition: DDSolid.cc:653
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DDTIBRadCableAlgo_MTCC::idNameSpace
std::string idNameSpace
Definition: DDTIBRadCableAlgo_MTCC.h:25
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
DDTIBRadCableAlgo_MTCC::supportT
double supportT
Definition: DDTIBRadCableAlgo_MTCC.h:32
DDLogicalPart
A DDLogicalPart aggregates information concerning material, solid and sensitveness ....
Definition: DDLogicalPart.h:93
diffTwoXMLs.r2
r2
Definition: diffTwoXMLs.py:73
DDSolidFactory::polycone
static DDSolid polycone(const DDName &name, double startPhi, double deltaPhi, const std::vector< double > &z, const std::vector< double > &rmin, const std::vector< double > &rmax)
Creates a polycone (refere to Geant3 or Geant4 documentation)
Definition: DDSolid.cc:537
DDTIBRadCableAlgo_MTCC::cableMat
std::vector< std::string > cableMat
Definition: DDTIBRadCableAlgo_MTCC.h:36
PVValHelper::dz
Definition: PVValidationHelpers.h:50
diffTwoXMLs.r1
r1
Definition: diffTwoXMLs.py:53
DDCurrentNamespace::ns
static std::string & ns()
Definition: DDCurrentNamespace.cc:3
relativeConstraints.empty
bool empty
Definition: relativeConstraints.py:46
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
DDSolid
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
DDTIBRadCableAlgo_MTCC::strucMat
std::vector< std::string > strucMat
Definition: DDTIBRadCableAlgo_MTCC.h:37
class-composition.parent
parent
Definition: class-composition.py:88
DDTIBRadCableAlgo_MTCC::supportDR
double supportDR
Definition: DDTIBRadCableAlgo_MTCC.h:33
cuy.ii
ii
Definition: cuy.py:590
DDSplit
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
Definition: DDSplit.cc:3
DDCompactView::position
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string &copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
Definition: DDCompactView.cc:66
DDRotation
ROOT::Math::Rotation3D DDRotation
Definition: DDEcalEndcapAlgo.cc:18
DDTIBRadCableAlgo_MTCC::layRin
std::vector< double > layRin
Definition: DDTIBRadCableAlgo_MTCC.h:29
DDTIBRadCableAlgo_MTCC::cylinderT
double cylinderT
Definition: DDTIBRadCableAlgo_MTCC.h:31