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

#include <B4dDetectorConstruction.hh>

Inheritance diagram for B4dDetectorConstruction:
Collaboration diagram for B4dDetectorConstruction:

Public Member Functions

 B4dDetectorConstruction ()
 
virtual ~B4dDetectorConstruction ()
 
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 G4MultiFunctionalDetector type with primitive scorers 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 B4dDetectorConstruction.hh.

Constructor & Destructor Documentation

B4dDetectorConstruction::B4dDetectorConstruction ( )

Definition at line 63 of file B4dDetectorConstruction.cc.

65  fCheckOverlaps(true)
66 {
67 }
B4dDetectorConstruction::~B4dDetectorConstruction ( )
virtual

Definition at line 71 of file B4dDetectorConstruction.cc.

72 {
73 }

Member Function Documentation

G4VPhysicalVolume * B4dDetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 77 of file B4dDetectorConstruction.cc.

78 {
79  // Define materials
80  DefineMaterials();
81 
82  // Define volumes
83  return DefineVolumes();
84 }
void B4dDetectorConstruction::ConstructSDandField ( )
virtual

Reimplemented from G4VUserDetectorConstruction.

Definition at line 279 of file B4dDetectorConstruction.cc.

280 {
282  //
283  // Scorers
284  //
285 
286  // declare Absorber as a MultiFunctionalDetector scorer
287  //
288  auto absDetector = new G4MultiFunctionalDetector("Absorber");
290 
291  G4VPrimitiveScorer* primitive;
292  primitive = new G4PSEnergyDeposit("Edep");
293  absDetector->RegisterPrimitive(primitive);
294 
295  primitive = new G4PSTrackLength("TrackLength");
296  auto charged = new G4SDChargedFilter("chargedFilter");
297  primitive ->SetFilter(charged);
298  absDetector->RegisterPrimitive(primitive);
299 
300  SetSensitiveDetector("AbsoLV",absDetector);
301 
302  // declare Gap as a MultiFunctionalDetector scorer
303  //
304  auto gapDetector = new G4MultiFunctionalDetector("Gap");
306 
307  primitive = new G4PSEnergyDeposit("Edep");
308  gapDetector->RegisterPrimitive(primitive);
309 
310  primitive = new G4PSTrackLength("TrackLength");
311  primitive ->SetFilter(charged);
312  gapDetector->RegisterPrimitive(primitive);
313 
314  SetSensitiveDetector("GapLV",gapDetector);
315 
316  //
317  // Magnetic field
318  //
319  // Create global magnetic field messenger.
320  // Uniform magnetic field is then created automatically if
321  // the field value is not zero.
322  G4ThreeVector fieldValue;
323  fMagFieldMessenger = new G4GlobalMagFieldMessenger(fieldValue);
324  fMagFieldMessenger->SetVerboseLevel(1);
325 
326  // Register the field messenger for deleting
327  G4AutoDelete::Register(fMagFieldMessenger);
328 }
void SetVerboseLevel(G4int verboseLevel)
void SetVerboseLevel(G4int vl)
Definition: G4SDManager.hh:90
void SetFilter(G4VSDFilter *f)
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: