Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
SubDetector.cc
Go to the documentation of this file.
1
10
11namespace pandora
12{
13
15 m_subDetectorName(inputParameters.m_subDetectorName.Get()),
16 m_subDetectorType(inputParameters.m_subDetectorType.Get()),
17 m_innerRCoordinate(inputParameters.m_innerRCoordinate.Get()),
18 m_innerZCoordinate(inputParameters.m_innerZCoordinate.Get()),
19 m_innerPhiCoordinate(inputParameters.m_innerPhiCoordinate.Get()),
20 m_innerSymmetryOrder(inputParameters.m_innerSymmetryOrder.Get()),
21 m_outerRCoordinate(inputParameters.m_outerRCoordinate.Get()),
22 m_outerZCoordinate(inputParameters.m_outerZCoordinate.Get()),
23 m_outerPhiCoordinate(inputParameters.m_outerPhiCoordinate.Get()),
24 m_outerSymmetryOrder(inputParameters.m_outerSymmetryOrder.Get()),
25 m_isMirroredInZ(inputParameters.m_isMirroredInZ.Get()),
26 m_nLayers(inputParameters.m_nLayers.Get())
27{
28 if ((m_innerRCoordinate < 0.f) || (m_outerRCoordinate < 0.f) || (m_isMirroredInZ && ((m_innerZCoordinate < 0.f) || (m_outerZCoordinate < 0.f))))
29 {
30 std::cout << "GeometryPlugin: Invalid coordinate specified for " << m_subDetectorName << std::endl;
31 throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
32 }
33
34 if (m_nLayers != inputParameters.m_layerParametersVector.size())
35 {
36 std::cout << "GeometryPlugin: Invalid number of entries in layer parameters list for " << m_subDetectorName << std::endl;
37 throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
38 }
39
40 for (const object_creation::Geometry::LayerParameters &layerParameters : inputParameters.m_layerParametersVector)
41 {
42 SubDetectorLayer subDetectorLayer(layerParameters.m_closestDistanceToIp.Get(), layerParameters.m_nRadiationLengths.Get(), layerParameters.m_nInteractionLengths.Get());
43 m_subDetectorLayerVector.push_back(subDetectorLayer);
44 }
45}
46
47//------------------------------------------------------------------------------------------------------------------------------------------
48
52
53} // namespace pandora
Header file for the sub detector class.
StatusCodeException class.
SubDetectorLayerVector m_subDetectorLayerVector
The vector of layer parameters for the sub detector section.
float m_innerZCoordinate
Inner cylindrical polar z coordinate, origin interaction point, units mm.
bool m_isMirroredInZ
Whether a second sub detector exists, equivalent to a reflection in z=0 plane.
virtual ~SubDetector()
Destructor.
float m_outerZCoordinate
Outer cylindrical polar z coordinate, origin interaction point, units mm.
unsigned int m_nLayers
The number of layers in the sub detector section.
float m_outerRCoordinate
Outer cylindrical polar r coordinate, origin interaction point, units mm.
float m_innerRCoordinate
Inner cylindrical polar r coordinate, origin interaction point, units mm.
std::string m_subDetectorName
The sub detector name, must uniquely specify a single sub detector.
SubDetector(const object_creation::Geometry::SubDetector::Parameters &inputParameters)
Constructor.