CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Private Attributes
PFTauQualityCutWrapper Class Reference

#include <PFTauQualityCutWrapper.h>

Classes

struct  QualityCutSet
 

Public Member Functions

void isolationChargedObjects (const reco::PFTau &, const reco::Vertex &, std::vector< reco::LeafCandidate > &)
 retrieve filtered isolation charged objects from the pfTau More...
 
void isolationGammaObjects (const reco::PFTau &, std::vector< reco::LeafCandidate > &)
 retrieve filtered isolation gamma objects from the pfTau More...
 
void isolationPUObjects (const reco::PFTau &, const reco::Vertex &, std::vector< reco::LeafCandidate > &)
 
 PFTauQualityCutWrapper (const edm::ParameterSet &pset)
 
void signalChargedObjects (const reco::PFTau &, const reco::Vertex &, std::vector< reco::LeafCandidate > &)
 retrieve filtered signal charged objects from the pfTau More...
 
void signalGammaObjects (const reco::PFTau &, std::vector< reco::LeafCandidate > &)
 retrieve filtered signal gamma objects from the pfTau More...
 

Private Attributes

QualityCutSet isoQCuts
 
QualityCutSet signalQCuts
 

Detailed Description

Definition at line 13 of file PFTauQualityCutWrapper.h.

Constructor & Destructor Documentation

PFTauQualityCutWrapper::PFTauQualityCutWrapper ( const edm::ParameterSet pset)
inline

Definition at line 15 of file PFTauQualityCutWrapper.h.

References PFTauQualityCutWrapper::QualityCutSet::fill(), edm::ParameterSet::getParameter(), isoQCuts, and signalQCuts.

16  {
17  isoQCuts.fill(pset.getParameter<edm::ParameterSet>("isolationQualityCuts"));
18  signalQCuts.fill(pset.getParameter<edm::ParameterSet>("signalQualityCuts"));
19  }
T getParameter(std::string const &) const
void fill(const edm::ParameterSet &pset)

Member Function Documentation

void PFTauQualityCutWrapper::isolationChargedObjects ( const reco::PFTau pfTau,
const reco::Vertex pv,
std::vector< reco::LeafCandidate > &  output 
)

retrieve filtered isolation charged objects from the pfTau

Definition at line 10 of file PFTauQualityCutWrapper.cc.

References edm::RefVector< C, T, F >::at(), DeDxDiscriminatorTools::charge(), TauTagTools::filteredPFChargedHadrCands(), TauTagTools::filteredTracks(), i, edm::Ref< C, T, F >::isNonnull(), reco::PFTau::isolationPFChargedHadrCands(), reco::BaseTau::isolationTracks(), p3, p4, reco::Vertex::position(), query::result, edm::RefVector< C, T, F >::size(), reco::Vertex::trackWeight(), and w().

11 {
13  {
21  pv,
22  pv.position().z() ); //????
23 
24  size_t nTracks = result.size();
25  for(size_t iTrack = 0; iTrack < nTracks; ++iTrack)
26  {
27  // this sucks
28  int charge = result[iTrack]->charge();
29  math::XYZVector p3 = result[iTrack]->momentum();
30  reco::Particle::LorentzVector p4(p3.R(), p3.x(), p3.y(), p3.z());
31  output.push_back(reco::LeafCandidate(charge, p4));
32  }
33  } else
34  {
41  10000., // isoQCuts.maxDeltaZ,
42  pv,
43  pv.position().z() ); //????
44 
45 
46  for(unsigned int i=0;i<preresult.size();++i)
47  if(preresult.at(i)->trackRef().isNonnull()) {
48  //get the vertex weight and require to be >50%
49  float w = pv.trackWeight(preresult.at(i)->trackRef());
50  if(w>0.0)
51  output.push_back(reco::LeafCandidate(preresult.at(i)->charge(), preresult[i]->p4()));
52 
53  }
54 
55 
56  }
57 
58 }
int i
Definition: DBlmapReader.cc:9
virtual const reco::TrackRefVector & isolationTracks() const
Definition: BaseTau.cc:30
reco::TrackRefVector filteredTracks(reco::TrackRefVector theInitialTracks, double tkminPt, int tkminPixelHitsn, int tkminTrackerHitsn, double tkmaxipt, double tkmaxChi2, reco::Vertex pV)
Definition: TauTagTools.cc:77
const Point & position() const
position
Definition: Vertex.h:93
double charge(const std::vector< uint8_t > &Ampls)
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:250
float trackWeight(const TrackBaseRef &r) const
returns the weight with which a Track has contributed to the vertex-fit.
double p4[4]
Definition: TauolaWrapper.h:92
tuple result
Definition: query.py:137
reco::PFCandidateRefVector filteredPFChargedHadrCands(reco::PFCandidateRefVector theInitialPFCands, double ChargedHadrCand_tkminPt, int ChargedHadrCand_tkminPixelHitsn, int ChargedHadrCand_tkminTrackerHitsn, double ChargedHadrCand_tkmaxipt, double ChargedHadrCand_tkmaxChi2, reco::Vertex pV)
Definition: TauTagTools.cc:119
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
value_type const at(size_type idx) const
Retrieve an element of the RefVector.
Definition: RefVector.h:76
size_type size() const
Size of the RefVector.
Definition: RefVector.h:89
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Particle.h:25
T w() const
const PFCandidateRefVector & isolationPFChargedHadrCands() const
Charged candidates in isolation region.
Definition: PFTau.cc:84
double p3[4]
Definition: TauolaWrapper.h:91
void PFTauQualityCutWrapper::isolationGammaObjects ( const reco::PFTau pfTau,
std::vector< reco::LeafCandidate > &  output 
)

