|
|
Go to the documentation of this file.
21 #include "G4SDManager.hh"
24 #include "G4VProcess.hh"
26 #include "G4PhysicalConstants.hh"
27 #include "G4SystemOfUnits.hh"
39 numberingScheme_(nullptr),
46 preStepPoint_(nullptr),
47 postStepPoint_(nullptr),
56 if (
name_ ==
"TotemHitsRP") {
62 edm::LogInfo(
"TotemRP") <<
"TotemRPSD: Instantiation completed";
68 LogDebug(
"TotemRP") <<
"TotemRPSD : Initialize called for " <<
name_;
79 LogDebug(
"TotemRP") <<
theTrack_->GetDefinition()->GetParticleName() <<
" TotemRPSD CreateNewHit for"
83 <<
theTrack_->GetTotalEnergy() <<
" Eloss_ " <<
Eloss_ <<
" positions ";
84 printf(
"(%10f,%10f,%10f)",
88 printf(
"(%10f,%10f,%10f)",
95 <<
" For Track " <<
theTrack_->GetTrackID() <<
" which is a "
96 <<
theTrack_->GetDefinition()->GetParticleName();
99 LogDebug(
"TotemRP") <<
" primary particle ";
104 LogDebug(
"TotemRP") <<
" and created by ";
106 if (
theTrack_->GetCreatorProcess() !=
nullptr)
109 LogDebug(
"TotemRP") <<
"NO process";
115 if (aStep ==
nullptr) {
147 Pabs_ = (aStep->GetPreStepPoint()->GetMomentum().mag()) /
GeV;
148 thePx_ = (aStep->GetPreStepPoint()->GetMomentum().x()) /
GeV;
149 thePy_ = (aStep->GetPreStepPoint()->GetMomentum().y()) /
GeV;
150 thePz_ = (aStep->GetPreStepPoint()->GetMomentum().z()) /
GeV;
152 Tof_ = aStep->GetPostStepPoint()->GetGlobalTime() / nanosecond;
153 Eloss_ = aStep->GetTotalEnergyDeposit() /
GeV;
157 G4ThreeVector gmd = aStep->GetPreStepPoint()->GetMomentumDirection();
159 G4ThreeVector lmd = ((G4TouchableHistory*)(aStep->GetPreStepPoint()->GetTouchable()))
182 if (
hit ==
nullptr) {
184 LogDebug(
"TotemRP") <<
"TotemRPSD: hit to be stored is NULL !!" << std::endl;
231 G4ThreeVector localPoint;
233 localPoint = touch->GetHistory()->GetTopTransform().TransformPoint(global);
265 LogDebug(
"TotemRP") <<
"TotemRPSD: Collection " <<
theHC_->GetName() << std::endl;
276 LogDebug(
"TotemRP") <<
"TotemRPSD: updates numbering scheme for " << GetName();
void setExit(G4ThreeVector xyz)
G4ThreeVector theLocalEntryPoint_
void setNumberingScheme(TotemRPVDetectorOrganization *scheme)
void setParticleType(short i)
double thetaAtEntry() const
G4ThreeVector localExit() const
TotemRPG4HitCollection * theHC_
Geom::Theta< T > theta() const
void EndOfEvent(G4HCofThisEvent *eventHC) override
G4ThreeVector localEntry() const
void setThetaAtEntry(double t)
void storeHit(TotemRPG4Hit *)
void setLocalEntry(const G4ThreeVector &theLocalEntryPoint)
uint32_t setDetUnitId(const G4Step *step) override
void setPhiAtEntry(double f)
void clearHits() override
TotemRPG4Hit * currentHit_
void fillHits(edm::PSimHitContainer &, const std::string &) override
void setEntry(G4ThreeVector xyz)
void setEnergyLoss(double e)
TotemRPSD(const std::string &, const edm::EventSetup &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
void setTimeSlice(double d)
G4StepPoint * preStepPoint_
G4THitsCollection< TotemRPG4Hit > TotemRPG4HitCollection
Local3DPoint ConvertToLocal3DPoint(const G4ThreeVector &point) const
bool isPrimary(const G4Track *track)
void stepInfo(const G4Step *aStep)
void setIncidentEnergy(double e)
void update(const BeginOfEvent *) override
This routine will be called when the appropriate signal arrives.
G4StepPoint * postStepPoint_
T getParameter(std::string const &) const
static constexpr unsigned int maxTotemHits_
std::unique_ptr< TotemRPVDetectorOrganization > numberingScheme_
void setLocalExit(const G4ThreeVector &theLocalExitPoint)
void setUnitID(unsigned int i)
double phiAtEntry() const
double energyLoss() const
G4ThreeVector theLocalExitPoint_
void Initialize(G4HCofThisEvent *HCE) override
unsigned int trackID() const
std::vector< PSimHit > PSimHitContainer
static constexpr double rp_garage_position_
G4VPhysicalVolume * currentPV_
std::unique_ptr< TrackingSlaveSD > slave_
bool ProcessHits(G4Step *step, G4TouchableHistory *tHistory) override
Geom::Phi< T > phi() const
G4ThreeVector setToLocal(const G4ThreeVector &globalPoint)