Kamil Sedlak 7.2.2013

Added geometric shape  "BarWithBevelledEdgesX"  used for Alexey's 
investigation of light transport throuhg a scintillator bar.
This version is done before implementing changes made by James Lord
This commit is contained in:
2013-02-07 09:43:42 +00:00
parent 6edad3a53c
commit db7b6a80f4
3 changed files with 53 additions and 0 deletions

View File

@ -356,6 +356,32 @@ G4VPhysicalVolume* musrDetectorConstruction::Construct() {
G4Transform3D transform(rot,zTrans);
solid = new G4SubtractionSolid(solidName, box1, box2, transform);
}
else if (strcmp(tmpString2,"BarWithBevelledEdgesX")==0){
// box, which has "cut out" edges.
// x1,x2,x3 ... dimensions of box (half-lengths)
// x4 ... full width, which will be cut out at the edge (x4 from one side, and the same x4 from the other side).
// four edges will be cut out (edges parallel with the x direction)
sscanf(&line[0],"%*s %*s %*s %s %lf %lf %lf %lf %s %lf %lf %lf %s %s",
name,&x1,&x2,&x3,&x4,material,&posx,&posy,&posz,mothersName,rotMatrix);
sscanf(&line[0],"%*s %*s %*s %*s %*g %*g %*g %*g %*s %*g %*g %*g %*s %*s %s %d %s",sensitiveDet,&volumeID,actualFieldName);
solidName+=name;
G4Box* box1 = new G4Box("Box1",x1*mm,x2*mm,x3*mm);
G4Box* box2 = new G4Box("Box2",(x1+1.0)*mm,x4*sqrt(2.)*mm,x4*sqrt(2.)*mm);
G4RotationMatrix rot(0,45*deg,0);
G4ThreeVector zTransA(0,x2*mm,x3*mm);
G4ThreeVector zTransB(0,-x2*mm,x3*mm);
G4ThreeVector zTransC(0,x2*mm,-x3*mm);
G4ThreeVector zTransD(0,-x2*mm,-x3*mm);
G4Transform3D transformA(rot,zTransA);
G4Transform3D transformB(rot,zTransB);
G4Transform3D transformC(rot,zTransC);
G4Transform3D transformD(rot,zTransD);
G4SubtractionSolid* box3 = new G4SubtractionSolid("tmpBox3", box1, box2, transformA);
G4SubtractionSolid* box4 = new G4SubtractionSolid("tmpBox4", box3, box2, transformB);
G4SubtractionSolid* box5 = new G4SubtractionSolid("tmpBox5", box4, box2, transformC);
solid = new G4SubtractionSolid(solidName, box5, box2, transformD);
}
else if (strcmp(tmpString2,"alcSupportPlate")==0){
// Create an ALC holder geometry: x1 half-width of the holder (as a box),
// x2 half-height of the spacer