CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
noPileUpMEtUtilities Namespace Reference

Functions

reco::MVAMEtJetInfoCollection cleanJets (const reco::MVAMEtJetInfoCollection &, const std::vector< reco::Candidate::LorentzVector > &, double, bool)
 
reco::MVAMEtPFCandInfoCollection cleanPFCandidates (const reco::MVAMEtPFCandInfoCollection &, const std::vector< reco::Candidate::LorentzVector > &, double, bool)
 
CommonMETData computeHadRecoilNoPU (const reco::MVAMEtJetInfoCollection &, const reco::MVAMEtPFCandInfoCollection &, double *sumAbsPx=0, double *sumAbsPy=0)
 
CommonMETData computeHadRecoilPU (const reco::MVAMEtJetInfoCollection &, const reco::MVAMEtPFCandInfoCollection &, double *sumAbsPx=0, double *sumAbsPy=0)
 
CommonMETData computeJetSum (const reco::MVAMEtJetInfoCollection &, double *sumAbsPx=0, double *sumAbsPy=0)
 
CommonMETData computeJetSum_neutral (const reco::MVAMEtJetInfoCollection &, double *sumAbsPx=0, double *sumAbsPy=0)
 
CommonMETData computeNeutralRecoil_unclustered (const reco::MVAMEtPFCandInfoCollection &, double *sumAbsPx=0, double *sumAbsPy=0)
 
CommonMETData computePFCandidateSum (const reco::MVAMEtPFCandInfoCollection &, double *sumAbsPx=0, double *sumAbsPy=0)
 
CommonMETData computeTrackRecoil (const reco::MVAMEtPFCandInfoCollection &, double *sumAbsPx=0, double *sumAbsPy=0)
 
CommonMETData computeTrackRecoilNoPU (const reco::MVAMEtPFCandInfoCollection &, double *sumAbsPx=0, double *sumAbsPy=0)
 
CommonMETData computeTrackRecoilPU (const reco::MVAMEtPFCandInfoCollection &, double *sumAbsPx=0, double *sumAbsPy=0)
 
void finalizeMEtData (CommonMETData &)
 
reco::MVAMEtJetInfo jet (const reco::MVAMEtJetInfoCollection &, unsigned)
 
reco::MVAMEtJetInfo leadJet (const reco::MVAMEtJetInfoCollection &)
 
reco::MVAMEtJetInfoCollection selectJets (const reco::MVAMEtJetInfoCollection &, double, double, int)
 
reco::MVAMEtPFCandInfoCollection selectPFCandidates (const reco::MVAMEtPFCandInfoCollection &, double, double, int, int)
 
reco::MVAMEtJetInfo subleadJet (const reco::MVAMEtJetInfoCollection &)
 

Function Documentation

reco::MVAMEtJetInfoCollection noPileUpMEtUtilities::cleanJets ( const reco::MVAMEtJetInfoCollection jets,
const std::vector< reco::Candidate::LorentzVector > &  leptons,
double  dRoverlap,
bool  invert 
)

Definition at line 22 of file noPileUpMEtUtilities.cc.

References reco::deltaR2(), jet(), and reco::MVAMEtJetInfo::p4_.

Referenced by NoPileUpPFMEtProducer::produce().

25  {
27  for ( reco::MVAMEtJetInfoCollection::const_iterator jet = jets.begin();
28  jet != jets.end(); ++jet ) {
29  bool isOverlap = false;
30  for ( std::vector<reco::Candidate::LorentzVector>::const_iterator lepton = leptons.begin();
31  lepton != leptons.end(); ++lepton ) {
32  if ( deltaR2(jet->p4_, *lepton) < dRoverlap*dRoverlap ) {
33  isOverlap = true;
34  break;
35  }
36  }
37  if ( (!isOverlap && !invert) || (isOverlap && invert) ) retVal.push_back(*jet);
38  }
39  return retVal;
40  }
std::vector< reco::MVAMEtJetInfo > MVAMEtJetInfoCollection
Definition: MVAMEtDataFwd.h:10
vector< PseudoJet > jets
double deltaR2(const T1 &t1, const T2 &t2)
Definition: deltaR.h:36
reco::MVAMEtPFCandInfoCollection noPileUpMEtUtilities::cleanPFCandidates ( const reco::MVAMEtPFCandInfoCollection pfCandidates,
const std::vector< reco::Candidate::LorentzVector > &  leptons,
double  dRoverlap,
bool  invert 
)

