/scratch0/jsnuveri/BDSIM/BDSIMgit/bdsim/include/BDSScreenLayer.hh

00001 #ifndef BDSScreenLayer_h
00002 #define BDSScreenLayer_h 
00003 
00004 #include "globals.hh"
00005 #include "G4LogicalVolume.hh"
00006 
00007 #include "G4VisAttributes.hh"
00008 #include "G4VSolid.hh"
00009 #include "G4Color.hh"
00010 #include "G4PVPlacement.hh"
00011 
00012 class BDSScreenLayer 
00013 {
00014 public:
00015   BDSScreenLayer(G4ThreeVector size, G4String name, G4String material, G4double grooveWidth, G4double grooveSpatialFrequency);
00016   ~BDSScreenLayer();
00017   inline G4LogicalVolume* log(){return _log;}
00018   inline G4String name(){return _name;}
00019   inline G4ThreeVector size(){return _size;}
00020   void phys(G4PVPlacement* phys);
00021   inline G4PVPlacement* phys(){return _phys;}
00022   void color(G4Color col);
00023   void backInternalMirror();
00024   void frontInternalMirror();
00025   void sampler(); //make this plane a sampling plane
00026 
00027 protected:
00028   BDSScreenLayer();
00029   G4ThreeVector _size;
00030   G4String _name;
00031   G4LogicalVolume* _log;
00032   G4PVPlacement* _phys;
00033   G4VSolid* _solid;
00034 
00035 private:
00036   class InternalMirror{
00037   public:
00038     InternalMirror(G4int varside, G4ThreeVector size, G4String material, G4LogicalVolume* motherLog, G4PVPlacement* motherPhys);
00039     ~InternalMirror();
00040     void geom();
00041     void compute();
00042     void place();
00043     void optical();
00044     enum sides{_BACK, _FRONT};
00045 
00046   private:
00047     InternalMirror();
00048     G4int _side;
00049     G4VSolid* _solid;
00050     G4LogicalVolume* _log;
00051     G4PVPlacement* _phys;
00052     G4ThreeVector _motherSize;
00053     G4String _motherMaterial;
00054     G4LogicalVolume* _motherLog;
00055     G4PVPlacement* _motherPhys;
00056     G4double _thickness;
00057     G4double _pos;
00058   };
00059   InternalMirror* _internalMirror;
00060   virtual void build();
00061   void buildGroove();
00062   virtual void buildScreen();
00063   void visAtt();
00064   void cutGroove(G4double xPos);
00065   void cutGrooves();
00066   G4String _material;
00067   G4String _logName;
00068   G4String _solidName;
00069   // Geometrical objects:
00070   G4LogicalVolume* _grooveLog;
00071   G4VSolid* _grooveSolid;
00072   G4double _grooveWidth;
00073   G4double _grooveSpatialFrequency;
00074   G4int _nGrooves;
00075   G4Color _color;
00076 
00077 };
00078 
00079 #endif

Generated on 28 Jun 2015 for BDSIM by  doxygen 1.4.7