File: BoxStruct.h

package info (click to toggle)
vecgeom 1.2.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 23,928 kB
  • sloc: cpp: 88,717; ansic: 6,894; python: 1,035; sh: 582; sql: 538; makefile: 29
file content (31 lines) | stat: -rw-r--r-- 682 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
 * BoxStruct.h
 *
 *  Created on: 09.10.2015
 *      Author: swenzel
 */

#ifndef VECGEOM_VOLUMES_BOXSTRUCT_H_
#define VECGEOM_VOLUMES_BOXSTRUCT_H_
#include "VecGeom/base/Global.h"

namespace vecgeom {

inline namespace VECGEOM_IMPL_NAMESPACE {

// we do something crazy : a plain struct without member functions to encapsulate just the parameters
// of a box
template <typename T = double>
struct BoxStruct {
  Vector3D<T> fDimensions; //<the HALF lengths of the box

  VECCORE_ATT_HOST_DEVICE
  BoxStruct(Vector3D<T> const &dim) : fDimensions(dim) {}

  VECCORE_ATT_HOST_DEVICE
  BoxStruct(const T dx, const T dy, const T dz) : fDimensions(dx, dy, dz) {}
};
}
} // end

#endif