8 #include "GeoModelKernel/GeoMaterial.h"
9 #include "GeoModelKernel/GeoBox.h"
10 #include "GeoModelKernel/GeoLogVol.h"
11 #include "GeoModelKernel/GeoNameTag.h"
12 #include "GeoModelKernel/GeoPhysVol.h"
13 #include "GeoModelKernel/GeoFullPhysVol.h"
14 #include "GeoModelKernel/GeoTransform.h"
15 #include "GeoModelKernel/GeoAlignableTransform.h"
17 #include "CLHEP/GenericFunctions/AbsFunction.hh"
18 #include "CLHEP/GenericFunctions/Variable.hh"
19 #include "CLHEP/GenericFunctions/Sin.hh"
20 #include "CLHEP/GenericFunctions/Cos.hh"
38 using namespace CLHEP;
58 const double fWl2E=1239.85;
63 if (StatusCode::SUCCESS !=
m_pDetectorStore->retrieve(materialManager, std::string(
"MATERIALS")))
68 double aH,aC,aN,aSi,aP,aS,aCr,aMn,aFe,aNi,aMo,aAl,aO,Atot;
69 const GeoElement*
H = materialManager->
getElement(
"Hydrogen");
70 const GeoElement*
C = materialManager->
getElement(
"Carbon");
71 const GeoElement*
N = materialManager->
getElement(
"Nitrogen");
72 const GeoElement* Si = materialManager->
getElement(
"Silicon");
73 const GeoElement*
P = materialManager->
getElement(
"Phosphorus");
74 const GeoElement*
S = materialManager->
getElement(
"Sulfur");
75 const GeoElement* Cr = materialManager->
getElement(
"Chromium");
76 const GeoElement* Mn = materialManager->
getElement(
"Manganese");
77 const GeoElement* Fe = materialManager->
getElement(
"Iron");
78 const GeoElement* Ni = materialManager->
getElement(
"Nickel");
79 const GeoElement* Mo = materialManager->
getElement(
"Molybdenum");
80 const GeoElement* Al = materialManager->
getElement(
"Aluminium");
81 const GeoElement* O = materialManager->
getElement(
"Oxygen");
82 const GeoElement* Be = materialManager->
getElement(
"Beryllium");
85 matName =
"std::Vacuum";
86 const GeoMaterial *vacuum = materialManager->
getMaterial(matName);
90 matName =
"OpticalVacuum";
92 pMatOptVacuum->add(
const_cast<GeoElement*
> (
H), 1);
94 double RefractiveIndexOptVac[2] = {1.0, 1.0};
98 pMPT->
AddProperty(
"RINDEX", PhotonEnergyOptVac, RefractiveIndexOptVac , 2);
99 pMPT->
AddProperty(
"ABSLENGTH", PhotonEnergyOptVac, AbsorptionOptVac, 2);
101 pMatOptVacuum->lock();
106 GeoMaterial *steel=
new GeoMaterial(matName, 8*
g/
cm3);
118 Atot=aFe+aC+aMn+aSi+aP+aS+aCr+aMo+aNi+aN;
120 steel->add(
const_cast<GeoElement*
> (Fe),aFe/Atot);
121 steel->add(
const_cast<GeoElement*
> (
C), aC/Atot);
122 steel->add(
const_cast<GeoElement*
> (Mn),aMn/Atot);
123 steel->add(
const_cast<GeoElement*
> (Si),aSi/Atot);
124 steel->add(
const_cast<GeoElement*
> (
P), aP/Atot);
125 steel->add(
const_cast<GeoElement*
> (
S), aS/Atot);
126 steel->add(
const_cast<GeoElement*
> (Cr),aCr/Atot);
127 steel->add(
const_cast<GeoElement*
> (Mo),aMo/Atot);
128 steel->add(
const_cast<GeoElement*
> (Ni),aNi/Atot);
129 steel->add(
const_cast<GeoElement*
> (
N), aN/Atot);
135 GeoMaterial *pMatCE7=
new GeoMaterial(matName, 2.4*
g/
cm3);
136 aSi=0.70*Si->getA()/(
g/
mole);
137 aAl=0.30*Al->getA()/(
g/
mole);
139 pMatCE7->add(
const_cast<GeoElement*
> (Si),aSi/Atot);
140 pMatCE7->add(
const_cast<GeoElement*
> (Al),aAl/Atot);
147 aSi=1.0*Si->getA()/(
g/
mole);
148 aO=2.0*O->getA()/(
g/
mole);
150 pMatQuartz->add(
const_cast<GeoElement*
> (Si),aSi/Atot);
151 pMatQuartz->add(
const_cast<GeoElement*
> (O),aO/Atot);
154 const int nEntriesCnt1=12;
155 double arrEnergy1[nEntriesCnt1] = { 750.0*
nm, 700.0*
nm, 650.0*
nm, 600.0*
nm, 550.0*
nm, 500.0*
nm, 450.0*
nm, 400.0*
nm, 350.0*
nm, 300.0*
nm, 250.0*
nm, 200.0*
nm };
156 double arrQuartzRefIndex[nEntriesCnt1] = { 1.450, 1.455, 1.456, 1.458, 1.460, 1.462, 1.465, 1.470, 1.475, 1.488, 1.510, 1.541 };
157 double arrQuartzAbsLength[nEntriesCnt1] = { 130.0*
cm, 130.0*
cm, 130.0*
cm, 130.0*
cm, 128.0*
cm, 125.0*
cm, 122.0*
cm, 120.0*
cm, 111.0*
cm, 104.0*
cm, 95.0*
cm, 83.3*
cm };
158 for(
i=0;
i<nEntriesCnt1;
i++) arrEnergy1[
i]=(fWl2E/(arrEnergy1[
i]/
nm))*
eV;
161 pMPT->
AddProperty(
"RINDEX", arrEnergy1, arrQuartzRefIndex, nEntriesCnt1);
162 pMPT->
AddProperty(
"ABSLENGTH", arrEnergy1, arrQuartzAbsLength, nEntriesCnt1);
168 matName=
"SiliconPMT";
170 aSi=1.0*Si->getA()/(
g/
mole);
171 pMatSiliconPMT->add(
const_cast<GeoElement*
> (Si),1.0);
173 const int nEntriesCnt2=2;
174 double arrEnergy2[nEntriesCnt2] = { 2800.0*
nm, 190.0*
nm };
175 double arrSiliconRefIndex[nEntriesCnt2] = { 4.0, 4.0 };
176 double arrSiliconAbsLength[nEntriesCnt2] = { 0.00001*
m, 0.00001*
m };
177 for(
i=0;
i<nEntriesCnt2;
i++) arrEnergy2[
i]=(fWl2E/(arrEnergy2[
i]/
nm))*
eV;
180 pMPT->
AddProperty(
"RINDEX", arrEnergy2, arrSiliconRefIndex, nEntriesCnt2);
181 pMPT->
AddProperty(
"ABSLENGTH", arrEnergy2, arrSiliconAbsLength, nEntriesCnt2);
183 pMatSiliconPMT->lock();
189 GeoMaterial *pMatSilicon=
new GeoMaterial(matName, 2.3290*
g/
cm3);
190 aSi=1.0*Si->getA()/(
g/
mole);
191 pMatSilicon->add(
const_cast<GeoElement*
> (Si),1.0);
197 GeoMaterial *pMatWater=
new GeoMaterial(matName, 1.0*
g/
cm3);
198 aH=0.11*Si->getA()/(
g/
mole);
199 aO=0.89*Al->getA()/(
g/
mole);
201 pMatWater->add(
const_cast<GeoElement*
> (
H),aH/Atot);
202 pMatWater->add(
const_cast<GeoElement*
> (O),aO/Atot);
207 matName=
"Beryllium_AFP";
210 pMaterialBe->add(
const_cast<GeoElement*
> (Be), 1);
236 const GeoLogVol* pLogLongEnv =
new GeoLogVol(
"AFP00_LogStationEnv", pBoxLongEnv,
m_MapMaterials[std::string(
"OpticalVacuum")]);
238 sprintf(szLabel,
"AFP00_StationEnv");
240 world->add(
new GeoNameTag(szLabel));
241 world->add(pPhysLongEnv);
261 const GeoLogVol* pLogShortEnv =
new GeoLogVol(
"AFP01_LogStationEnv", pBoxShortEnv,
m_MapMaterials[std::string(
"std::Vacuum")]);
262 GeoPhysVol* pPhysShortEnv =
new GeoPhysVol(pLogShortEnv);
263 sprintf(szLabel,
"AFP01_StationEnv");
265 world->add(
new GeoNameTag(szLabel));
266 world->add(pPhysShortEnv);
271 addRomanPot(pPhysShortEnv,
"AFP01",PosElementInEnv);
282 const GeoLogVol* pLogShortEnv1 =
new GeoLogVol(
"AFP02_LogStationEnv", pBoxShortEnv1,
m_MapMaterials[std::string(
"std::Vacuum")]);
283 GeoPhysVol* pPhysShortEnv1 =
new GeoPhysVol(pLogShortEnv1);
284 sprintf(szLabel,
"AFP02_StationEnv");
286 world->add(
new GeoNameTag(szLabel));
287 world->add(pPhysShortEnv1);
292 addRomanPot(pPhysShortEnv1,
"AFP02",PosElementInEnv);
303 const GeoLogVol* pLogLongEnv1 =
new GeoLogVol(
"AFP03_LogStationEnv", pBoxLongEnv1,
m_MapMaterials[std::string(
"OpticalVacuum")]);
305 sprintf(szLabel,
"AFP03_StationEnv");
307 world->add(
new GeoNameTag(szLabel));
308 world->add(pPhysLongEnv1);
313 addRomanPot( pPhysLongEnv1,
"AFP03",PosElementInEnv);
329 if (SCode.isFailure()){