CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
CaloVectors.h File Reference
#include "RecoEcal/EgammaClusterAlgos/interface/EgammaSCEnergyCorrectionAlgo.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 3 of file CaloVectors.h.

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

Referenced by ErsatzMEt::analyze().

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

Definition at line 9 of file CaloVectors.h.

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

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

Definition at line 15 of file CaloVectors.h.

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

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

Definition at line 25 of file CaloVectors.h.

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

26 {
27  math::XYZVector Vec = sc.position() - vertex;
28  double eta = Vec.Eta();
29  double phi = Vec.Phi();
30  double pt = sc.energy()/cosh(eta);
31  math::XYZTLorentzVector probe(pt*cos(phi), pt*sin(phi), pt*sinh(eta), sc.energy());
32  return probe;
33 }
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:123
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
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
double energy() const
cluster energy
Definition: CaloCluster.h:120
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
Definition: DDAxes.h:10
math::XYZTLorentzVector PhysicsVectorRaw ( const math::XYZPoint vertex,
const reco::SuperCluster sc 
)

Definition at line 34 of file CaloVectors.h.

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

Referenced by ErsatzMEt::ersatzFabrik().

35 {
36  math::XYZVector Vec = sc.position() - vertex;
37  double eta = Vec.Eta();
38  double phi = Vec.Phi();
39  double pt = sc.rawEnergy()/cosh(eta);
40  math::XYZTLorentzVector probe(pt*cos(phi), pt*sin(phi), pt*sinh(eta), sc.rawEnergy());
41  return probe;
42 }
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:123
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
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:31
Definition: DDAxes.h:10