retrieve filtered isolation gamma objects from the pfTau

Definition at line 86 of file PFTauQualityCutWrapper.cc.

References DeDxDiscriminatorTools::charge(), TauTagTools::filteredPFGammaCands(), reco::PFTau::isolationPFGammaCands(), reco::tau::helpers::nGammas(), p4, query::result, and edm::RefVector< C, T, F >::size().

87 {
89 
90  size_t nGammas = result.size();
91  for(size_t iGamma = 0; iGamma < nGammas; ++iGamma)
92  {
93  output.push_back(reco::LeafCandidate(result[iGamma]->charge(), result[iGamma]->p4()));
94  }
95 
96 }
unsigned int nGammas(const GenJet &jet)
reco::PFCandidateRefVector filteredPFGammaCands(reco::PFCandidateRefVector theInitialPFCands, double GammaCand_EcalclusMinEt)
Definition: TauTagTools.cc:171
double charge(const std::vector< uint8_t > &Ampls)
double p4[4]
Definition: TauolaWrapper.h:92
const PFCandidateRefVector & isolationPFGammaCands() const
Gamma candidates in isolation region.
Definition: PFTau.cc:88
tuple result
Definition: query.py:137
size_type size() const
Size of the RefVector.
Definition: RefVector.h:89
void PFTauQualityCutWrapper::isolationPUObjects ( const reco::PFTau pfTau,
const reco::Vertex pv,
std::vector< reco::LeafCandidate > &  output 
)

Definition at line 62 of file PFTauQualityCutWrapper.cc.

References edm::RefVector< C, T, F >::at(), TauTagTools::filteredPFChargedHadrCands(), i, edm::Ref< C, T, F >::isNonnull(), reco::PFTau::isolationPFChargedHadrCands(), reco::Vertex::position(), edm::RefVector< C, T, F >::size(), reco::Vertex::trackWeight(), and w().

63 {
64 
66  isoQCuts.minGammaEt,0,0,1000.,100000,
67  10000., // isoQCuts.maxDeltaZ,
68  pv,
69  pv.position().z() ); //????
70 
71 
72  for(unsigned int i=0;i<preresult.size();++i)
73  if(preresult.at(i)->trackRef().isNonnull()) {
74  //get the vertex weight and require to be >50%
75  float w = pv.trackWeight(preresult.at(i)->trackRef());
76  if(w==0.0)
77  output.push_back(reco::LeafCandidate(preresult.at(i)->charge(), preresult[i]->p4()));
78 
79  }
80 
81 }
int i
Definition: DBlmapReader.cc:9
const Point & position() const
position
Definition: Vertex.h:93
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:250
float trackWeight(const TrackBaseRef &r) const
returns the weight with which a Track has contributed to the vertex-fit.
reco::PFCandidateRefVector filteredPFChargedHadrCands(reco::PFCandidateRefVector theInitialPFCands, double ChargedHadrCand_tkminPt, int ChargedHadrCand_tkminPixelHitsn, int ChargedHadrCand_tkminTrackerHitsn, double ChargedHadrCand_tkmaxipt, double ChargedHadrCand_tkmaxChi2, reco::Vertex pV)
Definition: TauTagTools.cc:119
value_type const at(size_type idx) const
Retrieve an element of the RefVector.
Definition: RefVector.h:76
size_type size() const
Size of the RefVector.
Definition: RefVector.h:89
T w() const
const PFCandidateRefVector & isolationPFChargedHadrCands() const
Charged candidates in isolation region.
Definition: PFTau.cc:84
void PFTauQualityCutWrapper::signalChargedObjects ( const reco::PFTau pfTau,
const reco::Vertex pv,
std::vector< reco::LeafCandidate > &  output 
)

retrieve filtered signal charged objects from the pfTau

Definition at line 103 of file PFTauQualityCutWrapper.cc.

References edm::RefVector< C, T, F >::at(), DeDxDiscriminatorTools::charge(), TauTagTools::filteredPFChargedHadrCands(), TauTagTools::filteredTracks(), i, edm::Ref< C, T, F >::isNonnull(), p3, p4, reco::Vertex::position(), query::result, reco::PFTau::signalPFChargedHadrCands(), reco::BaseTau::signalTracks(), edm::RefVector< C, T, F >::size(), reco::Vertex::trackWeight(), and w().

