68 std::unordered_set<reco::CandidatePtr,ptr_hash> footprint;
71 for (
const auto& lep_i :
leptons ) {
72 for(
const auto& lep : *lep_i ) {
74 for(
unsigned int n=0;
n < lep.numberOfSourceCandidatePtrs();
n++ ){
75 if( lep.sourceCandidatePtr(
n).isNonnull() and lep.sourceCandidatePtr(
n).isAvailable() ){
76 footprint.insert(lep.sourceCandidatePtr(
n));
83 for(
const auto&
jet : jets) {
87 for(
unsigned int n=0;
n <
jet.numberOfSourceCandidatePtrs();
n++){
88 if(
jet.sourceCandidatePtr(
n).isNonnull() and
jet.sourceCandidatePtr(
n).isAvailable() ){
90 footprint.insert(
jet.sourceCandidatePtr(
n));
98 for(
size_t i = 0;
i< pfCandidates->
size(); ++
i) {
101 bool cleancand =
true;
102 if(footprint.find( pfCandidates->
ptrAt(
i) )==footprint.end()) {
105 for(
const auto& it : footprint) {
106 if( (it->p4()-(*pfCandidates)[
i].p4()).Et2()<0.000025 ){
113 sumPt += (*pfCandidates)[
i].pt();
119 for(
const auto&
jet : jets) {
151 double dpt = scale*jpt*sigmapt;
152 double dph = jpt*sigmaphi;
154 cov_xx += dpt*dpt*c*c + dph*dph*s*
s;
155 cov_xy += (dpt*dpt-dph*dph)*c*s;
156 cov_yy += dph*dph*c*c + dpt*dpt*s*
s;
bool cleanJet(const reco::Jet &jet, const std::vector< edm::Handle< reco::CandidateView > > &leptons)
float getResolution(const JetParameters ¶meters) const
JetParameters & setJetEta(float eta)
JetParameters & setRho(float rho)
Ptr< value_type > ptrAt(size_type i) const
ROOT::Math::SMatrix< double, 2 > METCovMatrix
std::vector< double > jetEtas_
Abs< T >::type abs(const T &t)
std::vector< double > pjetParams_
std::vector< double > jetParams_
T const * product() const
JetParameters & setJetPt(float pt)