CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 ( )

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 }
Log< level::Info, true > LogVerbatim

Member Function Documentation

void DDTotemAngular::execute ( DDCompactView cpv)
override

Definition at line 81 of file DDTotemAngular.cc.

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

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 
101  DDTranslation tran(roffset_ * cos(phi), roffset_ * sin(phi), zoffset_);
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 }
Log< level::Info, true > LogVerbatim
std::string idNameSpace_
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string &copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
constexpr NumType convertRadToDeg(NumType radians)
Definition: angle_units.h:21
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:17
std::string rotns_
int ii
Definition: cuy.py:589
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:57
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
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
std::string formatAsDegrees(double radianVal)
Definition: DDTypes.cc:68
std::string childName_
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
Definition: Phi.h:52
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.

References angle_units::operators::convertRadToDeg(), DDCurrentNamespace::ns(), and SpecificationBuilder_cfi::parent().

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 }
Log< level::Info, true > LogVerbatim
std::string idNameSpace_
constexpr NumType convertRadToDeg(NumType radians)
Definition: angle_units.h:21
std::string rotns_
static std::string & ns()
std::string childName_

Member Data Documentation

std::string DDTotemAngular::childName_
private

Definition at line 45 of file DDTotemAngular.cc.

std::string DDTotemAngular::idNameSpace_
private

Definition at line 44 of file DDTotemAngular.cc.

int DDTotemAngular::incrCopyNo_
private

Definition at line 41 of file DDTotemAngular.cc.

int DDTotemAngular::n_
private

Definition at line 39 of file DDTotemAngular.cc.

double DDTotemAngular::roffset_
private

Definition at line 38 of file DDTotemAngular.cc.

std::string DDTotemAngular::rotns_
private

Definition at line 43 of file DDTotemAngular.cc.

double DDTotemAngular::startAngle_
private

Definition at line 35 of file DDTotemAngular.cc.

int DDTotemAngular::startCopyNo_
private

Definition at line 40 of file DDTotemAngular.cc.

double DDTotemAngular::stepAngle_
private

Definition at line 36 of file DDTotemAngular.cc.

double DDTotemAngular::zoffset_
private

Definition at line 37 of file DDTotemAngular.cc.