BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
FairCave.cxx
Go to the documentation of this file.
1
/********************************************************************************
2
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3
* *
4
* This software is distributed under the terms of the *
5
* GNU Lesser General Public Licence (LGPL) version 3, *
6
* copied verbatim in the file "LICENSE" *
7
********************************************************************************/
8
/* Generated by Together */
9
#include "
FairCave.h
"
10
11
#include "
FairGeoCave.h
"
// for FairGeoCave
12
#include "FairGeoInterface.h"
// for FairGeoInterface
13
#include "FairGeoLoader.h"
// for FairGeoLoader
14
#include "FairGeoNode.h"
// for FairGeoNode
15
#include "
FairGeoPassivePar.h
"
// for FairGeoPassivePar
16
#include "FairGeoVolume.h"
// for FairGeoVolume
17
#include "FairRun.h"
// for FairRun
18
#include "FairRuntimeDb.h"
// for FairRuntimeDb
19
20
#include <
TList.h
>
// for TListIter, TList (ptr only)
21
#include <
TObjArray.h
>
// for TObjArray
22
#include <
TString.h
>
// for TString
23
24
void
FairCave::ConstructGeometry
()
25
{
26
FairGeoLoader* loader = FairGeoLoader::Instance();
27
FairGeoInterface* GeoInterface = loader->getGeoInterface();
28
FairGeoCave
* MGeo =
new
FairGeoCave
();
29
MGeo->setGeomFile(GetGeometryFileName());
30
GeoInterface->addGeoModule(MGeo);
31
Bool_t
rc = GeoInterface->readSet(MGeo);
32
if
(rc) {
33
MGeo->create(loader->getGeoBuilder());
34
}
35
36
TList
* volList = MGeo->getListOfVolumes();
37
// store geo parameter
38
FairRun* fRun = FairRun::Instance();
39
FairRuntimeDb* rtdb = FairRun::Instance()->GetRuntimeDb();
40
FairGeoPassivePar
* par =
static_cast<
FairGeoPassivePar
*
>
(rtdb->getContainer(
"FairGeoPassivePar"
));
41
TObjArray
* fSensNodes = par->
GetGeoSensitiveNodes
();
42
TObjArray
* fPassNodes = par->
GetGeoPassiveNodes
();
43
44
TListIter
iter(volList);
45
FairGeoNode* node =
nullptr
;
46
FairGeoVolume* aVol =
nullptr
;
47
48
while
((node =
static_cast<
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
par->setChanged();
57
par->setInputVersion(fRun->GetRunId(), 1);
58
}
59
60
FairCave::FairCave
(
const
FairCave
& rhs)
61
:
FairModule
(rhs)
62
{
63
world
[0] = rhs.world[0];
64
world
[1] = rhs.world[1];
65
world
[2] = rhs.world[2];
66
}
67
68
FairCave::FairCave
() {}
69
70
FairCave::~FairCave
() {}
71
72
FairCave::FairCave
(
const
char
* name,
const
char
* Title)
73
:
FairModule
(name, Title)
74
{
75
world
[0] = 0;
76
world
[1] = 0;
77
world
[2] = 0;
78
}
79
80
FairModule
*
FairCave::CloneModule
()
const
81
{
82
return
new
FairCave
(*
this
);
83
}
Bool_t
bool Bool_t
TList.h
TObjArray.h
TString.h
FairCave::~FairCave
virtual ~FairCave()
Definition
FairCave.cxx:70
FairCave::ConstructGeometry
virtual void ConstructGeometry()
Definition
FairCave.cxx:24
FairCave::CloneModule
virtual FairModule * CloneModule() const
Definition
FairCave.cxx:80
FairCave::FairCave
FairCave(const char *name, const char *Title="Exp Cave")
Definition
FairCave.cxx:72
FairCave::FairCave
FairCave()
Definition
FairCave.cxx:68
FairCave::world
Double_t world[3]
Definition
FairCave.h:27
FairGeoCave
Definition
FairGeoCave.h:20
FairGeoPassivePar
Definition
FairGeoPassivePar.h:19
FairGeoPassivePar::GetGeoSensitiveNodes
TObjArray * GetGeoSensitiveNodes()
Definition
FairGeoPassivePar.h:31
FairGeoPassivePar::GetGeoPassiveNodes
TObjArray * GetGeoPassiveNodes()
Definition
FairGeoPassivePar.h:32
FairModule
TListIter
TListIter::Next
TObject * Next() override
TList
TObjArray
TObjArray::AddLast
void AddLast(TObject *obj) override
FairCave.h
FairGeoCave.h
FairGeoPassivePar.h
passive
FairCave.cxx
Generated on
for BmnRoot by
1.17.0