122 using namespace reco;
129 vector <pair<double, double> > jetdirection;
130 vector<double> jetspt;
132 for (
unsigned jet = 0;
jet<PFJets->size();
jet++) {
133 if(((*PFJets)[
jet].
pt()<jtptthr)||(
abs((*PFJets)[
jet].
eta())>jtetath))
continue;
135 std::pair<double, double>
etaphi((*PFJets)[
jet].
eta(),(*PFJets)[
jet].phi());
136 jetdirection.push_back(etaphi);
137 jetspt.push_back((*PFJets)[
jet].
pt());
141 if (!passed)
return passed;
145 bool pho_passed=
false ;
146 vector <pair<double,double> > phodirection ;
147 vector<double> phopT ;
152 for( gamma1 = photons->begin(); gamma1 != photons->end(); gamma1++ ) {
153 if(gamma1->pt()<pho_Ptcut)
continue ;
154 std::pair<double,double> etaphi_pho(gamma1->eta(),gamma1->phi());
155 phodirection.push_back(etaphi_pho) ;
156 phopT.push_back(gamma1->pt()) ;
162 if (!pho_passed)
return false;
169 if (!(*hoht).empty()) {
170 for (
unsigned ijet = 0; ijet< jetdirection.size(); ijet++) {
173 for (
unsigned iph=0; iph<phodirection.size(); iph++) {
179 for (PFClusterCollection::const_iterator ij=(*hoht).begin(); ij!=(*hoht).end(); ij++){
180 double hoenr = (*ij).energy();
181 if (hoenr <hothres)
continue;
185 double hoeta = cluster_pos.eta() ;
186 double hophi = cluster_pos.phi() ;
190 isJetDir=
true;
break;
194 if (isJetDir) {
break;}
199 if (isJetDir) {Npass++;}
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
SinglePhotonJetPlusHOFilter(const edm::ParameterSet &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< reco::PFClusterCollection > tok_hoht_
U second(std::pair< T, U > const &p)
#define DEFINE_FWK_MODULE(type)
void addDefault(ParameterSetDescription const &psetDescription)
std::pair< T, T > etaphi(T x, T y, T z)
Abs< T >::type abs(const T &t)
~SinglePhotonJetPlusHOFilter() override
bool filter(edm::Event &, const edm::EventSetup &) override
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
XYZPointD XYZPoint
point in space with cartesian internal representation
edm::EDGetTokenT< reco::PFJetCollection > tok_PFJets_
edm::EDGetTokenT< edm::View< reco::Photon > > tok_photons_
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator