Belle II Software development
ECLCellIdMapping Class Reference

Class to store mapping between cell id and store array positions. More...

#include <ECLCellIdMapping.h>

Inheritance diagram for ECLCellIdMapping:

Public Member Functions

 ECLCellIdMapping ()
 Default constructor.
 
void setCellIdToStoreArray (const int &cellid, const int &idx)
 Set celld id to store array.
 
void setCellIdToNeighbour5 (const int &cellid, const std::vector< short int > &neighbours)
 Set celld id to neighbour5.
 
void setCellIdToNeighbour7 (const int &cellid, const std::vector< short int > &neighbours)
 Set celld id to neighbour7.
 
void setCellIdToNeighbour9 (const int &cellid, const std::vector< short int > &neighbours)
 Set celld id to neighbour9.
 
void setCellIdToNeighbour11 (const int &cellid, const std::vector< short int > &neighbours)
 Set celld id to neighbour11.
 
void setCellIdToPhi (const int &cellid, const double &phi)
 Set celld id to phi.
 
void setCellIdToTheta (const int &cellid, const double &theta)
 Set celld id to theta.
 
void setCellIdToPhiId (const int &cellid, const int &phiid)
 Set celld id to phi.
 
void setCellIdToThetaId (const int &cellid, const int &thetaid)
 Set celld id to theta.
 
void reset ()
 Reset store array.
 
int getCellIdToStoreArray (const int &cellid)
 Get store array from cell id.
 
std::vector< short int > & getCellIdToNeighbour5 (const int &cellid)
 Get store array from cell id.
 
std::vector< short int > & getCellIdToNeighbour7 (const int &cellid)
 Get store array from cell id.
 
std::vector< short int > & getCellIdToNeighbour9 (const int &cellid)
 Get store array from cell id.
 
std::vector< short int > & getCellIdToNeighbour11 (const int &cellid)
 Get store array from cell id.
 
double getCellIdToPhi (const int &cellid)
 Get phi from cell id.
 
double getCellIdToTheta (const int &cellid)
 Get theta from cell id.
 
int getCellIdToPhiId (const int &cellid)
 Get phi from cell id.
 
int getCellIdToThetaId (const int &cellid)
 Get theta from cell id.
 

Private Member Functions

 ClassDef (ECLCellIdMapping, 1)
 ClassDef.
 

Private Attributes

std::vector< int > m_CellIdToStoreArrPosition
 vector (ECLElementNumbers::c_NCrystals + 1 entries) with cell id to store array positions
 
std::vector< double > m_CellIdToPhi
 vector (ECLElementNumbers::c_NCrystals + 1 entries) with cell id to phi values

 
std::vector< double > m_CellIdToTheta
 vector (ECLElementNumbers::c_NCrystals + 1 entries) with cell id to phi values

 
std::vector< int > m_CellIdToPhiId
 vector (ECLElementNumbers::c_NCrystals + 1 entries) with cell id to phi values

 
std::vector< int > m_CellIdToThetaId
 vector (ECLElementNumbers::c_NCrystals + 1 entries) with cell id to phi values

 
std::vector< std::vector< short int > > m_CellIdToNeighbours5
 vector (ECLElementNumbers::c_NCrystals + 1 entries) with cell id to 5x5 neighbour vector
 
std::vector< std::vector< short int > > m_CellIdToNeighbours7
 vector (ECLElementNumbers::c_NCrystals + 1 entries) with cell id to 7x7 neighbour vector
 
std::vector< std::vector< short int > > m_CellIdToNeighbours9
 vector (ECLElementNumbers::c_NCrystals + 1 entries) with cell id to 9x9 neighbour vector
 
std::vector< std::vector< short int > > m_CellIdToNeighbours11
 vector (ECLElementNumbers::c_NCrystals + 1 entries) with cell id to 11x11 neighbour vector
 

Detailed Description

Class to store mapping between cell id and store array positions.

Definition at line 28 of file ECLCellIdMapping.h.

Constructor & Destructor Documentation

◆ ECLCellIdMapping()

ECLCellIdMapping ( )
inline

Default constructor.

Definition at line 34 of file ECLCellIdMapping.h.

