CbmRoot
Loading...
Searching...
No Matches
LitCudaDetectorGeometry.h
Go to the documentation of this file.
1/* Copyright (C) 2009-2011 GSI/JINR-LIT, Darmstadt/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Andrey Lebedev [committer] */
4
14#ifndef LITCUDADETECTORGEOMETRY_H_
15#define LITCUDADETECTORGEOMETRY_H_
16
17//#include "LitCudaTypes.h"
18#include "LitCudaField.cu"
19#include "LitCudaMaterialInfo.h"
20//#include "base/CbmLitEnums.h"
21
22#include <iostream>
23
24const unsigned char MAX_NOF_STATION_GROUPS = 6;
25const unsigned char MAX_NOF_STATIONS = 4;
26const unsigned char MAX_NOF_SUBSTATIONS = 2;
27
29 float Z;
31 LitCudaFieldSlice fieldSlice;
32
33 friend std::ostream& operator<<(std::ostream& strm, const LitCudaSubstation& substation)
34 {
35 strm << "LitCudaSubstation: "
36 << "Z=" << substation.Z << ", material=" << substation.material;
37 // strm << ", fieldSlice=" << substation.fieldSlice;
38 return strm;
39 }
40};
41
42
45
46 void AddSubstation(const LitCudaSubstation* substation) { substations[nofSubstations++] = *substation; }
47
48 // unsigned char GetNofSubstations() const {
49 // return nofSubstations;
50 // }
51
52 // Type of hits on the station
53 // LitHitType type;
54 unsigned char type;
55 // array with substations in the station
57 // number of substations
58 unsigned char nofSubstations;
59
60 friend std::ostream& operator<<(std::ostream& strm, const LitCudaStation& station)
61 {
62 strm << "LitCudaStation: type" << station.type << ", nofSubstations=" << station.nofSubstations << std::endl;
63 for (int i = 0; i < station.nofSubstations; i++) {
64 strm << " " << i << station.substations[i];
65 }
66 return strm;
67 }
68};
69
70
72 float Z;
74 LitCudaFieldSlice fieldSliceFront;
75 LitCudaFieldSlice fieldSliceBack;
76
77 friend std::ostream& operator<<(std::ostream& strm, const LitCudaAbsorber& absorber)
78 {
79 strm << "LitCudaAbsorber: Z" << absorber.Z << ", material=" << absorber.material;
80 // strm << "fieldSliceFront=" << absorber.fieldSliceFront
81 // << " fieladSliceBack=" << absorber.fieldSliceBack;
82 return strm;
83 }
84};
85
86
89
90 // virtual ~LitCudaStationGroup() {}
91
92 void AddStation(const LitCudaStation* station) { stations[nofStations++] = *station; }
93
94 // unsigned char GetNofStations() const {
95 // return nofStations;
96 // }
97
98 // array with stations in the station group
100 // number of stations in the station group
101 unsigned char nofStations;
102 // absorber
104
105 friend std::ostream& operator<<(std::ostream& strm, const LitCudaStationGroup& stationGroup)
106 {
107 strm << "LitCudaStationGroup: "
108 << "nofStations=" << stationGroup.nofStations << std::endl;
109 for (unsigned char i = 0; i < stationGroup.nofStations; i++) {
110 strm << " " << i << stationGroup.stations[i];
111 }
112 strm << " " << stationGroup.absorber;
113 return strm;
114 }
115};
116
117
120
121 void AddStationGroup(const LitCudaStationGroup& stationGroup) { stationGroups[nofStationGroups++] = stationGroup; }
122
123 // unsigned char GetNofStationGroups() const {
124 // return nofStationGroups;
125 // }
126
127 // unsigned char GetNofStations(unsigned char stationGroup) const {
128 // return stationGroups[stationGroup].GetNofStations();
129 // }
130 //
131 // unsigned char GetNofSubstations(unsigned char stationGroup, unsigned char station) const {
132 // return stationGroups[stationGroup].stations[station].GetNofSubstations();
133 // }
134 //
135 // const LitCudaStationGroup& GetStationGroup(unsigned char stationGroup) {
136 // return stationGroups[stationGroup];
137 // }
138 //
139 // const LitCudaStation& GetStation(unsigned char stationGroup, unsigned char station) {
140 // return stationGroups[stationGroup].stations[station];
141 // }
142 //
143 // const LitCudaSubstation& GetSubstation(unsigned char stationGroup, unsigned char station, unsigned char substation){
144 // return stationGroups[stationGroup].stations[station].substations[substation];
145 // }
146
147 // array with station groups
149 //number of station groups
150 unsigned char nofStationGroups;
151
152 friend std::ostream& operator<<(std::ostream& strm, const LitCudaDetectorLayout& layout)
153 {
154 strm << "LitCudaDetectorLayout: "
155 << "nofStationGroups=" << layout.nofStationGroups << std::endl;
156 for (unsigned char i = 0; i < layout.nofStationGroups; i++) {
157 strm << i << layout.stationGroups[i];
158 }
159 return strm;
160 }
161};
162
163#endif
const unsigned char MAX_NOF_SUBSTATIONS
const unsigned char MAX_NOF_STATION_GROUPS
const unsigned char MAX_NOF_STATIONS
friend std::ostream & operator<<(std::ostream &strm, const LitCudaAbsorber &absorber)
LitCudaFieldSlice fieldSliceBack
LitCudaFieldSlice fieldSliceFront
LitCudaMaterialInfo material
LitCudaStationGroup stationGroups[MAX_NOF_STATION_GROUPS]
void AddStationGroup(const LitCudaStationGroup &stationGroup)
friend std::ostream & operator<<(std::ostream &strm, const LitCudaDetectorLayout &layout)
friend std::ostream & operator<<(std::ostream &strm, const LitCudaStationGroup &stationGroup)
void AddStation(const LitCudaStation *station)
LitCudaStation stations[MAX_NOF_STATIONS]
friend std::ostream & operator<<(std::ostream &strm, const LitCudaStation &station)
LitCudaSubstation substations[MAX_NOF_SUBSTATIONS]
unsigned char nofSubstations
void AddSubstation(const LitCudaSubstation *substation)
friend std::ostream & operator<<(std::ostream &strm, const LitCudaSubstation &substation)
LitCudaMaterialInfo material
LitCudaFieldSlice fieldSlice