Definition at line 124 of file noPileUpMEtUtilities.cc.

References reco::deltaR2().

Referenced by NoPileUpPFMEtProducer::produce().

129  {
131  for ( reco::MVAMEtPFCandInfoCollection::const_iterator pfCandidate = pfCandidates.begin();
132  pfCandidate != pfCandidates.end(); ++pfCandidate ) {
133  bool isOverlap = false;
134  for ( std::vector<reco::Candidate::LorentzVector>::const_iterator lepton = leptons.begin();
135  lepton != leptons.end(); ++lepton ) {
136  if ( deltaR2(pfCandidate->p4_, *lepton) < dRoverlap*dRoverlap ) {
137  isOverlap = true;
138  break;
139  }
140  }
141  if ( (!isOverlap && !invert) || (isOverlap && invert) ) retVal.push_back(*pfCandidate);
142  }
143  return retVal;
144  }
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
double deltaR2(const T1 &t1, const T2 &t2)
Definition: deltaR.h:36
std::vector< reco::MVAMEtPFCandInfo > MVAMEtPFCandInfoCollection
Definition: MVAMEtDataFwd.h:12
CommonMETData noPileUpMEtUtilities::computeHadRecoilNoPU ( const reco::MVAMEtJetInfoCollection jets,
const reco::MVAMEtPFCandInfoCollection pfCandidates,
double *  sumAbsPx = 0,
double *  sumAbsPy = 0 
)

Definition at line 232 of file noPileUpMEtUtilities.cc.

References computeJetSum_neutral(), computeTrackRecoilNoPU(), alignCSCRings::e, finalizeMEtData(), reco::MVAMEtJetInfo::kNoPileUp, CommonMETData::mex, CommonMETData::mey, selectJets(), and CommonMETData::sumet.

234  {
235  double trackSumAbsPx = 0.;
236  double trackSumAbsPy = 0.;
237  CommonMETData trackSumNoPU = computeTrackRecoilNoPU(pfCandidates, &trackSumAbsPx, &trackSumAbsPy);
239  double jetSumNoPUabsPx_neutral = 0.;
240  double jetSumNoPUabsPy_neutral = 0.;
241  CommonMETData jetSumNoPU_neutral = computeJetSum_neutral(jetsNoPU, &jetSumNoPUabsPx_neutral, &jetSumNoPUabsPy_neutral);
242  CommonMETData retVal;
243  retVal.mex = trackSumNoPU.mex + jetSumNoPU_neutral.mex;
244  retVal.mey = trackSumNoPU.mey + jetSumNoPU_neutral.mey;
245  retVal.sumet = trackSumNoPU.sumet + jetSumNoPU_neutral.sumet;
246  finalizeMEtData(retVal);
247  if ( sumAbsPx ) (*sumAbsPx) = trackSumAbsPx + jetSumNoPUabsPx_neutral;
248  if ( sumAbsPy ) (*sumAbsPy) = trackSumAbsPy + jetSumNoPUabsPy_neutral;
249  return retVal;
250  }
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
void finalizeMEtData(CommonMETData &)
std::vector< reco::MVAMEtJetInfo > MVAMEtJetInfoCollection
Definition: MVAMEtDataFwd.h:10
vector< PseudoJet > jets
Structure containing data common to all types of MET.
Definition: CommonMETData.h:12
CommonMETData computeJetSum_neutral(const reco::MVAMEtJetInfoCollection &, double *sumAbsPx=0, double *sumAbsPy=0)
CommonMETData computeTrackRecoilNoPU(const reco::MVAMEtPFCandInfoCollection &, double *sumAbsPx=0, double *sumAbsPy=0)
reco::MVAMEtJetInfoCollection selectJets(const reco::MVAMEtJetInfoCollection &, double, double, int)
CommonMETData noPileUpMEtUtilities::computeHadRecoilPU ( const reco::MVAMEtJetInfoCollection jets,
const reco::MVAMEtPFCandInfoCollection pfCandidates,
double *  sumAbsPx = 0,
double *  sumAbsPy = 0 
)

Definition at line 252 of file noPileUpMEtUtilities.cc.

References computeJetSum_neutral(), computeTrackRecoilPU(), alignCSCRings::e, finalizeMEtData(), reco::MVAMEtJetInfo::kPileUp, CommonMETData::mex, CommonMETData::mey, selectJets(), and CommonMETData::sumet.

