Geant4  10.02.p03
Par01ParallelWorldForPion Class Reference

#include <Par01ParallelWorldForPion.hh>

Inheritance diagram for Par01ParallelWorldForPion:
Collaboration diagram for Par01ParallelWorldForPion:

Public Member Functions

 Par01ParallelWorldForPion (G4String worldName)
 
 ~Par01ParallelWorldForPion ()
 
- Public Member Functions inherited from G4VUserParallelWorld
 G4VUserParallelWorld (G4String worldName)
 
virtual ~G4VUserParallelWorld ()
 
G4String GetName ()
 

Private Member Functions

virtual void Construct ()
 
virtual void ConstructSD ()
 

Additional Inherited Members

- Protected Member Functions inherited from G4VUserParallelWorld
G4VPhysicalVolumeGetWorld ()
 
void SetSensitiveDetector (const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
 
void SetSensitiveDetector (G4LogicalVolume *logVol, G4VSensitiveDetector *aSD)
 
- Protected Attributes inherited from G4VUserParallelWorld
G4String fWorldName
 

Detailed Description

Definition at line 34 of file Par01ParallelWorldForPion.hh.

Constructor & Destructor Documentation

◆ Par01ParallelWorldForPion()

Par01ParallelWorldForPion::Par01ParallelWorldForPion ( G4String  worldName)

Definition at line 41 of file Par01ParallelWorldForPion.cc.

42  : G4VUserParallelWorld(worldName)
43 {;}
G4VUserParallelWorld(G4String worldName)

◆ ~Par01ParallelWorldForPion()

Par01ParallelWorldForPion::~Par01ParallelWorldForPion ( )

Definition at line 45 of file Par01ParallelWorldForPion.cc.

46 {;}

Member Function Documentation

◆ Construct()

void Par01ParallelWorldForPion::Construct ( void  )
privatevirtual

Implements G4VUserParallelWorld.

Definition at line 48 of file Par01ParallelWorldForPion.cc.

49 {
50  // -- Get nist material manager
51  G4NistManager* nistManager = G4NistManager::Instance();
52 
53  // Build materials
54  G4Material* air = nistManager->FindOrBuildMaterial("G4_AIR");
55 
56  // -------------------------------
57  // Build parallel/ghost geometry:
58  // -------------------------------
59 
60  // -- Obtain clone of mass geometry world from GetWorld() base class utility:
61  G4VPhysicalVolume* ghostWorld = GetWorld();
62  // -- Why needed ? No default ?
63  ghostWorld->GetLogicalVolume()->SetMaterial(air);
64  G4Region* parallelWorldRegion = new G4Region("ParallelWorldRegion");
65  parallelWorldRegion->AddRootLogicalVolume(ghostWorld->GetLogicalVolume());
66 
67  // -- Create box for encompassing Elec.+Had. calorimeters together:
68  G4double detectSize = 125*cm;
69  G4Box *ghostBox
70  = new G4Box("GhostBox", detectSize+5*cm, detectSize+5*cm, 80*cm);
71  // -- Build the subsequent logical volume:
72  G4LogicalVolume* ghostLogical
73  = new G4LogicalVolume(ghostBox,
74  air, // -- no material : IMPOSSIBLE !!!
75  "GhostLogical",
76  0, 0, 0);
77  // -- And place this logical volume in the parallel geometry:
78  new G4PVPlacement(0,G4ThreeVector(0., 0., 175*cm),
79  "GhostPhysical",
80  ghostLogical,
81  ghostWorld,false,0);
82 
83  // -----------------------
84  // Setup fast simulation:
85  // -----------------------
86 
87  // -- Make Elec+Had logical volume becoming a region:
88  G4cout << "Declaring region..." << G4endl;
89  G4Region* ghostRegion = new G4Region("GhostCalorimeterRegion");
90  G4cout << "... region declared. Setting it the ghostLogical volume..." << G4endl;
91  ghostRegion->AddRootLogicalVolume(ghostLogical);
92  G4cout << "... succes.\n" << G4endl;
93 
94 }
static const double cm
Definition: G4SIunits.hh:118
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
CLHEP::Hep3Vector G4ThreeVector
void AddRootLogicalVolume(G4LogicalVolume *lv)
Definition: G4Region.cc:290
G4VPhysicalVolume * GetWorld()
Definition: G4Box.hh:64
static G4NistManager * Instance()
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4LogicalVolume * GetLogicalVolume() const
void SetMaterial(G4Material *pMaterial)
Here is the call graph for this function:

◆ ConstructSD()

void Par01ParallelWorldForPion::ConstructSD ( )
privatevirtual

Reimplemented from G4VUserParallelWorld.

Definition at line 97 of file Par01ParallelWorldForPion.cc.

98 {
100 
101  G4Region* ghostRegion = regionStore->GetRegion("GhostCalorimeterRegion");
102  // -- Attach fast simulation model (create the G4FastSimulationManager if needed):
103  new Par01PionShowerModel("ghostPionShowerModel",ghostRegion);
104 
105 }
static G4RegionStore * GetInstance()
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const
Here is the call graph for this function:

The documentation for this class was generated from the following files: