38 CCalDetector(name),xposBox(0),typeLayerScnt(0),mothLayerScnt(0),
39 xposLayerScnt(0),typeLayerAbs(0),mothLayerAbs(0),xposLayerAbs(0),
40 dx_2Absorber(0),dy_2ScntLayer(0),dx_2ScntLayer(0),dx_2Wrapper(0),
41 dx_2FrontPlastic(0),dx_2BackPlastic(0),dx_2Scintillator(0) {}
47 delete[] typeLayerScnt;
49 delete[] mothLayerScnt;
51 delete[] xposLayerScnt;
53 delete[] typeLayerAbs;
55 delete[] mothLayerAbs;
57 delete[] xposLayerAbs;
59 delete[] dx_2Absorber;
61 delete[] dy_2ScntLayer;
63 delete[] dx_2ScntLayer;
67 delete[] dx_2FrontPlastic;
69 delete[] dx_2BackPlastic;
71 delete[] dx_2Scintillator;
77 G4cout <<
" ==> Opening file " <<
File() <<
" to read elements..."
90 is >> dy_2Cal >> dx_2Cal >> xposCal >>
jump;
92 G4cout <<
tab <<
"General material: " << genMaterial <<
" Size " << dy_2Cal
93 <<
", " << dx_2Cal <<
" Position " << xposCal <<
G4endl;
98 is >> nBox >> dy_2Box >> dx_2Box >> wallThickBox;
100 xposBox =
new double[nBox];
101 for (i=0; i<nBox; i++)
104 G4cout <<
tab <<
"Box material: " << boxMaterial <<
" Size " << dy_2Box
105 <<
", " << dx_2Box <<
" Wall Thickness " << wallThickBox <<
" number "
106 << nBox <<
" position ";
107 for (i=0; i<nBox; i++)
108 G4cout << i <<
" " << xposBox[i] <<
" ";
116 typeLayerScnt =
new int[nLayerScnt];
117 mothLayerScnt =
new int[nLayerScnt];
118 xposLayerScnt =
new double[nLayerScnt];
119 for (i=0; i<nLayerScnt; i++)
120 is >> typeLayerScnt[i] >> mothLayerScnt[i] >> xposLayerScnt[i];
122 G4cout <<
tab << nLayerScnt <<
" Layers of scintillators of type/mother box/"
124 for (i=0; i<nLayerScnt; i++)
125 G4cout <<
tab << i <<
" " << typeLayerScnt[i] <<
" " << mothLayerScnt[i]
126 <<
" " << xposLayerScnt[i] << G4endl;
132 typeLayerAbs =
new int[nLayerAbs];
133 mothLayerAbs =
new int[nLayerAbs];
134 xposLayerAbs =
new double[nLayerAbs];
135 for (i=0; i<nLayerAbs; i++)
136 is >> typeLayerAbs[i] >> mothLayerAbs[i] >> xposLayerAbs[i];
138 G4cout <<
tab << nLayerAbs <<
" Layers of absorbers of type/mother box/"
140 for (i=0; i<nLayerAbs; i++)
141 G4cout <<
tab << i <<
" " << typeLayerAbs[i] <<
" " << mothLayerAbs[i]
142 <<
" " << xposLayerAbs[i] << G4endl;
147 is >> nAbsorber >> dy_2Absorber;
148 dx_2Absorber =
new double[nAbsorber];
149 for (i=0; i<nAbsorber; i++)
150 is >> dx_2Absorber[i];
152 G4cout <<
"\tAbsorber mad of " << absMaterial <<
" with " << nAbsorber
153 <<
" types and size " << dy_2Absorber;
154 for (i=0; i<nAbsorber; i++)
155 G4cout <<
" " << i <<
" " << dx_2Absorber[i];
164 dy_2ScntLayer =
new double[nScintillator];
165 dx_2ScntLayer =
new double[nScintillator];
166 dx_2Wrapper =
new double[nScintillator];
167 dx_2FrontPlastic =
new double[nScintillator];
168 dx_2BackPlastic =
new double[nScintillator];
169 dx_2Scintillator =
new double[nScintillator];
170 for (i=0; i<nScintillator; i++)
171 is >> dy_2ScntLayer[i] >> dx_2ScntLayer[i] >> dx_2Wrapper[i]
172 >> dx_2FrontPlastic[i] >> dx_2BackPlastic[i] >> dx_2Scintillator[i];
174 G4cout <<
tab << nScintillator <<
" Scintillator layers made of "
175 << scntMaterial <<
" " << wrapMaterial <<
" and " << plasMaterial
176 <<
" of sizes " <<
G4endl;
177 for (i=0; i<nScintillator; i++)
178 G4cout <<
tab << i <<
" " << dy_2ScntLayer[i] <<
" " << dx_2ScntLayer[i]
179 <<
" " << dx_2Wrapper[i] <<
" " << dx_2FrontPlastic[i] <<
" "
180 << dx_2BackPlastic[i] <<
" " << dx_2Scintillator[i] << G4endl;
bool openGeomFile(std::ifstream &is, const G4String &pathname, const G4String &filename)
virtual void constructDaughters()
std::istream & jump(std::istream &)
std::ifstream & findDO(std::ifstream &, const G4String &)
std::ifstream & readName(std::ifstream &, G4String &)
G4GLOB_DLL std::ostream G4cout
std::ostream & tab(std::ostream &)
CCalHcal(const G4String &name)