254  {
255  double trackSumPUabsPx = 0.;
256  double trackSumPUabsPy = 0.;
257  CommonMETData trackSumPU = computeTrackRecoilPU(pfCandidates, &trackSumPUabsPx, &trackSumPUabsPy);
259  double jetSumPUabsPx_neutral = 0.;
260  double jetSumPUabsPy_neutral = 0.;
261  CommonMETData jetSumPU_neutral = computeJetSum_neutral(jetsPU, &jetSumPUabsPx_neutral, &jetSumPUabsPy_neutral);
262  CommonMETData retVal;
263  retVal.mex = trackSumPU.mex + jetSumPU_neutral.mex;
264  retVal.mey = trackSumPU.mey + jetSumPU_neutral.mey;
265  retVal.sumet = trackSumPU.sumet + jetSumPU_neutral.sumet;
266  finalizeMEtData(retVal);
267  if ( sumAbsPx ) (*sumAbsPx) = trackSumPUabsPx + jetSumPUabsPx_neutral;
268  if ( sumAbsPy ) (*sumAbsPy) = trackSumPUabsPy + jetSumPUabsPy_neutral;
269  return retVal;
270  }
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
void finalizeMEtData(CommonMETData &)
std::vector< reco::MVAMEtJetInfo > MVAMEtJetInfoCollection
Definition: MVAMEtDataFwd.h:10
vector< PseudoJet > jets
CommonMETData computeTrackRecoilPU(const reco::MVAMEtPFCandInfoCollection &, double *sumAbsPx=0, double *sumAbsPy=0)
Structure containing data common to all types of MET.
Definition: CommonMETData.h:12
CommonMETData computeJetSum_neutral(const reco::MVAMEtJetInfoCollection &, double *sumAbsPx=0, double *sumAbsPy=0)
reco::MVAMEtJetInfoCollection selectJets(const reco::MVAMEtJetInfoCollection &, double, double, int)
CommonMETData noPileUpMEtUtilities::computeJetSum ( const reco::MVAMEtJetInfoCollection jets,
double *  sumAbsPx = 0,
double *  sumAbsPy = 0 
)

Definition at line 56 of file noPileUpMEtUtilities.cc.

References funct::abs(), finalizeMEtData(), jet(), CommonMETData::mex, CommonMETData::mey, reco::MVAMEtJetInfo::p4_, and CommonMETData::sumet.

57  {
58  CommonMETData retVal;
59  retVal.mex = 0.;
60  retVal.mey = 0.;
61  retVal.sumet = 0.;
62  double retVal_sumAbsPx = 0.;
63  double retVal_sumAbsPy = 0.;
64  for ( reco::MVAMEtJetInfoCollection::const_iterator jet = jets.begin();
65  jet != jets.end(); ++jet ) {
66  retVal.mex += jet->p4_.px();
67  retVal.mey += jet->p4_.py();
68  retVal.sumet += jet->p4_.pt();
69  retVal_sumAbsPx += std::abs(jet->p4_.px());
70  retVal_sumAbsPy += std::abs(jet->p4_.py());
71  }
72  finalizeMEtData(retVal);
73  if ( sumAbsPx ) (*sumAbsPx) = retVal_sumAbsPx;
74  if ( sumAbsPy ) (*sumAbsPy) = retVal_sumAbsPy;
75  return retVal;
76  }
void finalizeMEtData(CommonMETData &)
vector< PseudoJet > jets
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Structure containing data common to all types of MET.
Definition: CommonMETData.h:12
CommonMETData noPileUpMEtUtilities::computeJetSum_neutral ( const reco::MVAMEtJetInfoCollection jets,
double *  sumAbsPx = 0,
double *  sumAbsPy = 0 
)

Definition at line 78 of file noPileUpMEtUtilities.cc.

References funct::abs(), finalizeMEtData(), jet(), CommonMETData::mex, CommonMETData::mey, reco::MVAMEtJetInfo::neutralEnFrac_, reco::MVAMEtJetInfo::p4_, and CommonMETData::sumet.

Referenced by computeHadRecoilNoPU(), and computeHadRecoilPU().

