CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
MagBSector Class Reference

#include <MagBSector.h>

Public Member Functions

const 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.

Author
N. Amapane - INFN Torino

Definition at line 24 of file MagBSector.h.

Constructor & Destructor Documentation

◆ MagBSector()

MagBSector::MagBSector ( std::vector< MagBRod * > &  rods,
Geom::Phi< float >  phiMin 
)

Constructor.

Definition at line 18 of file MagBSector.cc.

18 : theRods(rods), thePhiMin(phiMin) {}

◆ ~MagBSector()

MagBSector::~MagBSector ( )
virtual

Destructor.

Definition at line 20 of file MagBSector.cc.

20  {
21  for (vector<MagBRod*>::const_iterator irod = theRods.begin(); irod != theRods.end(); ++irod) {
22  delete (*irod);
23  }
24 }

References theRods.

Member Function Documentation

◆ findVolume()

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

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

Definition at line 26 of file MagBSector.cc.

26  {
27  const MagVolume* result = nullptr;
28  Geom::Phi<float> phi = gp.phi();
29 
30  // FIXME : use a binfinder
31  for (vector<MagBRod*>::const_iterator irod = theRods.begin(); irod != theRods.end(); ++irod) {
32  LogTrace("MagGeometry") << " Trying rod at phi " << (*irod)->minPhi() << " " << phi << endl;
33  result = (*irod)->findVolume(gp, tolerance);
34  if (result != nullptr)
35  return result;
36  }
37 
38  return nullptr;
39 }

References runTauDisplay::gp, LogTrace, phi, mps_fire::result, theRods, and tolerance.

◆ minPhi()

Geom::Phi<float> MagBSector::minPhi ( ) const
inline

Phi of sector start.

Definition at line 36 of file MagBSector.h.

36 { return thePhiMin; }

References thePhiMin.

Member Data Documentation

◆ thePhiMin

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

Definition at line 40 of file MagBSector.h.

Referenced by minPhi().

◆ theRods

std::vector<MagBRod*> MagBSector::theRods
private

Definition at line 39 of file MagBSector.h.

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

AlignmentTrackSelector_cfi.phiMin
phiMin
Definition: AlignmentTrackSelector_cfi.py:18
runTauDisplay.gp
gp
Definition: runTauDisplay.py:431
MagVolume
Definition: MagVolume.h:13
tolerance
const double tolerance
Definition: HGCalGeomParameters.cc:29
Geom::Phi< float >
DDAxes::phi
MagBSector::theRods
std::vector< MagBRod * > theRods
Definition: MagBSector.h:39
MagBSector::thePhiMin
Geom::Phi< float > thePhiMin
Definition: MagBSector.h:40
mps_fire.result
result
Definition: mps_fire.py:311
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234