CMS 3D CMS Logo

MagBRod Class Reference

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

#include <MagneticField/Layers/interface/MagBRod.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.
 MagBRod (std::vector< MagBSlab * > &slabs, Geom::Phi< float > phiMin)
 Constructor.
Geom::Phi< float > minPhi () const
 Phi of rod start.
virtual ~MagBRod ()
 Destructor.

Private Attributes

MagBinFinders::GeneralBinFinderInZ
< double > * 
theBinFinder
Geom::Phi< float > thePhiMin
std::vector< MagBSlab * > theSlabs


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 27 of file MagBRod.h.


Constructor & Destructor Documentation

MagBRod::MagBRod ( std::vector< MagBSlab * > &  slabs,
Geom::Phi< float >  phiMin 
)

Constructor.

MagBRod::~MagBRod (  )  [virtual]

Destructor.

Definition at line 42 of file MagBRod.cc.

References theBinFinder, and theSlabs.

00042                   {
00043   delete theBinFinder;
00044   
00045   for (vector<MagBSlab *>::const_iterator islab = theSlabs.begin();
00046        islab != theSlabs.end(); ++islab) {
00047     delete (*islab);
00048   }
00049 }


Member Function Documentation

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

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

Definition at line 51 of file MagBRod.cc.

References MagBinFinders::GeneralBinFinderInZ< T >::binIndex(), GenMuonPlsPt100GeV_cfg::cout, verbose::debugOut, lat::endl(), HLT_VtxMuL3::result, theBinFinder, theSlabs, and PV3DBase< T, PVType, FrameType >::z().

00051                                                                               {
00052   MagVolume * result = 0;
00053   float Z = gp.z();
00054 
00055   int bin = 0;
00056   if (theBinFinder!=0) { // true if there is > 1 bin
00057     bin = theBinFinder->binIndex(Z);
00058   }
00059   
00060   // TOFIX
00061   if (verbose::debugOut) cout << "       Trying slab at Z " << theSlabs[bin]->minZ()
00062                               << " " << Z << endl ;
00063   result = theSlabs[bin]->findVolume(gp, tolerance);
00064   // TOFIX
00065   if (verbose::debugOut) cout << "***In guessed bslab"
00066                               << (result==0? " failed " : " OK ") <<endl;  
00067 
00068   return result;
00069 }

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

Phi of rod start.

Definition at line 39 of file MagBRod.h.

References thePhiMin.

00039 {return thePhiMin;}


Member Data Documentation

MagBinFinders::GeneralBinFinderInZ<double>* MagBRod::theBinFinder [private]

Definition at line 44 of file MagBRod.h.

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

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

Definition at line 43 of file MagBRod.h.

Referenced by minPhi().

std::vector<MagBSlab*> MagBRod::theSlabs [private]

Definition at line 42 of file MagBRod.h.

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


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