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
PndTarget.cxx
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PndTarget.cxx
1
/* Generated by Together */
2
3
#include "
PndTarget.h
"
4
#include "
FairGeoLoader.h
"
5
#include "
FairGeoInterface.h
"
6
#include "
PndGeoTarget.h
"
7
#include "
FairGeoRootBuilder.h
"
8
#include "
FairRuntimeDb.h
"
9
#include "
PndGeoPassivePar.h
"
10
#include "TObjArray.h"
11
#include "
FairRun.h
"
12
#include "
FairGeoVolume.h
"
13
#include "
FairGeoNode.h
"
14
15
PndTarget::~PndTarget
()
16
{
17
}
18
PndTarget::PndTarget
()
19
{
20
}
21
22
PndTarget::PndTarget
(
const
char
*
name
,
const
char
*
title
)
23
:
FairModule
(name ,title)
24
{
25
}
26
void
PndTarget::ConstructGeometry
()
27
{
28
FairGeoLoader
*
loader
=
FairGeoLoader::Instance
();
29
FairGeoInterface
*GeoInterface =loader->
getGeoInterface
();
30
PndGeoTarget
*MGeo=
new
PndGeoTarget
();
31
MGeo->
setGeomFile
(
GetGeometryFileName
());
32
GeoInterface->
addGeoModule
(MGeo);
33
Bool_t rc = GeoInterface->
readSet
(MGeo);
34
if
( rc ) MGeo->
create
(loader->
getGeoBuilder
());
35
36
TList* volList = MGeo->
getListOfVolumes
();
37
// store geo parameter
38
FairRun
*fRun =
FairRun::Instance
();
39
FairRuntimeDb
*rtdb=
FairRun::Instance
()->
GetRuntimeDb
();
40
PndGeoPassivePar
* par=(
PndGeoPassivePar
*)(rtdb->
getContainer
(
"PndGeoPassivePar"
));
41
TObjArray *fSensNodes = par->
GetGeoSensitiveNodes
();
42
TObjArray *fPassNodes = par->
GetGeoPassiveNodes
();
43
44
TListIter iter(volList);
45
FairGeoNode
* node = NULL;
46
FairGeoVolume
*aVol=NULL;
47
48
while
( (node = (
FairGeoNode
*)iter.Next()) ) {
49
aVol =
dynamic_cast<
FairGeoVolume
*
>
( node );
50
if
( node->
isSensitive
() ) {
51
fSensNodes->AddLast( aVol );
52
}
else
{
53
fPassNodes->AddLast( aVol );
54
}
55
}
56
ProcessNodes
( volList );
57
par->
setChanged
();
58
par->
setInputVersion
(fRun->
GetRunId
(),1);
59
60
}
61
ClassImp
(
PndTarget
)
62
63
64
EicRoot
blob
master
passive
PndTarget.cxx
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:37
using
1.8.2 with
EIC GitHub integration