ATLAS Offline Software
Loading...
Searching...
No Matches
LArG4SimpleSD Class Reference

Common sensitive detector class for LAr systems. More...

#include <LArG4SimpleSD.h>

Inheritance diagram for LArG4SimpleSD:
Collaboration diagram for LArG4SimpleSD:

Public Types

enum  LArHitTimeBins { HitTimeBinDefault = 0 , HitTimeBinUniform = 1 }

Public Member Functions

 LArG4SimpleSD (G4String a_name, ILArCalculatorSvc *calc, std::string hitCollectionName, const std::string &type="Default", const float width=2.5 *CLHEP::ns)
 Constructor.
 LArG4SimpleSD (G4String a_name, StoreGateSvc *detStore, std::string hitCollectionName)
 Alternative constructor, particularly for fast simulations.
virtual ~LArG4SimpleSD ()
 Destructor.
void Initialize (G4HCofThisEvent *) override
 Register this regular SD with the event-owned builder.
G4bool ProcessHits (G4Step *a_step, G4TouchableHistory *) override
 Main processing method.
G4bool SimpleHit (const LArG4Identifier &lar_id, G4double time, G4double energy)
 First method translates to this - also for fast sims.
void setupHelpers (const LArEM_ID *EM, const LArFCAL_ID *FCAL, const LArHEC_ID *HEC)
 Sets the ID helper pointers.
Identifier ConvertID (const LArG4Identifier &a_ident) const
 Helper function for making "real" identifiers from LArG4Identifiers.

Protected Member Functions

G4int getTimeBin (G4double time) const
 Helper method for time info.
LArHitContainerBuildergetHitContainer () const

Protected Attributes

ILArCalculatorSvcm_calculator
 Member variable - the calculator we'll use.
G4int m_numberInvalidHits
 Count the number of invalid hits.
LArG4SimpleSD::LArHitTimeBins m_timeBinType
G4float m_timeBinWidth
 Width of the time bins for summing hits - for the uniform binning.
const LArEM_IDm_larEmID
 Pointers to the identifier helpers.
const LArFCAL_IDm_larFcalID
const LArHEC_IDm_larHecID

Private Member Functions

 FRIEND_TEST (LArG4SimpleSDtest, ProcessHits)
 FRIEND_TEST (LArG4SimpleSDtest, setupHelpers)
 FRIEND_TEST (LArG4SimpleSDtest, getTimeBin)
 FRIEND_TEST (LArG4SimpleSDtest, SimpleHit)
 FRIEND_TEST (LArG4SimpleSDtest, ConvertID)

Private Attributes

std::string m_hitCollectionName
std::string m_hitSourceName

Detailed Description

Common sensitive detector class for LAr systems.

This SD implementation saves the standard LArHits. See LArG4CalibSD for an SD that handles calibration hits. Event state is owned by LArHitContainerBuilder; the SD registers its regular-SD partition during Initialize() and then writes hits through the builder for the current Athena event.

Definition at line 37 of file LArG4SimpleSD.h.

Member Enumeration Documentation

◆ LArHitTimeBins

Enumerator
HitTimeBinDefault 
HitTimeBinUniform 

Definition at line 46 of file LArG4SimpleSD.h.

47 {
50 };

Constructor & Destructor Documentation

◆ LArG4SimpleSD() [1/2]

LArG4SimpleSD::LArG4SimpleSD ( G4String a_name,
ILArCalculatorSvc * calc,
std::string hitCollectionName,
const std::string & type = "Default",
const float width = 2.5 *CLHEP::ns )

Constructor.

◆ LArG4SimpleSD() [2/2]

LArG4SimpleSD::LArG4SimpleSD ( G4String a_name,
StoreGateSvc * detStore,
std::string hitCollectionName )

Alternative constructor, particularly for fast simulations.

◆ ~LArG4SimpleSD()

virtual LArG4SimpleSD::~LArG4SimpleSD ( )
virtual

Destructor.

Member Function Documentation

