25 std::pair<double, bool> parameter;
27 double jet_et = jet.
et();
28 double jet_phi = jet.
phi();
29 double jet_eta = jet.
eta();
32 double Pt_jets_X = 0.;
33 double Pt_jets_Y = 0.;
34 double Pt_jets_X_tot = 0.;
35 double Pt_jets_Y_tot = 0.;
37 TrackCollection::const_iterator
track = tracks->begin();
39 if (!tracks->empty()) {
40 for (; track != tracks->end(); track++) {
41 double Vertex_Z = track->vz();
42 double Vertex_Z_Error = track->dzError();
43 double track_eta = track->eta();
44 double track_phi = track->phi();
47 double DeltaZ = Vertex_Z - signal_vert_Z;
48 double DeltaZ_Error =
sqrt((Vertex_Z_Error * Vertex_Z_Error) + (signal_vert_z_error * signal_vert_z_error));
49 Pt_jets_X_tot += track->px();
50 Pt_jets_Y_tot += track->py();
57 Pt_jets_X += track->px();
58 Pt_jets_Y += track->py();
66 Var =
Track_Pt(Pt_jets_X, Pt_jets_Y) / jet_et;
68 if (
Track_Pt(Pt_jets_X_tot, Pt_jets_Y_tot) != 0)
69 Var =
Track_Pt(Pt_jets_X, Pt_jets_Y) /
Track_Pt(Pt_jets_X_tot, Pt_jets_Y_tot);
71 std::cout <<
"[Jets] JetVertexAssociation: Warning! problems for Algo = 2: possible division by zero .."
74 Var =
Track_Pt(Pt_jets_X, Pt_jets_Y) / jet_et;
75 std::cout <<
"[Jets] JetVertexAssociation: Warning! Algo = " <<
Algo <<
" not found; using Algo = 1" << std::endl;
81 parameter = std::pair<double, bool>(
Var,
true);
83 parameter = std::pair<double, bool>(
Var,
false);
double DeltaR(double eta1, double eta2, double phi1, double phi2)
double Track_Pt(double px, double py)
double et() const final
transverse energy
double phi() const final
momentum azimuthal angle
double eta() const final
momentum pseudorapidity