Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:21:34

0001 #include "L1Trigger/Phase2L1ParticleFlow/interface/L1TPFUtils.h"
0002 
0003 #include "CommonTools/BaseParticlePropagator/interface/BaseParticlePropagator.h"
0004 #include "CommonTools/BaseParticlePropagator/interface/RawParticle.h"
0005 #include "DataFormats/ParticleFlowReco/interface/PFCluster.h"
0006 
0007 std::pair<float, float> l1tpf::propagateToCalo(const math::XYZTLorentzVector& iMom,
0008                                                const math::XYZTLorentzVector& iVtx,
0009                                                double iCharge,
0010                                                double iBField) {
0011   BaseParticlePropagator prop = BaseParticlePropagator(RawParticle(iMom, iVtx, iCharge), 0., 0., iBField);
0012   prop.propagateToEcalEntrance(false);
0013   double ecalShowerDepth = reco::PFCluster::getDepthCorrection(prop.particle().momentum().E(), false, false);
0014   math::XYZVector point = math::XYZVector(prop.particle().vertex()) +
0015                           math::XYZTLorentzVector(prop.particle().momentum()).Vect().Unit() * ecalShowerDepth;
0016   return std::make_pair(point.eta(), point.phi());
0017 }