CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Static Public Attributes
svgfig.Ellipse Class Reference
Inheritance diagram for svgfig.Ellipse:
svgfig.Curve

Public Member Functions

def __init__ (self, x, y, ax, ay, b, **attr)
 
def __repr__ (self)
 
def Path (self, trans=None, local=False)
 
def SVG (self, trans=None)
 
- Public Member Functions inherited from svgfig.Curve
def __init__ (self, f, low, high, loop=False, **attr)
 
def sample (self, trans=None)
 end nested class More...
 
def subsample (self, left, right, depth, trans=None)
 

Public Attributes

 attr
 
 b
 
 f
 
 high
 
 loop
 
 low
 
- Public Attributes inherited from svgfig.Curve
 attr
 
 f
 
 high
 
 last_samples
 
 loop
 
 low
 

Static Public Attributes

dictionary defaults = {}
 
- Static Public Attributes inherited from svgfig.Curve
dictionary defaults = {}
 
int discontinuity_limit = 5.
 
float linearity_limit = 0.05
 
bool random_sampling = True
 
int recursion_limit = 15
 

Detailed Description

Draws an ellipse from a semimajor vector (ax,ay) and a semiminor
length (b).

Ellipse(x, y, ax, ay, b, attribute=value)

x, y                    required        the center of the ellipse/circle
ax, ay                  required        a vector indicating the length
                                        and direction of the semimajor axis
b                       required        the length of the semiminor axis.
                                        If equal to sqrt(ax2 + ay2), the
                                        ellipse is a circle
attribute=value pairs   keyword list    SVG attributes

(If sqrt(ax**2 + ay**2) is less than b, then (ax,ay) is actually the
semiminor axis.)

Definition at line 2236 of file svgfig.py.

Constructor & Destructor Documentation

◆ __init__()

def svgfig.Ellipse.__init__ (   self,
  x,
  y,
  ax,
  ay,
  b,
**  attr 
)

Definition at line 2258 of file svgfig.py.

2258  def __init__(self, x, y, ax, ay, b, **attr):
2259  self.x, self.y, self.ax, self.ay, self.b = x, y, ax, ay, b
2260 
2261  self.attr = dict(self.defaults)
2262  self.attr.update(attr)
2263 

Member Function Documentation

◆ __repr__()

def svgfig.Ellipse.__repr__ (   self)

Reimplemented from svgfig.Curve.

Definition at line 2255 of file svgfig.py.

2255  def __repr__(self):
2256  return "<Ellipse (%g, %g) a=(%g, %g), b=%g %s>" % (self.x, self.y, self.ax, self.ay, self.b, self.attr)
2257 

