|
|
|||
File indexing completed on 2026-04-29 07:39:53
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 /// \file Par03DetectorConstruction.hh 0027 /// \brief Definition of the Par03DetectorConstruction class 0028 0029 #ifndef PAR03DETECTORCONSTRUCTION_H 0030 #define PAR03DETECTORCONSTRUCTION_H 0031 0032 #include "G4Material.hh" 0033 #include "G4SystemOfUnits.hh" 0034 #include "G4VUserDetectorConstruction.hh" 0035 0036 class Par03DetectorMessenger; 0037 class G4LogicalVolume; 0038 0039 /** 0040 * @brief Detector construction. 0041 * 0042 * Creates a cylindrical detector, with cylinder axis along Z-axis. It is placed 0043 * in the world volume so that its bases are located at z=0 and z=Length. 0044 * Dimensions of the detector (Radius and Length) and material can be set using 0045 * the UI commands. 0046 * Readout geometry of the detector is created, and can be set by UI commands. 0047 * Cells are created along z-axis, azimuthal angle, and radius (cylindrical 0048 * segmentation). 0049 * Sensitive detector Par03SensitiveDetector is attached to the 0050 * cell volume. 0051 * Region for the detector is created as an envelope of the fast simulation. 0052 * 0053 */ 0054 0055 class Par03DetectorConstruction : public G4VUserDetectorConstruction 0056 { 0057 public: 0058 Par03DetectorConstruction(); 0059 virtual ~Par03DetectorConstruction(); 0060 0061 virtual G4VPhysicalVolume* Construct() final; 0062 virtual void ConstructSDandField() final; 0063 0064 // Set radius of the cylindrical detector 0065 void SetRadius(G4double aRadius); 0066 // Get radius of the cylindrical detector 0067 inline G4double GetRadius() const { return fDetectorRadius; }; 0068 // Set length of the cylindrical detector (along z-axis) 0069 void SetLength(G4double aLength); 0070 // Get length of the cylindrical detector (along z-axis) 0071 inline G4double GetLength() const { return fDetectorLength; }; 0072 // Set material of the detector (from NIST materials) 0073 void SetMaterial(const G4String& aMaterial); 0074 // Get name of the material of the detector 0075 inline G4String GetMaterial() const { return fDetectorMaterial->GetName(); }; 0076 0077 // Set number of readout cells along z-axis 0078 inline void SetNbOfLayers(G4int aNumber) { fNbOfLayers = aNumber; }; 0079 // Get number of readout cells along z-axis 0080 inline G4int GetNbOfLayers() const { return fNbOfLayers; }; 0081 // Set number of readout cells along radius of cylinder 0082 inline void SetNbOfRhoCells(G4int aNumber) { fNbOfRhoCells = aNumber; }; 0083 // Get number of readout cells along radius of cylinder 0084 inline G4int GetNbOfRhoCells() const { return fNbOfRhoCells; }; 0085 // Set number of readout cells in azimuthal angle 0086 inline void SetNbOfPhiCells(G4int aNumber) { fNbOfPhiCells = aNumber; }; 0087 // Get number of readout cells in azimuthal angle 0088 inline G4int GetNbOfPhiCells() const { return fNbOfPhiCells; }; 0089 0090 // Print detector information 0091 void Print() const; 0092 0093 private: 0094 /// Messenger that allows to modify geometry 0095 Par03DetectorMessenger* fDetectorMessenger; 0096 /// Logical volume of replicated cell 0097 G4LogicalVolume* fLogicCell = nullptr; 0098 /// World size (in each X, Y, Z dimension) 0099 G4double fWorldSize = 10 * m; 0100 /// Radius of the cylindrical detector 0101 G4double fDetectorRadius = 10 * cm; 0102 /// Length of the cylindrical detector (along z axis) 0103 G4double fDetectorLength = 30 * cm; 0104 /// Material of the detector 0105 G4Material* fDetectorMaterial = nullptr; 0106 /// Number of layers = slices along z axis 0107 G4int fNbOfLayers = 10; 0108 /// Number of cells along radius 0109 G4int fNbOfRhoCells = 10; 0110 /// Number of cells in azimuthal angle 0111 G4int fNbOfPhiCells = 10; 0112 }; 0113 0114 #endif /* PAR03DETECTORCONSTRUCTION_H */
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|