EIC Software
Reference for
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
FairGeoNode.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file FairGeoNode.h
1
#ifndef FAIRGEONODE_H
2
#define FAIRGEONODE_H
3
4
#include "
FairGeoVolume.h
"
5
#include "
FairGeoBasicShape.h
"
6
//#include "FairGeoMedium.h"
7
#include "
FairGeoTransform.h
"
8
9
//#include "TArrayD.h"
10
//#include "TObjArray.h"
11
#include "TGeoVolume.h"
12
13
//#include <fstream>
14
//#include <iomanip>
15
16
class
FairGeoMedium
;
17
class
FairGeoVector
;
18
class
TArrayD;
19
class
TObjArray;
20
//class TGeoVolume;
21
22
enum
EFairGeoNodeType
{
23
kFairGeoElement
= 0,
24
kFairGeoKeepin
= 1,
25
kFairGeoModule
= 2,
26
kFairGeoTopNode
= 3,
27
kFairGeoRefNode
= 4
28
};
29
30
35
class
FairGeoNode
:
public
FairGeoVolume
36
{
37
private
:
38
FairGeoNode
(
const
FairGeoNode
&);
39
FairGeoNode
&
operator=
(
const
FairGeoNode
&);
40
protected
:
41
Bool_t
active
;
42
FairGeoTransform
center
;
43
EFairGeoNodeType
volumeType
;
44
Bool_t
created
;
45
FairGeoNode
*
copyNode
;
46
TGeoVolume*
rootVolume
;
47
FairGeoBasicShape
*
pShape
;
48
FairGeoNode
*
pMother
;
49
FairGeoMedium
*
medium
;
50
FairGeoTransform
*
labTransform
;
51
TObjArray*
fDaughterList
;
52
//const char* fTruncName; //
53
TString
fTruncName
;
54
public
:
55
FairGeoNode
();
56
FairGeoNode
(
FairGeoNode
&);
57
virtual
~FairGeoNode
();
58
void
AddDaughter
(
FairGeoNode
* fNode) {
fDaughterList
->AddLast(fNode);}
59
TObjArray*
GetListOfDaughters
() {
return
fDaughterList
;}
60
EFairGeoNodeType
getVolumeType
() {
return
volumeType
; }
61
Bool_t
isTopNode
() {
return
(Bool_t)(
volumeType
==
kFairGeoTopNode
);}
62
Bool_t
isRefNode
() {
return
(Bool_t)(
volumeType
==
kFairGeoRefNode
);}
63
Bool_t
isKeepin
() {
return
(Bool_t)(
volumeType
==
kFairGeoKeepin
);}
64
Bool_t
isModule
() {
return
(Bool_t)(
volumeType
==
kFairGeoModule
);}
65
Int_t
getCopyNo
();
66
FairGeoBasicShape
*
getShapePointer
() {
return
pShape
; }
67
FairGeoNode
*
getMotherNode
() {
return
pMother
;}
68
FairGeoMedium
*
getMedium
() {
return
medium
;}
69
Bool_t
isActive
() {
return
active
;}
70
FairGeoTransform
&
getCenterPosition
() {
return
center
;}
71
TArrayD*
getParameters
();
72
FairGeoTransform
*
getPosition
();
73
FairGeoTransform
*
getLabTransform
();
74
FairGeoNode
*
getCopyNode
() {
return
copyNode
;}
75
TGeoVolume*
getRootVolume
() {
return
rootVolume
;}
76
TList*
getTree
();
77
Bool_t
isSensitive
();
78
Bool_t
isCreated
() {
return
created
;}
79
void
setCreated
() {
created
=kTRUE;}
80
void
setName
(
const
Text_t*
s
);
81
void
setVolumeType
(
EFairGeoNodeType
t
) {
volumeType
=
t
;}
82
void
setVolumePar
(
FairGeoNode
&);
83
void
setShape
(
FairGeoBasicShape
*
s
);
84
void
setMother
(
FairGeoNode
*
s
);
85
void
setMedium
(
FairGeoMedium
* med) {
medium
=med; }
86
void
setActive
(Bool_t a=kTRUE) {
active
=a;}
87
void
setCenterPosition
(
const
FairGeoTransform
&
t
) {
center
=
t
;}
88
void
setCopyNode
(
FairGeoNode
*
p
) {
copyNode
=
p
;}
89
void
setRootVolume
(TGeoVolume*
p
) {
rootVolume
=
p
;}
90
FairGeoTransform
*
calcLabTransform
();
91
void
setLabTransform
(
FairGeoTransform
&);
92
Bool_t
calcModuleTransform
(
FairGeoTransform
&);
93
Bool_t
calcRefPos
(
FairGeoVector
&);
94
void
clear
();
95
void
print
();
96
Bool_t
write
(std::fstream&);
97
Int_t
compare
(
FairGeoNode
&);
98
99
100
void
setTruncName
(
const
char
* aName ) {
fTruncName
= aName;}
101
const
char
*
getTruncName
() {
102
if
(
fTruncName
.Length()>0) {
return
fTruncName
.Data(); }
103
else
{
return
GetName(); }
104
}
105
106
ClassDef(
FairGeoNode
,1)
//
107
};
108
109
// -------------------- inlines --------------------------
110
111
inline
void
FairGeoNode::setName
(
const
Text_t*
s
)
112
{
113
// Sets the name of the volume
114
fName=
s
;
115
fName.ToUpper();
116
}
117
118
inline
void
FairGeoNode::setShape
(
FairGeoBasicShape
*
s
)
119
{
120
// Sets the shape of the volume
121
if
(s) {
122
pShape
=
s
;
123
shape
=
pShape
->GetName();
124
}
125
}
126
127
inline
void
FairGeoNode::setMother
(
FairGeoNode
* moth)
128
{
129
// Sets the mother of the volume
130
if
(moth) {
131
pMother
=moth;
132
mother
=
pMother
->GetName();
133
pMother
->
AddDaughter
(
this
);
134
}
135
}
136
137
inline
Bool_t
FairGeoNode::isSensitive
()
138
{
139
if
(
medium
) {
return
medium
->
isSensitive
(); }
140
else
{
return
kFALSE; }
141
}
142
143
#endif
/* !FAIRGEONODE_H */
EicRoot
blob
master
geobase
FairGeoNode.h
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:36
using
1.8.2 with
EIC GitHub integration