CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
DDTrackerLinearXY Class Reference

#include <DDTrackerLinearXY.h>

Inheritance diagram for DDTrackerLinearXY:

Public Member Functions

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

Private Attributes

std::vector< double > centre
 
std::string childName
 
double deltaX
 
double deltaY
 
std::string idNameSpace
 
int numberX
 
int numberY
 

Detailed Description

Definition at line 10 of file DDTrackerLinearXY.h.

Constructor & Destructor Documentation

DDTrackerLinearXY::DDTrackerLinearXY ( )

Definition at line 17 of file DDTrackerLinearXY.cc.

References LogDebug.

17  {
18  LogDebug("TrackerGeom") <<"DDTrackerLinearXY info: Creating an instance";
19 }
#define LogDebug(id)
DDTrackerLinearXY::~DDTrackerLinearXY ( )
virtual

Definition at line 21 of file DDTrackerLinearXY.cc.

21 {}

Member Function Documentation

void DDTrackerLinearXY::execute ( DDCompactView cpv)

Definition at line 46 of file DDTrackerLinearXY.cc.

References centre, class-composition::child, childName, popcon2dropbox::copy(), DDSplit(), deltaX, deltaY, plotBeamSpotDB::first, mps_fire::i, LogDebug, numberX, numberY, class-composition::parent, DDCompactView::position(), makeMuonMisalignmentScenario::rot, and edm::second().

46  {
47 
48  DDName mother = parent().name();
51  double xoff = centre[0] - (numberX-1)*deltaX/2.;
52  double yoff = centre[1] - (numberY-1)*deltaY/2.;
53  int copy = 0;
54 
55  for (int i=0; i<numberX; i++) {
56  for (int j=0; j<numberY; j++) {
57 
58  DDTranslation tran(xoff+i*deltaX,yoff+j*deltaY,centre[2]);
59  copy++;
60  cpv.position(child, mother, copy, tran, rot);
61  LogDebug("TrackerGeom") << "DDTrackerLinearXY test: " << child
62  << " number " << copy << " positioned in "
63  << mother << " at " << tran << " with " << rot;
64  }
65  }
66 }
#define LogDebug(id)
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:16
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:64
U second(std::pair< T, U > const &p)
std::vector< double > centre
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = &#39;:&#39;
Definition: DDSplit.cc:4
void DDTrackerLinearXY::initialize ( const DDNumericArguments nArgs,
const DDVectorArguments vArgs,
const DDMapArguments mArgs,
const DDStringArguments sArgs,
const DDStringVectorArguments vsArgs 
)

Definition at line 23 of file DDTrackerLinearXY.cc.

References centre, childName, deltaX, deltaY, idNameSpace, createfilelist::int, LogDebug, DDCurrentNamespace::ns(), numberX, numberY, and class-composition::parent.

27  {
28 
29  numberX = int(nArgs["NumberX"]);
30  deltaX = nArgs["DeltaX"];
31  numberY = int(nArgs["NumberY"]);
32  deltaY = nArgs["DeltaY"];
33  centre = vArgs["Center"];
34 
36  childName = sArgs["ChildName"];
37  DDName parentName = parent().name();
38  LogDebug("TrackerGeom") << "DDTrackerLinearXY debug: Parent " << parentName
39  << "\tChild " << childName << " NameSpace "
40  << idNameSpace << "\tNumber along X/Y " << numberX
41  << "/" << numberY << "\tDelta along X/Y " << deltaX
42  << "/" << deltaY << "\tCentre " << centre[0] << ", "
43  << centre[1] << ", " << centre[2];
44 }
#define LogDebug(id)
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:16
static std::string & ns()
std::vector< double > centre
std::string idNameSpace

Member Data Documentation

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

Definition at line 32 of file DDTrackerLinearXY.h.

Referenced by execute(), and initialize().

std::string DDTrackerLinearXY::childName
private

Definition at line 27 of file DDTrackerLinearXY.h.

Referenced by execute(), and initialize().

double DDTrackerLinearXY::deltaX
private

Definition at line 29 of file DDTrackerLinearXY.h.

Referenced by execute(), and initialize().

double DDTrackerLinearXY::deltaY
private

Definition at line 31 of file DDTrackerLinearXY.h.

Referenced by execute(), and initialize().

std::string DDTrackerLinearXY::idNameSpace
private

Definition at line 26 of file DDTrackerLinearXY.h.

Referenced by initialize().

int DDTrackerLinearXY::numberX
private

Definition at line 28 of file DDTrackerLinearXY.h.

Referenced by execute(), and initialize().

int DDTrackerLinearXY::numberY
private

Definition at line 30 of file DDTrackerLinearXY.h.

Referenced by execute(), and initialize().