CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 21 of file ME0GeometryBuilderFromCondDB.h.

Constructor & Destructor Documentation

ME0GeometryBuilderFromCondDB::ME0GeometryBuilderFromCondDB ( )

Implementation of the ME0 Geometry Builder from DDD stored in CondDB

Author
M. Maggi - INFN Bari

Definition at line 27 of file ME0GeometryBuilderFromCondDB.cc.

28 { }
ME0GeometryBuilderFromCondDB::~ME0GeometryBuilderFromCondDB ( )

Definition at line 30 of file ME0GeometryBuilderFromCondDB.cc.

31 { }

Member Function Documentation

ME0Geometry * ME0GeometryBuilderFromCondDB::build ( const RecoIdealGeometry rgeo)

Definition at line 33 of file ME0GeometryBuilderFromCondDB.cc.

References RecoIdealGeometry::detIds(), geometry, GeomDetEnumerators::ME0, mergeVDriftHistosByStation::name, gen::npad, makeMuonMisalignmentScenario::rot, TkRotation< T >::rotateAxes(), RecoIdealGeometry::rotStart(), RecoIdealGeometry::shapeStart(), AlCaHLTBitMon_QueryRunRegistry::string, RecoIdealGeometry::strStart(), and RecoIdealGeometry::tranStart().

Referenced by ME0GeometryESModule::produce().

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