CMS 3D CMS Logo

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

#include <SmsModeFinder3d.h>

Inheritance diagram for SmsModeFinder3d:
ModeFinder3d

Public Member Functions

SmsModeFinder3dclone () const override
 
GlobalPoint operator() (const std::vector< PointAndDistance > &values) const override
 
 SmsModeFinder3d (const SMS &algo=SMS())
 
- Public Member Functions inherited from ModeFinder3d
virtual ~ModeFinder3d ()
 

Private Attributes

SMS theAlgo
 

Additional Inherited Members

- Public Types inherited from ModeFinder3d
typedef std::pair< GlobalPoint, float > PointAndDistance
 

Detailed Description

Least Median sum of squares mode finder. Works coordinate wise.

Definition at line 9 of file SmsModeFinder3d.h.

Constructor & Destructor Documentation

◆ SmsModeFinder3d()

SmsModeFinder3d::SmsModeFinder3d ( const SMS algo = SMS())

Definition at line 3 of file SmsModeFinder3d.cc.

3 : theAlgo(algo) {}

Referenced by clone().

Member Function Documentation

◆ clone()

SmsModeFinder3d * SmsModeFinder3d::clone ( void  ) const
overridevirtual

Implements ModeFinder3d.

Definition at line 14 of file SmsModeFinder3d.cc.

14 { return new SmsModeFinder3d(*this); }

References SmsModeFinder3d().

◆ operator()()

GlobalPoint SmsModeFinder3d::operator() ( const std::vector< PointAndDistance > &  values) const
overridevirtual

Implements ModeFinder3d.

Definition at line 5 of file SmsModeFinder3d.cc.

5  {
6  std::vector<std::pair<GlobalPoint, float> > weighted;
7  for (std::vector<PointAndDistance>::const_iterator i = values.begin(); i != values.end(); ++i) {
8  float weight = pow(10 + 10000 * i->second, -2);
9  weighted.push_back(std::pair<GlobalPoint, float>(i->first, weight));
10  };
11  return theAlgo.location(weighted);
12 }

References mps_fire::i, SMS::location(), funct::pow(), theAlgo, contentValuesCheck::values, and plotBeamSpotDB::weighted.

Member Data Documentation

◆ theAlgo

SMS SmsModeFinder3d::theAlgo
private

Definition at line 16 of file SmsModeFinder3d.h.

Referenced by operator()().

mps_fire.i
i
Definition: mps_fire.py:428
cmsdt::algo
algo
Definition: constants.h:171
contentValuesCheck.values
values
Definition: contentValuesCheck.py:38
plotBeamSpotDB.weighted
weighted
Definition: plotBeamSpotDB.py:303
SMS::location
GlobalPoint location(const std::vector< GlobalPoint > &) const
Definition: SMS.cc:57
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
SmsModeFinder3d::SmsModeFinder3d
SmsModeFinder3d(const SMS &algo=SMS())
Definition: SmsModeFinder3d.cc:3
SmsModeFinder3d::theAlgo
SMS theAlgo
Definition: SmsModeFinder3d.h:16
weight
Definition: weight.py:1