12 candTag_( iConfig.getParameter<
edm::InputTag> (
"candTag")),
13 maxEnergyInEB_(iConfig.getParameter<double> (
"MaxEnergyInEB")),
14 maxEnergyInEE_(iConfig.getParameter<double> (
"MaxEnergyInEE")),
15 maxEnergyOutEB_(iConfig.getParameter<double> (
"MaxEnergyOutEB")),
16 maxEnergyOutEE_(iConfig.getParameter<double> (
"MaxEnergyOutEE")),
17 nMaxTrackCandidates_(iConfig.getParameter<
int>(
"NMaxTrackCandidates")),
18 dropMultiL2Event_(iConfig.getParameter<
bool> (
"DropMultiL2Event")) {
19 candTok = consumes<reco::IsolatedPixelTrackCandidateCollection>(
candTag_);
28 desc.
add<
double>(
"MaxEnergyInEB",2.0);
29 desc.
add<
double>(
"MaxEnergyInEE",4.0);
30 desc.
add<
double>(
"MaxEnergyOutEB",1.2);
31 desc.
add<
double>(
"MaxEnergyOutEE",2.0);
32 desc.
add<
int>(
"NMaxTrackCandidates",10);
33 desc.
add<
bool>(
"DropMultiL2Event",
false);
34 descriptions.
add(
"isolEcalPixelTrackFilter",desc);
44 if (!recotrackcands.
isValid())
return false;
47 for (
unsigned int i=0;
i<recotrackcands->size();
i++) {
50 LogDebug(
"IsoTrk") <<
"candref.isNull() " << candref.
isNull() <<
"\n";
51 if (candref.
isNull())
continue;
52 LogDebug(
"IsoTrk") <<
"candref.track().isNull() " << candref->track().
isNull() <<
"\n";
53 if(candref->track().
isNull())
continue;
55 double etaAbs =
std::abs(candref->track()->eta());
58 LogDebug(
"IsoTrk") <<
"energyin/out: " << candref->energyIn() <<
"/" << candref->energyOut() <<
"\n";
59 if (candref->energyIn()<maxEnergyIn && candref->energyOut()<maxEnergyOut) {
62 LogDebug(
"IsoTrk") <<
"EcalIsol:Candidate[" << n <<
"] pt|eta|phi " 63 << candref->pt() <<
"|" << candref->eta() <<
"|" 64 << candref->phi() <<
"\n";
edm::EDGetTokenT< reco::IsolatedPixelTrackCandidateCollection > candTok
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const double maxEnergyOutEE_
HLTEcalPixelIsolTrackFilter(const edm::ParameterSet &)
const double maxEnergyInEE_
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
void addObject(int id, const reco::RecoEcalCandidateRef &ref)
setters for L3 collections: (id=physics type, and Ref<C>)
const int nMaxTrackCandidates_
#define DEFINE_FWK_MODULE(type)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Abs< T >::type abs(const T &t)
~HLTEcalPixelIsolTrackFilter() override
ParameterDescriptionBase * add(U const &iLabel, T const &value)
const bool dropMultiL2Event_
bool isNull() const
Checks for null.
const double maxEnergyOutEB_
static void makeHLTFilterDescription(edm::ParameterSetDescription &desc)
void addCollectionTag(const edm::InputTag &collectionTag)
collectionTags
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const double maxEnergyInEB_
bool hltFilter(edm::Event &, const edm::EventSetup &, trigger::TriggerFilterObjectWithRefs &filterproduct) const override