34 :
44 {
45 for (unsigned idx = 0; idx < ECLElementNumbers::c_NCrystals + 1; idx++) {
47 }
48 }
std::vector< double > m_CellIdToTheta
vector (ECLElementNumbers::c_NCrystals + 1 entries) with cell id to phi values
std::vector< int > m_CellIdToThetaId
vector (ECLElementNumbers::c_NCrystals + 1 entries) with cell id to phi values
std::vector< int > m_CellIdToStoreArrPosition
vector (ECLElementNumbers::c_NCrystals + 1 entries) with cell id to store array positions
std::vector< std::vector< short int > > m_CellIdToNeighbours5
vector (ECLElementNumbers::c_NCrystals + 1 entries) with cell id to 5x5 neighbour vector
std::vector< double > m_CellIdToPhi
vector (ECLElementNumbers::c_NCrystals + 1 entries) with cell id to phi values
std::vector< int > m_CellIdToPhiId
vector (ECLElementNumbers::c_NCrystals + 1 entries) with cell id to phi values
std::vector< std::vector< short int > > m_CellIdToNeighbours9
vector (ECLElementNumbers::c_NCrystals + 1 entries) with cell id to 9x9 neighbour vector
std::vector< std::vector< short int > > m_CellIdToNeighbours7
vector (ECLElementNumbers::c_NCrystals + 1 entries) with cell id to 7x7 neighbour vector
std::vector< std::vector< short int > > m_CellIdToNeighbours11
vector (ECLElementNumbers::c_NCrystals + 1 entries) with cell id to 11x11 neighbour vector
const int c_NCrystals
Number of crystals.

Member Function Documentation

◆ getCellIdToNeighbour11()

std::vector< short int > & getCellIdToNeighbour11 ( const int &  cellid)
inline

Get store array from cell id.

Definition at line 188 of file ECLCellIdMapping.h.

189 {
190 if (cellid > 0 and cellid < ECLElementNumbers::c_NCrystals + 1) {
191 return m_CellIdToNeighbours11[cellid];
192 } else {
193 B2FATAL("Cell Id " << cellid << " does not exist.");
194 }
195 }

◆ getCellIdToNeighbour5()

std::vector< short int > & getCellIdToNeighbour5 ( const int &  cellid)
inline

Get store array from cell id.

Definition at line 158 of file ECLCellIdMapping.h.

159 {
160 if (cellid > 0 and cellid < ECLElementNumbers::c_NCrystals + 1) {
161 return m_CellIdToNeighbours5[cellid];
162 } else {
163 B2FATAL("Cell Id " << cellid << " does not exist.");
164 }
165 }

◆ getCellIdToNeighbour7()

std::vector< short int > & getCellIdToNeighbour7 ( const int &  cellid)
inline

Get store array from cell id.

Definition at line 168 of file ECLCellIdMapping.h.

169 {
170 if (cellid > 0 and cellid < ECLElementNumbers::c_NCrystals + 1) {
171 return m_CellIdToNeighbours7[cellid];
172 } else {
173 B2FATAL("Cell Id " << cellid << " does not exist.");
174 }
175 }

◆ getCellIdToNeighbour9()

std::vector< short int > & getCellIdToNeighbour9 ( const int &  cellid)
inline

Get store array from cell id.

Definition at line 178 of file ECLCellIdMapping.h.

179 {
180 if (cellid > 0 and cellid < ECLElementNumbers::c_NCrystals + 1) {
181 return m_CellIdToNeighbours9[cellid];
182 } else {
183 B2FATAL("Cell Id " << cellid << " does not exist.");
184 }
185 }

◆ getCellIdToPhi()

double getCellIdToPhi ( const int &  cellid)
inline

Get phi from cell id.

Definition at line 198 of file ECLCellIdMapping.h.

199 {
200 if (cellid > 0 and cellid < ECLElementNumbers::c_NCrystals + 1) {
201 return m_CellIdToPhi[cellid];
202 } else {
203 B2FATAL("Cell Id " << cellid << " does not exist.");
204 return -1;
205 }
206 }

◆ getCellIdToPhiId()

int getCellIdToPhiId ( const int &  cellid)
inline

Get phi from cell id.

Definition at line 221 of file ECLCellIdMapping.h.

222 {
223 if (cellid > 0 and cellid < ECLElementNumbers::c_NCrystals + 1) {
224 return m_CellIdToPhiId[cellid];
225 } else {
226 B2FATAL("Cell Id " << cellid << " does not exist.");
227 return -1;
228 }
229 }

