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>
58 const std::string&
type=
"Default",
59 const float width=2.5*CLHEP::ns);
68 G4bool
ProcessHits(G4Step* a_step, G4TouchableHistory*)
override;
113 typedef std::set< LArHit*, LessHit >
hits_t;
Helper class for LArEM offline identifiers.
Helper class for LArFCAL offline identifiers.
bool operator()(LArHit *const &p, LArHit *const &q) const
FRIEND_TEST(LArG4SimpleSDtest, ConvertID)
FRIEND_TEST(LArG4SimpleSDtest, SimpleHit)
const LArHEC_ID * m_larHecID
LArG4SimpleSD(G4String a_name, StoreGateSvc *detStore)
Alternative constructor, particularly for fast simulations.
LArG4SimpleSD::LArHitTimeBins m_timeBinType
const LArFCAL_ID * m_larFcalID
FRIEND_TEST(SDWrappertest, ProcessHits)
FRIEND_TEST(SDWrappertest, addSD)
G4int m_numberInvalidHits
Count the number of invalid hits.
FRIEND_TEST(LArG4SimpleSDtest, EndOfAthenaEvent)
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.
timeBins_t m_timeBins
The map of hit sets binned in time.
LArG4SimpleSD(G4String a_name, ILArCalculatorSvc *calc, const std::string &type="Default", const float width=2.5 *CLHEP::ns)
Constructor.
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.
FRIEND_TEST(SDWrappertest, EndOfAthenaEvent)
void EndOfAthenaEvent(LArHitContainer *hitContnainer)
End of athena event processing.
virtual ~LArG4SimpleSD()
Destructor.
FRIEND_TEST(LArG4SimpleSDtest, getTimeBin)
ILArCalculatorSvc * m_calculator
Member variable - the calculator we'll use.
G4int getTimeBin(G4double time) const
Helper method for time info.
FRIEND_TEST(LArG4SimpleSDtest, setupHelpers)
std::map< G4int, hits_t * > timeBins_t
FRIEND_TEST(SDWrappertest, Initialize)
FRIEND_TEST(LArG4SimpleSDtest, ProcessHits)
G4bool SimpleHit(const LArG4Identifier &lar_id, G4double time, G4double energy)
First method translates to this - also for fast sims.
std::set< LArHit *, LessHit > hits_t
FRIEND_TEST(SDWrappertest, addFastSimSD)
Helper class for LArHEC offline identifiers.
Class to store hit energy and time in LAr cell from G4 simulation.
The Athena Transient Store API.