CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
photonIsolationHIProducer Class Reference
Inheritance diagram for photonIsolationHIProducer:
edm::stream::EDProducer<>

Public Member Functions

 photonIsolationHIProducer (const edm::ParameterSet &ps)
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

void produce (edm::Event &evt, const edm::EventSetup &es) override
 

Private Attributes

edm::EDGetTokenT< reco::BasicClusterCollectionbarrelClusters_
 
edm::EDGetTokenT< EcalRecHitCollectionbarrelEcalHits_
 
edm::EDGetTokenT< reco::BasicClusterCollectionendcapClusters_
 
edm::EDGetTokenT< EcalRecHitCollectionendcapEcalHits_
 
edm::EDGetTokenT< HBHERecHitCollectionhbhe_
 
edm::EDGetTokenT< HFRecHitCollectionhf_
 
edm::EDGetTokenT< HORecHitCollectionho_
 
edm::EDGetTokenT< reco::PhotonCollectionphotonProducer_
 
std::string trackQuality_
 
edm::EDGetTokenT< reco::TrackCollectiontracks_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Definition at line 22 of file photonIsolationHIProducer.cc.

Constructor & Destructor Documentation

◆ photonIsolationHIProducer()

photonIsolationHIProducer::photonIsolationHIProducer ( const edm::ParameterSet ps)
explicit

Definition at line 44 of file photonIsolationHIProducer.cc.

45  : photonProducer_(consumes<reco::PhotonCollection>(config.getParameter<edm::InputTag>("photonProducer"))),
46  barrelEcalHits_(consumes<EcalRecHitCollection>(config.getParameter<edm::InputTag>("ebRecHitCollection"))),
47  endcapEcalHits_(consumes<EcalRecHitCollection>(config.getParameter<edm::InputTag>("eeRecHitCollection"))),
48  hbhe_(consumes<HBHERecHitCollection>(config.getParameter<edm::InputTag>("hbhe"))),
49  hf_(consumes<HFRecHitCollection>(config.getParameter<edm::InputTag>("hf"))),
50  ho_(consumes<HORecHitCollection>(config.getParameter<edm::InputTag>("ho"))),
51  barrelClusters_(consumes<reco::BasicClusterCollection>(config.getParameter<edm::InputTag>("basicClusterBarrel"))),
52  endcapClusters_(consumes<reco::BasicClusterCollection>(config.getParameter<edm::InputTag>("basicClusterEndcap"))),
53  tracks_(consumes<reco::TrackCollection>(config.getParameter<edm::InputTag>("trackCollection"))),
54  trackQuality_(config.getParameter<std::string>("trackQuality")) {
55  produces<reco::HIPhotonIsolationMap>();
56 }

Member Function Documentation

◆ fillDescriptions()

void photonIsolationHIProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 134 of file photonIsolationHIProducer.cc.

134  {
136 
137  desc.add<edm::InputTag>("photonProducer", edm::InputTag("photons"));
138  desc.add<edm::InputTag>("ebRecHitCollection", edm::InputTag("ecalRecHit:EcalRecHitsEB"));
139  desc.add<edm::InputTag>("eeRecHitCollection", edm::InputTag("ecalRecHit:EcalRecHitsEE"));
140  desc.add<edm::InputTag>("hbhe", edm::InputTag("hbhereco"));
141  desc.add<edm::InputTag>("hf", edm::InputTag("hfreco"));
142  desc.add<edm::InputTag>("ho", edm::InputTag("horeco"));
143  desc.add<edm::InputTag>("basicClusterBarrel", edm::InputTag("islandBasicClusters:islandBarrelBasicClusters"));
144  desc.add<edm::InputTag>("basicClusterEndcap", edm::InputTag("islandBasicClusters:islandEndcapBasicClusters"));
145  desc.add<edm::InputTag>("trackCollection", edm::InputTag("hiGeneralTracks"));
146  desc.add<std::string>("trackQuality", "highPurity");
147 
148  descriptions.add("photonIsolationHIProducer", desc);
149 }

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), HLT_2018_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ produce()

