Belle II Software development
BeamPipeGeo.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#include <framework/gearbox/GearDir.h>
10#include <ir/dbobjects/BeamPipeGeo.h>
11
12using namespace std;
13using namespace Belle2;
14
15void BeamPipeGeo::initialize(const GearDir& content)
16{
17 //------------------------------
18 // Get BeamPipe geometry parameters from the gearbox
19 //------------------------------
20
21 GearDir cSafety(content, "Safety/");
22 addParameter("Safety.L1", cSafety.getLength("L1"));
23
24 addParameter("LimitStepLength", content.getInt("LimitStepLength"));
25
26 std::vector<std::string> names = {"Lv1SUS", "Lv2OutTi", "Lv2OutBe", "Lv2InBe", "Lv2Paraf", "Lv2Vacuum", "Lv3AuCoat", "Lv1TaFwd", "Lv2VacFwd", "Lv1TaBwd", "Lv2VacBwd", "Flange", "AreaTubeFwd", "Lv1TaLERUp", "Lv1SUSLERUp", "Lv2VacLERUp", "Lv1TaHERDwn", "Lv1SUSHERDwn", "Lv2VacHERDwn", "AreaTubeBwd", "Lv1TaHERUp", "Lv1SUSHERUp", "Lv2VacHERUp", "Lv1TaLERDwn", "Lv1SUSLERDwn", "Lv2VacLERDwn", "PXDMountFwd", "PXDMountBwd", "PXDMountFixtureFwd", "PXDMountFixtureBwd"};
27
28
29
30 for (auto name : names) {
31 GearDir sect(content, name + "/");
32 addParameters(sect, name);
33 }
34
35}
void initialize(const GearDir &content)
Initialze from the gearbox (xml file)
Definition: BeamPipeGeo.cc:15
GearDir is the basic class used for accessing the parameter store.
Definition: GearDir.h:31
void addParameters(const GearDir &content, const std::string &section)
Add parameters from Gearbox.
Definition: IRGeoBase.h:124
void addParameter(const std::string &name, double val)
Add parameter to map of parameters.
Definition: IRGeoBase.h:98
double getLength(const std::string &path="") const noexcept(false)
Get the parameter path as a double converted to the standard length unit.
Definition: Interface.h:259
Abstract base class for different kinds of events.
STL namespace.