CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
MagBSector Class Reference

#include <MagBSector.h>

Public Member Functions

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

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.

Definition at line 20 of file MagBSector.cc.

20  :
21  theRods(rods),
22  thePhiMin(phiMin)
23 {}
std::vector< MagBRod * > theRods
Definition: MagBSector.h:41
Geom::Phi< float > thePhiMin
Definition: MagBSector.h:42
MagBSector::~MagBSector ( )
virtual

Destructor.

Definition at line 25 of file MagBSector.cc.

References theRods.

25  {
26  for (vector<MagBRod *>::const_iterator irod = theRods.begin();
27  irod != theRods.end(); ++irod) {
28  delete (*irod);
29  }
30 }
std::vector< MagBRod * > theRods
Definition: MagBSector.h:41

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 gather_cfg::cout, verbose::debugOut, phi, PV3DBase< T, PVType, FrameType >::phi(), query::result, and theRods.

32  {
33  MagVolume * result = 0;
34  Geom::Phi<float> phi = gp.phi();
35 
36  // FIXME : use a binfinder
37  for(vector<MagBRod*>::const_iterator irod = theRods.begin();
38  irod != theRods.end(); ++irod) {
39  // TOFIX
40  if (verbose::debugOut) cout << " Trying rod at phi " << (*irod)->minPhi()
41  << " " << phi << endl ;
42  result = (*irod)->findVolume(gp, tolerance);
43  if (result!=0) return result;
44  }
45 
46  return 0;
47 }
std::vector< MagBRod * > theRods
Definition: MagBSector.h:41
Geom::Phi< T > phi() const
Definition: PV3DBase.h:68
static bool debugOut
Definition: MagVerbosity.h:14
tuple result
Definition: query.py:137
tuple cout
Definition: gather_cfg.py:121
Definition: DDAxes.h:10
Geom::Phi<float> MagBSector::minPhi ( ) const
inline

Phi of sector start.

Definition at line 38 of file MagBSector.h.

References thePhiMin.

38 {return thePhiMin;}
Geom::Phi< float > thePhiMin
Definition: MagBSector.h:42

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().