Ignore:
Timestamp:
Dec 22, 2010, 3:52:27 PM (15 years ago)
Author:
garnier
Message:

geant4 tag 9.4

Location:
trunk/source/geometry/solids/test/SurfaceVisTest
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/geometry/solids/test/SurfaceVisTest/SurfaceVisTest.cc

    r1316 r1347  
    4141
    4242//a pre-built physics list
    43 #include "QGSP_EMV.hh"
     43#include "QGSP_BERT_EMV.hh"
    4444
    4545//My includes
     
    6969
    7070        //Set mandatory initialization and user action classes
    71         runManager->SetUserInitialization(new QGSP_EMV);
     71        runManager->SetUserInitialization(new QGSP_BERT_EMV);
    7272       
    7373        runManager->SetUserInitialization(new DetectorConstruction);
  • trunk/source/geometry/solids/test/SurfaceVisTest/src/DetectorConstruction.cc

    r1316 r1347  
    5151#include "G4Trd.hh"
    5252#include "G4Tet.hh"
     53#include "G4GenericTrap.hh"
     54#include "G4TessellatedSolid.hh"
     55#include "G4ExtrudedSolid.hh"
    5356
    5457#include "G4Polycone.hh"
     
    6871
    6972#include "G4BREPSolidBox.hh"
     73#include "G4TwoVector.hh"
     74#include "G4TriangularFacet.hh"
     75#include "G4QuadrangularFacet.hh"
    7076
    7177#include "G4LogicalVolume.hh"
     
    497503  else if ( val == "Tet" )
    498504  {
    499 
     505    //   G4ThreeVector anchor = G4ThreeVector(0, 0, 0);
     506    //G4ThreeVector     p2 = G4ThreeVector(10*cm, 5*cm , 0);
     507    //G4ThreeVector     p3 = G4ThreeVector(5*cm,10*cm,0);
     508    //G4ThreeVector     p4 = G4ThreeVector(5*cm,5*cm  ,10*cm);
     509   
     510    //aVolume = new G4Tet("aTet",anchor,p2,p3,p4);
    500511      G4ThreeVector pzero(0,0,0);
    501512      G4ThreeVector pnt1(10.*cm,0.*cm,0.*cm),pnt2(5.0*cm,10.*cm,0.*cm), pnt3(5.*cm,5.*cm,10.*cm);
    502513      G4bool  goodTet;
    503       G4Tet   t1( "aTet", pzero, pnt1, pnt2, pnt3, &goodTet);
     514      aVolume= new G4Tet( "aTet", pzero, pnt1, pnt2, pnt3, &goodTet);
    504515  }
    505516  else if ( val == "Trap")
     
    549560
    550561  }
     562  else if (val == "GenericTrap" ){
     563   std::vector<G4TwoVector> vertices;
     564   vertices.push_back(G4TwoVector( -4.5*cm, -4.5*cm));
     565   vertices.push_back(G4TwoVector( -4.5*cm,  4.5*cm));
     566   vertices.push_back(G4TwoVector(  4.5*cm,  4.5*cm));
     567   vertices.push_back(G4TwoVector(  4.5*cm, -4.5*cm));
     568   vertices.push_back(G4TwoVector( -3.5*cm, -3.5*cm));
     569   vertices.push_back(G4TwoVector( -3.5*cm,  3.5*cm));
     570   vertices.push_back(G4TwoVector(  3.5*cm,  3.5*cm));
     571   vertices.push_back(G4TwoVector(  3.5*cm, -2.5*cm));     
     572   aVolume = new G4GenericTrap("aGenTrd",14.*cm,vertices);
     573  }
     574
     575 else if(val == "TessellatedSolid")
     576  {
     577    G4double targetSize = 10.*cm;
     578    G4TessellatedSolid* aVolume1 = new G4TessellatedSolid("aTessellatedSolid");
     579    G4TriangularFacet *facet1 = new
     580    G4TriangularFacet (G4ThreeVector(-targetSize,-targetSize,        0.0),
     581                     G4ThreeVector(+targetSize,-targetSize,        0.0),
     582                     G4ThreeVector(        0.0,        0.0,+targetSize),
     583                     ABSOLUTE);
     584    G4TriangularFacet *facet2 = new
     585    G4TriangularFacet (G4ThreeVector(+targetSize,-targetSize,        0.0),
     586                     G4ThreeVector(+targetSize,+targetSize,        0.0),
     587                     G4ThreeVector(        0.0,        0.0,+targetSize),
     588                     ABSOLUTE);
     589    G4TriangularFacet *facet3 = new
     590    G4TriangularFacet (G4ThreeVector(+targetSize,+targetSize,        0.0),
     591                     G4ThreeVector(-targetSize,+targetSize,        0.0),
     592                     G4ThreeVector(        0.0,        0.0,+targetSize),
     593                     ABSOLUTE);
     594    G4TriangularFacet *facet4 = new
     595    G4TriangularFacet (G4ThreeVector(-targetSize,+targetSize,        0.0),
     596                     G4ThreeVector(-targetSize,-targetSize,        0.0),
     597                     G4ThreeVector(        0.0,        0.0,+targetSize),
     598                     ABSOLUTE);
     599    G4QuadrangularFacet *facet5 = new
     600    G4QuadrangularFacet (G4ThreeVector(-targetSize,-targetSize,        0.0),
     601                     G4ThreeVector(-targetSize,+targetSize,        0.0),
     602                     G4ThreeVector(+targetSize,+targetSize,        0.0),
     603                     G4ThreeVector(+targetSize,-targetSize,        0.0),
     604                     ABSOLUTE);
     605
     606    aVolume1->AddFacet((G4VFacet*) facet1);
     607    aVolume1->AddFacet((G4VFacet*) facet2);
     608    aVolume1->AddFacet((G4VFacet*) facet3);
     609    aVolume1->AddFacet((G4VFacet*) facet4);
     610    aVolume1->AddFacet((G4VFacet*) facet5);
     611 
     612    aVolume1->SetSolidClosed(true);
     613
     614    aVolume = aVolume1;
     615
     616  }
     617  else if (val == "ExtrudedSolid")
     618  {
     619   std::vector<G4TwoVector> polygon;
     620   polygon.push_back(G4TwoVector(-3.*cm, -3.0*cm));
     621   polygon.push_back(G4TwoVector(-3.*cm,  3.0*cm));
     622   polygon.push_back(G4TwoVector( 3.*cm,  3.0*cm));
     623   polygon.push_back(G4TwoVector( 3.*cm, -3.0*cm));
     624   polygon.push_back(G4TwoVector( 1.5*cm, -3.0*cm));
     625   polygon.push_back(G4TwoVector( 1.5*cm,  1.5*cm));
     626   polygon.push_back(G4TwoVector(-1.5*cm,  1.5*cm));
     627   polygon.push_back(G4TwoVector(-1.5*cm, -3.0*cm));
     628 
     629   std::vector<G4ExtrudedSolid::ZSection> zsections;
     630   zsections.push_back(G4ExtrudedSolid::ZSection(-4.0*cm, G4TwoVector(-2.0*cm, 1.0*cm), 1.5));
     631   zsections.push_back(G4ExtrudedSolid::ZSection( 1.0*cm, G4TwoVector(  0*cm,  0*cm), 0.5));
     632   zsections.push_back(G4ExtrudedSolid::ZSection( 1.5*cm, G4TwoVector(  0*cm,  0*cm), 0.7));
     633   zsections.push_back(G4ExtrudedSolid::ZSection( 4.0*cm, G4TwoVector( 2.0*cm, 2.0*cm), 0.9));
     634
     635   aVolume = new G4ExtrudedSolid("aExtrudedSolid", polygon, zsections);
     636  }
     637   else if (val == "TwistedBox")
     638  {
     639    aVolume = new G4TwistedBox("aTwistedBox",40*deg,5*cm,10*cm,15*cm);
     640  }
     641  else if (val == "TwistedTrd")
     642  {
     643    aVolume = new G4TwistedTrd("aTwistedTrd",5*cm,10*cm,8*cm,15*cm,18*cm,20*deg);
     644  }
     645  else if (val == "TwistedTrap")
     646  {
     647    aVolume = new G4TwistedTrap("aTwistedTrap",40*deg,5*cm,10*cm,8*cm,15*cm);
     648  }
     649  else if ( val == "TwistedTrap2")
     650  {
     651    aVolume = new G4TwistedTrap("aTwistedTrap2",
     652                                   20*deg,    // twist angle
     653                                   80*cm,         // half z length
     654                                   10*deg,      // direction between end planes
     655                                   40*deg,        // defined by polar and azimutal angles.
     656                                   8*cm,        // half y length at -pDz
     657                                   11*cm,        // half x length at -pDz,-pDy
     658                                   16*cm,        // half x length at -pDz,+pDy
     659                                   8*cm,        // half y length at +pDz
     660                                   11*cm,         // half x length at +pDz,-pDy
     661                                   16*cm,        // half x length at +pDz,+pDy
     662                                   -50*deg        // tilt angle at +pDz
     663                                   ) ;
     664  }
     665  else if ( val == "TwistedTubs")
     666  {
     667    aVolume = new G4TwistedTubs("aTwistedTubs",10.*deg,1*cm,2*cm,4*cm,171.*deg);
     668
     669  }
    551670  else
    552671    { G4cout <<"DetectorConstruction tried to select "<<val<<G4endl;
  • trunk/source/geometry/solids/test/SurfaceVisTest/src/DetectorMessenger.cc

    r1316 r1347  
    4848  selDetCmd->SetDefaultValue("Polyhedra");
    4949
    50  selDetCmd->SetCandidates("Trap Trd Tet Sphere HalfSphere HollowSphere HalfHollowSphere  Ring Shell Orb Box Cons manyCons Tubs Hype Torus Para Paraboloid Polycone PolyconeGen PolyconeGenComplex Polyhedra PolyhedraGen PolyhedraGenComplex BREPBox Trd b1Ib2 b1Ub2 b1Sb2 b1Ub1 b1Ib1 b1Sb1 Ellipsoid EllipticalCone EllipticalTube");
     50 selDetCmd->SetCandidates("Trap Trd Tet Sphere HalfSphere HollowSphere HalfHollowSphere  Ring Shell Orb Box Cons manyCons Tubs Hype Torus Para Paraboloid Polycone PolyconeGen PolyconeGenComplex Polyhedra PolyhedraGen PolyhedraGenComplex BREPBox Trd b1Ib2 b1Ub2 b1Sb2 b1Ub1 b1Ib1 b1Sb1 Ellipsoid EllipticalCone EllipticalTube GenericTrap TwistedBox TwistedTrd TwistedTrap TwistedTubs TessellatedSolid ExtrudedSolid Tet ");
    5151  selDetCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
    5252
  • trunk/source/geometry/solids/test/SurfaceVisTest/src/RunMessenger.cc

    r1316 r1347  
    2626//
    2727// $Id: RunMessenger.cc,v 1.1 2008/05/15 14:01:08 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
     28// GEANT4 tag $Name: geant4-09-04-ref-00 $
    2929//
    3030//
Note: See TracChangeset for help on using the changeset viewer.