CMS 3D CMS Logo

List of all members | Public Member Functions
ME0GeometryBuilderFromCondDB Class Reference

#include <ME0GeometryBuilderFromCondDB.h>

Public Member Functions

ME0Geometrybuild (const RecoIdealGeometry &rgeo)
 
 ME0GeometryBuilderFromCondDB ()
 
 ~ME0GeometryBuilderFromCondDB ()
 

Detailed Description

Build the ME0Geometry from the DDD description stored in Condition DB

Author
M. Maggi - INFN Bari

Definition at line 20 of file ME0GeometryBuilderFromCondDB.h.

Constructor & Destructor Documentation

◆ ME0GeometryBuilderFromCondDB()

ME0GeometryBuilderFromCondDB::ME0GeometryBuilderFromCondDB ( )

Definition at line 29 of file ME0GeometryBuilderFromCondDB.cc.

29 {}

◆ ~ME0GeometryBuilderFromCondDB()

ME0GeometryBuilderFromCondDB::~ME0GeometryBuilderFromCondDB ( )

Definition at line 31 of file ME0GeometryBuilderFromCondDB.cc.

31 {}

Member Function Documentation

◆ build()

ME0Geometry * ME0GeometryBuilderFromCondDB::build ( const RecoIdealGeometry rgeo)

Definition at line 33 of file ME0GeometryBuilderFromCondDB.cc.

33  {
34  const std::vector<DetId>& detids(rgeo.detIds());
36 
38  std::vector<double>::const_iterator tranStart;
39  std::vector<double>::const_iterator shapeStart;
40  std::vector<double>::const_iterator rotStart;
41  std::vector<std::string>::const_iterator strStart;
42 
43  for (unsigned int id = 0; id < detids.size(); ++id) {
44  ME0DetId me0id(detids[id]);
45 
46  tranStart = rgeo.tranStart(id);
47  shapeStart = rgeo.shapeStart(id);
48  rotStart = rgeo.rotStart(id);
49  strStart = rgeo.strStart(id);
50  name = *(strStart);
51 
53  convertMmToCm(*(tranStart)), convertMmToCm(*(tranStart + 1)), convertMmToCm(*(tranStart + 2)));
54  Surface::RotationType rot(*(rotStart + 0),
55  *(rotStart + 1),
56  *(rotStart + 2),
57  *(rotStart + 3),
58  *(rotStart + 4),
59  *(rotStart + 5),
60  *(rotStart + 6),
61  *(rotStart + 7),
62  *(rotStart + 8));
63 
64  Bounds* bounds = nullptr;
65  float be = convertMmToCm(*(shapeStart + 0));
66  float te = convertMmToCm(*(shapeStart + 1));
67  float ap = convertMmToCm(*(shapeStart + 2));
68  float ti = convertMmToCm(*(shapeStart + 3));
69  float nstrip = *(shapeStart + 4);
70  float npad = *(shapeStart + 5);
71  // TrapezoidalPlaneBounds*
72  bounds = new TrapezoidalPlaneBounds(be, te, ap, ti);
73 
74  std::vector<float> pars;
75  pars.emplace_back(be); //b/2;
76  pars.emplace_back(te); //B/2;
77  pars.emplace_back(ap); //h/2;
78  pars.emplace_back(nstrip);
79  pars.emplace_back(npad);
80 
82 
83  //Change of axes for the forward
84  Basic3DVector<float> newX(1., 0., 0.);
85  Basic3DVector<float> newY(0., 0., 1.);
86  // if (tran[2] > 0. )
87  newY *= -1;
88  Basic3DVector<float> newZ(0., 1., 0.);
89  rot.rotateAxes(newX, newY, newZ);
90 
91  BoundPlane* bp = new BoundPlane(pos, rot, bounds);
93  ME0EtaPartition* mep = new ME0EtaPartition(me0id, surf, e_p_specs);
94  geometry->add(mep);
95  }
96  return geometry;
97 }

References cms::cuda::be, geant_units::operators::convertMmToCm(), RecoIdealGeometry::detIds(), relativeConstraints::geometry, triggerObjects_cff::id, GeomDetEnumerators::ME0, Skims_PA_cff::name, gen::npad, makeMuonMisalignmentScenario::rot, RecoIdealGeometry::rotStart(), RecoIdealGeometry::shapeStart(), AlCaHLTBitMon_QueryRunRegistry::string, RecoIdealGeometry::strStart(), and RecoIdealGeometry::tranStart().

Referenced by ME0GeometryESModule::produce().

TkRotation< float >
ME0Geometry
Definition: ME0Geometry.h:12
geometry
Definition: geometry.py:1
pos
Definition: PixelAliasList.h:18
Bounds
Definition: Bounds.h:18
relativeConstraints.geometry
geometry
Definition: relativeConstraints.py:39
ReferenceCountingPointer
Definition: ReferenceCounted.h:60
RecoIdealGeometry::rotStart
std::vector< double >::const_iterator rotStart(size_t ind) const
Definition: RecoIdealGeometry.h:91
ME0EtaPartitionSpecs
Definition: ME0EtaPartitionSpecs.h:18
Point3DBase< float, GlobalTag >
RecoIdealGeometry::detIds
const std::vector< DetId > & detIds() const
Definition: RecoIdealGeometry.h:85
ME0DetId
Definition: ME0DetId.h:16
TrapezoidalPlaneBounds
Definition: TrapezoidalPlaneBounds.h:15
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
RecoIdealGeometry::tranStart
std::vector< double >::const_iterator tranStart(size_t ind) const
Definition: RecoIdealGeometry.h:87
BoundPlane
Plane BoundPlane
Definition: Plane.h:94
RecoIdealGeometry::strStart
std::vector< std::string >::const_iterator strStart(size_t ind) const
Definition: RecoIdealGeometry.h:101
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
BoundPlane
RecoIdealGeometry::shapeStart
std::vector< double >::const_iterator shapeStart(size_t ind) const
Definition: RecoIdealGeometry.h:95
makeMuonMisalignmentScenario.rot
rot
Definition: makeMuonMisalignmentScenario.py:322
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
gen::npad
int npad
Definition: Cascade2Hadronizer.cc:75
geant_units::operators::convertMmToCm
constexpr NumType convertMmToCm(NumType millimeters)
Definition: GeantUnits.h:63
cms::cuda::be
int be
Definition: HistoContainer.h:75
GeomDetEnumerators::ME0
Definition: GeomDetEnumerators.h:22
Basic3DVector< float >
ME0EtaPartition
Definition: ME0EtaPartition.h:12