◆ getCellIdToStoreArray()

int getCellIdToStoreArray ( const int &  cellid)
inline

Get store array from cell id.

Definition at line 147 of file ECLCellIdMapping.h.

148 {
149 if (cellid > 0 and cellid < ECLElementNumbers::c_NCrystals + 1) {
150 return m_CellIdToStoreArrPosition[cellid];
151 } else {
152 B2FATAL("Cell Id " << cellid << " does not exist.");
153 return -1;
154 }
155 }

◆ getCellIdToTheta()

double getCellIdToTheta ( const int &  cellid)
inline

Get theta from cell id.

Definition at line 209 of file ECLCellIdMapping.h.

210 {
211 if (cellid > 0 and cellid < ECLElementNumbers::c_NCrystals + 1) {
212 return m_CellIdToTheta[cellid];
213 } else {
214 B2FATAL("Cell Id " << cellid << " does not exist.");
215 return -1;
216 }
217 }

◆ getCellIdToThetaId()

int getCellIdToThetaId ( const int &  cellid)
inline

Get theta from cell id.

Definition at line 232 of file ECLCellIdMapping.h.

233 {
234 if (cellid > 0 and cellid < ECLElementNumbers::c_NCrystals + 1) {
235 return m_CellIdToThetaId[cellid];
236 } else {
237 B2FATAL("Cell Id " << cellid << " does not exist.");
238 return -1;
239 }
240 }

◆ reset()

void reset ( )
inline

Reset store array.

Definition at line 141 of file ECLCellIdMapping.h.

142 {
144 }

◆ setCellIdToNeighbour11()

void setCellIdToNeighbour11 ( const int &  cellid,
const std::vector< short int > &  neighbours 
)
inline

Set celld id to neighbour11.

Definition at line 91 of file ECLCellIdMapping.h.

92 {
93 if (cellid > 0 and cellid < ECLElementNumbers::c_NCrystals + 1) {
94 m_CellIdToNeighbours11[cellid] = neighbours;
95 } else {
96 B2ERROR("Cell Id " << cellid << " does not exist.");
97 }
98 }

◆ setCellIdToNeighbour5()

void setCellIdToNeighbour5 ( const int &  cellid,
const std::vector< short int > &  neighbours 
)
inline

Set celld id to neighbour5.

Definition at line 61 of file ECLCellIdMapping.h.

62 {
63 if (cellid > 0 and cellid < ECLElementNumbers::c_NCrystals + 1) {
64 m_CellIdToNeighbours5[cellid] = neighbours;
65 } else {
66 B2ERROR("Cell Id " << cellid << " does not exist.");
67 }
68 }

◆ setCellIdToNeighbour7()

void setCellIdToNeighbour7 ( const int &  cellid,
const std::vector< short int > &  neighbours 
)
inline

Set celld id to neighbour7.

Definition at line 71 of file ECLCellIdMapping.h.

72 {
73 if (cellid > 0 and cellid < ECLElementNumbers::c_NCrystals + 1) {
74 m_CellIdToNeighbours7[cellid] = neighbours;
75 } else {
76 B2ERROR("Cell Id " << cellid << " does not exist.");
77 }
78 }

◆ setCellIdToNeighbour9()

void setCellIdToNeighbour9 ( const int &  cellid,
const std::vector< short int > &  neighbours 
)
inline

Set celld id to neighbour9.

Definition at line 81 of file ECLCellIdMapping.h.

82 {
83 if (cellid > 0 and cellid < ECLElementNumbers::c_NCrystals + 1) {
84 m_CellIdToNeighbours9[cellid] = neighbours;
85 } else {
86 B2ERROR("Cell Id " << cellid << " does not exist.");
87 }
88 }

◆ setCellIdToPhi()

void setCellIdToPhi ( const int &  cellid,
const double &  phi 
)
inline

Set celld id to phi.

Definition at line 101 of file ECLCellIdMapping.h.

102 {
103 if (cellid > 0 and cellid < ECLElementNumbers::c_NCrystals + 1) {
104 m_CellIdToPhi[cellid] = phi;
105 } else {
106 B2ERROR("Cell Id " << cellid << " does not exist.");
107 }
108 }

◆ setCellIdToPhiId()

void setCellIdToPhiId ( const int &  cellid,
const int &  phiid 
)
inline