◆ ConvertID()

Identifier LArG4SimpleSD::ConvertID ( const LArG4Identifier & a_ident) const

Helper function for making "real" identifiers from LArG4Identifiers.

◆ FRIEND_TEST() [1/5]

LArG4SimpleSD::FRIEND_TEST ( LArG4SimpleSDtest ,
ConvertID  )
private

◆ FRIEND_TEST() [2/5]

LArG4SimpleSD::FRIEND_TEST ( LArG4SimpleSDtest ,
getTimeBin  )
private

◆ FRIEND_TEST() [3/5]

LArG4SimpleSD::FRIEND_TEST ( LArG4SimpleSDtest ,
ProcessHits  )
private

◆ FRIEND_TEST() [4/5]

LArG4SimpleSD::FRIEND_TEST ( LArG4SimpleSDtest ,
setupHelpers  )
private

◆ FRIEND_TEST() [5/5]

LArG4SimpleSD::FRIEND_TEST ( LArG4SimpleSDtest ,
SimpleHit  )
private

◆ getHitContainer()

LArHitContainerBuilder * LArG4SimpleSD::getHitContainer ( ) const
protected

◆ getTimeBin()

G4int LArG4SimpleSD::getTimeBin ( G4double time) const
protected

Helper method for time info.

◆ Initialize()

void LArG4SimpleSD::Initialize ( G4HCofThisEvent * )
override

Register this regular SD with the event-owned builder.

◆ ProcessHits()

G4bool LArG4SimpleSD::ProcessHits ( G4Step * a_step,
G4TouchableHistory *  )
override

Main processing method.

◆ setupHelpers()

void LArG4SimpleSD::setupHelpers ( const LArEM_ID * EM,
const LArFCAL_ID * FCAL,
const LArHEC_ID * HEC )
inline

Sets the ID helper pointers.

Definition at line 75 of file LArG4SimpleSD.h.

77 {
78 m_larEmID = EM;
81 }
const LArHEC_ID * m_larHecID
const LArFCAL_ID * m_larFcalID
const LArEM_ID * m_larEmID
Pointers to the identifier helpers.

◆ SimpleHit()

G4bool LArG4SimpleSD::SimpleHit ( const LArG4Identifier & lar_id,
G4double time,
G4double energy )

First method translates to this - also for fast sims.

Member Data Documentation

◆ m_calculator

ILArCalculatorSvc* LArG4SimpleSD::m_calculator
protected

Member variable - the calculator we'll use.

Definition at line 91 of file LArG4SimpleSD.h.

◆ m_hitCollectionName

std::string LArG4SimpleSD::m_hitCollectionName
private

Definition at line 122 of file LArG4SimpleSD.h.

◆ m_hitSourceName

std::string LArG4SimpleSD::m_hitSourceName
private

Definition at line 123 of file LArG4SimpleSD.h.

◆ m_larEmID

const LArEM_ID* LArG4SimpleSD::m_larEmID
protected

Pointers to the identifier helpers.

Definition at line 115 of file LArG4SimpleSD.h.

◆ m_larFcalID

const LArFCAL_ID* LArG4SimpleSD::m_larFcalID
protected

Definition at line 116 of file LArG4SimpleSD.h.

◆ m_larHecID

const LArHEC_ID* LArG4SimpleSD::m_larHecID
protected

Definition at line 117 of file LArG4SimpleSD.h.

◆ m_numberInvalidHits

G4int LArG4SimpleSD::m_numberInvalidHits
protected

Count the number of invalid hits.

Definition at line 94 of file LArG4SimpleSD.h.

◆ m_timeBinType

LArG4SimpleSD::LArHitTimeBins LArG4SimpleSD::m_timeBinType
protected

Definition at line 109 of file LArG4SimpleSD.h.

◆ m_timeBinWidth

G4float LArG4SimpleSD::m_timeBinWidth
protected

Width of the time bins for summing hits - for the uniform binning.

Definition at line 112 of file LArG4SimpleSD.h.


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