CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MagBSector.cc
Go to the documentation of this file.
1 // #include "Utilities/Configuration/interface/Architecture.h"
2 
3 /*
4  * See header file for a description of this class.
5  *
6  * $Date: 2007/02/03 16:15:59 $
7  * $Revision: 1.4 $
8  * \author N. Amapane - INFN Torino
9  */
10 
13 
15 
16 #include <iostream>
17 
18 using namespace std;
19 
20 MagBSector::MagBSector(vector<MagBRod*>& rods, Geom::Phi<float> phiMin) :
21  theRods(rods),
22  thePhiMin(phiMin)
23 {}
24 
26  for (vector<MagBRod *>::const_iterator irod = theRods.begin();
27  irod != theRods.end(); ++irod) {
28  delete (*irod);
29  }
30 }
31 
32 MagVolume * MagBSector::findVolume(const GlobalPoint & gp, double tolerance) const {
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 }
48 
49 
50 
MagBSector(std::vector< MagBRod * > &rods, Geom::Phi< float > phiMin)
Constructor.
Definition: MagBSector.cc:20
MagVolume * findVolume(const GlobalPoint &gp, double tolerance) const
Find the volume containing a point, with a given tolerance.
Definition: MagBSector.cc:32
std::vector< MagBRod * > theRods
Definition: MagBSector.h:41
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
static bool debugOut
Definition: MagVerbosity.h:14
tuple result
Definition: query.py:137
tuple cout
Definition: gather_cfg.py:121
virtual ~MagBSector()
Destructor.
Definition: MagBSector.cc:25
Definition: DDAxes.h:10