src
Geometry
HGCalCommonData
interface
HGCalGeometryMode.h
Go to the documentation of this file.
1
#ifndef Geometry_HGCalCommonData_HGCalGeometryMode_H
2
#define Geometry_HGCalCommonData_HGCalGeometryMode_H
3
4
#include <algorithm>
5
#include <map>
6
#include <string>
7
#include "
DetectorDescription/Core/interface/DDsvalues.h
"
8
#include "
FWCore/Utilities/interface/Exception.h
"
9
10
template
<
typename
T>
11
class
HGCalStringToEnumParser
{
12
std::map<std::string, T>
enumMap
;
13
14
public
:
15
HGCalStringToEnumParser
(
void
);
16
17
T
parseString
(
const
std::string
&
value
) {
18
typename
std::map<std::string, T>::const_iterator itr =
enumMap
.find(
value
);
19
if
(itr ==
enumMap
.end())
20
throw
cms::Exception
(
"Configuration"
) <<
"the value "
<<
value
<<
" is not defined."
;
21
return
itr->second;
22
}
23
};
24
25
namespace
HGCalGeometryMode
{
26
enum
GeometryMode
{
27
Square
= 0,
28
Hexagon
= 1,
29
HexagonFull
= 2,
30
Hexagon8
= 3,
31
Hexagon8Full
= 4,
32
Trapezoid
= 5,
33
Hexagon8File
= 6,
34
TrapezoidFile
= 7,
35
Hexagon8Module
= 8,
36
TrapezoidModule
= 9,
37
Hexagon8Cassette
= 10,
38
TrapezoidCassette
= 11,
39
Hexagon8CalibCell
= 12,
40
TrapezoidFineCell
= 13,
41
Hexagon8FineCell
= 14,
42
};
43
44
enum
WaferMode
{
Polyhedra
= 0,
ExtrudedPolygon
= 1 };
45
46
// Gets Geometry mode
47
GeometryMode
getGeometryMode
(
const
char
*
s
,
const
DDsvalues_type
&
sv
);
48
GeometryMode
getGeometryMode
(
const
std::string
&
s
);
49
// Gets wafer mode
50
WaferMode
getGeometryWaferMode
(
const
char
*
s
,
const
DDsvalues_type
&
sv
);
51
52
WaferMode
getGeometryWaferMode
(
std::string
&
s
);
53
};
// namespace HGCalGeometryMode
54
55
#endif
HGCalGeometryMode::Hexagon8
Definition:
HGCalGeometryMode.h:30
HGCalGeometryMode::Polyhedra
Definition:
HGCalGeometryMode.h:44
HGCalStringToEnumParser
Definition:
HGCalGeometryMode.h:11
HGCalStringToEnumParser::parseString
T parseString(const std::string &value)
Definition:
HGCalGeometryMode.h:17
HGCalGeometryMode::Trapezoid
Definition:
HGCalGeometryMode.h:32
HGCalGeometryMode::Hexagon8File
Definition:
HGCalGeometryMode.h:33
HGCalGeometryMode::WaferMode
WaferMode
Definition:
HGCalGeometryMode.h:44
HGCalGeometryMode::GeometryMode
GeometryMode
Definition:
HGCalGeometryMode.h:26
HGCalGeometryMode::Hexagon
Definition:
HGCalGeometryMode.h:28
HGCalGeometryMode
Definition:
HGCalGeometryMode.h:25
alignCSCRings.s
s
Definition:
alignCSCRings.py:92
HGCalGeometryMode::TrapezoidFineCell
Definition:
HGCalGeometryMode.h:40
pfDeepBoostedJetPreprocessParams_cfi.sv
sv
Definition:
pfDeepBoostedJetPreprocessParams_cfi.py:352
HGCalGeometryMode::Hexagon8Cassette
Definition:
HGCalGeometryMode.h:37
HGCalGeometryMode::ExtrudedPolygon
Definition:
HGCalGeometryMode.h:44
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
HGCalGeometryMode::getGeometryWaferMode
WaferMode getGeometryWaferMode(const char *s, const DDsvalues_type &sv)
Definition:
HGCalGeometryMode.cc:51
HGCalGeometryMode::Hexagon8Module
Definition:
HGCalGeometryMode.h:35
HGCalGeometryMode::Hexagon8CalibCell
Definition:
HGCalGeometryMode.h:39
HGCalGeometryMode::TrapezoidCassette
Definition:
HGCalGeometryMode.h:38
DDsvalues_type
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
Definition:
DDsvalues.h:12
HGCalStringToEnumParser::enumMap
std::map< std::string, T > enumMap
Definition:
HGCalGeometryMode.h:12
HGCalGeometryMode::Square
Definition:
HGCalGeometryMode.h:27
HGCalGeometryMode::Hexagon8Full
Definition:
HGCalGeometryMode.h:31
HGCalGeometryMode::getGeometryMode
GeometryMode getGeometryMode(const char *s, const DDsvalues_type &sv)
Definition:
HGCalGeometryMode.cc:29
value
Definition:
value.py:1
HGCalGeometryMode::Hexagon8FineCell
Definition:
HGCalGeometryMode.h:41
Exception.h
HGCalGeometryMode::TrapezoidModule
Definition:
HGCalGeometryMode.h:36
HGCalStringToEnumParser::HGCalStringToEnumParser
HGCalStringToEnumParser(void)
cms::Exception
Definition:
Exception.h:59
HGCalGeometryMode::TrapezoidFile
Definition:
HGCalGeometryMode.h:34
DDsvalues.h
HGCalGeometryMode::HexagonFull
Definition:
HGCalGeometryMode.h:29
T
long double T
Definition:
Basic3DVectorLD.h:48
Generated for CMSSW Reference Manual by
1.8.14