ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
ExN04CalorimeterROGeometry.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file ExN04CalorimeterROGeometry.cc
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
//
29
//
30
#include "ExN04CalorimeterROGeometry.hh"
31
#include "ExN04DummySD.hh"
32
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 "
G4Material.hh
"
42
#include "
G4VisAttributes.hh
"
43
#include "
G4SystemOfUnits.hh
"
44
45
ExN04CalorimeterROGeometry::ExN04CalorimeterROGeometry
()
46
:
G4VReadOutGeometry
()
47
{
48
#include "ExN04DetectorParameterDef.icc"
49
}
50
51
52
ExN04CalorimeterROGeometry::ExN04CalorimeterROGeometry
(
G4String
aString)
53
:
G4VReadOutGeometry
(aString), dummyMat(0)
54
{
55
#include "ExN04DetectorParameterDef.icc"
56
}
57
58
ExN04CalorimeterROGeometry::~ExN04CalorimeterROGeometry
()
59
{
60
delete
dummyMat
;
61
}
62
63
G4VPhysicalVolume
*
ExN04CalorimeterROGeometry::Build
()
64
{
65
// A dummy material is used to fill the volumes of the readout geometry.
66
// ( It will be allowed to set a NULL pointer in volumes of such virtual
67
// division in future, since this material is irrelevant for tracking.)
68
dummyMat
=
new
G4Material
(
name
=
"dummyMat"
, 1., 1.*
g
/
mole
, 1.*
g
/
cm3
);
69
70
//Builds the ReadOut World:
71
G4Box
*ROWorldBox =
new
G4Box
(
"ROWorldBox"
,
expHall_x
,
expHall_y
,
expHall_z
);
72
G4LogicalVolume
*ROWorldLog =
new
G4LogicalVolume
(ROWorldBox,
dummyMat
,
73
"ROWorldLogical"
, 0, 0, 0);
74
ROWorldLog->
SetVisAttributes
(
G4VisAttributes::GetInvisible
());
75
G4PVPlacement
*ROWorldPhys =
new
G4PVPlacement
(0,
G4ThreeVector
(),
76
"ROWorldPhysical"
,
77
ROWorldLog,
78
0,
false
,0);
79
// Calorimeter volume:
80
G4VSolid
* caloROtub
81
=
new
G4Tubs
(
"caloROtub"
,
caloTubs_rmin
,
caloTubs_rmax
,
82
caloTubs_dz
,
caloTubs_sphi
,
caloTubs_dphi
);
83
G4LogicalVolume
* caloROlog
84
=
new
G4LogicalVolume
(caloROtub,
dummyMat
,
"caloROlogical"
,0,0,0);
85
G4VPhysicalVolume
* caloROphys
86
=
new
G4PVPlacement
(0,
G4ThreeVector
(),
"calROphysical"
,caloROlog,
87
ROWorldPhys,
false
,0);
88
89
// -------------------------------
90
// Calorimeter readout division:
91
// -------------------------------
92
// Phi division first: 48 sectors
93
G4VSolid
* caloROphiDivisionTub
94
=
new
G4Tubs
(
"caloROphiDivision"
,
caloCell_rmin
,
caloCell_rmax
,
95
caloCell_dz
,
caloCell_sphi
,
caloCell_dphi
);
96
G4LogicalVolume
* caloROphiDivisionLog
97
=
new
G4LogicalVolume
(caloROphiDivisionTub,
dummyMat
,
"caloROphiDivisionLogical"
,0,0,0);
98
G4VPhysicalVolume
* caloROphiDivisionPhys
99
=
new
G4PVReplica
(
"caloROphiDivisionPhysical"
, caloROphiDivisionLog, caloROphys,
100
kPhi
,
segmentsinPhi
,
caloCell_dphi
);
101
// then z division: 20 slices:
102
G4VSolid
* caloROcellTub
103
=
new
G4Tubs
(
"caloROcellTub"
,
caloRing_rmin
,
caloRing_rmax
,
104
caloRing_dz
,
caloRing_sphi
,
caloRing_dphi
);
105
G4LogicalVolume
* caloROcellLog
106
=
new
G4LogicalVolume
(caloROcellTub,
dummyMat
,
"caloROcellLogical"
,0,0,0);
107
// G4VPhysicalVolume * caloROcellPhys =
108
new
G4PVReplica
(
"caloROcellPhysical"
, caloROcellLog, caloROphiDivisionPhys,
109
kZAxis
,
segmentsinZ
,2.*
caloRing_dz
);
110
111
112
//Flags the cells as sensitive .The pointer here serves
113
// as a flag only to check for sensitivity.
114
// (Could we make it by a simple cast of a non-NULL value ?)
115
ExN04DummySD
* dummySensi =
new
ExN04DummySD
;
116
caloROcellLog->
SetSensitiveDetector
(dummySensi);
117
118
return
ROWorldPhys;
119
}
geant4
tree
geant4-10.6-release
examples
extended
parallel
TopC
ParN04
src
ExN04CalorimeterROGeometry.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:04
using
1.8.2 with
ECCE GitHub integration