CMS 3D CMS Logo

Classes | Public Member Functions | Private Attributes

PFTauQualityCutWrapper Class Reference

#include <PFTauQualityCutWrapper.h>

List of all members.

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
void isolationGammaObjects (const reco::PFTau &, std::vector< reco::LeafCandidate > &)
 retrieve filtered isolation gamma objects from the pfTau
 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
void signalGammaObjects (const reco::PFTau &, std::vector< reco::LeafCandidate > &)
 retrieve filtered signal gamma objects from the pfTau

Private Attributes

QualityCutSet isoQCuts
QualityCutSet signalQCuts

Detailed Description

Definition at line 8 of file PFTauQualityCutWrapper.h.


Constructor & Destructor Documentation

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

Member Function Documentation

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

retrieve filtered isolation charged objects from the pfTau

Definition at line 10 of file PFTauQualityCutWrapper.cc.

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

{
   if( isoQCuts.useTracksInsteadOfPF )
   {
      TrackRefVector result = TauTagTools::filteredTracks(pfTau.isolationTracks(), 
                                             isoQCuts.minTrackPt,
                                             isoQCuts.minTrackPixelHits,
                                             isoQCuts.minTrackHits,
                                             isoQCuts.maxTransverseImpactParameter,
                                             isoQCuts.maxTrackChi2,
                                             isoQCuts.maxDeltaZ,
                                             pv,
                                             pv.position().z() ); //????

      size_t nTracks = result.size();
      for(size_t iTrack = 0; iTrack < nTracks; ++iTrack)
      {
         // this sucks
         int charge         = result[iTrack]->charge();
         math::XYZVector p3 = result[iTrack]->momentum();
         reco::Particle::LorentzVector p4(p3.R(), p3.x(), p3.y(), p3.z());
         output.push_back(reco::LeafCandidate(charge, p4));
      }
   } else
   {
      PFCandidateRefVector result = TauTagTools::filteredPFChargedHadrCands(pfTau.isolationPFChargedHadrCands(), 
                                             isoQCuts.minTrackPt,
                                             isoQCuts.minTrackPixelHits,
                                             isoQCuts.minTrackHits,
                                             isoQCuts.maxTransverseImpactParameter,
                                             isoQCuts.maxTrackChi2,
                                             isoQCuts.maxDeltaZ,
                                             pv,
                                             pv.position().z() ); //????

      size_t nTracks = result.size();
      for(size_t iTrack = 0; iTrack < nTracks; ++iTrack)
      {
         output.push_back(reco::LeafCandidate(result[iTrack]->charge(), result[iTrack]->p4()));
      }
   }
   
}
void PFTauQualityCutWrapper::isolationGammaObjects ( const reco::PFTau ,
std::vector< reco::LeafCandidate > &   
)

retrieve filtered isolation gamma objects from the pfTau

Definition at line 55 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().

{
   PFCandidateRefVector result = TauTagTools::filteredPFGammaCands(pfTau.isolationPFGammaCands(), isoQCuts.minGammaEt);

   size_t nGammas = result.size();
   for(size_t iGamma = 0; iGamma < nGammas; ++iGamma)
   {
      output.push_back(reco::LeafCandidate(result[iGamma]->charge(), result[iGamma]->p4()));
   }
   
}
void PFTauQualityCutWrapper::signalChargedObjects ( const reco::PFTau ,
const reco::Vertex ,
std::vector< reco::LeafCandidate > &   
)

retrieve filtered signal charged objects from the pfTau

Definition at line 72 of file PFTauQualityCutWrapper.cc.

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

{
   if( signalQCuts.useTracksInsteadOfPF )
   {
      TrackRefVector result = TauTagTools::filteredTracks(pfTau.signalTracks(), 
                                             signalQCuts.minTrackPt,
                                             signalQCuts.minTrackPixelHits,
                                             signalQCuts.minTrackHits,
                                             signalQCuts.maxTransverseImpactParameter,
                                             signalQCuts.maxTrackChi2,
                                             signalQCuts.maxDeltaZ,
                                             pv,
                                             pv.position().z() ); //????

      size_t nTracks = result.size();
      for(size_t iTrack = 0; iTrack < nTracks; ++iTrack)
      {
         // this sucks
         int charge         = result[iTrack]->charge();
         math::XYZVector p3 = result[iTrack]->momentum();
         reco::Particle::LorentzVector p4(p3.R(), p3.x(), p3.y(), p3.z());
         output.push_back(reco::LeafCandidate(charge, p4));
      }
   } else
   {
      PFCandidateRefVector result = TauTagTools::filteredPFChargedHadrCands(pfTau.signalPFChargedHadrCands(), 
                                             signalQCuts.minTrackPt,
                                             signalQCuts.minTrackPixelHits,
                                             signalQCuts.minTrackHits,
                                             signalQCuts.maxTransverseImpactParameter,
                                             signalQCuts.maxTrackChi2,
                                             signalQCuts.maxDeltaZ,
                                             pv,
                                             pv.position().z() ); //????

      size_t nTracks = result.size();
      for(size_t iTrack = 0; iTrack < nTracks; ++iTrack)
      {
         output.push_back(reco::LeafCandidate(result[iTrack]->charge(), result[iTrack]->p4()));
      }
   }
   
}
void PFTauQualityCutWrapper::signalGammaObjects ( const reco::PFTau ,
std::vector< reco::LeafCandidate > &   
)

retrieve filtered signal gamma objects from the pfTau

Definition at line 117 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().

{
   PFCandidateRefVector result = TauTagTools::filteredPFGammaCands(pfTau.signalPFGammaCands(), signalQCuts.minGammaEt);

   size_t nGammas = result.size();
   for(size_t iGamma = 0; iGamma < nGammas; ++iGamma)
   {
      output.push_back(reco::LeafCandidate(result[iGamma]->charge(), result[iGamma]->p4()));
   }
   
}

Member Data Documentation

Definition at line 50 of file PFTauQualityCutWrapper.h.

Referenced by PFTauQualityCutWrapper().

Definition at line 51 of file PFTauQualityCutWrapper.h.

Referenced by PFTauQualityCutWrapper().