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

Apply regression corrections from database in PFECAL-SuperClusters, decrease PF-SC seeding thresholds #972

Merged
merged 11 commits into from Oct 29, 2013
4 changes: 2 additions & 2 deletions Configuration/StandardSequences/python/Reconstruction_cff.py
Expand Up @@ -51,11 +51,11 @@
standalonemuontracking*
recopixelvertexing*
trackingGlobalReco*
vertexreco*
hcalGlobalRecoSequence*
particleFlowCluster*
ecalClusters*
caloTowersRec*
vertexreco*
caloTowersRec*
egammaGlobalReco*
jetGlobalReco*
muonGlobalReco*
Expand Down
Expand Up @@ -96,7 +96,7 @@ class PFECALSuperClusterAlgo {

void setCrackCorrections( bool applyCrackCorrections) { applyCrackCorrections_ = applyCrackCorrections;}

std::auto_ptr<reco::SuperClusterCollection>
std::auto_ptr<reco::SuperClusterCollection>&
getEBOutputSCCollection() { return superClustersEB_; }
std::auto_ptr<reco::SuperClusterCollection>
getEEOutputSCCollection() { return superClustersEE_; }
Expand Down
2 changes: 2 additions & 0 deletions RecoEcal/EgammaClusterProducers/BuildFile.xml
Expand Up @@ -4,6 +4,7 @@
<use name="DataFormats/EcalRecHit"/>
<use name="DataFormats/EgammaReco"/>
<use name="CondFormats/EcalObjects"/>
<use name="CondFormats/EgammaObjects"/>
<use name="CondFormats/DataRecord"/>
<use name="RecoLocalCalo/EcalRecAlgos"/>
<use name="Geometry/CaloGeometry"/>
Expand All @@ -12,6 +13,7 @@
<use name="Geometry/EcalAlgo"/>
<use name="DataFormats/Math"/>
<use name="RecoEcal/EgammaCoreTools"/>
<use name="RecoEgamma/EgammaTools"/>
<use name="clhep"/>
<use name="TrackingTools/TrackAssociator" />
<use name="CommonTools/UtilAlgos"/>
Expand Down
Expand Up @@ -8,6 +8,7 @@
// user include files
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EDProducer.h"
#include "FWCore/Framework/interface/ESHandle.h"

#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
Expand All @@ -18,6 +19,11 @@
#include "DataFormats/ParticleFlowReco/interface/PFClusterFwd.h"

#include "RecoEcal/EgammaClusterAlgos/interface/PFECALSuperClusterAlgo.h"
#include "DataFormats/VertexReco/interface/VertexFwd.h"
#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 "DataFormats/ParticleFlowReco/interface/PFCluster.h"

Expand All @@ -31,19 +37,21 @@ Additional authors for Mustache: Y. Gershtein, R. Patel, L. Gray
class CaloSubdetectorTopology;
class CaloSubdetectorGeometry;
class DetId;
class GBRForest;
class GBRWrapperRcd;
class EcalClusterTools;


class PFECALSuperClusterProducer : public edm::EDProducer {
public:
public:
explicit PFECALSuperClusterProducer(const edm::ParameterSet&);
~PFECALSuperClusterProducer();


virtual void beginRun(const edm::Run& iR, const edm::EventSetup& iE);
virtual void produce(edm::Event&, const edm::EventSetup&);


private:

private:
// ----------member data ---------------------------

/// clustering algorithm
Expand All @@ -55,9 +63,26 @@ class PFECALSuperClusterProducer : public edm::EDProducer {

/// verbose ?
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& );

edm::EDGetTokenT<edm::View<reco::PFCluster> > inputTagPFClusters_;
edm::EDGetTokenT<reco::PFCluster::EEtoPSAssociation> inputTagPFClustersES_;
edm::EDGetTokenT<EcalRecHitCollection> inputTagEBRecHits_;
edm::EDGetTokenT<EcalRecHitCollection> inputTagEERecHits_;
edm::EDGetTokenT<reco::VertexCollection> inputTagVertices_;

std::string PFBasicClusterCollectionBarrel_;
std::string PFSuperClusterCollectionBarrel_;
Expand Down
@@ -1,4 +1,6 @@
import FWCore.ParameterSet.Config as cms
from CondCore.DBCommon.CondDBCommon_cfi import CondDBCommon
import os

particleFlowSuperClusterECALBox = cms.EDProducer(
"PFECALSuperClusterProducer",
Expand All @@ -15,6 +17,10 @@
#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 @@ -28,6 +34,11 @@

# are the seed thresholds Et or Energy?
seedThresholdIsET = cms.bool(True),

# regression setup
useRegression = cms.bool(False), #regressions are mustache only
regressionKeyEB = cms.string('pfecalsc_EBCorrection'),
regressionKeyEE = cms.string('pfecalsc_EECorrection'),

# threshold in ECAL
thresh_PFClusterSeedBarrel = cms.double(3.0),
Expand Down Expand Up @@ -74,6 +85,10 @@
#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 @@ -87,12 +102,16 @@

# 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'),

# threshold in ECAL
thresh_PFClusterSeedBarrel = cms.double(3.0),
thresh_PFClusterSeedBarrel = cms.double(1.0),
thresh_PFClusterBarrel = cms.double(0.0),

thresh_PFClusterSeedEndcap = cms.double(5.0),
thresh_PFClusterSeedEndcap = cms.double(1.0),
thresh_PFClusterEndcap = cms.double(0.0),

# window width in ECAL ( these don't mean anything for Mustache )
Expand Down