CMS 3D CMS Logo

Namespaces | Classes | Functions | Variables

reco::tau Namespace Reference

Namespaces

namespace  cone
namespace  disc
namespace  helpers
namespace  qcuts
namespace  xclean

Classes

class  AssociationMatchRefSelector
class  Combinatoric
class  CombinatoricGenerator
class  CombinatoricIterator
class  RecoTauBuilderCombinatoricPlugin
class  RecoTauBuilderConePlugin
class  RecoTauBuilderPlugin
class  RecoTauCleanerPlugin
class  RecoTauConstructor
class  RecoTauDiscriminantCleanerPlugin
class  RecoTauDiscriminantFromDiscriminator
class  RecoTauDiscriminantFunctionPlugin
class  RecoTauDiscriminantInvariantWidth
class  RecoTauDiscriminantPlugin
class  RecoTauDiscriminantVectorFunctionPlugin
class  RecoTauDiscriminationBinnedIsolation
class  RecoTauDiscriminationBinnedIsolationImpl
class  RecoTauElectronRejectionPlugin
class  RecoTauEnergyRecoveryPlugin
class  RecoTauEventHolderPlugin
class  RecoTauImpactParameterSignificancePlugin
class  RecoTauIsolationMasking
class  RecoTauLexicographicalRanking
class  RecoTauModifierPlugin
class  RecoTauMVAHelper
class  RecoTauNamedPlugin
class  RecoTauObjectEmbedder
class  RecoTauPhotonFilter
class  RecoTauPiZeroBuilderPlugin
class  RecoTauPiZeroCombinatoricPlugin
class  RecoTauPiZeroQualityPlugin
class  RecoTauPiZeroStringQuality
class  RecoTauPiZeroStripPlugin
class  RecoTauPiZeroStripPlugin2
class  RecoTauPiZeroTrivialPlugin
class  RecoTauQualityCuts
class  RecoTauRandomCleanerPlugin
class  RecoTauStringCleanerPlugin
class  RecoTauTagInfoWorkaroundModifer
class  RecoTauTwoProngFilter
class  RecoTauVertexAssociator
class  SortByDescendingPt
class  SortPFCandsDescendingPt

Functions

template<typename RefVectorType , typename BaseView >
RefVectorType castView (const edm::Handle< BaseView > &view)
 Convert a BaseView (View<T>) to a TRefVector.
unsigned int chargedHadronsInDecayMode (PFTau::hadronicDecayMode mode)
 Reverse mapping of decay modes into multiplicities.
template<typename Container , class OverlapFunction >
Container cleanOverlaps (const Container &dirty)
std::string discPluginName (const std::string &mvaName)
std::pair< edm::ParameterSet,
edm::ParameterSet
factorizePUQCuts (const edm::ParameterSet &inputSet)
template<typename Iterator >
std::vector< PFCandidatePtrfilterPFCandidates (const Iterator &begin, const Iterator &end, int particleId, bool sort=true)
std::vector< PFCandidatePtrflattenPiZeros (const std::vector< RecoTauPiZero > &)
 Flatten a list of pi zeros into a list of there constituent PFCandidates.
PFTau::hadronicDecayMode getDecayMode (const reco::GenJet *genJet)
const reco::TrackBaseRef getTrack (const reco::PFCandidate &cand)
bool isTauSignalPFCandidate (const reco::PFTau &tau, const reco::PFCandidatePtr &pfJetConstituent)
template<typename InputIterator >
InputIterator leadPFCand (InputIterator begin, InputIterator end)
void markCandsInStrip (std::vector< bool > &candFlags, const std::set< size_t > &candIds)
std::vector< PFCandidatePtrpfCandidates (const PFJet &jet, int particleId, bool sort=true)
std::vector< PFCandidatePtrpfCandidates (const PFJet &jet, const std::vector< int > &particleIds, bool sort=true)
 Extract pfCandidates of a that match a list of particle Ids from a PFJet.
std::vector< PFCandidatePtrpfChargedCands (const PFJet &jet, bool sort=true)
 Extract all non-neutral candidates from a PFJet.
