-
Notifications
You must be signed in to change notification settings - Fork 4.2k
/
DDDividedGeometryObject.h
67 lines (46 loc) · 1.75 KB
/
DDDividedGeometryObject.h
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
57
58
59
60
61
62
63
64
65
66
67
#ifndef DETECTOR_DESCRIPTION_PARSER_DD_DIVIDED_GEOMETRY_OBJECT_H
#define DETECTOR_DESCRIPTION_PARSER_DD_DIVIDED_GEOMETRY_OBJECT_H
#include <string>
#include "DetectorDescription/Core/interface/DDRotationMatrix.h"
#include "DetectorDescription/Core/interface/DDTranslation.h"
#include "DetectorDescription/Core/interface/DDAxes.h"
#include "DetectorDescription/Core/interface/DDCompactView.h"
#include "DetectorDescription/Core/interface/DDDivision.h"
class DDCompactView;
enum DivisionType { DivNDIVandWIDTH, DivNDIV, DivWIDTH };
class DDLogicalPart;
class DDRotation;
class DDSolid;
class DDDividedGeometryObject
{
public:
DDDividedGeometryObject( const DDDivision& div, DDCompactView* cpv );
virtual ~DDDividedGeometryObject( void ) = default; // inline
virtual DDTranslation makeDDTranslation( int copyNo ) const;
virtual DDRotation makeDDRotation ( int copyNo ) const;
virtual DDLogicalPart makeDDLogicalPart( int copyNo ) const;
virtual const std::string& getType( void ) const;
virtual void setType( const std::string& type );
int volumeFirstCopyNo( void ) const;
virtual void execute( void );
static const double tolerance( void );
protected:
DDRotationMatrix* changeRotMatrix( double rotZ = 0. ) const;
int calculateNDiv( double motherDim, double width,
double offset ) const;
double calculateWidth( double motherDim, int nDiv,
double offset ) const;
virtual void checkParametersValidity( void );
void checkOffset( double maxPar );
void checkNDivAndWidth( double maxPar );
virtual double getMaxParameter( void ) const;
protected:
DDDivision div_;
std::string ftype_;
int compNDiv_;
double compWidth_;
DivisionType divisionType_;
int theVoluFirstCopyNo_;
DDCompactView* cpv_;
};
#endif