CMS 3D CMS Logo

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

Public Member Functions

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

Private Attributes

std::string childName
 
int copyNumber
 
double dist
 
double eta
 
std::string idNameSpace
 
double shiftX
 
double shiftY
 
double theta
 
double tilt
 
double zoffset
 

Detailed Description

Definition at line 25 of file DDHCalTBZposAlgo.cc.

Constructor & Destructor Documentation

◆ DDHCalTBZposAlgo()

DDHCalTBZposAlgo::DDHCalTBZposAlgo ( )

Definition at line 53 of file DDHCalTBZposAlgo.cc.

53  {
54 #ifdef EDM_ML_DEBUG
55  edm::LogVerbatim("HCalGeom") << "DDHCalTBZposAlgo: Creating an instance";
56 #endif
57 }

◆ ~DDHCalTBZposAlgo()

DDHCalTBZposAlgo::~DDHCalTBZposAlgo ( )
override

Definition at line 59 of file DDHCalTBZposAlgo.cc.

59 {}

Member Function Documentation

◆ execute()

void DDHCalTBZposAlgo::execute ( DDCompactView cpv)
override

Definition at line 89 of file DDHCalTBZposAlgo.cc.

89  {
90  DDName mother = parent().name();
92 
93  double thetax = 90._deg - theta;
94  double z = zoffset + dist * tan(thetax);
95  double x = shiftX - shiftY * sin(tilt);
96  double y = shiftY * cos(tilt);
97  DDTranslation tran(x, y, z);
99  if (tilt != 0) {
100  std::string rotstr = "R" + formatAsDegrees(tilt);
101  rot = DDRotation(DDName(rotstr, idNameSpace));
102  if (!rot) {
103 #ifdef EDM_ML_DEBUG
104  edm::LogVerbatim("HCalGeom") << "DDHCalZposAlgo: Creating a rotation " << DDName(rotstr, idNameSpace) << "\t90, "
105  << convertRadToDeg(tilt) << ",90," << (90 + convertRadToDeg(tilt)) << ", 0, 0";
106 #endif
107  rot = DDrot(DDName(rotstr, idNameSpace), 90._deg, tilt, 90._deg, (90._deg + tilt), 0.0, 0.0);
108  }
109  }
110  cpv.position(child, mother, copyNumber, tran, rot);
111 #ifdef EDM_ML_DEBUG
112  edm::LogVerbatim("HCalGeom") << "DDHCalTBZposAlgo: " << child << " number " << copyNumber << " positioned in "
113  << mother << " at " << tran << " with " << rot;
114 #endif
115 }

References submitPVValidationJobs::child, angle_units::operators::convertRadToDeg(), funct::cos(), DDrot(), DDSplit(), first, formatAsDegrees(), class-composition::parent, DDCompactView::position(), makeMuonMisalignmentScenario::rot, edm::second(), funct::sin(), AlCaHLTBitMon_QueryRunRegistry::string, funct::tan(), and theta().

◆ initialize()

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

Definition at line 61 of file DDHCalTBZposAlgo.cc.

65  {
66  eta = nArgs["Eta"];
67  theta = 2.0 * atan(exp(-eta));
68  shiftX = nArgs["ShiftX"];
69  shiftY = nArgs["ShiftY"];
70  zoffset = nArgs["Zoffset"];
71  dist = nArgs["Distance"];
72  tilt = nArgs["TiltAngle"];
73  copyNumber = int(nArgs["Number"]);
74  edm::LogVerbatim("HCalGeom") << "DDHCalTBZposAlgo: Parameters for position"
75  << "ing--"
76  << " Eta " << eta << "\tTheta " << convertRadToDeg(theta) << "\tShifts " << shiftX
77  << ", " << shiftY << " along x, y "
78  << "axes; \tZoffest " << zoffset << "\tRadial Distance " << dist << "\tTilt angle "
79  << convertRadToDeg(tilt) << "\tcopyNumber " << copyNumber;
80 
82  childName = sArgs["ChildName"];
83 #ifdef EDM_ML_DEBUG
84  edm::LogVerbatim("HCalGeom") << "DDHCalTBZposAlgo: Parent " << parent().name() << "\tChild " << childName
85  << " NameSpace " << idNameSpace;
86 #endif
87 }

