R3BROOT
R3B analysis software
Toggle main menu visibility
Loading...
Searching...
No Matches
R3BDetector.cxx
Go to the documentation of this file.
1
/******************************************************************************
2
* Copyright (C) 2009 GSI Helmholtzzentrum für Schwerionenforschung GmbH *
3
* Copyright (C) 2009-2026 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 "
R3BDetector.h
"
15
#include "
R3BLogger.h
"
16
#include <TGeoManager.h>
17
18
R3BDetector::R3BDetector
()
19
: FairDetector()
20
{
21
}
22
23
R3BDetector::R3BDetector
(
const
TString& name,
const
Int_t detId)
24
: FairDetector(name, kTRUE, detId)
25
,
fCutE
(
fCutEvalue
)
26
{
27
SetVerboseLevel(1);
28
}
29
30
R3BDetector::R3BDetector
(
const
TString& name,
31
const
Int_t detId,
32
const
TString& geoFile,
33
const
TGeoTranslation& trans,
34
const
TGeoRotation& rot)
35
:
R3BDetector
(name, detId, geoFile, { trans, rot })
36
{
37
}
38
39
R3BDetector::R3BDetector
(
const
TString& name,
const
Int_t detId,
const
TString& geoFile,
const
TGeoCombiTrans& combi)
40
: FairDetector(name, kTRUE, detId)
41
,
fCutE
(
fCutEvalue
)
42
,
fCombiTrans
(combi)
43
{
44
SetVerboseLevel(1);
45
SetGeometryFileName(geoFile);
46
}
47
48
void
R3BDetector::ConstructGeometry
()
49
{
50
if
(!GetGeometryFileName().EndsWith(
".root"
))
51
{
52
R3BLOG
(fatal, GetName() <<
" (which is a "
<< ClassName() <<
") geometry file is not specified"
);
53
}
54
ConstructRootGeometry
();
55
}
56
57
void
R3BDetector::ConstructRootGeometry
(TGeoMatrix*)
58
{
59
R3BLOG
(info,
60
"Constructing "
<< GetName() <<
" (which is a "
<< ClassName() <<
") geometry from ROOT file "
61
<< 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
(
R3BDetector
)
R3BDetector.h
fCutEvalue
constexpr double fCutEvalue
Definition
R3BDetector.h:20
R3BLogger.h
R3BLOG
#define R3BLOG(severity, x)
Definition
R3BLogger.h:33
ClassImp
ClassImp(R3B::Neuland::Cal2HitPar)
R3BDetector
Definition
R3BDetector.h:23
R3BDetector::R3BDetector
R3BDetector()
Definition
R3BDetector.cxx:18
R3BDetector::fCutE
double fCutE
Definition
R3BDetector.h:59
R3BDetector::fCombiTrans
TGeoCombiTrans fCombiTrans
Definition
R3BDetector.h:58
R3BDetector::ConstructGeometry
void ConstructGeometry() override
Construct geometry from root files.
Definition
R3BDetector.cxx:48
R3BDetector::ConstructRootGeometry
void ConstructRootGeometry(TGeoMatrix *geo=nullptr) override
Definition
R3BDetector.cxx:57
r3bbase
R3BDetector.cxx
Generated by
1.18.0