CMS 3D CMS Logo

Functions
CaloVectors.h File Reference
#include "RecoEcal/EgammaClusterAlgos/interface/EgammaSCEnergyCorrectionAlgo.h"
#include "DataFormats/Math/interface/LorentzVector.h"
#include "DataFormats/Math/interface/Vector3D.h"
#include "DataFormats/EgammaReco/interface/SuperClusterFwd.h"

Go to the source code of this file.

Functions

math::XYZTLorentzVector DetectorVector (const reco::SuperClusterRef &sc)
 
math::XYZTLorentzVector DetectorVector (const reco::SuperCluster sc)
 
math::XYZTLorentzVector DetectorVector (const GlobalPoint &pos, const math::XYZPoint &vertex, double energy)
 
math::XYZTLorentzVector PhysicsVector (const math::XYZPoint &vertex, const reco::SuperCluster &sc)
 
math::XYZTLorentzVector PhysicsVectorRaw (const math::XYZPoint &vertex, const reco::SuperCluster &sc)
 

Function Documentation

math::XYZTLorentzVector DetectorVector ( const reco::SuperClusterRef sc)

Definition at line 6 of file CaloVectors.h.

References funct::cos(), EnergyCorrector::pt, and funct::sin().

Referenced by ErsatzMEt::analyze().

7 {
8  double pt = sc->energy()/cosh(sc->eta());
9  math::XYZTLorentzVector detVec(pt*cos(sc->phi()), pt*sin(sc->phi()), pt*sinh(sc->eta()), sc->energy());
10  return detVec;
11 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
math::XYZTLorentzVector DetectorVector ( const reco::SuperCluster  sc)

Definition at line 12 of file CaloVectors.h.

References funct::cos(), reco::CaloCluster::energy(), reco::CaloCluster::eta(), reco::CaloCluster::phi(), EnergyCorrector::pt, and funct::sin().

13 {
14  double pt = sc.energy()/cosh(sc.eta());
15  math::XYZTLorentzVector detVec(pt*cos(sc.phi()), pt*sin(sc.phi()), pt*sinh(sc.eta()), sc.energy());
16  return detVec;
17 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
double eta() const
pseudorapidity of cluster centroid
Definition: CaloCluster.h:168
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
double energy() const
cluster energy
Definition: CaloCluster.h:126
double phi() const
azimuthal angle of cluster centroid
Definition: CaloCluster.h:171
math::XYZTLorentzVector DetectorVector ( const GlobalPoint pos,
const math::XYZPoint vertex,
double  energy 
)

Definition at line 18 of file CaloVectors.h.

References funct::cos(), PVValHelper::eta, PVValHelper::phi, EnergyCorrector::pt, funct::sin(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

19 {
20  math::XYZPoint hitPos(pos.x(), pos.y(), pos.z());
21  math::XYZVector Vec = hitPos - vertex;
22  double eta = Vec.Eta();
23  double phi = Vec.Phi();
24  double pt = energy/cosh(eta);
25  math::XYZTLorentzVector detVec(pt*cos(phi), pt*sin(phi), pt*sinh(eta), energy);
26  return detVec;
27 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
T y() const
Definition: PV3DBase.h:63
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
T z() const
Definition: PV3DBase.h:64
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
T x() const
Definition: PV3DBase.h:62
math::XYZTLorentzVector PhysicsVector ( const math::XYZPoint vertex,
const reco::SuperCluster sc 
)

Definition at line 28 of file CaloVectors.h.

References funct::cos(), reco::CaloCluster::energy(), PVValHelper::eta, PVValHelper::phi, reco::CaloCluster::position(), EnergyCorrector::pt, and funct::sin().

29 {
30  math::XYZVector Vec = sc.position() - vertex;
31  double eta = Vec.Eta();
32  double phi = Vec.Phi();
33  double pt = sc.energy()/cosh(eta);
34  math::XYZTLorentzVector probe(pt*cos(phi), pt*sin(phi), pt*sinh(eta), sc.energy());
35  return probe;
36 }
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:131
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
double energy() const
cluster energy
Definition: CaloCluster.h:126
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
math::XYZTLorentzVector PhysicsVectorRaw ( const math::XYZPoint vertex,
const reco::SuperCluster sc 
)

Definition at line 37 of file CaloVectors.h.

References funct::cos(), PVValHelper::eta, PVValHelper::phi, reco::CaloCluster::position(), EnergyCorrector::pt, reco::SuperCluster::rawEnergy(), and funct::sin().

Referenced by ErsatzMEt::ersatzFabrik().

38 {
39  math::XYZVector Vec = sc.position() - vertex;
40  double eta = Vec.Eta();
41  double phi = Vec.Phi();
42  double pt = sc.rawEnergy()/cosh(eta);
43  math::XYZTLorentzVector probe(pt*cos(phi), pt*sin(phi), pt*sinh(eta), sc.rawEnergy());
44  return probe;
45 }
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:131
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
double rawEnergy() const
raw uncorrected energy (sum of energies of component BasicClusters)
Definition: SuperCluster.h:47
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30