16 #include "G4SDManager.hh" 19 #include "G4VProcess.hh" 20 #include "G4ParticleDefinition.hh" 21 #include "G4ParticleTypes.hh" 23 #include "G4PhysicalConstants.hh" 24 #include "G4SystemOfUnits.hh" 38 LogDebug(
"PPSSimDiamond") <<
"*******************************************************\n" 40 <<
"* Constructing a PPSDiamondSD with name " <<
pname <<
"\n" 42 <<
"*******************************************************" 47 if (
pname ==
"CTPPSDiamandHits") {
51 edm::LogError(
"PPSSimDiamond") <<
"PPSDiamondSD: ReadoutName " <<
pname <<
" not supported";
60 LogDebug(
"PPSSimDiamond") <<
"PPSDiamondSD : Initialize called for " << GetName();
63 G4SDManager::GetSDMpointer()->AddNewCollection(GetName(),
collectionName[0]);
70 LogDebug(
"PPSSimDiamond") <<
theTrack_->GetDefinition()->GetParticleName() <<
" PPS_Timing_SD CreateNewHit for" 76 LogDebug(
"PPSSimDiamond") <<
" positions " 79 <<
" For Track " <<
theTrack_->GetTrackID() <<
" which is a " 80 <<
theTrack_->GetDefinition()->GetParticleName() <<
" ParentID is " 84 LogDebug(
"PPSSimDiamond") <<
" primary particle ";
89 LogDebug(
"PPSSimDiamond") <<
" and created by ";
91 if (
theTrack_->GetCreatorProcess() !=
nullptr)
94 LogDebug(
"PPSSimDiamond") <<
"NO process";
98 eloss_ = aStep->GetTotalEnergyDeposit();
102 if (
theTrack_->GetDefinition()->GetPDGEncoding() == 2212) {
105 LogDebug(
"PPSSimDiamond") <<
" information imported to the hit ";
144 ((G4TouchableHistory*)(
preStepPoint_->GetTouchable()))->GetHistory()->GetTopTransform().TransformAxis(gmd);
159 if (
hit ==
nullptr) {
161 LogDebug(
"PPSSimDiamond") <<
"PPSDiamond: hit to be stored is NULL !!";
198 G4ThreeVector localPoint;
200 localPoint = touch->GetHistory()->GetTopTransform().TransformPoint(global);
207 for (
unsigned int j = 0;
j < (
unsigned int)
theHC_->entries(); ++
j) {
226 LogDebug(
"PPSSimDiamond") <<
"PPSDiamond: Collection " <<
theHC_->GetName() <<
"\n";
236 LogDebug(
"PPSSimDiamond") <<
" Dispatched BeginOfEvent !" Log< level::Info, true > LogVerbatim
G4VPhysicalVolume * currentPV_
G4ThreeVector setToLocal(const G4ThreeVector &globalPoint)
T getParameter(std::string const &) const
PPSDiamondG4Hit * currentHit_
void stepInfo(const G4Step *aStep)
Geom::Phi< T > phi() const
double thetaAtEntry() const
std::unique_ptr< TrackingSlaveSD > slave_
std::unique_ptr< PPSVDetectorOrganization > numberingScheme_
void setEntry(const G4ThreeVector &xyz)
G4ThreeVector theLocalEntryPoint_
void fillHits(edm::PSimHitContainer &, const std::string &) override
PPSDiamondSD(const std::string &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
void setIncidentEnergy(double e)
void setThetaAtEntry(double t)
G4ThreeVector theLocalExitPoint_
Log< level::Error, false > LogError
void clearHits() override
bool ProcessHits(G4Step *step, G4TouchableHistory *tHistory) override
void EndOfEvent(G4HCofThisEvent *eventHC) override
double phiAtEntry() const
void Initialize(G4HCofThisEvent *HCE) override
void setUnitID(unsigned int i)
void setEnergyLoss(double e)
double energyLoss() const
void setExit(const G4ThreeVector &xyz)
void update(const BeginOfEvent *) override
This routine will be called when the appropriate signal arrives.
Local3DPoint ConvertToLocal3DPoint(const G4ThreeVector &point) const
void storeHit(PPSDiamondG4Hit *)
uint32_t setDetUnitId(const G4Step *) override
void setPhiAtEntry(double f)
const G4ThreeVector & localExit() const
PPSDiamondG4HitCollection * theHC_
void setParticleType(short i)
const G4ThreeVector & localEntry() const
void setGlobalTimehit(double h)
void setLocalEntry(const G4ThreeVector &theLocalEntryPoint)
unsigned int trackID() const
G4THitsCollection< PPSDiamondG4Hit > PPSDiamondG4HitCollection
G4StepPoint * postStepPoint_
G4StepPoint * preStepPoint_
std::vector< PSimHit > PSimHitContainer
void setLocalExit(const G4ThreeVector &theLocalExitPoint)
Geom::Theta< T > theta() const
void setTimeSlice(double d)