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

A specialized SD class for saving LAr calibration hits. More...

#include <LArG4CalibSD.h>

Inheritance diagram for LArG4CalibSD:
Collaboration diagram for LArG4CalibSD:

Public Member Functions

 LArG4CalibSD (G4String a_name, ILArCalibCalculatorSvc *calc, std::string hitCollectionName, std::string deadHitCollectionName, std::string srHitCollectionName, bool doPID=false)
 Constructor.
virtual ~LArG4CalibSD ()
 Destructor.
void Initialize (G4HCofThisEvent *) override
 Register this regular SD with the event-owned builders.
G4bool ProcessHits (G4Step *a_step, G4TouchableHistory *) override
 Main processing method.
void setupHelpers (const LArEM_ID *EM, const LArFCAL_ID *FCAL, const LArHEC_ID *HEC, const CaloDM_ID *caloDm)
 Sets the ID helper pointers.
void addDetectorHelper (const AtlasDetectorID *id_helper)
G4bool SpecialHit (G4Step *a_step, const std::vector< G4double > &a_energies)
 For other classes that need to call into us...

Protected Member Functions

G4bool SimpleHit (const LArG4Identifier &a_ident, const std::vector< double > &energies, bool deadMaterialHit=false)
 Constructs the calibration hit and saves it to the appropriate builder.
G4bool SrHit (const LArG4Identifier &a_ident, const LArG4Identifier &sr_id, const std::vector< double > &energies)
Identifier ConvertID (const LArG4Identifier &a_ident) const
 Helper function for making "real" identifiers from LArG4Identifiers.
Identifier ConvertSRID (const LArG4Identifier &sr_id, const LArG4Identifier &lr_id) const
LArCalibrationHitContainerBuildergetCalibrationHits (bool deadMaterialHit) const
LArSrCalibrationHitContainerBuildergetSrCalibrationHits () const

Protected Attributes

ILArCalibCalculatorSvcm_calculator
 Member variable - the calculator we'll use.
G4int m_numberInvalidHits
 Count the number of invalid hits.
G4bool m_doPID
 Are we set up to run with PID hits?
const LArEM_IDm_larEmID
 Pointers to the identifier helpers.
const LArFCAL_IDm_larFcalID
const LArHEC_IDm_larHecID
const CaloDM_IDm_caloDmID
const AtlasDetectorIDm_id_helper

Private Member Functions

 FRIEND_TEST (LArG4CalibSDtest, ProcessHits)
 FRIEND_TEST (LArG4CalibSDtest, setupHelpers)
 FRIEND_TEST (LArG4CalibSDtest, addDetectorHelper)
 FRIEND_TEST (LArG4CalibSDtest, SpecialHit)
 FRIEND_TEST (LArG4CalibSDtest, SimpleHit)
 FRIEND_TEST (LArG4CalibSDtest, ConvertID)

Private Attributes

std::string m_hitCollectionName
std::string m_deadHitCollectionName
std::string m_srHitCollectionName
std::string m_hitSourceName

Detailed Description

A specialized SD class for saving LAr calibration hits.

This SD implementation saves CaloCalibrationHit objects. See LArG4SimpleSD for an SD that handles the standard LArHits. Event state is owned by the calibration builder containers; the SD registers its regular-SD partitions during Initialize() and then writes through the builders for the current Athena event.

Definition at line 38 of file LArG4CalibSD.h.

Constructor & Destructor Documentation

◆ LArG4CalibSD()

LArG4CalibSD::LArG4CalibSD ( G4String a_name,
ILArCalibCalculatorSvc * calc,
std::string hitCollectionName,
std::string deadHitCollectionName,
std::string srHitCollectionName,
bool doPID = false )

Constructor.

◆ ~LArG4CalibSD()

virtual LArG4CalibSD::~LArG4CalibSD ( )
virtual

Destructor.

Member Function Documentation

◆ addDetectorHelper()

void LArG4CalibSD::addDetectorHelper ( const AtlasDetectorID * id_helper)
inline

Definition at line 75 of file LArG4CalibSD.h.

75{ m_id_helper=id_helper; }
const AtlasDetectorID * m_id_helper

◆ ConvertID()

Identifier LArG4CalibSD::ConvertID ( const LArG4Identifier & a_ident) const
protected

Helper function for making "real" identifiers from LArG4Identifiers.

◆ ConvertSRID()

Identifier LArG4CalibSD::ConvertSRID ( const LArG4Identifier & sr_id,
const LArG4Identifier & lr_id ) const
protected

◆ FRIEND_TEST() [1/6]

LArG4CalibSD::FRIEND_TEST ( LArG4CalibSDtest ,
addDetectorHelper  )
private

