#include <MagneticField/Layers/interface/MagESector.h>
Public Member Functions | |
MagVolume * | findVolume (const GlobalPoint &gp, double tolerance) const |
Find the volume containing a point, with a given tolerance. | |
MagESector (std::vector< MagELayer * > &layers, Geom::Phi< float > phiMin) | |
Constructor. | |
Geom::Phi< float > | minPhi () const |
Phi of sector start. | |
virtual | ~MagESector () |
Destructor. | |
Private Attributes | |
std::vector< MagELayer * > | theLayers |
Geom::Phi< float > | thePhiMin |
One sector is composed of several layers (MagELayer)
Definition at line 20 of file MagESector.h.
Constructor.
MagESector::~MagESector | ( | ) | [virtual] |
Destructor.
Definition at line 26 of file MagESector.cc.
References theLayers.
00026 { 00027 for (vector<MagELayer *>::const_iterator ilay = theLayers.begin(); 00028 ilay != theLayers.end(); ++ilay) { 00029 delete (*ilay); 00030 } 00031 }
MagVolume * MagESector::findVolume | ( | const GlobalPoint & | gp, | |
double | tolerance | |||
) | const |
Find the volume containing a point, with a given tolerance.
Definition at line 34 of file MagESector.cc.
References HLT_VtxMuL3::result, theLayers, and PV3DBase< T, PVType, FrameType >::z().
00034 { 00035 MagVolume * result = 0; 00036 float Z = gp.z(); 00037 00038 // int count = 0; 00039 00040 // FIXME : use a binfinder 00041 for(vector<MagELayer*>::const_reverse_iterator ilay = theLayers.rbegin(); 00042 ilay != theLayers.rend(); ++ilay) { 00043 00044 if (Z+tolerance>(*ilay)->minZ()) { 00045 if (Z-tolerance<(*ilay)->maxZ()) { 00046 // if (verbose.debugOut) cout << " Trying layer at Z " << (*ilay)->minZ() 00047 // << " " << Z << endl ; 00048 result = (*ilay)->findVolume(gp, tolerance); 00049 // if (verbose.debugOut) { 00050 // cout << "***In elayer " << count << " " 00051 // << (result==0? " failed " : " OK ") <<endl; 00052 // ++count; 00053 // } 00054 } else { 00055 // break; // FIXME: OK if sorted by maxZ 00056 } 00057 } 00058 if (result!=0) return result; 00059 } 00060 00061 return 0; 00062 }
Geom::Phi<float> MagESector::minPhi | ( | ) | const [inline] |
Phi of sector start.
Definition at line 32 of file MagESector.h.
References thePhiMin.
00032 {return thePhiMin;}
std::vector<MagELayer*> MagESector::theLayers [private] |
Geom::Phi<float> MagESector::thePhiMin [private] |