46 G4double edep = aStep->GetTotalEnergyDeposit();
52 if(aStep->GetTrack()->GetDefinition()!=G4Geantino::GeantinoDefinition() && aStep->GetTrack()->GetDefinition()!=G4ChargedGeantino::ChargedGeantinoDefinition())
return false;
56 const G4TouchableHistory *myTouch =
dynamic_cast<const G4TouchableHistory*
>(aStep->GetPreStepPoint()->GetTouchable());
58 G4cout <<
"BCMSensorSD::ProcessHits bad dynamic_cast" << G4endl;
62 int BEcopyNo = myTouch->GetVolume()->GetCopyNo();
65 G4ThreeVector coord1 = aStep->GetPreStepPoint()->GetPosition();
66 G4ThreeVector coord2 = aStep->GetPostStepPoint()->GetPosition();
71 const G4AffineTransform transformation = myTouch->GetHistory()->GetTopTransform();
72 G4ThreeVector localPosition1 = transformation.TransformPoint(coord1);
73 G4ThreeVector localPosition2 = transformation.TransformPoint(coord2);
75 HepGeom::Point3D<double> lP1,lP2;
85 if(BEcopyNo == 11950 || BEcopyNo == 11951)
90 if(trHelp.IsPrimary())
92 else if(trHelp.IsRegeneratedPrimary())
94 else if(trHelp.IsSecondary())
96 else if(trHelp.IsRegisteredSecondary())
99 int produced_in_diamond = 0;
100 if(aStep->GetTrack()->GetLogicalVolumeAtVertex()->GetName() ==
"Pixel::bcmDiamondLog")
101 produced_in_diamond = 1;
102 else if(aStep->GetTrack()->GetLogicalVolumeAtVertex()->GetName() ==
"Pixel::bcmModLog")
103 produced_in_diamond = 2;
104 else if(aStep->GetTrack()->GetLogicalVolumeAtVertex()->GetName() ==
"Pixel::bcmWallLog")
105 produced_in_diamond = 3;
107 m_HitColl->Emplace(lP1, lP2, edep, aStep->GetPreStepPoint()->GetGlobalTime(), trHelp.GenerateParticleLink(),
108 0, 0, myTouch->GetVolume(1)->GetCopyNo()-951, BEcopyNo - 11950, primaren, produced_in_diamond);