CbmRoot
Loading...
Searching...
No Matches
CbmTrdGeoHandler.h
Go to the documentation of this file.
1/* Copyright (C) 2010-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Andrey Lebedev, David Emschermann, Florian Uhlig [committer] */
4
18#ifndef CBMTRDGEOHANDLER_H_
19#define CBMTRDGEOHANDLER_H_ 1
20
21#include <Rtypes.h> // for THashConsistencyHolder, ClassDef
22#include <RtypesCore.h> // for Int_t, Double_t, Bool_t, kFALSE, UInt_t
23#include <TObject.h> // for TObject
24#include <TString.h> // for TString
25
26#include <map> // for map
27
28class TGeoBBox;
29class TGeoHMatrix;
30class TGeoPhysicalNode;
31class TGeoVolume;
32
33class CbmTrdGeoHandler : public TObject {
34public:
39
44
45 void Init(Bool_t isSimulation = kFALSE);
46
50 Int_t GetModuleAddress();
51
55 Int_t GetModuleAddress(const TString& path);
56
57 // /**
58 // * \brief Return pad orientation of the current node in the TGeoManager.
59 // */
60 // Int_t GetModuleOrientation();
61
65 Int_t GetModuleOrientation(const TString& path);
66 // Path has to contain information down to module part,
67 // otherwise retrieved information can be wrong.
68 // Path examples:
69 // /cave_1/trd_v13x_0/layer01_1101/module1_10100101/gas_1
70 // /cave_1/trd_v13x_0/layer10_3210/module8_35411098/gas_1
71
72
76 std::map<Int_t, TGeoPhysicalNode*> FillModuleMap();
77
78 Double_t GetSizeX(const TString& path);
79 Double_t GetSizeY(const TString& path);
80 Double_t GetSizeZ(const TString& path);
81 Double_t GetX(const TString& path);
82 Double_t GetY(const TString& path);
83 Double_t GetZ(const TString& path);
84 Int_t GetModuleType(const TString& path);
88 Int_t GetRadiatorType(const TString& path);
89
90 // for backward compatibility
91 Int_t GetStation(const TString& path);
92 Int_t GetLayer(const TString& path);
93 Int_t GetModuleCopyNr(const TString& path);
94
95private:
96 void NavigateTo(const TString& path);
97
99
101 TGeoVolume* fCurrentVolume;
102 TGeoBBox* fVolumeShape;
103 Double_t fGlobal[3];
104 TGeoHMatrix* fGlobalMatrix;
105 Int_t fLayerId;
106 Int_t fModuleId;
109 Int_t fRotation;
110
111 // for backward compatibility
112 Int_t fStation;
113 Int_t fLayer;
115
118
119 ClassDef(CbmTrdGeoHandler, 5)
120};
121
122#endif //CBMTRDGEOHANDLER_H
Int_t fModuleCopy
LayerID within station, 1..4.
CbmTrdGeoHandler operator=(const CbmTrdGeoHandler &)
Double_t GetY(const TString &path)
CbmTrdGeoHandler(const CbmTrdGeoHandler &)
ModuleCopyID with module type.
void NavigateTo(const TString &path)
Int_t GetModuleCopyNr(const TString &path)
Int_t GetLayer(const TString &path)
Int_t GetModuleType(const TString &path)
Int_t GetRadiatorType(const TString &path)
Navigate to node and return the radiator type build in the geometry based on the naming convention.
void Init(Bool_t isSimulation=kFALSE)
TGeoVolume * fCurrentVolume
Int_t fStation
rotation angle 0,1,2,3
Int_t GetStation(const TString &path)
CbmTrdGeoHandler()
Constructor.
Double_t GetSizeX(const TString &path)
Double_t GetSizeZ(const TString &path)
Double_t GetSizeY(const TString &path)
Double_t GetZ(const TString &path)
Double_t GetX(const TString &path)
Int_t fLayer
StationTypeID, 1..3.
std::map< Int_t, TGeoPhysicalNode * > FillModuleMap()
Fill map with information of the gas volumes for each detector.
TGeoHMatrix * fGlobalMatrix
Global center of volume.
Int_t fRotation
radiator + chamber entrance window type
~CbmTrdGeoHandler()
Destructor.
Int_t GetModuleOrientation(const TString &path)
Return pad orientation of the current node in the TGeoManager.
Int_t GetModuleAddress()
Return module address calculated based on the current node in the TGeoManager.