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 );
52 for ( vector< reco::TransientTrack >::const_iterator
i=trks.begin();
i!=trks.end() ; ++
i )
54 if ( rt == ( *
i ) )
return true;
71 GlobalPoint computeJetOrigin (
const vector < reco::TransientTrack > & trks )
74 vector< ModeFinder3d::PointAndDistance>
input;
75 for ( vector< reco::TransientTrack >::const_iterator
i=trks.begin();
79 (
i->impactPointState().globalPosition(), 1. ) );
84 GlobalVector computeJetDirection (
const vector < reco::TransientTrack > & trks )
87 vector< ModeFinder3d::PointAndDistance>
input;
88 for ( vector< reco::TransientTrack >::const_iterator
i=trks.begin();
92 toPoint (
i->impactPointState().globalMomentum() ), 1. ) );
113 &(trks[0].impactPointState().globalParameters().
magneticField()) );
115 DebuggingHarvester(
"out.txt").save ( ret ,
"p<sub>tot</sub>" );
120 vector < Cluster1D < reco::TransientTrack > > computeIPs (
121 const vector < reco::TransientTrack > & trks )
126 vector < Cluster1D < reco::TransientTrack > >
pts;
127 for ( vector< reco::TransientTrack >::const_iterator
i=trks.begin();
128 i!=trks.end() ; ++
i )
130 bool status = ttmd.
calculate( axis,*(
i->impactPointState().freeState() ) );
132 pair < GlobalPoint, GlobalPoint >
pt = ttmd.
points();
133 double d = ( pt.first - pt.second ).
mag();
134 double w = 1. / ( 0.002 +
d );
135 double s = ( pt.first - axis.position() ).
mag();
137 vector < const reco::TransientTrack * > trk;
138 trk.push_back ( &(*
i) );
164 bool ascending=
false,
bool kalmanfit=
false )
167 vector < const reco::TransientTrack * > trkptrs=src.
tracks();
168 vector < reco::TransientTrack > trks =
convert ( trkptrs );
179 float w=1.0;
float r=0.5;
180 if ( ascending ) { w =
pow ( (
float) 0.5, (
int) (trks.size()-1) ); r=2.0; };
181 for ( vector< reco::TransientTrack >::const_iterator
i=trks.begin();
182 i!=trks.end() ; ++
i )
211 const vector < reco::TransientTrack > & trks,
218 const vector < reco::TransientTrack > & trks )
const 220 vector < Cluster1D < reco::TransientTrack > > ips = computeIPs ( trks );
227 pair < vector < Cluster1D<reco::TransientTrack> >,
228 vector < const reco::TransientTrack * > >
res;
233 map < string, harvest::MultiType > attrs;
234 attrs[
"point:mag"]=0.75;
235 attrs[
"point:color"]=
"blue";
236 attrs[
"point:name"]=
"mode";
237 DebuggingHarvester(
"out.txt").save ( res.first, jet, attrs,
"mode" );
240 vector < TransientVertex > ret;
242 i!=res.first.end() ; ++
i )
244 ret.push_back ( pseudoVertexFit ( *
i,
i!=res.first.begin(),
MultiVertexBSeeder * clone() const override
std::pair< GlobalPoint, GlobalPoint > points() const override
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
std::map< reco::TransientTrack, float > TransientTrackToFloatMap
Global3DPoint GlobalPoint
std::pair< GlobalPoint, float > PointAndDistance
static std::string const input
bool calculate(const TrajectoryStateOnSurface &sta, const TrajectoryStateOnSurface &stb) override
static const double pts[33]
std::vector< reco::TransientTrack > const & originalTracks() const
GlobalPoint position() const
GlobalVector momentum() const
CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &tracks) const override
std::vector< const T * > tracks() const
def convert(infile, ofile)
GlobalPoint position() const
std::vector< TransientVertex > vertices(const std::vector< reco::TransientTrack > &) const override
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