CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
DDTotemAngular Class Reference
Inheritance diagram for DDTotemAngular:

Public Member Functions

 DDTotemAngular ()
 
void execute (DDCompactView &cpv) override
 
void initialize (const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
 

Private Attributes

std::string childName_
 
std::string idNameSpace_
 
int incrCopyNo_
 
int n_
 
double roffset_
 
std::string rotns_
 
double startAngle_
 
int startCopyNo_
 
double stepAngle_
 
double zoffset_
 

Detailed Description

Definition at line 21 of file DDTotemAngular.cc.

Constructor & Destructor Documentation

◆ DDTotemAngular()

DDTotemAngular::DDTotemAngular ( )

Definition at line 48 of file DDTotemAngular.cc.

48  {
49 #ifdef EDM_ML_DEBUG
50  edm::LogVerbatim("ForwardGeom") << "DDTotemAngular: Creating an instance";
51 #endif
52 }

Member Function Documentation

◆ execute()

void DDTotemAngular::execute ( DDCompactView cpv)
override

Definition at line 81 of file DDTotemAngular.cc.

81  {
82  double phi = startAngle_;
83  int copyNo = startCopyNo_;
84 
85  for (int ii = 0; ii < n_; ii++) {
88  std::string rotstr("NULL");
89 
90  rotstr = "RT" + formatAsDegrees(phitmp);
91  rotation = DDRotation(DDName(rotstr, rotns_));
92  if (!rotation) {
93 #ifdef EDM_ML_DEBUG
94  edm::LogVerbatim("ForwardGeom") << "DDTotemAngular: Creating a new rotation " << DDName(rotstr, rotns_)
95  << "\t90, " << convertRadToDeg(phitmp + 90._deg) << ", 0, 0, 90, "
96  << convertRadToDeg(phitmp);
97 #endif
98  rotation = DDrot(DDName(rotstr, rotns_), 90._deg, 90._deg + phitmp, 0., 0., 90._deg, phitmp);
99  }
100 
102 
103  DDName parentName = parent().name();
104  cpv.position(DDName(childName_, idNameSpace_), parentName, copyNo, tran, rotation);
105 #ifdef EDM_ML_DEBUG
106  edm::LogVerbatim("ForwardGeom") << "DDTotemAngular: " << DDName(childName_, idNameSpace_) << " number " << copyNo
107  << " positioned in " << parentName << " at " << tran << " with " << rotstr << " "
108  << rotation;
109 #endif
110  phi += stepAngle_;
111  copyNo += incrCopyNo_;
112  }
113 }

References angle_units::operators::convertRadToDeg(), funct::cos(), DDrot(), formatAsDegrees(), cuy::ii, class-composition::parent, DDCompactView::position(), idealTransformation::rotation, funct::sin(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ initialize()

void DDTotemAngular::initialize ( const DDNumericArguments nArgs,
const DDVectorArguments vArgs,
const DDMapArguments mArgs,
const DDStringArguments sArgs,
const DDStringVectorArguments vsArgs 
)
override

Definition at line 54 of file DDTotemAngular.cc.

58  {
59  startAngle_ = nArgs["startAngle"];
60  stepAngle_ = nArgs["stepAngle"];
61  zoffset_ = nArgs["zoffset"];
62  roffset_ = nArgs["roffset"];
63  n_ = int(nArgs["n"]);
64  startCopyNo_ = int(nArgs["startCopyNo"]);
65  incrCopyNo_ = int(nArgs["incrCopyNo"]);
66 #ifdef EDM_ML_DEBUG
67  edm::LogVerbatim("ForwardGeom") << "DDTotemAngular: Parameters for positioning-- " << n_ << " copies in steps of "
69  << " \tZoffset " << zoffset_ << " \tRoffset " << roffset_
70  << "\tStart and inremental copy nos " << startCopyNo_ << ", " << incrCopyNo_;
71 #endif
72  rotns_ = sArgs["RotNameSpace"];
74  childName_ = sArgs["ChildName"];
75 #ifdef EDM_ML_DEBUG
76  edm::LogVerbatim("ForwardGeom") << "DDTotemAngular debug: Parent " << parent().name() << "\tChild " << childName_
77  << "\tNameSpace " << idNameSpace_ << "\tRotation Namespace " << rotns_;
78 #endif
79 }

References angle_units::operators::convertRadToDeg(), createfilelist::int, DDCurrentNamespace::ns(), and class-composition::parent.

Member Data Documentation

◆ childName_

std::string DDTotemAngular::childName_
private

Definition at line 45 of file DDTotemAngular.cc.

◆ idNameSpace_

std::string DDTotemAngular::idNameSpace_
private

Definition at line 44 of file DDTotemAngular.cc.

◆ incrCopyNo_

int DDTotemAngular::incrCopyNo_
private

Definition at line 41 of file DDTotemAngular.cc.

◆ n_

int DDTotemAngular::n_
private

Definition at line 39 of file DDTotemAngular.cc.

◆ roffset_

double DDTotemAngular::roffset_
private

Definition at line 38 of file DDTotemAngular.cc.

◆ rotns_

std::string DDTotemAngular::rotns_
private

Definition at line 43 of file DDTotemAngular.cc.

◆ startAngle_

double DDTotemAngular::startAngle_
private

Definition at line 35 of file DDTotemAngular.cc.

◆ startCopyNo_

int DDTotemAngular::startCopyNo_
private

Definition at line 40 of file DDTotemAngular.cc.

◆ stepAngle_

double DDTotemAngular::stepAngle_
private

Definition at line 36 of file DDTotemAngular.cc.

◆ zoffset_

double DDTotemAngular::zoffset_
private

Definition at line 37 of file DDTotemAngular.cc.

DDTotemAngular::zoffset_
double zoffset_
Definition: DDTotemAngular.cc:37
DDrot
DDRotation DDrot(const DDName &name, std::unique_ptr< DDRotationMatrix > rot)
Definition of a uniquely identifiable rotation matrix named by DDName name.
Definition: DDRotation.cc:67
DDName
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
angle_units::operators::convertRadToDeg
constexpr NumType convertRadToDeg(NumType radians)
Definition: angle_units.h:21
DDTotemAngular::idNameSpace_
std::string idNameSpace_
Definition: DDTotemAngular.cc:44
DDTotemAngular::startCopyNo_
int startCopyNo_
Definition: DDTotemAngular.cc:40
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
DDTranslation
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
formatAsDegrees
std::string formatAsDegrees(double radianVal)
Definition: DDTypes.cc:68
DDTotemAngular::rotns_
std::string rotns_
Definition: DDTotemAngular.cc:43
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DDTotemAngular::incrCopyNo_
int incrCopyNo_
Definition: DDTotemAngular.cc:41
DDTotemAngular::roffset_
double roffset_
Definition: DDTotemAngular.cc:38
idealTransformation.rotation
dictionary rotation
Definition: idealTransformation.py:1
DDTotemAngular::childName_
std::string childName_
Definition: DDTotemAngular.cc:45
DDTotemAngular::stepAngle_
double stepAngle_
Definition: DDTotemAngular.cc:36
createfilelist.int
int
Definition: createfilelist.py:10
Geom::Phi
Definition: Phi.h:52
DDAxes::phi
DDTotemAngular::startAngle_
double startAngle_
Definition: DDTotemAngular.cc:35
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
DDCurrentNamespace::ns
static std::string & ns()
Definition: DDCurrentNamespace.cc:3
DDRotation
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:57
DDTotemAngular::n_
int n_
Definition: DDTotemAngular.cc:39
class-composition.parent
parent
Definition: class-composition.py:88
cuy.ii
ii
Definition: cuy.py:590
DDCompactView::position
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string &copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
Definition: DDCompactView.cc:76
DDRotation
ROOT::Math::Rotation3D DDRotation
Definition: DDEcalEndcapAlgo.cc:18