12#include <ecl/dataobjects/ECLHit.h>
13#include <ecl/dataobjects/ECLSimHit.h>
14#include <ecl/dbobjects/ECLHadronComponentEmissionFunction.h>
17#include <framework/database/DBObjPtr.h>
18#include <framework/datastore/RelationArray.h>
19#include <framework/datastore/StoreArray.h>
20#include <simulation/dataobjects/BeamBackHit.h>
21#include <simulation/kernel/SensitiveDetectorBase.h>
24#include <G4EmCalculator.hh>
27#include <Math/Vector3D.h>
47 void Initialize(G4HCofThisEvent* HCTE)
override;
50 bool step(G4Step* aStep, G4TouchableHistory* history)
override;
53 void EndOfEvent(G4HCofThisEvent* eventHC)
override;
59 int saveSimHit(G4int, G4int, G4int, G4double, G4double,
const G4ThreeVector&,
const G4ThreeVector&,
double);
89 void Initialize(G4HCofThisEvent* HCTE)
override;
92 bool step(G4Step* aStep, G4TouchableHistory* history)
override;
95 void EndOfEvent(G4HCofThisEvent* eventHC)
override;
122 bool step(G4Step* aStep, G4TouchableHistory* history)
override;
Class for accessing objects in the database.
Class for ECL Sensitive Detector for neutron background study.
bool step(G4Step *aStep, G4TouchableHistory *history) override
Process each step and calculate variables defined in ECLHit.
double m_energyDeposit
energy deposited in volume
ROOT::Math::XYZVector m_startPos
particle position at the entrance in volume
double m_startEnergy
particle energy at the entrance in volume
double m_startTime
global time
double m_trackLength
length of the track in the volume
ECLGeometryPar * m_eclp
pointer to ECLGeometryPar
StoreArray< MCParticle > m_mcParticles
MCParticle array.
RelationArray m_eclBeamBkgHitRel
MCParticle to BeamBackHit relation array.
ROOT::Math::XYZVector m_startMom
particle momentum at the entrance in volume
StoreArray< BeamBackHit > m_eclBeamBkgHits
BeamBackHit array.
The Class for ECL Geometry Parameters.
Class for ECL Sensitive Detector.
bool step(G4Step *aStep, G4TouchableHistory *history) override
Process each step and calculate variables defined in ECLHit.
double m_energyDeposit
total energy deposited in a volume by a track
double GetHadronIntensityFromDEDX(double)
Evaluates hadron scintillation component emission function.
double m_hadronenergyDeposit
energy deposited resulting in hadronic scint component
TGraph * m_HadronEmissionFunction
Graph for hadron scintillation component emission function.
int m_trackID
current track id
StoreArray< ECLSimHit > m_eclSimHits
ECLSimHit array.
G4ThreeVector m_momentum
initial momentum of track before energy deposition inside sensitive volume
DBObjPtr< ECLHadronComponentEmissionFunction > m_ECLHadronComponentEmissionFunction
Hadron Component Emission Function.
G4EmCalculator m_emCal
Used to get dE/dx for pulse shape simulations.
void EndOfEvent(G4HCofThisEvent *eventHC) override
Do what you want to do at the end of each event.
void Initialize(G4HCofThisEvent *HCTE) override
Register ECL hits collection into G4HCofThisEvent.
double m_WeightedTime
average track time weighted by energy deposition
RelationArray m_eclHitRel
MCParticle to ECLHit relation array.
StoreArray< ECLHit > m_eclHits
ECLHit array.
SensitiveDetector(G4String, G4double, G4double)
Constructor.
int saveSimHit(G4int, G4int, G4int, G4double, G4double, const G4ThreeVector &, const G4ThreeVector &, double)
Create ECLSimHit and ECLHit and relations from MCParticle and put them in datastore.
StoreArray< MCParticle > m_mcParticles
MCParticle array.
~SensitiveDetector()
Destructor.
G4ThreeVector m_WeightedPos
average track position weighted by energy deposition
RelationArray m_eclSimHitRel
MCParticle to ECLSimHit relation array.
Class for ECL Sensitive Detector.
bool step(G4Step *aStep, G4TouchableHistory *history) override
Process each step and calculate variables defined in ECLHit.
std::vector< hit_t > m_hits
array of hits
int m_trackID
current track id
double m_tsum
average track time weighted by energy deposition
std::vector< int > m_cells
array of hit crystals
double m_esum
total energy deposited in a volume by a track
void EndOfEvent(G4HCofThisEvent *eventHC) override
Do what you want to do at the end of each event.
~SensitiveDiode()
Destructor.
void Initialize(G4HCofThisEvent *HCTE) override
Register ECL hits collection into G4HCofThisEvent.
ECLGeometryPar * m_eclp
pointer to ECLGeometryPar
StoreArray< ECLHit > m_eclHits
ECLHit array.
Low-level class to create/modify relations between StoreArrays.
Base class for all Sensitive Detectors to create hits during simulation.
Accessor to arrays stored in the data store.
Abstract base class for different kinds of events.
double t
time of energy deposition in a crystal
double e
energy deposition in a crystal