CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
HLTPixelIsolTrackL1TFilter Class Reference

#include <HLTPixelIsolTrackL1TFilter.h>

Inheritance diagram for HLTPixelIsolTrackL1TFilter:
HLTFilter edm::global::EDFilter<> edm::global::EDFilterBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

bool hltFilter (edm::Event &, const edm::EventSetup &, trigger::TriggerFilterObjectWithRefs &filterproduct) const override
 
 HLTPixelIsolTrackL1TFilter (const edm::ParameterSet &)
 
 ~HLTPixelIsolTrackL1TFilter () override
 
- Public Member Functions inherited from HLTFilter
 HLTFilter (const edm::ParameterSet &config)
 
int module (edm::Event const &) const
 
const std::string * moduleLabel () const
 
int path (edm::Event const &) const
 
const std::string * pathName (edm::Event const &) const
 
std::pair< int, int > pmid (edm::Event const &) const
 
bool saveTags () const
 
 ~HLTFilter () override
 
- Public Member Functions inherited from edm::global::EDFilter<>
 EDFilter ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDFilterBase
 EDFilterBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDFilterBase () override
 
- Public Member Functions inherited from edm::ProducerBase
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
 
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)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () 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
 
ESProxyIndex const * esGetTokenIndices (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::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
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)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from HLTFilter
static void makeHLTFilterDescription (edm::ParameterSetDescription &desc)
 
- Static Public Member Functions inherited from edm::global::EDFilterBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Attributes

edm::InputTag candTag_
 
edm::EDGetTokenT< reco::IsolatedPixelTrackCandidateCollectioncandToken_
 
bool dropMultiL2Event_
 
bool filterE_
 
edm::InputTag hltGTseedlabel_
 
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefshltGTseedToken_
 
double maxetatrack_
 
double maxptnearby_
 
double minDeltaPtL1Jet_
 
double minEnergy_
 
double minetatrack_
 
double minpttrack_
 
int nMaxTrackCandidates_
 

Additional Inherited Members

- Public Types inherited from edm::global::EDFilterBase
typedef EDFilterBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
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 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<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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)
 

Detailed Description

Definition at line 14 of file HLTPixelIsolTrackL1TFilter.h.

Constructor & Destructor Documentation

HLTPixelIsolTrackL1TFilter::HLTPixelIsolTrackL1TFilter ( const edm::ParameterSet iConfig)
explicit

Definition at line 14 of file HLTPixelIsolTrackL1TFilter.cc.

References candTag_, candToken_, dropMultiL2Event_, filterE_, edm::ParameterSet::getParameter(), hltGTseedlabel_, hltGTseedToken_, maxetatrack_, maxptnearby_, minDeltaPtL1Jet_, minEnergy_, minetatrack_, minpttrack_, nMaxTrackCandidates_, and ~HLTPixelIsolTrackL1TFilter().

14  : HLTFilter(iConfig) {
15  candTag_ = iConfig.getParameter<edm::InputTag> ("candTag");
16  hltGTseedlabel_ = iConfig.getParameter<edm::InputTag> ("L1GTSeedLabel");
17  minDeltaPtL1Jet_ = iConfig.getParameter<double> ("MinDeltaPtL1Jet");
18  minpttrack_ = iConfig.getParameter<double> ("MinPtTrack");
19  maxptnearby_ = iConfig.getParameter<double> ("MaxPtNearby");
20  maxetatrack_ = iConfig.getParameter<double> ("MaxEtaTrack");
21  minetatrack_ = iConfig.getParameter<double> ("MinEtaTrack");
22  filterE_ = iConfig.getParameter<bool> ("filterTrackEnergy");
23  minEnergy_ = iConfig.getParameter<double>("MinEnergyTrack");
24  nMaxTrackCandidates_ = iConfig.getParameter<int>("NMaxTrackCandidates");
25  dropMultiL2Event_ = iConfig.getParameter<bool> ("DropMultiL2Event");
26  candToken_ = consumes<reco::IsolatedPixelTrackCandidateCollection>(candTag_);
27  hltGTseedToken_ = consumes<trigger::TriggerFilterObjectWithRefs>(hltGTseedlabel_);
28 }
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::IsolatedPixelTrackCandidateCollection > candToken_
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > hltGTseedToken_
HLTFilter(const edm::ParameterSet &config)
Definition: HLTFilter.cc:20
HLTPixelIsolTrackL1TFilter::~HLTPixelIsolTrackL1TFilter ( )
overridedefault

