#include <HFChamberSD.h>
|
void | clear () override |
|
void | clearHits () override |
|
void | DrawAll () override |
|
void | EndOfEvent (G4HCofThisEvent *HCE) override |
|
void | fillHits (edm::PCaloHitContainer &, const std::string &) override |
|
| HFChamberSD (const std::string &, const edm::EventSetup &, const SensitiveDetectorCatalog &, const edm::ParameterSet &, const SimTrackManager *) |
|
void | Initialize (G4HCofThisEvent *HCE) override |
|
void | PrintAll () override |
|
G4bool | ProcessHits (G4Step *aStep, G4TouchableHistory *ROhist) override |
|
uint32_t | setDetUnitId (const G4Step *) override |
|
| ~HFChamberSD () override |
|
virtual void | reset () |
|
| SensitiveCaloDetector (const std::string &iname, const edm::EventSetup &es, const SensitiveDetectorCatalog &clg, edm::ParameterSet const &p) |
|
void | EndOfEvent (G4HCofThisEvent *eventHC) override |
|
const std::vector< std::string > & | getNames () const |
|
void | Initialize (G4HCofThisEvent *eventHC) override |
|
bool | isCaloSD () const |
|
| SensitiveDetector (const std::string &iname, const edm::EventSetup &es, const SensitiveDetectorCatalog &, edm::ParameterSet const &p, bool calo) |
|
| ~SensitiveDetector () override |
|
Definition at line 19 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 40 of file HFChamberSD.cc.
42 double charge = aStep->GetTrack()->GetDefinition()->GetPDGCharge();
43 int trackID = aStep->GetTrack()->GetTrackID();
44 if (
charge == 0. || trackID != 1 || aStep->GetTrack()->GetParentID() != 0 ||
45 aStep->GetTrack()->GetCreatorProcess() !=
nullptr)
50 G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
51 const G4VTouchable* touch = preStepPoint->GetTouchable();
54 double edep = aStep->GetTotalEnergyDeposit();
55 double time = (preStepPoint->GetGlobalTime()) / ns;
57 const G4ThreeVector& globalPos = preStepPoint->GetPosition();
58 G4ThreeVector localPos = touch->GetHistory()->GetTopTransform().TransformPoint(globalPos);
59 const G4DynamicParticle* particle = aStep->GetTrack()->GetDynamicParticle();
60 const G4ThreeVector& momDir = particle->GetMomentumDirection();
67 edm::LogVerbatim(
"FiberSim") <<
"HFChamberSD: Hit created in (" << touch->GetVolume(0)->GetLogicalVolume()->GetName()
68 <<
") ID " << detID <<
" Track " << trackID <<
" Edep: " << edep /
CLHEP::MeV
69 <<
" MeV; Time: " <<
time <<
" ns; Position (local) " << localPos <<
" (global ) "
70 << 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 |
◆ m_trackManager
◆ theHC
◆ theHCID
G4int HFChamberSD::theHCID |
|
private |
◆ theNSteps
int HFChamberSD::theNSteps |
|
private |