void photonIsolationHIProducer::produce ( edm::Event evt,
const edm::EventSetup es 
)
overrideprivate

Definition at line 58 of file photonIsolationHIProducer.cc.

58  {
66  evt.getByToken(hbhe_, hbhe);
68  evt.getByToken(hf_, hf);
70  evt.getByToken(ho_, ho);
77 
78  auto outputMap = std::make_unique<reco::HIPhotonIsolationMap>();
80  std::vector<reco::HIPhotonIsolation> isoVector;
81 
83  HcalRechitIsoCalculator RxC(evt, es, hbhe, hf, ho);
86 
87  for (reco::PhotonCollection::const_iterator phoItr = photons->begin(); phoItr != photons->end(); ++phoItr) {
89  // HI-style isolation info
90  iso.ecalClusterIsoR1(CxC.getBkgSubEcalClusterIso(phoItr->superCluster(), 1, 0));
91  iso.ecalClusterIsoR2(CxC.getBkgSubEcalClusterIso(phoItr->superCluster(), 2, 0));
92  iso.ecalClusterIsoR3(CxC.getBkgSubEcalClusterIso(phoItr->superCluster(), 3, 0));
93  iso.ecalClusterIsoR4(CxC.getBkgSubEcalClusterIso(phoItr->superCluster(), 4, 0));
94  iso.ecalClusterIsoR5(CxC.getBkgSubEcalClusterIso(phoItr->superCluster(), 5, 0));
95 
96  iso.hcalRechitIsoR1(RxC.getBkgSubHcalRechitIso(phoItr->superCluster(), 1, 0));
97  iso.hcalRechitIsoR2(RxC.getBkgSubHcalRechitIso(phoItr->superCluster(), 2, 0));
98  iso.hcalRechitIsoR3(RxC.getBkgSubHcalRechitIso(phoItr->superCluster(), 3, 0));
99  iso.hcalRechitIsoR4(RxC.getBkgSubHcalRechitIso(phoItr->superCluster(), 4, 0));
100  iso.hcalRechitIsoR5(RxC.getBkgSubHcalRechitIso(phoItr->superCluster(), 5, 0));
101 
102  iso.trackIsoR1PtCut20(TxC.getBkgSubTrackIso(*phoItr, 1, 2));
103  iso.trackIsoR2PtCut20(TxC.getBkgSubTrackIso(*phoItr, 2, 2));
104  iso.trackIsoR3PtCut20(TxC.getBkgSubTrackIso(*phoItr, 3, 2));
105  iso.trackIsoR4PtCut20(TxC.getBkgSubTrackIso(*phoItr, 4, 2));
106  iso.trackIsoR5PtCut20(TxC.getBkgSubTrackIso(*phoItr, 5, 2));
107 
108  // ecal spike rejection info (seed timing)
109  const reco::CaloClusterPtr seed = phoItr->superCluster()->seed();
110  const DetId& id = lazyTool.getMaximum(*seed).first;
111  float time = -999.;
112  const EcalRecHitCollection& rechits = (phoItr->isEB() ? *barrelEcalHits : *endcapEcalHits);
114  if (it != rechits.end()) {
115  time = it->time();
116  }
117  iso.seedTime(time);
118 
119  // ecal spike rejectino info (swiss cross)
120  float eMax = lazyTool.eMax(*seed);
121  float eRight = lazyTool.eRight(*seed);
122  float eLeft = lazyTool.eLeft(*seed);
123  float eTop = lazyTool.eTop(*seed);
124  float eBottom = lazyTool.eBottom(*seed);
125  iso.swissCrx(1 - (eRight + eLeft + eTop + eBottom) / eMax);
126 
127  isoVector.push_back(iso);
128  }
129  filler.insert(photons, isoVector.begin(), isoVector.end());
130  filler.fill();
131  evt.put(std::move(outputMap));
132 }

