CMS 3D CMS Logo

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

#include <MagCylinder.h>

Inheritance diagram for MagCylinder:
MagVolume GloballyPositioned< float > MagneticField

Public Member Functions

const std::vector< VolumeSide > & faces () const override
 Access to volume faces. More...
 
bool inside (const GlobalPoint &gp, double tolerance=0.) const override
 
bool inside (const LocalPoint &lp, double tolerance=0.) const override
 
 MagCylinder (const PositionType &pos, const RotationType &rot, const std::vector< VolumeSide > &faces, const MagneticFieldProvider< float > *mfp)
 
- Public Member Functions inherited from MagVolume
GlobalVector fieldInTesla (const GlobalPoint &lp) const
 
LocalVector fieldInTesla (const LocalPoint &lp) const
 
::GlobalVector inTesla (const ::GlobalPoint &gp) const override
 
bool isIron () const
 Temporary hack to pass information on material. Will eventually be replaced! More...
 
 MagVolume (const PositionType &pos, const RotationType &rot, const MagneticFieldProvider< float > *mfp, double sf=1.)
 
void ownsFieldProvider (bool o)
 
const MagneticFieldProvider< float > * provider () const
 
void setIsIron (bool iron)
 
 ~MagVolume () override
 
- Public Member Functions inherited from GloballyPositioned< float >
float eta () const
 
 GloballyPositioned ()
 
 GloballyPositioned (const PositionType &pos, const RotationType &rot)
 
void move (const GlobalVector &displacement)
 
float phi () const
 
const PositionTypeposition () const
 
void rotate (const RotationType &rotation)
 
const RotationTyperotation () const
 
GlobalPoint toGlobal (const LocalPoint &lp) const
 
GlobalVector toGlobal (const LocalVector &lv) const
 
Point3DBase< U, GlobalTagtoGlobal (const Point3DBase< U, LocalTag > &lp) const
 
Vector3DBase< U, GlobalTagtoGlobal (const Vector3DBase< U, LocalTag > &lv) const
 
LocalPoint toLocal (const GlobalPoint &gp) const
 
LocalVector toLocal (const GlobalVector &gv) const
 
Point3DBase< U, LocalTagtoLocal (const Point3DBase< U, GlobalTag > &gp) const
 
Vector3DBase< U, LocalTagtoLocal (const Vector3DBase< U, GlobalTag > &gv) const
 
virtual ~GloballyPositioned ()
 
- Public Member Functions inherited from MagneticField
virtual MagneticFieldclone () const
 
GlobalVector inInverseGeV (const GlobalPoint &gp) const
 Field value ad specified global point, in 1/Gev. More...
 
GlobalVector inKGauss (const GlobalPoint &gp) const
 Field value ad specified global point, in KGauss. More...
 
virtual GlobalVector inTesla (const GlobalPoint &gp) const =0
 Field value ad specified global point, in Tesla. More...
 
virtual GlobalVector inTeslaUnchecked (const GlobalPoint &gp) const
 
virtual bool isDefined (const GlobalPoint &) const
 True if the point is within the region where the concrete field. More...
 
 MagneticField ()
 
 MagneticField (const MagneticField &orig)
 
int nominalValue () const
 The nominal field value for this map in kGauss. More...
 
virtual ~MagneticField ()
 

Public Attributes

std::string name
 

Private Attributes

std::vector< VolumeSidetheFaces
 
Scalar theInnerR
 
Scalar theOuterR
 
Scalar theZmax
 
Scalar theZmin
 

Additional Inherited Members

- Public Types inherited from MagVolume
typedef GloballyPositioned< float > Base
 
typedef GloballyPositioned< float >::GlobalPoint GlobalPoint
 
typedef GloballyPositioned< float >::GlobalVector GlobalVector
 
typedef GloballyPositioned< float >::LocalPoint LocalPoint
 
typedef GloballyPositioned< float >::LocalVector LocalVector
 
- Public Types inherited from GloballyPositioned< float >
typedef Point3DBase< float, GlobalTagGlobalPoint
 
typedef Vector3DBase< float, GlobalTagGlobalVector
 
typedef Point3DBase< float, LocalTagLocalPoint
 
typedef Vector3DBase< float, LocalTagLocalVector
 
typedef Point3DBase< float, GlobalTagPositionType
 
typedef TkRotation< float > RotationType
 
typedef float Scalar
 
- Static Public Member Functions inherited from GloballyPositioned< float >
static float iniEta ()
 
static float iniPhi ()
 

Detailed Description

Definition at line 16 of file MagCylinder.h.

Constructor & Destructor Documentation

