CMS 3D CMS Logo

MagBSector Class Reference

A container of volumes in the barrel. More...

#include <MagneticField/Layers/interface/MagBSector.h>

List of all members.

Public Member Functions

MagVolumefindVolume (const GlobalPoint &gp, double tolerance) const
 Find the volume containing a point, with a given tolerance.
 MagBSector (std::vector< MagBRod * > &rods, Geom::Phi< float > phiMin)
 Constructor.
Geom::Phi< float > minPhi () const
 Phi of sector start.
virtual ~MagBSector ()
 Destructor.

Private Attributes

Geom::Phi< float > thePhiMin
std::vector< MagBRod * > theRods


Detailed Description

A container of volumes in the barrel.

It is part of the hierarchical organisation of barrel volumes:

A barrel layer (MagBLayer) groups volumes at the same distance to the origin. It consists of 12 sectors in phi (MagBSector). Each sector consists of one or more rods (MagBRods) of equal width in phi. Rods consist of one or more slabs (MagBSlab); each one consisting of one or, in few cases, several volumes with the same lenght in Z.

Date
2007/02/03 16:08:50
Revision
1.2
Author:
N. Amapane - INFN Torino

Definition at line 26 of file MagBSector.h.


Constructor & Destructor Documentation

MagBSector::MagBSector ( std::vector< MagBRod * > &  rods,
Geom::Phi< float >  phiMin 
)

Constructor.

MagBSector::~MagBSector (  )  [virtual]

Destructor.

Definition at line 25 of file MagBSector.cc.

References theRods.

00025                        {
00026   for (vector<MagBRod *>::const_iterator irod = theRods.begin();
00027        irod != theRods.end(); ++irod) {
00028     delete (*irod);
00029   }
00030 }


Member Function Documentation

MagVolume * MagBSector::findVolume ( const GlobalPoint gp,
double  tolerance 
) const

Find the volume containing a point, with a given tolerance.

Definition at line 32 of file MagBSector.cc.

References GenMuonPlsPt100GeV_cfg::cout, verbose::debugOut, lat::endl(), PV3DBase< T, PVType, FrameType >::phi(), phi, HLT_VtxMuL3::result, and theRods.

00032                                                                                  {
00033   MagVolume * result = 0;
00034   Geom::Phi<float> phi = gp.phi();
00035 
00036   // FIXME : use a binfinder
00037   for(vector<MagBRod*>::const_iterator irod = theRods.begin();
00038         irod != theRods.end(); ++irod) {
00039     // TOFIX
00040     if (verbose::debugOut) cout << "     Trying rod at phi " << (*irod)->minPhi()
00041                                 << " " << phi << endl ;
00042     result = (*irod)->findVolume(gp, tolerance);
00043     if (result!=0) return result;
00044   }
00045 
00046   return 0;
00047 }

Geom::Phi<float> MagBSector::minPhi (  )  const [inline]

Phi of sector start.

Definition at line 38 of file MagBSector.h.

References thePhiMin.

00038 {return thePhiMin;}


Member Data Documentation

Geom::Phi<float> MagBSector::thePhiMin [private]

Definition at line 42 of file MagBSector.h.

Referenced by minPhi().

std::vector<MagBRod*> MagBSector::theRods [private]

Definition at line 41 of file MagBSector.h.

Referenced by findVolume(), and ~MagBSector().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:27:56 2009 for CMSSW by  doxygen 1.5.4