CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MagGeometry.h
Go to the documentation of this file.
1 #ifndef MagGeometry_H
2 #define MagGeometry_H
3 
15 
16 #include <vector>
17 
18 class MagBLayer;
19 class MagESector;
20 class MagVolume;
21 class MagVolume6Faces;
22 template <class T> class PeriodicBinFinderInPhi;
23 namespace edm {class ParameterSet;}
24 
25 class MagGeometry {
26 public:
27 
30 
32  MagGeometry(const edm::ParameterSet& config, std::vector<MagBLayer *> ,
33  std::vector<MagESector *> ,
34  std::vector<MagVolume6Faces*> ,
35  std::vector<MagVolume6Faces*> );
36 
38  ~MagGeometry();
39 
41  GlobalVector fieldInTesla(const GlobalPoint & gp) const;
42 
44  MagVolume * findVolume(const GlobalPoint & gp, double tolerance=0.) const;
45 
46  // Deprecated, will be removed
47  bool isZSymmetric() const {return false;}
48 
49  // FIXME: only for temporary tests, should be removed.
50  const std::vector<MagVolume6Faces*> & barrelVolumes() const {return theBVolumes;}
51  const std::vector<MagVolume6Faces*> & endcapVolumes() const {return theEVolumes;}
52 
53 private:
54 
55  friend class MagGeometryExerciser; // for debug purposes
56 
57  // Linear search (for debug purposes only)
58  MagVolume * findVolume1(const GlobalPoint & gp, double tolerance=0.) const;
59 
60 
61  bool inBarrel(const GlobalPoint& gp) const;
62 
63  mutable MagVolume * lastVolume; // Cache last volume found
64 
65  std::vector<MagBLayer *> theBLayers;
66  std::vector<MagESector *> theESectors;
67 
68  // FIXME: only for temporary tests, should be removed.
69  std::vector<MagVolume6Faces*> theBVolumes;
70  std::vector<MagVolume6Faces*> theEVolumes;
71 
74 
77 };
78 #endif
79 
Surface::GlobalVector GlobalVector
Definition: MagGeometry.h:28
bool isZSymmetric() const
Definition: MagGeometry.h:47
const std::vector< MagVolume6Faces * > & barrelVolumes() const
Definition: MagGeometry.h:50
MagVolume * lastVolume
Definition: MagGeometry.h:63
MagVolume * findVolume1(const GlobalPoint &gp, double tolerance=0.) const
Definition: MagGeometry.cc:106
PeriodicBinFinderInPhi< float > * theEndcapBinFinder
Definition: MagGeometry.h:73
~MagGeometry()
Destructor.
Definition: MagGeometry.cc:66
const std::vector< MagVolume6Faces * > & endcapVolumes() const
Definition: MagGeometry.h:51
bool inBarrel(const GlobalPoint &gp) const
Definition: MagGeometry.cc:189
MagGeometry(const edm::ParameterSet &config, std::vector< MagBLayer * >, std::vector< MagESector * >, std::vector< MagVolume6Faces * >, std::vector< MagVolume6Faces * >)
Constructor.
Definition: MagGeometry.cc:25
MagBinFinders::GeneralBinFinderInR< double > * theBarrelBinFinder
Definition: MagGeometry.h:72
friend class MagGeometryExerciser
Definition: MagGeometry.h:55
std::vector< MagVolume6Faces * > theEVolumes
Definition: MagGeometry.h:70
std::vector< MagVolume6Faces * > theBVolumes
Definition: MagGeometry.h:69
std::vector< MagESector * > theESectors
Definition: MagGeometry.h:66
Surface::GlobalPoint GlobalPoint
Definition: MagGeometry.h:29
GlobalVector fieldInTesla(const GlobalPoint &gp) const
Return field vector at the specified global point.
Definition: MagGeometry.cc:83
MagVolume * findVolume(const GlobalPoint &gp, double tolerance=0.) const
Find a volume.
Definition: MagGeometry.cc:142
bool cacheLastVolume
Definition: MagGeometry.h:75
int geometryVersion
Definition: MagGeometry.h:76
std::vector< MagBLayer * > theBLayers
Definition: MagGeometry.h:65