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

#include <DDPixBarStackLinearGap.h>

Inheritance diagram for DDPixBarStackLinearGap:

Public Member Functions

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

Private Attributes

std::vector< double > centre
 
std::string childName
 
double delta
 
std::string idNameSpace
 
int number
 
double offset
 
double phi
 
int ringmodules
 
std::string rotMat
 
double stackoffset
 
int stackoffsetT
 
double theta
 
double zoffset
 

Detailed Description

Definition at line 10 of file DDPixBarStackLinearGap.h.

Constructor & Destructor Documentation

DDPixBarStackLinearGap::DDPixBarStackLinearGap ( )

Definition at line 17 of file DDPixBarStackLinearGap.cc.

References LogDebug.

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

Definition at line 21 of file DDPixBarStackLinearGap.cc.

21 {}

Member Function Documentation

void DDPixBarStackLinearGap::execute ( DDCompactView cpv)

Definition at line 54 of file DDPixBarStackLinearGap.cc.

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

54  {
55 
56  DDName mother = parent().name();
58  DDTranslation direction(sin(theta)*cos(phi),sin(theta)*sin(phi),cos(theta));
60  DDTranslation zbase(centre[0],zoffset,centre[2]);
61  std::string rotstr = DDSplit(rotMat).first;
63  if (rotstr != "NULL") {
64  std::string rotns = DDSplit(rotMat).second;
65  rot = DDRotation(DDName(rotstr, rotns));
66  }
67 
68  for (int i=(number/2)-ringmodules; i<(number/2); i++) {
69 
70  if((stackoffset!=0.0)&&(i!=0)) {
72  }
73 
74  DDTranslation tran = base + (offset + double(i)*delta)*direction;
75  cpv.position (child, mother, 2*i+1, tran, rot);
76  LogDebug("TrackerGeom") << "DDPixBarStackLinearGap test: " << child << " number "
77  << 2*i+1 << " positioned in " << mother << " at "
78  << tran << " with " << rot;
79 
80  DDTranslation tran2 = base - (offset + double(i)*delta)*direction;
81  cpv.position (child, mother, 2*i+2, tran2, rot);
82  LogDebug("TrackerGeom") << "DDPixBarStackLinearGap test: " << child << " number "
83  << 2*i+2 << " positioned in " << mother << " at "
84  << tran2 << " with " << rot;
85 
86  if(zoffset!=0.0){
87  if((i+1)!=number){
88  i++;
89  DDTranslation tran3 = zbase + (offset + double(i)*delta)*direction;
90  cpv.position (child, mother, 2*i+1, tran3, rot);
91  LogDebug("TrackerGeom") << "DDPixBarStackLinearGap test: " << child << " number "
92  << 2*i+1 << " positioned in " << mother << " at "
93  << tran3 << " with " << rot;
94 
95  DDTranslation tran4 = zbase - (offset + double(i)*delta)*direction;
96  cpv.position (child, mother, 2*i+2, tran4, rot);
97  LogDebug("TrackerGeom") << "DDPixBarStackLinearGap test: " << child << " number "
98  << 2*i+2 << " positioned in " << mother << " at "
99  << tran4 << " with " << rot;
100 
101  }
102  }
103 
104  }
105 }
#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
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)
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
bool first
Definition: L1TdeRCT.cc:94
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 DDPixBarStackLinearGap::initialize ( const DDNumericArguments nArgs,
const DDVectorArguments vArgs,
const DDMapArguments mArgs,
const DDStringArguments sArgs,
const DDStringVectorArguments vsArgs 
)

Definition at line 23 of file DDPixBarStackLinearGap.cc.

References centre, childName, delta, idNameSpace, LogDebug, DDCurrentNamespace::ns(), number, offset, dbtoconf::parent, phi, ringmodules, rotMat, stackoffset, stackoffsetT, theta, and zoffset.

27  {
28 
29  number = int(nArgs["Number"]);
30  ringmodules = int(nArgs["RingModules"]);
31  theta = nArgs["Theta"];
32  phi = nArgs["Phi"];
33  offset = nArgs["Offset"];
34  delta = nArgs["Delta"];
35  centre = vArgs["Center"];
36  rotMat = sArgs["Rotation"];
37  stackoffset = nArgs["StackOffset"];
38  stackoffsetT= int(nArgs["StackOffsetT"]);
39  zoffset = nArgs["ZOffset"];
40 
42  childName = sArgs["ChildName"];
43  DDName parentName = parent().name();
44  LogDebug("TrackerGeom") << "DDPixBarStackLinearGap debug: Parent " << parentName
45  << "\tChild " << childName << " NameSpace "
46  << idNameSpace << "\tNumber " << number <<"\tEndRings "<<ringmodules
47  << "\tAxis (theta/phi) " << theta/CLHEP::deg << ", "
48  << phi/CLHEP::deg << "\t(Offset/Delta) " << offset << ", "
49  << delta << "\tCentre " << centre[0] << ", "
50  << centre[1] << ", " << centre[2] << "\tRotation "
51  << rotMat;
52 }
#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

Member Data Documentation

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

Definition at line 34 of file DDPixBarStackLinearGap.h.

Referenced by execute(), and initialize().

std::string DDPixBarStackLinearGap::childName
private

Definition at line 27 of file DDPixBarStackLinearGap.h.

Referenced by execute(), and initialize().

double DDPixBarStackLinearGap::delta
private

Definition at line 33 of file DDPixBarStackLinearGap.h.

Referenced by execute(), and initialize().

std::string DDPixBarStackLinearGap::idNameSpace
private

Definition at line 26 of file DDPixBarStackLinearGap.h.

Referenced by initialize().

int DDPixBarStackLinearGap::number
private

Definition at line 28 of file DDPixBarStackLinearGap.h.

Referenced by execute(), and initialize().

double DDPixBarStackLinearGap::offset
private

Definition at line 32 of file DDPixBarStackLinearGap.h.

Referenced by execute(), and initialize().

double DDPixBarStackLinearGap::phi
private

Definition at line 31 of file DDPixBarStackLinearGap.h.

Referenced by execute(), and initialize().

int DDPixBarStackLinearGap::ringmodules
private

Definition at line 29 of file DDPixBarStackLinearGap.h.

Referenced by execute(), and initialize().

std::string DDPixBarStackLinearGap::rotMat
private

Definition at line 35 of file DDPixBarStackLinearGap.h.

Referenced by execute(), and initialize().

double DDPixBarStackLinearGap::stackoffset
private

Definition at line 37 of file DDPixBarStackLinearGap.h.

Referenced by execute(), and initialize().

int DDPixBarStackLinearGap::stackoffsetT
private

Definition at line 38 of file DDPixBarStackLinearGap.h.

Referenced by execute(), and initialize().

double DDPixBarStackLinearGap::theta
private

Definition at line 30 of file DDPixBarStackLinearGap.h.

Referenced by execute(), and initialize().

double DDPixBarStackLinearGap::zoffset
private

Definition at line 36 of file DDPixBarStackLinearGap.h.

Referenced by execute(), and initialize().