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
DDTrackerZPosAlgo Class Reference

#include <DDTrackerZPosAlgo.h>

Inheritance diagram for DDTrackerZPosAlgo:

Public Member Functions

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

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 ( )
virtual

Definition at line 21 of file DDTrackerZPosAlgo.cc.

21 {}

Member Function Documentation

void DDTrackerZPosAlgo::execute ( DDCompactView cpv)

Definition at line 48 of file DDTrackerZPosAlgo.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, 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)
int i
Definition: DBlmapReader.cc:9
std::vector< double > zvec
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::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = &#39;:&#39;
Definition: DDSplit.cc:4
std::vector< std::string > rotMat
void DDTrackerZPosAlgo::initialize ( const DDNumericArguments nArgs,
const DDVectorArguments vArgs,
const DDMapArguments mArgs,
const DDStringArguments sArgs,
const DDStringVectorArguments vsArgs 
)

Definition at line 23 of file DDTrackerZPosAlgo.cc.

References childName, i, idNameSpace, incrCopyNo, LogDebug, DDCurrentNamespace::ns(), confdb::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)
int i
Definition: DBlmapReader.cc:9
std::string idNameSpace
std::vector< double > zvec
parent
Definition: confdb.py:1052
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:14
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().