std::vector< PFCandidatePtrpfGammas (const PFJet &jet, bool sort=true)
 Extract all pfGammas from a PFJet.
unsigned int piZerosInDecayMode (PFTau::hadronicDecayMode mode)
double square (double x)
template<typename InputIterator >
int sumPFCandCharge (InputIterator begin, InputIterator end)
 Sum the PT of a collection of PFCandidates.
template<typename InputIterator >
reco::Candidate::LorentzVector sumPFCandP4 (InputIterator begin, InputIterator end)
template<typename InputIterator >
double sumPFCandPt (InputIterator begin, InputIterator end)
 Sum the PT of a collection of PFCandidates.
template<typename InputIterator , typename FunctionPtr , typename ReturnType >
ReturnType sumPFVector (InputIterator begin, InputIterator end, FunctionPtr func, ReturnType init)
 Sum the four vectors in a collection of PFCandidates.
template<typename InputIterator >
InputIterator takeNElements (const InputIterator &begin, const InputIterator &end, size_t N)
PFTau::hadronicDecayMode translateDecayMode (unsigned int nCharged, unsigned int nPiZero)
PFTau::hadronicDecayMode translateGenDecayModeToReco (const std::string &genName)
 Convert a genTau decay mode string ('oneProng0Pi0') to the RECO enum.
std::string translateRecoDecayModeToGen (PFTau::hadronicDecayMode decayMode)
 Convert a RECO enum decay mode to a string ('oneProng0Pi0')

Variables

reco::VertexRef primaryVertexRef

Function Documentation

template<typename RefVectorType , typename BaseView >
RefVectorType reco::tau::castView ( const edm::Handle< BaseView > &  view)

Convert a BaseView (View<T>) to a TRefVector.

Definition at line 74 of file RecoTauCommonUtilities.h.

References i, convertSQLitetoXML_cfg::output, and relativeConstraints::value.

                                                        {
  typedef typename RefVectorType::value_type OutputRef;
  // Double check at compile time that the inheritance is okay.  It can still
  // fail at runtime if you pass it the wrong collection.
  BOOST_STATIC_ASSERT(
      (boost::is_base_of<typename BaseView::value_type,
                         typename RefVectorType::member_type>::value));
  RefVectorType output;
  size_t nElements = view->size();
  output.reserve(nElements);
  // Cast each of our Refs
  for (size_t i = 0; i < nElements; ++i) {
    output.push_back(view->refAt(i).template castTo<OutputRef>());
  }
  return output;
}
unsigned int reco::tau::chargedHadronsInDecayMode ( PFTau::hadronicDecayMode  mode)

Reverse mapping of decay modes into multiplicities.

Definition at line 45 of file PFTauDecayModeTools.cc.

References reco::PFTau::kOneProngNPiZero, and alignBH_cfg::mode.

                                                                    {
   int modeAsInt = static_cast<int>(mode);
   return (modeAsInt / PFTau::kOneProngNPiZero) + 1;
}
template<typename Container , class OverlapFunction >
Container reco::tau::cleanOverlaps ( const Container &  dirty)

Definition at line 34 of file RecoTauCleaningTools.h.

References clean, and analyzePatCleaning_cfg::overlaps.

Referenced by RecoTauCleanerImpl< Prod >::produce().

                                                {
  typedef typename Container::const_iterator Iterator;
  // Output container of clean objects
  Container clean;
  OverlapFunction overlapChecker;
  for (Iterator candidate = dirty.begin(); candidate != dirty.end();
       ++candidate) {
    // Check if this overlaps with a pizero already in the clean list
    bool overlaps = false;
    for (Iterator cleaned = clean.begin();
         cleaned != clean.end() && !overlaps; ++cleaned) {
      overlaps = overlapChecker(*candidate, *cleaned);
    }
    // If it didn't overlap with anything clean, add it to the clean list
    if (!overlaps)
      clean.insert(clean.end(), *candidate);
  }
  return clean;
}
std::string reco::tau::discPluginName ( const std::string &  mvaName) [inline]
std::pair< edm::ParameterSet, edm::ParameterSet > reco::tau::factorizePUQCuts ( const edm::ParameterSet inputSet)

