CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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)
 
void initialize (const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs)
 
virtual ~DDHCalTBZposAlgo ()
 

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 18 of file DDHCalTBZposAlgo.cc.

References LogDebug.

18  {
19  LogDebug("HCalGeom") << "DDHCalTBZposAlgo test: Creating an instance";
20 }
#define LogDebug(id)
DDHCalTBZposAlgo::~DDHCalTBZposAlgo ( )
virtual

Definition at line 22 of file DDHCalTBZposAlgo.cc.

22 {}

Member Function Documentation

void DDHCalTBZposAlgo::execute ( DDCompactView cpv)

Definition at line 53 of file DDHCalTBZposAlgo.cc.

References class-composition::child, funct::cos(), dbl_to_string(), DDrot(), DDSplit(), plotBeamSpotDB::first, LogDebug, dbtoconf::parent, DDCompactView::position(), makeMuonMisalignmentScenario::rot, edm::second(), funct::sin(), AlCaHLTBitMon_QueryRunRegistry::string, funct::tan(), theta(), x, detailsBasic3DVector::y, and detailsBasic3DVector::z.

53  {
54 
55  DDName mother = parent().name();
57 
58  double thetax = 90.*CLHEP::deg - theta;
59  double z = zoffset + dist*tan(thetax);
60  double x = shiftX - shiftY*sin(tilt);
61  double y = shiftY*cos(tilt);
62  DDTranslation tran(x,y,z);
64  double tiltdeg = tilt/CLHEP::deg;
65  int itilt = int(tiltdeg+0.1);
66  if (itilt != 0) {
67  std::string rotstr = "R";
68  if (tiltdeg < 100) rotstr = "R0";
69  rotstr = rotstr + dbl_to_string(tiltdeg);
70  rot = DDRotation(DDName(rotstr, idNameSpace));
71  if (!rot) {
72  LogDebug("HCalGeom") << "DDHCalAngular test: Creating a new rotation "
73  << DDName(rotstr,idNameSpace) << "\t90, " << tiltdeg
74  << ", 90, " << (tiltdeg+90) << ", 0, 0";
75  rot = DDrot(DDName(rotstr, idNameSpace), 90*CLHEP::deg, tilt,
76  90*CLHEP::deg, (90*CLHEP::deg+tilt), 0.0, 0.0);
77  }
78  }
79  cpv.position(child, mother, copyNumber, tran, rot);
80  LogDebug("HCalGeom") << "DDHCalTBZposAlgo test: " << child << " number "
81  << copyNumber << " positioned in " << mother
82  << " at " << tran << " with " << rot;
83 }
#define LogDebug(id)
std::string idNameSpace
list parent
Definition: dbtoconf.py:74
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
void position(const DDLogicalPart &self, const DDLogicalPart &parent, std::string copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=NULL)
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:18
std::string dbl_to_string(const double &in)
Converts only the integer part of a double to a string.
Definition: DDutils.cc:12
float float float z
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:66
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
std::string childName
DDRotation DDrot(const DDName &name, DDRotationMatrix *rot)
Definition of a uniquely identifiable rotation matrix named by DDName name.
Definition: DDRotation.cc:90
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = &#39;:&#39;
Definition: DDSplit.cc:4
Definition: DDAxes.h:10
void DDHCalTBZposAlgo::initialize ( const DDNumericArguments nArgs,
const DDVectorArguments vArgs,
const DDMapArguments mArgs,
const DDStringArguments sArgs,
const DDStringVectorArguments vsArgs 
)

Definition at line 24 of file DDHCalTBZposAlgo.cc.

References eta(), create_public_lumi_plots::exp, LogDebug, DDCurrentNamespace::ns(), dbtoconf::parent, and theta().

28  {
29 
30  eta = nArgs["Eta"];
31  theta = 2.0*atan(exp(-eta));
32  shiftX = nArgs["ShiftX"];
33  shiftY = nArgs["ShiftY"];
34  zoffset = nArgs["Zoffset"];
35  dist = nArgs["Distance"];
36  tilt = nArgs["TiltAngle"];
37  copyNumber = int (nArgs["Number"]);
38  LogDebug("HCalGeom") << "DDHCalTBZposAlgo debug: Parameters for position"
39  << "ing--" << " Eta " << eta << "\tTheta "
40  << theta/CLHEP::deg << "\tShifts " << shiftX << ", "
41  << shiftY << " along x, y axes; \tZoffest " << zoffset
42  << "\tRadial Distance " << dist << "\tTilt angle "
43  << tilt/CLHEP::deg << "\tcopyNumber " << copyNumber;
44 
46  childName = sArgs["ChildName"];
47  DDName parentName = parent().name();
48  LogDebug("HCalGeom") << "DDHCalTBZposAlgo debug: Parent " << parentName
49  << "\tChild " << childName << " NameSpace "
50  << idNameSpace;
51 }
#define LogDebug(id)
std::string idNameSpace
list parent
Definition: dbtoconf.py:74
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:18
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
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.