CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
DDTOBRadCableAlgo Class Reference
Inheritance diagram for DDTOBRadCableAlgo:

Public Member Functions

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

Private Attributes

vector< string > cableM
 
double cableT
 
vector< string > connM
 
double connT
 
double connW
 
double coolDeltaPhi1
 
double coolDeltaPhi2
 
string coolM1
 
string coolM2
 
vector< double > coolR1
 
vector< double > coolR2
 
double coolRin
 
double coolRout1
 
double coolRout2
 
double coolStartPhi1
 
double coolStartPhi2
 
double diskDz
 
string idNameSpace
 
vector< string > names
 
double rMax
 
vector< double > rodRin
 
vector< double > rodRout
 

Detailed Description

Definition at line 23 of file DDTOBRadCableAlgo.cc.

Constructor & Destructor Documentation

DDTOBRadCableAlgo::DDTOBRadCableAlgo ( )

Definition at line 63 of file DDTOBRadCableAlgo.cc.

References LogDebug.

64  : rodRin(0),
65  rodRout(0),
66  cableM(0),
67  connM(0),
68  coolR1(0),
69  coolR2(0),
70  coolRin(0),
71  coolRout1(0),
72  coolRout2(0),
73  coolStartPhi1(0),
74  coolDeltaPhi1(0),
75  coolStartPhi2(0),
76  coolDeltaPhi2(0),
77  names(0) {
78  LogDebug("TOBGeom") << "DDTOBRadCableAlgo info: Creating an instance";
79 }
vector< double > coolR2
vector< string > names
vector< string > connM
vector< double > coolR1
vector< string > cableM
vector< double > rodRin
vector< double > rodRout
#define LogDebug(id)
DDTOBRadCableAlgo::~DDTOBRadCableAlgo ( )
override

Definition at line 81 of file DDTOBRadCableAlgo.cc.

81 {}

Member Function Documentation

void DDTOBRadCableAlgo::execute ( DDCompactView cpv)
override

Definition at line 142 of file DDTOBRadCableAlgo.cc.

References cableM, cableT, connM, connT, connW, coolDeltaPhi1, coolDeltaPhi2, coolM1, coolM2, coolR1, coolR2, coolRin, coolRout1, coolRout2, coolStartPhi1, coolStartPhi2, DDSplit(), diskDz, PVValHelper::dz, first, mps_fire::i, idNameSpace, cuy::ii, LogDebug, mergeVDriftHistosByStation::name, names, SpecificationBuilder_cfi::parent(), DDSolidFactory::polycone(), DDCompactView::position(), diffTwoXMLs::r1, diffTwoXMLs::r2, rMax, rodRin, rodRout, edm::second(), DDSolidFactory::torus(), and DDSolidFactory::tubs().