References angle_units::operators::convertRadToDeg(), PVValHelper::eta, JetChargeProducer_cfi::exp, createfilelist::int, DDCurrentNamespace::ns(), class-composition::parent, and theta().

Member Data Documentation

◆ childName

std::string DDHCalTBZposAlgo::childName
private

Definition at line 50 of file DDHCalTBZposAlgo.cc.

◆ copyNumber

int DDHCalTBZposAlgo::copyNumber
private

Definition at line 47 of file DDHCalTBZposAlgo.cc.

◆ dist

double DDHCalTBZposAlgo::dist
private

Definition at line 45 of file DDHCalTBZposAlgo.cc.

◆ eta

double DDHCalTBZposAlgo::eta
private

◆ idNameSpace

std::string DDHCalTBZposAlgo::idNameSpace
private

Definition at line 49 of file DDHCalTBZposAlgo.cc.

◆ shiftX

double DDHCalTBZposAlgo::shiftX
private

Definition at line 43 of file DDHCalTBZposAlgo.cc.

◆ shiftY

double DDHCalTBZposAlgo::shiftY
private

Definition at line 42 of file DDHCalTBZposAlgo.cc.

◆ theta

double DDHCalTBZposAlgo::theta
private

Definition at line 41 of file DDHCalTBZposAlgo.cc.

Referenced by Tau.Tau::zImpact().

◆ tilt

double DDHCalTBZposAlgo::tilt
private

Definition at line 46 of file DDHCalTBZposAlgo.cc.

◆ zoffset

double DDHCalTBZposAlgo::zoffset
private

Definition at line 44 of file DDHCalTBZposAlgo.cc.

DDAxes::y
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
DDName
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:17
angle_units::operators::convertRadToDeg
constexpr NumType convertRadToDeg(NumType radians)
Definition: angle_units.h:21
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
DDAxes::x
DDHCalTBZposAlgo::shiftX
double shiftX
Definition: DDHCalTBZposAlgo.cc:43
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
DDHCalTBZposAlgo::idNameSpace
std::string idNameSpace
Definition: DDHCalTBZposAlgo.cc:49
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
DDHCalTBZposAlgo::dist
double dist
Definition: DDHCalTBZposAlgo.cc:45
DDTranslation
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
DDAxes::z
DDHCalTBZposAlgo::copyNumber
int copyNumber
Definition: DDHCalTBZposAlgo.cc:47
formatAsDegrees
std::string formatAsDegrees(double radianVal)
Definition: DDTypes.cc:68
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:125
DDHCalTBZposAlgo::tilt
double tilt
Definition: DDHCalTBZposAlgo.cc:46
DDHCalTBZposAlgo::zoffset
double zoffset
Definition: DDHCalTBZposAlgo.cc:44
DDHCalTBZposAlgo::theta
double theta
Definition: DDHCalTBZposAlgo.cc:41
funct::tan
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
createfilelist.int
int
Definition: createfilelist.py:10
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DDHCalTBZposAlgo::eta
double eta
Definition: DDHCalTBZposAlgo.cc:40
submitPVValidationJobs.child
child
Definition: submitPVValidationJobs.py:119
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
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
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
DDHCalTBZposAlgo::childName
std::string childName
Definition: DDHCalTBZposAlgo.cc:50
child
Definition: simpleInheritance.h:11
class-composition.parent
parent
Definition: class-composition.py:98
DDHCalTBZposAlgo::shiftY
double shiftY
Definition: DDHCalTBZposAlgo.cc:42
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