-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19307 from cms-egamma/ECALPFClusterCorrection90X
ECAL PFCluster Correction 9X
- Loading branch information
Showing
12 changed files
with
509 additions
and
265 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
CalibCalorimetry/EcalTPGTools/interface/EcalReadoutTools.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#ifndef CalibCalorimetry_EcalTPGTools_EcalReadoutTools_H | ||
#define CalibCalorimetry_EcalTPGTools_EcalReadoutTools_H | ||
|
||
#include "FWCore/Framework/interface/Event.h" | ||
#include "FWCore/Framework/interface/EventSetup.h" | ||
#include "FWCore/Framework/interface/ESHandle.h" | ||
|
||
#include "Geometry/Records/interface/IdealGeometryRecord.h" | ||
#include "Geometry/CaloTopology/interface/EcalTrigTowerConstituentsMap.h" | ||
#include "Geometry/EcalMapping/interface/EcalElectronicsMapping.h" | ||
#include "Geometry/EcalMapping/interface/EcalMappingRcd.h" | ||
|
||
class EcalReadoutTools { | ||
|
||
private: | ||
const EcalTrigTowerConstituentsMap * triggerTowerMap_; | ||
const EcalElectronicsMapping* elecMap_; | ||
|
||
public: | ||
EcalReadoutTools(const edm::Event &iEvent, const edm::EventSetup &iSetup); | ||
EcalReadoutTools(const EcalReadoutTools&) = delete; | ||
EcalReadoutTools& operator=(const EcalReadoutTools&) = delete; | ||
|
||
EcalTrigTowerDetId readOutUnitOf(const EBDetId& xtalId) const; | ||
EcalScDetId readOutUnitOf(const EEDetId& xtalId) const; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#include "CalibCalorimetry/EcalTPGTools/interface/EcalReadoutTools.h" | ||
|
||
EcalReadoutTools::EcalReadoutTools(const edm::Event &iEvent, const edm::EventSetup &iSetup) { | ||
|
||
edm::ESHandle<EcalTrigTowerConstituentsMap> hTriggerTowerMap; | ||
iSetup.get<IdealGeometryRecord>().get(hTriggerTowerMap); | ||
triggerTowerMap_ = hTriggerTowerMap.product(); | ||
|
||
edm::ESHandle< EcalElectronicsMapping > ecalmapping; | ||
iSetup.get< EcalMappingRcd >().get(ecalmapping); | ||
elecMap_ = ecalmapping.product(); | ||
|
||
} | ||
|
||
EcalTrigTowerDetId EcalReadoutTools::readOutUnitOf(const EBDetId& xtalId) const{ | ||
return triggerTowerMap_->towerOf(xtalId); | ||
} | ||
|
||
EcalScDetId EcalReadoutTools::readOutUnitOf(const EEDetId& xtalId) const{ | ||
const EcalElectronicsId& EcalElecId = elecMap_->getElectronicsId(xtalId); | ||
int iDCC= EcalElecId.dccId(); | ||
int iDccChan = EcalElecId.towerId(); | ||
const bool ignoreSingle = true; | ||
const std::vector<EcalScDetId> id = elecMap_->getEcalScDetId(iDCC, iDccChan, ignoreSingle); | ||
return id.size()>0?id[0]:EcalScDetId(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
RecoParticleFlow/PFClusterProducer/python/particleFlowClusterECAL_cff.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
from RecoParticleFlow.PFClusterProducer.particleFlowClusterECAL_cfi import particleFlowClusterECAL | ||
particleFlowClusterECAL.energyCorrector.applyMVACorrections = True | ||
particleFlowClusterECAL.energyCorrector.maxPtForMVAEvaluation = 90. | ||
|
||
from Configuration.Eras.Modifier_run2_ECAL_2017_cff import run2_ECAL_2017 | ||
run2_ECAL_2017.toModify(particleFlowClusterECAL, | ||
energyCorrector = dict(srfAwareCorrection = True, maxPtForMVAEvaluation = 300.)) | ||
|
23 changes: 0 additions & 23 deletions
23
RecoParticleFlow/PFClusterProducer/python/particleFlowClusterECAL_cfi.py
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
RecoParticleFlow/PFClusterProducer/python/particleFlowClusterOOTECAL_cff.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
from RecoParticleFlow.PFClusterProducer.particleFlowClusterECAL_cfi import * | ||
from RecoParticleFlow.PFClusterProducer.particleFlowClusterECAL_cff import * | ||
|
||
particleFlowClusterOOTECAL = particleFlowClusterECAL.clone() | ||
particleFlowClusterOOTECAL.inputECAL = cms.InputTag("particleFlowClusterOOTECALUncorrected") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.