104 {
106  {
114  pv,
115  pv.position().z() ); //????
116 
117  size_t nTracks = result.size();
118  for(size_t iTrack = 0; iTrack < nTracks; ++iTrack)
119  {
120  // this sucks
121  int charge = result[iTrack]->charge();
122  math::XYZVector p3 = result[iTrack]->momentum();
123  reco::Particle::LorentzVector p4(p3.R(), p3.x(), p3.y(), p3.z());
124  output.push_back(reco::LeafCandidate(charge, p4));
125  }
126  } else
127  {
128 
129  //First perform basic filtering without vertex dz
131 
137  10000., // signalQCuts.maxDeltaZ,
138  pv,
139  pv.position().z() ); //????
140 
141  //Now check the vertex association
142  for(unsigned int i=0;i<preresult.size();++i)
143  if(preresult.at(i)->trackRef().isNonnull()) {
144  //get the vertex weight and require to be >50%
145  float w = pv.trackWeight(preresult.at(i)->trackRef());
146  if(w>0.0)
147  output.push_back(reco::LeafCandidate(preresult.at(i)->charge(), preresult[i]->p4()));
148 
149  }
150 
151 
152  }
153 
154 }
int i
Definition: DBlmapReader.cc:9
reco::TrackRefVector filteredTracks(reco::TrackRefVector theInitialTracks, double tkminPt, int tkminPixelHitsn, int tkminTrackerHitsn, double tkmaxipt, double tkmaxChi2, reco::Vertex pV)
Definition: TauTagTools.cc:77
const PFCandidateRefVector & signalPFChargedHadrCands() const
Charged hadrons in signal region.
Definition: PFTau.cc:75
const Point & position() const
position
Definition: Vertex.h:93
double charge(const std::vector< uint8_t > &Ampls)
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:250
float trackWeight(const TrackBaseRef &r) const
returns the weight with which a Track has contributed to the vertex-fit.
double p4[4]
Definition: TauolaWrapper.h:92
tuple result
Definition: query.py:137
virtual const reco::TrackRefVector & signalTracks() const
Definition: BaseTau.cc:28
reco::PFCandidateRefVector filteredPFChargedHadrCands(reco::PFCandidateRefVector theInitialPFCands, double ChargedHadrCand_tkminPt, int ChargedHadrCand_tkminPixelHitsn, int ChargedHadrCand_tkminTrackerHitsn, double ChargedHadrCand_tkmaxipt, double ChargedHadrCand_tkmaxChi2, reco::Vertex pV)
Definition: TauTagTools.cc:119
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
value_type const at(size_type idx) const
Retrieve an element of the RefVector.
Definition: RefVector.h:76
size_type size() const
Size of the RefVector.
Definition: RefVector.h:89
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Particle.h:25
T w() const
double p3[4]
Definition: TauolaWrapper.h:91
void PFTauQualityCutWrapper::signalGammaObjects ( const reco::PFTau pfTau,
std::vector< reco::LeafCandidate > &  output 
)

retrieve filtered signal gamma objects from the pfTau

Definition at line 157 of file PFTauQualityCutWrapper.cc.

References DeDxDiscriminatorTools::charge(), TauTagTools::filteredPFGammaCands(), reco::tau::helpers::nGammas(), p4, query::result, reco::PFTau::signalPFGammaCands(), and edm::RefVector< C, T, F >::size().

158 {
160 
161  size_t nGammas = result.size();
162  for(size_t iGamma = 0; iGamma < nGammas; ++iGamma)
163  {
164  output.push_back(reco::LeafCandidate(result[iGamma]->charge(), result[iGamma]->p4()));
165  }
166 
167 }
unsigned int nGammas(const GenJet &jet)
reco::PFCandidateRefVector filteredPFGammaCands(reco::PFCandidateRefVector theInitialPFCands, double GammaCand_EcalclusMinEt)
Definition: TauTagTools.cc:171
double charge(const std::vector< uint8_t > &Ampls)
double p4[4]
Definition: TauolaWrapper.h:92
tuple result
Definition: query.py:137
const PFCandidateRefVector & signalPFGammaCands() const
Gamma candidates in signal region.
Definition: PFTau.cc:79
size_type size() const
Size of the RefVector.
Definition: RefVector.h:89

Member Data Documentation

QualityCutSet PFTauQualityCutWrapper::isoQCuts
private

Definition at line 56 of file PFTauQualityCutWrapper.h.

Referenced by PFTauQualityCutWrapper().

QualityCutSet PFTauQualityCutWrapper::signalQCuts
private

Definition at line 57 of file PFTauQualityCutWrapper.h.

Referenced by PFTauQualityCutWrapper().