|
| PhotonIDValueMapProducer (const edm::ParameterSet &) |
|
| ~PhotonIDValueMapProducer () override |
|
| EDProducer ()=default |
|
| EDProducer (const EDProducer &)=delete |
|
bool | hasAbilityToProduceInBeginLumis () const final |
|
bool | hasAbilityToProduceInBeginProcessBlocks () const final |
|
bool | hasAbilityToProduceInBeginRuns () const final |
|
bool | hasAbilityToProduceInEndLumis () const final |
|
bool | hasAbilityToProduceInEndProcessBlocks () const final |
|
bool | hasAbilityToProduceInEndRuns () const final |
|
EDProducer & | operator= (const EDProducer &)=delete |
|
bool | wantsGlobalLuminosityBlocks () const final |
|
bool | wantsGlobalRuns () const final |
|
bool | wantsInputProcessBlocks () const final |
|
bool | wantsProcessBlocks () const final |
|
bool | wantsStreamLuminosityBlocks () const final |
|
bool | wantsStreamRuns () const final |
|
| EDProducerBase () |
|
ModuleDescription const & | moduleDescription () const |
|
| ~EDProducerBase () override |
|
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
|
std::vector< edm::ProductResolverIndex > const & | indiciesForPutProducts (BranchType iBranchType) const |
|
| ProducerBase () |
|
std::vector< edm::ProductResolverIndex > const & | putTokenIndexToProductResolverIndex () const |
|
std::vector< bool > const & | recordProvenanceList () const |
|
void | registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &) |
|
std::function< void(BranchDescription const &)> | registrationCallback () const |
| used by the fwk to register list of products More...
|
|
void | resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel) |
|
TypeLabelList const & | typeLabelList () const |
| used by the fwk to register the list of products of this module More...
|
|
| ~ProducerBase () noexcept(false) override |
|
std::vector< ConsumesInfo > | consumesInfo () const |
|
void | convertCurrentProcessAlias (std::string const &processName) |
| Convert "@currentProcess" in InputTag process names to the actual current process name. More...
|
|
| EDConsumerBase () |
|
| EDConsumerBase (EDConsumerBase const &)=delete |
|
| EDConsumerBase (EDConsumerBase &&)=default |
|
ESResolverIndex const * | esGetTokenIndices (edm::Transition iTrans) const |
|
std::vector< ESResolverIndex > const & | esGetTokenIndicesVector (edm::Transition iTrans) const |
|
std::vector< ESRecordIndex > const & | esGetTokenRecordIndicesVector (edm::Transition iTrans) const |
|
ProductResolverIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
|
void | itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
|
void | itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
|
std::vector< ProductResolverIndexAndSkipBit > const & | itemsToGetFrom (BranchType iType) const |
|
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
|
void | modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const |
|
EDConsumerBase const & | operator= (EDConsumerBase const &)=delete |
|
EDConsumerBase & | operator= (EDConsumerBase &&)=default |
|
bool | registeredToConsume (ProductResolverIndex, bool, BranchType) const |
|
void | selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase) |
|
ProductResolverIndexAndSkipBit | uncheckedIndexFrom (EDGetToken) const |
|
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
|
void | updateLookup (eventsetup::ESRecordsToProductResolverIndices const &) |
|
virtual | ~EDConsumerBase () noexcept(false) |
|
|
typedef EDProducerBase | ModuleType |
|
template<typename T > |
using | BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T > |
|
using | ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > > |
|
typedef ProductRegistryHelper::TypeLabelList | TypeLabelList |
|
typedef ProductLabels | Labels |
|
template<Transition Tr = Transition::Event> |
auto | produces (std::string instanceName) noexcept |
| declare what type of product will make and with which optional label More...
|
|
template<Transition B> |
BranchAliasSetter | produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true) |
|
template<BranchType B> |
BranchAliasSetter | produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true) |
|
BranchAliasSetter | produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true) |
|
template<typename ProductType , Transition B> |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
|
template<class ProductType > |
BranchAliasSetterT< ProductType > | produces () |
|
template<typename ProductType , BranchType B> |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
|
template<typename ProductType , BranchType B> |
BranchAliasSetterT< ProductType > | produces () |
|
template<class ProductType > |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
|
template<typename ProductType , Transition B> |
BranchAliasSetterT< ProductType > | produces () |
|
template<Transition Tr = Transition::Event> |
auto | produces () noexcept |
|
ProducesCollector | producesCollector () |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
|
template<BranchType B = InEvent> |
EDConsumerBaseAdaptor< B > | consumes (edm::InputTag tag) noexcept |
|
EDGetToken | consumes (const TypeToGet &id, edm::InputTag const &tag) |
|
template<BranchType B> |
EDGetToken | consumes (TypeToGet const &id, edm::InputTag const &tag) |
|
ConsumesCollector | consumesCollector () |
| Use a ConsumesCollector to gather consumes information from helper functions. More...
|
|
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes () |
|
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag const &tag) |
|
template<Transition Tr = Transition::Event> |
constexpr auto | esConsumes () |
|
template<Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag tag) |
|
template<Transition Tr = Transition::Event> |
ESGetTokenGeneric | esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey) |
| Used with EventSetupRecord::doGet. More...
|
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | mayConsume (edm::InputTag const &tag) |
|
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
template<BranchType B> |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
void | resetItemsToGetFrom (BranchType iType) |
|
Definition at line 82 of file PhotonIDValueMapProducer.cc.
Definition at line 369 of file PhotonIDValueMapProducer.cc.
References coneSizeDR2, HLTMuonOfflineAnalyzer_cfi::deltaR2, ALPAKA_ACCELERATOR_NAMESPACE::dR2(), DR_VETO, dRveto2Barrel, dRveto2Endcap, PVValHelper::dxy, dxyMax, PVValHelper::dz, dzMax, reco::PFCandidate::h, HLTEGTnPMonitor_cfi::isAOD, SiStripPI::max, displacedMuons_cfi::photon, PT_MIN_THRESH, ptMin, PV_CONSTRAINT, AlignmentTracksFromVertexSelector_cfi::vertices, and L1BJetProducer_cff::vtx.
Referenced by produce().
375 float worstIsolation = 0.0;
379 std::vector<CachingPtrCandidate> chargedCands;
380 chargedCands.reserve(pfCands.size());
381 for (
auto const& aCand : pfCands) {
390 chargedCands.emplace_back(&*aCand,
isAOD);
394 for (
unsigned int ivtx = 0; ivtx <
vertices.size(); ++ivtx) {
401 const float phoWrtVtxPhi = phoWrtVtx.phi();
402 const float phoWrtVtxEta = phoWrtVtx.eta();
406 for (
auto const& aCCand : chargedCands) {
407 auto iCand = aCCand.candidate;
409 float dR2 =
deltaR2(phoWrtVtxEta, phoWrtVtxPhi, iCand->eta(), iCand->phi());
416 getImpactParameters(aCCand,
pv,
dxy,
dz);
418 getImpactParameters(aCCand, *
vtx,
dxy,
dz);
426 worstIsolation =
std::max(sum, worstIsolation);
429 return worstIsolation;
const unsigned char DR_VETO
ParticleType
particle types
const unsigned char PV_CONSTRAINT
constexpr float dRveto2Endcap
constexpr float coneSizeDR2
const unsigned char PT_MIN_THRESH
ALPAKA_FN_ACC static ALPAKA_FN_INLINE float dR2(Position4 pos1, Position4 pos2)
constexpr float dRveto2Barrel
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Implements edm::global::EDProducerBase.
Definition at line 178 of file PhotonIDValueMapProducer.cc.
References computeWorstPFChargedIsolation(), coneSizeDR2, HLTMuonOfflineAnalyzer_cfi::deltaR2, ALPAKA_ACCELERATOR_NAMESPACE::dR2(), DR_VETO, PVValHelper::dxy, dxyMax, PVValHelper::dz, dzMax, ebRecHits_, ecalClusterToolsESGetTokens_, eeRecHits_, mps_fire::end, esRecHits_, Exception, f, trigObjTnPSource_cfi::filler, reco::PFCandidate::gamma, EcalClusterLazyToolsBase::ESGetTokens::get(), reco::PFCandidate::h, reco::PFCandidate::h0, mps_fire::i, iEvent, isAOD_, edm::isNotFinite(), eostools::move(), names, nVars_, particleBasedIsolationToken_, packedPFCandidateRefMixer_cfi::pf, pfCandsToken_, PT_MIN_THRESH, PV_CONSTRAINT, fileCollector::seed, mathSSE::sqrt(), TrackRefitter_38T_cff::src, src_, ctpps_dqm_sourceclient-live_cfg::test, usesES_, AlignmentTracksFromVertexSelector_cfi::vertices, and vtxToken_.
187 }
else if (!
src->empty()) {
189 if (
test.isNull() || !
test.isAvailable()) {
191 <<
"DataFormat is detected as miniAOD but cannot cast to pat::Photon!";
208 std::vector<edm::Ptr<reco::Candidate>> pfCandNoNaN;
209 for (
const auto&
pf : pfCandsHandle->ptrs()) {
211 edm::LogWarning(
"PhotonIDValueMapProducer") <<
"PF candidate pT is NaN, skipping, see issue #39110" << std::endl;
213 pfCandNoNaN.push_back(
pf);
218 for (
auto const& iPho :
src->ptrs()) {
222 const auto&
seed = *(iPho->superCluster()->seed());
228 const auto& vCov = lazyToolnoZS.localCovariances(
seed);
230 vars[1].push_back(vCov[1]);
231 vars[2].push_back(lazyToolnoZS.e1x3(
seed));
232 vars[3].push_back(lazyToolnoZS.e2x2(
seed));
233 vars[4].push_back(lazyToolnoZS.e2x5Max(
seed));
234 vars[5].push_back(lazyToolnoZS.e5x5(
seed));
235 vars[6].push_back(lazyToolnoZS.eseffsirir(*(iPho->superCluster())));
246 iPho->superCluster()->x() -
pv.x(), iPho->superCluster()->y() -
pv.y(), iPho->superCluster()->z() -
pv.z());
249 float chargedIsoSum = 0.;
250 float neutralHadronIsoSum = 0.;
251 float photonIsoSum = 0.;
254 for (
auto const& iCand : pfCandNoNaN) {
275 float dR2 =
deltaR2(phoWrtVtx.Eta(), phoWrtVtx.Phi(), iCand->eta(), iCand->phi());
281 if (isInFootprint((*particleBasedIsolationMap)[iPho], iCand))
285 if (isInFootprint(
patPhotonPtr->associatedPackedPFCandidates(), iCand))
299 getImpactParameters(CachingPtrCandidate(&*iCand,
isAOD_),
pv,
dxy,
dz);
305 chargedIsoSum += iCand->pt();
309 neutralHadronIsoSum += iCand->pt();
312 photonIsoSum += iCand->pt();
315 vars[10].push_back(chargedIsoSum);
316 vars[11].push_back(neutralHadronIsoSum);
317 vars[12].push_back(photonIsoSum);
332 vars[16].push_back(iPho->trkSumPtSolidConeDR04());
334 vars[17].push_back(0.
f);
335 vars[18].push_back(0.
f);
345 auto valMap = std::make_unique<edm::ValueMap<float>>();
const unsigned char DR_VETO
ParticleType
particle types
const unsigned char PV_CONSTRAINT
constexpr bool isNotFinite(T x)
constexpr float coneSizeDR2
EcalClusterLazyToolsT< noZS::EcalClusterTools > EcalClusterLazyTools
const std::string names[nVars_]
const unsigned char PT_MIN_THRESH
const edm::EDGetTokenT< EcalRecHitCollection > eeRecHits_
float computeWorstPFChargedIsolation(const reco::Photon &photon, const std::vector< edm::Ptr< reco::Candidate >> &pfCands, const reco::VertexCollection &vertices, const reco::Vertex &pv, unsigned char options, bool isAOD) const
ALPAKA_FN_ACC static ALPAKA_FN_INLINE float dR2(Position4 pos1, Position4 pos2)
const EcalClusterLazyTools::ESGetTokens ecalClusterToolsESGetTokens_
const edm::EDGetTokenT< EcalRecHitCollection > ebRecHits_
const edm::EDGetTokenT< reco::VertexCollection > vtxToken_
const edm::EDGetTokenT< edm::View< reco::Candidate > > pfCandsToken_
XYZVectorD XYZVector
spatial vector with cartesian internal representation
const edm::EDGetTokenT< EcalRecHitCollection > esRecHits_
edm::Ptr< pat::Photon > patPhotonPtr
const edm::EDGetToken particleBasedIsolationToken_
Log< level::Warning, false > LogWarning
const edm::EDGetTokenT< edm::View< reco::Photon > > src_