1 #ifndef _Cluster1DMerger_H_
2 #define _Cluster1DMerger_H_
46 theEstimator ( other.theEstimator->
clone() ), theBS(other.theBS)
54 std::vector < const T * > sectracks = second.
tracks();
55 for (
typename std::vector< const T * >::const_iterator
i=sectracks.begin();
i!=sectracks.end() ; ++
i )
57 tracks.push_back ( *
i );
66 float newWeight = theEstimator->weight ( tracks );
72 for (
unsigned int i=0;
i<tracks.size(); ++
i) {
75 float err2 = tracks[
i]->dzError(); err2 *= err2;
78 sumUp += tracks[
i]->dz(theBS) * 1/err2;
84 newpos = sumUp/sumDown;
85 newerr = err/tracks.size()/
sqrt(1.0*tracks.size());
void setBeamSpot(const math::XYZPoint &bs)
Cluster1D< T > operator()(const Cluster1D< T > &first, const Cluster1D< T > &second) const
Cluster1DMerger(const WeightEstimator< T > &, const math::XYZPoint &bs=math::XYZPoint(0., 0., 0.))
U second(std::pair< T, U > const &p)
WeightEstimator< T > * theEstimator
std::vector< const T * > tracks() const
Measurement1D position() const
XYZPointD XYZPoint
point in space with cartesian internal representation
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
virtual WeightEstimator * clone() const =0