Geant4
10.01.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
ExN04CalorimeterROGeometry.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
//
26
// $Id: ExN04CalorimeterROGeometry.cc 78055 2013-12-03 08:27:48Z gcosmo $
27
//
30
//
31
#include "ExN04CalorimeterROGeometry.hh"
32
#include "ExN04DummySD.hh"
33
34
#include "
G4LogicalVolume.hh
"
35
#include "
G4VPhysicalVolume.hh
"
36
#include "
G4PVPlacement.hh
"
37
#include "
G4PVReplica.hh
"
38
#include "
G4SDManager.hh
"
39
#include "
G4Box.hh
"
40
#include "
G4Tubs.hh
"
41
#include "
G4ThreeVector.hh
"
42
#include "
G4Material.hh
"
43
#include "
G4VisAttributes.hh
"
44
#include "
G4SystemOfUnits.hh
"
45
46
ExN04CalorimeterROGeometry::ExN04CalorimeterROGeometry
()
47
:
G4VReadOutGeometry
()
48
{
49
#include "
ExN04DetectorParameterDef.icc
"
50
}
51
52
53
ExN04CalorimeterROGeometry::ExN04CalorimeterROGeometry
(
G4String
aString)
54
:
G4VReadOutGeometry
(aString), dummyMat(0)
55
{
56
#include "
ExN04DetectorParameterDef.icc
"
57
}
58
59
ExN04CalorimeterROGeometry::~ExN04CalorimeterROGeometry
()
60
{
61
delete
dummyMat
;
62
}
63
64
G4VPhysicalVolume
*
ExN04CalorimeterROGeometry::Build
()
65
{
66
// A dummy material is used to fill the volumes of the readout geometry.
67
// ( It will be allowed to set a NULL pointer in volumes of such virtual
68
// division in future, since this material is irrelevant for tracking.)
69
dummyMat
=
new
G4Material
(
name
=
"dummyMat"
, 1., 1.*
g
/
mole
, 1.*
g
/
cm3
);
70
71
//Builds the ReadOut World:
72
G4Box
*ROWorldBox =
new
G4Box
(
"ROWorldBox"
,
expHall_x
,
expHall_y
,
expHall_z
);
73
G4LogicalVolume
*ROWorldLog =
new
G4LogicalVolume
(ROWorldBox,
dummyMat
,
74
"ROWorldLogical"
, 0, 0, 0);
75
ROWorldLog->
SetVisAttributes
(
G4VisAttributes::Invisible
);
76
G4PVPlacement
*ROWorldPhys =
new
G4PVPlacement
(0,
G4ThreeVector
(),
77
"ROWorldPhysical"
,
78
ROWorldLog,
79
0,
false
,0);
80
// Calorimeter volume:
81
G4VSolid
* caloROtub
82
=
new
G4Tubs
(
"caloROtub"
,
caloTubs_rmin
,
caloTubs_rmax
,
83
caloTubs_dz
,
caloTubs_sphi
,
caloTubs_dphi
);
84
G4LogicalVolume
* caloROlog
85
=
new
G4LogicalVolume
(caloROtub,
dummyMat
,
"caloROlogical"
,0,0,0);
86
G4VPhysicalVolume
* caloROphys
87
=
new
G4PVPlacement
(0,
G4ThreeVector
(),
"calROphysical"
,caloROlog,
88
ROWorldPhys,
false
,0);
89
90
// -------------------------------
91
// Calorimeter readout division:
92
// -------------------------------
93
// Phi division first: 48 sectors
94
G4VSolid
* caloROphiDivisionTub
95
=
new
G4Tubs
(
"caloROphiDivision"
,
caloCell_rmin
,
caloCell_rmax
,
96
caloCell_dz
,
caloCell_sphi
,
caloCell_dphi
);
97
G4LogicalVolume
* caloROphiDivisionLog
98
=
new
G4LogicalVolume
(caloROphiDivisionTub,
dummyMat
,
"caloROphiDivisionLogical"
,0,0,0);
99
G4VPhysicalVolume
* caloROphiDivisionPhys
100
=
new
G4PVReplica
(
"caloROphiDivisionPhysical"
, caloROphiDivisionLog, caloROphys,
101
kPhi
,
segmentsinPhi
,
caloCell_dphi
);
102
// then z division: 20 slices:
103
G4VSolid
* caloROcellTub
104
=
new
G4Tubs
(
"caloROcellTub"
,
caloRing_rmin
,
caloRing_rmax
,
105
caloRing_dz
,
caloRing_sphi
,
caloRing_dphi
);
106
G4LogicalVolume
* caloROcellLog
107
=
new
G4LogicalVolume
(caloROcellTub,
dummyMat
,
"caloROcellLogical"
,0,0,0);
108
// G4VPhysicalVolume * caloROcellPhys =
109
new
G4PVReplica
(
"caloROcellPhysical"
, caloROcellLog, caloROphiDivisionPhys,
110
kZAxis
,
segmentsinZ
,2.*
caloRing_dz
);
111
112
113
//Flags the cells as sensitive .The pointer here serves
114
// as a flag only to check for sensitivity.
115
// (Could we make it by a simple cast of a non-NULL value ?)
116
ExN04DummySD
* dummySensi =
new
ExN04DummySD
;
117
caloROcellLog->
SetSensitiveDetector
(dummySensi);
118
119
return
ROWorldPhys;
120
}
kPhi
Definition:
geomdefs.hh:54
ExN04CalorimeterROGeometry::caloTubs_dphi
G4double caloTubs_dphi
Definition:
ExN04CalorimeterROGeometry.hh:52
ExN04DetectorParameterDef.icc
ExN04CalorimeterROGeometry::caloCell_sphi
G4double caloCell_sphi
Definition:
ExN04CalorimeterROGeometry.hh:69
kZAxis
Definition:
geomdefs.hh:54
G4ThreeVector
CLHEP::Hep3Vector G4ThreeVector
Definition:
G4ThreeVector.hh:42
G4PVPlacement
Definition:
G4PVPlacement.hh:51
ExN04CalorimeterROGeometry::expHall_z
G4double expHall_z
Definition:
ExN04CalorimeterROGeometry.hh:35
G4VPhysicalVolume
Definition:
G4VPhysicalVolume.hh:82
G4Box
Definition:
G4Box.hh:64
G4Tubs
Definition:
G4Tubs.hh:85
G4Material
Definition:
G4Material.hh:120
G4VReadOutGeometry::name
G4String name
Definition:
G4VReadOutGeometry.hh:69
G4Box.hh
G4VReadOutGeometry
Definition:
G4VReadOutGeometry.hh:40
ExN04CalorimeterROGeometry::caloTubs_dz
G4double caloTubs_dz
Definition:
ExN04CalorimeterROGeometry.hh:50
ExN04CalorimeterROGeometry::caloTubs_sphi
G4double caloTubs_sphi
Definition:
ExN04CalorimeterROGeometry.hh:51
ExN04CalorimeterROGeometry::Build
G4VPhysicalVolume * Build()
Definition:
ExN04CalorimeterROGeometry.cc:65
G4PVReplica
Definition:
G4PVReplica.hh:119
ExN04CalorimeterROGeometry::caloRing_rmin
G4double caloRing_rmin
Definition:
ExN04CalorimeterROGeometry.hh:60
ExN04CalorimeterROGeometry::caloCell_dz
G4double caloCell_dz
Definition:
ExN04CalorimeterROGeometry.hh:68
G4VisAttributes.hh
ExN04CalorimeterROGeometry::~ExN04CalorimeterROGeometry
~ExN04CalorimeterROGeometry()
Definition:
ExN04CalorimeterROGeometry.cc:60
G4VSolid
Definition:
G4VSolid.hh:87
ExN04CalorimeterROGeometry::expHall_x
G4double expHall_x
Definition:
ExN04CalorimeterROGeometry.hh:33
G4SDManager.hh
G4Tubs.hh
ExN04CalorimeterROGeometry::caloRing_rmax
G4double caloRing_rmax
Definition:
ExN04CalorimeterROGeometry.hh:59
G4Material.hh
ExN04CalorimeterROGeometry::caloTubs_rmax
G4double caloTubs_rmax
Definition:
ExN04CalorimeterROGeometry.hh:48
G4LogicalVolume
Definition:
G4LogicalVolume.hh:187
ExN04CalorimeterROGeometry::caloRing_sphi
G4double caloRing_sphi
Definition:
ExN04CalorimeterROGeometry.hh:62
cm3
static const double cm3
Definition:
G4SIunits.hh:108
ExN04CalorimeterROGeometry::caloRing_dz
G4double caloRing_dz
Definition:
ExN04CalorimeterROGeometry.hh:61
ExN04DummySD
Definition:
ExN04DummySD.hh:42
ExN04CalorimeterROGeometry::caloTubs_rmin
G4double caloTubs_rmin
Definition:
ExN04CalorimeterROGeometry.hh:49
ExN04CalorimeterROGeometry::segmentsinPhi
G4int segmentsinPhi
Definition:
ExN04CalorimeterROGeometry.hh:65
ExN04CalorimeterROGeometry::ExN04CalorimeterROGeometry
ExN04CalorimeterROGeometry()
ExN04CalorimeterROGeometry::expHall_y
G4double expHall_y
Definition:
ExN04CalorimeterROGeometry.hh:34
G4LogicalVolume.hh
ExN04CalorimeterROGeometry::caloCell_dphi
G4double caloCell_dphi
Definition:
ExN04CalorimeterROGeometry.hh:70
ExN04CalorimeterROGeometry::caloRing_dphi
G4double caloRing_dphi
Definition:
ExN04CalorimeterROGeometry.hh:63
g
static const double g
Definition:
G4SIunits.hh:162
G4PVReplica.hh
G4VisAttributes::Invisible
static const G4VisAttributes Invisible
Definition:
G4VisAttributes.hh:83
mole
static const double mole
Definition:
G4SIunits.hh:265
G4VPhysicalVolume.hh
ExN04CalorimeterROGeometry::caloCell_rmin
G4double caloCell_rmin
Definition:
ExN04CalorimeterROGeometry.hh:67
G4SystemOfUnits.hh
G4ThreeVector.hh
G4PVPlacement.hh
G4LogicalVolume::SetVisAttributes
void SetVisAttributes(const G4VisAttributes *pVA)
ExN04CalorimeterROGeometry::caloCell_rmax
G4double caloCell_rmax
Definition:
ExN04CalorimeterROGeometry.hh:66
G4LogicalVolume::SetSensitiveDetector
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)
ExN04CalorimeterROGeometry::segmentsinZ
G4int segmentsinZ
Definition:
ExN04CalorimeterROGeometry.hh:58
ExN04CalorimeterROGeometry::dummyMat
G4Material * dummyMat
Definition:
ExN04CalorimeterROGeometry.hh:47
G4String
Definition:
G4String.hh:45
geant4.10.01.p02
examples
extended
parallel
TopC
ParN04
src
ExN04CalorimeterROGeometry.cc
Generated on Wed Dec 30 2015 22:37:14 for Geant4 by
1.8.8