◆ MagCylinder()

MagCylinder::MagCylinder ( const PositionType pos,
const RotationType rot,
const std::vector< VolumeSide > &  faces,
const MagneticFieldProvider< float > *  mfp 
)

Definition at line 5 of file MagCylinder.cc.

9  : MagVolume(pos, rot, mfp), theFaces(faces), theZmin(0.), theZmax(0.), theInnerR(0.), theOuterR(0.) {
11 
12  unsigned int def = 0;
13  for (std::vector<VolumeSide>::const_iterator i = faces.begin(); i != faces.end(); ++i) {
14  if (i->globalFace() == SurfaceOrientation::zminus) {
15  theZmin = MagVolume::toLocal(i->surface().position()).z();
16  ++def;
17  } else if (i->globalFace() == SurfaceOrientation::zplus) {
18  theZmax = MagVolume::toLocal(i->surface().position()).z();
19  ++def;
20  } else if (i->globalFace() == SurfaceOrientation::outer || i->globalFace() == SurfaceOrientation::inner) {
21  const Cylinder* cyl = dynamic_cast<const Cylinder*>(&(i->surface()));
22  if (cyl == nullptr) {
23  throw MagGeometryError("MagCylinder inner/outer surface is not a cylinder");
24  }
25  if (i->globalFace() == SurfaceOrientation::outer)
26  theOuterR = cyl->radius();
27  else
28  theInnerR = cyl->radius();
29  ++def;
30  }
31  }
32  if (def != faces.size()) {
33  throw MagGeometryError("MagCylinder constructed with wrong number/type of faces");
34  }
35 }

References spu::def(), faces(), mps_fire::i, SurfaceOrientation::inner, SurfaceOrientation::outer, Cylinder::radius(), theInnerR, theOuterR, theZmax, theZmin, GloballyPositioned< float >::toLocal(), z, SurfaceOrientation::zminus, and SurfaceOrientation::zplus.

Member Function Documentation

◆ faces()

const std::vector<VolumeSide>& MagCylinder::faces ( ) const
inlineoverridevirtual

Access to volume faces.

Implements MagVolume.

Definition at line 27 of file MagCylinder.h.

27 { return theFaces; }

References theFaces.

Referenced by MagCylinder().

◆ inside() [1/2]

bool MagCylinder::inside ( const GlobalPoint gp,
double  tolerance = 0. 
) const
overridevirtual

Implements MagVolume.

Definition at line 37 of file MagCylinder.cc.

37 { return inside(toLocal(gp), tolerance); }

References runTauDisplay::gp, tolerance, and GloballyPositioned< float >::toLocal().

◆ inside() [2/2]

bool MagCylinder::inside ( const LocalPoint lp,
double  tolerance = 0. 
) const
overridevirtual

Reimplemented from MagVolume.

Definition at line 39 of file MagCylinder.cc.

39  {
40  Scalar r(lp.perp());
41  return lp.z() > theZmin - tolerance && lp.z() < theZmax + tolerance && r > theInnerR - tolerance &&
42  r < theOuterR + tolerance;
43 }

References alignCSCRings::r, theInnerR, theOuterR, theZmax, theZmin, and tolerance.

Member Data Documentation

◆ name

std::string MagCylinder::name

Definition at line 30 of file MagCylinder.h.