142  {
143  LogDebug("TOBGeom") << "==>> Constructing DDTOBRadCableAlgo...";
144  DDName diskName = parent().name();
145 
146  // Loop over sub disks
147  for (int i = 0; i < (int)(names.size()); i++) {
148  DDSolid solid;
149  string name;
150  double dz, rin, rout;
151 
152  // Cooling Manifolds
153  name = "TOBCoolingManifold" + names[i] + "a";
154  dz = coolRout1;
155  DDName manifoldName_a(name, idNameSpace);
157  LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " << DDName(name, idNameSpace) << " Torus made of " << coolM1
158  << " from " << coolStartPhi1 / CLHEP::deg << " to "
159  << (coolStartPhi1 + coolDeltaPhi1) / CLHEP::deg << " with Rin " << coolRin << " Rout "
160  << coolRout1 << " R torus " << coolR1[i];
161  DDName coolManifoldName_a(DDSplit(coolM1).first, DDSplit(coolM1).second);
162  DDMaterial coolManifoldMatter_a(coolManifoldName_a);
163  DDLogicalPart coolManifoldLogic_a(DDName(name, idNameSpace), coolManifoldMatter_a, solid);
164 
165  DDTranslation r1(0, 0, (dz - diskDz));
166  cpv.position(DDName(name, idNameSpace), diskName, i + 1, r1, DDRotation());
167  LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " << DDName(name, idNameSpace) << " number " << i + 1
168  << " positioned in " << diskName << " at " << r1 << " with no rotation";
169  // Cooling Fluid (in Cooling Manifold)
170  name = "TOBCoolingManifoldFluid" + names[i] + "a";
171  solid =
173  LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " << DDName(name, idNameSpace) << " Torus made of " << coolM2
174  << " from " << coolStartPhi2 / CLHEP::deg << " to "
175  << (coolStartPhi2 + coolDeltaPhi2) / CLHEP::deg << " with Rin " << coolRin << " Rout "
176  << coolRout2 << " R torus " << coolR1[i];
177  DDName coolManifoldFluidName_a(DDSplit(coolM2).first, DDSplit(coolM2).second);
178  DDMaterial coolManifoldFluidMatter_a(coolManifoldFluidName_a);
179  DDLogicalPart coolManifoldFluidLogic_a(DDName(name, idNameSpace), coolManifoldFluidMatter_a, solid);
180  cpv.position(DDName(name, idNameSpace), manifoldName_a, i + 1, DDTranslation(), DDRotation());
181  LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " << DDName(name, idNameSpace) << " number " << i + 1
182  << " positioned in " << coolManifoldName_a << " with no translation and no rotation";
183  //
184  name = "TOBCoolingManifold" + names[i] + "r";
185  dz = coolRout1;
186  DDName manifoldName_r(name, idNameSpace);
188  LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " << DDName(name, idNameSpace) << " Torus made of " << coolM1
189  << " from " << coolStartPhi1 / CLHEP::deg << " to "
190  << (coolStartPhi1 + coolDeltaPhi1) / CLHEP::deg << " with Rin " << coolRin << " Rout "
191  << coolRout1 << " R torus " << coolR2[i];
192  DDName coolManifoldName_r(DDSplit(coolM1).first, DDSplit(coolM1).second);
193  DDMaterial coolManifoldMatter_r(coolManifoldName_r);
194  DDLogicalPart coolManifoldLogic_r(DDName(name, idNameSpace), coolManifoldMatter_r, solid);
195 
196  r1 = DDTranslation(0, 0, (dz - diskDz));
197  cpv.position(DDName(name, idNameSpace), diskName, i + 1, r1, DDRotation());
198  LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " << DDName(name, idNameSpace) << " number " << i + 1
199  << " positioned in " << diskName << " at " << r1 << " with no rotation";
200  // Cooling Fluid (in Cooling Manifold)
201  name = "TOBCoolingManifoldFluid" + names[i] + "r";
202  solid =
204  LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " << DDName(name, idNameSpace) << " Torus made of " << coolM2
205  << " from " << coolStartPhi2 / CLHEP::deg << " to "
206  << (coolStartPhi2 + coolDeltaPhi2) / CLHEP::deg << " with Rin " << coolRin << " Rout "
207  << coolRout2 << " R torus " << coolR2[i];
208  DDName coolManifoldFluidName_r(DDSplit(coolM2).first, DDSplit(coolM2).second);
209  DDMaterial coolManifoldFluidMatter_r(coolManifoldFluidName_r);
210  DDLogicalPart coolManifoldFluidLogic_r(DDName(name, idNameSpace), coolManifoldFluidMatter_r, solid);
211  cpv.position(DDName(name, idNameSpace), manifoldName_r, i + 1, DDTranslation(), DDRotation());
212  LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " << DDName(name, idNameSpace) << " number " << i + 1
213  << " positioned in " << coolManifoldName_r << " with no translation and no rotation";
214 
215  // Connectors
216  name = "TOBConn" + names[i];
217  dz = 0.5 * connT;
218  rin = 0.5 * (rodRin[i] + rodRout[i]) - 0.5 * connW;
219  rout = 0.5 * (rodRin[i] + rodRout[i]) + 0.5 * connW;
220  solid = DDSolidFactory::tubs(DDName(name, idNameSpace), dz, rin, rout, 0, CLHEP::twopi);
221  LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " << DDName(name, idNameSpace) << " Tubs made of " << connM[i]
222  << " from 0 to " << CLHEP::twopi / CLHEP::deg << " with Rin " << rin << " Rout " << rout
223  << " ZHalf " << dz;
224  DDName connName(DDSplit(connM[i]).first, DDSplit(connM[i]).second);
225  DDMaterial connMatter(connName);
226  DDLogicalPart connLogic(DDName(name, idNameSpace), connMatter, solid);
227 
228  DDTranslation r2(0, 0, (dz - diskDz));
229  cpv.position(DDName(name, idNameSpace), diskName, i + 1, r2, DDRotation());
230  LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " << DDName(name, idNameSpace) << " number " << i + 1
231  << " positioned in " << diskName << " at " << r2 << " with no rotation";
232 
233  // Now the radial cable
234  name = "TOBRadServices" + names[i];
235  rin = 0.5 * (rodRin[i] + rodRout[i]);
236  rout = (i + 1 == (int)(names.size()) ? rMax : 0.5 * (rodRin[i + 1] + rodRout[i + 1]));
237  vector<double> pgonZ;
238  pgonZ.emplace_back(-0.5 * cableT);
239  pgonZ.emplace_back(cableT * (rin / rMax - 0.5));
240  pgonZ.emplace_back(0.5 * cableT);
241  vector<double> pgonRmin;
242  pgonRmin.emplace_back(rin);
243  pgonRmin.emplace_back(rin);
244  pgonRmin.emplace_back(rin);
245  vector<double> pgonRmax;
246  pgonRmax.emplace_back(rout);
247  pgonRmax.emplace_back(rout);
248  pgonRmax.emplace_back(rout);
249  solid = DDSolidFactory::polycone(DDName(name, idNameSpace), 0, CLHEP::twopi, pgonZ, pgonRmin, pgonRmax);
250  LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " << DDName(name, idNameSpace) << " Polycone made of " << cableM[i]
251  << " from 0 to " << CLHEP::twopi / CLHEP::deg << " and with " << pgonZ.size() << " sections";
252  for (int ii = 0; ii < (int)(pgonZ.size()); ii++)
253  LogDebug("TOBGeom") << "\t[" << ii << "]\tZ = " << pgonZ[ii] << "\tRmin = " << pgonRmin[ii]
254  << "\tRmax = " << pgonRmax[ii];
255  DDName cableName(DDSplit(cableM[i]).first, DDSplit(cableM[i]).second);
256  DDMaterial cableMatter(cableName);
257  DDLogicalPart cableLogic(DDName(name, idNameSpace), cableMatter, solid);
258 
259  DDTranslation r3(0, 0, (diskDz - (i + 0.5) * cableT));
260  cpv.position(DDName(name, idNameSpace), diskName, i + 1, r3, DDRotation());
261  LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " << DDName(name, idNameSpace) << " number " << i + 1
262  << " positioned in " << diskName << " at " << r3 << " with no rotation";
263  }
264 
265  LogDebug("TOBGeom") << "<<== End of DDTOBRadCableAlgo construction ...";
266 }
static DDSolid torus(const DDName &name, double rMin, double rMax, double rTorus, double startPhi, double deltaPhi)
Definition: DDSolid.cc:662
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string &copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:45
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:551
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:17
int ii
Definition: cuy.py:589
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:57
U second(std::pair< T, U > const &p)
vector< double > coolR2
vector< string > names
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:93
static DDSolid tubs(const DDName &name, double zhalf, double rIn, double rOut, double startPhi, double deltaPhi)
Definition: DDSolid.cc:667
vector< string > connM
vector< double > coolR1
vector< string > cableM
vector< double > rodRin
vector< double > rodRout
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = &#39;:&#39;
Definition: DDSplit.cc:3
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
#define LogDebug(id)
void DDTOBRadCableAlgo::initialize ( const DDNumericArguments nArgs,
const DDVectorArguments vArgs,
const DDMapArguments mArgs,
const DDStringArguments sArgs,
const DDStringVectorArguments vsArgs 
)
override

