00001 /* BDSIM code. 00002 A scintillator screen. 00003 Work in progress. 00004 */ 00005 00006 #ifndef BDSScintillatorScreen_h 00007 #define BDSScintillatorScreen_h 00008 00009 #include "globals.hh" 00010 #include "BDSAcceleratorComponent.hh" 00011 #include "G4LogicalVolume.hh" 00012 #include "G4Mag_UsualEqRhs.hh" 00013 00014 #include "G4UserLimits.hh" 00015 #include "G4VisAttributes.hh" 00016 #include "G4VSolid.hh" 00017 00018 class BDSScintillatorScreen :public BDSAcceleratorComponent 00019 { 00020 public: 00021 BDSScintillatorScreen(G4String aName, 00022 G4double tScint = 0.3*CLHEP::mm, 00023 G4double angle = 0, 00024 G4String scintMaterial = "lanex", 00025 G4String airMaterial = "air", 00026 BDSTiltOffset tiltOffset = BDSTiltOffset()); 00027 ~BDSScintillatorScreen(); 00028 00029 protected: 00030 00031 private: 00032 virtual void Build(); 00033 void BuildScintillatorScreen(); 00034 void SetVisAttributes(); 00035 void ComputeDimensions(); 00036 virtual void BuildContainerLogicalVolume(); 00037 void BuildCameraScoringPlane(); 00038 void BuildScreenScoringPlane(); 00039 void BuildScintillatorMaterial(); 00040 void BuildScintillatorCompound(); 00041 void BuildScintillatorOpticalProperties(); 00042 void BuildFrontLayer(); 00043 void BuildScintillatorLayer(); 00044 void BuildBaseLayer(); 00045 void BuildBackLayer(); 00046 void BuildOpticalSurfaces(); 00047 00048 00049 // Geometrical objects: 00050 G4VPhysicalVolume* itsFrontLayerPhys; 00051 G4VPhysicalVolume* itsScintillatorLayerPhys; 00052 G4VPhysicalVolume* itsBaseLayerPhys; 00053 G4VPhysicalVolume* itsBackLayerPhys; 00054 //G4VPhysicalVolume* itsCameraScoringPlanePhys; 00055 //G4VPhysicalVolume* itsScreenScoringPlanePhys; 00056 00057 G4LogicalVolume* itsFrontLayerLog; 00058 G4LogicalVolume* itsScintillatorLayerLog; 00059 G4LogicalVolume* itsBaseLayerLog; 00060 G4LogicalVolume* itsBackLayerLog; 00061 G4LogicalVolume* itsCameraScoringPlaneLog; 00062 G4LogicalVolume* itsScreenScoringPlaneLog; 00063 00064 G4VSolid* itsFrontLayerSolid; 00065 G4VSolid* itsScintillatorLayerSolid; 00066 G4VSolid* itsBaseLayerSolid; 00067 G4VSolid* itsBackLayerSolid; 00068 G4VSolid* itsCameraScoringPlaneSolid; 00069 G4VSolid* itsScreenScoringPlaneSolid; 00070 00071 private: 00072 // G4Material* _frontLayerMaterial; 00073 G4Material* _scintillatorLayerMaterial; 00074 //G4Material* _baseLayerMaterial; 00075 //G4Material* _backLayerMaterial; 00076 G4Material* _airMaterial; 00077 //G4double itsOuterR; 00078 00079 G4double _screenWidth; 00080 G4double _screenHeight; 00081 G4double _screenAngle; 00082 00083 G4RotationMatrix* _screenRotationMatrix; 00084 00085 G4double _frontThickness; 00086 G4double _scintillatorThickness; 00087 G4double _baseThickness; 00088 G4double _backThickness; 00089 G4double _totalThickness; 00090 G4double _screenThickness; 00091 00092 //scoring plane 00093 G4double _scoringPlaneThickness; 00094 00095 G4double _xLength; 00096 G4double _yLength; 00097 00098 G4VisAttributes* _visAttFront; 00099 G4VisAttributes* _visAttScint; 00100 G4VisAttributes* _visAttBase; 00101 G4VisAttributes* _visAttSampler; 00102 00103 G4String _scoringPlaneName; 00104 G4String _screenScoringPlaneName; 00105 G4String _screenSamplerName; 00106 G4String _samplerName; 00107 }; 00108 00109 #endif