CMS 3D CMS Logo

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

#include <DDBHMAngular.h>

Inheritance diagram for DDBHMAngular:

Public Member Functions

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

Private Attributes

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

Detailed Description

Definition at line 10 of file DDBHMAngular.h.

Constructor & Destructor Documentation

DDBHMAngular::DDBHMAngular ( )

Definition at line 17 of file DDBHMAngular.cc.

References LogDebug.

17  {
18  LogDebug("BHMGeom") << "DDBHMAngular test: Creating an instance";
19 }
#define LogDebug(id)
DDBHMAngular::~DDBHMAngular ( )
virtual

Definition at line 21 of file DDBHMAngular.cc.

21 {}

Member Function Documentation

void DDBHMAngular::execute ( DDCompactView cpv)

Definition at line 43 of file DDBHMAngular.cc.

References class-composition::child, childName, funct::cos(), DDSplit(), dphi, plotBeamSpotDB::first, findQualityFiles::jj, LogDebug, dbtoconf::parent, DDCompactView::position(), makeMuonMisalignmentScenario::rot, rotMat, rr, edm::second(), mathSSE::sqrt(), AlCaHLTBitMon_QueryRunRegistry::string, and units.

43  {
44 
46  DDName parentName = parent().name();
47  std::string rotstr = DDSplit(rotMat).first;
49  if (rotstr != "NULL") {
50  std::string rotns = DDSplit(rotMat).second;
51  rot = DDRotation(DDName(rotstr, rotns));
52  }
53 
54  for (int jj=0; jj<units; jj++) {
55  double driverX(0), driverY(0), driverZ(0);
56  if (jj<16){
57  driverX = rr*cos((jj+0.5)*dphi);
58  driverY = sqrt(rr*rr-driverX*driverX);
59  } else if (jj==16) {
60  driverX = rr*cos(15.5*dphi);
61  driverY =-sqrt(rr*rr-driverX*driverX);
62  } else if (jj==17) {
63  driverX = rr*cos(14.5*dphi);
64  driverY =-sqrt(rr*rr-driverX*driverX);
65  } else if (jj==18) {
66  driverX = rr*cos(0.5*dphi);
67  driverY =-sqrt(rr*rr-driverX*driverX);
68  } else if (jj==19) {
69  driverX = rr*cos(1.5*dphi);
70  driverY =-sqrt(rr*rr-driverX*driverX);
71  }
72  DDTranslation tran(driverX, driverY, driverZ);
73 
74  cpv.position(child, parentName, jj+1, tran, rot);
75  LogDebug("BHMGeom") << "DDBHMAngular test: " << child << " number " <<jj+1
76  << " positioned in " << parentName << " at " << tran
77  << " with " << rot;
78  }
79 }
#define LogDebug(id)
list parent
Definition: dbtoconf.py:74
void position(const DDLogicalPart &self, const DDLogicalPart &parent, std::string copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=NULL)
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:14
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:66
U second(std::pair< T, U > const &p)
T sqrt(T t)
Definition: SSEVec.h:48
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
std::string rotMat
Definition: DDBHMAngular.h:30
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = &#39;:&#39;
Definition: DDSplit.cc:4
std::string childName
Definition: DDBHMAngular.h:31
void DDBHMAngular::initialize ( const DDNumericArguments nArgs,
const DDVectorArguments vArgs,
const DDMapArguments mArgs,
const DDStringArguments sArgs,
const DDStringVectorArguments vsArgs 
)

Definition at line 23 of file DDBHMAngular.cc.

References childName, dphi, LogDebug, dbtoconf::parent, rotMat, rr, and units.

27  {
28 
29  units = int (nArgs["number"]);
30  rr = nArgs["radius"];
31  dphi = nArgs["deltaPhi"];
32  LogDebug("BHMGeom") << "DDBHMAngular debug: Parameters for positioning-- "
33  << units << " copies at radius " << rr/CLHEP::cm
34  << " cm with delta(phi) " << dphi/CLHEP::deg;
35 
36  rotMat = sArgs["Rotation"];
37  childName = sArgs["ChildName"];
38  LogDebug("BHMGeom") << "DDBHMAngular debug: Parent " << parent().name()
39  << "\tChild " << childName << "\tRotation matrix "
40  << rotMat;
41 }
#define LogDebug(id)
list parent
Definition: dbtoconf.py:74
std::string rotMat
Definition: DDBHMAngular.h:30
std::string childName
Definition: DDBHMAngular.h:31

Member Data Documentation

std::string DDBHMAngular::childName
private

Definition at line 31 of file DDBHMAngular.h.

Referenced by execute(), and initialize().

double DDBHMAngular::dphi
private

Definition at line 28 of file DDBHMAngular.h.

Referenced by VBF.VBF::__str__(), execute(), and initialize().

std::string DDBHMAngular::rotMat
private

Definition at line 30 of file DDBHMAngular.h.

Referenced by execute(), and initialize().

double DDBHMAngular::rr
private

Definition at line 27 of file DDBHMAngular.h.

Referenced by execute(), and initialize().

int DDBHMAngular::units
private

Definition at line 26 of file DDBHMAngular.h.

Referenced by execute(), and initialize().