00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef MaGeGeneratorPositionSampling_h
00024 #define MaGeGeneratorPositionSampling_h 1
00025
00026 #include "globals.hh"
00027 #include "G4ThreeVector.hh"
00028 #include "G4VSolid.hh"
00029 #include "G4VPhysicalVolume.hh"
00030 #include "G4RotationMatrix.hh"
00031 #include "G4Point3D.hh"
00032 #include <vector>
00033 #include "G4Navigator.hh"
00034 #include "G4TouchableHistory.hh"
00035
00036
00037
00038
00039 class MJGeneratorUtil;
00040 class G4Navigator;
00041 class G4VPhysicalVolume;
00042 class MaGeGeneratorPositionSampling
00043 {
00044 public:
00045 MaGeGeneratorPositionSampling();
00046 ~MaGeGeneratorPositionSampling();
00047
00048 G4ThreeVector SampleUniformlyInVolume(G4String volName,G4int copynumber);
00049 G4ThreeVector SampleOnSurface(G4String volName,G4int copynumber);
00050
00051 void SetGlobalTranslation(G4ThreeVector vect) {globalTranslation = vect;};
00052 void SetGlobalRotation(G4RotationMatrix mat) {globalRotation = mat;};
00053 G4ThreeVector GetGlobalTranslation() {return globalTranslation;};
00054 G4RotationMatrix GetGlobalRotation() {return globalRotation;};
00055
00056 private:
00057 G4String volumeName;
00058 MJGeneratorUtil* generatorUtil;
00059 G4bool InitializeSamplingVolume();
00060 G4int copyNumber;
00061
00062 G4Navigator* myNavigator;
00063 G4VPhysicalVolume* myVolume;
00064
00065 G4RotationMatrix globalRotation;
00066 G4ThreeVector globalTranslation;
00067
00068 G4double radius;
00069
00070 G4GeometryType fSolid_type;
00071 G4double fSolid_par_arr[6];
00072
00073 G4VPhysicalVolume* FindTheDirectMother(G4VPhysicalVolume*);
00074
00075 };
00076 #endif