6 #include "GeoModelKernel/GeoMaterial.h"
7 #include "GeoModelKernel/GeoBox.h"
8 #include "GeoModelKernel/GeoLogVol.h"
9 #include "GeoModelKernel/GeoNameTag.h"
10 #include "GeoModelKernel/GeoPhysVol.h"
11 #include "GeoModelKernel/GeoFullPhysVol.h"
12 #include "GeoModelKernel/GeoTransform.h"
13 #include "GeoModelKernel/GeoAlignableTransform.h"
14 #include "CLHEP/GenericFunctions/AbsFunction.hh"
15 #include "CLHEP/GenericFunctions/Variable.hh"
16 #include "CLHEP/GenericFunctions/Sin.hh"
17 #include "CLHEP/GenericFunctions/Cos.hh"
42 using namespace CLHEP;
45 :m_pDetectorManager(nullptr), m_pDetectorStore(
detStore), m_addSeparationWindow(false)
62 const double fWl2E=1239.85;
67 if (StatusCode::SUCCESS !=
m_pDetectorStore->retrieve(materialManager, std::string(
"MATERIALS")))
72 double aH,aC,aN,aSi,aP,aS,aCr,aMn,aFe,aNi,aMo,aAl,aO,Atot;
73 const GeoElement*
H = materialManager->
getElement(
"Hydrogen");
74 const GeoElement*
C = materialManager->
getElement(
"Carbon");
75 const GeoElement*
N = materialManager->
getElement(
"Nitrogen");
76 const GeoElement* Si = materialManager->
getElement(
"Silicon");
77 const GeoElement*
P = materialManager->
getElement(
"Phosphorus");
78 const GeoElement*
S = materialManager->
getElement(
"Sulfur");
79 const GeoElement* Cr = materialManager->
getElement(
"Chromium");
80 const GeoElement* Mn = materialManager->
getElement(
"Manganese");
81 const GeoElement* Fe = materialManager->
getElement(
"Iron");
82 const GeoElement* Ni = materialManager->
getElement(
"Nickel");
83 const GeoElement* Mo = materialManager->
getElement(
"Molybdenum");
84 const GeoElement* Al = materialManager->
getElement(
"Aluminium");
85 const GeoElement* O = materialManager->
getElement(
"Oxygen");
86 const GeoElement* Be = materialManager->
getElement(
"Beryllium");
89 matName =
"std::Vacuum";
90 const GeoMaterial *vacuum = materialManager->
getMaterial(matName);
94 matName =
"OpticalVacuum";
96 pMatOptVacuum->add(
const_cast<GeoElement*
> (
H), 1);
98 double RefractiveIndexOptVac[2] = {1.0, 1.0};
102 pMPT->
AddProperty(
"RINDEX", PhotonEnergyOptVac, RefractiveIndexOptVac , 2);
103 pMPT->
AddProperty(
"ABSLENGTH", PhotonEnergyOptVac, AbsorptionOptVac, 2);
105 pMatOptVacuum->lock();
110 GeoMaterial *steel=
new GeoMaterial(matName, 8*
g/
cm3);
122 Atot=aFe+aC+aMn+aSi+aP+aS+aCr+aMo+aNi+aN;
124 steel->add(
const_cast<GeoElement*
> (Fe),aFe/Atot);
125 steel->add(
const_cast<GeoElement*
> (
C), aC/Atot);
126 steel->add(
const_cast<GeoElement*
> (Mn),aMn/Atot);
127 steel->add(
const_cast<GeoElement*
> (Si),aSi/Atot);
128 steel->add(
const_cast<GeoElement*
> (
P), aP/Atot);
129 steel->add(
const_cast<GeoElement*
> (
S), aS/Atot);
130 steel->add(
const_cast<GeoElement*
> (Cr),aCr/Atot);
131 steel->add(
const_cast<GeoElement*
> (Mo),aMo/Atot);
132 steel->add(
const_cast<GeoElement*
> (Ni),aNi/Atot);
133 steel->add(
const_cast<GeoElement*
> (
N), aN/Atot);
139 GeoMaterial *pMatCE7=
new GeoMaterial(matName, 2.4*
g/
cm3);
140 aSi=0.70*Si->getA()/(
g/
mole);
141 aAl=0.30*Al->getA()/(
g/
mole);
143 pMatCE7->add(
const_cast<GeoElement*
> (Si),aSi/Atot);
144 pMatCE7->add(
const_cast<GeoElement*
> (Al),aAl/Atot);
151 aSi=1.0*Si->getA()/(
g/
mole);
152 aO=2.0*O->getA()/(
g/
mole);
154 pMatQuartz->add(
const_cast<GeoElement*
> (Si),aSi/Atot);
155 pMatQuartz->add(
const_cast<GeoElement*
> (O),aO/Atot);
158 const int nEntriesCnt1=12;
159 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 };
160 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 };
161 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 };
162 for(
i=0;
i<nEntriesCnt1;
i++) arrEnergy1[
i]=(fWl2E/(arrEnergy1[
i]/
nm))*
eV;
165 pMPT->
AddProperty(
"RINDEX", arrEnergy1, arrQuartzRefIndex, nEntriesCnt1);
166 pMPT->
AddProperty(
"ABSLENGTH", arrEnergy1, arrQuartzAbsLength, nEntriesCnt1);
172 matName=
"SiliconPMT";
174 aSi=1.0*Si->getA()/(
g/
mole);
175 pMatSiliconPMT->add(
const_cast<GeoElement*
> (Si),1.0);
177 const int nEntriesCnt2=2;
178 double arrEnergy2[nEntriesCnt2] = { 2800.0*
nm, 190.0*
nm };
179 double arrSiliconRefIndex[nEntriesCnt2] = { 4.0, 4.0 };
180 double arrSiliconAbsLength[nEntriesCnt2] = { 0.00001*
m, 0.00001*
m };
181 for(
i=0;
i<nEntriesCnt2;
i++) arrEnergy2[
i]=(fWl2E/(arrEnergy2[
i]/
nm))*
eV;
184 pMPT->
AddProperty(
"RINDEX", arrEnergy2, arrSiliconRefIndex, nEntriesCnt2);
185 pMPT->
AddProperty(
"ABSLENGTH", arrEnergy2, arrSiliconAbsLength, nEntriesCnt2);
187 pMatSiliconPMT->lock();
193 GeoMaterial *pMatSilicon=
new GeoMaterial(matName, 2.3290*
g/
cm3);
194 aSi=1.0*Si->getA()/(
g/
mole);
195 pMatSilicon->add(
const_cast<GeoElement*
> (Si),1.0);
201 GeoMaterial *pMatWater=
new GeoMaterial(matName, 1.0*
g/
cm3);
202 aH=0.11*Si->getA()/(
g/
mole);
203 aO=0.89*Al->getA()/(
g/
mole);
205 pMatWater->add(
const_cast<GeoElement*
> (
H),aH/Atot);
206 pMatWater->add(
const_cast<GeoElement*
> (O),aO/Atot);
211 matName=
"Beryllium_AFP";
214 pMaterialBe->add(
const_cast<GeoElement*
> (Be), 1);
240 const GeoLogVol* pLogLongEnv =
new GeoLogVol(
"AFP00_LogStationEnv", pBoxLongEnv,
m_MapMaterials[std::string(
"OpticalVacuum")]);
242 sprintf(szLabel,
"AFP00_StationEnv");
244 world->add(
new GeoNameTag(szLabel));
245 world->add(pPhysLongEnv);
265 const GeoLogVol* pLogShortEnv =
new GeoLogVol(
"AFP01_LogStationEnv", pBoxShortEnv,
m_MapMaterials[std::string(
"std::Vacuum")]);
266 GeoPhysVol* pPhysShortEnv =
new GeoPhysVol(pLogShortEnv);
267 sprintf(szLabel,
"AFP01_StationEnv");
269 world->add(
new GeoNameTag(szLabel));
270 world->add(pPhysShortEnv);
275 addRomanPot(pPhysShortEnv,
"AFP01",PosElementInEnv);
286 const GeoLogVol* pLogShortEnv1 =
new GeoLogVol(
"AFP02_LogStationEnv", pBoxShortEnv1,
m_MapMaterials[std::string(
"std::Vacuum")]);
287 GeoPhysVol* pPhysShortEnv1 =
new GeoPhysVol(pLogShortEnv1);
288 sprintf(szLabel,
"AFP02_StationEnv");
290 world->add(
new GeoNameTag(szLabel));
291 world->add(pPhysShortEnv1);
296 addRomanPot(pPhysShortEnv1,
"AFP02",PosElementInEnv);
307 const GeoLogVol* pLogLongEnv1 =
new GeoLogVol(
"AFP03_LogStationEnv", pBoxLongEnv1,
m_MapMaterials[std::string(
"OpticalVacuum")]);
309 sprintf(szLabel,
"AFP03_StationEnv");
311 world->add(
new GeoNameTag(szLabel));
312 world->add(pPhysLongEnv1);
317 addRomanPot( pPhysLongEnv1,
"AFP03",PosElementInEnv);
333 if (SCode.isFailure()){