CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
DDPixPhase1FwdDiskAlgo Class Reference
Inheritance diagram for DDPixPhase1FwdDiskAlgo:

Public Member Functions

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

Private Attributes

double anchorR
 
double bladeAngle
 
double bladeTilt
 
vector< double > bladeZShift
 
string childName
 
string flagString
 
string idNameSpace
 
int nBlades
 
string rotName
 
int startCopyNo
 
double zPlane
 

Detailed Description

Definition at line 24 of file DDPixPhase1FwdDiskAlgo.cc.

Constructor & Destructor Documentation

◆ DDPixPhase1FwdDiskAlgo()

DDPixPhase1FwdDiskAlgo::DDPixPhase1FwdDiskAlgo ( )

Definition at line 52 of file DDPixPhase1FwdDiskAlgo.cc.

52  {
53  LogDebug("TrackerGeom") << "DDPixPhase1FwdDiskAlgo info: Creating an instance";
54 }

References LogDebug.

◆ ~DDPixPhase1FwdDiskAlgo()

DDPixPhase1FwdDiskAlgo::~DDPixPhase1FwdDiskAlgo ( )
override

Definition at line 56 of file DDPixPhase1FwdDiskAlgo.cc.

56 {}

Member Function Documentation

◆ execute()

void DDPixPhase1FwdDiskAlgo::execute ( DDCompactView cpv)
override

Definition at line 87 of file DDPixPhase1FwdDiskAlgo.cc.

