test
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
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, filterCSVwithJSON::copy, DDSplit(), deltaX, deltaY, plotBeamSpotDB::first, i, j, LogDebug, DDName::name(), numberX, numberY, 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)
int i
Definition: DBlmapReader.cc:9
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)
int j
Definition: DBlmapReader.cc:9
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
const std::string & name() const
Returns the name.
Definition: DDName.cc:87
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, LogDebug, DDName::name(), DDCurrentNamespace::ns(), numberX, and numberY.

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:14
static std::string & ns()
std::vector< double > centre
std::string idNameSpace
const std::string & name() const
Returns the name.
Definition: DDName.cc:87

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().