CMS 3D CMS Logo

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

Public Member Functions

 DDRPDPosition ()
 
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::vector< double > xpos_
 
double ypos_
 
double zpos_
 

Detailed Description

Definition at line 24 of file DDRPDPosition.cc.

Constructor & Destructor Documentation

◆ DDRPDPosition()

DDRPDPosition::DDRPDPosition ( )

Definition at line 44 of file DDRPDPosition.cc.

44 { edm::LogVerbatim("ForwardGeom") << "DDRPDPosition test: Creating an instance"; }
Log< level::Info, true > LogVerbatim

Member Function Documentation

◆ execute()

void DDRPDPosition::execute ( DDCompactView cpv)
override

Definition at line 66 of file DDRPDPosition.cc.

References submitPVValidationJobs::child, childName_, DDSplit(), dqmdumpme::first, findQualityFiles::jj, class-composition::parent, DDCompactView::position(), makeMuonMisalignmentScenario::rot, edm::second(), xpos_, ypos_, and zpos_.

66  {
68  DDName parentName = parent().name();
70 
71  for (unsigned int jj = 0; jj < xpos_.size(); jj++) {
72  DDTranslation tran(xpos_[jj], ypos_, zpos_);
73 
74  cpv.position(child, parentName, jj + 1, tran, rot);
75 #ifdef EDM_ML_DEBUG
76  edm::LogVerbatim("ForwardGeom") << "DDRPDPosition: " << child << " number " << jj + 1 << " positioned in "
77  << parentName << " at " << tran << " with no rotation";
78 #endif
79  }
80 }
Log< level::Info, true > LogVerbatim
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string &copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
std::vector< double > xpos_
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:17
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:57
U second(std::pair< T, U > const &p)
std::string childName_
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = &#39;:&#39;
Definition: DDSplit.cc:3
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7

◆ initialize()

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

Definition at line 46 of file DDRPDPosition.cc.

References childName_, class-composition::parent, x, xpos_, ypos_, and zpos_.

50  {
51  xpos_ = vArgs["positionX"];
52  ypos_ = nArgs["positionY"];
53  zpos_ = nArgs["positionZ"];
54  childName_ = sArgs["ChildName"];
55 #ifdef EDM_ML_DEBUG
56  edm::LogVerbatim("ForwardGeom") << "DDRPDPosition: Parameters for positioning-- " << xpos_.size() << " copies of "
57  << childName_ << " to be positioned inside " << parent().name() << " at y = " << ypos_
58  << ", z = " << zpos_ << " and at x = (";
59  std::ostringstream st1;
60  for (const auto& x : xpos_)
61  st1 << x << " ";
62  edm::LogVerbatim("ForwardGeom") << st1.str() << ")";
63 #endif
64 }
Log< level::Info, true > LogVerbatim
std::vector< double > xpos_
std::string childName_

Member Data Documentation

◆ childName_

std::string DDRPDPosition::childName_
private

Definition at line 41 of file DDRPDPosition.cc.

Referenced by execute(), and initialize().

◆ xpos_

std::vector<double> DDRPDPosition::xpos_
private

Definition at line 38 of file DDRPDPosition.cc.

Referenced by execute(), and initialize().

◆ ypos_

double DDRPDPosition::ypos_
private

Definition at line 39 of file DDRPDPosition.cc.

Referenced by execute(), and initialize().

◆ zpos_

double DDRPDPosition::zpos_
private

Definition at line 40 of file DDRPDPosition.cc.

Referenced by execute(), and initialize().