16 #include "RecoVertex/MultiVertexFit/interface/DebuggingHarvester.h"
22 vector < reco::TransientTrack >
convert (
23 const vector < const reco::TransientTrack * > & ptrs )
25 vector < reco::TransientTrack >
ret;
26 for ( vector< const reco::TransientTrack * >::const_iterator
i=ptrs.begin();
29 ret.push_back ( **
i );
54 for ( vector< reco::TransientTrack >::const_iterator
i=trks.begin();
i!=trks.end() ; ++
i )
56 if ( rt == ( *
i ) )
return true;
72 GlobalPoint computeJetOrigin (
const vector < reco::TransientTrack > & trks )
75 vector< ModeFinder3d::PointAndDistance>
input;
76 for ( vector< reco::TransientTrack >::const_iterator
i=trks.begin();
80 (
i->impactPointState().globalPosition(), 1. ) );
85 GlobalVector computeJetDirection (
const vector < reco::TransientTrack > & trks )
88 vector< ModeFinder3d::PointAndDistance>
input;
89 for ( vector< reco::TransientTrack >::const_iterator
i=trks.begin();
93 toPoint (
i->impactPointState().globalMomentum() ), 1. ) );
114 &(trks[0].impactPointState().globalParameters().magneticField()) );
116 DebuggingHarvester(
"out.txt").save ( ret ,
"p<sub>tot</sub>" );
121 vector < Cluster1D < reco::TransientTrack > > computeIPs (
122 const vector < reco::TransientTrack > & trks )
126 TwoTrackMinimumDistance ttmd;
127 vector < Cluster1D < reco::TransientTrack > >
pts;
128 for ( vector< reco::TransientTrack >::const_iterator
i=trks.begin();
129 i!=trks.end() ; ++
i )
131 bool status = ttmd.calculate( axis,*(
i->impactPointState().freeState() ) );
133 pair < GlobalPoint, GlobalPoint >
pt = ttmd.points();
134 double d = ( pt.first - pt.second ).
mag();
135 double w = 1. / ( 0.002 + d );
136 double s = ( pt.first - axis.position() ).
mag();
138 vector < const reco::TransientTrack * > trk;
139 trk.push_back ( &(*
i) );
163 bool ascending=
false,
bool kalmanfit=
false )
166 vector < const reco::TransientTrack * > trkptrs=src.
tracks();
167 vector < reco::TransientTrack > trks =
convert ( trkptrs );
178 float w=1.0;
float r=0.5;
179 if ( ascending ) { w =
pow ( (
float) 0.5, (
int) (trks.size()-1) ); r=2.0; };
180 for ( vector< reco::TransientTrack >::const_iterator
i=trks.begin();
181 i!=trks.end() ; ++
i )
210 const vector < reco::TransientTrack > & trks,
217 const vector < reco::TransientTrack > & trks )
const
219 vector < Cluster1D < reco::TransientTrack > > ips = computeIPs ( trks );
226 pair < vector < Cluster1D<reco::TransientTrack> >,
227 vector < const reco::TransientTrack * > > res;
228 res = finder ( ips );
232 map < string, harvest::MultiType > attrs;
233 attrs[
"point:mag"]=0.75;
234 attrs[
"point:color"]=
"blue";
235 attrs[
"point:name"]=
"mode";
236 DebuggingHarvester(
"out.txt").save ( res.first, jet, attrs,
"mode" );
239 vector < TransientVertex >
ret;
241 i!=res.first.end() ; ++
i )
243 ret.push_back ( pseudoVertexFit ( *
i,
i!=res.first.begin(),
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
virtual CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &tracks) const
std::map< reco::TransientTrack, float > TransientTrackToFloatMap
Global3DPoint GlobalPoint
std::pair< GlobalPoint, float > PointAndDistance
static std::string const input
static const double pts[33]
std::vector< reco::TransientTrack > const & originalTracks() const
GlobalPoint position() const
GlobalVector momentum() const
MultiVertexBSeeder * clone() const
std::vector< const T * > tracks() const
GlobalPoint position() const
Basic3DVector & operator/=(T t)
Scaling by a scalar value (division)
std::vector< T > toVector(boost::python::list &l)
MultiVertexBSeeder(double nsigma=50.)
TransientTrackToFloatMap weightMap() const
Power< A, B >::type pow(const A &a, const B &b)
Basic3DVector & operator+=(const Basic3DVector< U > &p)
Global3DVector GlobalVector
std::vector< TransientVertex > vertices(const std::vector< reco::TransientTrack > &) const