CMS 3D CMS Logo

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

#include <DDTOBRadCableAlgo.h>

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

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

Detailed Description

Definition at line 10 of file DDTOBRadCableAlgo.h.

Constructor & Destructor Documentation

DDTOBRadCableAlgo::DDTOBRadCableAlgo ( )

Definition at line 20 of file DDTOBRadCableAlgo.cc.

References LogDebug.

20  :
21  rodRin(0),rodRout(0),cableM(0),connM(0),
22  coolR1(0),coolR2(0),coolRin(0),coolRout1(0),coolRout2(0),
25  names(0) {
26  LogDebug("TOBGeom") <<"DDTOBRadCableAlgo info: Creating an instance";
27 }
#define LogDebug(id)
std::vector< double > rodRout
std::vector< double > coolR2
std::vector< double > rodRin
std::vector< std::string > names
std::vector< double > coolR1
std::vector< std::string > connM
std::vector< std::string > cableM
DDTOBRadCableAlgo::~DDTOBRadCableAlgo ( )
override

Definition at line 29 of file DDTOBRadCableAlgo.cc.

29 {}

Member Function Documentation

void DDTOBRadCableAlgo::execute ( DDCompactView cpv)
override

Definition at line 100 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, plotBeamSpotDB::first, mps_fire::i, idNameSpace, cuy::ii, createfilelist::int, LogDebug, dataset::name, names, class-composition::parent, DDSolidFactory::polycone(), DDCompactView::position(), diffTwoXMLs::r1, diffTwoXMLs::r2, rMax, rodRin, rodRout, edm::second(), AlCaHLTBitMon_QueryRunRegistry::string, DDSolidFactory::torus(), and DDSolidFactory::tubs().

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

Definition at line 31 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, createfilelist::int, LogDebug, names, DDCurrentNamespace::ns(), class-composition::parent, rMax, rodRin, and rodRout.

35  {
36 
38  DDName parentName = parent().name();
39  LogDebug("TOBGeom") << "DDTOBRadCableAlgo debug: Parent " << parentName
40  << " NameSpace " << idNameSpace;
41 
42  diskDz = nArgs["DiskDz"];
43  rMax = nArgs["RMax"];
44  cableT = nArgs["CableT"];
45  rodRin = vArgs["RodRin"];
46  rodRout = vArgs["RodRout"];
47  cableM = vsArgs["CableMaterial"];
48  LogDebug("TOBGeom") << "DDTOBRadCableAlgo debug: Disk Half width " << diskDz
49  << "\tRMax " << rMax << "\tCable Thickness " << cableT
50  << "\tRadii of disk position and cable materials:";
51  for (int i=0; i<(int)(rodRin.size()); i++)
52  LogDebug("TOBGeom") << "\t[" << i << "]\tRin = " << rodRin[i]
53  << "\tRout = " << rodRout[i] << " " << cableM[i];
54 
55  connW = nArgs["ConnW"];
56  connT = nArgs["ConnT"];
57  connM = vsArgs["ConnMaterial"];
58  LogDebug("TOBGeom") << "DDTOBRadCableAlgo debug: Connector Width = "
59  << connW << "\tThickness = " << connT
60  << "\tMaterials: ";
61  for (int i=0; i<(int)(connM.size()); i++)
62  LogDebug("TOBGeom") << "\tconnM[" << i << "] = " << connM[i];
63 
64  coolR1 = vArgs["CoolR1"];
65  coolR2 = vArgs["CoolR2"];
66  coolRin = nArgs["CoolRin"];
67  coolRout1 = nArgs["CoolRout1"];
68  coolRout2 = nArgs["CoolRout2"];
69  coolStartPhi1 = nArgs["CoolStartPhi1"];
70  coolDeltaPhi1 = nArgs["CoolDeltaPhi1"];
71  coolStartPhi2 = nArgs["CoolStartPhi2"];
72  coolDeltaPhi2 = nArgs["CoolDeltaPhi2"];
73  coolM1 = sArgs["CoolMaterial1"];
74  coolM2 = sArgs["CoolMaterial2"];
75  LogDebug("TOBGeom") << "DDTOBRadCableAlgo debug: Cool Manifold Torus Rin = " << coolRin
76  << " Rout = " << coolRout1
77  << "\t Phi start = " << coolStartPhi1 << " Phi Range = " << coolDeltaPhi1
78  << "\t Material = " << coolM1
79  << "\t Radial positions:";
80  for (int i=0; i<(int)(coolR1.size()); i++)
81  LogDebug("TOBGeom") << "\t[" << i <<"]\tR = " << coolR1[i];
82  for (int i=0; i<(int)(coolR2.size()); i++)
83  LogDebug("TOBGeom") << "\t[" << i <<"]\tR = " << coolR2[i];
84  LogDebug("TOBGeom") << "DDTOBRadCableAlgo debug: Cooling Fluid Torus Rin = " << coolRin
85  << " Rout = " << coolRout2
86  << "\t Phi start = " << coolStartPhi2 << " Phi Range = " << coolDeltaPhi2
87  << "\t Material = " << coolM2
88  << "\t Radial positions:";
89  for (int i=0; i<(int)(coolR1.size()); i++)
90  LogDebug("TOBGeom") << "\t[" << i <<"]\tR = " << coolR1[i];
91  for (int i=0; i<(int)(coolR2.size()); i++)
92  LogDebug("TOBGeom") << "\t[" << i <<"]\tR = " << coolR2[i];
93 
94  names = vsArgs["RingName"];
95  for (int i=0; i<(int)(names.size()); i++)
96  LogDebug("TOBGeom") << "DDTOBRadCableAlgo debug: names[" << i
97  << "] = " << names[i];
98 }
#define LogDebug(id)
std::vector< double > rodRout
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
std::vector< double > coolR2
static std::string & ns()
std::vector< double > rodRin
std::vector< std::string > names
std::string idNameSpace
std::vector< double > coolR1
std::vector< std::string > connM
std::vector< std::string > cableM

Member Data Documentation

std::vector<std::string> DDTOBRadCableAlgo::cableM
private

Definition at line 33 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::cableT
private

Definition at line 30 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

std::vector<std::string> DDTOBRadCableAlgo::connM
private

Definition at line 36 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::connT
private

Definition at line 35 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::connW
private

Definition at line 34 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::coolDeltaPhi1
private

Definition at line 43 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::coolDeltaPhi2
private

Definition at line 45 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

std::string DDTOBRadCableAlgo::coolM1
private

Definition at line 46 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

std::string DDTOBRadCableAlgo::coolM2
private

Definition at line 47 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

std::vector<double> DDTOBRadCableAlgo::coolR1
private

Definition at line 37 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

std::vector<double> DDTOBRadCableAlgo::coolR2
private

Definition at line 38 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::coolRin
private

Definition at line 39 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::coolRout1
private

Definition at line 40 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::coolRout2
private

Definition at line 41 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::coolStartPhi1
private

Definition at line 42 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::coolStartPhi2
private

Definition at line 44 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::diskDz
private

Definition at line 28 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

std::string DDTOBRadCableAlgo::idNameSpace
private

Definition at line 26 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

std::vector<std::string> DDTOBRadCableAlgo::names
private

Definition at line 48 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::rMax
private

Definition at line 29 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

std::vector<double> DDTOBRadCableAlgo::rodRin
private

Definition at line 31 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

std::vector<double> DDTOBRadCableAlgo::rodRout
private

Definition at line 32 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().