CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Protected Attributes

PromptTrackCountingComputer Class Reference

#include <PromptTrackCountingComputer.h>

Inheritance diagram for PromptTrackCountingComputer:
JetTagComputer

List of all members.

Public Member Functions

float discriminator (const TagInfoHelper &ti) const
 PromptTrackCountingComputer (const edm::ParameterSet &parameters)

Protected Member Functions

std::multiset< float > orderedSignificances (const reco::TrackIPTagInfo &tkip) const

Protected Attributes

double m_cutMaxDecayLen
double m_cutMaxDistToAxis
double m_deltaR
double m_deltaRmin
int m_ipType
int m_nthTrack
reco::TrackBase::TrackQuality m_trackQuality
bool m_useAllQualities
double maxImpactParameter
double maxImpactParameterSig

Detailed Description

Definition at line 16 of file PromptTrackCountingComputer.h.


Constructor & Destructor Documentation

PromptTrackCountingComputer::PromptTrackCountingComputer ( const edm::ParameterSet parameters) [inline]

Definition at line 19 of file PromptTrackCountingComputer.h.

References edm::ParameterSet::getParameter(), m_cutMaxDecayLen, m_cutMaxDistToAxis, m_deltaR, m_deltaRmin, m_ipType, m_nthTrack, m_trackQuality, m_useAllQualities, maxImpactParameter, maxImpactParameterSig, reco::TrackBase::qualityByName(), and JetTagComputer::uses().

  {
     m_nthTrack         = parameters.getParameter<int>("nthTrack");
     m_ipType           = parameters.getParameter<int>("impactParameterType");
     // Maximum and minimum allowed deltaR respectively. 
     m_deltaR           = parameters.getParameter<double>("deltaR");
     m_deltaRmin      = parameters.getParameter<double>("deltaRmin");
     maxImpactParameter    = parameters.getParameter<double>("maxImpactParameter");
     maxImpactParameterSig = parameters.getParameter<double>("maxImpactParameterSig");
     m_cutMaxDecayLen   = parameters.getParameter<double>("maximumDecayLength"); //used
     m_cutMaxDistToAxis = parameters.getParameter<double>("maximumDistanceToJetAxis"); //used
     //
     // access track quality class; "any" takes everything
     //
     std::string trackQualityType = parameters.getParameter<std::string>("trackQualityClass"); //used
     m_trackQuality =  reco::TrackBase::qualityByName(trackQualityType);
     m_useAllQualities = false;
     if (trackQualityType == "any" || 
         trackQualityType == "Any" || 
         trackQualityType == "ANY" ) m_useAllQualities = true;

     uses("ipTagInfos");
  }

Member Function Documentation

float PromptTrackCountingComputer::discriminator ( const TagInfoHelper ti) const [inline, virtual]

Reimplemented from JetTagComputer.

Definition at line 43 of file PromptTrackCountingComputer.h.

References JetTagComputer::TagInfoHelper::get(), maxImpactParameterSig, and orderedSignificances().

   {
     const reco::TrackIPTagInfo & tkip = ti.get<reco::TrackIPTagInfo>();
     std::multiset<float> significances = orderedSignificances(tkip);
     std::multiset<float>::iterator sig;
     unsigned int nPromptTrk = 0;
     for(sig=significances.begin(); sig!=significances.end(); sig++) {
       if (fabs(*sig) < maxImpactParameterSig) nPromptTrk++;
       //       edm::LogDebug("") << "Track "<< nPromptTrk << " sig=" << *sig;       
     }
     return double(nPromptTrk);
   }
std::multiset<float> PromptTrackCountingComputer::orderedSignificances ( const reco::TrackIPTagInfo tkip) const [inline, protected]

Definition at line 57 of file PromptTrackCountingComputer.h.

References i, reco::TrackIPTagInfo::impactParameterData(), PyquenDefaultSettings_cff::impactParameters, edm::Ref< C, T, F >::isNull(), reco::JTATagInfo::jet(), m_cutMaxDecayLen, m_cutMaxDistToAxis, m_deltaR, m_deltaRmin, m_ipType, m_trackQuality, m_useAllQualities, maxImpactParameter, p4, reco::TrackIPTagInfo::primaryVertex(), reco::TrackIPTagInfo::selectedTracks(), testEve_cfg::tracks, and relativeConstraints::value.

Referenced by discriminator().

                                                                                       {

          const std::vector<reco::TrackIPTagInfo::TrackIPData> & impactParameters((tkip.impactParameterData()));
          const edm::RefVector<reco::TrackCollection> & tracks(tkip.selectedTracks());
          std::multiset<float> significances;
          int i=0;
          if(tkip.primaryVertex().isNull())  {  return std::multiset<float>();}

          GlobalPoint pv(tkip.primaryVertex()->position().x(),tkip.primaryVertex()->position().y(),tkip.primaryVertex()->position().z());

          for(std::vector<reco::TrackIPTagInfo::TrackIPData>::const_iterator it = impactParameters.begin(); it!=impactParameters.end(); ++it, i++)
           {
           if(   fabs(impactParameters[i].distanceToJetAxis.value()) < m_cutMaxDistToAxis  &&        // distance to JetAxis
                 (impactParameters[i].closestToJetAxis - pv).mag() < m_cutMaxDecayLen  &&      // max decay len
                 (m_useAllQualities  == true || (*tracks[i]).quality(m_trackQuality)) // use selected track qualities
             )
             {
               if ( ( m_deltaR    <=0  || ROOT::Math::VectorUtil::DeltaR((*tkip.jet()).p4().Vect(), (*tracks[i]).momentum()) < m_deltaR ) &&
                    ( m_deltaRmin <=0  || ROOT::Math::VectorUtil::DeltaR((*tkip.jet()).p4().Vect(), (*tracks[i]).momentum()) > m_deltaRmin ) ) {
                 if ( fabs(((m_ipType==0)?it->ip3d:it->ip2d).value()) < maxImpactParameter ) {
                     significances.insert( ((m_ipType==0)?it->ip3d:it->ip2d).significance() );
                 }
               }
             }
          }
 
         return significances;    
   }

Member Data Documentation

Definition at line 86 of file PromptTrackCountingComputer.h.

Referenced by PromptTrackCountingComputer().

Definition at line 91 of file PromptTrackCountingComputer.h.

Referenced by discriminator(), and PromptTrackCountingComputer().