Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions
GammaRayTelTrackerROGeometry Class Reference

#include <GammaRayTelTrackerROGeometry.hh>

Inheritance diagram for GammaRayTelTrackerROGeometry:
G4VReadOutGeometry

Public Member Functions

 GammaRayTelTrackerROGeometry ()
 
 GammaRayTelTrackerROGeometry (G4String)
 
 ~GammaRayTelTrackerROGeometry ()
 
- Public Member Functions inherited from G4VReadOutGeometry
 G4VReadOutGeometry ()
 
 G4VReadOutGeometry (G4String)
 
virtual ~G4VReadOutGeometry ()
 
G4int operator== (const G4VReadOutGeometry &right) const
 
G4int operator!= (const G4VReadOutGeometry &right) const
 
void BuildROGeometry ()
 
virtual G4bool CheckROVolume (G4Step *, G4TouchableHistory *&)
 
const G4SensitiveVolumeListGetIncludeList () const
 
void SetIncludeList (G4SensitiveVolumeList *value)
 
const G4SensitiveVolumeListGetExcludeList () const
 
void SetExcludeList (G4SensitiveVolumeList *value)
 
G4String GetName () const
 
void SetName (G4String value)
 
G4VPhysicalVolumeGetROWorld () const
 

Protected Member Functions

G4VPhysicalVolumeBuild ()
 
- Protected Member Functions inherited from G4VReadOutGeometry
 G4VReadOutGeometry (const G4VReadOutGeometry &right)
 
const G4VReadOutGeometryoperator= (const G4VReadOutGeometry &right)
 
virtual G4bool FindROTouchable (G4Step *)
 

Additional Inherited Members

- Protected Attributes inherited from G4VReadOutGeometry
G4VPhysicalVolumeROworld
 
G4SensitiveVolumeListfincludeList
 
G4SensitiveVolumeListfexcludeList
 
G4String name
 
G4NavigatorROnavigator
 
G4TouchableHistorytouchableHistory
 

Detailed Description

Definition at line 45 of file GammaRayTelTrackerROGeometry.hh.

Constructor & Destructor Documentation

GammaRayTelTrackerROGeometry::GammaRayTelTrackerROGeometry ( )

Definition at line 55 of file GammaRayTelTrackerROGeometry.cc.

57 {
58 }
GammaRayTelTrackerROGeometry::GammaRayTelTrackerROGeometry ( G4String  aString)

Definition at line 59 of file GammaRayTelTrackerROGeometry.cc.

References G4RunManager::GetRunManager(), and G4RunManager::GetUserDetectorConstruction().

60  :G4VReadOutGeometry(aString)
61 {
63  GammaRayTelDetector =
65 }
const G4VUserDetectorConstruction * GetUserDetectorConstruction() const
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
GammaRayTelTrackerROGeometry::~GammaRayTelTrackerROGeometry ( )

Definition at line 67 of file GammaRayTelTrackerROGeometry.cc.

68 {
69 }

Member Function Documentation

G4VPhysicalVolume * GammaRayTelTrackerROGeometry::Build ( )
protectedvirtual

Implements G4VReadOutGeometry.

Definition at line 71 of file GammaRayTelTrackerROGeometry.cc.

References python.hepunit::cm3, g(), GammaRayTelDetectorConstruction::GetCALSizeZ(), GammaRayTelDetectorConstruction::GetCALTKRDistance(), GammaRayTelDetectorConstruction::GetNbOfTKRLayers(), GammaRayTelDetectorConstruction::GetNbOfTKRStrips(), GammaRayTelDetectorConstruction::GetNbOfTKRTiles(), GammaRayTelDetectorConstruction::GetPayloadSizeXY(), GammaRayTelDetectorConstruction::GetPayloadSizeZ(), GammaRayTelDetectorConstruction::GetSiliconGuardRing(), GammaRayTelDetectorConstruction::GetTilesSeparation(), GammaRayTelDetectorConstruction::GetTKRActiveTileXY(), GammaRayTelDetectorConstruction::GetTKRActiveTileZ(), GammaRayTelDetectorConstruction::GetTKRLayerDistance(), GammaRayTelDetectorConstruction::GetTKRSiliconPitch(), GammaRayTelDetectorConstruction::GetTKRSiliconThickness(), GammaRayTelDetectorConstruction::GetTKRSizeXY(), GammaRayTelDetectorConstruction::GetTKRSizeZ(), GammaRayTelDetectorConstruction::GetTKRViewsDistance(), GammaRayTelDetectorConstruction::GetWorldSizeXY(), GammaRayTelDetectorConstruction::GetWorldSizeZ(), python.hepunit::mole, G4LogicalVolume::SetSensitiveDetector(), test::x, and z.

