R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
R3BDetector.h
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#pragma once
15
16#include <FairDetector.h>
17#include <TGeoMatrix.h>
18#include <TString.h>
19
20constexpr double fCutEvalue = 1e-3; // 1 MeV
21
22class R3BDetector : public FairDetector
23{
24 public:
26
27 R3BDetector(const TString& name, const Int_t detId);
28
29 R3BDetector(const TString& name,
30 const Int_t detId,
31 const TString& geoFile,
32 const TGeoTranslation& trans = TGeoTranslation(),
33 const TGeoRotation& rot = TGeoRotation());
34
35 R3BDetector(const TString& name,
36 const Int_t detId,
37 const TString& geoFile,
38 const TGeoCombiTrans& combi = TGeoCombiTrans());
39
41 void ConstructGeometry() override;
42 void ConstructRootGeometry(TGeoMatrix* geo = nullptr) override;
43
45 virtual void SetPosition(const TGeoTranslation& trans) { fCombiTrans.SetTranslation(trans); }
46
48 virtual void SetRotation(const TGeoRotation& rot) { fCombiTrans.SetRotation(rot); }
49
51 virtual void SetCombiTrans(const TGeoCombiTrans& combi) { fCombiTrans = combi; }
52
53 virtual void SetEnergyCut(const double cutE) { fCutE = cutE; }
54
55 virtual void SetActive(const Bool_t flag) { fActive = flag; }
56
57 protected:
58 TGeoCombiTrans fCombiTrans;
59 double fCutE; // NOLINT
60
61 public:
63};
constexpr double fCutEvalue
Definition R3BDetector.h:20
double fCutE
Definition R3BDetector.h:59
TGeoCombiTrans fCombiTrans
Definition R3BDetector.h:58
virtual void SetCombiTrans(const TGeoCombiTrans &combi)
Method to setup the translation + rotation of the detector.
Definition R3BDetector.h:51
virtual void SetPosition(const TGeoTranslation &trans)
Method to setup the position of the detector-origin.
Definition R3BDetector.h:45
void ConstructGeometry() override
Construct geometry from root files.
virtual void SetRotation(const TGeoRotation &rot)
Method to setup the rotation of the detector.
Definition R3BDetector.h:48
ClassDefOverride(R3BDetector, 3)
virtual void SetActive(const Bool_t flag)
Definition R3BDetector.h:55
virtual void SetEnergyCut(const double cutE)
Definition R3BDetector.h:53
void ConstructRootGeometry(TGeoMatrix *geo=nullptr) override