26.8.2011 Kamil Sedlak
- implementataion of volume "TubeWithHolePlusTubeHole" - some other changes in musrSimAna
This commit is contained in:
@ -330,6 +330,37 @@ G4VPhysicalVolume* musrDetectorConstruction::Construct() {
|
||||
G4Transform3D transform(rot,zTrans);
|
||||
solid = new G4SubtractionSolid(solidName, solidOuterDetTube, solidInnerDetTube, transform);
|
||||
}
|
||||
else if (strcmp(tmpString2,"TubeWithHolePlusTubeHole")==0) {
|
||||
// Create a tube with a partial hole inside it: ----------
|
||||
// | |
|
||||
// | _8_| 7
|
||||
// | |
|
||||
// | |___
|
||||
// | | 6
|
||||
// | |
|
||||
// ----------
|
||||
//
|
||||
// ----------
|
||||
// | |
|
||||
// | ___|
|
||||
// | |
|
||||
// | |___
|
||||
// | |
|
||||
// ----------
|
||||
// First 5 parameters as for the outer tube, the 6th, 7th and 8th define the second hole.
|
||||
sscanf(&line[0],"%*s %*s %*s %s %lf %lf %lf %lf %lf %lf %lf %lf %s",
|
||||
name,&x1,&x2,&x3,&x4,&x5,&x6,&x7,&x8,material);
|
||||
sscanf(&line[0],"%*s %*s %*s %*s %*g %*g %*g %*g %*g %*g %*g %*g %*s %lf %lf %lf %s %s %s %d %s",
|
||||
&posx,&posy,&posz,mothersName,rotMatrix,sensitiveDet,&volumeID,actualFieldName);
|
||||
solidName+=name;
|
||||
G4double roundingErr=0.01*mm; // to avoid some displaying problems of the subtracted volumes
|
||||
G4Tubs* solidInnerDetTube = new G4Tubs("SolidInnerDetTube",x6*mm-roundingErr,x7*mm+roundingErr,x8/2*mm+roundingErr,x4*deg,x5*deg);
|
||||
G4Tubs* solidOuterDetTube = new G4Tubs("SolidOuterDetTube",x1*mm,x2*mm,x3*mm,x4*deg,x5*deg);
|
||||
G4RotationMatrix rot(0,0,0);
|
||||
G4ThreeVector zTrans(0,0,(x8/2.-x3)*mm);
|
||||
G4Transform3D transform(rot,zTrans);
|
||||
solid = new G4SubtractionSolid(solidName, solidOuterDetTube, solidInnerDetTube, transform);
|
||||
}
|
||||
else if (strcmp(tmpString2,"tubsbox")==0){
|
||||
// Create a tube, from which center a box is cut out. x1=box half-width; x2,x3,x4,x5 define the tube.
|
||||
sscanf(&line[0],"%*s %*s %*s %s %lf %lf %lf %lf %lf %s %lf %lf %lf %s %s",
|
||||
@ -347,7 +378,8 @@ G4VPhysicalVolume* musrDetectorConstruction::Construct() {
|
||||
// x11, x12 are the half-withs of the ractangular opening in the collimator
|
||||
sscanf(&line[0],"%*s %*s %*s %s %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %s",
|
||||
name,&x1,&x2,&x3,&x4,&x5,&x6,&x7,&x8,&x9,&x10,&x11,&x12,material);
|
||||
sscanf(&line[0],"%*s %*s %*s %*s %*g %*g %*g %*g %*g %*g %*g %*g %*g %*g %*g %*g %*s %lf %lf %lf %s %s %s %d %s",&posx,&posy,&posz,mothersName,rotMatrix,sensitiveDet,&volumeID,actualFieldName);
|
||||
sscanf(&line[0],"%*s %*s %*s %*s %*g %*g %*g %*g %*g %*g %*g %*g %*g %*g %*g %*g %*s %lf %lf %lf %s %s %s %d %s",
|
||||
&posx,&posy,&posz,mothersName,rotMatrix,sensitiveDet,&volumeID,actualFieldName);
|
||||
solidName+=name;
|
||||
G4Box* solidDetBox = new G4Box("SolidDetBox",x1*mm,x2*mm,x3*mm);
|
||||
G4Box* solidHole = new G4Box("SolidDetBox",x11*mm,x2*mm+0.1,x12*mm);
|
||||
@ -420,7 +452,6 @@ G4VPhysicalVolume* musrDetectorConstruction::Construct() {
|
||||
solid = new G4SubtractionSolid(solidName,solidGPDmHolder,solidGPDcutOut,rot,trans);
|
||||
// solid = new G4SubtractionSolid(solidName,solidGPDcutOut,solidGPDmHolder,rot,trans);
|
||||
}
|
||||
|
||||
else ReportGeometryProblem(line);
|
||||
|
||||
G4ThreeVector position = G4ThreeVector (posx*mm,posy*mm,posz*mm);
|
||||
|
Reference in New Issue
Block a user