7 collectionName.insert(
"LumiCollection");
17 Lumi_CollectionID = G4SDManager::GetSDMpointer()->GetCollectionID(collectionName[0]);
23 G4double charge = aStep->GetTrack()->GetDefinition()->GetPDGCharge();
24 if(charge==0. && aStep->GetTrack()->GetTotalEnergy()/MeV < 0.1) {
29 if( aStep->GetTrack()->GetDefinition()->GetParticleName() ==
"opticalphoton") {
33 if(aStep->GetPreStepPoint()->GetStepStatus() != fGeomBoundary)
36 G4TouchableHandle theTouchable = aStep->GetPreStepPoint()->GetTouchableHandle();
37 G4int motherCopyNo = theTouchable->GetVolume(1)->GetCopyNo();
39 G4double trackID = aStep->GetTrack()->GetTrackID();
41 G4ParticleDefinition* fpParticleDefinition = aStep->GetTrack()->GetDefinition();
42 G4String particleName = fpParticleDefinition->GetParticleName();
44 G4int pdgEncoding = fpParticleDefinition->GetPDGEncoding();
46 G4double globalTime = aStep->GetPreStepPoint()->GetGlobalTime();
48 G4ThreeVector worldPos = aStep->GetPreStepPoint()->GetPosition();
49 G4ThreeVector localPos = theTouchable->GetHistory()->GetTopTransform().TransformPoint(worldPos);
50 G4ThreeVector originVertexPosition = aStep->GetTrack()->GetVertexPosition();
52 G4ThreeVector worldMomentum = aStep->GetPreStepPoint()->GetMomentum();
53 G4ThreeVector localMomentum = theTouchable->GetHistory()->GetTopTransform().TransformPoint(worldMomentum);
54 G4ThreeVector currentMomentumDirection = aStep->GetTrack()->GetMomentumDirection();
55 G4ThreeVector originVertexMomentumDirection = aStep->GetTrack()->GetVertexMomentumDirection();
57 G4double originVertexKineticEnergy = aStep->GetTrack()->GetVertexKineticEnergy();
58 G4double originVertexTotalEnergy = aStep->GetTrack()->GetVertexKineticEnergy();
60 G4double currentKineticEnergy = aStep->GetTrack()->GetKineticEnergy();
61 G4double currentTotalEnergy = aStep->GetTrack()->GetTotalEnergy();
63 G4double depositedEnergy = aStep->GetTotalEnergyDeposit();
67 aHit -> StoreTrackID(trackID);
69 aHit -> StoreParticleName(particleName);
70 aHit -> StoreParticleType(pdgEncoding);
72 aHit -> StoreGlobalTime(globalTime);
78 aHit -> StoreWorldPosition(worldPos);
79 aHit -> StoreLocalPosition(localPos);
81 aHit -> StoreOriginVertexPosition(originVertexPosition);
83 aHit -> StoreWorldMomentum(worldMomentum);
84 aHit -> StoreLocalMomentum(localMomentum);
85 aHit -> StoreMomentumDirection(currentMomentumDirection);
86 aHit -> StoreOriginVertexMomentumDirection(originVertexMomentumDirection);
91 aHit -> StoreOriginVertexKineticEnergy(originVertexKineticEnergy);
92 aHit -> StoreOriginVertexTotalEnergy(originVertexTotalEnergy);
94 aHit -> StoreKineticEnergy(currentKineticEnergy);
95 aHit -> StoreTotalEnergy(currentTotalEnergy);
97 aHit -> StoreHitDepositedEnergy(depositedEnergy);
99 if ( !(aHit -> GetLogVolume()) )
103 aHit -> StoreLogVolume(theTouchable->GetVolume()->GetLogicalVolume());
104 G4AffineTransform aTrans = theTouchable->GetHistory()->GetTopTransform();
106 aHit -> StoreCellRotation(aTrans.NetRotation());
107 aHit -> StoreCellPosition(aTrans.NetTranslation());
~QweakSimLumi_DetectorSD()
QweakSimLumi_DetectorHitsCollection * Lumi_DetectorHitsCollection
G4THitsCollection< QweakSimLumi_DetectorHit > QweakSimLumi_DetectorHitsCollection
QweakSimLumi_DetectorSD(G4String name)
G4bool ProcessHits(G4Step *aStep, G4TouchableHistory *ROhist)
void Initialize(G4HCofThisEvent *HCE)
void EndOfEvent(G4HCofThisEvent *HCE)