Ignore:
Timestamp:
Jul 15, 2013, 2:08:33 PM (11 years ago)
Author:
moretto
Message:

changes from biktem r:3032

File:
1 edited

Legend:

Unmodified
Added
Removed
  • esaf_lal/branches/camille/packages/simulation/detector/G4Detector/optics/src/OptPrimaryGeneratorAction.cc

    r16 r184  
    7979    else if(!FillPosition.compare ("Point"))
    8080        OnePoint(anEvent);
     81    else if(!FillPosition.compare ("Sphere"))
     82        FillSphere(anEvent);
    8183
    8284}
     
    142144
    143145
     146//-----------------------------------------------------------------------------------------
     147void 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}
    144156
Note: See TracChangeset for help on using the changeset viewer.