R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
R3BNeulandGeoPar.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#ifndef R3BNEULANDGEOPAR_H
15#define R3BNEULANDGEOPAR_H
16
17#include "FairParGenericSet.h"
18#include "TGeoNode.h"
19#include <Math/Vector3Dfwd.h>
20#include <Rtypes.h>
21#include <cstdint>
22#include <map>
23class FairParamList;
24class TVector3;
25
33
34class R3BNeulandGeoPar : public FairParGenericSet
35{
36 public:
37 explicit R3BNeulandGeoPar(const char* name = "R3BNeulandGeoPar",
38 const char* title = "Neuland Geometry Parameters",
39 const char* context = "TestDefaultContext");
45
46 void clear() override;
47 void putParams(FairParamList* /*unused*/) override;
48 auto getParams(FairParamList* /*unused*/) -> bool override;
49 void printParams() override;
50
51 [[nodiscard]] auto GetNumberOfModules() const -> int { return fNeulandGeoNode->GetNdaughters(); }
52 [[nodiscard]] auto GetNeulandGeoNode() const -> TGeoNode* { return fNeulandGeoNode; }
53 void SetNeulandGeoNode(const TGeoNode* node);
54
55 [[nodiscard]] auto GetPaddleHalfLength() const -> double;
56 [[nodiscard]] auto ConvertToLocalCoordinates(const ROOT::Math::XYZVector& position,
57 int paddleID) const -> ROOT::Math::XYZVector;
58 [[nodiscard]] auto ConvertToGlobalCoordinates(const ROOT::Math::XYZVector& position,
59 int paddleID) const -> ROOT::Math::XYZVector;
60 [[nodiscard]] auto ConvertGlobalToPixel(const ROOT::Math::XYZVector& position) const -> ROOT::Math::XYZVector;
61
62 private:
63 std::map<int32_t, TGeoNode*> fPaddleGeoNodes;
64 TGeoNode* fNeulandGeoNode;
65 void BuildPaddleLookup();
66
67 ClassDefOverride(R3BNeulandGeoPar, 1)
68};
69
70#endif // R3BNEULANDGEOPAR_H
auto operator=(R3BNeulandGeoPar &&) -> R3BNeulandGeoPar &=delete
void clear() override
auto ConvertToGlobalCoordinates(const ROOT::Math::XYZVector &position, int paddleID) const -> ROOT::Math::XYZVector
R3BNeulandGeoPar(const R3BNeulandGeoPar &)
auto getParams(FairParamList *) -> bool override
~R3BNeulandGeoPar() override
void printParams() override
void putParams(FairParamList *) override
std::map< int32_t, TGeoNode * > fPaddleGeoNodes
R3BNeulandGeoPar(R3BNeulandGeoPar &&)=delete
auto operator=(const R3BNeulandGeoPar &) -> R3BNeulandGeoPar &
R3BNeulandGeoPar(const char *name="R3BNeulandGeoPar", const char *title="Neuland Geometry Parameters", const char *context="TestDefaultContext")
void SetNeulandGeoNode(const TGeoNode *node)
auto GetNeulandGeoNode() const -> TGeoNode *
auto GetPaddleHalfLength() const -> double
auto GetNumberOfModules() const -> int
TGeoNode * fNeulandGeoNode
auto ConvertToLocalCoordinates(const ROOT::Math::XYZVector &position, int paddleID) const -> ROOT::Math::XYZVector
auto ConvertGlobalToPixel(const ROOT::Math::XYZVector &position) const -> ROOT::Math::XYZVector
STL class.