PandaRoot
PndLmdGeometryFactory.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 /*
14  * PndLmdGeometryFactory.h
15  *
16  * Created on: Nov 6, 2017
17  * Author: steve
18  */
19 
20 #ifndef LMD_LMDMC_PNDLMDGEOMETRYFACTORY_H_
21 #define LMD_LMDMC_PNDLMDGEOMETRYFACTORY_H_
22 
23 #include <vector>
24 
25 #include <boost/property_tree/ptree.hpp>
26 
27 class TGeoManager;
28 class TGeoVolume;
29 class TGeoVolumeAssembly;
30 class FairGeoLoader;
31 class TGeoNode;
32 
33 typedef std::pair<std::string, bool> StringBoolPair;
34 
36  boost::property_tree::ptree geometry_property_tree;
37  std::vector<StringBoolPair> navigation_paths;
38  TGeoManager *gGeoMan;
39 
40  void retrieveMaterial(FairGeoLoader *geoLoad);
41 
42  TGeoVolume *generateLmdBox() const;
43  TGeoVolume *generateBeamPipe() const;
44 
45  TGeoVolume *generateDetectorHalf(bool is_bottom_half) const;
46  TGeoVolume *generateDetectorHalfPlane(bool is_bottom_half) const;
47  TGeoVolume *generateAluminumCoolingStructure() const;
48  TGeoVolume *generatePCB() const;
49  TGeoVolume *generatePCBMountScrew() const;
50  TGeoVolume *generatePCBCopperPlug() const;
51  TGeoVolume *generatePCBBacksideElectronics() const;
52  TGeoVolume *generateSensorModule() const;
53  TGeoVolume *generateCVDCoolingDisc() const;
54  TGeoVolume *generateSensor() const;
55 
56  TGeoVolume *generateBoxVacuum(const TGeoVolume *lmd_vol) const;
57  void recursiveNodeSubtraction(std::stringstream &ss, TGeoNode *node) const;
58 
59  void makeNodesAlignable() const;
60  void makeNodesAlignable(TGeoNode *node, unsigned int current_navigation_path_index) const;
61 
62  public:
63  PndLmdGeometryFactory(const boost::property_tree::ptree &geometry_property_tree_);
64  virtual ~PndLmdGeometryFactory();
65 
66  void init(FairGeoLoader *geoLoad);
67 
68  TGeoVolumeAssembly *generateLmdGeometry() const;
69 };
70 
71 #endif /* LMD_LMDMC_PNDLMDGEOMETRYFACTORY_H_ */
virtual ~PndLmdGeometryFactory()
PndLmdGeometryFactory(const boost::property_tree::ptree &geometry_property_tree_)
void init(FairGeoLoader *geoLoad)
TGeoVolumeAssembly * generateLmdGeometry() const
std::pair< std::string, bool > StringBoolPair