1 #ifndef RecoJets_JetCharge_JetCharge_H
2 #define RecoJets_JetCharge_JetCharge_H
12 #include <Math/VectorUtil.h>
13 #include <Math/Rotation3D.h>
14 #include <Math/RotationZ.h>
15 #include <Math/RotationY.h>
35 template <
typename T,
typename C>
37 template <
typename T,
typename C>
39 template <
typename T,
typename IT>
49 template <
typename T,
typename IT>
51 double num = 0.0, den = 0.0;
52 for (
IT it = begin; it !=
end; ++it) {
56 num += w * obj.charge();
58 return (den > 0.0 ? num / den : 0.0);
61 template <
typename T,
typename C>
63 typedef typename C::const_iterator
IT;
64 return JetCharge::chargeFromValIterator<T, IT>(lv, vec.begin(), vec.end());
67 template <
typename T,
typename C>
69 typedef typename C::const_iterator
IT;
70 double num = 0.0, den = 0.0;
71 for (IT it = vec.begin(),
end = vec.end(); it !=
end; ++it) {
75 num += w * obj->charge();
77 return (den > 0.0 ? num / den : 0.0);
92 ret = lv.Vect().Dot(obj.momentum()) / (lv.P() * obj.p());
94 -0.5 *
std::log((1 - ret) / (1 + ret)));
tuple ret
prodAgent to be discontinued
double charge(const LorentzVector &lv, const reco::TrackCollection &vec) const
static std::vector< std::string > checklist log
double chargeFromRef(const LorentzVector &lv, const C &vec) const
std::vector< Track > TrackCollection
collection of Tracks
JetCharge(Variable var, double exponent=1.0)
reco::Particle::Vector Vector
Abs< T >::type abs(const T &t)
math::XYZTLorentzVector LorentzVector
reco::Particle::LorentzVector LorentzVector
std::vector< LinkConnSpec >::const_iterator IT
double chargeFromVal(const LorentzVector &lv, const C &vec) const
double chargeFromValIterator(const LorentzVector &lv, const IT &begin, const IT &end) const
double getWeight(const LorentzVector &lv, const T &obj) const
math::XYZVector Vector
point in the space
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Power< A, B >::type pow(const A &a, const B &b)