12#ifndef LITMATERIALGRID_H_
13#define LITMATERIALGRID_H_
27using std::stringstream;
75 int nofBinsX,
int nofBinsY)
157 for (
size_t i = 0; i < fvec::size(); i++) {
175 ss <<
"LitMaterialGrid:" <<
" Xmin=" <<
fXMin <<
" Xmax=" <<
fXMax <<
" Ymin=" <<
fYMin
181 ss <<
"\nGrid: stepX=" << stepX <<
" stepY=" << stepY <<
"\n";
182 for (
unsigned int i = 0; i < 11; i++) {
183 for (
unsigned int j = 0; j < 11; j++) {
184 if (i < 10 && j < 10) ss << right << setfill(
' ') << setw(10) <<
fMaterial[i * stepX][j * stepY] <<
" ";
185 if (j == 10 && i != 10)
186 ss << right << setfill(
' ') << setw(10) <<
fMaterial[i * stepX][
fNofBinsY - 1] <<
" ";
187 if (i == 10 && j != 10)
188 ss << right << setfill(
' ') << setw(10) <<
fMaterial[
fNofBinsX - 1][j * stepY] <<
" ";
189 if (i == 10 && j == 10)
Header files for SSE operations.
Class stores a grid of material thickness in silicon equivalent.
bool IsEmpty() const
Check if material was set.
vector< vector< fscal > > fMaterial
fscal GetMaterial(fscal x, fscal y) const
Return material thickness in silicon equivalent for (X, Y) position (scalar version).
void SetMaterial(const vector< vector< fscal > > &material, fscal xmin, fscal xmax, fscal ymin, fscal ymax, int nofBinsX, int nofBinsY)
Returns Z position of the grid.
string ToString() const
Return string representation of the class.
friend ostream & operator<<(ostream &strm, const LitMaterialGrid &grid)
Operator << for convenient output to ostream.
fvec GetMaterialValue(fvec x, fvec y) const
Return material thickness in silicon equivalent for (X, Y) position (SIMD version).
class lit::parallel::LitDetectorLayout _fvecalignment