120{
121
122
123
124
125
126
127 G4ThreeVector showerCenter;
128 G4double distOut;
129 distOut = fastTrack.GetEnvelopeSolid()->
130 DistanceToOut(fastTrack.GetPrimaryTrackLocalPosition(),
131 fastTrack.GetPrimaryTrackLocalDirection());
132 showerCenter = fastTrack.GetPrimaryTrackLocalPosition() +
133 (distOut/2.)*fastTrack.GetPrimaryTrackLocalDirection();
134
135 showerCenter = fastTrack.GetInverseAffineTransformation()->
136 TransformPoint(showerCenter);
137
138
139 G4ThreeVector xShower, yShower, zShower;
140 zShower = fastTrack.GetPrimaryTrack()->GetMomentumDirection();
141 xShower = zShower.orthogonal();
142 yShower = zShower.cross(xShower);
143
144
145 G4double Energy = fastTrack.GetPrimaryTrack()->GetKineticEnergy();
146 G4int nSpot = 50;
147 G4double deposit = Energy/double(nSpot);
150 G4ThreeVector ePoint;
151
152
154
155 G4double z, r, phi;
156 for (int i = 0; i < nSpot; i++)
157 {
158 z = G4RandGauss::shoot(0,20*cm);
159 r = G4RandGauss::shoot(0,10*cm);
160 phi = G4UniformRand()*twopi;
161 ePoint = showerCenter +
162 z*zShower +
163 r*std::cos(phi)*xShower + r*std::sin(phi)*yShower;
166 }
167}
void SetEnergy(const G4double &E)
void SetPosition(const G4ThreeVector &point)
std::vector< Par01EnergySpot > feSpotList