|
| EgammaHLTPhase2ExtraProducer (const edm::ParameterSet &pset) |
|
void | produce (edm::StreamID streamID, edm::Event &event, const edm::EventSetup &eventSetup) const 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 noexcept final |
|
bool | wantsGlobalRuns () const noexcept final |
|
bool | wantsInputProcessBlocks () const noexcept final |
|
bool | wantsProcessBlocks () const noexcept final |
|
bool | wantsStreamLuminosityBlocks () const noexcept final |
|
bool | wantsStreamRuns () const noexcept 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) |
|
template<typename CollType , typename RefType >
std::unique_ptr< CollType > EgammaHLTPhase2ExtraProducer::filterObjs |
( |
const trigger::EgammaObjectCollection & |
egTrigObjs, |
|
|
const edm::Handle< CollType > & |
objs, |
|
|
std::vector< RefType > & |
orgRefs, |
|
|
float |
maxDR2 = 0.4 * 0.4 |
|
) |
| const |
|
private |
Definition at line 309 of file EgammaHLTPhase2ExtraProducer.cc.
References reco::deltaR2(), PVValHelper::eta, minPtToSaveHits_, HLTEGTnPMonitor_cfi::objs, phi, saveHitsPlusHalfPi_, and saveHitsPlusPi_.
Referenced by produce().
313 auto filteredObjs = std::make_unique<CollType>();
320 std::vector<std::pair<float, float>> etaPhisTmp;
321 for (
const auto& egTrigObj : egTrigObjs) {
323 etaPhisTmp.push_back({egTrigObj.eta(), egTrigObj.phi()});
325 for (
const auto& gsfTrk : egTrigObj.gsfTracks()) {
326 etaPhisTmp.push_back({gsfTrk->eta(), gsfTrk->phi()});
330 std::vector<std::pair<float, float>> etaPhis;
331 for (
const auto& etaPhi : etaPhisTmp) {
332 etaPhis.push_back(etaPhi);
334 etaPhis.push_back({etaPhi.first, etaPhi.second + 3.14159});
336 etaPhis.push_back({etaPhi.first, etaPhi.second + 3.14159 / 2.});
339 auto deltaR2Match = [&etaPhis, &maxDR2](
float eta,
float phi) {
340 for (
auto& etaPhi : etaPhis) {
347 for (
size_t objNr = 0; objNr <
objs->size(); objNr++) {
348 RefType ref(
objs, objNr);
349 if (deltaR2Match(ref->eta(), ref->phi())) {
350 filteredObjs->push_back(*ref);
351 orgRefs.push_back(ref);
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Implements edm::global::EDProducerBase.
Definition at line 220 of file EgammaHLTPhase2ExtraProducer.cc.
References caloGeomToken_, submitPVResolutionJobs::count, EgammaHLTPhase2ExtraProducer::Tokens::egTrigObjs, edmPickEvents::event, options_cfi::eventSetup, filterObjs(), filterRecHits(), HLT_2024v14_cff::flags, patZpeak::handle, EgammaHLTPhase2ExtraProducer::Tokens::hgcal, EgammaHLTPhase2ExtraProducer::Tokens::hgcalLayerClusters, EgammaHLTPhase2ExtraProducer::Tokens::hgcalLayerClustersTime, edm::OrphanHandleBase::id(), TTTrackTruthPair< T >::StatusFlags::IsCombinatoric, TTTrackTruthPair< T >::StatusFlags::IsGenuine, TTTrackTruthPair< T >::StatusFlags::IsLooselyGenuine, TTTrackTruthPair< T >::StatusFlags::IsUnknown, submitPVResolutionJobs::key, EgammaHLTPhase2ExtraProducer::Tokens::l1Trks, EgammaHLTPhase2ExtraProducer::Tokens::l1TrkToTrkPartMap, makeValueMap(), eostools::move(), recHitCountThresholds_, FastTrackerRecHitMaskProducer_cfi::recHits, edm::refToPtr(), AlCaHLTBitMon_QueryRunRegistry::string, particleFlowZeroSuppressionECAL_cff::thresholds, tokens_, and EgammaHLTPhase2ExtraProducer::Tokens::trkParts.
232 auto handle =
event.getHandle(tokenLabel.first);
238 for (
const auto& tokenLabel : tokenLabels) {
239 auto handle =
event.getHandle(tokenLabel.first);
241 for (
size_t thresNr = 0; thresNr <
thresholds.size(); thresNr++) {
244 prefixLabel + tokenLabel.second +
"Thres" + convertToProdNameStr(thres) +
"GeV");
252 std::vector<edm::Ref<reco::CaloClusterCollection>> orgHGCalLayerClusterRefs;
253 auto hgcalLayerClustersFiltered =
filterObjs(*egTrigObjs, hgcalLayerClusters, orgHGCalLayerClusterRefs);
254 std::vector<std::pair<float, float>> timesFiltered;
255 timesFiltered.reserve(orgHGCalLayerClusterRefs.size());
256 for (
auto& clusRef : orgHGCalLayerClusterRefs) {
257 timesFiltered.push_back((*hgcalLayerClustersTime)[clusRef]);
259 auto hgcalLayerClustersFilteredHandle =
event.put(
std::move(hgcalLayerClustersFiltered),
"hgcalLayerClusters");
260 event.put(
makeValueMap(hgcalLayerClustersFilteredHandle, timesFiltered),
"hgcalLayerClustersTime");
262 std::vector<edm::Ref<L1TrackCollection>> orgL1TrkRefs;
263 auto l1TrksFiltered =
filterObjs(*egTrigObjs, l1trks, orgL1TrkRefs);
264 std::vector<edm::Ref<TrackingParticleCollection>> orgTPRefs;
265 auto trkPartsFiltered =
filterObjs(*egTrigObjs, trkParts, orgTPRefs);
268 std::unordered_map<size_t, size_t> orgTPIndxToNewIndx;
269 for (
size_t refNr = 0; refNr < orgTPRefs.size(); refNr++) {
270 orgTPIndxToNewIndx.insert(std::make_pair(orgTPRefs[refNr].
key(), refNr));
276 auto l1TrkExtraColl = std::make_unique<L1TrackTruthPairCollection>();
278 for (
size_t l1TrkNr = 0; l1TrkNr < orgL1TrkRefs.size(); l1TrkNr++) {
279 auto orgTrkRef = orgL1TrkRefs[l1TrkNr];
282 if (l1TrkToTrkPartMap->isGenuine(orgTrkPtr))
284 if (l1TrkToTrkPartMap->isLooselyGenuine(orgTrkPtr))
286 if (l1TrkToTrkPartMap->isCombinatoric(orgTrkPtr))
288 if (l1TrkToTrkPartMap->isUnknown(orgTrkPtr))
291 auto orgTPRef = l1TrkToTrkPartMap->findTrackingParticlePtr(orgTrkPtr);
292 auto getNewTPRef = [&orgTPIndxToNewIndx, &orgTPRef, &trkPartsFiltHandle]() {
293 auto newIndexPair = orgTPIndxToNewIndx.find(orgTPRef.key());
294 if (newIndexPair != orgTPIndxToNewIndx.end()) {
299 auto newTPRef = getNewTPRef();
303 l1TrkExtraColl->push_back(l1TrkExtra);
Ptr< typename C::value_type > refToPtr(Ref< C, typename C::value_type, refhelper::FindUsingAdvance< C, typename C::value_type > > const &ref)
key
prepare the HTCondor submission files and eventually submit them