CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
DDHCalTBZposAlgo Class Reference

#include <DDHCalTBZposAlgo.h>

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 10 of file DDHCalTBZposAlgo.h.

Constructor & Destructor Documentation

DDHCalTBZposAlgo::DDHCalTBZposAlgo ( )

Definition at line 19 of file DDHCalTBZposAlgo.cc.

19  {
20 #ifdef EDM_ML_DEBUG
21  edm::LogVerbatim("HCalGeom") << "DDHCalTBZposAlgo: Creating an instance";
22 #endif
23 }
DDHCalTBZposAlgo::~DDHCalTBZposAlgo ( )
override

Definition at line 25 of file DDHCalTBZposAlgo.cc.

25 {}

Member Function Documentation

void DDHCalTBZposAlgo::execute ( DDCompactView cpv)
override

Definition at line 59 of file DDHCalTBZposAlgo.cc.

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

59  {
60 
61  DDName mother = parent().name();
63 
64  double thetax = 90._deg - theta;
65  double z = zoffset + dist*tan(thetax);
66  double x = shiftX - shiftY*sin(tilt);
67  double y = shiftY*cos(tilt);
68  DDTranslation tran(x,y,z);
70  if (tilt != 0) {
71  std::string rotstr = "R" + formatAsDegrees(tilt);
72  rot = DDRotation(DDName(rotstr, idNameSpace));
73  if (!rot) {
74 #ifdef EDM_ML_DEBUG
75  edm::LogVerbatim("HCalGeom") << "DDHCalZposAlgo: Creating a rotation "
76  << DDName(rotstr,idNameSpace) << "\t90, "
77  << convertRadToDeg(tilt) << ",90,"
78  << (90+convertRadToDeg(tilt)) << ", 0, 0";
79 #endif
80  rot = DDrot(DDName(rotstr, idNameSpace), 90._deg, tilt,
81  90._deg, (90._deg+tilt), 0.0, 0.0);
82  }
83  }
84  cpv.position(child, mother, copyNumber, tran, rot);
85 #ifdef EDM_ML_DEBUG
86  edm::LogVerbatim("HCalGeom") << "DDHCalTBZposAlgo: " << child << " number "
87  << copyNumber << " positioned in " << mother
88  << " at " << tran << " with " << rot;
89 #endif
90 }
std::string idNameSpace
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
constexpr NumType convertRadToDeg(NumType radians)
Definition: GeantUnits.h:98
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:68
U second(std::pair< T, U > const &p)
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
DDRotation DDrot(const DDName &name, std::unique_ptr< DDRotationMatrix > rot)
Definition of a uniquely identifiable rotation matrix named by DDName name.
Definition: DDRotation.cc:80
std::string childName
std::string formatAsDegrees(double radianVal)
Definition: DDTypes.cc:75
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string &copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=0)
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = &#39;:&#39;
Definition: DDSplit.cc:3
void DDHCalTBZposAlgo::initialize ( const DDNumericArguments nArgs,
const DDVectorArguments vArgs,
const DDMapArguments mArgs,
const DDStringArguments sArgs,
const DDStringVectorArguments vsArgs 
)
override

Definition at line 27 of file DDHCalTBZposAlgo.cc.

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

31  {
32 
33  eta = nArgs["Eta"];
34  theta = 2.0*atan(exp(-eta));
35  shiftX = nArgs["ShiftX"];
36  shiftY = nArgs["ShiftY"];
37  zoffset = nArgs["Zoffset"];
38  dist = nArgs["Distance"];
39  tilt = nArgs["TiltAngle"];
40  copyNumber = int (nArgs["Number"]);
41  edm::LogVerbatim("HCalGeom") << "DDHCalTBZposAlgo: Parameters for position"
42  << "ing--" << " Eta " << eta << "\tTheta "
43  << convertRadToDeg(theta) << "\tShifts "
44  << shiftX << ", " << shiftY << " along x, y "
45  << "axes; \tZoffest " << zoffset
46  << "\tRadial Distance " << dist
47  << "\tTilt angle " << convertRadToDeg(tilt)
48  << "\tcopyNumber " << copyNumber;
49 
51  childName = sArgs["ChildName"];
52 #ifdef EDM_ML_DEBUG
53  edm::LogVerbatim("HCalGeom") << "DDHCalTBZposAlgo: Parent " <<parent().name()
54  << "\tChild " << childName << " NameSpace "
55  << idNameSpace;
56 #endif
57 }
std::string idNameSpace
constexpr NumType convertRadToDeg(NumType radians)
Definition: GeantUnits.h:98
static std::string & ns()
std::string childName

Member Data Documentation

std::string DDHCalTBZposAlgo::childName
private

Definition at line 36 of file DDHCalTBZposAlgo.h.

int DDHCalTBZposAlgo::copyNumber
private

Definition at line 33 of file DDHCalTBZposAlgo.h.

double DDHCalTBZposAlgo::dist
private

Definition at line 31 of file DDHCalTBZposAlgo.h.

double DDHCalTBZposAlgo::eta
private

Definition at line 26 of file DDHCalTBZposAlgo.h.

Referenced by Particle.Particle::__str__(), Jet.Jet::jetID(), and Jet.Jet::puJetId().

std::string DDHCalTBZposAlgo::idNameSpace
private

Definition at line 35 of file DDHCalTBZposAlgo.h.

double DDHCalTBZposAlgo::shiftX
private

Definition at line 29 of file DDHCalTBZposAlgo.h.

double DDHCalTBZposAlgo::shiftY
private

Definition at line 28 of file DDHCalTBZposAlgo.h.

double DDHCalTBZposAlgo::theta
private

Definition at line 27 of file DDHCalTBZposAlgo.h.

Referenced by Tau.Tau::zImpact().

double DDHCalTBZposAlgo::tilt
private

Definition at line 32 of file DDHCalTBZposAlgo.h.

double DDHCalTBZposAlgo::zoffset
private

Definition at line 30 of file DDHCalTBZposAlgo.h.