43 G4double edep = aStep->GetTotalEnergyDeposit();
49 if(aStep->GetTrack()->GetDefinition()!=G4Geantino::GeantinoDefinition() && aStep->GetTrack()->GetDefinition()!=G4ChargedGeantino::ChargedGeantinoDefinition())
return false;
53 const G4TouchableHistory *myTouch =
dynamic_cast<const G4TouchableHistory*
>(aStep->GetPreStepPoint()->GetTouchable());
55 G4cout <<
"BLMSensorSD::ProcessHits bad dynamic_cast" << G4endl;
58 int BEcopyNo = myTouch->GetVolume()->GetCopyNo();
61 G4ThreeVector coord1 = aStep->GetPreStepPoint()->GetPosition();
62 G4ThreeVector coord2 = aStep->GetPostStepPoint()->GetPosition();
67 const G4AffineTransform transformation = myTouch->GetHistory()->GetTopTransform();
68 G4ThreeVector localPosition1 = transformation.TransformPoint(coord1);
69 G4ThreeVector localPosition2 = transformation.TransformPoint(coord2);
71 HepGeom::Point3D<double> lP1,lP2;
86 if(trHelp.IsPrimary())
88 else if(trHelp.IsRegeneratedPrimary())
90 else if(trHelp.IsSecondary())
92 else if(trHelp.IsRegisteredSecondary())
95 int produced_in_diamond = 0;
96 if(aStep->GetTrack()->GetLogicalVolumeAtVertex()->GetName() ==
"Pixel::blmDiamondLog")
97 produced_in_diamond = 1;
98 else if(aStep->GetTrack()->GetLogicalVolumeAtVertex()->GetName() ==
"Pixel::blmModLog")
99 produced_in_diamond = 2;
100 else if(aStep->GetTrack()->GetLogicalVolumeAtVertex()->GetName() ==
"Pixel::blmWallLog")
101 produced_in_diamond = 3;
103 m_HitColl->Emplace(lP1, lP2, edep, aStep->GetPreStepPoint()->GetGlobalTime(), trHelp.GenerateParticleLink(),
104 0, 0, myTouch->GetVolume(1)->GetCopyNo()-222, 0, primaren, produced_in_diamond);