Definition at line 281 of file RecoTauQualityCuts.cc.

References edm::ParameterSet::copyFrom(), GOODCOLL_filter_cfg::cut, edm::ParameterSet::getParameterNames(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by PFRecoTauDiscriminationByIsolation::PFRecoTauDiscriminationByIsolation().

                                  {

  edm::ParameterSet puCuts;
  edm::ParameterSet nonPUCuts;

  std::vector<std::string> inputNames = input.getParameterNames();
  BOOST_FOREACH(const std::string& cut, inputNames) {
    if (cut == "minTrackVertexWeight" || cut == "maxDeltaZ"
        || cut == "maxDeltaZToLeadTrack") {
      puCuts.copyFrom(input, cut);
    } else {
      nonPUCuts.copyFrom(input, cut);
    }
  }
  return std::make_pair(puCuts, nonPUCuts);
}
template<typename Iterator >
std::vector<PFCandidatePtr> reco::tau::filterPFCandidates ( const Iterator begin,
const Iterator end,
int  particleId,
bool  sort = true 
)

Filter a collection of objects that are convertible to PFCandidatePtrs by PFCandidate ID

Definition at line 41 of file RecoTauCommonUtilities.h.

References end, convertSQLitetoXML_cfg::output, and python::multivaluedict::sort().

Referenced by pfCandidates().

                                    {
  std::vector<PFCandidatePtr> output;
  for(Iterator iter = begin; iter != end; ++iter) {
    reco::PFCandidatePtr ptr(*iter);
    if (ptr->particleId() == particleId)
      output.push_back(ptr);
  }
  if (sort) std::sort(output.begin(), output.end(), SortPFCandsDescendingPt());
  return output;
}
std::vector< PFCandidatePtr > reco::tau::flattenPiZeros ( const std::vector< RecoTauPiZero > &  piZeros)

Flatten a list of pi zeros into a list of there constituent PFCandidates.

Definition at line 16 of file RecoTauCommonUtilities.cc.

References convertSQLitetoXML_cfg::output.

Referenced by reco::tau::xclean::CrossCleanPtrs::CrossCleanPtrs(), and reco::tau::RecoTauPhotonFilter::operator()().

                                                         {
  std::vector<PFCandidatePtr> output;

  for(std::vector<RecoTauPiZero>::const_iterator piZero = piZeros.begin();
      piZero != piZeros.end(); ++piZero) {
    for(size_t iDaughter = 0; iDaughter < piZero->numberOfDaughters();
        ++iDaughter) {
      output.push_back(PFCandidatePtr(piZero->daughterPtr(iDaughter)));
    }
  }
  return output;
}
PFTau::hadronicDecayMode reco::tau::getDecayMode ( const reco::GenJet genJet)
const reco::TrackBaseRef reco::tau::getTrack ( const reco::PFCandidate cand)
bool reco::tau::isTauSignalPFCandidate ( const reco::PFTau tau,
const reco::PFCandidatePtr pfJetConstituent 
)

Definition at line 90 of file RecoTauEnergyRecoveryPlugin.cc.

References edm::RefVector< C, T, F >::begin(), edm::RefVector< C, T, F >::end(), edm::Ptr< T >::key(), and reco::PFTau::signalPFCands().

Referenced by reco::tau::RecoTauEnergyRecoveryPlugin::operator()().

{
  bool retVal = false;

  const reco::PFCandidateRefVector& signalPFCandidates = tau.signalPFCands();
  for ( reco::PFCandidateRefVector::const_iterator signalPFCandidate = signalPFCandidates.begin();
        signalPFCandidate != signalPFCandidates.end(); ++signalPFCandidate ) {
    if ( pfJetConstituent.key() == signalPFCandidate->key() ) retVal = true;
  }

  return retVal;
}
template<typename InputIterator >
InputIterator reco::tau::leadPFCand ( InputIterator  begin,
InputIterator  end 
)

Definition at line 132 of file RecoTauCommonUtilities.h.

References begin, and end.

Referenced by reco::tau::RecoTauConstructor::get(), and reco::tau::RecoTauBuilderConePlugin::operator()().

                       {
    double max_pt = 0;
    InputIterator max_cand = begin;
    for(InputIterator cand = begin; cand != end; ++cand) {
      if( (*cand)->pt() > max_pt ) {
        max_pt = (*cand)->pt();
        max_cand = cand;
      }
    }
    return max_cand;
  }
void reco::tau::markCandsInStrip ( std::vector< bool > &  candFlags,
const std::set< size_t > &  candIds 
)

Definition at line 166 of file RecoTauPiZeroStripPlugin2.cc.

Referenced by reco::tau::RecoTauPiZeroStripPlugin2::operator()().

{
  for ( std::set<size_t>::const_iterator candId = candIds.begin();
        candId != candIds.end(); ++candId ) {
    candFlags[*candId] = true;
  }
}
std::vector< reco::PFCandidatePtr > reco::tau::pfCandidates ( const PFJet &  jet,
int  particleId,
bool  sort = true 
)
std::vector< reco::PFCandidatePtr > reco::tau::pfCandidates ( const PFJet &  jet,
const std::vector< int > &  particleIds,
bool  sort = true 
)

Extract pfCandidates of a that match a list of particle Ids from a PFJet.

Definition at line 37 of file RecoTauCommonUtilities.cc.

References convertSQLitetoXML_cfg::output, pfCandidates(), and python::multivaluedict::sort().

                                                  {
  PFCandPtrs output;
  // Get each desired candidate type, unsorted for now
  for(std::vector<int>::const_iterator particleId = particleIds.begin();
      particleId != particleIds.end(); ++particleId) {
    PFCandPtrs selectedPFCands = pfCandidates(jet, *particleId, false);
    output.insert(output.end(), selectedPFCands.begin(), selectedPFCands.end());
  }
  if (sort) std::sort(output.begin(), output.end(), SortPFCandsDescendingPt());
  return output;
}
std::vector< reco::PFCandidatePtr > reco::tau::pfChargedCands ( const PFJet &  jet,
bool  sort = true 
)

Extract all non-neutral candidates from a PFJet.

Definition at line 54 of file RecoTauCommonUtilities.cc.

References reco::PFCandidate::e, reco::PFCandidate::h, reco::PFCandidate::mu, convertSQLitetoXML_cfg::output, pfCandidates(), and python::multivaluedict::sort().

Referenced by reco::tau::RecoTauBuilderCombinatoricPlugin::operator()(), and reco::tau::RecoTauBuilderConePlugin::operator()().

                                                            {
  PFCandPtrs output;
  PFCandPtrs mus = pfCandidates(jet, reco::PFCandidate::mu, false);
  PFCandPtrs es = pfCandidates(jet, reco::PFCandidate::e, false);
  PFCandPtrs chs = pfCandidates(jet, reco::PFCandidate::h, false);
  output.reserve(mus.size() + es.size() + chs.size());
  output.insert(output.end(), mus.begin(), mus.end());
  output.insert(output.end(), es.begin(), es.end());
  output.insert(output.end(), chs.begin(), chs.end());
  if (sort) std::sort(output.begin(), output.end(), SortPFCandsDescendingPt());
  return output;
}
std::vector< reco::PFCandidatePtr > reco::tau::pfGammas ( const PFJet &  jet,
bool  sort = true 
)
unsigned int reco::tau::piZerosInDecayMode ( PFTau::hadronicDecayMode  mode)

Definition at line 50 of file PFTauDecayModeTools.cc.

References reco::PFTau::kOneProngNPiZero, and alignBH_cfg::mode.

                                                             {
   int modeAsInt = static_cast<int>(mode);
   return (modeAsInt % PFTau::kOneProngNPiZero);
}
double reco::tau::square ( double  x)

Definition at line 103 of file RecoTauEnergyRecoveryPlugin.cc.

References x.

Referenced by reco::tau::RecoTauEnergyRecoveryPlugin::operator()().

{
  return x*x;
}
template<typename InputIterator >
int reco::tau::sumPFCandCharge ( InputIterator  begin,
InputIterator  end 
)

Sum the PT of a collection of PFCandidates.

Definition at line 127 of file RecoTauCommonUtilities.h.

References reco::LeafCandidate::charge(), and sumPFVector().

Referenced by reco::tau::RecoTauConstructor::get().

template<typename InputIterator >
reco::Candidate::LorentzVector reco::tau::sumPFCandP4 ( InputIterator  begin,
InputIterator  end 
)
template<typename InputIterator >
double reco::tau::sumPFCandPt ( InputIterator  begin,
InputIterator  end 
)

Sum the PT of a collection of PFCandidates.

Definition at line 121 of file RecoTauCommonUtilities.h.

References reco::LeafCandidate::pt(), and sumPFVector().

Referenced by reco::tau::RecoTauConstructor::get().

                       {
    return sumPFVector(begin, end, &PFCandidate::pt, 0.0);
  }
template<typename InputIterator , typename FunctionPtr , typename ReturnType >
ReturnType reco::tau::sumPFVector ( InputIterator  begin,
InputIterator  end,
FunctionPtr  func,
ReturnType  init 
)

Sum the four vectors in a collection of PFCandidates.

Definition at line 104 of file RecoTauCommonUtilities.h.

References end, init, and convertSQLitetoXML_cfg::output.

Referenced by sumPFCandCharge(), sumPFCandP4(), and sumPFCandPt().

                                         {
    ReturnType output = init;
    for(InputIterator cand = begin; cand != end; ++cand) {
      //#define CALL_MEMBER_FN(object,ptrToMember)  ((object).*(ptrToMember))
      output += ((**cand).*(func))();
    }
    return output;
  }
template<typename InputIterator >
InputIterator reco::tau::takeNElements ( const InputIterator &  begin,
const InputIterator &  end,
size_t  N 
)
PFTau::hadronicDecayMode reco::tau::translateDecayMode ( unsigned int  nCharged,
unsigned int  nPiZero 
)

Definition at line 55 of file PFTauDecayModeTools.cc.

References kNull, reco::PFTau::kOneProngNPiZero, and reco::PFTau::kRareDecayMode.

Referenced by reco::tau::RecoTauObjectEmbedder< T >::operator()(), reco::tau::RecoTauDiscriminantInvariantWidth::RecoTauDiscriminantInvariantWidth(), RecoTauMVADiscriminator::RecoTauMVADiscriminator(), and RecoTauMVATransform::RecoTauMVATransform().

                                                  {
   // If no tracks exist, this is definitely not a tau!
   if(!nCharged) return PFTau::kNull;
   // Find the maximum number of PiZeros our parameterization can hold
   const unsigned int maxPiZeros = PFTau::kOneProngNPiZero;
   // Determine our track index
   unsigned int trackIndex = (nCharged-1)*(maxPiZeros+1);
   // Check if we handle the given number of tracks
   if(trackIndex >= PFTau::kRareDecayMode) return PFTau::kRareDecayMode;

   nPiZeros = (nPiZeros <= maxPiZeros) ? nPiZeros : maxPiZeros;
   return static_cast<PFTau::hadronicDecayMode>(trackIndex + nPiZeros);
}
PFTau::hadronicDecayMode reco::tau::translateGenDecayModeToReco ( const std::string &  genName)

Convert a genTau decay mode string ('oneProng0Pi0') to the RECO enum.

Definition at line 70 of file PFTauDecayModeTools.cc.

Referenced by getDecayMode().

                           {
  return decayModeStringToId(name.c_str(), dmTranslatorMap);
}
std::string reco::tau::translateRecoDecayModeToGen ( PFTau::hadronicDecayMode  decayMode)

Convert a RECO enum decay mode to a string ('oneProng0Pi0')

Definition at line 75 of file PFTauDecayModeTools.cc.

                                                                        {
  return decayModeIdToString(decayMode, dmTranslatorMap);
}

Variable Documentation