ATLAS Offline Software
Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
LArG4SimpleSD Class Reference

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

#include <LArG4SimpleSD.h>

Inheritance diagram for LArG4SimpleSD:
Collaboration diagram for LArG4SimpleSD:

Classes

class  LessHit
 

Public Types

enum  LArHitTimeBins { HitTimeBinDefault = 0, HitTimeBinUniform = 1 }
 

Public Member Functions

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

Protected Types

typedef std::set< LArHit *, LessHithits_t
 
typedef std::map< G4int, hits_t * > timeBins_t
 

Protected Member Functions

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

Protected Attributes

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

Private Member Functions

 FRIEND_TEST (LArG4SimpleSDtest, ProcessHits)
 
 FRIEND_TEST (LArG4SimpleSDtest, EndOfAthenaEvent)
 
 FRIEND_TEST (LArG4SimpleSDtest, setupHelpers)
 
 FRIEND_TEST (LArG4SimpleSDtest, getTimeBin)
 
 FRIEND_TEST (LArG4SimpleSDtest, SimpleHit)
 
 FRIEND_TEST (LArG4SimpleSDtest, ConvertID)
 
 FRIEND_TEST (SDWrappertest, Initialize)
 
 FRIEND_TEST (SDWrappertest, EndOfAthenaEvent)
 
 FRIEND_TEST (SDWrappertest, addSD)
 
 FRIEND_TEST (SDWrappertest, addFastSimSD)
 
 FRIEND_TEST (SDWrappertest, ProcessHits)
 

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.

Definition at line 35 of file LArG4SimpleSD.h.

Member Typedef Documentation

◆ hits_t

typedef std::set< LArHit*, LessHit > LArG4SimpleSD::hits_t
protected

Definition at line 113 of file LArG4SimpleSD.h.

◆ timeBins_t

typedef std::map< G4int, hits_t* > LArG4SimpleSD::timeBins_t
protected

Definition at line 119 of file LArG4SimpleSD.h.

Member Enumeration Documentation

◆ LArHitTimeBins

Enumerator
HitTimeBinDefault 
HitTimeBinUniform 

Definition at line 50 of file LArG4SimpleSD.h.

51  {
54  };

Constructor & Destructor Documentation

◆ LArG4SimpleSD() [1/2]

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

Constructor.

◆ LArG4SimpleSD() [2/2]

LArG4SimpleSD::LArG4SimpleSD ( G4String  a_name,
StoreGateSvc detStore 
)

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.

◆ EndOfAthenaEvent()

void LArG4SimpleSD::EndOfAthenaEvent ( LArHitContainer hitContnainer)

End of athena event processing.

◆ FRIEND_TEST() [1/11]

LArG4SimpleSD::FRIEND_TEST ( LArG4SimpleSDtest  ,
ConvertID   
)
private

◆ FRIEND_TEST() [2/11]

LArG4SimpleSD::FRIEND_TEST ( LArG4SimpleSDtest  ,
EndOfAthenaEvent   
)
private

◆ FRIEND_TEST() [3/11]

LArG4SimpleSD::FRIEND_TEST ( LArG4SimpleSDtest  ,
getTimeBin   
)
private

◆ FRIEND_TEST() [4/11]

LArG4SimpleSD::FRIEND_TEST ( LArG4SimpleSDtest  ,
ProcessHits   
)
private

◆ FRIEND_TEST() [5/11]

LArG4SimpleSD::FRIEND_TEST ( LArG4SimpleSDtest  ,
setupHelpers   
)
private

◆ FRIEND_TEST() [6/11]

LArG4SimpleSD::FRIEND_TEST ( LArG4SimpleSDtest  ,
SimpleHit   
)
private

◆ FRIEND_TEST() [7/11]

LArG4SimpleSD::FRIEND_TEST ( SDWrappertest  ,
addFastSimSD   
)
private

◆ FRIEND_TEST() [8/11]

LArG4SimpleSD::FRIEND_TEST ( SDWrappertest  ,
addSD   
)
private

◆ FRIEND_TEST() [9/11]

LArG4SimpleSD::FRIEND_TEST ( SDWrappertest  ,
EndOfAthenaEvent   
)
private

◆ FRIEND_TEST() [10/11]

LArG4SimpleSD::FRIEND_TEST ( SDWrappertest  ,
Initialize   
)
private

◆ FRIEND_TEST() [11/11]

LArG4SimpleSD::FRIEND_TEST ( SDWrappertest  ,
ProcessHits   
)
private

◆ getTimeBin()

G4int LArG4SimpleSD::getTimeBin ( G4double  time) const
protected

Helper method for time info.

◆ 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 77 of file LArG4SimpleSD.h.

79  {
80  m_larEmID = EM;
81  m_larFcalID = FCAL;
82  m_larHecID = HEC;
83  }

◆ 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 93 of file LArG4SimpleSD.h.

◆ m_larEmID

const LArEM_ID* LArG4SimpleSD::m_larEmID
protected

Pointers to the identifier helpers.

Definition at line 143 of file LArG4SimpleSD.h.

◆ m_larFcalID

const LArFCAL_ID* LArG4SimpleSD::m_larFcalID
protected

Definition at line 144 of file LArG4SimpleSD.h.

◆ m_larHecID

const LArHEC_ID* LArG4SimpleSD::m_larHecID
protected

Definition at line 145 of file LArG4SimpleSD.h.

◆ m_numberInvalidHits

G4int LArG4SimpleSD::m_numberInvalidHits
protected

Count the number of invalid hits.

Definition at line 96 of file LArG4SimpleSD.h.

◆ m_timeBins

timeBins_t LArG4SimpleSD::m_timeBins
protected

The map of hit sets binned in time.

Definition at line 140 of file LArG4SimpleSD.h.

◆ m_timeBinType

LArG4SimpleSD::LArHitTimeBins LArG4SimpleSD::m_timeBinType
protected

Definition at line 134 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 137 of file LArG4SimpleSD.h.


The documentation for this class was generated from the following file:
LArSamples::HEC
@ HEC
Definition: CaloId.h:26
LArG4SimpleSD::HitTimeBinUniform
@ HitTimeBinUniform
Definition: LArG4SimpleSD.h:53
Ringer::EM
@ EM
Definition: CaloRingsDefs.h:19
LArG4SimpleSD::m_larFcalID
const LArFCAL_ID * m_larFcalID
Definition: LArG4SimpleSD.h:144
LArG4SimpleSD::m_larEmID
const LArEM_ID * m_larEmID
Pointers to the identifier helpers.
Definition: LArG4SimpleSD.h:143
LArG4SimpleSD::HitTimeBinDefault
@ HitTimeBinDefault
Definition: LArG4SimpleSD.h:52
LArSamples::FCAL
@ FCAL
Definition: CaloId.h:26
LArG4SimpleSD::m_larHecID
const LArHEC_ID * m_larHecID
Definition: LArG4SimpleSD.h:145