79  {
80  CommonMETData retVal;
81  retVal.mex = 0.;
82  retVal.mey = 0.;
83  retVal.sumet = 0.;
84  double retVal_sumAbsPx = 0.;
85  double retVal_sumAbsPy = 0.;
86  for ( reco::MVAMEtJetInfoCollection::const_iterator jet = jets.begin();
87  jet != jets.end(); ++jet ) {
88  retVal.mex += (jet->p4_.px()*jet->neutralEnFrac_);
89  retVal.mey += (jet->p4_.py()*jet->neutralEnFrac_);
90  retVal.sumet += (jet->p4_.pt()*jet->neutralEnFrac_);
91  retVal_sumAbsPx += std::abs(jet->p4_.px());
92  retVal_sumAbsPy += std::abs(jet->p4_.py());
93  }
94  finalizeMEtData(retVal);
95  if ( sumAbsPx ) (*sumAbsPx) = retVal_sumAbsPx;
96  if ( sumAbsPy ) (*sumAbsPy) = retVal_sumAbsPy;
97  return retVal;
98  }
void finalizeMEtData(CommonMETData &)
vector< PseudoJet > jets
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Structure containing data common to all types of MET.
Definition: CommonMETData.h:12
CommonMETData noPileUpMEtUtilities::computeNeutralRecoil_unclustered ( const reco::MVAMEtPFCandInfoCollection pfCandidates,
double *  sumAbsPx = 0,
double *  sumAbsPy = 0 
)

Definition at line 225 of file noPileUpMEtUtilities.cc.

References computePFCandidateSum(), reco::MVAMEtPFCandInfo::kNeutral, and selectPFCandidates().