References HLT_2018_cff::barrelClusters, barrelClusters_, piZeroAnalyzer_cfi::barrelEcalHits, barrelEcalHits_, reco::HIPhotonIsolation::ecalClusterIsoR1(), reco::HIPhotonIsolation::ecalClusterIsoR2(), reco::HIPhotonIsolation::ecalClusterIsoR3(), reco::HIPhotonIsolation::ecalClusterIsoR4(), reco::HIPhotonIsolation::ecalClusterIsoR5(), cosmicPhotonAnalyzer_cfi::eMax, HLT_2018_cff::endcapClusters, endcapClusters_, piZeroAnalyzer_cfi::endcapEcalHits, endcapEcalHits_, trigObjTnPSource_cfi::filler, EcalClusterIsoCalculator::getBkgSubEcalClusterIso(), HcalRechitIsoCalculator::getBkgSubHcalRechitIso(), TrackIsoCalculator::getBkgSubTrackIso(), edm::Event::getByToken(), photonIsolationHIProducer_cfi::hbhe, hbhe_, reco::HIPhotonIsolation::hcalRechitIsoR1(), reco::HIPhotonIsolation::hcalRechitIsoR2(), reco::HIPhotonIsolation::hcalRechitIsoR3(), reco::HIPhotonIsolation::hcalRechitIsoR4(), reco::HIPhotonIsolation::hcalRechitIsoR5(), photonIsolationHIProducer_cfi::hf, hf_, photonIsolationHIProducer_cfi::ho, ho_, eostools::move(), photonProducer_, BPHMonitor_cfi::photons, edm::Event::put(), TrackInfoProducer_cfi::rechits, SurveyInfoScenario_cff::seed, reco::HIPhotonIsolation::seedTime(), reco::HIPhotonIsolation::swissCrx(), ntuplemaker::time, duplicaterechits_cfi::trackCollection, reco::HIPhotonIsolation::trackIsoR1PtCut20(), reco::HIPhotonIsolation::trackIsoR2PtCut20(), reco::HIPhotonIsolation::trackIsoR3PtCut20(), reco::HIPhotonIsolation::trackIsoR4PtCut20(), reco::HIPhotonIsolation::trackIsoR5PtCut20(), trackQuality_, and tracks_.

Member Data Documentation

◆ barrelClusters_

edm::EDGetTokenT<reco::BasicClusterCollection> photonIsolationHIProducer::barrelClusters_
private

Definition at line 37 of file photonIsolationHIProducer.cc.

Referenced by produce().

◆ barrelEcalHits_

edm::EDGetTokenT<EcalRecHitCollection> photonIsolationHIProducer::barrelEcalHits_
private

Definition at line 32 of file photonIsolationHIProducer.cc.

Referenced by produce().

◆ endcapClusters_

edm::EDGetTokenT<reco::BasicClusterCollection> photonIsolationHIProducer::endcapClusters_
private

Definition at line 38 of file photonIsolationHIProducer.cc.

Referenced by produce().

◆ endcapEcalHits_

edm::EDGetTokenT<EcalRecHitCollection> photonIsolationHIProducer::endcapEcalHits_
private

Definition at line 33 of file photonIsolationHIProducer.cc.

Referenced by produce().

◆ hbhe_

edm::EDGetTokenT<HBHERecHitCollection> photonIsolationHIProducer::hbhe_
private

Definition at line 34 of file photonIsolationHIProducer.cc.

Referenced by produce().

◆ hf_

edm::EDGetTokenT<HFRecHitCollection> photonIsolationHIProducer::hf_
private

Definition at line 35 of file photonIsolationHIProducer.cc.

Referenced by produce().

◆ ho_

edm::EDGetTokenT<HORecHitCollection> photonIsolationHIProducer::ho_
private

Definition at line 36 of file photonIsolationHIProducer.cc.

Referenced by produce().

◆ photonProducer_

edm::EDGetTokenT<reco::PhotonCollection> photonIsolationHIProducer::photonProducer_
private

Definition at line 31 of file photonIsolationHIProducer.cc.

Referenced by produce().

◆ trackQuality_

std::string photonIsolationHIProducer::trackQuality_
private

Definition at line 41 of file photonIsolationHIProducer.cc.