◆ FRIEND_TEST() [2/6]

LArG4CalibSD::FRIEND_TEST ( LArG4CalibSDtest ,
ConvertID  )
private

◆ FRIEND_TEST() [3/6]

LArG4CalibSD::FRIEND_TEST ( LArG4CalibSDtest ,
ProcessHits  )
private

◆ FRIEND_TEST() [4/6]

LArG4CalibSD::FRIEND_TEST ( LArG4CalibSDtest ,
setupHelpers  )
private

◆ FRIEND_TEST() [5/6]

LArG4CalibSD::FRIEND_TEST ( LArG4CalibSDtest ,
SimpleHit  )
private

◆ FRIEND_TEST() [6/6]

LArG4CalibSD::FRIEND_TEST ( LArG4CalibSDtest ,
SpecialHit  )
private

◆ getCalibrationHits()

LArCalibrationHitContainerBuilder * LArG4CalibSD::getCalibrationHits ( bool deadMaterialHit) const
protected

◆ getSrCalibrationHits()

LArSrCalibrationHitContainerBuilder * LArG4CalibSD::getSrCalibrationHits ( ) const
protected

◆ Initialize()

void LArG4CalibSD::Initialize ( G4HCofThisEvent * )
override

Register this regular SD with the event-owned builders.

◆ ProcessHits()

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

Main processing method.

◆ setupHelpers()

void LArG4CalibSD::setupHelpers ( const LArEM_ID * EM,
const LArFCAL_ID * FCAL,
const LArHEC_ID * HEC,
const CaloDM_ID * caloDm )
inline

Sets the ID helper pointers.

Definition at line 65 of file LArG4CalibSD.h.

68 {
69 m_larEmID = EM;
72 m_caloDmID = caloDm;
73 }
const CaloDM_ID * m_caloDmID
const LArHEC_ID * m_larHecID
const LArFCAL_ID * m_larFcalID
const LArEM_ID * m_larEmID
Pointers to the identifier helpers.

◆ SimpleHit()

G4bool LArG4CalibSD::SimpleHit ( const LArG4Identifier & a_ident,
const std::vector< double > & energies,
bool deadMaterialHit = false )
protected

Constructs the calibration hit and saves it to the appropriate builder.

◆ SpecialHit()

G4bool LArG4CalibSD::SpecialHit ( G4Step * a_step,
const std::vector< G4double > & a_energies )

For other classes that need to call into us...

◆ SrHit()

G4bool LArG4CalibSD::SrHit ( const LArG4Identifier & a_ident,
const LArG4Identifier & sr_id,
const std::vector< double > & energies )
protected

Member Data Documentation

◆ m_calculator

ILArCalibCalculatorSvc* LArG4CalibSD::m_calculator
protected

Member variable - the calculator we'll use.

Definition at line 89 of file LArG4CalibSD.h.

◆ m_caloDmID

const CaloDM_ID* LArG4CalibSD::m_caloDmID
protected

Definition at line 105 of file LArG4CalibSD.h.

◆ m_deadHitCollectionName

std::string LArG4CalibSD::m_deadHitCollectionName
private

Definition at line 113 of file LArG4CalibSD.h.

◆ m_doPID

G4bool LArG4CalibSD::m_doPID
protected

Are we set up to run with PID hits?

Definition at line 95 of file LArG4CalibSD.h.

◆ m_hitCollectionName

std::string LArG4CalibSD::m_hitCollectionName
private

Definition at line 112 of file LArG4CalibSD.h.

◆ m_hitSourceName

std::string LArG4CalibSD::m_hitSourceName
private

Definition at line 115 of file LArG4CalibSD.h.

◆ m_id_helper

const AtlasDetectorID* LArG4CalibSD::m_id_helper
protected

Definition at line 106 of file LArG4CalibSD.h.

◆ m_larEmID

const LArEM_ID* LArG4CalibSD::m_larEmID
protected

Pointers to the identifier helpers.

Definition at line 102 of file LArG4CalibSD.h.

◆ m_larFcalID

const LArFCAL_ID* LArG4CalibSD::m_larFcalID
protected

Definition at line 103 of file LArG4CalibSD.h.

◆ m_larHecID

const LArHEC_ID* LArG4CalibSD::m_larHecID
protected

Definition at line 104 of file LArG4CalibSD.h.

◆ m_numberInvalidHits

G4int LArG4CalibSD::m_numberInvalidHits
protected

Count the number of invalid hits.

Definition at line 92 of file LArG4CalibSD.h.

◆ m_srHitCollectionName

std::string LArG4CalibSD::m_srHitCollectionName
private

Definition at line 114 of file LArG4CalibSD.h.


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