#include <HFChamberSD.h>
Definition at line 21 of file HFChamberSD.h.
◆ HFChamberSD()
◆ ~HFChamberSD()
HFChamberSD::~HFChamberSD |
( |
| ) |
|
|
override |
◆ clear()
void HFChamberSD::clear |
( |
void |
| ) |
|
|
override |
◆ clearHits()
void HFChamberSD::clearHits |
( |
| ) |
|
|
overridevirtual |
◆ DrawAll()
void HFChamberSD::DrawAll |
( |
| ) |
|
|
override |
◆ EndOfEvent()
void HFChamberSD::EndOfEvent |
( |
G4HCofThisEvent * |
HCE | ) |
|
|
override |
◆ fillHits()
◆ Initialize()
void HFChamberSD::Initialize |
( |
G4HCofThisEvent * |
HCE | ) |
|
|
override |
◆ PrintAll()
void HFChamberSD::PrintAll |
( |
| ) |
|
|
override |
◆ ProcessHits()
G4bool HFChamberSD::ProcessHits |
( |
G4Step * |
aStep, |
|
|
G4TouchableHistory * |
ROhist |
|
) |
| |
|
overridevirtual |
Implements SensitiveDetector.
Definition at line 39 of file HFChamberSD.cc.
41 double charge = aStep->GetTrack()->GetDefinition()->GetPDGCharge();
42 int trackID = aStep->GetTrack()->GetTrackID();
43 if (
charge == 0. || trackID != 1 || aStep->GetTrack()->GetParentID() != 0 ||
44 aStep->GetTrack()->GetCreatorProcess() !=
nullptr)
49 G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
50 const G4VTouchable* touch = preStepPoint->GetTouchable();
53 double edep = aStep->GetTotalEnergyDeposit();
54 double time = (preStepPoint->GetGlobalTime()) / ns;
56 const G4ThreeVector& globalPos = preStepPoint->GetPosition();
57 G4ThreeVector localPos = touch->GetHistory()->GetTopTransform().TransformPoint(globalPos);
58 const G4DynamicParticle* particle = aStep->GetTrack()->GetDynamicParticle();
59 const G4ThreeVector& momDir = particle->GetMomentumDirection();
67 edm::LogVerbatim(
"FiberSim") <<
"HFChamberSD: Hit created in (" << touch->GetVolume(0)->GetLogicalVolume()->GetName() <<
") ID " << detID <<
" Track " << trackID <<
" Edep: " << edep /
CLHEP::MeV <<
" MeV; Time: " <<
time <<
" ns; Position (local) " << localPos <<
" (global ) " << globalPos <<
" direction " << momDir;
References ALCARECOTkAlJpsiMuMu_cff::charge, MeV, setDetUnitId(), HFShowerG4Hit::setGlobalPos(), HFShowerG4Hit::setLocalPos(), HFShowerG4Hit::setPrimMomDir(), theHC, theNSteps, and protons_cff::time.
◆ setDetUnitId()
uint32_t HFChamberSD::setDetUnitId |
( |
const G4Step * |
aStep | ) |
|
|
overridevirtual |
◆ theHC
◆ theHCID
G4int HFChamberSD::theHCID |
|
private |
◆ theNSteps
int HFChamberSD::theNSteps |
|
private |