CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
DDTECPhiAlgo Class Reference
Inheritance diagram for DDTECPhiAlgo:

Public Member Functions

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

Private Attributes

string childName
 
string idNameSpace
 
double incrAngle
 
int incrCopyNo
 
int number
 
double startAngle
 
int startCopyNo
 
double zIn
 
double zOut
 

Detailed Description

Definition at line 23 of file DDTECPhiAlgo.cc.

Constructor & Destructor Documentation

◆ DDTECPhiAlgo()

DDTECPhiAlgo::DDTECPhiAlgo ( )

Definition at line 50 of file DDTECPhiAlgo.cc.

50 { LogDebug("TECGeom") << "DDTECPhiAlgo info: Creating an instance"; }

References LogDebug.

◆ ~DDTECPhiAlgo()

DDTECPhiAlgo::~DDTECPhiAlgo ( )
override

Definition at line 52 of file DDTECPhiAlgo.cc.

52 {}

Member Function Documentation

◆ execute()

void DDTECPhiAlgo::execute ( DDCompactView cpv)
override

Definition at line 80 of file DDTECPhiAlgo.cc.

80  {
81  if (number > 0) {
82  double theta = 90. * CLHEP::deg;
83  int copyNo = startCopyNo;
84 
85  DDName mother = parent().name();
87  for (int i = 0; i < number; i++) {
88  double phix = startAngle + i * incrAngle;
89  double phiy = phix + 90. * CLHEP::deg;
90  double phideg = phix / CLHEP::deg;
91 
93  string rotstr = DDSplit(childName).first + to_string(phideg * 10.);
95  if (!rotation) {
96  LogDebug("TECGeom") << "DDTECPhiAlgo test: Creating a new "
97  << "rotation " << rotstr << "\t" << theta / CLHEP::deg << ", " << phix / CLHEP::deg << ", "
98  << theta / CLHEP::deg << ", " << phiy / CLHEP::deg << ", 0, 0";
99  rotation = DDrot(DDName(rotstr, idNameSpace), theta, phix, theta, phiy, 0., 0.);
100  }
101 
102  double zpos = zOut;
103  if (i % 2 == 0)
104  zpos = zIn;
105  DDTranslation tran(0., 0., zpos);
106 
107  cpv.position(child, mother, copyNo, tran, rotation);
108  LogDebug("TECGeom") << "DDTECPhiAlgo test: " << child << " number " << copyNo << " positioned in " << mother
109  << " at " << tran << " with " << rotation;
110  copyNo += incrCopyNo;
111  }
112  }
113 }

References class-composition::child, DDrot(), DDSplit(), dqmdumpme::first, mps_fire::i, LogDebug, contentValuesFiles::number, class-composition::parent, DDCompactView::position(), idealTransformation::rotation, edm::second(), and theta().

◆ initialize()

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

Definition at line 54 of file DDTECPhiAlgo.cc.

58  {
59  startAngle = nArgs["StartAngle"];
60  incrAngle = nArgs["IncrAngle"];
61  zIn = nArgs["ZIn"];
62  zOut = nArgs["ZOut"];
63  number = int(nArgs["Number"]);
64  startCopyNo = int(nArgs["StartCopyNo"]);
65  incrCopyNo = int(nArgs["IncrCopyNo"]);
66 
67  LogDebug("TECGeom") << "DDTECPhiAlgo debug: Parameters for "
68  << "positioning--"
69  << "\tStartAngle " << startAngle / CLHEP::deg << "\tIncrAngle " << incrAngle / CLHEP::deg
70  << "\tZ in/out " << zIn << ", " << zOut << "\tCopy Numbers " << number << " Start/Increment "
71  << startCopyNo << ", " << incrCopyNo;
72 
74  childName = sArgs["ChildName"];
75  DDName parentName = parent().name();
76  LogDebug("TECGeom") << "DDTECPhiAlgo debug: Parent " << parentName << "\tChild " << childName << " NameSpace "
77  << idNameSpace;
78 }

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

Member Data Documentation

◆ childName

string DDTECPhiAlgo::childName
private

Definition at line 47 of file DDTECPhiAlgo.cc.

◆ idNameSpace

string DDTECPhiAlgo::idNameSpace
private

Definition at line 46 of file DDTECPhiAlgo.cc.

◆ incrAngle

double DDTECPhiAlgo::incrAngle
private

Definition at line 39 of file DDTECPhiAlgo.cc.

◆ incrCopyNo

int DDTECPhiAlgo::incrCopyNo
private

Definition at line 44 of file DDTECPhiAlgo.cc.

◆ number

int DDTECPhiAlgo::number
private

Definition at line 42 of file DDTECPhiAlgo.cc.

◆ startAngle

double DDTECPhiAlgo::startAngle
private

Definition at line 38 of file DDTECPhiAlgo.cc.

◆ startCopyNo

int DDTECPhiAlgo::startCopyNo
private

Definition at line 43 of file DDTECPhiAlgo.cc.

◆ zIn

double DDTECPhiAlgo::zIn
private

Definition at line 40 of file DDTECPhiAlgo.cc.

◆ zOut

double DDTECPhiAlgo::zOut
private

Definition at line 41 of file DDTECPhiAlgo.cc.

mps_fire.i
i
Definition: mps_fire.py:355
DDrot
DDRotation DDrot(const DDName &name, std::unique_ptr< DDRotationMatrix > rot)
Definition of a uniquely identifiable rotation matrix named by DDName name.
Definition: DDRotation.cc:67
DDTECPhiAlgo::childName
string childName
Definition: DDTECPhiAlgo.cc:47
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
dqmdumpme.first
first
Definition: dqmdumpme.py:55
DDTranslation
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
DDTECPhiAlgo::incrAngle
double incrAngle
Definition: DDTECPhiAlgo.cc:39
theta
Geom::Theta< T > theta() const
Definition: Basic3DVectorLD.h:150
DDTECPhiAlgo::zOut
double zOut
Definition: DDTECPhiAlgo.cc:41
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
idealTransformation.rotation
dictionary rotation
Definition: idealTransformation.py:1
createfilelist.int
int
Definition: createfilelist.py:10
DDTECPhiAlgo::startAngle
double startAngle
Definition: DDTECPhiAlgo.cc:38
DDTECPhiAlgo::incrCopyNo
int incrCopyNo
Definition: DDTECPhiAlgo.cc:44
DDTECPhiAlgo::idNameSpace
string idNameSpace
Definition: DDTECPhiAlgo.cc:46
DDCurrentNamespace::ns
static std::string & ns()
Definition: DDCurrentNamespace.cc:3
DDTECPhiAlgo::zIn
double zIn
Definition: DDTECPhiAlgo.cc:40
DDTECPhiAlgo::number
int number
Definition: DDTECPhiAlgo.cc:42
DDRotation
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:57
class-composition.child
child
Definition: class-composition.py:91
child
Definition: simpleInheritance.h:11
class-composition.parent
parent
Definition: class-composition.py:88
DDTECPhiAlgo::startCopyNo
int startCopyNo
Definition: DDTECPhiAlgo.cc:43
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