#include <DDPixBarStackLinearGap.h>
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 |
Definition at line 10 of file DDPixBarStackLinearGap.h.
DDPixBarStackLinearGap::DDPixBarStackLinearGap | ( | ) |
Definition at line 17 of file DDPixBarStackLinearGap.cc.
References LogDebug.
{ LogDebug("TrackerGeom") << "DDPixBarStackLinearGap info: Creating an instance"; }
DDPixBarStackLinearGap::~DDPixBarStackLinearGap | ( | ) | [virtual] |
Definition at line 21 of file DDPixBarStackLinearGap.cc.
{}
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.
{ 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=(number/2)-ringmodules; 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") << "DDPixBarStackLinearGap 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") << "DDPixBarStackLinearGap test: " << child << " number " << 2*i+2 << " positioned in " << mother << " at " << tran2 << " 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") << "DDPixBarStackLinearGap test: " << child << " number " << 2*i+1 << " positioned in " << mother << " at " << tran3 << " with " << rot; DDTranslation tran4 = zbase - (offset + double(i)*delta)*direction; cpv.position (child, mother, 2*i+2, tran4, rot); LogDebug("TrackerGeom") << "DDPixBarStackLinearGap test: " << child << " number " << 2*i+2 << " positioned in " << mother << " at " << tran4 << " with " << rot; } } } }
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.
{ number = int(nArgs["Number"]); ringmodules = int(nArgs["RingModules"]); 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") << "DDPixBarStackLinearGap debug: Parent " << parentName << "\tChild " << childName << " NameSpace " << idNameSpace << "\tNumber " << number <<"\tEndRings "<<ringmodules << "\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> 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().