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
DDTrackerLinear Class Reference

#include <DDTrackerLinear.h>

Inheritance diagram for DDTrackerLinear:

Public Member Functions

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

Private Attributes

std::vector< double > centre
 
std::string childName
 
double delta
 
std::string idNameSpace
 
int incrcn
 
int number
 
double offset
 
double phi
 
std::string rotMat
 
int startcn
 
double theta
 

Detailed Description

Definition at line 10 of file DDTrackerLinear.h.

Constructor & Destructor Documentation

DDTrackerLinear::DDTrackerLinear ( )

Definition at line 17 of file DDTrackerLinear.cc.

References LogDebug.

17  : startcn(1), incrcn(1) {
18  LogDebug("TrackerGeom") << "DDTrackerLinear info: Creating an instance";
19 }
#define LogDebug(id)
DDTrackerLinear::~DDTrackerLinear ( )
virtual

Definition at line 21 of file DDTrackerLinear.cc.

21 {}

Member Function Documentation

void DDTrackerLinear::execute ( DDCompactView cpv)

Definition at line 60 of file DDTrackerLinear.cc.

References newFWLiteAna::base, centre, childName, funct::cos(), DDSplit(), delta, first, i, LogDebug, number, offset, dbtoconf::parent, phi, DDCompactView::position(), makeMuonMisalignmentScenario::rot, rotMat, edm::second(), funct::sin(), startcn, AlCaHLTBitMon_QueryRunRegistry::string, and theta.

60  {
61 
62  DDName mother = parent().name();
64  DDTranslation direction(sin(theta)*cos(phi),sin(theta)*sin(phi),cos(theta));
66  std::string rotstr = DDSplit(rotMat).first;
68  if (rotstr != "NULL") {
69  std::string rotns = DDSplit(rotMat).second;
70  rot = DDRotation(DDName(rotstr, rotns));
71  }
72  int ci = startcn;
73  for (int i=0; i<number; i++) {
74 
75  DDTranslation tran = base + (offset + double(i)*delta)*direction;
76  cpv.position(child, mother, ci, tran, rot);
77  LogDebug("TrackerGeom") << "DDTrackerLinear test: " << child << " number "
78  << ci << " positioned in " << mother << " at "
79  << tran << " with " << rot;
80  ++ci;
81  }
82 }
#define LogDebug(id)
tuple base
Main Program
Definition: newFWLiteAna.py:92
int i
Definition: DBlmapReader.cc:9
list parent
Definition: dbtoconf.py:74
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
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:18
std::vector< double > centre
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)
std::string rotMat
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
bool first
Definition: L1TdeRCT.cc:75
std::string childName
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = &#39;:&#39;
Definition: DDSplit.cc:4
void DDTrackerLinear::initialize ( const DDNumericArguments nArgs,
const DDVectorArguments vArgs,
const DDMapArguments mArgs,
const DDStringArguments sArgs,
const DDStringVectorArguments vsArgs 
)

Definition at line 23 of file DDTrackerLinear.cc.

References centre, childName, delta, idNameSpace, incrcn, LogDebug, DDCurrentNamespace::ns(), number, offset, dbtoconf::parent, phi, rotMat, startcn, and theta.

27  {
28 
29  number = int(nArgs["Number"]);
30  theta = nArgs["Theta"];
31  phi = nArgs["Phi"];
32  offset = nArgs["Offset"];
33  delta = nArgs["Delta"];
34  centre = vArgs["Center"];
35  rotMat = sArgs["Rotation"];
36  if ( nArgs.find("StartCopyNo") != nArgs.end() ) {
37  startcn = size_t(nArgs["StartCopyNo"]);
38  } else {
39  startcn = 1;
40  }
41  if ( nArgs.find("IncrCopyNo") != nArgs.end() ) {
42  incrcn = int(nArgs["IncrCopyNo"]);
43  } else {
44  incrcn = 1;
45  }
46 
48  childName = sArgs["ChildName"];
49  DDName parentName = parent().name();
50  LogDebug("TrackerGeom") << "DDTrackerLinear debug: Parent " << parentName
51  << "\tChild " << childName << " NameSpace "
52  << idNameSpace << "\tNumber " << number
53  << "\tAxis (theta/phi) " << theta/CLHEP::deg << ", "
54  << phi/CLHEP::deg << "\t(Offset/Delta) " << offset
55  << ", " << delta << "\tCentre " << centre[0] << ", "
56  << centre[1] << ", " << centre[2] << "\tRotation "
57  << rotMat;
58 }
#define LogDebug(id)
list parent
Definition: dbtoconf.py:74
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:18
static std::string & ns()
std::vector< double > centre
std::string rotMat
std::string childName
std::string idNameSpace

Member Data Documentation

std::vector<double> DDTrackerLinear::centre
private

Definition at line 35 of file DDTrackerLinear.h.

Referenced by execute(), and initialize().

std::string DDTrackerLinear::childName
private

Definition at line 27 of file DDTrackerLinear.h.

Referenced by execute(), and initialize().

double DDTrackerLinear::delta
private

Definition at line 34 of file DDTrackerLinear.h.

Referenced by execute(), and initialize().

std::string DDTrackerLinear::idNameSpace
private

Definition at line 26 of file DDTrackerLinear.h.

Referenced by initialize().

int DDTrackerLinear::incrcn
private

Definition at line 30 of file DDTrackerLinear.h.

Referenced by initialize().

int DDTrackerLinear::number
private

Definition at line 28 of file DDTrackerLinear.h.

Referenced by execute(), and initialize().

double DDTrackerLinear::offset
private

Definition at line 33 of file DDTrackerLinear.h.

Referenced by execute(), and initialize().

double DDTrackerLinear::phi
private

Definition at line 32 of file DDTrackerLinear.h.

Referenced by execute(), and initialize().

std::string DDTrackerLinear::rotMat
private

Definition at line 36 of file DDTrackerLinear.h.

Referenced by execute(), and initialize().

int DDTrackerLinear::startcn
private

Definition at line 29 of file DDTrackerLinear.h.

Referenced by execute(), and initialize().

double DDTrackerLinear::theta
private

Definition at line 31 of file DDTrackerLinear.h.

Referenced by execute(), and initialize().