107{
108
109
110
114 if(!volMat && fInMassGeometry)
115 {
116 std::ostringstream message;
117 message <<
"Logical volume <" << lv->
GetName() <<
">" <<
G4endl
118 <<
"does not have a valid material pointer." <<
G4endl
119 << "A logical volume belonging to the (tracking) world volume "
120 << "must have a valid material.";
121 G4Exception(
"G4Region::ScanVolumeTree()",
"GeomMgt0002",
123 }
124 if (region)
125 {
126 currentRegion = this;
127 if (volMat)
128 {
129 AddMaterial(volMat);
131 if (baseMat) { AddMaterial(baseMat); }
132 }
133 }
134
135
136
137
139
140
141
142 if(noDaughters==0) return;
143
146 {
147
148
149
151
153 {
155 for (register size_t mat=0; mat<matNo; mat++)
156 {
158 if(!volMat && fInMassGeometry)
159 {
160 std::ostringstream message;
161 message << "The parameterisation for the physical volume <"
163 <<
"does not return a valid material pointer." <<
G4endl
164 << "A volume belonging to the (tracking) world volume must "
165 << "have a valid material.";
166 G4Exception(
"G4Region::ScanVolumeTree()",
"GeomMgt0002",
168 }
169 if (volMat)
170 {
171 AddMaterial(volMat);
173 if (baseMat) { AddMaterial(baseMat); }
174 }
175 }
176 }
177 else
178 {
180 for (register size_t rep=0; rep<repNo; rep++)
181 {
183 if(!volMat && fInMassGeometry)
184 {
185 std::ostringstream message;
186 message << "The parameterisation for the physical volume <"
188 <<
"does not return a valid material pointer." <<
G4endl
189 << "A volume belonging to the (tracking) world volume must "
190 << "have a valid material.";
191 G4Exception(
"G4Region::ScanVolumeTree()",
"GeomMgt0002",
193 }
194 if(volMat)
195 {
196 AddMaterial(volMat);
198 if (baseMat) { AddMaterial(baseMat); }
199 }
200 }
201 }
204 }
205 else
206 {
207 for (register size_t i=0; i<noDaughters; i++)
208 {
211 {
212
213
214
216 }
217 }
218 }
219}
void SetRegion(G4Region *reg)
G4bool IsRootRegion() const
G4Material * GetMaterial() const
const G4Material * GetBaseMaterial() const
virtual G4Material * ComputeMaterial(const G4int repNo, G4VPhysicalVolume *currentVol, const G4VTouchable *parentTouch=0)
virtual G4VVolumeMaterialScanner * GetMaterialScanner()
virtual G4int GetMultiplicity() const
const G4String & GetName() const
virtual G4VPVParameterisation * GetParameterisation() const =0
virtual G4bool IsParameterised() const =0
virtual G4Material * GetMaterial(G4int idx) const =0
virtual G4int GetNumberOfMaterials() const =0