CMS 3D CMS Logo

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

Public Member Functions

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

Private Attributes

vector< double > centre
 
string childName
 
double delta
 
string idNameSpace
 
int incrcn
 
int number
 
double offset
 
double phi
 
string rotMat
 
int startcn
 
double theta
 

Detailed Description

Definition at line 20 of file DDTrackerLinear.cc.

Constructor & Destructor Documentation

◆ DDTrackerLinear()

DDTrackerLinear::DDTrackerLinear ( )

Definition at line 48 of file DDTrackerLinear.cc.

48  : startcn(1), incrcn(1) {
49  LogDebug("TrackerGeom") << "DDTrackerLinear info: Creating an instance";
50 }

References LogDebug.

◆ ~DDTrackerLinear()

DDTrackerLinear::~DDTrackerLinear ( )
override

Definition at line 52 of file DDTrackerLinear.cc.

52 {}

Member Function Documentation

◆ execute()

void DDTrackerLinear::execute ( DDCompactView cpv)
override

Definition at line 86 of file DDTrackerLinear.cc.

86  {
87  DDName mother = parent().name();
89  DDTranslation direction(sin(theta) * cos(phi), sin(theta) * sin(phi), cos(theta));
91  string rotstr = DDSplit(rotMat).first;
93  if (rotstr != "NULL") {
94  string rotns = DDSplit(rotMat).second;
95  rot = DDRotation(DDName(rotstr, rotns));
96  }
97  int ci = startcn;
98  for (int i = 0; i < number; i++) {
99  DDTranslation tran = base + (offset + double(i) * delta) * direction;
100  cpv.position(child, mother, ci, tran, rot);
101  LogDebug("TrackerGeom") << "DDTrackerLinear test: " << child << " number " << ci << " positioned in " << mother
102  << " at " << tran << " with " << rot;
103  ++ci;
104  }
105 }

References newFWLiteAna::base, centre, submitPVValidationJobs::child, childName, funct::cos(), DDSplit(), delta, first, mps_fire::i, LogDebug, number, offset, class-composition::parent, phi, DDCompactView::position(), makeMuonMisalignmentScenario::rot, rotMat, edm::second(), funct::sin(), startcn, and theta.

◆ initialize()

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

Definition at line 54 of file DDTrackerLinear.cc.

58  {
59  number = int(nArgs["Number"]);
60  theta = nArgs["Theta"];
61  phi = nArgs["Phi"];
62  offset = nArgs["Offset"];
63  delta = nArgs["Delta"];
64  centre = vArgs["Center"];
65  rotMat = sArgs["Rotation"];
66  if (nArgs.find("StartCopyNo") != nArgs.end()) {
67  startcn = size_t(nArgs["StartCopyNo"]);
68  } else {
69  startcn = 1;
70  }
71  if (nArgs.find("IncrCopyNo") != nArgs.end()) {
72  incrcn = int(nArgs["IncrCopyNo"]);
73  } else {
74  incrcn = 1;
75  }
76 
78  childName = sArgs["ChildName"];
79  DDName parentName = parent().name();
80  LogDebug("TrackerGeom") << "DDTrackerLinear debug: Parent " << parentName << "\tChild " << childName << " NameSpace "
81  << idNameSpace << "\tNumber " << number << "\tAxis (theta/phi) " << theta / CLHEP::deg << ", "
82  << phi / CLHEP::deg << "\t(Offset/Delta) " << offset << ", " << delta << "\tCentre "
83  << centre[0] << ", " << centre[1] << ", " << centre[2] << "\tRotation " << rotMat;
84 }

References centre, childName, delta, idNameSpace, incrcn, createfilelist::int, LogDebug, DDCurrentNamespace::ns(), number, offset, class-composition::parent, phi, rotMat, startcn, and theta.

Member Data Documentation

◆ centre

vector<double> DDTrackerLinear::centre
private

Definition at line 44 of file DDTrackerLinear.cc.

Referenced by execute(), and initialize().

◆ childName

string DDTrackerLinear::childName
private

Definition at line 36 of file DDTrackerLinear.cc.

Referenced by execute(), and initialize().

◆ delta

double DDTrackerLinear::delta
private

Definition at line 43 of file DDTrackerLinear.cc.

Referenced by execute(), and initialize().

◆ idNameSpace

string DDTrackerLinear::idNameSpace
private

Definition at line 35 of file DDTrackerLinear.cc.

Referenced by initialize().

◆ incrcn

int DDTrackerLinear::incrcn
private

Definition at line 39 of file DDTrackerLinear.cc.

Referenced by initialize().

◆ number

int DDTrackerLinear::number
private

Definition at line 37 of file DDTrackerLinear.cc.

Referenced by execute(), and initialize().

◆ offset

double DDTrackerLinear::offset
private

Definition at line 42 of file DDTrackerLinear.cc.

Referenced by execute(), and initialize().

◆ phi

double DDTrackerLinear::phi
private

◆ rotMat

string DDTrackerLinear::rotMat
private

Definition at line 45 of file DDTrackerLinear.cc.

Referenced by execute(), and initialize().

◆ startcn

int DDTrackerLinear::startcn
private

Definition at line 38 of file DDTrackerLinear.cc.

Referenced by execute(), and initialize().

◆ theta

double DDTrackerLinear::theta
private

Definition at line 40 of file DDTrackerLinear.cc.

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

mps_fire.i
i
Definition: mps_fire.py:428
DDTrackerLinear::offset
double offset
Definition: DDTrackerLinear.cc:42
DDName
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
DDTrackerLinear::centre
vector< double > centre
Definition: DDTrackerLinear.cc:44
DDTrackerLinear::delta
double delta
Definition: DDTrackerLinear.cc:43
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
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
DDTrackerLinear::startcn
int startcn
Definition: DDTrackerLinear.cc:38
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:112
DDTrackerLinear::number
int number
Definition: DDTrackerLinear.cc:37
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
createfilelist.int
int
Definition: createfilelist.py:10
DDTrackerLinear::incrcn
int incrcn
Definition: DDTrackerLinear.cc:39
DDTrackerLinear::rotMat
string rotMat
Definition: DDTrackerLinear.cc:45
submitPVValidationJobs.child
child
Definition: submitPVValidationJobs.py:119
DDCurrentNamespace::ns
static std::string & ns()
Definition: DDCurrentNamespace.cc:3
makeMuonMisalignmentScenario.rot
rot
Definition: makeMuonMisalignmentScenario.py:322
DDRotation
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:57
DDTrackerLinear::idNameSpace
string idNameSpace
Definition: DDTrackerLinear.cc:35
child
Definition: simpleInheritance.h:11
newFWLiteAna.base
base
Definition: newFWLiteAna.py:92
DDTrackerLinear::theta
double theta
Definition: DDTrackerLinear.cc:40
class-composition.parent
parent
Definition: class-composition.py:88
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
DDRotation
ROOT::Math::Rotation3D DDRotation
Definition: DDEcalEndcapAlgo.cc:16
DDTrackerLinear::phi
double phi
Definition: DDTrackerLinear.cc:41
DDTrackerLinear::childName
string childName
Definition: DDTrackerLinear.cc:36