CMS 3D CMS Logo

MagGeometry.h
Go to the documentation of this file.
1 #ifndef MagGeometry_H
2 #define MagGeometry_H
3 
12 
13 #include <vector>
14 #include <atomic>
15 
16 class MagBLayer;
17 class MagESector;
18 class MagVolume;
19 class MagVolume6Faces;
20 template <class T>
22 
23 class MagGeometry {
24 public:
27 
29  MagGeometry(int geomVersion,
30  const std::vector<MagBLayer*>&,
31  const std::vector<MagESector*>&,
32  const std::vector<MagVolume6Faces*>&,
33  const std::vector<MagVolume6Faces*>&);
34  MagGeometry(int geomVersion,
35  const std::vector<MagBLayer const*>&,
36  const std::vector<MagESector const*>&,
37  const std::vector<MagVolume6Faces const*>&,
38  const std::vector<MagVolume6Faces const*>&);
39 
41  ~MagGeometry();
42 
45 
47  MagVolume const* findVolume(const GlobalPoint& gp, double tolerance = 0.) const;
48 
49  // FIXME: only for temporary tests, should be removed.
50  const std::vector<MagVolume6Faces const*>& barrelVolumes() const { return theBVolumes; }
51  const std::vector<MagVolume6Faces const*>& endcapVolumes() const { return theEVolumes; }
52 
53 private:
54  friend class MagGeometryExerciser; // for debug purposes
55 
56  // Linear search (for debug purposes only)
57  MagVolume const* findVolume1(const GlobalPoint& gp, double tolerance = 0.) const;
58 
59  bool inBarrel(const GlobalPoint& gp) const;
60 
61  const int me_; // Instance ID, to trigger cache invalidation at IOV boundaries
62 
63  std::vector<MagBLayer const*> theBLayers;
64  std::vector<MagESector const*> theESectors;
65 
66  // FIXME: only for temporary tests, should be removed.
67  std::vector<MagVolume6Faces const*> theBVolumes;
68  std::vector<MagVolume6Faces const*> theEVolumes;
69 
72 
75 
76  // boundaries of internal barrel-endcap volume separation
77  double theBarrelRsq1;
78  double theBarrelRsq2;
79  double theBarrelZ0;
80  double theBarrelZ1;
81  double theBarrelZ2;
82 };
83 #endif
Vector3DBase
Definition: Vector3DBase.h:8
MagGeometry::geometryVersion
int geometryVersion
Definition: MagGeometry.h:74
MagGeometry::barrelVolumes
const std::vector< MagVolume6Faces const * > & barrelVolumes() const
Definition: MagGeometry.h:50
MagGeometry::theEVolumes
std::vector< MagVolume6Faces const * > theEVolumes
Definition: MagGeometry.h:68
GloballyPositioned< float >::GlobalPoint
Point3DBase< float, GlobalTag > GlobalPoint
Definition: GloballyPositioned.h:23
MagGeometry::GlobalVector
Surface::GlobalVector GlobalVector
Definition: MagGeometry.h:25
MagGeometry::theBarrelBinFinder
MagBinFinders::GeneralBinFinderInR< double > const * theBarrelBinFinder
Definition: MagGeometry.h:70
MagGeometry::theBarrelRsq1
double theBarrelRsq1
Definition: MagGeometry.h:77
MagGeometry::theBarrelZ0
double theBarrelZ0
Definition: MagGeometry.h:79
MagGeometry::~MagGeometry
~MagGeometry()
Destructor.
Definition: MagGeometry.cc:107
MagGeometry::theEndcapBinFinder
PeriodicBinFinderInPhi< float > const * theEndcapBinFinder
Definition: MagGeometry.h:71
MagGeometry::endcapVolumes
const std::vector< MagVolume6Faces const * > & endcapVolumes() const
Definition: MagGeometry.h:51
MagGeometry::theBarrelZ2
double theBarrelZ2
Definition: MagGeometry.h:81
MagVolume6Faces
Definition: MagVolume6Faces.h:23
MagGeometry
Definition: MagGeometry.h:23
MagGeometry::theESectors
std::vector< MagESector const * > theESectors
Definition: MagGeometry.h:64
runTauDisplay.gp
gp
Definition: runTauDisplay.py:431
MagGeometry::MagGeometryExerciser
friend class MagGeometryExerciser
Definition: MagGeometry.h:54
MagVolume
Definition: MagVolume.h:13
tolerance
const double tolerance
Definition: HGCalGeomParameters.cc:29
MagBinFinders.h
MagGeometry::theBarrelRsq2
double theBarrelRsq2
Definition: MagGeometry.h:78
MagGeometry::GlobalPoint
Surface::GlobalPoint GlobalPoint
Definition: MagGeometry.h:26
MagBLayer
Definition: MagBLayer.h:24
MagGeometry::MagGeometry
MagGeometry(int geomVersion, const std::vector< MagBLayer * > &, const std::vector< MagESector * > &, const std::vector< MagVolume6Faces * > &, const std::vector< MagVolume6Faces * > &)
Constructor.
Definition: MagGeometry.cc:32
MagBinFinders::GeneralBinFinderInR< double >
MagGeometry::theBLayers
std::vector< MagBLayer const * > theBLayers
Definition: MagGeometry.h:63
PeriodicBinFinderInPhi
Definition: MagBLayer.h:22
MagGeometry::theBVolumes
std::vector< MagVolume6Faces const * > theBVolumes
Definition: MagGeometry.h:67
MagGeometry::me_
const int me_
Definition: MagGeometry.h:61
MagESector
Definition: MagESector.h:18
MagGeometry::theBarrelZ1
double theBarrelZ1
Definition: MagGeometry.h:80
BoundPlane.h
MagGeometry::findVolume1
MagVolume const * findVolume1(const GlobalPoint &gp, double tolerance=0.) const
Definition: MagGeometry.cc:143
MagGeometry::findVolume
MagVolume const * findVolume(const GlobalPoint &gp, double tolerance=0.) const
Find a volume.
Definition: MagGeometry.cc:184
MagGeometry::fieldInTesla
GlobalVector fieldInTesla(const GlobalPoint &gp) const
Return field vector at the specified global point.
Definition: MagGeometry.cc:123
MagGeometry::inBarrel
bool inBarrel(const GlobalPoint &gp) const
Definition: MagGeometry.cc:237
MagGeometry::cacheLastVolume
bool cacheLastVolume
Definition: MagGeometry.h:73