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
MagESector Class Reference

#include <MagESector.h>

Public Member Functions

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

Private Attributes

std::vector< MagELayer * > theLayers
 
Geom::Phi< float > thePhiMin
 

Detailed Description

A sector of volumes in the endcap. One sector is composed of several layers (MagELayer)

Author
N. Amapane - INFN Torino

Definition at line 18 of file MagESector.h.

Constructor & Destructor Documentation

MagESector::MagESector ( std::vector< MagELayer * > &  layers,
Geom::Phi< float >  phiMin 
)

Constructor.

Definition at line 18 of file MagESector.cc.

18  :
20  thePhiMin(phiMin)
21 {}
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
Geom::Phi< float > thePhiMin
Definition: MagESector.h:34
std::vector< MagELayer * > theLayers
Definition: MagESector.h:33
MagESector::~MagESector ( )
virtual

Destructor.

Definition at line 24 of file MagESector.cc.

References theLayers.

24  {
25  for (vector<MagELayer *>::const_iterator ilay = theLayers.begin();
26  ilay != theLayers.end(); ++ilay) {
27  delete (*ilay);
28  }
29 }
std::vector< MagELayer * > theLayers
Definition: MagESector.h:33

Member Function Documentation

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

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

Definition at line 32 of file MagESector.cc.

References query::result, theLayers, Gflash::Z, and PV3DBase< T, PVType, FrameType >::z().

32  {
33  MagVolume * result = 0;
34  float Z = gp.z();
35 
36  // int count = 0;
37 
38  // FIXME : use a binfinder
39  for(vector<MagELayer*>::const_reverse_iterator ilay = theLayers.rbegin();
40  ilay != theLayers.rend(); ++ilay) {
41 
42  if (Z+tolerance>(*ilay)->minZ()) {
43  if (Z-tolerance<(*ilay)->maxZ()) {
44 // if (verbose.debugOut) cout << " Trying layer at Z " << (*ilay)->minZ()
45 // << " " << Z << endl ;
46  result = (*ilay)->findVolume(gp, tolerance);
47 // if (verbose.debugOut) {
48 // cout << "***In elayer " << count << " "
49 // << (result==0? " failed " : " OK ") <<endl;
50 // ++count;
51 // }
52  } else {
53  // break; // FIXME: OK if sorted by maxZ
54  }
55  }
56  if (result!=0) return result;
57  }
58 
59  return 0;
60 }
const double Z[kNumberCalorimeter]
T z() const
Definition: PV3DBase.h:64
tuple result
Definition: query.py:137
std::vector< MagELayer * > theLayers
Definition: MagESector.h:33
Geom::Phi<float> MagESector::minPhi ( ) const
inline

Phi of sector start.

Definition at line 30 of file MagESector.h.

References thePhiMin.

30 {return thePhiMin;}
Geom::Phi< float > thePhiMin
Definition: MagESector.h:34

Member Data Documentation

std::vector<MagELayer*> MagESector::theLayers
private

Definition at line 33 of file MagESector.h.

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

Geom::Phi<float> MagESector::thePhiMin
private

Definition at line 34 of file MagESector.h.

Referenced by minPhi().