Definition at line 83 of file DDTOBRadCableAlgo.cc.

References cableM, cableT, connM, connT, connW, coolDeltaPhi1, coolDeltaPhi2, coolM1, coolM2, coolR1, coolR2, coolRin, coolRout1, coolRout2, coolStartPhi1, coolStartPhi2, diskDz, mps_fire::i, idNameSpace, LogDebug, names, DDCurrentNamespace::ns(), SpecificationBuilder_cfi::parent(), rMax, rodRin, and rodRout.

87  {
89  DDName parentName = parent().name();
90  LogDebug("TOBGeom") << "DDTOBRadCableAlgo debug: Parent " << parentName << " NameSpace " << idNameSpace;
91 
92  diskDz = nArgs["DiskDz"];
93  rMax = nArgs["RMax"];
94  cableT = nArgs["CableT"];
95  rodRin = vArgs["RodRin"];
96  rodRout = vArgs["RodRout"];
97  cableM = vsArgs["CableMaterial"];
98  LogDebug("TOBGeom") << "DDTOBRadCableAlgo debug: Disk Half width " << diskDz << "\tRMax " << rMax
99  << "\tCable Thickness " << cableT << "\tRadii of disk position and cable materials:";
100  for (int i = 0; i < (int)(rodRin.size()); i++)
101  LogDebug("TOBGeom") << "\t[" << i << "]\tRin = " << rodRin[i] << "\tRout = " << rodRout[i] << " " << cableM[i];
102 
103  connW = nArgs["ConnW"];
104  connT = nArgs["ConnT"];
105  connM = vsArgs["ConnMaterial"];
106  LogDebug("TOBGeom") << "DDTOBRadCableAlgo debug: Connector Width = " << connW << "\tThickness = " << connT
107  << "\tMaterials: ";
108  for (int i = 0; i < (int)(connM.size()); i++)
109  LogDebug("TOBGeom") << "\tconnM[" << i << "] = " << connM[i];
110 
111  coolR1 = vArgs["CoolR1"];
112  coolR2 = vArgs["CoolR2"];
113  coolRin = nArgs["CoolRin"];
114  coolRout1 = nArgs["CoolRout1"];
115  coolRout2 = nArgs["CoolRout2"];
116  coolStartPhi1 = nArgs["CoolStartPhi1"];
117  coolDeltaPhi1 = nArgs["CoolDeltaPhi1"];
118  coolStartPhi2 = nArgs["CoolStartPhi2"];
119  coolDeltaPhi2 = nArgs["CoolDeltaPhi2"];
120  coolM1 = sArgs["CoolMaterial1"];
121  coolM2 = sArgs["CoolMaterial2"];
122  LogDebug("TOBGeom") << "DDTOBRadCableAlgo debug: Cool Manifold Torus Rin = " << coolRin << " Rout = " << coolRout1
123  << "\t Phi start = " << coolStartPhi1 << " Phi Range = " << coolDeltaPhi1
124  << "\t Material = " << coolM1 << "\t Radial positions:";
125  for (int i = 0; i < (int)(coolR1.size()); i++)
126  LogDebug("TOBGeom") << "\t[" << i << "]\tR = " << coolR1[i];
127  for (int i = 0; i < (int)(coolR2.size()); i++)
128  LogDebug("TOBGeom") << "\t[" << i << "]\tR = " << coolR2[i];
129  LogDebug("TOBGeom") << "DDTOBRadCableAlgo debug: Cooling Fluid Torus Rin = " << coolRin << " Rout = " << coolRout2
130  << "\t Phi start = " << coolStartPhi2 << " Phi Range = " << coolDeltaPhi2
131  << "\t Material = " << coolM2 << "\t Radial positions:";
132  for (int i = 0; i < (int)(coolR1.size()); i++)
133  LogDebug("TOBGeom") << "\t[" << i << "]\tR = " << coolR1[i];
134  for (int i = 0; i < (int)(coolR2.size()); i++)
135  LogDebug("TOBGeom") << "\t[" << i << "]\tR = " << coolR2[i];
136 
137  names = vsArgs["RingName"];
138  for (int i = 0; i < (int)(names.size()); i++)
139  LogDebug("TOBGeom") << "DDTOBRadCableAlgo debug: names[" << i << "] = " << names[i];
140 }
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:17
static std::string & ns()
vector< double > coolR2
vector< string > names
vector< string > connM
vector< double > coolR1
vector< string > cableM
vector< double > rodRin
vector< double > rodRout
#define LogDebug(id)

