16 :G4VSensitiveDetector(name)
18 G4cout << name << G4endl;
19 collectionName.insert(
"TungstenPlugCollection");
50 if (aStep->GetPreStepPoint()->GetStepStatus() != fGeomBoundary )
return false;
52 G4TouchableHandle theTouchable = aStep->GetPreStepPoint()->GetTouchableHandle();
54 G4int motherCopyNo = theTouchable->GetVolume(1)->GetCopyNo();
57 G4double trackID = aStep->GetTrack()->GetTrackID();
59 G4ParticleDefinition* fpParticleDefinition = aStep->GetTrack()->GetDefinition();
60 G4String particleName = fpParticleDefinition->GetParticleName();
62 G4int pdgEncoding = fpParticleDefinition->GetPDGEncoding();
65 G4double globalTime = aStep->GetPreStepPoint()->GetGlobalTime();
67 G4ThreeVector worldPos = aStep->GetPreStepPoint()->GetPosition();
68 G4ThreeVector localPos = theTouchable->GetHistory()->GetTopTransform().TransformPoint(worldPos);
71 G4ThreeVector originVertexPosition = aStep->GetTrack()->GetVertexPosition();
73 G4ThreeVector worldMomentum = aStep->GetPreStepPoint()->GetMomentum();
74 G4ThreeVector localMomentum = theTouchable->GetHistory()->GetTopTransform().TransformPoint(worldMomentum);
75 G4ThreeVector currentMomentumDirection = aStep->GetTrack()->GetMomentumDirection();
76 G4ThreeVector originVertexMomentumDirection = aStep->GetTrack()->GetVertexMomentumDirection();
78 G4double originVertexKineticEnergy = aStep->GetTrack()->GetVertexKineticEnergy();
79 G4double originVertexTotalEnergy = aStep->GetTrack()->GetVertexKineticEnergy();
81 G4double currentKineticEnergy = aStep->GetTrack()->GetKineticEnergy();
82 G4double currentTotalEnergy = aStep->GetTrack()->GetTotalEnergy();
85 G4double depositedEnergy = aStep->GetTotalEnergyDeposit();
90 aHit -> StoreTrackID(trackID);
92 aHit -> StoreParticleName(particleName);
93 aHit -> StoreParticleType(pdgEncoding);
95 aHit -> StoreGlobalTime(globalTime);
97 aHit -> StoreWorldPosition(worldPos);
98 aHit -> StoreLocalPosition(localPos);
99 aHit -> StoreOriginVertexPosition(originVertexPosition);
101 aHit -> StoreWorldMomentum(worldMomentum);
102 aHit -> StoreLocalMomentum(localMomentum);
103 aHit -> StoreMomentumDirection(currentMomentumDirection);
104 aHit -> StoreOriginVertexMomentumDirection(originVertexMomentumDirection);
106 aHit -> StoreOriginVertexKineticEnergy(originVertexKineticEnergy);
107 aHit -> StoreOriginVertexTotalEnergy(originVertexTotalEnergy);
109 aHit -> StoreKineticEnergy(currentKineticEnergy);
110 aHit -> StoreTotalEnergy(currentTotalEnergy);
113 aHit -> StoreDepositedEnergy(depositedEnergy);
~QweakSimTungstenPlug_DetectorSD()
QweakSimTungstenPlug_DetectorSD(G4String name)
void Initialize(G4HCofThisEvent *HCE)
G4THitsCollection< QweakSimTungstenPlug_DetectorHit > QweakSimTungstenPlug_DetectorHitsCollection
G4int TungstenPlug_CollectionID
G4bool ProcessHits(G4Step *aStep, G4TouchableHistory *ROhist)
QweakSimTungstenPlug_DetectorHitsCollection * TungstenPlug_DetectorHitsCollection
void EndOfEvent(G4HCofThisEvent *HCE)