Member Function Documentation

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

Definition at line 34 of file HLTPixelIsolTrackL1TFilter.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), and HLTFilter::makeHLTFilterDescription().

34  {
37  desc.add<edm::InputTag>("candTag",edm::InputTag("hltIsolPixelTrackProd"));
38  desc.add<edm::InputTag>("L1GTSeedLabel",edm::InputTag("hltL1sV0SingleJet60"));
39  desc.add<double>("MaxPtNearby",2.0);
40  desc.add<double>("MinEnergyTrack",12.0);
41  desc.add<double>("MinPtTrack",3.5);
42  desc.add<double>("MaxEtaTrack",1.15);
43  desc.add<double>("MinEtaTrack",0.0);
44  desc.add<double>("MinDeltaPtL1Jet",-40000.0);
45  desc.add<bool>("filterTrackEnergy",true);
46  desc.add<int>("NMaxTrackCandidates",10);
47  desc.add<bool>("DropMultiL2Event",false);
48  descriptions.add("hltPixelIsolTrackL1TFilter",desc);
49 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void makeHLTFilterDescription(edm::ParameterSetDescription &desc)
Definition: HLTFilter.cc:29
void add(std::string const &label, ParameterSetDescription const &psetDescription)
bool HLTPixelIsolTrackL1TFilter::hltFilter ( edm::Event iEvent,
const edm::EventSetup iSetup,
trigger::TriggerFilterObjectWithRefs filterproduct 
) const
overridevirtual

Implements HLTFilter.

Definition at line 51 of file HLTPixelIsolTrackL1TFilter.cc.

References accept(), trigger::TriggerFilterObjectWithRefs::addCollectionTag(), trigger::TriggerRefsCollections::addObject(), candTag_, candToken_, DEFINE_FWK_MODULE, dropMultiL2Event_, filterE_, edm::Event::getByToken(), mps_fire::i, maxetatrack_, maxptnearby_, minEnergy_, minetatrack_, minpttrack_, gen::n, nMaxTrackCandidates_, HLTFilter::saveTags(), and trigger::TriggerTrack.

51  {
52 
53  if (saveTags())
54  filterproduct.addCollectionTag(candTag_);
55 
56  // Ref to Candidate object to be recorded in filter object
58 
59  // get hold of filtered candidates
61  iEvent.getByToken(candToken_,recotrackcands);
62 
63  //Filtering
64  int n=0;
65  for (unsigned int i=0; i<recotrackcands->size(); i++) {
67 
68  // select on transverse momentum
69  if (!filterE_&&(candref->maxPtPxl()<maxptnearby_)&&
70  (candref->pt()>minpttrack_)&&fabs(candref->track()->eta())<maxetatrack_&&fabs(candref->track()->eta())>minetatrack_) {
71  filterproduct.addObject(trigger::TriggerTrack, candref);
72  n++;
73 #ifdef DebugLog
74  edm::LogInfo("HcalIsoTrack") << "PixelIsolP:Candidate[" << n
75  << "] pt|eta|phi " << candref->pt()
76  << "|" << candref->track()->pt()
77  << "|" << candref->track()->eta() << "|"
78  << candref->track()->phi() << "\n";
79 #endif
80  }
81 
82  // select on momentum
83  if (filterE_) {
84  if ((candref->maxPtPxl()<maxptnearby_)&&((candref->pt())*cosh(candref->track()->eta())>minEnergy_)&&fabs(candref->track()->eta())<maxetatrack_&&fabs(candref->track()->eta())>minetatrack_) {
85  filterproduct.addObject(trigger::TriggerTrack, candref);
86  n++;
87 #ifdef DebugLog
88  edm::LogInfo("HcalIsoTrack") << "PixelIsolE:Candidate[" << n
89  << "] pt|eta|phi " << candref->pt()
90  << "|" << candref->track()->pt()
91  << "|" << candref->track()->eta() << "|"
92  << candref->track()->phi() << "\n";
93 #endif
94  }
95  }
96 
97  // stop looping over tracks if max number is reached
98  if(!dropMultiL2Event_ && n>=nMaxTrackCandidates_) break;
99 
100  } // loop over tracks
101 
102 
103  bool accept(n>0);
104 
106 #ifdef DebugLog
107  edm::LogInfo("HcalIsoTrack") << "PixelIsolL1Filter: Tracks " << n
108  << " accept " << accept << "\n";
109 #endif
110  return accept;
111 
112 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:30
void addObject(int id, const reco::RecoEcalCandidateRef &ref)
setters for L3 collections: (id=physics type, and Ref<C>)
edm::EDGetTokenT< reco::IsolatedPixelTrackCandidateCollection > candToken_
void addCollectionTag(const edm::InputTag &collectionTag)
collectionTags
bool saveTags() const
Definition: HLTFilter.h:45

Member Data Documentation

edm::InputTag HLTPixelIsolTrackL1TFilter::candTag_
private

Definition at line 25 of file HLTPixelIsolTrackL1TFilter.h.

Referenced by hltFilter(), and HLTPixelIsolTrackL1TFilter().

edm::EDGetTokenT<reco::IsolatedPixelTrackCandidateCollection> HLTPixelIsolTrackL1TFilter::candToken_
private

Definition at line 23 of file HLTPixelIsolTrackL1TFilter.h.

Referenced by hltFilter(), and HLTPixelIsolTrackL1TFilter().

bool HLTPixelIsolTrackL1TFilter::dropMultiL2Event_
private

Definition at line 34 of file HLTPixelIsolTrackL1TFilter.h.

Referenced by hltFilter(), and HLTPixelIsolTrackL1TFilter().

bool HLTPixelIsolTrackL1TFilter::filterE_
private

Definition at line 31 of file HLTPixelIsolTrackL1TFilter.h.

Referenced by hltFilter(), and HLTPixelIsolTrackL1TFilter().

edm::InputTag HLTPixelIsolTrackL1TFilter::hltGTseedlabel_
private

Definition at line 26 of file HLTPixelIsolTrackL1TFilter.h.

Referenced by HLTPixelIsolTrackL1TFilter().

edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> HLTPixelIsolTrackL1TFilter::hltGTseedToken_
private

Definition at line 24 of file HLTPixelIsolTrackL1TFilter.h.

Referenced by HLTPixelIsolTrackL1TFilter().

double HLTPixelIsolTrackL1TFilter::maxetatrack_
private

Definition at line 30 of file HLTPixelIsolTrackL1TFilter.h.

Referenced by hltFilter(), and HLTPixelIsolTrackL1TFilter().

double HLTPixelIsolTrackL1TFilter::maxptnearby_
private

Definition at line 27 of file HLTPixelIsolTrackL1TFilter.h.

Referenced by hltFilter(), and HLTPixelIsolTrackL1TFilter().

double HLTPixelIsolTrackL1TFilter::minDeltaPtL1Jet_
private

Definition at line 35 of file HLTPixelIsolTrackL1TFilter.h.

Referenced by HLTPixelIsolTrackL1TFilter().

double HLTPixelIsolTrackL1TFilter::minEnergy_
private

Definition at line 32 of file HLTPixelIsolTrackL1TFilter.h.

Referenced by hltFilter(), and HLTPixelIsolTrackL1TFilter().

double HLTPixelIsolTrackL1TFilter::minetatrack_
private

Definition at line 29 of file HLTPixelIsolTrackL1TFilter.h.

Referenced by hltFilter(), and HLTPixelIsolTrackL1TFilter().

double HLTPixelIsolTrackL1TFilter::minpttrack_
private

Definition at line 28 of file HLTPixelIsolTrackL1TFilter.h.

Referenced by hltFilter(), and HLTPixelIsolTrackL1TFilter().

int HLTPixelIsolTrackL1TFilter::nMaxTrackCandidates_
private

Definition at line 33 of file HLTPixelIsolTrackL1TFilter.h.

Referenced by hltFilter(), and HLTPixelIsolTrackL1TFilter().