16 #include "CLHEP/Units/PhysicalConstants.h" 17 #include "CLHEP/Units/SystemOfUnits.h" 21 LogDebug(
"PixelGeom") <<
"DDPixBarLayerUpgradeAlgo info: Creating an instance";
35 genMat = sArgs[
"GeneralMaterial"];
44 coolMat = sArgs[
"CoolMaterial"];
45 tubeMat = sArgs[
"CoolTubeMaterial"];
53 LogDebug(
"PixelGeom") <<
"DDPixBarLayerUpgradeAlgo debug: Parent " << parentName
55 <<
"\tLadders " <<
number <<
"\tGeneral Material " 56 <<
genMat <<
"\tLength " <<
layerDz <<
"\tSpecification of Cooling Pieces:\n" 57 <<
"\tLength " <<
coolDz <<
" Thickness of Shell " 61 ladder = sArgs[
"LadderName"];
67 LogDebug(
"PixelGeom") <<
"DDPixBarLayerUpgradeAlgo debug: Full Ladder " 77 double dphi = CLHEP::twopi/
number;
83 rtmi, rtmx, 0, CLHEP::twopi);
84 LogDebug(
"PixelGeom") <<
"DDPixBarLayerUpgradeAlgo test: " 86 <<
genMat <<
" from 0 to " << CLHEP::twopi/CLHEP::deg
87 <<
" with Rin " << rtmi <<
" Rout " << rtmx
97 LogDebug(
"PixelGeom") <<
"DDPixBarLayerUpgradeAlgo test: " <<solid.
name()
98 <<
" Tubs made of " <<
tubeMat <<
" from 0 to " <<
99 CLHEP::twopi/CLHEP::deg <<
" with Rout " <<
coolRadius <<
105 name = idName +
"CoolTubeHalf";
108 LogDebug(
"PixelGeom") <<
"DDPixBarLayerUpgradeAlgo test: " <<solid.
name()
109 <<
" Tubs made of " <<
tubeMatHalf <<
" from 0 to " <<
110 CLHEP::twopi/CLHEP::deg <<
" with Rout " <<
coolRadius <<
116 name = idName +
"Coolant";
119 LogDebug(
"PixelGeom") <<
"DDPixBarLayerUpgradeAlgo test: " <<solid.
name()
120 <<
" Tubs made of " <<
tubeMat <<
" from 0 to " <<
126 LogDebug(
"PixelGeom") <<
"DDPixBarLayerUpgradeAlgo test: " << cool.name()
127 <<
" number 1 positioned in " << coolTube.name()
128 <<
" at (0,0,0) with no rotation";
131 name = idName +
"CoolantHalf";
134 LogDebug(
"PixelGeom") <<
"DDPixBarLayerUpgradeAlgo test: " <<solid.
name()
135 <<
" Tubs made of " <<
tubeMatHalf <<
" from 0 to " <<
141 LogDebug(
"PixelGeom") <<
"DDPixBarLayerUpgradeAlgo test: " << cool.name()
142 <<
" number 1 positioned in " << coolTube.name()
143 <<
" at (0,0,0) with no rotation";
150 double phix, phiy, rrr, rrroffset;
156 if ((
i==1)||(
i==number/2+1)) {
167 rots = idName + std::to_string(copy);
168 if (iup > 0) phix = phi-90*CLHEP::deg;
169 else phix = phi+90*CLHEP::deg;
170 phiy = phix+90.*CLHEP::deg;
171 LogDebug(
"PixelGeom") <<
"DDPixBarLayerUpgradeAlgo test: Creating a new " 172 <<
"rotation: " << rots <<
"\t90., " << phix/CLHEP::deg
173 <<
", 90.," << phiy/CLHEP::deg <<
", 0, 0";
175 cpv.
position (ladderFull, layer, copy, tran, rot);
176 LogDebug(
"PixelGeom") <<
"DDPixBarLayerUpgradeAlgo test: " << ladderFull
177 <<
" number " << copy <<
" positioned in " 178 << layer.
name() <<
" at " << tran <<
" with " 182 rots = idName + std::to_string(
i+100);
183 phix = phi + 90.*CLHEP::deg;
184 if(iup < 0) phix += dphi;
185 phiy = phix+90.*CLHEP::deg;
186 LogDebug(
"PixelGeom") <<
"DDPixBarLayerUpgradeAlgo test: Creating a new " 187 <<
"rotation: " << rots <<
"\t90., " << phix/CLHEP::deg
188 <<
", 90.," << phiy/CLHEP::deg <<
", 0, 0";
191 cpv.
position (coolTubeHalf, layer,
i+1, tran, rot);
192 if ((
i==1)||(
i==number/2+1)){
203 LogDebug(
"PixelGeom") <<
"DDPixBarLayerUpgradeAlgo test: " << coolTube.name()
204 <<
" number " <<
i+1 <<
" positioned in " 205 << layer.name() <<
" at " << tran <<
" with "<<
rot;
DDMaterial is used to define and access material information.
Sin< T >::type sin(const T &t)
DDName is used to identify DDD entities uniquely.
static std::string & ns()
type of data representation of DDCompactView
A DDSolid represents the shape of a part.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Represents a uniquely identifyable rotation matrix.
U second(std::pair< T, U > const &p)
Cos< T >::type cos(const T &t)
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
static DDSolid tubs(const DDName &name, double zhalf, double rIn, double rOut, double startPhi, double deltaPhi)
void execute(DDCompactView &cpv) override
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=0)
DDPixBarLayerUpgradeAlgo()
~DDPixBarLayerUpgradeAlgo() override
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
const std::string & name() const
Returns the name.