CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
VBuilders.h
Go to the documentation of this file.
1 //=========================================================================
2 // VBuilders.h
3 //
4 // Functors for building various quantities from grid points. They are
5 // intended for use with "KernelRecombinationAlg" or similar templated
6 // classes.
7 //
8 // I. Volobouev
9 // March 2010
10 //=========================================================================
11 
12 #ifndef RecoJets_FFTJetAlgorithms_VBuilders_h
13 #define RecoJets_FFTJetAlgorithms_VBuilders_h
14 
15 #include <cmath>
16 
18 
19 namespace fftjetcms {
21  {
23  const double pt, const double eta, const double phi) const
24  {
25  const double px = pt*cos(phi);
26  const double py = pt*sin(phi);
27  const double pz = pt*sinh(eta);
28  const double e = sqrt(px*px + py*py + pz*pz);
29  return math::XYZTLorentzVector(px, py, pz, e);
30  }
31  };
32 
34  {
36  const double e, const double eta, const double phi) const
37  {
38  // There is no mass associated with this energy... We will
39  // assume that the mass is 0 and proceed as if the energy
40  // is the momentum.
41  const double pt = e/cosh(eta);
43  pt*cos(phi), pt*sin(phi), pt*sinh(eta), e);
44  }
45  };
46 }
47 
48 #endif // RecoJets_FFTJetAlgorithms_VBuilders_h
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
T eta() const
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:30
T sqrt(T t)
Definition: SSEVec.h:46
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
math::XYZTLorentzVector operator()(const double e, const double eta, const double phi) const
Definition: VBuilders.h:35
math::XYZTLorentzVector operator()(const double pt, const double eta, const double phi) const
Definition: VBuilders.h:22
Definition: DDAxes.h:10