CbmRoot
LitCudaDetectorGeometry.h
Go to the documentation of this file.
1 
10 #ifndef LITCUDADETECTORGEOMETRY_H_
11 #define LITCUDADETECTORGEOMETRY_H_
12 
13 //#include "LitCudaTypes.h"
14 #include "LitCudaField.cu"
15 #include "LitCudaMaterialInfo.h"
16 //#include "base/CbmLitEnums.h"
17 
18 #include <iostream>
19 
20 const unsigned char MAX_NOF_STATION_GROUPS = 6;
21 const unsigned char MAX_NOF_STATIONS = 4;
22 const unsigned char MAX_NOF_SUBSTATIONS = 2;
23 
25  float Z;
27  LitCudaFieldSlice fieldSlice;
28 
29  friend std::ostream& operator<<(std::ostream& strm,
30  const LitCudaSubstation& substation) {
31  strm << "LitCudaSubstation: "
32  << "Z=" << substation.Z << ", material=" << substation.material;
33  // strm << ", fieldSlice=" << substation.fieldSlice;
34  return strm;
35  }
36 };
37 
38 
41 
42  void AddSubstation(const LitCudaSubstation* substation) {
43  substations[nofSubstations++] = *substation;
44  }
45 
46  // unsigned char GetNofSubstations() const {
47  // return nofSubstations;
48  // }
49 
50  // Type of hits on the station
51  // LitHitType type;
52  unsigned char type;
53  // array with substations in the station
55  // number of substations
56  unsigned char nofSubstations;
57 
58  friend std::ostream& operator<<(std::ostream& strm,
59  const LitCudaStation& station) {
60  strm << "LitCudaStation: type" << station.type
61  << ", nofSubstations=" << station.nofSubstations << std::endl;
62  for (int i = 0; i < station.nofSubstations; i++) {
63  strm << " " << i << station.substations[i];
64  }
65  return strm;
66  }
67 };
68 
69 
71  float Z;
73  LitCudaFieldSlice fieldSliceFront;
74  LitCudaFieldSlice fieldSliceBack;
75 
76  friend std::ostream& operator<<(std::ostream& strm,
77  const LitCudaAbsorber& absorber) {
78  strm << "LitCudaAbsorber: Z" << absorber.Z
79  << ", 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) {
93  stations[nofStations++] = *station;
94  }
95 
96  // unsigned char GetNofStations() const {
97  // return nofStations;
98  // }
99 
100  // array with stations in the station group
102  // number of stations in the station group
103  unsigned char nofStations;
104  // absorber
106 
107  friend std::ostream& operator<<(std::ostream& strm,
108  const LitCudaStationGroup& stationGroup) {
109  strm << "LitCudaStationGroup: "
110  << "nofStations=" << stationGroup.nofStations << std::endl;
111  for (unsigned char i = 0; i < stationGroup.nofStations; i++) {
112  strm << " " << i << stationGroup.stations[i];
113  }
114  strm << " " << stationGroup.absorber;
115  return strm;
116  }
117 };
118 
119 
122 
123  void AddStationGroup(const LitCudaStationGroup& stationGroup) {
124  stationGroups[nofStationGroups++] = stationGroup;
125  }
126 
127  // unsigned char GetNofStationGroups() const {
128  // return nofStationGroups;
129  // }
130 
131  // unsigned char GetNofStations(unsigned char stationGroup) const {
132  // return stationGroups[stationGroup].GetNofStations();
133  // }
134  //
135  // unsigned char GetNofSubstations(unsigned char stationGroup, unsigned char station) const {
136  // return stationGroups[stationGroup].stations[station].GetNofSubstations();
137  // }
138  //
139  // const LitCudaStationGroup& GetStationGroup(unsigned char stationGroup) {
140  // return stationGroups[stationGroup];
141  // }
142  //
143  // const LitCudaStation& GetStation(unsigned char stationGroup, unsigned char station) {
144  // return stationGroups[stationGroup].stations[station];
145  // }
146  //
147  // const LitCudaSubstation& GetSubstation(unsigned char stationGroup, unsigned char station, unsigned char substation){
148  // return stationGroups[stationGroup].stations[station].substations[substation];
149  // }
150 
151  // array with station groups
153  //number of station groups
154  unsigned char nofStationGroups;
155 
156  friend std::ostream& operator<<(std::ostream& strm,
157  const LitCudaDetectorLayout& layout) {
158  strm << "LitCudaDetectorLayout: "
159  << "nofStationGroups=" << layout.nofStationGroups << std::endl;
160  for (unsigned char i = 0; i < layout.nofStationGroups; i++) {
161  strm << i << layout.stationGroups[i];
162  }
163  return strm;
164  }
165 };
166 
167 #endif
LitCudaStationGroup::nofStations
unsigned char nofStations
Definition: LitCudaDetectorGeometry.h:103
LitCudaSubstation::Z
float Z
Definition: LitCudaDetectorGeometry.h:25
LitCudaAbsorber
Definition: LitCudaDetectorGeometry.h:70
LitCudaStationGroup::stations
LitCudaStation stations[MAX_NOF_STATIONS]
Definition: LitCudaDetectorGeometry.h:101
LitCudaAbsorber::fieldSliceFront
LitCudaFieldSlice fieldSliceFront
Definition: LitCudaDetectorGeometry.h:73
LitCudaStationGroup::LitCudaStationGroup
LitCudaStationGroup()
Definition: LitCudaDetectorGeometry.h:88
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
LitCudaStationGroup::AddStation
void AddStation(const LitCudaStation *station)
Definition: LitCudaDetectorGeometry.h:92
LitCudaStationGroup::absorber
LitCudaAbsorber absorber
Definition: LitCudaDetectorGeometry.h:105
LitCudaStationGroup
Definition: LitCudaDetectorGeometry.h:87
LitCudaDetectorLayout::nofStationGroups
unsigned char nofStationGroups
Definition: LitCudaDetectorGeometry.h:154
LitCudaDetectorLayout::AddStationGroup
void AddStationGroup(const LitCudaStationGroup &stationGroup)
Definition: LitCudaDetectorGeometry.h:123
LitCudaSubstation::material
LitCudaMaterialInfo material
Definition: LitCudaDetectorGeometry.h:26
LitCudaStation::operator<<
friend std::ostream & operator<<(std::ostream &strm, const LitCudaStation &station)
Definition: LitCudaDetectorGeometry.h:58
LitCudaStation::LitCudaStation
LitCudaStation()
Definition: LitCudaDetectorGeometry.h:40
LitCudaStationGroup::operator<<
friend std::ostream & operator<<(std::ostream &strm, const LitCudaStationGroup &stationGroup)
Definition: LitCudaDetectorGeometry.h:107
LitCudaAbsorber::fieldSliceBack
LitCudaFieldSlice fieldSliceBack
Definition: LitCudaDetectorGeometry.h:74
LitCudaAbsorber::Z
float Z
Definition: LitCudaDetectorGeometry.h:71
LitCudaDetectorLayout::operator<<
friend std::ostream & operator<<(std::ostream &strm, const LitCudaDetectorLayout &layout)
Definition: LitCudaDetectorGeometry.h:156
LitCudaStation::substations
LitCudaSubstation substations[MAX_NOF_SUBSTATIONS]
Definition: LitCudaDetectorGeometry.h:54
LitCudaSubstation::fieldSlice
LitCudaFieldSlice fieldSlice
Definition: LitCudaDetectorGeometry.h:27
LitCudaStation::type
unsigned char type
Definition: LitCudaDetectorGeometry.h:52
LitCudaSubstation::operator<<
friend std::ostream & operator<<(std::ostream &strm, const LitCudaSubstation &substation)
Definition: LitCudaDetectorGeometry.h:29
LitCudaDetectorLayout::stationGroups
LitCudaStationGroup stationGroups[MAX_NOF_STATION_GROUPS]
Definition: LitCudaDetectorGeometry.h:152
MAX_NOF_STATION_GROUPS
const unsigned char MAX_NOF_STATION_GROUPS
Definition: LitCudaDetectorGeometry.h:20
LitCudaStation::AddSubstation
void AddSubstation(const LitCudaSubstation *substation)
Definition: LitCudaDetectorGeometry.h:42
LitCudaDetectorLayout::LitCudaDetectorLayout
LitCudaDetectorLayout()
Definition: LitCudaDetectorGeometry.h:121
LitCudaStation
Definition: LitCudaDetectorGeometry.h:39
LitCudaAbsorber::operator<<
friend std::ostream & operator<<(std::ostream &strm, const LitCudaAbsorber &absorber)
Definition: LitCudaDetectorGeometry.h:76
MAX_NOF_SUBSTATIONS
const unsigned char MAX_NOF_SUBSTATIONS
Definition: LitCudaDetectorGeometry.h:22
LitCudaMaterialInfo
Definition: LitCudaMaterialInfo.h:6
MAX_NOF_STATIONS
const unsigned char MAX_NOF_STATIONS
Definition: LitCudaDetectorGeometry.h:21
LitCudaAbsorber::material
LitCudaMaterialInfo material
Definition: LitCudaDetectorGeometry.h:72
LitCudaMaterialInfo.h
LitCudaSubstation
Definition: LitCudaDetectorGeometry.h:24
LitCudaStation::nofSubstations
unsigned char nofSubstations
Definition: LitCudaDetectorGeometry.h:56
LitCudaDetectorLayout
Definition: LitCudaDetectorGeometry.h:120