|
|
Go to the documentation of this file.
29 #include "G4SDManager.hh"
32 #include "G4VProcess.hh"
34 #include "G4PhysicalConstants.hh"
35 #include "G4SystemOfUnits.hh"
43 numberingScheme_(nullptr),
52 preStepPoint_(nullptr),
53 postStepPoint_(nullptr),
61 SetVerboseLevel(verbn);
63 if (
name_ ==
"CTPPSPixelHits") {
69 edm::LogInfo(
"PPSSim") <<
"PPSPixelSD: Instantiation completed";
89 LogDebug(
"PPSSim") <<
"PPSPixelSD : Initialize called for " <<
name_;
107 LogDebug(
"PPSSim") <<
"HIT NUMERO " <<
j <<
"unit ID = " << aHit->
unitID() <<
"\n"
109 <<
"enrty z " << aHit->entry().
z() <<
"\n"
135 LogDebug(
"PPSSim") <<
"PPSPixelSD: Collection " <<
theHC_->GetName();
146 LogDebug(
"PPSSim") <<
" Dispatched BeginOfEvent for " << GetName() <<
" !";
156 G4ThreeVector localPoint;
158 localPoint = touch->GetHistory()->GetTopTransform().TransformPoint(global);
170 LogDebug(
"PPSSim") <<
"theEntryPoint_ " << TheEntryPoint <<
"\n";
179 edeposit_ = aStep->GetTotalEnergyDeposit();
197 Pabs_ = aStep->GetPreStepPoint()->GetMomentum().mag() /
GeV;
198 Tof_ = aStep->GetPostStepPoint()->GetGlobalTime() / nanosecond;
200 Eloss_ = aStep->GetTotalEnergyDeposit() /
GeV;
203 ThetaAtEntry_ = aStep->GetPreStepPoint()->GetPosition().theta();
204 PhiAtEntry_ = aStep->GetPreStepPoint()->GetPosition().phi();
249 LogDebug(
"PPSSim") <<
"PPSPixelSD CreateNewHit for"
251 <<
" MVid = " <<
currentPV_->GetMother()->GetCopyNo() <<
" Unit " <<
unitID_ <<
"\n"
253 <<
theTrack_->GetTrackID() <<
" which is a " <<
theTrack_->GetDefinition()->GetParticleName();
311 if (
hit ==
nullptr) {
312 edm::LogWarning(
"PPSSim") <<
"PPSPixelSD: hit to be stored is NULL !!";
void setTimeSlice(double d)
void storeHit(PPSPixelG4Hit *)
bool ProcessHits(G4Step *, G4TouchableHistory *) override
PPSPixelG4Hit * currentHit_
void setThetaAtEntry(float t)
void Initialize(G4HCofThisEvent *HCE) override
void update(const BeginOfEvent *) override
This routine will be called when the appropriate signal arrives.
void EndOfEvent(G4HCofThisEvent *eventHC) override
float thetaAtEntry() const
G4StepPoint * postStepPoint_
T getUntrackedParameter(std::string const &, T const &) const
Log< level::Info, false > LogInfo
PPSPixelSD(const std::string &, const edm::EventSetup &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, SimTrackManager const *)
void setUnitID(uint32_t i)
void setParticleType(short i)
Log< level::Warning, false > LogWarning
std::unique_ptr< PPSVDetectorOrganization > numberingScheme_
const G4ThreeVector & exitPoint() const
void stepInfo(const G4Step *aStep)
void setMeanPosition(const G4ThreeVector &a)
G4ThreeVector theEntryPoint_
void setExitPoint(const G4ThreeVector &)
G4ThreeVector theExitPoint_
void fillHits(edm::PSimHitContainer &, const std::string &) override
Local3DPoint FinalStepPosition(const G4Step *step, coordinates) const
Local3DPoint InitialStepPosition(const G4Step *step, coordinates) const
G4THitsCollection< PPSPixelG4Hit > PPSPixelG4HitCollection
static constexpr unsigned int maxPixelHits_
G4ThreeVector entrancePoint_
void setIncidentEnergy(double e)
void setEnergyLoss(float e)
const G4ThreeVector & entryPoint() const
uint32_t setDetUnitId(const G4Step *) override
void resetForNewPrimary()
void clearHits() override
G4ThreeVector setToLocal(const G4ThreeVector &globalPoint)
std::unique_ptr< TrackingSlaveSD > slave_
G4StepPoint * preStepPoint_
std::vector< PSimHit > PSimHitContainer
void setEntryPoint(const G4ThreeVector &)
PPSPixelG4HitCollection * theHC_
G4VPhysicalVolume * currentPV_
void setPhiAtEntry(float f)