CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
magneticfield::eLayer Class Reference

#include <eLayer.h>

Public Member Functions

MagELayerbuildMagELayer () const
 Construct the MagELayer upon request. More...
 
 eLayer (handles::const_iterator begin, handles::const_iterator end)
 Constructor from list of volumes. More...
 
 ~eLayer ()=default
 Destructor. More...
 

Private Attributes

MagELayermlayer
 
handles theVolumes
 

Detailed Description

Definition at line 15 of file eLayer.h.

Constructor & Destructor Documentation

◆ eLayer()

eLayer::eLayer ( handles::const_iterator  begin,
handles::const_iterator  end 
)

Constructor from list of volumes.

Definition at line 18 of file eLayer.cc.

18  : theVolumes(begin, end), mlayer(nullptr) {
19  // bool debug=MagGeoBuilderFromDDD::debug;
20 
21  // Sort in R
23 
24  // if (debug) {
25  // cout << " elements: " << theVolumes.size() << " unique volumes: ";
26  // volumeHandle::printUniqueNames(theVolumes.begin(), theVolumes.end());
27  // }
28 }

References precomputed_value_sort(), and theVolumes.

◆ ~eLayer()

magneticfield::eLayer::~eLayer ( )
default

Destructor.

Member Function Documentation

◆ buildMagELayer()

MagELayer * eLayer::buildMagELayer ( ) const

Construct the MagELayer upon request.

Definition at line 40 of file eLayer.cc.

40  {
41  if (mlayer == nullptr) {
42  //FIXME not guaranteed that all volumes in layer have the same zmin
43  // and zmax!
44  double zmin = 1e19;
45  double zmax = -1e19;
46  vector<MagVolume*> mVols;
47  for (handles::const_iterator vol = theVolumes.begin(); vol != theVolumes.end(); ++vol) {
48  mVols.push_back((*vol)->magVolume);
49  zmin = min(zmin, (*vol)->minZ());
50  zmax = max(zmax, (*vol)->maxZ());
51  }
52  mlayer = new MagELayer(mVols, zmin, zmax);
53  }
54  return mlayer;
55 }

References SiStripPI::max, min(), mlayer, theVolumes, SiStripMonitorCluster_cfi::zmax, and SiStripMonitorCluster_cfi::zmin.

Member Data Documentation

◆ mlayer

MagELayer* magneticfield::eLayer::mlayer
mutableprivate

Definition at line 31 of file eLayer.h.

Referenced by buildMagELayer().

◆ theVolumes

handles magneticfield::eLayer::theVolumes
private

Definition at line 30 of file eLayer.h.

Referenced by buildMagELayer(), and eLayer().

MagELayer
Definition: MagELayer.h:16
min
T min(T a, T b)
Definition: MathUtil.h:58
magneticfield::eLayer::mlayer
MagELayer * mlayer
Definition: eLayer.h:31
SiStripMonitorCluster_cfi.zmin
zmin
Definition: SiStripMonitorCluster_cfi.py:200
SiStripMonitorCluster_cfi.zmax
zmax
Definition: SiStripMonitorCluster_cfi.py:201
mps_fire.end
end
Definition: mps_fire.py:242
magneticfield::ExtractR
Definition: BaseVolumeHandle.h:187
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
magneticfield::eLayer::theVolumes
handles theVolumes
Definition: eLayer.h:30
precomputed_value_sort
void precomputed_value_sort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr, const Compare &comp)
Definition: precomputed_value_sort.h:17