CMS 3D CMS Logo

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

Public Member Functions

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

Private Attributes

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

Detailed Description

Definition at line 23 of file DDTECPhiAltAlgo.cc.

Constructor & Destructor Documentation

◆ DDTECPhiAltAlgo()

DDTECPhiAltAlgo::DDTECPhiAltAlgo ( )

Definition at line 51 of file DDTECPhiAltAlgo.cc.

51 { LogDebug("TECGeom") << "DDTECPhiAltAlgo info: Creating an instance"; }

References LogDebug.

◆ ~DDTECPhiAltAlgo()

DDTECPhiAltAlgo::~DDTECPhiAltAlgo ( )
override

Definition at line 53 of file DDTECPhiAltAlgo.cc.

53 {}

Member Function Documentation

◆ execute()

void DDTECPhiAltAlgo::execute ( DDCompactView cpv)
override

Definition at line 82 of file DDTECPhiAltAlgo.cc.

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

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

◆ initialize()

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

Definition at line 55 of file DDTECPhiAltAlgo.cc.

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

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

Member Data Documentation

◆ childName

string DDTECPhiAltAlgo::childName
private

Definition at line 48 of file DDTECPhiAltAlgo.cc.

◆ idNameSpace

string DDTECPhiAltAlgo::idNameSpace
private

Definition at line 47 of file DDTECPhiAltAlgo.cc.

◆ incrAngle

double DDTECPhiAltAlgo::incrAngle
private

Definition at line 39 of file DDTECPhiAltAlgo.cc.

◆ incrCopyNo

int DDTECPhiAltAlgo::incrCopyNo
private

Definition at line 45 of file DDTECPhiAltAlgo.cc.

◆ number

int DDTECPhiAltAlgo::number
private

Definition at line 43 of file DDTECPhiAltAlgo.cc.

◆ radius

double DDTECPhiAltAlgo::radius
private

Definition at line 40 of file DDTECPhiAltAlgo.cc.

◆ startAngle

double DDTECPhiAltAlgo::startAngle
private

Definition at line 38 of file DDTECPhiAltAlgo.cc.

◆ startCopyNo

int DDTECPhiAltAlgo::startCopyNo
private

Definition at line 44 of file DDTECPhiAltAlgo.cc.

◆ zIn

double DDTECPhiAltAlgo::zIn
private

Definition at line 41 of file DDTECPhiAltAlgo.cc.

◆ zOut

double DDTECPhiAltAlgo::zOut
private

Definition at line 42 of file DDTECPhiAltAlgo.cc.

mps_fire.i
i
Definition: mps_fire.py:428
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
DDTECPhiAltAlgo::incrAngle
double incrAngle
Definition: DDTECPhiAltAlgo.cc:39
DDName
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
DDTECPhiAltAlgo::zOut
double zOut
Definition: DDTECPhiAltAlgo.cc:42
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
DDTECPhiAltAlgo::startCopyNo
int startCopyNo
Definition: DDTECPhiAltAlgo.cc:44
dqmdumpme.first
first
Definition: dqmdumpme.py:55
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
DDTECPhiAltAlgo::childName
string childName
Definition: DDTECPhiAltAlgo.cc:48
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
DDTranslation
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
DDTECPhiAltAlgo::number
int number
Definition: DDTECPhiAltAlgo.cc:43
theta
Geom::Theta< T > theta() const
Definition: Basic3DVectorLD.h:150
DDTECPhiAltAlgo::incrCopyNo
int incrCopyNo
Definition: DDTECPhiAltAlgo.cc:45
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
idealTransformation.rotation
dictionary rotation
Definition: idealTransformation.py:1
createfilelist.int
int
Definition: createfilelist.py:10
submitPVValidationJobs.child
child
Definition: submitPVValidationJobs.py:119
DDCurrentNamespace::ns
static std::string & ns()
Definition: DDCurrentNamespace.cc:3
DDTECPhiAltAlgo::idNameSpace
string idNameSpace
Definition: DDTECPhiAltAlgo.cc:47
DDRotation
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:57
DDTECPhiAltAlgo::radius
double radius
Definition: DDTECPhiAltAlgo.cc:40
DDTECPhiAltAlgo::zIn
double zIn
Definition: DDTECPhiAltAlgo.cc:41
child
Definition: simpleInheritance.h:11
class-composition.parent
parent
Definition: class-composition.py:88
DDTECPhiAltAlgo::startAngle
double startAngle
Definition: DDTECPhiAltAlgo.cc:38
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:18