test
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  * \author N. Amapane - INFN Torino
7  */
8 
11 
13 
14 #include <iostream>
15 
16 using namespace std;
17 
18 MagBSector::MagBSector(vector<MagBRod*>& rods, Geom::Phi<float> phiMin) :
19  theRods(rods),
20  thePhiMin(phiMin)
21 {}
22 
24  for (vector<MagBRod *>::const_iterator irod = theRods.begin();
25  irod != theRods.end(); ++irod) {
26  delete (*irod);
27  }
28 }
29 
30 const MagVolume * MagBSector::findVolume(const GlobalPoint & gp, double tolerance) const {
31  const MagVolume * result = 0;
32  Geom::Phi<float> phi = gp.phi();
33 
34  // FIXME : use a binfinder
35  for(vector<MagBRod*>::const_iterator irod = theRods.begin();
36  irod != theRods.end(); ++irod) {
37  // TOFIX
38  if (verbose::debugOut) cout << " Trying rod at phi " << (*irod)->minPhi()
39  << " " << phi << endl ;
40  result = (*irod)->findVolume(gp, tolerance);
41  if (result!=0) return result;
42  }
43 
44  return 0;
45 }
46 
47 
48 
MagBSector(std::vector< MagBRod * > &rods, Geom::Phi< float > phiMin)
Constructor.
Definition: MagBSector.cc:18
const MagVolume * findVolume(const GlobalPoint &gp, double tolerance) const
Find the volume containing a point, with a given tolerance.
Definition: MagBSector.cc:30
std::vector< MagBRod * > theRods
Definition: MagBSector.h:39
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
tuple result
Definition: mps_fire.py:84
tuple cout
Definition: gather_cfg.py:145
static constexpr bool debugOut
Definition: MagVerbosity.h:17
virtual ~MagBSector()
Destructor.
Definition: MagBSector.cc:23