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  bool isZSymmetric() const;
47 
48  // FIXME: only for temporary tests, should be removed.
49  const std::vector<MagVolume6Faces*> & barrelVolumes() const {return theBVolumes;}
50  const std::vector<MagVolume6Faces*> & endcapVolumes() const {return theEVolumes;}
51 
52 private:
53 
54  friend class MagGeometryExerciser; // for debug purposes
55 
56  // Linear search (for debug purposes only)
57  MagVolume * findVolume1(const GlobalPoint & gp, double tolerance=0.) const;
58 
59 
60  bool inBarrel(const GlobalPoint& gp) const;
61 
62  mutable MagVolume * lastVolume; // Cache last volume found
63 
64  std::vector<MagBLayer *> theBLayers;
65  std::vector<MagESector *> theESectors;
66 
67  // FIXME: only for temporary tests, should be removed.
68  std::vector<MagVolume6Faces*> theBVolumes;
69  std::vector<MagVolume6Faces*> theEVolumes;
70 
73 
75  bool v_85l;
76 };
77 #endif
78 
Surface::GlobalVector GlobalVector
Definition: MagGeometry.h:28
bool isZSymmetric() const
Definition: MagGeometry.cc:211
const std::vector< MagVolume6Faces * > & barrelVolumes() const
Definition: MagGeometry.h:49
MagVolume * lastVolume
Definition: MagGeometry.h:62
MagVolume * findVolume1(const GlobalPoint &gp, double tolerance=0.) const
Definition: MagGeometry.cc:111
PeriodicBinFinderInPhi< float > * theEndcapBinFinder
Definition: MagGeometry.h:72
~MagGeometry()
Destructor.
Definition: MagGeometry.cc:59
const std::vector< MagVolume6Faces * > & endcapVolumes() const
Definition: MagGeometry.h:50
bool inBarrel(const GlobalPoint &gp) const
Definition: MagGeometry.cc:194
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:71
friend class MagGeometryExerciser
Definition: MagGeometry.h:54
std::vector< MagVolume6Faces * > theEVolumes
Definition: MagGeometry.h:69
std::vector< MagVolume6Faces * > theBVolumes
Definition: MagGeometry.h:68
std::vector< MagESector * > theESectors
Definition: MagGeometry.h:65
Surface::GlobalPoint GlobalPoint
Definition: MagGeometry.h:29
GlobalVector fieldInTesla(const GlobalPoint &gp) const
Return field vector at the specified global point.
Definition: MagGeometry.cc:76
MagVolume * findVolume(const GlobalPoint &gp, double tolerance=0.) const
Find a volume.
Definition: MagGeometry.cc:147
bool cacheLastVolume
Definition: MagGeometry.h:74
std::vector< MagBLayer * > theBLayers
Definition: MagGeometry.h:64