Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EGM - PFPhoton Selection / Particle Based Isolation / New Soft-Electron ID / New Converted Brem Finder / ECAL Regressions for PF-SCs+Electrons+Photons #1801

Merged
merged 14 commits into from Dec 18, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion DataFormats/EgammaCandidates/src/classes.h
Expand Up @@ -20,6 +20,7 @@
#include "DataFormats/EgammaCandidates/interface/SiStripElectronFwd.h"
#include "DataFormats/EgammaReco/interface/SuperCluster.h"
#include "DataFormats/EgammaReco/interface/BasicCluster.h"
#include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h"
#include "DataFormats/CaloRecHit/interface/CaloCluster.h"
#include "DataFormats/GsfTrackReco/interface/GsfTrack.h"
#include "DataFormats/GsfTrackReco/interface/GsfTrackExtra.h"
Expand Down Expand Up @@ -74,7 +75,12 @@ namespace DataFormats_EgammaCandidates {
edm::reftobase::BaseVectorHolder<reco::Photon> *bvhp_p;
edm::Wrapper<edm::ValueMap<edm::Ref<std::vector<reco::Photon>,reco::Photon,edm::refhelper::FindUsingAdvance<std::vector<reco::Photon>,reco::Photon> > > > valMap_wr;
edm::ValueMap<edm::Ref<std::vector<reco::Photon>,reco::Photon,edm::refhelper::FindUsingAdvance<std::vector<reco::Photon>,reco::Photon> > > valMap;

// std::pair<reco::PFCandidateRef,bool> value_pfiso;
// std::vector<std::pair<reco::PFCandidateRef,bool> > values_pfiso;
//edm::ValueMap<std::vector<std::pair<edm::Ref<std::vector<reco::PFCandidate>,reco::PFCandidate,edm::refhelper::FindUsingAdvance<std::vector<reco::PFCandidate>,reco::PFCandidate> >,bool> > > valueMap_iso;
//edm::Wrapper<edm::ValueMap<std::vector<std::pair<edm::Ref<std::vector<reco::PFCandidate>,reco::PFCandidate,edm::refhelper::FindUsingAdvance<std::vector<reco::PFCandidate>,reco::PFCandidate> >,bool> > > > valueMap_iso_wr;
edm::Wrapper<edm::ValueMap<std::vector<edm::Ref<std::vector<reco::PFCandidate>,reco::PFCandidate,edm::refhelper::FindUsingAdvance<std::vector<reco::PFCandidate>,reco::PFCandidate> > > > > valueMap_iso_wr;
edm::ValueMap<std::vector<edm::Ref<std::vector<reco::PFCandidate>,reco::PFCandidate,edm::refhelper::FindUsingAdvance<std::vector<reco::PFCandidate>,reco::PFCandidate> > > > valueMap_iso;

reco::Photon::FiducialFlags pff ;
reco::Photon::ShowerShape pss ;
Expand Down
8 changes: 8 additions & 0 deletions DataFormats/EgammaCandidates/src/classes_def.xml
Expand Up @@ -77,6 +77,14 @@
<class name="edm::reftobase::BaseVectorHolder<reco::Photon>" />
<class name="edm::Wrapper<edm::ValueMap<edm::Ref<std::vector<reco::Photon>,reco::Photon,edm::refhelper::FindUsingAdvance<std::vector<reco::Photon>,reco::Photon> > > >"/>
<class name="edm::ValueMap<edm::Ref<std::vector<reco::Photon>,reco::Photon,edm::refhelper::FindUsingAdvance<std::vector<reco::Photon>,reco::Photon> > > "/>
<!--
<class name="std::pair<reco::PFCandidateRef,bool>"/>
<class name="std::vector<std::pair<reco::PFCandidateRef,bool> >"/>
<class name="edm::ValueMap<std::vector<std::pair<edm::Ref<std::vector<reco::PFCandidate>,reco::PFCandidate,edm::refhelper::FindUsingAdvance<std::vector<reco::PFCandidate>,reco::PFCandidate> >,bool> > >"/>
<class name="edm::Wrapper<edm::ValueMap<std::vector<std::pair<edm::Ref<std::vector<reco::PFCandidate>,reco::PFCandidate,edm::refhelper::FindUsingAdvance<std::vector<reco::PFCandidate>,reco::PFCandidate> >,bool> > > >"/>
-->
<class name="edm::Wrapper<edm::ValueMap<std::vector<edm::Ref<std::vector<reco::PFCandidate>,reco::PFCandidate,edm::refhelper::FindUsingAdvance<std::vector<reco::PFCandidate>,reco::PFCandidate> > > > >"/>
<class name="edm::ValueMap<std::vector<edm::Ref<std::vector<reco::PFCandidate>,reco::PFCandidate,edm::refhelper::FindUsingAdvance<std::vector<reco::PFCandidate>,reco::PFCandidate> > > >"/>


<class name="std::vector<reco::Electron>"/>
Expand Down
Expand Up @@ -23,7 +23,7 @@
#include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
#include "Geometry/CaloEventSetup/interface/CaloTopologyRecord.h"
#include "Geometry/CaloTopology/interface/CaloTopology.h"
#include "RecoEgamma/EgammaTools/interface/EcalClusterLocal.h"
#include "RecoEgamma/EgammaTools/interface/BaselinePFSCRegression.h"

#include "DataFormats/ParticleFlowReco/interface/PFCluster.h"

Expand Down Expand Up @@ -65,18 +65,7 @@ class PFECALSuperClusterProducer : public edm::EDProducer {
bool verbose_;
// regression
bool use_regression;
float rinputs[33];
EcalClusterLocal ecl_;
std::string eb_reg_key, ee_reg_key;
const GBRWrapperRcd* gbr_record;
edm::ESHandle<GBRForest> eb_reg, ee_reg;
const CaloTopologyRecord* topo_record;
edm::ESHandle<CaloTopology> calotopo;
double getRegressionCorrection(const reco::SuperCluster&,
const edm::Handle<reco::VertexCollection>&,
const edm::Handle<EcalRecHitCollection>&,
const edm::Handle<EcalRecHitCollection>&,
const edm::EventSetup& );
std::unique_ptr<PFSCRegressionCalc> regr_;

edm::EDGetTokenT<edm::View<reco::PFCluster> > inputTagPFClusters_;
edm::EDGetTokenT<reco::PFCluster::EEtoPSAssociation> inputTagPFClustersES_;
Expand Down
Expand Up @@ -2,6 +2,32 @@
from CondCore.DBCommon.CondDBCommon_cfi import CondDBCommon
import os

pfSCecalGBRESSource = cms.ESSource(
"PoolDBESSource",
CondDBCommon,
DumpStat=cms.untracked.bool(False),
toGet = cms.VPSet(
cms.PSet(
record = cms.string('GBRWrapperRcd'),
tag = cms.string('pfscecal_EBCorrection_offline'),
label = cms.untracked.string('pfscecal_EBCorrection_offline')
),
cms.PSet(
record = cms.string('GBRWrapperRcd'),
tag = cms.string('pfscecal_EECorrection_offline'),
label = cms.untracked.string('pfscecal_EECorrection_offline')
),
)
)
pfSCecalGBRESSource.connect = cms.string('frontier://FrontierProd/CMS_COND_PAT_000')

pfSCecalPrefer = cms.ESPrefer(
'PoolDBESSource',
'pfSCecalGBRESSource',
GBRWrapperRcd = cms.vstring('GBRForest/pfscecal_EBCorrection_offline',
'GBRForest/pfscecal_EECorrection_offline')
)

particleFlowSuperClusterECALBox = cms.EDProducer(
"PFECALSuperClusterProducer",
# verbosity
Expand Down Expand Up @@ -85,10 +111,6 @@
#PFClusters collection
PFClusters = cms.InputTag("particleFlowClusterECAL"),
ESAssociation = cms.InputTag("particleFlowClusterECAL"),
vertexCollection = cms.InputTag("offlinePrimaryVertices"),
#rechit collections for lazytools
ecalRecHitsEB = cms.InputTag('ecalRecHit','EcalRecHitsEB'),
ecalRecHitsEE = cms.InputTag('ecalRecHit','EcalRecHitsEE'),

PFBasicClusterCollectionBarrel = cms.string("particleFlowBasicClusterECALBarrel"),
PFSuperClusterCollectionBarrel = cms.string("particleFlowSuperClusterECALBarrel"),
Expand All @@ -103,9 +125,14 @@
# are the seed thresholds Et or Energy?
seedThresholdIsET = cms.bool(True),
# regression setup
useRegression = cms.bool(False),
regressionKeyEB = cms.string('pfecalsc_EBCorrection'),
regressionKeyEE = cms.string('pfecalsc_EECorrection'),
useRegression = cms.bool(True),
regressionConfig = cms.PSet(
regressionKeyEB = cms.string('pfscecal_EBCorrection_offline'),
regressionKeyEE = cms.string('pfscecal_EECorrection_offline'),
vertexCollection = cms.InputTag("offlinePrimaryVertices"),
ecalRecHitsEB = cms.InputTag('ecalRecHit','EcalRecHitsEB'),
ecalRecHitsEE = cms.InputTag('ecalRecHit','EcalRecHitsEE')
),

# threshold in ECAL
thresh_PFClusterSeedBarrel = cms.double(1.0),
Expand Down