33 pixlTag_(iConfig.getParameter<
edm::
InputTag>(
"pixlTag")),
34 min_Pt_(iConfig.getParameter<double>(
"MinPt")),
35 min_trks_(iConfig.getParameter<unsigned
int>(
"MinTrks")),
36 min_sep_(iConfig.getParameter<double>(
"MinSep"))
42 LogDebug(
"") <<
"Requesting tracks from same vertex eta-phi separation by " <<
min_sep_;
51 desc.add<
double>(
"MinPt", 0.);
52 desc.add<
unsigned int>(
"MinTrks", 2);
53 desc.add<
double>(
"MinSep", 1.);
54 descriptions.
add(
"hltPixlMBFilt",
desc);
86 vector<double> etastore;
87 vector<double> phistore;
90 auto apixl(
tracks->begin());
92 RecoChargedCandidateCollection::const_iterator ipixl, jpixl;
93 unsigned int nsame_vtx = 0;
96 for (ipixl = apixl; ipixl != epixl; ipixl++) {
100 const double& ztrk1 = ipixl->vz();
101 const double& etatrk1 = ipixl->momentum().eta();
102 const double& phitrk1 = ipixl->momentum().phi();
107 etastore.push_back(etatrk1);
108 phistore.push_back(phitrk1);
109 itstore.push_back(itrk);
110 if (fabs(ztrk1) < 15.0) {
113 for (jpixl = apixl; jpixl != epixl; jpixl++) {
119 const double& ztrk2 = jpixl->vz();
120 const double& etatrk2 = jpixl->momentum().eta();
121 const double& phitrk2 = jpixl->momentum().phi();
122 double eta_dist = etatrk2 - etatrk1;
123 double phi_dist = phitrk2 - phitrk1;
124 double etaphi_dist =
sqrt(eta_dist * eta_dist + phi_dist * phi_dist);
125 if (fabs(ztrk2 - ztrk1) < 1.0 && etaphi_dist >
min_sep_) {
126 if (
min_trks_ <= 2 || itstore.size() <= 1) {
127 etastore.push_back(etatrk2);
128 phistore.push_back(phitrk2);
129 itstore.push_back(jtrk);
133 LogDebug(
"") <<
"HLTPixlMBFilt: with mintrks=2 we should not be here...";
135 for (
unsigned int k = 1;
k < itstore.size();
k++) {
136 eta_dist = etatrk2 - etastore.at(
k);
137 phi_dist = phitrk2 - phistore.at(
k);
138 etaphi_dist =
sqrt(eta_dist * eta_dist + phi_dist * phi_dist);
145 etastore.push_back(etatrk2);
146 phistore.push_back(phitrk2);
147 itstore.push_back(jtrk);
174 for (
int iaddr : itstore) {
179 LogDebug(
"") <<
"Number of pixel-track objects accepted:" HLTPixlMBFilt(const edm::ParameterSet &)
~HLTPixlMBFilt() override
#define DEFINE_FWK_MODULE(type)
edm::Ref< RecoChargedCandidateCollection > RecoChargedCandidateRef
reference to an object in a collection of RecoChargedCandidate objects
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>)
bool hltFilter(edm::Event &, const edm::EventSetup &, trigger::TriggerFilterObjectWithRefs &filterproduct) const override
edm::EDGetTokenT< reco::RecoChargedCandidateCollection > pixlToken_
static void makeHLTFilterDescription(edm::ParameterSetDescription &desc)
auto const & tracks
cannot be loose
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void addCollectionTag(const edm::InputTag &collectionTag)
collectionTags
void add(std::string const &label, ParameterSetDescription const &psetDescription)