Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
B4cDetectorConstruction Class Reference

#include <B4cDetectorConstruction.hh>

Inheritance diagram for B4cDetectorConstruction:
Collaboration diagram for B4cDetectorConstruction:

Public Member Functions

 B4cDetectorConstruction ()
 
virtual ~B4cDetectorConstruction ()
 
virtual G4VPhysicalVolumeConstruct ()
 
virtual void ConstructSDandField ()
 
- Public Member Functions inherited from G4VUserDetectorConstruction
 G4VUserDetectorConstruction ()
 
virtual ~G4VUserDetectorConstruction ()
 
virtual void CloneSD ()
 
virtual void CloneF ()
 
void RegisterParallelWorld (G4VUserParallelWorld *)
 
G4int ConstructParallelGeometries ()
 
void ConstructParallelSD ()
 
G4int GetNumberOfParallelWorld () const
 
G4VUserParallelWorldGetParallelWorld (G4int i) const
 

Additional Inherited Members

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

Detailed Description

Detector construction class to define materials and geometry. The calorimeter is a box made of a given number of layers. A layer consists of an absorber plate and of a detection gap. The layer is replicated.

Four parameters define the geometry of the calorimeter :

  • the thickness of an absorber plate,
  • the thickness of a gap,
  • the number of layers,
  • the transverse size of the calorimeter (the input face is a square).

In ConstructSDandField() sensitive detectors of B4cCalorimeterSD type are created and associated with the Absorber and Gap volumes. In addition a transverse uniform magnetic field is defined via G4GlobalMagFieldMessenger class.

Definition at line 56 of file B4cDetectorConstruction.hh.

Constructor & Destructor Documentation

B4cDetectorConstruction::B4cDetectorConstruction ( )

Definition at line 58 of file B4cDetectorConstruction.cc.

60  fCheckOverlaps(true),
61  fNofLayers(-1)
62 {
63 }
B4cDetectorConstruction::~B4cDetectorConstruction ( )
virtual

Definition at line 67 of file B4cDetectorConstruction.cc.

68 {
69 }

Member Function Documentation

G4VPhysicalVolume * B4cDetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 73 of file B4cDetectorConstruction.cc.

74 {
75  // Define materials
76  DefineMaterials();
77 
78  // Define volumes
79  return DefineVolumes();
80 }
void B4cDetectorConstruction::ConstructSDandField ( )
virtual

Reimplemented from G4VUserDetectorConstruction.

Definition at line 275 of file B4cDetectorConstruction.cc.

276 {
277  // G4SDManager::GetSDMpointer()->SetVerboseLevel(1);
278 
279  //
280  // Sensitive detectors
281  //
282  auto absoSD
283  = new B4cCalorimeterSD("AbsorberSD", "AbsorberHitsCollection", fNofLayers);
285  SetSensitiveDetector("AbsoLV",absoSD);
286 
287  auto gapSD
288  = new B4cCalorimeterSD("GapSD", "GapHitsCollection", fNofLayers);
290  SetSensitiveDetector("GapLV",gapSD);
291 
292  //
293  // Magnetic field
294  //
295  // Create global magnetic field messenger.
296  // Uniform magnetic field is then created automatically if
297  // the field value is not zero.
298  G4ThreeVector fieldValue;
299  fMagFieldMessenger = new G4GlobalMagFieldMessenger(fieldValue);
300  fMagFieldMessenger->SetVerboseLevel(1);
301 
302  // Register the field messenger for deleting
303  G4AutoDelete::Register(fMagFieldMessenger);
304 }
void SetVerboseLevel(G4int verboseLevel)
void Register(T *inst)
Definition: G4AutoDelete.hh:65
void SetSensitiveDetector(const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
void AddNewDetector(G4VSensitiveDetector *aSD)
Definition: G4SDManager.cc:71
static G4SDManager * GetSDMpointer()
Definition: G4SDManager.cc:40

Here is the call graph for this function:


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