From 4a4330bfa3e5ea2ac377c4bab6453a52e31e6e89 Mon Sep 17 00:00:00 2001 From: Sam Harper Date: Wed, 10 May 2017 20:01:08 +0100 Subject: [PATCH] changing eta for pixel match to be seed rather than supercluster --- .../plugins/ElectronNHitSeedProducer.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/RecoEgamma/EgammaElectronProducers/plugins/ElectronNHitSeedProducer.cc b/RecoEgamma/EgammaElectronProducers/plugins/ElectronNHitSeedProducer.cc index 821eb957cbf9f..da77355d54c7a 100644 --- a/RecoEgamma/EgammaElectronProducers/plugins/ElectronNHitSeedProducer.cc +++ b/RecoEgamma/EgammaElectronProducers/plugins/ElectronNHitSeedProducer.cc @@ -7,7 +7,7 @@ // // // The module produces the ElectronSeeds, similarly to ElectronSeedProducer -// although +// although with a varible number of required hits // // // Author : Sam Harper (RAL), 2017 @@ -146,8 +146,16 @@ void ElectronNHitSeedProducer::produce(edm::Event& iEvent, const edm::EventSetup for(const auto& superClustersToken : superClustersTokens_){ auto superClustersHandle = getHandle(iEvent,superClustersToken); for(auto& superClusRef : *superClustersHandle){ + + //the eta of the supercluster when mustache clustered is slightly biased due to bending in magnetic field + //the eta of its seed cluster is a better estimate of the orginal position + GlobalPoint caloPosition(GlobalPoint::Polar(superClusRef->seed()->position().theta(), //seed theta + superClusRef->position().phi(), //supercluster phi + superClusRef->position().r())); //supercluster r + + const std::vector matchedSeeds = - matcher_.compatibleSeeds(*initialSeedsHandle,convertToGP(superClusRef->position()), + matcher_.compatibleSeeds(*initialSeedsHandle,caloPosition, primVtxPos,superClusRef->energy()); for(auto& matchedSeed : matchedSeeds){