CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10/src/ElectroWeakAnalysis/ZEE/interface/CaloVectors.h

Go to the documentation of this file.
00001 #include "RecoEcal/EgammaClusterAlgos/interface/EgammaSCEnergyCorrectionAlgo.h"
00002 
00003 math::XYZTLorentzVector DetectorVector(const reco::SuperClusterRef& sc)
00004 {
00005         double pt = sc->energy()/cosh(sc->eta());
00006         math::XYZTLorentzVector detVec(pt*cos(sc->phi()), pt*sin(sc->phi()), pt*sinh(sc->eta()), sc->energy());
00007         return detVec;
00008 }
00009 math::XYZTLorentzVector DetectorVector(const reco::SuperCluster sc)
00010 {
00011         double pt = sc.energy()/cosh(sc.eta());
00012         math::XYZTLorentzVector detVec(pt*cos(sc.phi()), pt*sin(sc.phi()), pt*sinh(sc.eta()), sc.energy());
00013         return detVec;
00014 }
00015 math::XYZTLorentzVector DetectorVector(const GlobalPoint& pos, const math::XYZPoint& vertex, double energy)
00016 {
00017         math::XYZPoint hitPos(pos.x(), pos.y(), pos.z());
00018         math::XYZVector Vec = hitPos - vertex;
00019         double eta = Vec.Eta();
00020         double phi = Vec.Phi();
00021         double pt = energy/cosh(eta);
00022         math::XYZTLorentzVector detVec(pt*cos(phi), pt*sin(phi), pt*sinh(eta), energy);
00023         return detVec;
00024 }
00025 math::XYZTLorentzVector PhysicsVector(const math::XYZPoint& vertex, const reco::SuperCluster& sc)
00026 {
00027         math::XYZVector Vec = sc.position() - vertex;
00028         double eta = Vec.Eta();
00029         double phi = Vec.Phi();
00030         double pt = sc.energy()/cosh(eta);
00031         math::XYZTLorentzVector probe(pt*cos(phi), pt*sin(phi), pt*sinh(eta), sc.energy());
00032         return probe;
00033 }
00034 math::XYZTLorentzVector PhysicsVectorRaw(const math::XYZPoint& vertex, const reco::SuperCluster& sc)
00035 {
00036         math::XYZVector Vec = sc.position() - vertex;
00037         double eta = Vec.Eta();
00038         double phi = Vec.Phi();
00039         double pt = sc.rawEnergy()/cosh(eta);
00040         math::XYZTLorentzVector probe(pt*cos(phi), pt*sin(phi), pt*sinh(eta), sc.rawEnergy());
00041         return probe;
00042 }