CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
DDTrackerXYZPosAlgo Class Reference

#include <DDTrackerXYZPosAlgo.h>

Inheritance diagram for DDTrackerXYZPosAlgo:

Public Member Functions

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

Private Attributes

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

Detailed Description

Definition at line 10 of file DDTrackerXYZPosAlgo.h.

Constructor & Destructor Documentation

DDTrackerXYZPosAlgo::DDTrackerXYZPosAlgo ( )

Definition at line 17 of file DDTrackerXYZPosAlgo.cc.

References LogDebug.

17  {
18  LogDebug("TrackerGeom") <<"DDTrackerXYZPosAlgo info: Creating an instance";
19 }
#define LogDebug(id)
DDTrackerXYZPosAlgo::~DDTrackerXYZPosAlgo ( )
virtual

Definition at line 21 of file DDTrackerXYZPosAlgo.cc.

21 {}

Member Function Documentation

void DDTrackerXYZPosAlgo::execute ( DDCompactView cpv)

Definition at line 52 of file DDTrackerXYZPosAlgo.cc.

References class-composition::child, childName, filterCSVwithJSON::copy, DDSplit(), plotBeamSpotDB::first, i, incrCopyNo, LogDebug, confdb::parent, DDCompactView::position(), makeMuonMisalignmentScenario::rot, rotMat, edm::second(), startCopyNo, AlCaHLTBitMon_QueryRunRegistry::string, xvec, yvec, and zvec.

52  {
53 
54  int copy = startCopyNo;
55  DDName mother = parent().name();
57 
58  for (int i=0; i<(int)(zvec.size()); i++) {
59 
60  DDTranslation tran(xvec[i], yvec[i], zvec[i]);
61  std::string rotstr = DDSplit(rotMat[i]).first;
63  if (rotstr != "NULL") {
64  std::string rotns = DDSplit(rotMat[i]).second;
65  rot = DDRotation(DDName(rotstr, rotns));
66  }
67  cpv.position(child, mother, copy, tran, rot);
68  LogDebug("TrackerGeom") << "DDTrackerXYZPosAlgo test: " << child
69  <<" number " << copy << " positioned in "
70  << mother << " at " << tran << " with " << rot;
71  copy += incrCopyNo;
72  }
73 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
parent
Definition: confdb.py:1052
void position(const DDLogicalPart &self, const DDLogicalPart &parent, std::string copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=NULL)
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:14
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:66
U second(std::pair< T, U > const &p)
std::vector< double > zvec
std::vector< double > xvec
std::vector< std::string > rotMat
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = &#39;:&#39;
Definition: DDSplit.cc:4
std::vector< double > yvec
void DDTrackerXYZPosAlgo::initialize ( const DDNumericArguments nArgs,
const DDVectorArguments vArgs,
const DDMapArguments mArgs,
const DDStringArguments sArgs,
const DDStringVectorArguments vsArgs 
)

Definition at line 23 of file DDTrackerXYZPosAlgo.cc.

References childName, i, idNameSpace, incrCopyNo, LogDebug, DDCurrentNamespace::ns(), confdb::parent, rotMat, startCopyNo, xvec, yvec, and zvec.

27  {
28 
29  startCopyNo = int(nArgs["StartCopyNo"]);
30  incrCopyNo = int(nArgs["IncrCopyNo"]);
31  xvec = vArgs["XPositions"];
32  yvec = vArgs["YPositions"];
33  zvec = vArgs["ZPositions"];
34  rotMat = vsArgs["Rotations"];
35 
37  childName = sArgs["ChildName"];
38  DDName parentName = parent().name();
39  LogDebug("TrackerGeom") << "DDTrackerXYZPosAlgo debug: Parent " << parentName
40  << "\tChild " << childName << " NameSpace "
41  << idNameSpace << "\tCopyNo (Start/Increment) "
42  << startCopyNo << ", " << incrCopyNo << "\tNumber "
43  << xvec.size() << ", " << yvec.size() << ", " << zvec.size();
44  for (int i = 0; i < (int)(zvec.size()); i++) {
45  LogDebug("TrackerGeom") << "\t[" << i << "]\tX = " << xvec[i]
46  << "\t[" << i << "]\tY = " << yvec[i]
47  << "\t[" << i << "]\tZ = " << zvec[i]
48  << ", Rot.Matrix = " << rotMat[i];
49  }
50 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
parent
Definition: confdb.py:1052
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:14
static std::string & ns()
std::vector< double > zvec
std::vector< double > xvec
std::vector< std::string > rotMat
std::vector< double > yvec

Member Data Documentation

std::string DDTrackerXYZPosAlgo::childName
private

Definition at line 32 of file DDTrackerXYZPosAlgo.h.

Referenced by execute(), and initialize().

std::string DDTrackerXYZPosAlgo::idNameSpace
private

Definition at line 31 of file DDTrackerXYZPosAlgo.h.

Referenced by initialize().

int DDTrackerXYZPosAlgo::incrCopyNo
private

Definition at line 34 of file DDTrackerXYZPosAlgo.h.

Referenced by execute(), and initialize().

std::vector<std::string> DDTrackerXYZPosAlgo::rotMat
private

Definition at line 29 of file DDTrackerXYZPosAlgo.h.

Referenced by execute(), and initialize().

int DDTrackerXYZPosAlgo::startCopyNo
private

Definition at line 33 of file DDTrackerXYZPosAlgo.h.

Referenced by execute(), and initialize().

std::vector<double> DDTrackerXYZPosAlgo::xvec
private

Definition at line 26 of file DDTrackerXYZPosAlgo.h.

Referenced by execute(), and initialize().

std::vector<double> DDTrackerXYZPosAlgo::yvec
private

Definition at line 27 of file DDTrackerXYZPosAlgo.h.

Referenced by execute(), and initialize().

std::vector<double> DDTrackerXYZPosAlgo::zvec
private

Definition at line 28 of file DDTrackerXYZPosAlgo.h.

Referenced by execute(), and initialize().