CMS 3D CMS Logo

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

Public Member Functions

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

Private Attributes

string childName
 
string idNameSpace
 
int incrCopyNo
 
vector< string > rotMat
 
int startCopyNo
 
vector< double > xvec
 
vector< double > yvec
 
vector< double > zvec
 

Detailed Description

Definition at line 18 of file DDTrackerXYZPosAlgo.cc.

Constructor & Destructor Documentation

◆ DDTrackerXYZPosAlgo()

DDTrackerXYZPosAlgo::DDTrackerXYZPosAlgo ( )

Definition at line 44 of file DDTrackerXYZPosAlgo.cc.

References LogDebug.

44  {
45  LogDebug("TrackerGeom") << "DDTrackerXYZPosAlgo info: Creating an instance";
46 }
#define LogDebug(id)

◆ ~DDTrackerXYZPosAlgo()

DDTrackerXYZPosAlgo::~DDTrackerXYZPosAlgo ( )
override

Definition at line 48 of file DDTrackerXYZPosAlgo.cc.

48 {}

Member Function Documentation

◆ execute()

void DDTrackerXYZPosAlgo::execute ( DDCompactView cpv)
override

Definition at line 74 of file DDTrackerXYZPosAlgo.cc.

References submitPVValidationJobs::child, filterCSVwithJSON::copy, DDSplit(), dqmdumpme::first, mps_fire::i, createfilelist::int, LogDebug, class-composition::parent, DDCompactView::position(), makeMuonMisalignmentScenario::rot, ALPAKA_ACCELERATOR_NAMESPACE::brokenline::rotMat, and edm::second().

74  {
75  int copy = startCopyNo;
76  DDName mother = parent().name();
78 
79  for (int i = 0; i < (int)(zvec.size()); i++) {
80  DDTranslation tran(xvec[i], yvec[i], zvec[i]);
81  string rotstr = DDSplit(rotMat[i]).first;
83  if (rotstr != "NULL") {
84  string rotns = DDSplit(rotMat[i]).second;
85  rot = DDRotation(DDName(rotstr, rotns));
86  }
87  cpv.position(child, mother, copy, tran, rot);
88  LogDebug("TrackerGeom") << "DDTrackerXYZPosAlgo test: " << child << " number " << copy << " positioned in "
89  << mother << " at " << tran << " with " << rot;
90  copy += incrCopyNo;
91  }
92 }
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string &copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:17
vector< string > rotMat
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:57
U second(std::pair< T, U > const &p)
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
#define LogDebug(id)

◆ initialize()

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

Definition at line 50 of file DDTrackerXYZPosAlgo.cc.

References mps_fire::i, createfilelist::int, LogDebug, DDCurrentNamespace::ns(), class-composition::parent, and ALPAKA_ACCELERATOR_NAMESPACE::brokenline::rotMat.

54  {
55  startCopyNo = int(nArgs["StartCopyNo"]);
56  incrCopyNo = int(nArgs["IncrCopyNo"]);
57  xvec = vArgs["XPositions"];
58  yvec = vArgs["YPositions"];
59  zvec = vArgs["ZPositions"];
60  rotMat = vsArgs["Rotations"];
61 
63  childName = sArgs["ChildName"];
64  DDName parentName = parent().name();
65  LogDebug("TrackerGeom") << "DDTrackerXYZPosAlgo debug: Parent " << parentName << "\tChild " << childName
66  << " NameSpace " << idNameSpace << "\tCopyNo (Start/Increment) " << startCopyNo << ", "
67  << incrCopyNo << "\tNumber " << xvec.size() << ", " << yvec.size() << ", " << zvec.size();
68  for (int i = 0; i < (int)(zvec.size()); i++) {
69  LogDebug("TrackerGeom") << "\t[" << i << "]\tX = " << xvec[i] << "\t[" << i << "]\tY = " << yvec[i] << "\t[" << i
70  << "]\tZ = " << zvec[i] << ", Rot.Matrix = " << rotMat[i];
71  }
72 }
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:17
static std::string & ns()
vector< string > rotMat
#define LogDebug(id)

Member Data Documentation

◆ childName

string DDTrackerXYZPosAlgo::childName
private

Definition at line 39 of file DDTrackerXYZPosAlgo.cc.

◆ idNameSpace

string DDTrackerXYZPosAlgo::idNameSpace
private

Definition at line 38 of file DDTrackerXYZPosAlgo.cc.

◆ incrCopyNo

int DDTrackerXYZPosAlgo::incrCopyNo
private

Definition at line 41 of file DDTrackerXYZPosAlgo.cc.

◆ rotMat

vector<string> DDTrackerXYZPosAlgo::rotMat
private

Definition at line 36 of file DDTrackerXYZPosAlgo.cc.

◆ startCopyNo

int DDTrackerXYZPosAlgo::startCopyNo
private

Definition at line 40 of file DDTrackerXYZPosAlgo.cc.

◆ xvec

vector<double> DDTrackerXYZPosAlgo::xvec
private

Definition at line 33 of file DDTrackerXYZPosAlgo.cc.

◆ yvec

vector<double> DDTrackerXYZPosAlgo::yvec
private

Definition at line 34 of file DDTrackerXYZPosAlgo.cc.

◆ zvec

vector<double> DDTrackerXYZPosAlgo::zvec
private

Definition at line 35 of file DDTrackerXYZPosAlgo.cc.