CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
DDBHMAngular Class Reference
Inheritance diagram for DDBHMAngular:

Public Member Functions

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

Private Attributes

std::string childName
 
double dphi
 
std::string rotMat
 
double rr
 
int units
 

Detailed Description

Definition at line 27 of file DDBHMAngular.cc.

Constructor & Destructor Documentation

DDBHMAngular::DDBHMAngular ( )

Definition at line 49 of file DDBHMAngular.cc.

49 { edm::LogVerbatim("ForwardGeom") << "DDBHMAngular test: Creating an instance"; }
Log< level::Info, true > LogVerbatim

Member Function Documentation

void DDBHMAngular::execute ( DDCompactView cpv)
override

Definition at line 72 of file DDBHMAngular.cc.

References submitPVValidationJobs::child, funct::cos(), DDSplit(), isotrackTrainRegressor::fac1(), isotrackTrainRegressor::fac2(), first, findQualityFiles::jj, SpecificationBuilder_cfi::parent(), DDCompactView::position(), makeMuonMisalignmentScenario::rot, findQualityFiles::rr, edm::second(), mathSSE::sqrt(), AlCaHLTBitMon_QueryRunRegistry::string, and units().

72  {
74  DDName parentName = parent().name();
75  std::string rotstr = DDSplit(rotMat).first;
77  if (rotstr != "NULL") {
78  std::string rotns = DDSplit(rotMat).second;
79  rot = DDRotation(DDName(rotstr, rotns));
80  }
81 
82  static const double fac1 = 0.5;
83  static const double fac2 = 1.5;
84  static const double fac3 = 14.5;
85  static const double fac4 = 15.5;
86  for (int jj = 0; jj < units; jj++) {
87  double driverX(0), driverY(0), driverZ(0);
88  if (jj < 16) {
89  driverX = rr * cos((jj + fac1) * dphi);
90  driverY = sqrt(rr * rr - driverX * driverX);
91  } else if (jj == 16) {
92  driverX = rr * cos(fac4 * dphi);
93  driverY = -sqrt(rr * rr - driverX * driverX);
94  } else if (jj == 17) {
95  driverX = rr * cos(fac3 * dphi);
96  driverY = -sqrt(rr * rr - driverX * driverX);
97  } else if (jj == 18) {
98  driverX = rr * cos(fac1 * dphi);
99  driverY = -sqrt(rr * rr - driverX * driverX);
100  } else if (jj == 19) {
101  driverX = rr * cos(fac2 * dphi);
102  driverY = -sqrt(rr * rr - driverX * driverX);
103  }
104  DDTranslation tran(driverX, driverY, driverZ);
105 
106  cpv.position(child, parentName, jj + 1, tran, rot);
107 #ifdef EDM_ML_DEBUG
108  edm::LogVerbatim("ForwardGeom") << "DDBHMAngular test: " << child << " number " << jj + 1 << " positioned in "
109  << parentName << " at " << tran << " with " << rot;
110 #endif
111  }
112 }
Log< level::Info, true > LogVerbatim
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string &copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:17
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:57
U second(std::pair< T, U > const &p)
T sqrt(T t)
Definition: SSEVec.h:19
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
std::string rotMat
Definition: DDBHMAngular.cc:45
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = &#39;:&#39;
Definition: DDSplit.cc:3
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
std::string childName
Definition: DDBHMAngular.cc:46
void DDBHMAngular::initialize ( const DDNumericArguments nArgs,
const DDVectorArguments vArgs,
const DDMapArguments mArgs,
const DDStringArguments sArgs,
const DDStringVectorArguments vsArgs 
)
override

Definition at line 51 of file DDBHMAngular.cc.

References angle_units::operators::convertMmToCm(), angle_units::operators::convertRadToDeg(), SpecificationBuilder_cfi::parent(), findQualityFiles::rr, and units().

55  {
56  units = int(nArgs["number"]);
57  rr = nArgs["radius"];
58  dphi = nArgs["deltaPhi"];
59 #ifdef EDM_ML_DEBUG
60  edm::LogVerbatim("ForwardGeom") << "DDBHMAngular debug: Parameters for positioning-- " << units
61  << " copies at radius " << convertMmToCm(rr) << " cm with delta(phi) "
63 #endif
64  rotMat = sArgs["Rotation"];
65  childName = sArgs["ChildName"];
66 #ifdef EDM_ML_DEBUG
67  edm::LogVerbatim("ForwardGeom") << "DDBHMAngular debug: Parent " << parent().name() << "\tChild " << childName
68  << "\tRotation matrix " << rotMat;
69 #endif
70 }
Log< level::Info, true > LogVerbatim
constexpr NumType convertRadToDeg(NumType radians)
Definition: angle_units.h:21
constexpr NumType convertMmToCm(NumType millimeters)
Definition: angle_units.h:44
std::string rotMat
Definition: DDBHMAngular.cc:45
std::string childName
Definition: DDBHMAngular.cc:46

Member Data Documentation

std::string DDBHMAngular::childName
private

Definition at line 46 of file DDBHMAngular.cc.

double DDBHMAngular::dphi
private

Definition at line 43 of file DDBHMAngular.cc.

Referenced by VBF.VBF::__str__().

std::string DDBHMAngular::rotMat
private

Definition at line 45 of file DDBHMAngular.cc.

double DDBHMAngular::rr
private

Definition at line 42 of file DDBHMAngular.cc.

int DDBHMAngular::units
private

Definition at line 41 of file DDBHMAngular.cc.