Set celld id to phi.

Definition at line 121 of file ECLCellIdMapping.h.

122 {
123 if (cellid > 0 and cellid < ECLElementNumbers::c_NCrystals + 1) {
124 m_CellIdToPhiId[cellid] = phiid;
125 } else {
126 B2ERROR("Cell Id " << cellid << " does not exist.");
127 }
128 }

◆ setCellIdToStoreArray()

void setCellIdToStoreArray ( const int &  cellid,
const int &  idx 
)
inline

Set celld id to store array.

Definition at line 51 of file ECLCellIdMapping.h.

52 {
53 if (cellid > 0 and cellid < ECLElementNumbers::c_NCrystals + 1) {
54 m_CellIdToStoreArrPosition[cellid] = idx;
55 } else {
56 B2ERROR("Cell Id " << cellid << " does not exist.");
57 }
58 }

◆ setCellIdToTheta()

void setCellIdToTheta ( const int &  cellid,
const double &  theta 
)
inline

Set celld id to theta.

Definition at line 111 of file ECLCellIdMapping.h.

112 {
113 if (cellid > 0 and cellid < ECLElementNumbers::c_NCrystals + 1) {
114 m_CellIdToTheta[cellid] = theta;
115 } else {
116 B2ERROR("Cell Id " << cellid << " does not exist.");
117 }
118 }

◆ setCellIdToThetaId()

void setCellIdToThetaId ( const int &  cellid,
const int &  thetaid 
)
inline

Set celld id to theta.

Definition at line 131 of file ECLCellIdMapping.h.

132 {
133 if (cellid > 0 and cellid < ECLElementNumbers::c_NCrystals + 1) {
134 m_CellIdToThetaId[cellid] = thetaid;
135 } else {
136 B2ERROR("Cell Id " << cellid << " does not exist.");
137 }
138 }

Member Data Documentation

◆ m_CellIdToNeighbours11

std::vector<std::vector<short int> > m_CellIdToNeighbours11
private

vector (ECLElementNumbers::c_NCrystals + 1 entries) with cell id to 11x11 neighbour vector

Definition at line 270 of file ECLCellIdMapping.h.

◆ m_CellIdToNeighbours5

std::vector<std::vector<short int> > m_CellIdToNeighbours5
private

vector (ECLElementNumbers::c_NCrystals + 1 entries) with cell id to 5x5 neighbour vector

Definition at line 261 of file ECLCellIdMapping.h.

◆ m_CellIdToNeighbours7

std::vector<std::vector<short int> > m_CellIdToNeighbours7
private

vector (ECLElementNumbers::c_NCrystals + 1 entries) with cell id to 7x7 neighbour vector

Definition at line 264 of file ECLCellIdMapping.h.

◆ m_CellIdToNeighbours9

std::vector<std::vector<short int> > m_CellIdToNeighbours9
private

vector (ECLElementNumbers::c_NCrystals + 1 entries) with cell id to 9x9 neighbour vector

Definition at line 267 of file ECLCellIdMapping.h.

◆ m_CellIdToPhi

std::vector<double> m_CellIdToPhi
private

vector (ECLElementNumbers::c_NCrystals + 1 entries) with cell id to phi values

Definition at line 249 of file ECLCellIdMapping.h.

◆ m_CellIdToPhiId

std::vector<int> m_CellIdToPhiId
private

vector (ECLElementNumbers::c_NCrystals + 1 entries) with cell id to phi values

Definition at line 255 of file ECLCellIdMapping.h.

◆ m_CellIdToStoreArrPosition

std::vector<int> m_CellIdToStoreArrPosition
private

vector (ECLElementNumbers::c_NCrystals + 1 entries) with cell id to store array positions

Definition at line 246 of file ECLCellIdMapping.h.

◆ m_CellIdToTheta

std::vector<double> m_CellIdToTheta
private

vector (ECLElementNumbers::c_NCrystals + 1 entries) with cell id to phi values

Definition at line 252 of file ECLCellIdMapping.h.

◆ m_CellIdToThetaId

std::vector<int> m_CellIdToThetaId
private

vector (ECLElementNumbers::c_NCrystals + 1 entries) with cell id to phi values

Definition at line 258 of file ECLCellIdMapping.h.


The documentation for this class was generated from the following file: