Changeset 184 in JEM-EUSO for esaf_lal/branches/camille/packages/simulation/detector/G4Detector/optics/src/OptPrimaryGeneratorAction.cc
- Timestamp:
- Jul 15, 2013, 2:08:33 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
esaf_lal/branches/camille/packages/simulation/detector/G4Detector/optics/src/OptPrimaryGeneratorAction.cc
r16 r184 79 79 else if(!FillPosition.compare ("Point")) 80 80 OnePoint(anEvent); 81 else if(!FillPosition.compare ("Sphere")) 82 FillSphere(anEvent); 81 83 82 84 } … … 142 144 143 145 146 //----------------------------------------------------------------------------------------- 147 void OptPrimaryGeneratorAction::FillSphere(G4Event* anEvent){ 148 TVector3 p; 149 double phi = gRandom->Uniform(0.,TwoPi()); 150 double th = gRandom->Uniform(Pi()-asin(1325./3143.57795946),Pi()); 151 p.SetMagThetaPhi(3143.57795946,th,phi); 152 p.SetZ(p.Z()+3143.57795946+78.); 153 particleGun->SetParticlePosition(G4ThreeVector(p.X(),p.Y(),p.Z())); 154 particleGun->GeneratePrimaryVertex(anEvent); 155 } 144 156
Note: See TracChangeset
for help on using the changeset viewer.