CMS 3D CMS Logo

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

Public Member Functions

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

Private Attributes

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

Detailed Description

Definition at line 20 of file DDTrackerLinear.cc.

Constructor & Destructor Documentation

DDTrackerLinear::DDTrackerLinear ( )

Definition at line 48 of file DDTrackerLinear.cc.

References LogDebug.

48  : startcn(1), incrcn(1) {
49  LogDebug("TrackerGeom") << "DDTrackerLinear info: Creating an instance";
50 }
#define LogDebug(id)
DDTrackerLinear::~DDTrackerLinear ( )
override

Definition at line 52 of file DDTrackerLinear.cc.

52 {}

Member Function Documentation

void DDTrackerLinear::execute ( DDCompactView cpv)
override

Definition at line 86 of file DDTrackerLinear.cc.

References newFWLiteAna::base, centre, class-composition::child, childName, funct::cos(), DDSplit(), DEFINE_EDM_PLUGIN, delta, dqmdumpme::first, mps_fire::i, LogDebug, number, offset, class-composition::parent, phi, DDCompactView::position(), makeMuonMisalignmentScenario::rot, rotMat, edm::second(), funct::sin(), startcn, and theta.

86  {
87  DDName mother = parent().name();
89  DDTranslation direction(sin(theta) * cos(phi), sin(theta) * sin(phi), cos(theta));
91  string rotstr = DDSplit(rotMat).first;
93  if (rotstr != "NULL") {
94  string rotns = DDSplit(rotMat).second;
95  rot = DDRotation(DDName(rotstr, rotns));
96  }
97  int ci = startcn;
98  for (int i = 0; i < number; i++) {
99  DDTranslation tran = base + (offset + double(i) * delta) * direction;
100  cpv.position(child, mother, ci, tran, rot);
101  LogDebug("TrackerGeom") << "DDTrackerLinear test: " << child << " number " << ci << " positioned in " << mother
102  << " at " << tran << " with " << rot;
103  ++ci;
104  }
105 }
#define LogDebug(id)
base
Main Program
Definition: newFWLiteAna.py:92
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:57
U second(std::pair< T, U > const &p)
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
vector< double > centre
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string &copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=0)
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = &#39;:&#39;
Definition: DDSplit.cc:3
ROOT::Math::Rotation3D DDRotation
void DDTrackerLinear::initialize ( const DDNumericArguments nArgs,
const DDVectorArguments vArgs,
const DDMapArguments mArgs,
const DDStringArguments sArgs,
const DDStringVectorArguments vsArgs 
)
override

Definition at line 54 of file DDTrackerLinear.cc.

References centre, childName, delta, idNameSpace, incrcn, createfilelist::int, LogDebug, DDCurrentNamespace::ns(), number, offset, class-composition::parent, phi, rotMat, startcn, and theta.

58  {
59  number = int(nArgs["Number"]);
60  theta = nArgs["Theta"];
61  phi = nArgs["Phi"];
62  offset = nArgs["Offset"];
63  delta = nArgs["Delta"];
64  centre = vArgs["Center"];
65  rotMat = sArgs["Rotation"];
66  if (nArgs.find("StartCopyNo") != nArgs.end()) {
67  startcn = size_t(nArgs["StartCopyNo"]);
68  } else {
69  startcn = 1;
70  }
71  if (nArgs.find("IncrCopyNo") != nArgs.end()) {
72  incrcn = int(nArgs["IncrCopyNo"]);
73  } else {
74  incrcn = 1;
75  }
76 
78  childName = sArgs["ChildName"];
79  DDName parentName = parent().name();
80  LogDebug("TrackerGeom") << "DDTrackerLinear debug: Parent " << parentName << "\tChild " << childName << " NameSpace "
81  << idNameSpace << "\tNumber " << number << "\tAxis (theta/phi) " << theta / CLHEP::deg << ", "
82  << phi / CLHEP::deg << "\t(Offset/Delta) " << offset << ", " << delta << "\tCentre "
83  << centre[0] << ", " << centre[1] << ", " << centre[2] << "\tRotation " << rotMat;
84 }
#define LogDebug(id)
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
static std::string & ns()
vector< double > centre

Member Data Documentation

vector<double> DDTrackerLinear::centre
private

Definition at line 44 of file DDTrackerLinear.cc.

Referenced by execute(), and initialize().

string DDTrackerLinear::childName
private

Definition at line 36 of file DDTrackerLinear.cc.

Referenced by execute(), and initialize().

double DDTrackerLinear::delta
private

Definition at line 43 of file DDTrackerLinear.cc.

Referenced by execute(), and initialize().

string DDTrackerLinear::idNameSpace
private

Definition at line 35 of file DDTrackerLinear.cc.

Referenced by initialize().

int DDTrackerLinear::incrcn
private

Definition at line 39 of file DDTrackerLinear.cc.

Referenced by initialize().

int DDTrackerLinear::number
private

Definition at line 37 of file DDTrackerLinear.cc.

Referenced by execute(), and initialize().

double DDTrackerLinear::offset
private

Definition at line 42 of file DDTrackerLinear.cc.

Referenced by execute(), and initialize().

double DDTrackerLinear::phi
private
string DDTrackerLinear::rotMat
private

Definition at line 45 of file DDTrackerLinear.cc.

Referenced by execute(), and initialize().

int DDTrackerLinear::startcn
private

Definition at line 38 of file DDTrackerLinear.cc.

Referenced by execute(), and initialize().

double DDTrackerLinear::theta
private

Definition at line 40 of file DDTrackerLinear.cc.

Referenced by execute(), initialize(), and Tau.Tau::zImpact().