Skip to content

Commit

Permalink
Merge pull request #11873 from cmkuo/mydev_pfes_badhits_removal
Browse files Browse the repository at this point in the history
remove bad ES rechits from PF clustering
  • Loading branch information
davidlange6 committed Nov 29, 2015
2 parents ab45421 + 4af3e69 commit 63e62d9
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 13 deletions.
68 changes: 67 additions & 1 deletion RecoParticleFlow/PFClusterProducer/interface/PFRecHitQTests.h
Expand Up @@ -5,7 +5,8 @@
#include "RecoParticleFlow/PFClusterProducer/interface/PFRecHitQTestBase.h"
#include "Geometry/Records/interface/HcalRecNumberingRecord.h"


#include <iostream>
using namespace std;

//
// Quality test that checks threshold
Expand Down Expand Up @@ -425,9 +426,74 @@ class PFRecHitQTestECAL : public PFRecHitQTestBase {

};

//
// Quality test that checks ES quality cuts
//
class PFRecHitQTestES : public PFRecHitQTestBase {

public:
PFRecHitQTestES() {

}

PFRecHitQTestES(const edm::ParameterSet& iConfig):
PFRecHitQTestBase(iConfig)
{
thresholdCleaning_ = iConfig.getParameter<double>("cleaningThreshold");
topologicalCleaning_ = iConfig.getParameter<bool>("topologicalCleaning");
}

void beginEvent(const edm::Event& event,const edm::EventSetup& iSetup) {
}

bool test(reco::PFRecHit& hit,const EcalRecHit& rh,bool& clean){

if ( rh.energy() < thresholdCleaning_ ) {
clean=false;
return false;
}

if ( topologicalCleaning_ &&
( rh.checkFlag(EcalRecHit::kESDead) ||
rh.checkFlag(EcalRecHit::kESTS13Sigmas) ||
rh.checkFlag(EcalRecHit::kESBadRatioFor12) ||
rh.checkFlag(EcalRecHit::kESBadRatioFor23Upper) ||
rh.checkFlag(EcalRecHit::kESBadRatioFor23Lower) ||
rh.checkFlag(EcalRecHit::kESTS1Largest) ||
rh.checkFlag(EcalRecHit::kESTS3Largest) ||
rh.checkFlag(EcalRecHit::kESTS3Negative)
)) {
clean=false;
return false;
}

return true;
}

bool test(reco::PFRecHit& hit,const HBHERecHit& rh,bool& clean){
return true;
}

bool test(reco::PFRecHit& hit,const HFRecHit& rh,bool& clean){
return true;

}

bool test(reco::PFRecHit& hit,const HORecHit& rh,bool& clean){
return true;
}

bool test(reco::PFRecHit& hit,const CaloTower& rh,bool& clean){
return true;

}


protected:
double thresholdCleaning_;
bool topologicalCleaning_;

};

//
// Quality test that calibrates tower 29 of HCAL
Expand Down
Expand Up @@ -5,17 +5,22 @@
name = cms.string("PFRecHitPreshowerNavigator")
),
producers = cms.VPSet(
cms.PSet(
name = cms.string("PFPSRecHitCreator"),
src = cms.InputTag("ecalPreshowerRecHit","EcalRecHitsES"),
qualityTests = cms.VPSet(
cms.PSet(
name = cms.string("PFRecHitQTestThreshold"),
threshold = cms.double(7e-6)
)
)
)
)
cms.PSet(
name = cms.string("PFPSRecHitCreator"),
src = cms.InputTag("ecalPreshowerRecHit","EcalRecHitsES"),
qualityTests = cms.VPSet(
cms.PSet(
name = cms.string("PFRecHitQTestThreshold"),
threshold = cms.double(0.)
),
cms.PSet(
name = cms.string("PFRecHitQTestES"),
cleaningThreshold = cms.double(0.),
topologicalCleaning = cms.bool(True)
)
)
)
)
)

)

Expand Up @@ -8,6 +8,7 @@ DEFINE_EDM_PLUGIN(PFRecHitQTestFactory, PFRecHitQTestThreshold, "PFRecHitQTestTh
DEFINE_EDM_PLUGIN(PFRecHitQTestFactory, PFRecHitQTestHOThreshold, "PFRecHitQTestHOThreshold");

DEFINE_EDM_PLUGIN(PFRecHitQTestFactory, PFRecHitQTestECAL, "PFRecHitQTestECAL");
DEFINE_EDM_PLUGIN(PFRecHitQTestFactory, PFRecHitQTestES, "PFRecHitQTestES");
DEFINE_EDM_PLUGIN(PFRecHitQTestFactory, PFRecHitQTestHCALCalib29, "PFRecHitQTestHCALCalib29");
DEFINE_EDM_PLUGIN(PFRecHitQTestFactory, PFRecHitQTestHCALChannel, "PFRecHitQTestHCALChannel");
DEFINE_EDM_PLUGIN(PFRecHitQTestFactory, PFRecHitQTestHCALTimeVsDepth, "PFRecHitQTestHCALTimeVsDepth");
Expand Down

0 comments on commit 63e62d9

Please sign in to comment.