Member Data Documentation

vector<string> DDTOBRadCableAlgo::cableM
private

Definition at line 45 of file DDTOBRadCableAlgo.cc.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::cableT
private

Definition at line 42 of file DDTOBRadCableAlgo.cc.

Referenced by execute(), and initialize().

vector<string> DDTOBRadCableAlgo::connM
private

Definition at line 48 of file DDTOBRadCableAlgo.cc.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::connT
private

Definition at line 47 of file DDTOBRadCableAlgo.cc.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::connW
private

Definition at line 46 of file DDTOBRadCableAlgo.cc.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::coolDeltaPhi1
private

Definition at line 55 of file DDTOBRadCableAlgo.cc.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::coolDeltaPhi2
private

Definition at line 57 of file DDTOBRadCableAlgo.cc.

Referenced by execute(), and initialize().

string DDTOBRadCableAlgo::coolM1
private

Definition at line 58 of file DDTOBRadCableAlgo.cc.

Referenced by execute(), and initialize().

string DDTOBRadCableAlgo::coolM2
private

Definition at line 59 of file DDTOBRadCableAlgo.cc.

Referenced by execute(), and initialize().

vector<double> DDTOBRadCableAlgo::coolR1
private

Definition at line 49 of file DDTOBRadCableAlgo.cc.

