CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
DDTrackerZPosAlgo Class Reference

#include <DDTrackerZPosAlgo.h>

Inheritance diagram for DDTrackerZPosAlgo:

Public Member Functions

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

Private Attributes

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

Detailed Description

Definition at line 10 of file DDTrackerZPosAlgo.h.

Constructor & Destructor Documentation

DDTrackerZPosAlgo::DDTrackerZPosAlgo ( )

Definition at line 17 of file DDTrackerZPosAlgo.cc.

References LogDebug.

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

Definition at line 21 of file DDTrackerZPosAlgo.cc.

21 {}

Member Function Documentation

void DDTrackerZPosAlgo::execute ( DDCompactView cpv)
override

Definition at line 48 of file DDTrackerZPosAlgo.cc.

References class-composition::child, childName, popcon2dropbox::copy(), DDSplit(), plotBeamSpotDB::first, mps_fire::i, incrCopyNo, createfilelist::int, LogDebug, class-composition::parent, DDCompactView::position(), makeMuonMisalignmentScenario::rot, rotMat, edm::second(), startCopyNo, AlCaHLTBitMon_QueryRunRegistry::string, and zvec.

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

Definition at line 23 of file DDTrackerZPosAlgo.cc.

References childName, mps_fire::i, idNameSpace, incrCopyNo, createfilelist::int, LogDebug, DDCurrentNamespace::ns(), class-composition::parent, rotMat, startCopyNo, and zvec.

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

Member Data Documentation

std::string DDTrackerZPosAlgo::childName
private

Definition at line 30 of file DDTrackerZPosAlgo.h.

Referenced by execute(), and initialize().

std::string DDTrackerZPosAlgo::idNameSpace
private

Definition at line 29 of file DDTrackerZPosAlgo.h.

Referenced by initialize().

int DDTrackerZPosAlgo::incrCopyNo
private

Definition at line 32 of file DDTrackerZPosAlgo.h.

Referenced by execute(), and initialize().

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

Definition at line 27 of file DDTrackerZPosAlgo.h.

Referenced by execute(), and initialize().

int DDTrackerZPosAlgo::startCopyNo
private

Definition at line 31 of file DDTrackerZPosAlgo.h.

Referenced by execute(), and initialize().

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

Definition at line 26 of file DDTrackerZPosAlgo.h.

Referenced by execute(), and initialize().