Geant4 Cross Reference |
1 // 2 // ******************************************************************** 3 // * License and Disclaimer * 4 // * * 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. * 10 // * * 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitation of liability. * 17 // * * 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************************************** 25 // 26 // 27 /// \file FlashDetectorConstruction.hh 28 29 #ifndef FlashDetectorConstruction_h 30 #define FlashDetectorConstruction_h 1 31 32 #include "G4VUserDetectorConstruction.hh" 33 #include "globals.hh" 34 35 #include "G4Material.hh" 36 #include "tls.hh" 37 #include "G4ThreeVector.hh" 38 #include "G4UserLimits.hh" 39 40 class G4VPhysicalVolume; 41 class G4LogicalVolume; 42 class FlashApplicator; 43 class G4VSensitiveDetector; 44 class G4NistManager; 45 class G4Tubs; 46 class G4Box; 47 class G4Element; 48 class G4VisAttributes; 49 50 51 class FlashDetectorMessenger; 52 53 54 class FlashDetectorConstruction : public G4VUserDetectorConstruction { 55 public: 56 G4VPhysicalVolume *physicalTreatmentRoom; 57 G4LogicalVolume *logicTreatmentRoom; 58 G4VPhysicalVolume *ConstructPhantom(G4double CollPos); 59 // G4VPhysicalVolume *ConstructDetector(); 60 void ConstructDetector(); 61 62 FlashDetectorConstruction(); 63 virtual ~FlashDetectorConstruction(); 64 65 virtual G4VPhysicalVolume *Construct(); 66 virtual void ConstructSDandField(); 67 68 G4bool SetPhantomMaterial(G4String material); 69 G4bool SetDetectorMaterial(G4String material); 70 void SetAirGap(G4double position); 71 void SetPhantomSize(G4double sizeX, G4double sizeY, G4double sizeZ); 72 73 void SetDetectorThickness(G4double thickness); 74 void SetDetector_subThickness(G4double thickness_sub); 75 void SetDetectorWidth(G4double width); 76 void SetDetectorPosition(G4double position); 77 void ActivateDetArray(G4bool); 78 79 G4VisAttributes *skyBlue; 80 G4VisAttributes *red; 81 G4VisAttributes *blue; 82 G4VisAttributes *green; 83 84 85 private: 86 87 FlashDetectorMessenger* fDetectorMessenger; 88 89 G4Material *airNist; 90 G4Material *fPhantomMaterial; 91 FlashApplicator *Collimator; 92 93 G4double fAirGap; 94 G4double fPhantomSizeX, fPhantomSizeY, fPhantomSizeZ, fPhantom_coordinateX,fPosition_coefficient; 95 G4ThreeVector fPhantomPosition; 96 G4double fDet_thickness,fDet_width,fDet_sub_thickness,fDetectorPosition; 97 G4int nDet; 98 G4double fDet_ctc; 99 G4Element *Si; 100 G4Element *C; 101 G4Material *SiC; 102 G4Material *fDetectorMaterial; 103 104 G4Box *fPhantom; 105 106 107 G4Box *fDet_box; 108 G4LogicalVolume *fDetLogicalVolume; 109 // G4VPhysicalVolume *fDet_phys; 110 std::vector<G4VPhysicalVolume *> fDet_phys; 111 std::vector<G4VPhysicalVolume *> fDet_sub_phys; 112 113 G4Box *fDet_sub; 114 G4LogicalVolume *fDet_sub_LogicalVolume; 115 //G4VPhysicalVolume *fDet_sub_phys; 116 117 118 void DefineMaterials(); 119 120 121 G4LogicalVolume *fPhantomLogicalVolume; 122 G4VPhysicalVolume *fPhant_phys; 123 G4VPhysicalVolume *fPhantom_physical; 124 125 G4UserLimits *fStepLimit; 126 G4bool fCheckOverlaps, fActivateDet; 127 128 G4NistManager *nist; 129 130 131 132 133 }; 134 135 #endif 136