00001
00002
00003
00004 #include "BDSGlobalConstants.hh"
00005
00006 #include "BDSTransform3D.hh"
00007 #include "G4Box.hh"
00008 #include "G4Tubs.hh"
00009 #include "G4VisAttributes.hh"
00010 #include "G4LogicalVolume.hh"
00011 #include "G4VPhysicalVolume.hh"
00012 #include "G4UserLimits.hh"
00013 #include "G4TransportationManager.hh"
00014
00015 #include <map>
00016
00017
00018
00019 typedef std::map<G4String,int> LogVolCountMap;
00020 extern LogVolCountMap* LogVolCount;
00021
00022 typedef std::map<G4String,G4LogicalVolume*> LogVolMap;
00023 extern LogVolMap* LogVol;
00024
00025 extern BDSMaterials* theMaterials;
00026
00027
00028 BDSTransform3D::BDSTransform3D(G4String aName, G4double x,G4double y,G4double z,
00029 G4double phi,G4double theta, G4double psi):
00030 BDSAcceleratorComponent(
00031 aName,
00032 0,
00033 0,
00034 0,
00035 0,
00036 NULL,
00037 "",
00038 "",
00039 0,
00040 x,
00041 y,
00042 z),
00043 itsVisAttributes(NULL),itsPhysiComp(NULL)
00044 {
00045 SetTheta(theta);
00046 SetPsi(psi);
00047 SetPhi(phi);
00048 SetType("transform3d");
00049
00050 if (!(*LogVolCount)[itsName])
00051 {
00052
00053
00054 (*LogVolCount)[itsName]=1;
00055 (*LogVol)[itsName]=itsMarkerLogicalVolume;
00056 }
00057 else
00058 {
00059 (*LogVolCount)[itsName]++;
00060 itsMarkerLogicalVolume=(*LogVol)[itsName];
00061 }
00062
00063 }
00064
00065
00066 G4VisAttributes* BDSTransform3D::SetVisAttributes()
00067 {
00068 itsVisAttributes=new G4VisAttributes(G4Colour(0,1,0));
00069 return itsVisAttributes;
00070 }
00071
00072
00073 BDSTransform3D::~BDSTransform3D()
00074 {
00075 delete itsVisAttributes;
00076
00077 }