CMS 3D CMS Logo

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

#include <MagBRod.h>

Public Member Functions

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

Private Attributes

MagBinFinders::GeneralBinFinderInZ< double > * theBinFinder
 
Geom::Phi< float > thePhiMin
 
std::vector< MagBSlab * > theSlabs
 

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 25 of file MagBRod.h.

Constructor & Destructor Documentation

◆ MagBRod()

MagBRod::MagBRod ( std::vector< MagBSlab * > &  slabs,
Geom::Phi< float >  phiMin 
)

Constructor.

Definition at line 18 of file MagBRod.cc.

19  : theSlabs(slabs), thePhiMin(phiMin), theBinFinder(nullptr) {
20  // LogTrace("MagGeometry") << "Building MagBRod with " << theSlabs.size()
21  // << " slabs, minPhi " << thePhiMin << endl;
22 
23  if (theSlabs.size() > 1) { // Set the binfinder
24  vector<double> zBorders;
25  for (vector<MagBSlab *>::const_iterator islab = theSlabs.begin(); islab != theSlabs.end(); ++islab) {
26  LogTrace("MagGeoBuilder") << " MagBSlab minZ=" << (*islab)->minZ() << endl;
27  //FIXME assume layers are already sorted in Z
28  zBorders.push_back((*islab)->minZ());
29  }
31  }
32 }

References LogTrace, theBinFinder, and theSlabs.

◆ ~MagBRod()

MagBRod::~MagBRod ( )
virtual

Destructor.

Definition at line 34 of file MagBRod.cc.

34  {
35  delete theBinFinder;
36 
37  for (vector<MagBSlab *>::const_iterator islab = theSlabs.begin(); islab != theSlabs.end(); ++islab) {
38  delete (*islab);
39  }
40 }

References theBinFinder, and theSlabs.

Member Function Documentation

◆ findVolume()

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

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

Definition at line 42 of file MagBRod.cc.

42  {
43  const MagVolume *result = nullptr;
44  float Z = gp.z();
45 
46  int bin = 0;
47  if (theBinFinder != nullptr) { // true if there is > 1 bin
49  }
50 
51  LogTrace("MagGeometry") << " Trying slab at Z " << theSlabs[bin]->minZ() << " " << Z << endl;
52  result = theSlabs[bin]->findVolume(gp, tolerance);
53  LogTrace("MagGeometry") << "***In guessed bslab" << (result == nullptr ? " failed " : " OK ") << endl;
54 
55  return result;
56 }

References newFWLiteAna::bin, MagBinFinders::GeneralBinFinderInZ< T >::binIndex(), runTauDisplay::gp, LogTrace, mps_fire::result, theBinFinder, theSlabs, tolerance, and BeamSpotPI::Z.

◆ minPhi()

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

Phi of rod start.

Definition at line 37 of file MagBRod.h.

37 { return thePhiMin; }

References thePhiMin.

Member Data Documentation

◆ theBinFinder

MagBinFinders::GeneralBinFinderInZ<double>* MagBRod::theBinFinder
private

Definition at line 42 of file MagBRod.h.

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

◆ thePhiMin

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

Definition at line 41 of file MagBRod.h.

Referenced by minPhi().

◆ theSlabs

std::vector<MagBSlab*> MagBRod::theSlabs
private

Definition at line 40 of file MagBRod.h.

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

MagBRod::theBinFinder
MagBinFinders::GeneralBinFinderInZ< double > * theBinFinder
Definition: MagBRod.h:42
MagBRod::theSlabs
std::vector< MagBSlab * > theSlabs
Definition: MagBRod.h:40
MagBinFinders::GeneralBinFinderInZ::binIndex
int binIndex(T z) const override
returns an index in the valid range for the bin closest to Z
Definition: MagBinFinders.h:139
AlignmentTrackSelector_cfi.phiMin
phiMin
Definition: AlignmentTrackSelector_cfi.py:18
MagBRod::thePhiMin
Geom::Phi< float > thePhiMin
Definition: MagBRod.h:41
runTauDisplay.gp
gp
Definition: runTauDisplay.py:431
MagVolume
Definition: MagVolume.h:13
tolerance
const double tolerance
Definition: HGCalGeomParameters.cc:29
newFWLiteAna.bin
bin
Definition: newFWLiteAna.py:161
mps_fire.result
result
Definition: mps_fire.py:311
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
BeamSpotPI::Z
Definition: BeamSpotPayloadInspectorHelper.h:33
MagBinFinders::GeneralBinFinderInZ< double >