![]() |
![]() |
#include <DDPixBarStackLinear.h>
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 |
Definition at line 10 of file DDPixBarStackLinear.h.
DDPixBarStackLinear::DDPixBarStackLinear | ( | ) |
Definition at line 17 of file DDPixBarStackLinear.cc.
References LogDebug.
{ LogDebug("TrackerGeom") << "DDPixBarStackLinear info: Creating an instance"; }
DDPixBarStackLinear::~DDPixBarStackLinear | ( | ) | [virtual] |
Definition at line 21 of file DDPixBarStackLinear.cc.
{}
void DDPixBarStackLinear::execute | ( | DDCompactView & | cpv | ) |
Definition at line 53 of file DDPixBarStackLinear.cc.
References newFWLiteAna::base, centre, childName, funct::cos(), DDSplit(), delta, first, i, LogDebug, number, offset, dbtoconf::parent, phi, DDCompactView::position(), makeMuonMisalignmentScenario::rot, rotMat, edm::second(), funct::sin(), stackoffset, stackoffsetT, AlCaHLTBitMon_QueryRunRegistry::string, theta, and zoffset.
{ DDName mother = parent().name(); DDName child(DDSplit(childName).first, DDSplit(childName).second); DDTranslation direction(sin(theta)*cos(phi),sin(theta)*sin(phi),cos(theta)); DDTranslation base(centre[0],centre[1],centre[2]); DDTranslation zbase(centre[0],zoffset,centre[2]); std::string rotstr = DDSplit(rotMat).first; DDRotation rot; if (rotstr != "NULL") { std::string rotns = DDSplit(rotMat).second; rot = DDRotation(DDName(rotstr, rotns)); } for (int i=0; i<(number/2); i++) { if((stackoffset!=0.0)&&(i!=0)) { if(i%stackoffsetT==0) offset+=stackoffset; } DDTranslation tran = base + (offset + double(i)*delta)*direction; cpv.position (child, mother, 2*i+1, tran, rot); LogDebug("TrackerGeom") << "DDPixBarStackLinear test: " << child << " number " << 2*i+1 << " positioned in " << mother << " at " << tran << " with " << rot; DDTranslation tran2 = base - (offset + double(i)*delta)*direction; cpv.position (child, mother, 2*i+2, tran2, rot); LogDebug("TrackerGeom") << "DDPixBarStackLinear test: " << child << " number " << 2*i+2 << " positioned in " << mother << " at " << tran << " with " << rot; if(zoffset!=0.0){ if((i+1)!=number){ i++; DDTranslation tran3 = zbase + (offset + double(i)*delta)*direction; cpv.position (child, mother, 2*i+1, tran3, rot); LogDebug("TrackerGeom") << "DDPixBarStackLinear test: " << child << " number " << 2*i+1 << " positioned in " << mother << " at " << tran << " with " << rot; DDTranslation tran4 = zbase - (offset + double(i)*delta)*direction; cpv.position (child, mother, 2*i+2, tran4, rot); LogDebug("TrackerGeom") << "DDPixBarStackLinear test: " << child << " number " << 2*i+2 << " positioned in " << mother << " at " << tran << " with " << rot; } } } }
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, DDCurrentNamespace::ns(), number, offset, dbtoconf::parent, phi, rotMat, stackoffset, stackoffsetT, theta, and zoffset.
{ number = int(nArgs["Number"]); theta = nArgs["Theta"]; phi = nArgs["Phi"]; offset = nArgs["Offset"]; delta = nArgs["Delta"]; centre = vArgs["Center"]; rotMat = sArgs["Rotation"]; stackoffset = nArgs["StackOffset"]; stackoffsetT= int(nArgs["StackOffsetT"]); zoffset = nArgs["ZOffset"]; idNameSpace = DDCurrentNamespace::ns(); childName = sArgs["ChildName"]; DDName parentName = parent().name(); LogDebug("TrackerGeom") << "DDPixBarStackLinear debug: Parent " << parentName << "\tChild " << childName << " NameSpace " << idNameSpace << "\tNumber " << number << "\tAxis (theta/phi) " << theta/CLHEP::deg << ", " << phi/CLHEP::deg << "\t(Offset/Delta) " << offset << ", " << delta << "\tCentre " << centre[0] << ", " << centre[1] << ", " << centre[2] << "\tRotation " << rotMat; }
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 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(), and initialize().
double DDPixBarStackLinear::zoffset [private] |
Definition at line 35 of file DDPixBarStackLinear.h.
Referenced by execute(), and initialize().