226  {
227  reco::MVAMEtPFCandInfoCollection neutralPFCandidates_unclustered = selectPFCandidates(
229  return computePFCandidateSum(neutralPFCandidates_unclustered, sumAbsPx, sumAbsPy);
230  }
reco::MVAMEtPFCandInfoCollection selectPFCandidates(const reco::MVAMEtPFCandInfoCollection &, double, double, int, int)
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
std::vector< reco::MVAMEtPFCandInfo > MVAMEtPFCandInfoCollection
Definition: MVAMEtDataFwd.h:12
CommonMETData computePFCandidateSum(const reco::MVAMEtPFCandInfoCollection &, double *sumAbsPx=0, double *sumAbsPy=0)
CommonMETData noPileUpMEtUtilities::computePFCandidateSum ( const reco::MVAMEtPFCandInfoCollection pfCandidates,
double *  sumAbsPx = 0,
double *  sumAbsPy = 0 
)

Definition at line 165 of file noPileUpMEtUtilities.cc.

References funct::abs(), finalizeMEtData(), CommonMETData::mex, CommonMETData::mey, and CommonMETData::sumet.

Referenced by computeNeutralRecoil_unclustered(), computeTrackRecoil(), computeTrackRecoilNoPU(), and computeTrackRecoilPU().

166  {
167  CommonMETData retVal;
168  retVal.mex = 0.;
169  retVal.mey = 0.;
170  retVal.sumet = 0.;
171  double retVal_sumAbsPx = 0.;
172  double retVal_sumAbsPy = 0.;
173  for ( reco::MVAMEtPFCandInfoCollection::const_iterator pfCandidate = pfCandidates.begin();
174  pfCandidate != pfCandidates.end(); ++pfCandidate ) {
175  retVal.mex += pfCandidate->p4_.px();
176  retVal.mey += pfCandidate->p4_.py();
177  retVal.sumet += pfCandidate->p4_.pt();
178  retVal_sumAbsPx += std::abs(pfCandidate->p4_.px());
179  retVal_sumAbsPy += std::abs(pfCandidate->p4_.py());
180  }
181  finalizeMEtData(retVal);
182  if ( sumAbsPx ) (*sumAbsPx) = retVal_sumAbsPx;
183  if ( sumAbsPy ) (*sumAbsPy) = retVal_sumAbsPy;
184  return retVal;
185  }
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
void finalizeMEtData(CommonMETData &)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Structure containing data common to all types of MET.
Definition: CommonMETData.h:12
CommonMETData noPileUpMEtUtilities::computeTrackRecoil ( const reco::MVAMEtPFCandInfoCollection pfCandidates,
double *  sumAbsPx = 0,
double *  sumAbsPy = 0 
)

Definition at line 194 of file noPileUpMEtUtilities.cc.

References PFRecoTauChargedHadronBuilderPlugins_cfi::chargedPFCandidates, computePFCandidateSum(), alignCSCRings::e, finalizeMEtData(), reco::MVAMEtPFCandInfo::kUndefined, CommonMETData::mex, CommonMETData::mey, selectPFCandidates(), and CommonMETData::sumet.

195  {
198  double trackSumAbsPx = 0.;
199  double trackSumAbsPy = 0.;
200  CommonMETData trackSum = computePFCandidateSum(chargedPFCandidates, &trackSumAbsPx, &trackSumAbsPy);
201  CommonMETData retVal;
202  retVal.mex = -trackSum.mex;
203  retVal.mey = -trackSum.mey;
204  retVal.sumet = trackSum.sumet;
205  finalizeMEtData(retVal);
206  if ( sumAbsPx ) (*sumAbsPx) = trackSumAbsPx;
207  if ( sumAbsPy ) (*sumAbsPy) = trackSumAbsPy;
208  return retVal;
209  }
reco::MVAMEtPFCandInfoCollection selectPFCandidates(const reco::MVAMEtPFCandInfoCollection &, double, double, int, int)
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
void finalizeMEtData(CommonMETData &)
Structure containing data common to all types of MET.
Definition: CommonMETData.h:12
std::vector< reco::MVAMEtPFCandInfo > MVAMEtPFCandInfoCollection
Definition: MVAMEtDataFwd.h:12
CommonMETData computePFCandidateSum(const reco::MVAMEtPFCandInfoCollection &, double *sumAbsPx=0, double *sumAbsPy=0)
CommonMETData noPileUpMEtUtilities::computeTrackRecoilNoPU ( const reco::MVAMEtPFCandInfoCollection pfCandidates,
double *  sumAbsPx = 0,
double *  sumAbsPy = 0 
)

Definition at line 211 of file noPileUpMEtUtilities.cc.

References computePFCandidateSum(), alignCSCRings::e, reco::MVAMEtPFCandInfo::kNoPileUpCharged, and selectPFCandidates().

Referenced by computeHadRecoilNoPU().

212  {
213  reco::MVAMEtPFCandInfoCollection chargedPFCandidatesNoPU = selectPFCandidates(
215  return computePFCandidateSum(chargedPFCandidatesNoPU, sumAbsPx, sumAbsPy);
216  }
reco::MVAMEtPFCandInfoCollection selectPFCandidates(const reco::MVAMEtPFCandInfoCollection &, double, double, int, int)
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
std::vector< reco::MVAMEtPFCandInfo > MVAMEtPFCandInfoCollection
Definition: MVAMEtDataFwd.h:12
CommonMETData computePFCandidateSum(const reco::MVAMEtPFCandInfoCollection &, double *sumAbsPx=0, double *sumAbsPy=0)
CommonMETData noPileUpMEtUtilities::computeTrackRecoilPU ( const reco::MVAMEtPFCandInfoCollection pfCandidates,
double *  sumAbsPx = 0,
double *  sumAbsPy = 0 
)

Definition at line 218 of file noPileUpMEtUtilities.cc.

References computePFCandidateSum(), alignCSCRings::e, reco::MVAMEtPFCandInfo::kPileUpCharged, and selectPFCandidates().

Referenced by computeHadRecoilPU().

219  {
222  return computePFCandidateSum(chargedPFCandidatesPU, sumAbsPx, sumAbsPy);
223  }
reco::MVAMEtPFCandInfoCollection selectPFCandidates(const reco::MVAMEtPFCandInfoCollection &, double, double, int, int)
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
std::vector< reco::MVAMEtPFCandInfo > MVAMEtPFCandInfoCollection
Definition: MVAMEtDataFwd.h:12
CommonMETData computePFCandidateSum(const reco::MVAMEtPFCandInfoCollection &, double *sumAbsPx=0, double *sumAbsPy=0)
void noPileUpMEtUtilities::finalizeMEtData ( CommonMETData metData)

Definition at line 12 of file noPileUpMEtUtilities.cc.

References CommonMETData::met, CommonMETData::mex, CommonMETData::mey, CommonMETData::mez, CommonMETData::phi, and mathSSE::sqrt().

Referenced by computeHadRecoilNoPU(), computeHadRecoilPU(), computeJetSum(), computeJetSum_neutral(), computePFCandidateSum(), and computeTrackRecoil().

13  {
14  metData.met = sqrt(metData.mex*metData.mex + metData.mey*metData.mey);
15  metData.mez = 0.;
16  metData.phi = atan2(metData.mey, metData.mex);
17  }
T sqrt(T t)
Definition: SSEVec.h:48
reco::MVAMEtJetInfo noPileUpMEtUtilities::jet ( const reco::MVAMEtJetInfoCollection jets,
unsigned  idx 
)

Definition at line 100 of file noPileUpMEtUtilities.cc.

References customizeTrackingMonitorSeedNumber::idx, fwrapper::jets, and python.multivaluedict::sort().

Referenced by cleanJets(), computeJetSum(), computeJetSum_neutral(), leadJet(), selectJets(), and subleadJet().

101  {
102  reco::MVAMEtJetInfo retVal;
103  if ( idx < jets.size() ) {
104  reco::MVAMEtJetInfoCollection jets_sorted = jets;
105  std::sort(jets_sorted.begin(), jets_sorted.end());
106  retVal = jets_sorted[idx];
107  }
108  return retVal;
109  }
std::vector< reco::MVAMEtJetInfo > MVAMEtJetInfoCollection
Definition: MVAMEtDataFwd.h:10
vector< PseudoJet > jets
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
reco::MVAMEtJetInfo noPileUpMEtUtilities::leadJet ( const reco::MVAMEtJetInfoCollection jets)

Definition at line 111 of file noPileUpMEtUtilities.cc.

References jet().

Referenced by EwkMuDQM::analyze().

112  {
113  return jet(jets, 0);
114  }
vector< PseudoJet > jets
reco::MVAMEtJetInfoCollection noPileUpMEtUtilities::selectJets ( const reco::MVAMEtJetInfoCollection jets,
double  minJetPt,
double  maxJetPt,
int  type 
)

Definition at line 42 of file noPileUpMEtUtilities.cc.

References jet(), reco::btau::jetPt, reco::MVAMEtJetInfo::kUndefined, reco::MVAMEtJetInfo::p4_, and reco::MVAMEtJetInfo::type_.

Referenced by computeHadRecoilNoPU(), and computeHadRecoilPU().

44  {
46  for ( reco::MVAMEtJetInfoCollection::const_iterator jet = jets.begin();
47  jet != jets.end(); ++jet ) {
48  double jetPt = jet->p4_.pt();
49  if ( jetPt > minJetPt &&
50  jetPt < maxJetPt &&
51  (type == reco::MVAMEtJetInfo::kUndefined || jet->type_ == type) ) retVal.push_back(*jet);
52  }
53  return retVal;
54  }
type
Definition: HCALResponse.h:21
std::vector< reco::MVAMEtJetInfo > MVAMEtJetInfoCollection
Definition: MVAMEtDataFwd.h:10
vector< PseudoJet > jets
reco::MVAMEtPFCandInfoCollection noPileUpMEtUtilities::selectPFCandidates ( const reco::MVAMEtPFCandInfoCollection pfCandidates,
double  minCharge,
double  maxCharge,
int  type,
int  isWithinJet 
)

Definition at line 146 of file noPileUpMEtUtilities.cc.

References funct::abs(), and reco::MVAMEtJetInfo::kUndefined.

Referenced by computeNeutralRecoil_unclustered(), computeTrackRecoil(), computeTrackRecoilNoPU(), and computeTrackRecoilPU().

151  {
153  for ( reco::MVAMEtPFCandInfoCollection::const_iterator pfCandidate = pfCandidates.begin();
154  pfCandidate != pfCandidates.end(); ++pfCandidate ) {
155  int charge = abs(pfCandidate->charge_);
156  if ( charge > minCharge &&
157  charge < maxCharge &&
158  (type == reco::MVAMEtJetInfo::kUndefined || pfCandidate->type_ == type) &&
159  (isWithinJet == -1 || (isWithinJet == 1 && pfCandidate->isWithinJet_) || (isWithinJet == 0 && !pfCandidate->isWithinJet_)) )
160  retVal.push_back(*pfCandidate);
161  }
162  return retVal;
163  }
type
Definition: HCALResponse.h:21
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< reco::MVAMEtPFCandInfo > MVAMEtPFCandInfoCollection
Definition: MVAMEtDataFwd.h:12
reco::MVAMEtJetInfo noPileUpMEtUtilities::subleadJet ( const reco::MVAMEtJetInfoCollection jets)

Definition at line 116 of file noPileUpMEtUtilities.cc.

References jet().

117  {
118  return jet(jets, 1);
119  }
vector< PseudoJet > jets