29 double jet_et = jet.
et();
30 double jet_phi = jet.
phi();
31 double jet_eta = jet.
eta();
34 double Pt_jets_X = 0. ;
35 double Pt_jets_Y = 0. ;
36 double Pt_jets_X_tot = 0. ;
37 double Pt_jets_Y_tot = 0. ;
39 TrackCollection::const_iterator track = tracks->begin ();
41 if (tracks->size() > 0 ) {
42 for (; track != tracks->end (); track++) {
43 double Vertex_Z = track->vz();
44 double Vertex_Z_Error = track->dzError();
45 double track_eta = track->eta();
46 double track_phi = track->phi();
50 double DeltaZ = Vertex_Z-signal_vert_Z;
51 double DeltaZ_Error =
sqrt((Vertex_Z_Error*Vertex_Z_Error)+(signal_vert_z_error*signal_vert_z_error));
52 Pt_jets_X_tot += track->px();
53 Pt_jets_Y_tot += track->py();
59 Pt_jets_X += track->px();
60 Pt_jets_Y += track->py();
69 if (
Algo == 1) Var =
Track_Pt(Pt_jets_X, Pt_jets_Y)/jet_et;
71 if (
Track_Pt(Pt_jets_X_tot, Pt_jets_Y_tot)!=0) Var =
Track_Pt(Pt_jets_X, Pt_jets_Y)/
Track_Pt(Pt_jets_X_tot, Pt_jets_Y_tot);
72 else std::cout <<
"[Jets] JetVertexAssociation: Warning! problems for Algo = 2: possible division by zero .." << std::endl;
76 Var =
Track_Pt(Pt_jets_X, Pt_jets_Y)/jet_et;
77 std::cout <<
"[Jets] JetVertexAssociation: Warning! Algo = " <<
Algo <<
" not found; using Algo = 1" << std::endl;
82 if (Var >=
threshold) parameter = std::pair<double, bool>(Var,
true);
83 else parameter = std::pair<double, bool>(Var,
false);
virtual double et() const
transverse energy
virtual float phi() const
momentum azimuthal angle
double DeltaR(double eta1, double eta2, double phi1, double phi2)
double Track_Pt(double px, double py)
virtual float eta() const
momentum pseudorapidity