|
| EgammaHLTPhase2ExtraProducer (const edm::ParameterSet &pset) |
|
void | produce (edm::StreamID streamID, edm::Event &event, const edm::EventSetup &eventSetup) const override |
|
| ~EgammaHLTPhase2ExtraProducer () 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 &&)=default |
|
| EDConsumerBase (EDConsumerBase const &)=delete |
|
ESProxyIndex const * | esGetTokenIndices (edm::Transition iTrans) const |
|
std::vector< ESProxyIndex > 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 & | operator= (EDConsumerBase &&)=default |
|
EDConsumerBase const & | operator= (EDConsumerBase const &)=delete |
|
bool | registeredToConsume (ProductResolverIndex, bool, BranchType) const |
|
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
|
ProductResolverIndexAndSkipBit | uncheckedIndexFrom (EDGetToken) const |
|
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
|
void | updateLookup (eventsetup::ESRecordsToProxyIndices const &) |
|
virtual | ~EDConsumerBase () noexcept(false) |
|
|
typedef EDProducerBase | ModuleType |
|
using | ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > > |
|
typedef ProductRegistryHelper::TypeLabelList | TypeLabelList |
|
typedef ProductLabels | Labels |
|
template<class ProductType > |
BranchAliasSetterT< ProductType > | produces () |
| declare what type of product will make and with which optional label More...
|
|
template<typename ProductType , BranchType B> |
BranchAliasSetterT< ProductType > | produces () |
|
template<typename ProductType , Transition B> |
BranchAliasSetterT< ProductType > | produces () |
|
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) |
|
template<Transition B> |
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 (std::string instanceName) |
|
template<typename ProductType , BranchType B> |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
|
ProducesCollector | producesCollector () |
|
EDGetToken | consumes (const TypeToGet &id, edm::InputTag const &tag) |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
|
template<BranchType B = InEvent> |
EDConsumerBaseAdaptor< B > | consumes (edm::InputTag tag) noexcept |
|
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 ProductType , BranchType B = InEvent> |
void | consumesMany () |
|
void | consumesMany (const TypeToGet &id) |
|
template<BranchType B> |
void | consumesMany (const TypeToGet &id) |
|
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes () |
|
template<Transition Tr = Transition::Event> |
constexpr auto | esConsumes () noexcept |
|
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag const &tag) |
|
template<Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag tag) noexcept |
|
template<Transition Tr = Transition::Event> |
ESGetTokenGeneric | esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey) |
| Used with EventSetupRecord::doGet. More...
|
|
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
template<BranchType B> |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | mayConsume (edm::InputTag const &tag) |
|
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 308 of file EgammaHLTPhase2ExtraProducer.cc.
312 auto filteredObjs = std::make_unique<CollType>();
319 std::vector<std::pair<float, float>> etaPhisTmp;
320 for (
const auto& egTrigObj : egTrigObjs) {
322 etaPhisTmp.push_back({egTrigObj.eta(), egTrigObj.phi()});
324 for (
const auto& gsfTrk : egTrigObj.gsfTracks()) {
325 etaPhisTmp.push_back({gsfTrk->eta(), gsfTrk->phi()});
329 std::vector<std::pair<float, float>> etaPhis;
330 for (
const auto& etaPhi : etaPhisTmp) {
331 etaPhis.push_back(etaPhi);
333 etaPhis.push_back({etaPhi.first, etaPhi.second + 3.14159});
335 etaPhis.push_back({etaPhi.first, etaPhi.second + 3.14159 / 2.});
338 auto deltaR2Match = [&etaPhis, &maxDR2](
float eta,
float phi) {
339 for (
auto& etaPhi : etaPhis) {
346 for (
size_t objNr = 0; objNr <
objs->size(); objNr++) {
347 RefType ref(
objs, objNr);
348 if (deltaR2Match(ref->eta(), ref->phi())) {
349 filteredObjs->push_back(*ref);
350 orgRefs.push_back(ref);
References reco::deltaR2(), PVValHelper::eta, minPtToSaveHits_, HLTEGTnPMonitor_cfi::objs, phi, saveHitsPlusHalfPi_, and saveHitsPlusPi_.
Referenced by produce().
template<typename RecHitCollection >
Definition at line 357 of file EgammaHLTPhase2ExtraProducer.cc.
362 auto filteredHits = std::make_unique<RecHitCollection>();
366 std::vector<std::pair<float, float>> etaPhis;
367 for (
const auto& egTrigObj : egTrigObjs) {
369 etaPhis.push_back({egTrigObj.eta(), egTrigObj.phi()});
371 etaPhis.push_back({egTrigObj.eta(), egTrigObj.phi() + 3.14159});
373 etaPhis.push_back({egTrigObj.eta(), egTrigObj.phi() + 3.14159 / 2.});
379 for (
auto& etaPhi : etaPhis) {
390 if (deltaR2Match(cellGeom->getPosition()))
391 filteredHits->push_back(
hit);
393 throw cms::Exception(
"GeomError") <<
"could not get geometry for det id " <<
hit.
id().rawId();
References reco::deltaR2(), PVValHelper::eta, Exception, relativeConstraints::geom, hit::id, minPtToSaveHits_, phi, FastTrackerRecHitMaskProducer_cfi::recHits, saveHitsPlusHalfPi_, saveHitsPlusPi_, and GeomDetEnumerators::subDetGeom.
Referenced by produce().
Implements edm::global::EDProducerBase.
Definition at line 220 of file EgammaHLTPhase2ExtraProducer.cc.
232 auto handle =
event.getHandle(tokenLabel.first);
237 for (
const auto& tokenLabel : tokenLabels) {
238 auto handle =
event.getHandle(tokenLabel.first);
240 for (
size_t thresNr = 0; thresNr <
thresholds.size(); thresNr++) {
243 prefixLabel + tokenLabel.second +
"Thres" + convertToProdNameStr(thres) +
"GeV");
251 std::vector<edm::Ref<reco::CaloClusterCollection>> orgHGCalLayerClusterRefs;
253 std::vector<std::pair<float, float>> timesFiltered;
254 timesFiltered.reserve(orgHGCalLayerClusterRefs.size());
255 for (
auto& clusRef : orgHGCalLayerClusterRefs) {
256 timesFiltered.push_back((*hgcalLayerClustersTime)[clusRef]);
258 auto hgcalLayerClustersFilteredHandle =
event.put(
std::move(hgcalLayerClustersFiltered),
"hgcalLayerClusters");
259 event.put(
makeValueMap(hgcalLayerClustersFilteredHandle, timesFiltered),
"hgcalLayerClustersTime");
261 std::vector<edm::Ref<L1TrackCollection>> orgL1TrkRefs;
262 auto l1TrksFiltered =
filterObjs(*egTrigObjs, l1trks, orgL1TrkRefs);
263 std::vector<edm::Ref<TrackingParticleCollection>> orgTPRefs;
264 auto trkPartsFiltered =
filterObjs(*egTrigObjs, trkParts, orgTPRefs);
267 std::unordered_map<size_t, size_t> orgTPIndxToNewIndx;
268 for (
size_t refNr = 0; refNr < orgTPRefs.size(); refNr++) {
269 orgTPIndxToNewIndx.insert(std::make_pair(orgTPRefs[refNr].
key(), refNr));
275 auto l1TrkExtraColl = std::make_unique<L1TrackTruthPairCollection>();
277 for (
size_t l1TrkNr = 0; l1TrkNr < orgL1TrkRefs.size(); l1TrkNr++) {
278 auto orgTrkRef = orgL1TrkRefs[l1TrkNr];
281 if (l1TrkToTrkPartMap->isGenuine(orgTrkPtr))
283 if (l1TrkToTrkPartMap->isLooselyGenuine(orgTrkPtr))
285 if (l1TrkToTrkPartMap->isCombinatoric(orgTrkPtr))
287 if (l1TrkToTrkPartMap->isUnknown(orgTrkPtr))
290 auto orgTPRef = l1TrkToTrkPartMap->findTrackingParticlePtr(orgTrkPtr);
291 auto getNewTPRef = [&orgTPIndxToNewIndx, &orgTPRef, &trkPartsFiltHandle]() {
292 auto newIndexPair = orgTPIndxToNewIndx.find(orgTPRef.key());
293 if (newIndexPair != orgTPIndxToNewIndx.end()) {
298 auto newTPRef = getNewTPRef();
302 l1TrkExtraColl->push_back(l1TrkExtra);
References submitPVResolutionJobs::count, EgammaHLTPhase2ExtraProducer::Tokens::egTrigObjs, edmPickEvents::event, filterObjs(), filterRecHits(), HLT_FULL_cff::flags, edm::EventSetup::get(), get, patZpeak::handle, EgammaHLTPhase2ExtraProducer::Tokens::hgcal, hgcalLayerClusters_cff::hgcalLayerClusters, 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, crabWrapper::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.