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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
#ifndef Geom_BoundDisk_H
#define Geom_BoundDisk_H
#include "DataFormats/GeometrySurface/interface/Plane.h"
#include "DataFormats/GeometrySurface/interface/SimpleDiskBounds.h"
/** \class BoundDisk
*
* A BoundDisk is a special BoundPlane that is additionally limited by an
* inner and outer radius.
*
* \warning Surfaces are reference counted, so only ReferenceCountingPointer
* should be used to point to them. For this reason, they should be
* using the static build() method.
* (The normal constructor will become private in the future).
*
*/
class Disk final : public Plane {
public:
/*
template<typename... Args>
Disk(Args&& ... args) :
Plane(std::forward<Args>(args)...){}
*/
Disk(const PositionType& pos, const RotationType& rot, SimpleDiskBounds* bounds) : Plane(pos, rot, bounds) {}
Disk(const PositionType& pos, const RotationType& rot, SimpleDiskBounds const& bounds)
: Plane(pos, rot, bounds.clone()) {}
typedef ReferenceCountingPointer<Disk> DiskPointer;
typedef ConstReferenceCountingPointer<Disk> ConstDiskPointer;
typedef ReferenceCountingPointer<Disk> BoundDiskPointer;
typedef ConstReferenceCountingPointer<Disk> ConstBoundDiskPointer;
template <typename... Args>
static DiskPointer build(Args&&... args) {
return DiskPointer(new Disk(std::forward<Args>(args)...));
}
~Disk() override {}
// -- DEPRECATED CONSTRUCTORS
// -- Extension of the Surface interface for disk
/// The inner radius of the disk
float innerRadius() const { return static_cast<const SimpleDiskBounds&>(bounds()).innerRadius(); }
/// The outer radius of the disk
float outerRadius() const { return static_cast<const SimpleDiskBounds&>(bounds()).outerRadius(); }
};
using BoundDisk = Disk;
#endif // Geom_BoundDisk_H
|