Monte Carlo LYSO
Geant4 simulation for the LYSO calorimeter prototype
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MyDetectorConstruction Class Reference

Mandatory user initialization concrete class of G4VUserDetectorConstruction. It represents the whole geometry of the physical apparatus. More...

#include <construction.hh>

Inheritance diagram for MyDetectorConstruction:
Inheritance graph
[legend]
Collaboration diagram for MyDetectorConstruction:
Collaboration graph
[legend]

Public Member Functions

 MyDetectorConstruction ()
 Constructor of the class. More...
 
 ~MyDetectorConstruction () override=default
 Destructor of the class.
 
G4LogicalVolume * GetScoringVolume () const
 Get the scoring volume. It will be used by MySteppingAction::UserSteppingAction().
 
G4LogicalVolume * GetCosmicTriggerVolume () const
 
G4LogicalVolume * GetDecayTriggerVolume () const
 
G4VPhysicalVolume * Construct () override
 Construct the detector geometry. More...
 

Private Member Functions

void ConstructSDandField () override
 It sets all the SiPMs' silicon layers as sensitive detectors.
 
void ConstructGrease ()
 Auxiliary function called by Construct() for building the optical grease.
 
void ConstructLightGuide ()
 Auxiliary function called by Construct() for building the lightguides.
 
void ConstructPCB ()
 Auxiliary function called by Construct() for building the PCBs.
 
void ConstructEndcap ()
 Auxiliary function called by Construct() for building the endcaps.
 
void ConstructASiPM ()
 Auxiliary function called by Construct() for building only one SiPM.
 
void ConstructCosmicRaysDetectors ()
 
void PositionSiPMs (G4VPhysicalVolume *physFrontSiPM, G4VPhysicalVolume *physBackSiPM, G4int row, G4int col, G4int index)
 Auxiliary function called by Construct() for putting in the right position every SiPM. More...
 
void DefineMaterials ()
 Defines all materials.
 
void DefineVisAttributes ()
 Defines the visualization attributes for every component of the apparatus.
 
void DefineCommands ()
 Defines new user commands for detector construction.
 

Private Attributes

G4LogicalVolume * logicWorld
 Pointer to world logical volume.
 
G4LogicalVolume * logicScintillator
 Pointer to crystal logical volume.
 
G4LogicalVolume * logicPackageSiPM
 Pointer to SiPM package logical volume.
 
G4LogicalVolume * logicWindowSiPM
 Pointer to SiPM window logical volume.
 
G4LogicalVolume * logicDetector
 Pointer to silicon layer of SiPM logical volume.
 
G4LogicalVolume * logicCoating
 Pointer to coating logical volume.
 
G4LogicalVolume * logicPCB
 Pointer to PCB logical volume.
 
G4LogicalVolume * logicEndcap
 Pointer to endcap logical volume.
 
G4LogicalVolume * logicLightGuide
 Pointer to light guide logical volume.
 
G4LogicalVolume * logicGrease
 Pointer to optical grease logical volume.
 
G4LogicalVolume * logicCosmicRaysDetector
 
G4LogicalVolume * fScoringVolume
 Pointer used to define the logical volume of the scoring volume. In the application it is assigned to logicScintillator.
 
G4LogicalVolume * fDecayTriggerVolume
 
G4LogicalVolume * fCosmicTriggerVolume
 
G4Material * fLYSO
 Pointer to the LYSO material.
 
G4Material * fAir
 Pointer to the air material.
 
G4Material * fVacuum
 Pointer to the vacuum material.
 
G4Material * fSilicon
 Pointer to the silicon material.
 
G4Material * fEpoxy
 Pointer to the epoxy material.
 
G4Material * fFR4
 Pointer to the FR4 material.
 
G4Material * fCarbonFiber
 Pointer to the carbon fiber material.
 
G4Material * fPlexiglass
 Pointer to the plexiglass material.
 
G4Material * fSapphire
 Pointer to the sapphire material.
 
G4Material * fGrease
 Pointer to the optical grease material.
 
G4OpticalSurface * fOpGreaseSurface
 Pointer to the optical grease surface.
 
G4GenericMessenger * fMessenger
 Generic messenger of the class.
 
G4bool fIsGrease
 Flag indicating whether the optical grease must be constructed.
 
G4bool fIsOpticalGreaseSurface
 Flag indicating whether the optical grease surface must be constructed.
 
G4bool fIsLightGuide
 Flag indicating whether the light guides must be constructed.
 
G4bool fIsPCB
 Flag indicating whether the PCBs must be constructed.
 
G4bool fIsEndcap
 Flag indicating whether the endcaps must be constructed.
 
G4bool fIsASiPM
 Flag indicating whether only one SiPM must be constructed.
 
G4bool fIsCosmicRaysDetectors
 
G4int nLightGuideMat
 Indicates which material has to be used for light guides; 1 for plexiglass, 2 for sapphire.
 

Detailed Description

Mandatory user initialization concrete class of G4VUserDetectorConstruction. It represents the whole geometry of the physical apparatus.

Definition at line 32 of file construction.hh.

Constructor & Destructor Documentation

◆ MyDetectorConstruction()

MyDetectorConstruction::MyDetectorConstruction ( )

Constructor of the class.

It defines the UI commands through DefineCommands() and gives default values to these settable variables: fIsLightGuide = false, nLightGuideMat = 1, fIsPCB = true and fIsEndcap = true. It also calls DefineMaterialsAndSurfaces().

Definition at line 7 of file construction.cc.

Member Function Documentation

◆ Construct()

G4VPhysicalVolume * MyDetectorConstruction::Construct ( )
override

Construct the detector geometry.

Depending on settings, it could call ConstructLightGuide(), ConstructPCB() and ConstructEndcap(). It uses the auxiliary function PositionSiPMs() for placing the SiPMs volumes and, at the end, it calls DefineVisAttributes().

Returns
The world physical volume physWorld.

Definition at line 178 of file construction.cc.

◆ PositionSiPMs()

void MyDetectorConstruction::PositionSiPMs ( G4VPhysicalVolume *  physFrontSiPM,
G4VPhysicalVolume *  physBackSiPM,
G4int  row,
G4int  col,
G4int  index 
)
private

Auxiliary function called by Construct() for putting in the right position every SiPM.

Parameters
physFrontSiPMThe pointer to the physical volume of the SiPM to place on the front face of the scintillator
physBackSiPMThe pointer to the physical volume of the SiPM to place on the back face of the scintillator
rowThe row of the SiPMs panel where the detector has to be placed
colThe column of the SiPMs panel where the detector has to be placed
halfColsThe integer half of the number of SiPMs in the row
indexThe index number of the SiPM

Definition at line 377 of file construction.cc.


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