CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
DDTrackerZPosAlgo Class Reference
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

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

Detailed Description

Definition at line 18 of file DDTrackerZPosAlgo.cc.

Constructor & Destructor Documentation

◆ DDTrackerZPosAlgo()

DDTrackerZPosAlgo::DDTrackerZPosAlgo ( )

Definition at line 42 of file DDTrackerZPosAlgo.cc.

42 { LogDebug("TrackerGeom") << "DDTrackerZPosAlgo info: Creating an instance"; }

References LogDebug.

◆ ~DDTrackerZPosAlgo()

DDTrackerZPosAlgo::~DDTrackerZPosAlgo ( )
override

Definition at line 44 of file DDTrackerZPosAlgo.cc.

44 {}

Member Function Documentation

◆ execute()

void DDTrackerZPosAlgo::execute ( DDCompactView cpv)
override

Definition at line 67 of file DDTrackerZPosAlgo.cc.

67  {
68  int copy = startCopyNo;
69  DDName mother = parent().name();
71 
72  for (int i = 0; i < (int)(zvec.size()); i++) {
73  DDTranslation tran(0, 0, zvec[i]);
74  string rotstr = DDSplit(rotMat[i]).first;
76  if (rotstr != "NULL") {
77  string rotns = DDSplit(rotMat[i]).second;
78  rot = DDRotation(DDName(rotstr, rotns));
79  }
80  cpv.position(child, mother, copy, tran, rot);
81  LogDebug("TrackerGeom") << "DDTrackerZPosAlgo test: " << child << " number " << copy << " positioned in " << mother
82  << " at " << tran << " with " << rot;
83  copy += incrCopyNo;
84  }
85 }

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

◆ initialize()

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

Definition at line 46 of file DDTrackerZPosAlgo.cc.

50  {
51  startCopyNo = int(nArgs["StartCopyNo"]);
52  incrCopyNo = int(nArgs["IncrCopyNo"]);
53  zvec = vArgs["ZPositions"];
54  rotMat = vsArgs["Rotations"];
55 
57  childName = sArgs["ChildName"];
58  DDName parentName = parent().name();
59  LogDebug("TrackerGeom") << "DDTrackerZPosAlgo debug: Parent " << parentName << "\tChild " << childName
60  << " NameSpace " << idNameSpace << "\tCopyNo (Start/Increment) " << startCopyNo << ", "
61  << incrCopyNo << "\tNumber " << zvec.size();
62  for (int i = 0; i < (int)(zvec.size()); i++) {
63  LogDebug("TrackerGeom") << "\t[" << i << "]\tZ = " << zvec[i] << ", Rot.Matrix = " << rotMat[i];
64  }
65 }

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

Member Data Documentation

◆ childName

string DDTrackerZPosAlgo::childName
private

Definition at line 37 of file DDTrackerZPosAlgo.cc.

◆ idNameSpace

string DDTrackerZPosAlgo::idNameSpace
private

Definition at line 36 of file DDTrackerZPosAlgo.cc.

◆ incrCopyNo

int DDTrackerZPosAlgo::incrCopyNo
private

Definition at line 39 of file DDTrackerZPosAlgo.cc.

◆ rotMat

vector<string> DDTrackerZPosAlgo::rotMat
private

Definition at line 34 of file DDTrackerZPosAlgo.cc.

◆ startCopyNo

int DDTrackerZPosAlgo::startCopyNo
private

Definition at line 38 of file DDTrackerZPosAlgo.cc.

◆ zvec

vector<double> DDTrackerZPosAlgo::zvec
private

Definition at line 33 of file DDTrackerZPosAlgo.cc.

DDTrackerZPosAlgo::zvec
vector< double > zvec
Definition: DDTrackerZPosAlgo.cc:33
DDTrackerZPosAlgo::incrCopyNo
int incrCopyNo
Definition: DDTrackerZPosAlgo.cc:39
mps_fire.i
i
Definition: mps_fire.py:428
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:222
DDTrackerZPosAlgo::childName
string childName
Definition: DDTrackerZPosAlgo.cc:37
DDTranslation
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:112
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
createfilelist.int
int
Definition: createfilelist.py:10
DDTrackerZPosAlgo::startCopyNo
int startCopyNo
Definition: DDTrackerZPosAlgo.cc:38
DDTrackerZPosAlgo::rotMat
vector< string > rotMat
Definition: DDTrackerZPosAlgo.cc:34
submitPVValidationJobs.child
child
Definition: submitPVValidationJobs.py:119
DDCurrentNamespace::ns
static std::string & ns()
Definition: DDCurrentNamespace.cc:3
DDTrackerZPosAlgo::idNameSpace
string idNameSpace
Definition: DDTrackerZPosAlgo.cc:36
makeMuonMisalignmentScenario.rot
rot
Definition: makeMuonMisalignmentScenario.py:322
DDRotation
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:57
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:76
DDRotation
ROOT::Math::Rotation3D DDRotation
Definition: DDEcalEndcapAlgo.cc:16