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