References svgfig.SVG.attr, svgfig.Path.attr, svgfig.Curve.attr, TrackFP420.ax(), LocalTrackFit.ax, TrackFP420.ay(), LocalTrackFit.ay, svgfig.Ellipse.b, Quad.x, reco::MuonRPCHitMatch.x, RPFlatParams::EP.x, reco::PixelClusterProperties.x, BeamSpotPOD.x, stAPVGain.x, gen::PdfInfo.x, MadKinematicDescriptor.x, EnergyDepositUnit.x(), AmplitudeSegmentFP420.x(), TkLayerMap::XYbin.x, TwoBodyDecayParameters.x, SignalPoint.x(), reco::MuonChamberMatch.x, lumiregperbunch.bsmeas.x, EnergySegmentFP420.x(), Geom::Polar2Cartesian< T >.x(), SiStripFineDelayTOF.x(), HFShowerPhoton.x(), SimplePixel.x, ME0DigiPreReco.x(), online::BeamSpot_v1.x, CTPPSTimingRecHit.x(), PixelClusterizerBase::AccretionCluster.x, reco::MuonMETCorrectionData.x(), LHCInterpolatedOpticalFunctionsSet::Kinematics.x, HGCal_helpers::Coordinates.x, CTPPSTimingLocalTrack.x, FTLCluster::FTLHit.x(), EcalTBHodoscopeRecInfoAlgo::BeamTrack.x, reco::MuonSegmentMatch.x, SiPixelCluster::Pixel.x, PhiInterval.x, ClusterShape.x, BSvsPVHistogramMaker.x(), VertexType.x, RHStopTracer::StopPoint.x, BeamSpotFakeConditions.x, TotemTestHistoClass::Hit.x, MTDClusterizerBase::AccretionCluster.x, PGlobalSimHit::Vtx.x, HcalForwardAnalysis::Photon.x, PV2DBase< float, PointTag, LocalTag >.x(), PV2DBase< T, VectorTag, FrameTag >.x(), PV2DBase< float, VectorTag, GlobalTag >.x(), PV2DBase< T, PointTag, FrameTag >.x(), PV2DBase< double, PointTag, LocalTag >.x(), egPM::AbsEtaNrClus.x, PV2DBase< T, PVType, FrameType >.x(), MTDHit.x, Geom::Cylindrical2Cartesian< T >.x(), Run3ScoutingVertex.x(), ScoutingVertex.x(), MuScleFitMuon.x(), BeamSpotOnline.x(), mathSSE::Rot3< Scalar >.x(), mathSSE::Rot3< double >.x(), mathSSE::Rot3< float >.x(), mathSSE::Rot3< align::Scalar >.x(), mathSSE::Rot3< T >.x(), HGCalRecHitValidation::HitsInfo.x, Pixinfo.x, trklet::L1TStub.x(), egPM::AbsEtaNrClusPhi.x, Hit.x, reco::CastorCell.x(), PV3DBase< float, VectorTag, LocalTag >.x(), PV3DBase< float, PointTag, LocalTag >.x(), PV3DBase< Scalar, VectorTag, GlobalTag >.x(), PV3DBase< T, PointTag, GlobalTag >.x(), PV3DBase< T, VectorTag, FrameTag >.x(), PV3DBase< Scalar, PointTag, GlobalTag >.x(), PV3DBase< T, PointTag, FrameTag >.x(), PV3DBase< float, PointTag, GlobalTag >.x(), PV3DBase< align::Scalar, PointTag, GlobalTag >.x(), PV3DBase< long double, PointTag, GlobalTag >.x(), PV3DBase< T, PVType, FrameType >.x(), HGCalDigiValidation::digiInfo.x, funct::GaussLegendreIntegrator.x, QcdLowPtDQM::Pixel.x(), Basic2DVector< Scalar >.x(), Basic2DVector< double >.x(), Basic2DVector< float >.x(), Basic2DVector< T >.x(), Clust.x, PPSDiamondG4Hit.x(), reco::BeamSpot.x(), MonitorTrackResidualsBase< pixel_or_strip >::HistoXY.x, PixelModule.x, RooCMSShape.x, Geom::Spherical2Cartesian< T >.x(), HGCalSimHitValidation::hitsinfo.x, python.rootplot.utilities.Hist2D.x, egPM::AbsEtaNrClusEt.x, PassiveHit.x(), PixelUnpackingRegions::Module.x, CTPPSLocalTrackLite.x(), Rechit.x, Basic3DVector< long double >.x(), DigitizerUtility::EnergyDepositUnit.x(), VertexClassifier::GeneratedPrimaryVertex.x, HcalForwardAnalysis.x, reco::CastorEgamma.x(), reco::CastorJet.x(), TotemRPG4Hit.x(), PrimaryVertexAnalyzer4PUSlimmed::simPrimaryVertex.x, L1TMuon::TriggerPrimitive::RPCData.x, Geom::Cartesian2Cartesian3D< T >.x(), hit.x, ParabolaFit::Point.x, Basic3DVector< Scalar >.x(), Basic3DVector< float >.x(), Basic3DVector< align::Scalar >.x(), Basic3DVector< T >.x(), GaussianSumUtilities1D::FinderState.x, QcdLowPtDQM::Vertex.x(), l1t::emtf::AMC13Header.x, RecHitsSortedInPhi.x, DigitizerUtility::SignalPoint.x(), XHistogram::position.x, DD4hep_XHistogram::position.x, SiPixelCluster.x(), TrackClassifier::GeneratedPrimaryVertex.x, SiStripRecHitsValid::RecHitProperties.x, PPSPixelG4Hit.x(), PrimaryVertexAnalyzer4PUSlimmed::recoPrimaryVertex.x, reco::CastorCluster.x(), reco::Vertex.x(), mathSSE::Rot2< Scalar >.x(), mathSSE::Rot2< T >.x(), funct::GaussIntegrator.x, cmsdt::metaPrimitive.x, FTLCluster.x(), MuonGeometryArrange::MGACollection.x, SOAFrame< float >.x(), SOAFrame< T >.x(), python.rootplot.utilities.Hist.x, lhef::HEPEUP::FiveVector.x, EPOS::EPOS_Wrapper.x(), BeamSpotOnlineRaw_v4.x, HGCalImagingAlgo::Hexel.x, HitDoublets.x(), HGCalCLUEAlgoT< TILE >::CellsOnLayer.x, hgcal_conditions::positions::HeterogeneousHGCalPositionsMapping.x, reco::CaloCluster.x(), RawParticle.x(), SiPixelDigitizerAlgorithm::EnergyDepositUnit.x(), Rot3< Scalar >.x(), Rot3< double >.x(), Rot3< float >.x(), Rot3< align::Scalar >.x(), Rot3< T >.x(), MuScleFitUtils.x, SiPixelDigitizerAlgorithm::SignalPoint.x(), SiStripTrackingRecHitsValid::RecHitProperties.x, perftools::detail::Hist.x, ecal::multifit::xyz.x, Rot2< Scalar >.x(), Rot2< T >.x(), TkRotation< Scalar >.x(), TkRotation< double >.x(), TkRotation< float >.x(), TkRotation< align::Scalar >.x(), TkRotation< T >.x(), hitfit::Fourvec_Event.x(), PDF.x, TkRotation2D< Scalar >.x(), TkRotation2D< T >.x(), edmStreamStallGrapher.Point.x, svgfig.Plot.x, svgfig.Frame.x, PMuonSimHit::Vtx.x, PTrackerSimHit::Vtx.x, svgfig.Text.x, svgfig.TextGlobal.x, svgfig.VLine.x, Quad.y, RPFlatParams::EP.y, BeamSpotPOD.y, reco::PixelClusterProperties.y, stAPVGain.y, EnergyDepositUnit.y(), TkLayerMap::XYbin.y, AmplitudeSegmentFP420.y(), TwoBodyDecayParameters.y, MadKinematicDescriptor.y, SignalPoint.y(), RPCCluster.y(), CPPFCluster.y(), reco::MuonChamberMatch.y, lumiregperbunch.bsmeas.y, EnergySegmentFP420.y(), Geom::Polar2Cartesian< T >.y(), SiStripFineDelayTOF.y(), HFShowerPhoton.y(), SimplePixel.y, online::BeamSpot_v1.y, ME0DigiPreReco.y(), PixelClusterizerBase::AccretionCluster.y, CTPPSTimingRecHit.y(), reco::MuonMETCorrectionData.y(), HGCal_helpers::Coordinates.y, CTPPSTimingLocalTrack.y, FTLCluster::FTLHit.y(), LHCInterpolatedOpticalFunctionsSet::Kinematics.y, PhiInterval.y, ClusterShape.y, reco::MuonSegmentMatch.y, SiPixelCluster::Pixel.y, BSvsPVHistogramMaker.y(), VertexType.y, BeamSpotFakeConditions.y, RHStopTracer::StopPoint.y, TotemTestHistoClass::Hit.y, MTDClusterizerBase::AccretionCluster.y, PGlobalSimHit::Vtx.y, PV2DBase< float, PointTag, LocalTag >.y(), PV2DBase< T, PointTag, FrameTag >.y(), PV2DBase< T, PVType, FrameType >.y(), PV2DBase< T, VectorTag, FrameTag >.y(), egPM::AbsEtaNrClus.y, PV2DBase< float, VectorTag, GlobalTag >.y(), PV2DBase< double, PointTag, LocalTag >.y(), HcalForwardAnalysis::Photon.y, ScoutingVertex.y(), Run3ScoutingVertex.y(), Geom::Cylindrical2Cartesian< T >.y(), MTDHit.y, MuScleFitMuon.y(), BeamSpotOnline.y(), mathSSE::Rot3< T >.y(), mathSSE::Rot3< Scalar >.y(), mathSSE::Rot3< float >.y(), mathSSE::Rot3< align::Scalar >.y(), mathSSE::Rot3< double >.y(), HGCalRecHitValidation::HitsInfo.y, trklet::L1TStub.y(), Pixinfo.y, egPM::AbsEtaNrClusPhi.y, Hit.y, PV3DBase< T, VectorTag, FrameTag >.y(), PV3DBase< T, PVType, FrameType >.y(), PV3DBase< Scalar, VectorTag, GlobalTag >.y(), PV3DBase< Scalar, PointTag, GlobalTag >.y(), PV3DBase< align::Scalar, PointTag, GlobalTag >.y(), PV3DBase< float, VectorTag, LocalTag >.y(), PV3DBase< float, PointTag, LocalTag >.y(), PV3DBase< T, PointTag, GlobalTag >.y(), PV3DBase< long double, PointTag, GlobalTag >.y(), PV3DBase< float, PointTag, GlobalTag >.y(), PV3DBase< T, PointTag, FrameTag >.y(), HGCalDigiValidation::digiInfo.y, reco::CastorCell.y(), QcdLowPtDQM::Pixel.y(), Clust.y, Basic2DVector< T >.y(), Basic2DVector< Scalar >.y(), Basic2DVector< float >.y(), PPSDiamondG4Hit.y(), Basic2DVector< double >.y(), MonitorTrackResidualsBase< pixel_or_strip >::HistoXY.y, PixelModule.y, reco::BeamSpot.y(), HGCalSimHitValidation::hitsinfo.y, Geom::Spherical2Cartesian< T >.y(), egPM::AbsEtaNrClusEt.y, PassiveHit.y(), python.rootplot.utilities.Hist2D.y, PixelUnpackingRegions::Module.y, Rechit.y, VertexClassifier::GeneratedPrimaryVertex.y, DigitizerUtility::EnergyDepositUnit.y(), Basic3DVector< long double >.y(), HcalForwardAnalysis.y, CTPPSLocalTrackLite.y(), reco::CastorEgamma.y(), reco::CastorJet.y(), PrimaryVertexAnalyzer4PUSlimmed::simPrimaryVertex.y, TotemRPG4Hit.y(), L1TMuon::TriggerPrimitive::RPCData.y, hit.y, Geom::Cartesian2Cartesian3D< T >.y(), ParabolaFit::Point.y, Basic3DVector< align::Scalar >.y(), Basic3DVector< T >.y(), GaussianSumUtilities1D::FinderState.y, Basic3DVector< float >.y(), QcdLowPtDQM::Vertex.y(), Basic3DVector< Scalar >.y(), RecHitsSortedInPhi.y, DigitizerUtility::SignalPoint.y(), reco::Candidate.y(), XHistogram::position.y, DD4hep_XHistogram::position.y, TrackClassifier::GeneratedPrimaryVertex.y, SiStripRecHitsValid::RecHitProperties.y, PPSPixelG4Hit.y(), PrimaryVertexAnalyzer4PUSlimmed::recoPrimaryVertex.y, reco::CastorCluster.y(), SiPixelCluster.y(), contrib::CMSBoostedTauSeedingAlgorithmStructure.y(), reco::Vertex.y(), mathSSE::Rot2< Scalar >.y(), mathSSE::Rot2< T >.y(), FTLCluster.y(), reco::Particle.y(), MuonGeometryArrange::MGACollection.y, SOAFrame< float >.y(), SOAFrame< T >.y(), python.rootplot.utilities.Hist.y, reco::ParticleState.y(), python.rootplot.root2matplotlib.Hist.y, CaloParticle.y(), UrbanMscModel93.y, SimCluster.y(), EPOS::EPOS_Wrapper.y(), reco::LeafCandidate.y(), BeamSpotOnlineRaw_v4.y, TrackingParticle.y(), HGCalImagingAlgo::Hexel.y, HitDoublets.y(), HGCalCLUEAlgoT< TILE >::CellsOnLayer.y, hgcal_conditions::positions::HeterogeneousHGCalPositionsMapping.y, reco::CaloCluster.y(), RawParticle.y(), SiPixelDigitizerAlgorithm::EnergyDepositUnit.y(), Exhume::CrossSection.y, Rot3< Scalar >.y(), Rot3< T >.y(), Rot3< float >.y(), Rot3< align::Scalar >.y(), Rot3< double >.y(), SiPixelDigitizerAlgorithm::SignalPoint.y(), SiStripTrackingRecHitsValid::RecHitProperties.y, ecal::multifit::xyz.y, Rot2< T >.y(), Rot2< Scalar >.y(), TkRotation< double >.y(), TkRotation< Scalar >.y(), TkRotation< T >.y(), TkRotation< float >.y(), TkRotation< align::Scalar >.y(), pat::PackedGenParticle.y(), TkRotation2D< T >.y(), TkRotation2D< Scalar >.y(), edmStreamStallGrapher.Point.y, pat::PackedCandidate.y(), svgfig.Plot.y, svgfig.Frame.y, PMuonSimHit::Vtx.y, svgfig.Curve.Sample.y, PTrackerSimHit::Vtx.y, svgfig.Text.y, svgfig.TextGlobal.y, and svgfig.HLine.y.

