Changeset 1010 for trunk/source/geometry/divisions/src/G4PVDivision.cc
- Timestamp:
- Apr 22, 2009, 11:58:58 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/geometry/divisions/src/G4PVDivision.cc
r850 r1010 25 25 // 26 26 // 27 // $Id: G4PVDivision.cc,v 1.2 1 2008/08/18 14:06:13 tnikitinExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4PVDivision.cc,v 1.22 2008/12/03 16:41:45 arce Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // class G4PVDivision Implementation file … … 74 74 SetParameterisation(pMotherLogical, pAxis, nDivs, 75 75 width, offset, DivNDIVandWIDTH); 76 CheckAndSetParameters (pAxis,offset, pMotherLogical); 76 CheckAndSetParameters (pAxis, nDivs, width, offset, 77 DivNDIVandWIDTH, pMotherLogical); 77 78 } 78 79 … … 104 105 SetMotherLogical(pMotherLogical); 105 106 SetParameterisation(pMotherLogical, pAxis, nDivs, 0., offset, DivNDIV); 106 CheckAndSetParameters (pAxis, offset, pMotherLogical);107 CheckAndSetParameters (pAxis, nDivs, 0., offset, DivNDIV, pMotherLogical); 107 108 } 108 109 … … 134 135 SetMotherLogical(pMotherLogical); 135 136 SetParameterisation(pMotherLogical, pAxis, 0, width, offset, DivWIDTH); 136 CheckAndSetParameters (pAxis, offset, pMotherLogical);137 CheckAndSetParameters (pAxis, 0, width, offset, DivWIDTH, pMotherLogical); 137 138 } 138 139 … … 140 141 void 141 142 G4PVDivision::CheckAndSetParameters( const EAxis pAxis, 143 const G4int nDivs, 144 const G4double width, 142 145 const G4double offset, 146 DivisionType divType, 143 147 const G4LogicalVolume* pMotherLogical ) 144 148 { 145 fnReplicas = fparam->GetNoDiv(); 146 149 if( divType == DivWIDTH ) 150 { 151 fnReplicas = fparam->GetNoDiv(); 152 } 153 else 154 { 155 fnReplicas = nDivs; 156 } 147 157 if (fnReplicas < 1 ) 148 158 { … … 151 161 } 152 162 153 fwidth = fparam->GetWidth(); 154 163 if( divType != DivNDIV) 164 { 165 fwidth = fparam->GetWidth(); 166 } 167 else 168 { 169 fwidth = width; 170 } 155 171 if( fwidth < 0 ) 156 172 { … … 202 218 G4String msolType = pMotherLogical->GetSolid()->GetEntityType(); 203 219 G4String dsolType = GetLogicalVolume()->GetSolid()->GetEntityType(); 204 if( msolType != dsolType )220 if( msolType != dsolType && ( msolType != "G4Trd" || dsolType != "G4Trap" ) ) 205 221 { 206 222 G4String message = 207 223 "Incorrect solid type for division of volume " + GetName() 208 224 + " It is: " + msolType + ", while it should be: " + dsolType; 209 G4Exception("G4 VDivisionParameterisation::CheckAndSetParameters()",225 G4Exception("G4PVDivision::CheckAndSetParameters()", 210 226 "IllegalConstruct", FatalException, message ); 211 227 }
Note: See TracChangeset
for help on using the changeset viewer.