52 G4double edep = aStep->GetTotalEnergyDeposit();
58 if(aStep->GetTrack()->GetDefinition()!=G4Geantino::GeantinoDefinition() && aStep->GetTrack()->GetDefinition()!=G4ChargedGeantino::ChargedGeantinoDefinition())
return false;
62 const G4TouchableHistory *myTouch =
dynamic_cast<const G4TouchableHistory*
>(aStep->GetPreStepPoint()->GetTouchable());
64 G4cout <<
"BCMSensorSD::ProcessHits bad dynamic_cast" << G4endl;
68 int BEcopyNo = myTouch->GetVolume()->GetCopyNo();
71 G4ThreeVector coord1 = aStep->GetPreStepPoint()->GetPosition();
72 G4ThreeVector coord2 = aStep->GetPostStepPoint()->GetPosition();
77 const G4AffineTransform transformation = myTouch->GetHistory()->GetTopTransform();
78 G4ThreeVector localPosition1 = transformation.TransformPoint(coord1);
79 G4ThreeVector localPosition2 = transformation.TransformPoint(coord2);
81 HepGeom::Point3D<double> lP1,lP2;
91 if(BEcopyNo == 11950 || BEcopyNo == 11951)
105 int produced_in_diamond = 0;
106 if(aStep->GetTrack()->GetLogicalVolumeAtVertex()->GetName() ==
"Pixel::bcmDiamondLog")
107 produced_in_diamond = 1;
108 else if(aStep->GetTrack()->GetLogicalVolumeAtVertex()->GetName() ==
"Pixel::bcmModLog")
109 produced_in_diamond = 2;
110 else if(aStep->GetTrack()->GetLogicalVolumeAtVertex()->GetName() ==
"Pixel::bcmWallLog")
111 produced_in_diamond = 3;
113 m_HitColl->Emplace(lP1, lP2, edep, aStep->GetPreStepPoint()->GetGlobalTime(),
115 0, 0, myTouch->GetVolume(1)->GetCopyNo()-951, BEcopyNo - 11950, primaren, produced_in_diamond);