50 G4double edep = aStep->GetTotalEnergyDeposit();
56 if(aStep->GetTrack()->GetDefinition()!=G4Geantino::GeantinoDefinition() && aStep->GetTrack()->GetDefinition()!=G4ChargedGeantino::ChargedGeantinoDefinition())
return false;
60 const G4TouchableHistory *myTouch =
dynamic_cast<const G4TouchableHistory*
>(aStep->GetPreStepPoint()->GetTouchable());
62 G4cout <<
"BLMSensorSD::ProcessHits bad dynamic_cast" << G4endl;
65 int BEcopyNo = myTouch->GetVolume()->GetCopyNo();
68 G4ThreeVector coord1 = aStep->GetPreStepPoint()->GetPosition();
69 G4ThreeVector coord2 = aStep->GetPostStepPoint()->GetPosition();
74 const G4AffineTransform transformation = myTouch->GetHistory()->GetTopTransform();
75 G4ThreeVector localPosition1 = transformation.TransformPoint(coord1);
76 G4ThreeVector localPosition2 = transformation.TransformPoint(coord2);
78 HepGeom::Point3D<double> lP1,lP2;
102 int produced_in_diamond = 0;
103 if(aStep->GetTrack()->GetLogicalVolumeAtVertex()->GetName() ==
"Pixel::blmDiamondLog")
104 produced_in_diamond = 1;
105 else if(aStep->GetTrack()->GetLogicalVolumeAtVertex()->GetName() ==
"Pixel::blmModLog")
106 produced_in_diamond = 2;
107 else if(aStep->GetTrack()->GetLogicalVolumeAtVertex()->GetName() ==
"Pixel::blmWallLog")
108 produced_in_diamond = 3;
110 m_HitColl->Emplace(lP1, lP2, edep, aStep->GetPreStepPoint()->GetGlobalTime(),
112 0, 0, myTouch->GetVolume(1)->GetCopyNo()-222, 0, primaren, produced_in_diamond);