14 #include "GeoModelKernel/GeoDefinitions.h"
15 #include "GeoModelKernel/GeoMaterial.h"
16 #include "GeoModelKernel/GeoBox.h"
17 #include "GeoModelKernel/GeoTube.h"
18 #include "GeoModelKernel/GeoLogVol.h"
19 #include "GeoModelKernel/GeoNameTag.h"
20 #include "GeoModelKernel/GeoPhysVol.h"
21 #include "GeoModelKernel/GeoFullPhysVol.h"
22 #include "GeoModelKernel/GeoTransform.h"
23 #include "GeoModelKernel/GeoSerialDenominator.h"
24 #include "GeoModelKernel/GeoAlignableTransform.h"
25 #include "GeoModelKernel/GeoSerialTransformer.h"
27 #include "GeoGenericFunctions/AbsFunction.h"
28 #include "GeoGenericFunctions/Variable.h"
29 #include "GeoGenericFunctions/Sin.h"
30 #include "GeoGenericFunctions/Cos.h"
34 #include "GeoModelKernel/Units.h"
35 #define SYSTEM_OF_UNITS GeoModelKernelUnits // --> 'GeoModelKernelUnits::cm'
37 #include "GaudiKernel/SystemOfUnits.h"
38 #define SYSTEM_OF_UNITS Gaudi::Units // --> 'Gaudi::Units::cm'
44 using namespace GeoXF;
48 :m_detectorManager(NULL),
68 if (StatusCode::SUCCESS !=
m_detectorStore->retrieve(materialManager, std::string(
"MATERIALS"))) {
77 #if defined BUILDVP1LIGHT
79 double densityOfAir=0.1, densityOfPolystyrene=0.2;
80 const GeoMaterial *air =
new GeoMaterial(
"Air Toy",densityOfAir);
81 const GeoMaterial *
poly =
new GeoMaterial(
"std::Polystyrene",densityOfPolystyrene);
84 const GeoMaterial *air = materialManager->
getMaterial(
"std::Air");
85 const GeoMaterial *
poly = materialManager->
getMaterial(
"std::Polystyrene");
95 const GeoLogVol *toyLog =
new GeoLogVol(
"ToyLog", toyBox, air);
99 GeoPhysVol *toyPhys =
new GeoPhysVol(toyLog);
114 const GeoLogVol *ringLog =
new GeoLogVol(
"RingLog", ringTube, air);
118 GeoSerialDenominator *ringName =
new GeoSerialDenominator(
"RING");
119 toyPhys->add(ringName);
120 for (
int i=0;
i<100;
i++) {
121 GeoFullPhysVol *ringPhys =
new GeoFullPhysVol(ringLog);
122 GeoAlignableTransform *xform =
new GeoAlignableTransform(GeoTrf::TranslateZ3D((
i-50)*20*
SYSTEM_OF_UNITS::cm));
124 toyPhys->add(ringPhys);
138 GeoLogVol *lPass =
new GeoLogVol(
"Passive", sPass,
poly);
139 GeoPhysVol *pPass =
new GeoPhysVol(lPass);
142 GeoLogVol *lIPass =
new GeoLogVol(
"InnerPassive", sIPass, air);
143 GeoPhysVol *pIPass =
new GeoPhysVol(lIPass);
147 const unsigned int NPLATES=100;
151 GENFUNCTION
g =
sin(4*
f);
161 GeoSerialDenominator *pass1Name =
new GeoSerialDenominator(
"PASSIVE-1-");
162 GeoSerialTransformer *
s1 =
new GeoSerialTransformer(pPass,&
t1, NPLATES);
163 toyPhys->add(pass1Name);
166 GeoSerialDenominator *pass2Name =
new GeoSerialDenominator(
"PASSIVE-2-");
167 GeoSerialTransformer *
s2 =
new GeoSerialTransformer(pPass,&
t2, NPLATES);
168 toyPhys->add(pass2Name);
174 GeoNameTag *
tag =
new GeoNameTag(
"Toy");