Referenced by data_sources.json_file.__str__().

◆ Path()

def svgfig.Ellipse.Path (   self,
  trans = None,
  local = False 
)
Apply the transformation "trans" and return a Path object in
global coordinates.  If local=True, return a Path in local coordinates
(which must be transformed again).

Reimplemented from svgfig.Curve.

Definition at line 2268 of file svgfig.py.

2268  def Path(self, trans=None, local=False):
2269  """Apply the transformation "trans" and return a Path object in
2270  global coordinates. If local=True, return a Path in local coordinates
2271  (which must be transformed again)."""
2272  angle = math.atan2(self.ay, self.ax) + math.pi/2.
2273  bx = self.b * math.cos(angle)
2274  by = self.b * math.sin(angle)
2275 
2276  self.f = lambda t: (self.x + self.ax*math.cos(t) + bx*math.sin(t), self.y + self.ay*math.cos(t) + by*math.sin(t))
2277  self.low = -math.pi
2278  self.high = math.pi
2279  self.loop = True
2280  return Curve.Path(self, trans, local)
2281 

References TrackFP420.ax(), LocalTrackFit.ax, TrackFP420.ay(), LocalTrackFit.ay, and svgfig.Ellipse.b.

◆ SVG()

def svgfig.Ellipse.SVG (   self,
  trans = None 
)
Apply the transformation "trans" and return an SVG object.

Reimplemented from svgfig.Curve.

Definition at line 2264 of file svgfig.py.

2264  def SVG(self, trans=None):
2265  """Apply the transformation "trans" and return an SVG object."""
2266  return self.Path(trans).SVG()
2267 

References SiStripHistoPlotter::PlotParameter.Path, Json::PathArgument.Path, and svgfig.Curve.Path().

Member Data Documentation

◆ attr

svgfig.Ellipse.attr

◆ b

svgfig.Ellipse.b

Definition at line 2259 of file svgfig.py.

Referenced by svgfig.Ellipse.__repr__(), and svgfig.Ellipse.Path().

◆ defaults

dictionary svgfig.Ellipse.defaults = {}
static

Definition at line 2253 of file svgfig.py.

Referenced by tree.Tree.reset(), and tree.Tree.var().

◆ f

svgfig.Ellipse.f

◆ high

svgfig.Ellipse.high

◆ loop

svgfig.Ellipse.loop

Definition at line 2279 of file svgfig.py.

◆ low

svgfig.Ellipse.low
mps_fire.Path
Path
Definition: mps_fire.py:298
update
#define update(a, b)
Definition: TrackClassifier.cc:10