50{
51 if (verboseLevel>5) G4cout << "Process Hit" << G4endl;
52
53 G4double edep = aStep->GetTotalEnergyDeposit();
54 edep *= CLHEP::MeV;
55
56 if (edep==0.) {
57 if (aStep->GetTrack()->GetDefinition() != G4Geantino::GeantinoDefinition() &&
58 aStep->GetTrack()->GetDefinition() != G4ChargedGeantino::ChargedGeantinoDefinition())
59 return false;
60 }
61
62
63
64
65 const G4TouchableHistory* myTouch = dynamic_cast<const G4TouchableHistory*>(aStep->GetPreStepPoint()->GetTouchable());
66 if (not myTouch){
67 G4cout<<"HGTDSensorGmxSD::ProcessHits: dynamic cast failed"<<G4endl;
68 return false;
69 }
70 if(verboseLevel>5){
71 for (
int i=0;
i<myTouch->GetHistoryDepth();
i++){
72 std::string detname = myTouch->GetVolume(i)->GetLogicalVolume()->GetName();
73 int copyno = myTouch->GetVolume(i)->GetCopyNo();
74 G4cout << "Volume " << detname << " Copy Nr. " << copyno << G4endl;
75 }
76 }
77
78
79
80
81 G4ThreeVector startCoord = aStep->GetPreStepPoint()->GetPosition();
82 G4ThreeVector endCoord = aStep->GetPostStepPoint()->GetPosition();
83
84
85
86 const G4AffineTransform transformation = myTouch->GetHistory()->GetTopTransform();
87
88 G4ThreeVector localPosition1 = transformation.TransformPoint(startCoord);
89 G4ThreeVector localPosition2 = transformation.TransformPoint(endCoord);
90
91 HepGeom::Point3D<double> lP1,lP2;
92
96
100
101
102 TrackHelper trHelp(aStep->GetTrack());
103
105
106 std::string physVolName = myTouch->GetVolume()->GetName();
107
109
111 lP2,
112 edep,
113 aStep->GetPreStepPoint()->GetGlobalTime(),
114 trHelp.GenerateParticleLink(),
115 hitIdOfWafer);
116
117 return true;
118 }
119
120
121
122
123
124
125 const int id = myTouch->GetVolume()->GetCopyNo();
126
128 lP2,
129 edep,
130 aStep->GetPreStepPoint()->GetGlobalTime(),
131 trHelp.GenerateParticleLink(),
132 id);
133
134 return true;
135}
int buildHitIdFromStringHGTD(int part, const std::string &) const
static const SiHitIdHelper * GetHelper()