110{
112 G4cout << "LETAccumulable::Accumulate()" << G4endl;
113 }
114
115
116 if (hit->GetDeltaE() == 0. || hit->GetTrackLength() == 0.) return;
117
118
119 G4int Z = hit->GetPartType()->GetAtomicNumber();
120 if (Z < 1) return;
121
122 G4int PDGencoding = hit->GetPartType()->GetPDGEncoding();
123
124 if (PDGencoding == 22 || PDGencoding == 11) return;
125
126
127 PDGencoding -= PDGencoding % 10;
128
129
130 G4int xIndex = hit->GetXindex();
131 G4int yIndex = hit->GetYindex();
132 ;
133 G4int zIndex = hit->GetZindex();
134 ;
135
136 G4int voxel =
138
139
140 G4double ekinMean = hit->GetEkinMean();
141
142
144
145
146 G4Material* mat = hit->GetPhysicalVolume()->GetLogicalVolume()->GetMaterial();
147
148
150
151 G4double Lsn = emCal.ComputeElectronicDEDX(ekinMean, particleDef, mat);
152
153
154
155
156 G4double DE = hit->GetDeltaE();
157
158
159 G4double DEElectrons = hit->GetElectronEnergy();
160
161
162 G4double DX = hit->GetTrackLength();
163
164
165 G4int trackID = hit->GetTrackID();
166
167
168
169 fTotalLETD[voxel] += (DE + DEElectrons) * Lsn;
170
172
174
176
177 size_t l;
179
183 break;
184 }
185
186
188
189 G4int A = particleDef->GetAtomicMass();
190
191
192 G4String fullName = particleDef->GetParticleName();
193 G4String name = fullName.substr(0, fullName.find(
"["));
194
195 IonLet ion(trackID, PDGencoding, fullName, name, Z, A,
198 }
199
200
201 fIonLetStore[l].Update(voxel, DE, DEElectrons, Lsn, DX);
202}
static VoxelizedSensitiveDetector * GetInstance()
Static method to retrieve a pointer to the only object existing in the simulation.
G4int GetThisVoxelNumber(G4int x, G4int j, G4int k) const
Method to get the absolute voxel index given its indexes in the three dimensions.