5#ifndef LARG4CODE_LARG4SIMPLESD_H
6#define LARG4CODE_LARG4SIMPLESD_H
8#include "G4VSensitiveDetector.hh"
13#include "CLHEP/Units/SystemOfUnits.h"
14#include <gtest/gtest_prod.h>
54 std::string hitCollectionName,
55 const std::string&
type=
"Default",
56 const float width=2.5*CLHEP::ns);
60 std::string hitCollectionName);
69 G4bool
ProcessHits(G4Step* a_step, G4TouchableHistory*)
override;
Helper class for LArEM offline identifiers.
Helper class for LArFCAL offline identifiers.
FRIEND_TEST(LArG4SimpleSDtest, ConvertID)
FRIEND_TEST(LArG4SimpleSDtest, SimpleHit)
std::string m_hitCollectionName
const LArHEC_ID * m_larHecID
LArG4SimpleSD::LArHitTimeBins m_timeBinType
const LArFCAL_ID * m_larFcalID
G4int m_numberInvalidHits
Count the number of invalid hits.
G4bool ProcessHits(G4Step *a_step, G4TouchableHistory *) override
Main processing method.
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.
const LArEM_ID * m_larEmID
Pointers to the identifier helpers.
G4float m_timeBinWidth
Width of the time bins for summing hits - for the uniform binning.
LArHitContainerBuilder * getHitContainer() const
LArG4SimpleSD(G4String a_name, StoreGateSvc *detStore, std::string hitCollectionName)
Alternative constructor, particularly for fast simulations.
virtual ~LArG4SimpleSD()
Destructor.
FRIEND_TEST(LArG4SimpleSDtest, getTimeBin)
std::string m_hitSourceName
ILArCalculatorSvc * m_calculator
Member variable - the calculator we'll use.
LArG4SimpleSD(G4String a_name, ILArCalculatorSvc *calc, std::string hitCollectionName, const std::string &type="Default", const float width=2.5 *CLHEP::ns)
Constructor.
G4int getTimeBin(G4double time) const
Helper method for time info.
FRIEND_TEST(LArG4SimpleSDtest, setupHelpers)
void Initialize(G4HCofThisEvent *) override
Register this regular SD with the event-owned builder.
FRIEND_TEST(LArG4SimpleSDtest, ProcessHits)
G4bool SimpleHit(const LArG4Identifier &lar_id, G4double time, G4double energy)
First method translates to this - also for fast sims.
Helper class for LArHEC offline identifiers.
Event-owned builder for standard LAr hits.
The Athena Transient Store API.