Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
IORTDetectorConstruction.hh
이 파일의 문서화 페이지로 가기
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 // This is the *BASIC* version of IORT, a Geant4-based application
27 // Main Authors: G.Russo(a,b), C.Casarino*(c), G.C. Candiano(c), G.A.P. Cirrone(d), F.Romano(d)
28 // Contributor Authors: S.Guatelli(e)
29 // Past Authors: G.Arnetta(c), S.E.Mazzaglia(d)
30 //
31 // (a) Fondazione Istituto San Raffaele G.Giglio, Cefalù, Italy
32 // (b) IBFM-CNR , Segrate (Milano), Italy
33 // (c) LATO (Laboratorio di Tecnologie Oncologiche), Cefalù, Italy
34 // (d) Laboratori Nazionali del Sud of the INFN, Catania, Italy
35 // (e) University of Wallongong, Australia
36 //
37 // *Corresponding author, email to carlo.casarino@polooncologicocefalu.it
39 
40 
41 #ifndef IORTDetectorConstruction_H
42 #define IORTDetectorConstruction_H 1
43 
44 #include "G4Box.hh"
45 #include "globals.hh"
46 #include "G4VisAttributes.hh"
47 #include "G4LogicalVolume.hh"
48 #include "G4UnitsTable.hh"
49 #include "G4Tubs.hh"
50 
51 class G4VPhysicalVolume;
52 class G4LogicalVolume;
55 class IORTDetectorSD;
56 class IORTMatrix;
57 
59 {
60 public:
61 
63 
65 
66  // G4VPhysicalVolume *detectorPhysicalVolume; aggiunto
67 
68 private:
69 
70  void ConstructPhantom();
71  void ConstructDetector();
72  // void ConstructDisc();
73  void ConstructSensitiveDetector(G4ThreeVector positionToWORLD);
74  void ParametersCheck();
75 
76 public:
77 // Get detector position relative to WORLD
79  {
81  }
83 // Get displacement between phantom and detector by detector position (center of), phantom (center of) and detector sizes
85 {
89  );
90 }
91 
93 // Calculate (and set) detector position by displacement, phantom and detector sizes
94 inline void SetDetectorPosition()
95  {
96  // Adjust detector position
100 
101  //G4cout << "*************** DetectorToPhantomPosition " << detectorToPhantomPosition/cm << "\n";
102  //G4cout << "*************** DetectorPosition " << detectorPosition/cm << "\n";
103  }
105 // Check whether detector is inside phantom
106 inline bool IsInside(G4double detectorX,
107  G4double detectorY,
108  G4double detectorZ,
109  G4double phantomX,
110  G4double phantomY,
111  G4double phantomZ,
112  G4ThreeVector detToPhantomPosition)
113 {
114 // Dimensions check... X Y and Z
115 // Firstly check what dimension we are modifying
116  {
117  if (detectorX > phantomX)
118  {
119  G4cout << "Error: Detector X dimension must be smaller or equal to the corrispondent of the phantom" << G4endl;
120  return false;
121  }
122  if ( (phantomX - detectorX) < detToPhantomPosition.getX())
123  {
124  G4cout << "Error: X dimension doesn't fit with detector to phantom relative position" << G4endl;
125  return false;
126  }
127  }
128 
129  {
130  if (detectorY > phantomY)
131  {
132  G4cout << "Error: Detector Y dimension must be smaller or equal to the corrispondent of the phantom" << G4endl;
133  return false;
134  }
135  if ( (phantomY - detectorY) < detToPhantomPosition.getY())
136  {
137  G4cout << "Error: Y dimension doesn't fit with detector to phantom relative position" << G4endl;
138  return false;
139  }
140  }
141 
142  {
143  if (detectorZ > phantomZ)
144  {
145  G4cout << "Error: Detector Z dimension must be smaller or equal to the corrispondent of the phantom" << G4endl;
146  return false;
147  }
148  if ( (phantomZ - detectorZ) < detToPhantomPosition.getZ())
149  {
150  G4cout << "Error: Z dimension doesn't fit with detector to phantom relative position" << G4endl;
151  return false;
152  }
153  }
154 
155  return true;
156 }
158 
160  void SetVoxelSize(G4double sizeX, G4double sizeY, G4double sizeZ);
161  void SetDetectorSize(G4double sizeX, G4double sizeY, G4double sizeZ);
162  void SetPhantomSize(G4double sizeX, G4double sizeY, G4double sizeZ);
164  void SetDetectorToPhantomPosition(G4ThreeVector DetectorToPhantomPosition);
165  void UpdateGeometry();
166  void DeleteDisc();
167  void ConstructDisc();
168  void PrintParameters();
170 
172  void SetOuterRadiusDiscoIORT(G4double outerr);
173  void SetinnerRadiusDiscoIORT(G4double innerr);
174  void SetheightDiscoIORT(G4double height);
175  void SetDiscoXPositionIORT(G4double xpos);
176  void SetDiscoYPositionIORT(G4double ypos);
177  void SetDiscoZPositionIORT(G4double zpos);
178 
180  void SetOuterRadiusDiscoIORT1(G4double outerr);
181  void SetinnerRadiusDiscoIORT1(G4double innerr);
182  void SetheightDiscoIORT1(G4double height);
183  void SetDiscoXPositionIORT1(G4double xpos);
184 
185  void SetAngleDiscoIORT0(G4double phi0);
186 
187 private:
188 
190 
192 
194 
195  IORTDetectorSD* detectorSD; // Pointer to sensitive detector
196  IORTDetectorROGeometry* detectorROGeometry; // Pointer to ROGeometry
198 
202 
206 
210 
211  G4ThreeVector phantomPosition, detectorPosition, detectorToPhantomPosition; // phantom center, detector center, detector to phantom relative position
212 
216 
220 
222 
225 
226 
227 
228  //Disco0 IORT
233 
234  // Disco1 IORT
248 
249 
250  // Disco2 IORT
251 
260 };
261 #endif
262 
263 
264 
void ConstructSensitiveDetector(G4ThreeVector positionToWORLD)
void SetDiscoXPositionIORT(G4double xpos)
CLHEP::Hep3Vector G4ThreeVector
void SetheightDiscoIORT1(G4double height)
bool IsInside(G4double detectorX, G4double detectorY, G4double detectorZ, G4double phantomX, G4double phantomY, G4double phantomZ, G4ThreeVector detToPhantomPosition)
void SetDetectorToPhantomPosition(G4ThreeVector DetectorToPhantomPosition)
Definition: G4Tubs.hh:85
double getZ() const
void SetPhantomSize(G4double sizeX, G4double sizeY, G4double sizeZ)
#define G4endl
Definition: G4ios.hh:61
IORTDetectorConstruction(G4VPhysicalVolume *)
IORTDetectorMessenger * detectorMessenger
void setX(double)
G4LogicalVolume * GetDetectorLogicalVolume()
void SetOuterRadiusDiscoIORT1(G4double outerr)
G4bool SetPhantomMaterial(G4String material)
G4VPhysicalVolume * detectorPhysicalVolume
G4bool SetDiscoMaterialIORT1(G4String material)
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
void SetVoxelSize(G4double sizeX, G4double sizeY, G4double sizeZ)
IORTDetectorROGeometry * detectorROGeometry
void SetPhantomPosition(G4ThreeVector)
void setZ(double)
G4ThreeVector GetDetectorToPhantomPosition()
Definition: G4Box.hh:64
void SetinnerRadiusDiscoIORT(G4double innerr)
double getX() const
void SetheightDiscoIORT(G4double height)
double getY() const
void SetDetectorSize(G4double sizeX, G4double sizeY, G4double sizeZ)
void SetinnerRadiusDiscoIORT1(G4double innerr)
G4VPhysicalVolume * phantomPhysicalVolume
void SetAngleDiscoIORT0(G4double phi0)
int G4int
Definition: G4Types.hh:78
void SetDiscoXPositionIORT1(G4double xpos)
void SetOuterRadiusDiscoIORT(G4double outerr)
G4GLOB_DLL std::ostream G4cout
G4bool SetDiscoMaterialIORT(G4String material)
void SetDiscoYPositionIORT(G4double ypos)
void SetDiscoZPositionIORT(G4double zpos)
void setY(double)