35 pixlTag_ (iConfig.getParameter<edm::InputTag>(
"pixlTag")),
36 min_Pt_ (iConfig.getParameter<double>(
"MinPt")),
37 min_trks_ (iConfig.getParameter<unsigned int>(
"MinTrks")),
38 min_sep_ (iConfig.getParameter<double>(
"MinSep"))
43 LogDebug(
"") <<
"Requesting tracks from same vertex eta-phi separation by " <<
min_sep_;
60 using namespace trigger;
78 vector<double> etastore;
79 vector<double> phistore;
82 RecoChargedCandidateCollection::const_iterator apixl(
tracks->begin());
83 RecoChargedCandidateCollection::const_iterator epixl(
tracks->end());
84 RecoChargedCandidateCollection::const_iterator ipixl, jpixl;
85 unsigned int nsame_vtx=0;
88 for (ipixl=apixl; ipixl!=epixl; ipixl++){
90 const double& ztrk1 = ipixl->vz();
91 const double& etatrk1 = ipixl->momentum().eta();
92 const double& phitrk1 = ipixl->momentum().phi();
97 etastore.push_back(etatrk1);
98 phistore.push_back(phitrk1);
99 itstore.push_back(itrk);
100 if (fabs(ztrk1) < 15.0) {
103 for (jpixl=apixl; jpixl!=epixl; jpixl++) {
105 if (jpixl==ipixl)
continue;
106 const double& ztrk2 = jpixl->vz();
107 const double& etatrk2 = jpixl->momentum().eta();
108 const double& phitrk2 = jpixl->momentum().phi();
109 double eta_dist=etatrk2-etatrk1;
110 double phi_dist=phitrk2-phitrk1;
111 double etaphi_dist=
sqrt(eta_dist*eta_dist + phi_dist*phi_dist);
112 if (fabs(ztrk2-ztrk1) < 1.0 && etaphi_dist >
min_sep_) {
113 if (
min_trks_ <= 2 || itstore.size() <= 1) {
114 etastore.push_back(etatrk2);
115 phistore.push_back(phitrk2);
116 itstore.push_back(jtrk);
120 LogDebug(
"") <<
"HLTPixlMBFilt: with mintrks=2 we should not be here...";
122 for (
unsigned int k=1;
k < itstore.size();
k++) {
123 eta_dist=etatrk2-etastore.at(
k);
124 phi_dist=phitrk2-phistore.at(
k);
125 etaphi_dist=
sqrt(eta_dist*eta_dist + phi_dist*phi_dist);
132 etastore.push_back(etatrk2);
133 phistore.push_back(phitrk2);
134 itstore.push_back(jtrk);
159 for (
unsigned int ipos=0; ipos < itstore.size(); ipos++) {
160 int iaddr=itstore.at(ipos);
165 LogDebug(
"") <<
"Number of pixel-track objects accepted:"
HLTPixlMBFilt(const edm::ParameterSet &)
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>)
virtual bool hltFilter(edm::Event &, const edm::EventSetup &, trigger::TriggerFilterObjectWithRefs &filterproduct)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const