29 #include "G4SDManager.hh" 32 #include "G4VProcess.hh" 34 #include "G4PhysicalConstants.hh" 35 #include "G4SystemOfUnits.hh" 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";
177 name_.assign(name_, 0, 4);
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 setParticleType(short i)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
float thetaAtEntry() const
G4ThreeVector setToLocal(const G4ThreeVector &globalPoint)
G4ThreeVector theEntryPoint_
uint32_t setDetUnitId(const G4Step *) override
void stepInfo(const G4Step *aStep)
const G4ThreeVector & exitPoint() const
void clearHits() override
void setExitPoint(const G4ThreeVector &)
G4VPhysicalVolume * currentPV_
G4StepPoint * preStepPoint_
void storeHit(PPSPixelG4Hit *)
bool ProcessHits(G4Step *, G4TouchableHistory *) override
void update(const BeginOfEvent *) override
This routine will be called when the appropriate signal arrives.
PPSPixelG4Hit * currentHit_
void setPhiAtEntry(float f)
void resetForNewPrimary()
Local3DPoint FinalStepPosition(const G4Step *step, coordinates) const
void Initialize(G4HCofThisEvent *HCE) override
const G4ThreeVector & entryPoint() const
std::unique_ptr< TrackingSlaveSD > slave_
void setTimeSlice(double d)
void setEntryPoint(const G4ThreeVector &)
PPSPixelG4HitCollection * theHC_
void setThetaAtEntry(float t)
static unsigned int maxPixelHits_
std::unique_ptr< PPSVDetectorOrganization > numberingScheme_
G4ThreeVector theExitPoint_
void fillHits(edm::PSimHitContainer &, const std::string &) override
void setUnitID(uint32_t i)
G4THitsCollection< PPSPixelG4Hit > PPSPixelG4HitCollection
G4StepPoint * postStepPoint_
std::vector< PSimHit > PSimHitContainer
void EndOfEvent(G4HCofThisEvent *eventHC) override
PPSPixelSD(const std::string &, const edm::EventSetup &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, SimTrackManager const *)
void setIncidentEnergy(double e)
void setEnergyLoss(float e)
G4ThreeVector entrancePoint_
void setMeanPosition(const G4ThreeVector &a)
Local3DPoint InitialStepPosition(const G4Step *step, coordinates) const