Referenced by execute(), and initialize().

vector<double> DDTOBRadCableAlgo::coolR2
private

Definition at line 50 of file DDTOBRadCableAlgo.cc.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::coolRin
private

Definition at line 51 of file DDTOBRadCableAlgo.cc.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::coolRout1
private

Definition at line 52 of file DDTOBRadCableAlgo.cc.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::coolRout2
private

Definition at line 53 of file DDTOBRadCableAlgo.cc.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::coolStartPhi1
private

Definition at line 54 of file DDTOBRadCableAlgo.cc.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::coolStartPhi2
private

Definition at line 56 of file DDTOBRadCableAlgo.cc.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::diskDz
private

Definition at line 40 of file DDTOBRadCableAlgo.cc.

Referenced by execute(), and initialize().

string DDTOBRadCableAlgo::idNameSpace
private

Definition at line 38 of file DDTOBRadCableAlgo.cc.

Referenced by execute(), and initialize().

vector<string> DDTOBRadCableAlgo::names
private

Definition at line 60 of file DDTOBRadCableAlgo.cc.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::rMax
private

Definition at line 41 of file DDTOBRadCableAlgo.cc.

Referenced by execute(), and initialize().

vector<double> DDTOBRadCableAlgo::rodRin
private

Definition at line 43 of file DDTOBRadCableAlgo.cc.

Referenced by execute(), and initialize().

vector<double> DDTOBRadCableAlgo::rodRout
private

Definition at line 44 of file DDTOBRadCableAlgo.cc.

Referenced by execute(), and initialize().