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

Concrete class of G4VSensitiveDetector, representing the detector (i.e. the SiPM). More...

#include <detector.hh>

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

Public Member Functions

 MySensitiveDetector (G4String name, G4String hitsCollectionName)
 Constructor of the class. More...
 
 ~MySensitiveDetector () override=default
 Destructor of the class.
 
void Initialize (G4HCofThisEvent *hce) override
 Associates a new MyHitsCollection with a G4HCofThisEvent object at the beginning of each event. More...
 
G4bool ProcessHits (G4Step *aStep, G4TouchableHistory *ROhist) override
 For every optical photon that hits the SD this method instantiates a MyHit object, fills his data and store it in the MyHitsCollection of the event. More...
 

Private Types

enum  SetEfficiencies { fIsNominalEfficiency , fIsFixedEfficiency , fIsRandomEfficiency , fIsAssignedEfficiency }
 

Private Member Functions

void RandomizeEfficiencies ()
 Fixes random efficiencies for all MPPCs.
 
void GetEfficienciesFromFile ()
 Reads and sets the efficiencies from the file.
 

Private Attributes

MyHitsCollectionfHitsCollection
 Pointer to the hits collection of the event.
 
SetEfficiencies fEfficiencySetting
 Type of SetEfficiencies.
 
G4PhysicsFreeVector * fPDE
 
G4double fFixedEfficiency
 
G4double fFrontEfficiency [GS::nOfSiPMs]
 Array of PDEs for front MPPCs.
 
G4double fBackEfficiency [GS::nOfSiPMs]
 Array of PDEs for back MPPCs.
 

Detailed Description

Concrete class of G4VSensitiveDetector, representing the detector (i.e. the SiPM).

Definition at line 27 of file detector.hh.

Constructor & Destructor Documentation

◆ MySensitiveDetector()

MySensitiveDetector::MySensitiveDetector ( G4String  name,
G4String  hitsCollectionName 
)

Constructor of the class.

Parameters
nameThe name of the sensitive detector.
hitsCollectionNameThe name of the MyHitsCollection associated with the SD.

Definition at line 7 of file detector.cc.

Member Function Documentation

◆ Initialize()

void MySensitiveDetector::Initialize ( G4HCofThisEvent *  hce)
override

Associates a new MyHitsCollection with a G4HCofThisEvent object at the beginning of each event.

Parameters
hcePointer to the G4HCofThisEvent object.

Definition at line 34 of file detector.cc.

◆ ProcessHits()

G4bool MySensitiveDetector::ProcessHits ( G4Step *  aStep,
G4TouchableHistory *  ROhist 
)
override

For every optical photon that hits the SD this method instantiates a MyHit object, fills his data and store it in the MyHitsCollection of the event.

This method is invoked by G4SteppingManager when a step is composed in the G4LogicalVolume which has the pointer to this SD.

Parameters
aStepG4Step object of the current step.
ROhistG4TouchableHistory object. Obsolete, not used.

Definition at line 45 of file detector.cc.


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