CMS 3D CMS Logo

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::DDBHMAngular ( )

Definition at line 49 of file DDBHMAngular.cc.

49 { edm::LogVerbatim("ForwardGeom") << "DDBHMAngular test: Creating an instance"; }

Member Function Documentation

◆ execute()

void DDBHMAngular::execute ( DDCompactView cpv)
override

Definition at line 72 of file DDBHMAngular.cc.

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 }

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

◆ initialize()

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.

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 }

References geant_units::operators::convertMmToCm(), angle_units::operators::convertRadToDeg(), createfilelist::int, class-composition::parent, findQualityFiles::rr, and units().

Member Data Documentation

◆ childName

std::string DDBHMAngular::childName
private

Definition at line 46 of file DDBHMAngular.cc.

◆ dphi

double DDBHMAngular::dphi
private

Definition at line 43 of file DDBHMAngular.cc.

Referenced by VBF.VBF::__str__().

◆ rotMat

std::string DDBHMAngular::rotMat
private

Definition at line 45 of file DDBHMAngular.cc.

◆ rr

double DDBHMAngular::rr
private

Definition at line 42 of file DDBHMAngular.cc.

◆ units

int DDBHMAngular::units
private

Definition at line 41 of file DDBHMAngular.cc.

DDName
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
angle_units::operators::convertRadToDeg
constexpr NumType convertRadToDeg(NumType radians)
Definition: angle_units.h:21
DDBHMAngular::rotMat
std::string rotMat
Definition: DDBHMAngular.cc:45
isotrackTrainRegressor.fac2
def fac2(jeta)
Definition: isotrackTrainRegressor.py:113
DDBHMAngular::units
int units
Definition: DDBHMAngular.cc:41
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
DDBHMAngular::rr
double rr
Definition: DDBHMAngular.cc:42
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
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:112
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
createfilelist.int
int
Definition: createfilelist.py:10
submitPVValidationJobs.child
child
Definition: submitPVValidationJobs.py:119
DDBHMAngular::childName
std::string childName
Definition: DDBHMAngular.cc:46
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
DDBHMAngular::dphi
double dphi
Definition: DDBHMAngular.cc:43
findQualityFiles.jj
string jj
Definition: findQualityFiles.py:188
makeMuonMisalignmentScenario.rot
rot
Definition: makeMuonMisalignmentScenario.py:322
DDRotation
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:57
geant_units::operators::convertMmToCm
constexpr NumType convertMmToCm(NumType millimeters)
Definition: GeantUnits.h:62
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
isotrackTrainRegressor.fac1
def fac1(jeta)
Definition: isotrackTrainRegressor.py:107
DDRotation
ROOT::Math::Rotation3D DDRotation
Definition: DDEcalEndcapAlgo.cc:16