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.

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

References LogDebug.

◆ ~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.

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 }

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

◆ 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.

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 }

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

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.

mps_fire.i
i
Definition: mps_fire.py:355
DDTrackerXYZPosAlgo::yvec
vector< double > yvec
Definition: DDTrackerXYZPosAlgo.cc:34
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
DDName
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:215
DDTrackerXYZPosAlgo::startCopyNo
int startCopyNo
Definition: DDTrackerXYZPosAlgo.cc:40
dqmdumpme.first
first
Definition: dqmdumpme.py:55
DDTrackerXYZPosAlgo::idNameSpace
string idNameSpace
Definition: DDTrackerXYZPosAlgo.cc:38
DDTranslation
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
DDTrackerXYZPosAlgo::xvec
vector< double > xvec
Definition: DDTrackerXYZPosAlgo.cc:33
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
createfilelist.int
int
Definition: createfilelist.py:10
DDTrackerXYZPosAlgo::zvec
vector< double > zvec
Definition: DDTrackerXYZPosAlgo.cc:35
DDTrackerXYZPosAlgo::incrCopyNo
int incrCopyNo
Definition: DDTrackerXYZPosAlgo.cc:41
DDTrackerXYZPosAlgo::rotMat
vector< string > rotMat
Definition: DDTrackerXYZPosAlgo.cc:36
DDCurrentNamespace::ns
static std::string & ns()
Definition: DDCurrentNamespace.cc:3
makeMuonMisalignmentScenario.rot
rot
Definition: makeMuonMisalignmentScenario.py:322
DDRotation
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:57
DDTrackerXYZPosAlgo::childName
string childName
Definition: DDTrackerXYZPosAlgo.cc:39
class-composition.child
child
Definition: class-composition.py:91
child
Definition: simpleInheritance.h:11
class-composition.parent
parent
Definition: class-composition.py:88
DDSplit
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
Definition: DDSplit.cc:3
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:66
DDRotation
ROOT::Math::Rotation3D DDRotation
Definition: DDEcalEndcapAlgo.cc:18