Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4CylinderGeomContainer.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4CylinderGeomContainer.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef G4DETECTORS_PHG4CYLINDERGEOMCONTAINER_H
4 #define G4DETECTORS_PHG4CYLINDERGEOMCONTAINER_H
5 
6 #include <phool/PHObject.h>
7 
8 #include <iostream> // for cout, ostream
9 #include <limits>
10 #include <map>
11 #include <utility> // for make_pair, pair
12 
13 class PHG4CylinderGeom;
14 
16 {
17  public:
18  using Map = std::map<int, PHG4CylinderGeom *>;
19  using Iterator = Map::iterator;
20  using ConstIterator = Map::const_iterator;
21  using Range = std::pair<Iterator, Iterator>;
22  using ConstRange = std::pair<ConstIterator, ConstIterator>;
23 
24  PHG4CylinderGeomContainer() = default;
25  ~PHG4CylinderGeomContainer() override;
26 
27  // from PHObject
28  void identify(std::ostream &os = std::cout) const override;
29 
30  int AddLayerGeom(const int i, PHG4CylinderGeom *mygeom);
31  int AddLayerGeom(PHG4CylinderGeom *mygeom);
32  PHG4CylinderGeom *GetLayerGeom(const int i);
34  int get_NLayers() const { return layergeoms.size(); }
35  ConstRange get_begin_end() const { return std::make_pair(layergeoms.begin(), layergeoms.end()); }
36 
37  protected:
39  float magfield {std::numeric_limits<float>::quiet_NaN()};
40  ClassDefOverride(PHG4CylinderGeomContainer, 1)
41 };
42 
43 #endif