72 {
73  // A dummy material is used to fill the volumes of the readout geometry.
74  // ( It will be allowed to set a NULL pointer in volumes of such virtual
75  // division in future, since this material is irrelevant for tracking.)
76  G4Material* dummyMat = new G4Material(name="dummyMat", 1., 1.*g/mole, 1.*g/cm3);
77 
78  //Builds the ReadOut World:
79 
80  G4double WorldSizeXY = GammaRayTelDetector->GetWorldSizeXY();
81  G4double WorldSizeZ = GammaRayTelDetector->GetWorldSizeZ();
82 
83  G4Box* ROWorldBox = new
84  G4Box("ROWorldBox",WorldSizeXY/2,WorldSizeXY/2,WorldSizeZ/2);
85 
86  G4LogicalVolume* ROWorldLog = new G4LogicalVolume(ROWorldBox, dummyMat,
87  "ROWorldLogical");
88  G4PVPlacement* ROWorldPhys =
89  new G4PVPlacement(0,G4ThreeVector(),"ROWorldPhysical",
90  ROWorldLog,0,false,0);
91 
92  // Payload RO volume:
93 
94  G4double PayloadSizeXY = GammaRayTelDetector->GetPayloadSizeXY();
95  G4double PayloadSizeZ = GammaRayTelDetector->GetPayloadSizeZ();
96 
97  G4VSolid* solidPayloadRO
98  = new G4Box("Payload RO",
99  PayloadSizeXY/2,
100  PayloadSizeXY/2,
101  PayloadSizeZ/2);
102 
103  G4LogicalVolume* logicPayloadRO = new
104  G4LogicalVolume(solidPayloadRO,dummyMat,"Payload RO",0,0,0);
105 
106  G4VPhysicalVolume* physiPayloadRO =
107  new G4PVPlacement(0, G4ThreeVector(),
108  "Payload RO", logicPayloadRO,ROWorldPhys,false, 0);
109 
110  // -------------------------------
111  // Tracker readout division:
112  // -------------------------------
113  // TRK Layers of Silicon MicroStrips
114 
115 
116  G4double TKRSizeXY = GammaRayTelDetector->GetTKRSizeXY();
117  G4double TKRSizeZ = GammaRayTelDetector->GetTKRSizeZ();
118  G4double CALSizeZ = GammaRayTelDetector->GetCALSizeZ();
119  G4double CALTKRDistance = GammaRayTelDetector->GetCALTKRDistance();
120 
121  G4VSolid* ROsolidTKR =
122  new G4Box("ReadOutTKR", TKRSizeXY/2,TKRSizeXY/2,TKRSizeZ/2);
123 
124  G4LogicalVolume* ROlogicTKR =
125  new G4LogicalVolume(ROsolidTKR,dummyMat, "ReadOutTKR",0,0,0);
126 
127 
128  G4VPhysicalVolume* ROphysiTKR =
129  new G4PVPlacement(0, G4ThreeVector(0,0,-PayloadSizeZ/2+CALSizeZ+
130  CALTKRDistance+TKRSizeZ/2),
131  "ReadOutTKR",ROlogicTKR,physiPayloadRO,
132  false, 0);
133 
134  // TKR Layers
135 
136 
137  G4double TKRSiliconThickness =
138  GammaRayTelDetector->GetTKRSiliconThickness();
139  G4int NbOfTKRLayers = GammaRayTelDetector->GetNbOfTKRLayers();
140  G4double TKRLayerDistance = GammaRayTelDetector->GetTKRLayerDistance();
141  G4double TKRViewsDistance = GammaRayTelDetector->GetTKRViewsDistance();
142 
143  G4VSolid* solidTKRDetectorYRO = new G4Box
144  ("TKRDetectorYRO",TKRSizeXY/2,TKRSizeXY/2,TKRSiliconThickness/2);
145 
146  G4LogicalVolume* logicTKRDetectorYRO =
147  new G4LogicalVolume(solidTKRDetectorYRO,dummyMat, "TKRDetectorYRO",0,0,0);
148 
149  G4VSolid* solidTKRDetectorXRO = new G4Box
150  ("TKRDetectorXRO",TKRSizeXY/2,TKRSizeXY/2,TKRSiliconThickness/2);
151 
152  G4LogicalVolume* logicTKRDetectorXRO =
153  new G4LogicalVolume(solidTKRDetectorXRO,dummyMat, "TKRDetectorXRO",0,0,0);
154  G4int i=0;
155  G4VPhysicalVolume* physiTKRDetectorXRO = 0;
156  G4VPhysicalVolume* physiTKRDetectorYRO = 0;
157 
158 
159  for (i = 0; i < NbOfTKRLayers; i++)
160  {
161 
162  physiTKRDetectorYRO =
163  new G4PVPlacement(0,G4ThreeVector(0.,0.,-TKRSizeZ/2
164  +TKRSiliconThickness/2
165  +(i)*TKRLayerDistance),
166  "TKRDetectorYRO",
167  logicTKRDetectorYRO,
168  ROphysiTKR,
169  false,
170  i);
171 
172  physiTKRDetectorXRO =
173  new G4PVPlacement(0,G4ThreeVector(0.,0.,
174  -TKRSizeZ/2+
175  TKRSiliconThickness/2 +
176  TKRViewsDistance+
177  TKRSiliconThickness+
178  (i)*TKRLayerDistance),
179  "TKRDetectorXRO",
180  logicTKRDetectorXRO,
181  ROphysiTKR,
182  false,
183  i);
184  }
185 
186 
187  // Silicon Tiles
188  // some problems with the RO tree
189 
190  G4double TKRActiveTileXY = GammaRayTelDetector->GetTKRActiveTileXY();
191  G4double TKRActiveTileZ = GammaRayTelDetector->GetTKRActiveTileZ();
192 
193  G4VSolid * solidTKRActiveTileXRO = new
194  G4Box("Active Tile X", TKRActiveTileXY/2,TKRActiveTileXY/2,TKRActiveTileZ/2);
195 
196  G4VSolid * solidTKRActiveTileYRO = new
197  G4Box("Active Tile Y", TKRActiveTileXY/2,TKRActiveTileXY/2,TKRActiveTileZ/2);
198 
199 
200  G4LogicalVolume* logicTKRActiveTileXRO =
201  new G4LogicalVolume(solidTKRActiveTileXRO, dummyMat,"Active Tile",0,0,0);
202 
203  G4LogicalVolume* logicTKRActiveTileYRO =
204  new G4LogicalVolume(solidTKRActiveTileYRO, dummyMat,"Active Tile",0,0,0);
205 
206  G4int j=0;
207  G4int k=0;
208 
209  G4int NbOfTKRTiles = GammaRayTelDetector->GetNbOfTKRTiles();
210  G4double SiliconGuardRing = GammaRayTelDetector->GetSiliconGuardRing();
211  G4double TilesSeparation = GammaRayTelDetector->GetTilesSeparation();
212 
213  G4VPhysicalVolume* physiTKRActiveTileXRO = 0;
214  G4VPhysicalVolume* physiTKRActiveTileYRO = 0;
215 
216  G4double x=0.;
217  G4double y=0.;
218  G4double z=0.;
219 
220  for (i=0;i< NbOfTKRTiles; i++)
221  {
222  for (j=0;j< NbOfTKRTiles; j++)
223  {
224  k = i*NbOfTKRTiles + j;
225 
226  x = -TKRSizeXY/2+TilesSeparation+SiliconGuardRing+TKRActiveTileXY/2+
227  (j)*((2*SiliconGuardRing)+TilesSeparation+TKRActiveTileXY);
228  y = -TKRSizeXY/2+TilesSeparation+SiliconGuardRing+TKRActiveTileXY/2+
229  (i)*((2*SiliconGuardRing)+TilesSeparation+TKRActiveTileXY);
230  z = 0.;
231 
232  physiTKRActiveTileXRO =
233  new G4PVPlacement(0,
234  G4ThreeVector(x,y,z),
235  "Active Tile X",
236  logicTKRActiveTileXRO,
237  physiTKRDetectorXRO,
238  false,
239  k);
240 
241  x = -TKRSizeXY/2+TilesSeparation+SiliconGuardRing+TKRActiveTileXY/2+
242  (i)*((2*SiliconGuardRing)+TilesSeparation+TKRActiveTileXY);
243  y = -TKRSizeXY/2+TilesSeparation+SiliconGuardRing+TKRActiveTileXY/2+
244  (j)*((2*SiliconGuardRing)+TilesSeparation+TKRActiveTileXY);
245  z = 0.;
246 
247  physiTKRActiveTileYRO =
248  new G4PVPlacement(0,
249  G4ThreeVector(x,y,z),
250  "Active Tile Y",
251  logicTKRActiveTileYRO,
252  physiTKRDetectorYRO,
253  false,
254  k);
255 
256  }
257  }
258 
259 
260  // Silicon Strips
261  // some problems with the RO tree
262 
263  G4double TKRXStripX=0.;
264  G4double TKRYStripY=0.;
265  G4double TKRYStripX=0.;
266  G4double TKRXStripY=0.;
267 
268  TKRXStripX = TKRYStripY = GammaRayTelDetector->GetTKRSiliconPitch();
269  TKRYStripX = TKRXStripY= GammaRayTelDetector->GetTKRActiveTileXY();
270  G4double TKRZStrip = GammaRayTelDetector->GetTKRSiliconThickness();
271 
272  G4int NbOfTKRStrips = GammaRayTelDetector->GetNbOfTKRStrips();
273 
274 
275  G4VSolid* solidTKRStripX = new G4Box("Strip X",
276  TKRXStripX/2,TKRYStripX/2,
277  TKRZStrip/2);
278 
279  G4LogicalVolume* logicTKRStripX =
280  new G4LogicalVolume(solidTKRStripX,dummyMat,"Strip X",0,0,0);
281 
282 
283  G4VSolid* solidTKRStripY = new G4Box("Strip Y",
284  TKRXStripY/2,TKRYStripY/2,
285  TKRZStrip/2);
286 
287 
288  G4LogicalVolume* logicTKRStripY =
289  new G4LogicalVolume(solidTKRStripY,dummyMat,"Strip Y",0,0,0);
290 
291 
292  G4double TKRSiliconPitch = GammaRayTelDetector->GetTKRSiliconPitch();
293 
294  for (i=0;i< NbOfTKRStrips; i++)
295  {
296  new G4PVPlacement(0,G4ThreeVector(-TKRActiveTileXY/2 +TKRSiliconPitch/2 +
297  (i)*TKRSiliconPitch, 0., 0.),
298  "Strip X",
299  logicTKRStripX,
300  physiTKRActiveTileXRO,
301  false,
302  i);
303 
304 
305  new G4PVPlacement(0,G4ThreeVector(0.,-TKRActiveTileXY/2
306  +TKRSiliconPitch/2 +
307  (i)*TKRSiliconPitch, 0.),
308  "Strip Y",
309  logicTKRStripY,
310  physiTKRActiveTileYRO,
311  false,
312  i);
313 
314 
315 
316 
317 
318  }
319 
320 
321 
322  //Flags the strip as sensitive .The pointer here serves
323  // as a flag only to check for sensitivity.
324  // (Could we make it by a simple cast of a non-NULL value ?)
325 
326  GammaRayTelDummySD * dummySensi = new GammaRayTelDummySD("Orpo");
327 
328  logicTKRStripX->SetSensitiveDetector(dummySensi);
329  logicTKRStripY->SetSensitiveDetector(dummySensi);
330 
331  //logicTKRActiveTileXRO->SetSensitiveDetector(dummySensi);
332  //logicTKRActiveTileYRO->SetSensitiveDetector(dummySensi);
333  //logicTKRDetectorRO->SetSensitiveDetector(dummySensi);
334 
335  return ROWorldPhys;
336 }
CLHEP::Hep3Vector G4ThreeVector
G4double z
Definition: TRTMaterials.hh:39
Definition: G4Box.hh:63
const XML_Char * name
int G4int
Definition: G4Types.hh:78
function g(Y1, Y2, PT2)
Definition: hijing1.383.f:5205
double G4double
Definition: G4Types.hh:76
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)

The documentation for this class was generated from the following files: