CMS 3D CMS Logo

FWTGeoRecoGeometry.h
Go to the documentation of this file.
1 #ifndef GEOMETRY_FWTGEO_RECO_GEOMETRY_H
2 #define GEOMETRY_FWTGEO_RECO_GEOMETRY_H
3 
4 #include <cassert>
5 #include <map>
6 #include <string>
7 #include <vector>
8 
10 
11 class TGeoManager;
12 
14 public:
15  FWTGeoRecoGeometry(void);
16  virtual ~FWTGeoRecoGeometry(void);
17 
18  static const int maxCorner_ = 8;
19  static const int maxPoints_ = 3 * maxCorner_;
20  struct Info {
22  float points[maxPoints_]; // x1,y1,z1...x8,y8,z8,...,x12,y12,z12
23  float topology[9];
24  Info(const std::string& iname) : name(iname) { init(); }
25  Info(void) { init(); }
26  void init(void) {
27  for (unsigned int i = 0; i < maxPoints_; ++i)
28  points[i] = 0;
29  for (unsigned int i = 0; i < 9; ++i)
30  topology[i] = 0;
31  }
32  void fillPoints(std::vector<GlobalPoint>::const_iterator begin, std::vector<GlobalPoint>::const_iterator end) {
33  unsigned int index(0);
34  for (std::vector<GlobalPoint>::const_iterator i = begin; i != end; ++i) {
36  points[index * 3] = i->x();
37  points[index * 3 + 1] = i->y();
38  points[index * 3 + 2] = i->z();
39  ++index;
40  }
41  }
42  };
43  typedef std::map<unsigned int, FWTGeoRecoGeometry::Info> InfoMap;
44 
46 
47  TGeoManager* manager(void) const { return m_manager; }
48  void manager(TGeoManager* geom) { m_manager = geom; }
49 
50 private:
51  TGeoManager* m_manager;
52 };
53 
54 #endif // GEOMETRY_FWTGEO_RECO_GEOMETRY_H
FWTGeoRecoGeometry::Info
Definition: FWTGeoRecoGeometry.h:20
FWTGeoRecoGeometry::idToName
InfoMap idToName
Definition: FWTGeoRecoGeometry.h:45
mps_fire.i
i
Definition: mps_fire.py:355
FWTGeoRecoGeometry::Info::topology
float topology[9]
Definition: FWTGeoRecoGeometry.h:23
FWTGeoRecoGeometry::manager
TGeoManager * manager(void) const
Definition: FWTGeoRecoGeometry.h:47
FWTGeoRecoGeometry::Info::fillPoints
void fillPoints(std::vector< GlobalPoint >::const_iterator begin, std::vector< GlobalPoint >::const_iterator end)
Definition: FWTGeoRecoGeometry.h:32
cms::cuda::assert
assert(be >=bs)
FWTGeoRecoGeometry
Definition: FWTGeoRecoGeometry.h:13
FWTGeoRecoGeometry::m_manager
TGeoManager * m_manager
Definition: FWTGeoRecoGeometry.h:51
FWTGeoRecoGeometry::~FWTGeoRecoGeometry
virtual ~FWTGeoRecoGeometry(void)
Definition: FWTGeoRecoGeometry.cc:5
FWTGeoRecoGeometry::Info::init
void init(void)
Definition: FWTGeoRecoGeometry.h:26
end
#define end
Definition: vmac.h:39
FWTGeoRecoGeometry::Info::points
float points[maxPoints_]
Definition: FWTGeoRecoGeometry.h:22
FWTGeoRecoGeometry::FWTGeoRecoGeometry
FWTGeoRecoGeometry(void)
Definition: FWTGeoRecoGeometry.cc:3
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
FWTGeoRecoGeometry::Info::Info
Info(const std::string &iname)
Definition: FWTGeoRecoGeometry.h:24
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
FWTGeoRecoGeometry::maxPoints_
static const int maxPoints_
Definition: FWTGeoRecoGeometry.h:19
FWTGeoRecoGeometry::maxCorner_
static const int maxCorner_
Definition: FWTGeoRecoGeometry.h:18
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
FWTGeoRecoGeometry::InfoMap
std::map< unsigned int, FWTGeoRecoGeometry::Info > InfoMap
Definition: FWTGeoRecoGeometry.h:43
FWTGeoRecoGeometry::Info::name
std::string name
Definition: FWTGeoRecoGeometry.h:21
FWTGeoRecoGeometry::manager
void manager(TGeoManager *geom)
Definition: FWTGeoRecoGeometry.h:48
GlobalPoint.h
begin
#define begin
Definition: vmac.h:32
FWTGeoRecoGeometry::Info::Info
Info(void)
Definition: FWTGeoRecoGeometry.h:25