21 #include "G4SDManager.hh" 24 #include "G4VProcess.hh" 26 #include "G4PhysicalConstants.hh" 27 #include "G4SystemOfUnits.hh" 47 if (
pname ==
"TotemHitsRP") {
59 LogDebug(
"TotemRP") <<
"TotemRPSD : Initialize called for " << GetName();
62 G4SDManager::GetSDMpointer()->AddNewCollection(GetName(),
collectionName[0]);
67 LogDebug(
"TotemRP") <<
"TotemRPSD: is initialized for " << GetName();
71 LogDebug(
"TotemRP") <<
theTrack_->GetDefinition()->GetParticleName() <<
" TotemRPSD CreateNewHit for" 79 LogDebug(
"TotemRP") <<
" primary particle ";
84 LogDebug(
"TotemRP") <<
" and created by ";
86 if (
theTrack_->GetCreatorProcess() !=
nullptr)
93 eloss_ = aStep->GetTotalEnergyDeposit();
98 <<
theTrack_->GetDefinition()->GetParticleName();
138 ((G4TouchableHistory*)(
preStepPoint_->GetTouchable()))->GetHistory()->GetTopTransform().TransformAxis(gmd);
153 if (
hit ==
nullptr) {
155 LogDebug(
"TotemRP") <<
"TotemRPSD: hit to be stored is NULL !!" << std::endl;
200 G4ThreeVector localPoint;
202 localPoint = touch->GetHistory()->GetTopTransform().TransformPoint(global);
208 for (
unsigned int j = 0;
j < (
unsigned int)
theHC_->entries(); ++
j) {
227 LogDebug(
"TotemRP") <<
"TotemRPSD: Collection " <<
theHC_->GetName() << std::endl;
void setEntry(G4ThreeVector xyz)
G4ThreeVector localExit() const
Log< level::Info, true > LogVerbatim
void fillHits(edm::PSimHitContainer &, const std::string &) override
T getParameter(std::string const &) const
G4ThreeVector localEntry() const
G4THitsCollection< TotemRPG4Hit > TotemRPG4HitCollection
G4ThreeVector setToLocal(const G4ThreeVector &globalPoint)
void setIncidentEnergy(double e)
Geom::Phi< T > phi() const
G4VPhysicalVolume * currentPV_
std::unique_ptr< TotemRPVDetectorOrganization > numberingScheme_
void storeHit(TotemRPG4Hit *)
bool ProcessHits(G4Step *step, G4TouchableHistory *tHistory) override
double energyLoss() const
TotemRPG4HitCollection * theHC_
double thetaAtEntry() const
double phiAtEntry() const
void setLocalEntry(const G4ThreeVector &theLocalEntryPoint)
void stepInfo(const G4Step *aStep)
void clearHits() override
void Initialize(G4HCofThisEvent *HCE) override
void EndOfEvent(G4HCofThisEvent *eventHC) override
void setExit(G4ThreeVector xyz)
Local3DPoint ConvertToLocal3DPoint(const G4ThreeVector &point) const
G4ThreeVector theLocalEntryPoint_
uint32_t setDetUnitId(const G4Step *step) override
G4StepPoint * postStepPoint_
Abs< T >::type abs(const T &t)
void setLocalExit(const G4ThreeVector &theLocalExitPoint)
void setThetaAtEntry(double t)
G4StepPoint * preStepPoint_
void setUnitID(unsigned int i)
G4ThreeVector theLocalExitPoint_
void setPhiAtEntry(double f)
TotemRPSD(const std::string &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
void update(const BeginOfEvent *) override
This routine will be called when the appropriate signal arrives.
static constexpr double rp_garage_position_
void setParticleType(short i)
std::vector< PSimHit > PSimHitContainer
Log< level::Warning, false > LogWarning
void setEnergyLoss(double e)
std::unique_ptr< TrackingSlaveSD > slave_
TotemRPG4Hit * currentHit_
Geom::Theta< T > theta() const
unsigned int trackID() const
void setTimeSlice(double d)