Referenced by produce().

◆ tracks_

edm::EDGetTokenT<reco::TrackCollection> photonIsolationHIProducer::tracks_
private

Definition at line 39 of file photonIsolationHIProducer.cc.

Referenced by produce().

edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
edm::SortedCollection< EcalRecHit >::const_iterator
std::vector< EcalRecHit >::const_iterator const_iterator
Definition: SortedCollection.h:80
piZeroAnalyzer_cfi.barrelEcalHits
barrelEcalHits
Definition: piZeroAnalyzer_cfi.py:9
reco::HIPhotonIsolation::hcalRechitIsoR5
float hcalRechitIsoR5() const
Rechit-based isolation (HCAL) R = 0.5.
Definition: HIPhotonIsolation.h:52
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
photonIsolationHIProducer::hf_
edm::EDGetTokenT< HFRecHitCollection > hf_
Definition: photonIsolationHIProducer.cc:35
photonIsolationHIProducer::trackQuality_
std::string trackQuality_
Definition: photonIsolationHIProducer.cc:41
reco::HIPhotonIsolation::trackIsoR1PtCut20
float trackIsoR1PtCut20() const
Track-based isolation, pt>2.0GeV, R = 0.1.
Definition: HIPhotonIsolation.h:55
photonIsolationHIProducer::barrelEcalHits_
edm::EDGetTokenT< EcalRecHitCollection > barrelEcalHits_
Definition: photonIsolationHIProducer.cc:32
edm::SortedCollection< EcalRecHit >
photonIsolationHIProducer::endcapEcalHits_
edm::EDGetTokenT< EcalRecHitCollection > endcapEcalHits_
Definition: photonIsolationHIProducer.cc:33
reco::HIPhotonIsolation::hcalRechitIsoR2
float hcalRechitIsoR2() const
Rechit-based isolation (HCAL) R = 0.2.
Definition: HIPhotonIsolation.h:46
HLT_2018_cff.barrelClusters
barrelClusters
Definition: HLT_2018_cff.py:81421
edm::Handle< reco::PhotonCollection >
HLT_2018_cff.endcapClusters
endcapClusters
Definition: HLT_2018_cff.py:81418
reco::HIPhotonIsolation::trackIsoR4PtCut20
float trackIsoR4PtCut20() const
Track-based isolation, pt>2.0GeV, R = 0.4.
Definition: HIPhotonIsolation.h:61
piZeroAnalyzer_cfi.endcapEcalHits
endcapEcalHits
Definition: piZeroAnalyzer_cfi.py:10
EcalClusterIsoCalculator
Definition: EcalClusterIsoCalculator.h:17
config
Definition: config.py:1
DetId
Definition: DetId.h:17
reco::HIPhotonIsolation::hcalRechitIsoR4
float hcalRechitIsoR4() const
Rechit-based isolation (HCAL) R = 0.4.
Definition: HIPhotonIsolation.h:50
photonIsolationHIProducer_cfi.hf
hf
Definition: photonIsolationHIProducer_cfi.py:9
reco::HIPhotonIsolation::ecalClusterIsoR2
float ecalClusterIsoR2() const
Cluster-based isolation (ECAL) R = 0.2.
Definition: HIPhotonIsolation.h:35
reco::HIPhotonIsolation
Definition: HIPhotonIsolation.h:8
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
photonIsolationHIProducer::photonProducer_
edm::EDGetTokenT< reco::PhotonCollection > photonProducer_
Definition: photonIsolationHIProducer.cc:31
reco::HIPhotonIsolation::ecalClusterIsoR1
float ecalClusterIsoR1() const
Cluster-based isolation (ECAL) R = 0.1.
Definition: HIPhotonIsolation.h:33
reco::HIPhotonIsolation::trackIsoR5PtCut20
float trackIsoR5PtCut20() const
Track-based isolation, pt>2.0GeV, R = 0.5.
Definition: HIPhotonIsolation.h:63
reco::HIPhotonIsolation::trackIsoR2PtCut20
float trackIsoR2PtCut20() const
Track-based isolation, pt>2.0GeV, R = 0.2.
Definition: HIPhotonIsolation.h:57
reco::HIPhotonIsolation::hcalRechitIsoR1
float hcalRechitIsoR1() const
Rechit-based isolation (HCAL) R = 0.1.
Definition: HIPhotonIsolation.h:44
edm::Event::getByToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:528
EcalClusterLazyTools
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
photonIsolationHIProducer::barrelClusters_
edm::EDGetTokenT< reco::BasicClusterCollection > barrelClusters_
Definition: photonIsolationHIProducer.cc:37
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
duplicaterechits_cfi.trackCollection
trackCollection
Definition: duplicaterechits_cfi.py:4
reco::HIPhotonIsolation::ecalClusterIsoR4
float ecalClusterIsoR4() const
Cluster-based isolation (ECAL) R = 0.4.
Definition: HIPhotonIsolation.h:39
cosmicPhotonAnalyzer_cfi.eMax
eMax
Definition: cosmicPhotonAnalyzer_cfi.py:10
trigObjTnPSource_cfi.filler
filler
Definition: trigObjTnPSource_cfi.py:21
TrackIsoCalculator
Definition: TrackIsoCalculator.h:8
TrackInfoProducer_cfi.rechits
rechits
Definition: TrackInfoProducer_cfi.py:9
edm::Event::put
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:132
photonIsolationHIProducer_cfi.ho
ho
Definition: photonIsolationHIProducer_cfi.py:10
BPHMonitor_cfi.photons
photons
Definition: BPHMonitor_cfi.py:91
HcalRechitIsoCalculator
Definition: HcalRechitIsoCalculator.h:19
edm::Ptr< CaloCluster >
photonIsolationHIProducer_cfi.hbhe
hbhe
Definition: photonIsolationHIProducer_cfi.py:8
reco::HIPhotonIsolation::ecalClusterIsoR5
float ecalClusterIsoR5() const
Cluster-based isolation (ECAL) R = 0.5.
Definition: HIPhotonIsolation.h:41
eostools.move
def move(src, dest)
Definition: eostools.py:511
photonIsolationHIProducer::hbhe_
edm::EDGetTokenT< HBHERecHitCollection > hbhe_
Definition: photonIsolationHIProducer.cc:34
reco::HIPhotonIsolation::trackIsoR3PtCut20
float trackIsoR3PtCut20() const
Track-based isolation, pt>2.0GeV, R = 0.3.
Definition: HIPhotonIsolation.h:59
reco::HIPhotonIsolation::swissCrx
float swissCrx() const
SwissCross crystal ratio.
Definition: HIPhotonIsolation.h:66
reco::HIPhotonIsolation::hcalRechitIsoR3
float hcalRechitIsoR3() const
Rechit-based isolation (HCAL) R = 0.3.
Definition: HIPhotonIsolation.h:48
photonIsolationHIProducer::ho_
edm::EDGetTokenT< HORecHitCollection > ho_
Definition: photonIsolationHIProducer.cc:36
edm::helper::Filler
Definition: ValueMap.h:22
photonIsolationHIProducer::endcapClusters_
edm::EDGetTokenT< reco::BasicClusterCollection > endcapClusters_
Definition: photonIsolationHIProducer.cc:38
ntuplemaker.time
time
Definition: ntuplemaker.py:310
reco::HIPhotonIsolation::seedTime
float seedTime() const
Ecal rechit seed time.
Definition: HIPhotonIsolation.h:68
edm::InputTag
Definition: InputTag.h:15
SurveyInfoScenario_cff.seed
seed
Definition: SurveyInfoScenario_cff.py:295
photonIsolationHIProducer::tracks_
edm::EDGetTokenT< reco::TrackCollection > tracks_
Definition: photonIsolationHIProducer.cc:39
reco::HIPhotonIsolation::ecalClusterIsoR3
float ecalClusterIsoR3() const
Cluster-based isolation (ECAL) R = 0.3.
Definition: HIPhotonIsolation.h:37