87  {
88  int copy = startCopyNo;
89  DDName mother = parent().name();
91  string flagSelector = "Y";
92 
93  double deltaPhi = (360. / nBlades) * CLHEP::deg;
94  string rotns = DDSplit(rotName).second;
95  for (int iBlade = 0; iBlade < nBlades; ++iBlade) {
96  if (flagString[iBlade] == flagSelector[0]) {
97  string rotstr = DDSplit(rotName).first + to_string(double(copy));
98 
99  double phi = (iBlade + 0.5) * deltaPhi;
100  double phiy = atan2(cos(phi), -sin(phi));
101  double thety = acos(sin(bladeTilt));
102  double phix = atan2(cos(bladeAngle) * sin(phi) + cos(phi) * sin(bladeTilt) * sin(bladeAngle),
104  double thetx = acos(-cos(bladeTilt) * sin(bladeAngle));
105  double phiz = atan2(sin(phi) * sin(bladeAngle) - cos(phi) * cos(bladeAngle) * sin(bladeTilt),
107  double thetz = acos(cos(bladeTilt) * cos(bladeAngle));
108  DDRotation rot = DDRotation(DDName(rotstr, rotns));
109  if (!rot) {
110  LogDebug("TrackerGeom") << "DDPixPhase1FwdDiskAlgo test: Creating a new "
111  << "rotation: " << rotstr << "\t" << thetx / CLHEP::deg << ", " << phix / CLHEP::deg
112  << ", " << thety / CLHEP::deg << ", " << phiy / CLHEP::deg << ", " << thetz / CLHEP::deg
113  << ", " << phiz / CLHEP::deg;
114  LogDebug("TrackerGeom") << "Rotation Matrix (" << phi / CLHEP::deg << ", " << bladeAngle / CLHEP::deg << ", "
115  << bladeTilt / CLHEP::deg << ") " << cos(phi) * cos(bladeAngle) << ", "
116  << (-sin(phi) * cos(bladeTilt) + cos(phi) * sin(bladeAngle) * sin(bladeTilt)) << ", "
117  << (sin(phi) * sin(bladeTilt) + cos(phi) * sin(bladeAngle) * cos(bladeTilt)) << ", "
118  << sin(phi) * cos(bladeAngle) << ", "
119  << (cos(phi) * cos(bladeTilt) + sin(phi) * sin(bladeAngle) * sin(bladeTilt)) << ", "
120  << (-cos(phi) * sin(bladeTilt) + sin(phi) * sin(bladeAngle) * cos(bladeTilt)) << ", "
121  << -sin(bladeAngle) << ", " << cos(bladeAngle) * sin(bladeTilt) << ", "
122  << cos(bladeAngle) * cos(bladeTilt);
123  rot = DDrot(DDName(rotstr, rotns), thetx, phix, thety, phiy, thetz, phiz);
124  }
125  double xpos = -anchorR * sin(phi);
126  double ypos = anchorR * cos(phi);
127  double zpos = zPlane + bladeZShift[iBlade % nBlades];
128  DDTranslation tran(xpos, ypos, zpos);
129  cpv.position(child, mother, copy, tran, rot);
130  LogDebug("TrackerGeom") << "DDPixPhase1FwdDiskAlgo test: " << child << " number " << copy << " positioned in "
131  << mother << " at " << tran << " with " << rot;
132  }
133  copy++;
134  }
135 }

References submitPVValidationJobs::child, filterCSVwithJSON::copy, funct::cos(), DDrot(), DDSplit(), SiPixelRawToDigiRegional_cfi::deltaPhi, first, LogDebug, class-composition::parent, DDCompactView::position(), makeMuonMisalignmentScenario::rot, cms::rotation_utils::rotName(), edm::second(), and funct::sin().

◆ initialize()

void DDPixPhase1FwdDiskAlgo::initialize ( const DDNumericArguments nArgs,
const DDVectorArguments vArgs,
const DDMapArguments mArgs,
const DDStringArguments sArgs,
const DDStringVectorArguments vsArgs 
)
override

Definition at line 58 of file DDPixPhase1FwdDiskAlgo.cc.

62  {
63  startCopyNo = int(nArgs["StartCopyNo"]);
64  nBlades = int(nArgs["NumberOfBlades"]);
65  bladeAngle = nArgs["BladeAngle"];
66  bladeTilt = -nArgs["BladeTilt"];
67  zPlane = nArgs["BladeCommonZ"];
68  bladeZShift = vArgs["BladeZShift"];
69  anchorR = nArgs["AnchorRadius"];
70 
72  childName = sArgs["ChildName"];
73  rotName = sArgs["RotationName"];
74  flagString = sArgs["FlagString"];
75  DDName parentName = parent().name();
76  LogDebug("TrackerGeom") << "DDPixPhase1FwdDiskAlgo debug: Parent " << parentName << "\tChild " << childName
77  << " NameSpace " << idNameSpace << "\tRot Name " << rotName << "\tCopyNo (Start/Total) "
78  << startCopyNo << ", " << nBlades << "\tAngles " << bladeAngle / CLHEP::deg << ", "
79  << bladeTilt / CLHEP::deg << "\tZshifts " << zPlane << "\tAmnchor Radius " << anchorR;
80 
81  for (int iBlade = 0; iBlade < nBlades; ++iBlade) {
82  LogDebug("TrackerGeom") << "DDPixPhase1FwdDiskAlgo: Blade " << iBlade << " flag " << flagString[iBlade]
83  << " zshift " << bladeZShift[iBlade];
84  }
85 }

References createfilelist::int, LogDebug, DDCurrentNamespace::ns(), class-composition::parent, and cms::rotation_utils::rotName().

Member Data Documentation

◆ anchorR

double DDPixPhase1FwdDiskAlgo::anchorR
private

Definition at line 48 of file DDPixPhase1FwdDiskAlgo.cc.

◆ bladeAngle

double DDPixPhase1FwdDiskAlgo::bladeAngle
private

Definition at line 45 of file DDPixPhase1FwdDiskAlgo.cc.

◆ bladeTilt

double DDPixPhase1FwdDiskAlgo::bladeTilt
private

Definition at line 49 of file DDPixPhase1FwdDiskAlgo.cc.

◆ bladeZShift

vector<double> DDPixPhase1FwdDiskAlgo::bladeZShift
private

Definition at line 47 of file DDPixPhase1FwdDiskAlgo.cc.

◆ childName

string DDPixPhase1FwdDiskAlgo::childName
private

Definition at line 40 of file DDPixPhase1FwdDiskAlgo.cc.

◆ flagString

string DDPixPhase1FwdDiskAlgo::flagString
private

Definition at line 42 of file DDPixPhase1FwdDiskAlgo.cc.

◆ idNameSpace

string DDPixPhase1FwdDiskAlgo::idNameSpace
private

Definition at line 39 of file DDPixPhase1FwdDiskAlgo.cc.

◆ nBlades

int DDPixPhase1FwdDiskAlgo::nBlades
private

Definition at line 43 of file DDPixPhase1FwdDiskAlgo.cc.

◆ rotName

string DDPixPhase1FwdDiskAlgo::rotName
private

Definition at line 41 of file DDPixPhase1FwdDiskAlgo.cc.

◆ startCopyNo

int DDPixPhase1FwdDiskAlgo::startCopyNo
private

Definition at line 44 of file DDPixPhase1FwdDiskAlgo.cc.

◆ zPlane

double DDPixPhase1FwdDiskAlgo::zPlane
private

Definition at line 46 of file DDPixPhase1FwdDiskAlgo.cc.

DDPixPhase1FwdDiskAlgo::startCopyNo
int startCopyNo
Definition: DDPixPhase1FwdDiskAlgo.cc:44
DDPixPhase1FwdDiskAlgo::flagString
string flagString
Definition: DDPixPhase1FwdDiskAlgo.cc:42
DDrot
DDRotation DDrot(const DDName &name, std::unique_ptr< DDRotationMatrix > rot)
Definition of a uniquely identifiable rotation matrix named by DDName name.
Definition: DDRotation.cc:67
DDPixPhase1FwdDiskAlgo::bladeAngle
double bladeAngle
Definition: DDPixPhase1FwdDiskAlgo.cc:45
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
DDName
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:17
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
DDPixPhase1FwdDiskAlgo::bladeZShift
vector< double > bladeZShift
Definition: DDPixPhase1FwdDiskAlgo.cc:47
DDPixPhase1FwdDiskAlgo::anchorR
double anchorR
Definition: DDPixPhase1FwdDiskAlgo.cc:48
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
DDPixPhase1FwdDiskAlgo::nBlades
int nBlades
Definition: DDPixPhase1FwdDiskAlgo.cc:43
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
DDTranslation
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
SiPixelRawToDigiRegional_cfi.deltaPhi
deltaPhi
Definition: SiPixelRawToDigiRegional_cfi.py:9
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:125
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
DDPixPhase1FwdDiskAlgo::bladeTilt
double bladeTilt
Definition: DDPixPhase1FwdDiskAlgo.cc:49
createfilelist.int
int
Definition: createfilelist.py:10
DDPixPhase1FwdDiskAlgo::idNameSpace
string idNameSpace
Definition: DDPixPhase1FwdDiskAlgo.cc:39
DDAxes::phi
submitPVValidationJobs.child
child
Definition: submitPVValidationJobs.py:119
DDCurrentNamespace::ns
static std::string & ns()
Definition: DDCurrentNamespace.cc:3
makeMuonMisalignmentScenario.rot
rot
Definition: makeMuonMisalignmentScenario.py:322
DDPixPhase1FwdDiskAlgo::rotName
string rotName
Definition: DDPixPhase1FwdDiskAlgo.cc:41
DDRotation
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:57
DDPixPhase1FwdDiskAlgo::childName
string childName
Definition: DDPixPhase1FwdDiskAlgo.cc:40
child
Definition: simpleInheritance.h:11
class-composition.parent
parent
Definition: class-composition.py:98
DDSplit
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
Definition: DDSplit.cc:3
DDCompactView::position
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string &copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
Definition: DDCompactView.cc:76
DDPixPhase1FwdDiskAlgo::zPlane
double zPlane
Definition: DDPixPhase1FwdDiskAlgo.cc:46