Geant4  10.02.p01
RE01CalorimeterROGeometry.cc
Go to the documentation of this file.
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 //
28 //
29 // $Id: RE01CalorimeterROGeometry.cc 75295 2013-10-30 09:32:52Z gcosmo $
30 //
31 
33 #include "G4LogicalVolume.hh"
34 #include "G4VPhysicalVolume.hh"
35 #include "G4PVPlacement.hh"
36 #include "G4PVReplica.hh"
37 #include "G4SDManager.hh"
38 #include "G4Box.hh"
39 #include "G4Tubs.hh"
40 #include "G4ThreeVector.hh"
41 #include "G4NistManager.hh"
42 #include "G4Material.hh"
43 #include "G4SystemOfUnits.hh"
44 
45 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
48 {
50 }
51 
52 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
54  : G4VReadOutGeometry(aString)
55 {
57 }
58 
59 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
61 {;}
62 
63 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
65 {
66  // Material Information imported from NIST database.
67  //
69 
70  // A dummy material is used to fill the volumes of the readout geometry.
71  // ( It will be allowed to set a NULL pointer in volumes of such virtual
72  // division in future, since this material is irrelevant for tracking.)
73  G4Material* dummyMat = NISTman->FindOrBuildMaterial("G4_AIR");
74 
75  //Builds the ReadOut World:
76  G4Box *ROWorldBox = new G4Box("ROWorldBox",fExpHall_x,fExpHall_y,fExpHall_z);
77  G4LogicalVolume *ROWorldLog = new G4LogicalVolume(ROWorldBox, dummyMat,
78  "ROWorldLogical", 0, 0, 0);
79  G4PVPlacement *ROWorldPhys = new G4PVPlacement(0,G4ThreeVector(),
80  "ROWorldPhysical",
81  ROWorldLog,
82  0,false,0);
83  // Calorimeter volume:
84  G4VSolid * caloROtub
85  = new G4Tubs("caloROtub",fCaloTubs_rmin,fCaloTubs_rmax,
87  G4LogicalVolume * caloROlog
88  = new G4LogicalVolume(caloROtub,dummyMat,"caloROlogical",0,0,0);
89  G4VPhysicalVolume * caloROphys
90  = new G4PVPlacement(0,G4ThreeVector(),"calROphysical",caloROlog,
91  ROWorldPhys,false,0);
92 
93  // -------------------------------
94  // Calorimeter readout division:
95  // -------------------------------
96  // Phi division first: 48 sectors
97  G4VSolid * caloROphiDivisionTub
98  = new G4Tubs("caloROphiDivision", fCaloCell_rmin, fCaloCell_rmax,
100  G4LogicalVolume * caloROphiDivisionLog
101  = new G4LogicalVolume(caloROphiDivisionTub, dummyMat,
102  "caloROphiDivisionLogical",0,0,0);
103  G4VPhysicalVolume * caloROphiDivisionPhys
104  = new G4PVReplica("caloROphiDivisionPhysical", caloROphiDivisionLog,
105  caloROphys, kPhi, fSegmentsinPhi, fCaloCell_dphi);
106  // then z division: 20 slices:
107  G4VSolid * caloROcellTub
108  = new G4Tubs("caloROcellTub", fCaloRing_rmin, fCaloRing_rmax,
110  G4LogicalVolume * caloROcellLog
111  = new G4LogicalVolume(caloROcellTub, dummyMat, "caloROcellLogical",0,0,0);
112 // G4VPhysicalVolume * caloROcellPhys =
113  new G4PVReplica("caloROcellPhysical", caloROcellLog, caloROphiDivisionPhys,
115 
116  return ROWorldPhys;
117 }
Definition: geomdefs.hh:54
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
CLHEP::Hep3Vector G4ThreeVector
Definition: G4Box.hh:64
Definition: G4Tubs.hh:85
Definition of the RE01CalorimeterROGeometry class.
static G4NistManager * Instance()
virtual G4VPhysicalVolume * Build()