R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
R3BModule.cxx
Go to the documentation of this file.
1
/******************************************************************************
2
* Copyright (C) 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH *
3
* Copyright (C) 2019-2025 Members of R3B Collaboration *
4
* *
5
* This software is distributed under the terms of the *
6
* GNU General Public Licence (GPL) version 3, *
7
* copied verbatim in the file "LICENSE". *
8
* *
9
* In applying this license GSI does not waive the privileges and immunities *
10
* granted to it by virtue of its status as an Intergovernmental Organization *
11
* or submit itself to any jurisdiction. *
12
******************************************************************************/
13
14
#include "
R3BModule.h
"
15
#include "FairLogger.h"
16
#include "TGeoManager.h"
17
18
R3BModule::R3BModule
()
19
: FairModule()
20
{
21
}
22
23
R3BModule::R3BModule
(
const
TString& name,
const
TString& title,
const
Bool_t active)
24
: FairModule(name, title, active)
25
{
26
}
27
28
R3BModule::R3BModule
(
const
TString& name,
29
const
TString& title,
30
const
Bool_t active,
31
const
TString& geoFile,
32
const
TGeoTranslation& trans,
33
const
TGeoRotation& rot)
34
:
R3BModule
(name, title, active, geoFile, { trans, rot })
35
{
36
}
37
38
R3BModule::R3BModule
(
const
TString& name,
39
const
TString& title,
40
const
Bool_t active,
41
const
TString& geoFile,
42
const
TGeoCombiTrans& combi)
43
: FairModule(name, title, active)
44
,
fCombiTrans
(combi)
45
{
46
SetGeometryFileName(geoFile);
47
}
48
49
void
R3BModule::ConstructGeometry
()
50
{
51
if
(!GetGeometryFileName().EndsWith(
".root"
))
52
{
53
LOG(fatal) << GetName() <<
" (which is a "
<< ClassName() <<
") geometry file is not specified!"
;
54
}
55
ConstructRootGeometry
();
56
}
57
58
void
R3BModule::ConstructRootGeometry
(TGeoMatrix*)
59
{
60
LOG(info) <<
"R3BModule: Constructing "
<< GetName() <<
" (which is a "
<< ClassName()
61
<<
") geometry from ROOT file "
<< GetGeometryFileName() <<
" ..."
;
62
FairModule::ConstructRootGeometry();
63
64
if
(!
fCombiTrans
.IsIdentity())
65
{
66
auto
n = gGeoManager->GetTopNode()->GetDaughter(gGeoManager->GetTopNode()->GetNdaughters() - 1);
67
(
dynamic_cast<
TGeoNodeMatrix*
>
(n))->SetMatrix(
fCombiTrans
.MakeClone());
68
}
69
}
70
71
ClassImp
(
R3BModule
)
R3BModule.h
ClassImp
ClassImp(R3B::Neuland::Cal2HitPar)
R3BModule
Definition
R3BModule.h:22
R3BModule::ConstructGeometry
virtual void ConstructGeometry() override
Construct geometry from root files.
Definition
R3BModule.cxx:49
R3BModule::fCombiTrans
TGeoCombiTrans fCombiTrans
Definition
R3BModule.h:52
R3BModule::ConstructRootGeometry
virtual void ConstructRootGeometry(TGeoMatrix *p=nullptr) override
Definition
R3BModule.cxx:58
R3BModule::R3BModule
R3BModule()
Definition
R3BModule.cxx:18
r3bbase
R3BModule.cxx
Generated by
1.13.2