Referenced by ElectronMVAID.ElectronMVAID::__call__(), FWLite.ElectronMVAID::__call__(), dirstructure.Directory::__create_pie_image(), DisplayManager.DisplayManager::__del__(), dqm_interfaces.DirID::__eq__(), dirstructure.Directory::__get_full_path(), dirstructure.Comparison::__get_img_name(), dataset.Dataset::__getDataType(), dataset.Dataset::__getFileInfoList(), dirstructure.Comparison::__make_image(), core.autovars.NTupleVariable::__repr__(), core.autovars.NTupleObjectType::__repr__(), core.autovars.NTupleObject::__repr__(), core.autovars.NTupleCollection::__repr__(), dirstructure.Directory::__repr__(), dqm_interfaces.DirID::__repr__(), dirstructure.Comparison::__repr__(), config.Service::__setattr__(), config.CFG::__str__(), counter.Counter::__str__(), average.Average::__str__(), FWLite.WorkingPoints::_reformat_cut_definitions(), core.autovars.NTupleObjectType::addSubObjects(), core.autovars.NTupleObjectType::addVariables(), core.autovars.NTupleObjectType::allVars(), dataset.CMSDataset::buildListOfFiles(), dataset.LocalDataset::buildListOfFiles(), dataset.CMSDataset::buildListOfFilesDBS(), dirstructure.Directory::calcStats(), validation.Sample::digest(), python.rootplot.utilities.Hist::divide(), python.rootplot.utilities.Hist::divide_wilson(), DisplayManager.DisplayManager::Draw(), core.autovars.NTupleVariable::fillBranch(), core.autovars.NTupleObject::fillBranches(), core.autovars.NTupleCollection::fillBranchesScalar(), core.autovars.NTupleCollection::fillBranchesVector(), core.autovars.NTupleCollection::get_cpp_declaration(), core.autovars.NTupleCollection::get_cpp_wrapper_class(), core.autovars.NTupleCollection::get_py_wrapper_class(), utils.StatisticalTest::get_status(), production_tasks.Task::getname(), dataset.CMSDataset::getPrimaryDatasetEntries(), dataset.PrivateDataset::getPrimaryDatasetEntries(), VIDSelectorBase.VIDSelectorBase::initialize(), core.autovars.NTupleVariable::makeBranch(), core.autovars.NTupleObject::makeBranches(), core.autovars.NTupleCollection::makeBranchesScalar(), core.autovars.NTupleCollection::makeBranchesVector(), dirstructure.Directory::print_report(), dataset.BaseDataset::printInfo(), dataset.Dataset::printInfo(), production_tasks.MonitorJobs::run(), python.rootplot.utilities.Hist::TGraph(), python.rootplot.utilities.Hist::TH1F(), counter.Counter::write(), and average.Average::write().

◆ theFaces

std::vector<VolumeSide> MagCylinder::theFaces
private

Definition at line 34 of file MagCylinder.h.

Referenced by faces().

◆ theInnerR

Scalar MagCylinder::theInnerR
private

Definition at line 37 of file MagCylinder.h.

Referenced by inside(), and MagCylinder().

◆ theOuterR

Scalar MagCylinder::theOuterR
private

Definition at line 38 of file MagCylinder.h.

Referenced by inside(), and MagCylinder().

◆ theZmax

Scalar MagCylinder::theZmax
private

Definition at line 36 of file MagCylinder.h.

Referenced by inside(), and MagCylinder().

◆ theZmin

Scalar MagCylinder::theZmin
private

Definition at line 35 of file MagCylinder.h.

Referenced by inside(), and MagCylinder().

mps_fire.i
i
Definition: mps_fire.py:428
Cylinder::radius
Scalar radius() const
Radius of the cylinder.
Definition: Cylinder.h:64
pos
Definition: PixelAliasList.h:18
MagCylinder::inside
bool inside(const GlobalPoint &gp, double tolerance=0.) const override
Definition: MagCylinder.cc:37
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
MagCylinder::theZmax
Scalar theZmax
Definition: MagCylinder.h:36
SurfaceOrientation::inner
Definition: Surface.h:19
DDAxes::z
SurfaceOrientation::zminus
Definition: Surface.h:19
runTauDisplay.gp
gp
Definition: runTauDisplay.py:431
MagCylinder::faces
const std::vector< VolumeSide > & faces() const override
Access to volume faces.
Definition: MagCylinder.h:27
MagCylinder::theInnerR
Scalar theInnerR
Definition: MagCylinder.h:37
tolerance
const double tolerance
Definition: HGCalGeomParameters.cc:29
MagCylinder::theZmin
Scalar theZmin
Definition: MagCylinder.h:35
alignCSCRings.r
r
Definition: alignCSCRings.py:93
MagGeometryError
Definition: MagExceptions.h:18
GloballyPositioned< float >::toLocal
LocalPoint toLocal(const GlobalPoint &gp) const
Definition: GloballyPositioned.h:98
SurfaceOrientation::zplus
Definition: Surface.h:19
makeMuonMisalignmentScenario.rot
rot
Definition: makeMuonMisalignmentScenario.py:322
SurfaceOrientation::GlobalFace
GlobalFace
Definition: Surface.h:19
Cylinder
Definition: Cylinder.h:19
spu::def
int def(FILE *, FILE *, int)
Definition: SherpackUtilities.cc:14
MagCylinder::theFaces
std::vector< VolumeSide > theFaces
Definition: MagCylinder.h:34
SurfaceOrientation::outer
Definition: Surface.h:19
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
GloballyPositioned< float >::Scalar
float Scalar
Definition: GloballyPositioned.h:20
MagCylinder::theOuterR
Scalar theOuterR
Definition: MagCylinder.h:38
MagVolume::MagVolume
MagVolume(const PositionType &pos, const RotationType &rot, const MagneticFieldProvider< float > *mfp, double sf=1.)
Definition: MagVolume.h:21