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

#include <DDPixBarStackLinear.h>

Inheritance diagram for DDPixBarStackLinear:

Public Member Functions

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

Private Attributes

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

Detailed Description

Definition at line 10 of file DDPixBarStackLinear.h.

Constructor & Destructor Documentation

DDPixBarStackLinear::DDPixBarStackLinear ( )

Definition at line 17 of file DDPixBarStackLinear.cc.

References LogDebug.

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

Definition at line 21 of file DDPixBarStackLinear.cc.

21 {}

Member Function Documentation

void DDPixBarStackLinear::execute ( DDCompactView cpv)

Definition at line 53 of file DDPixBarStackLinear.cc.

References newFWLiteAna::base, centre, class-composition::child, childName, funct::cos(), DDSplit(), delta, plotBeamSpotDB::first, i, LogDebug, DDName::name(), number, offset, phi, DDCompactView::position(), makeMuonMisalignmentScenario::rot, rotMat, edm::second(), funct::sin(), stackoffset, stackoffsetT, AlCaHLTBitMon_QueryRunRegistry::string, theta, and zoffset.

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

Definition at line 23 of file DDPixBarStackLinear.cc.

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

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  stackoffset = nArgs["StackOffset"];
37  stackoffsetT= int(nArgs["StackOffsetT"]);
38  zoffset = nArgs["ZOffset"];
39 
41  childName = sArgs["ChildName"];
42  DDName parentName = parent().name();
43  LogDebug("TrackerGeom") << "DDPixBarStackLinear debug: Parent " << parentName
44  << "\tChild " << childName << " NameSpace "
45  << idNameSpace << "\tNumber " << number
46  << "\tAxis (theta/phi) " << theta/CLHEP::deg << ", "
47  << phi/CLHEP::deg << "\t(Offset/Delta) " << offset << ", "
48  << delta << "\tCentre " << centre[0] << ", "
49  << centre[1] << ", " << centre[2] << "\tRotation "
50  << rotMat;
51 }
#define LogDebug(id)
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:14
static std::string & ns()
std::vector< double > centre
const std::string & name() const
Returns the name.
Definition: DDName.cc:87

Member Data Documentation

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

Definition at line 33 of file DDPixBarStackLinear.h.

Referenced by execute(), and initialize().

std::string DDPixBarStackLinear::childName
private

Definition at line 27 of file DDPixBarStackLinear.h.

Referenced by execute(), and initialize().

double DDPixBarStackLinear::delta
private

Definition at line 32 of file DDPixBarStackLinear.h.

Referenced by execute(), and initialize().

std::string DDPixBarStackLinear::idNameSpace
private

Definition at line 26 of file DDPixBarStackLinear.h.

Referenced by initialize().

int DDPixBarStackLinear::number
private

Definition at line 28 of file DDPixBarStackLinear.h.

Referenced by execute(), and initialize().

double DDPixBarStackLinear::offset
private

Definition at line 31 of file DDPixBarStackLinear.h.

Referenced by execute(), and initialize().

double DDPixBarStackLinear::phi
private

Definition at line 30 of file DDPixBarStackLinear.h.

Referenced by Particle.Particle::__str__(), execute(), and initialize().

std::string DDPixBarStackLinear::rotMat
private

Definition at line 34 of file DDPixBarStackLinear.h.

Referenced by execute(), and initialize().

double DDPixBarStackLinear::stackoffset
private

Definition at line 36 of file DDPixBarStackLinear.h.

Referenced by execute(), and initialize().

int DDPixBarStackLinear::stackoffsetT
private

Definition at line 37 of file DDPixBarStackLinear.h.

Referenced by execute(), and initialize().

double DDPixBarStackLinear::theta
private

Definition at line 29 of file DDPixBarStackLinear.h.

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

double DDPixBarStackLinear::zoffset
private

Definition at line 35 of file DDPixBarStackLinear.h.

Referenced by execute(), and initialize().