CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

reco::PreId Class Reference

#include <PreId.h>

List of all members.

Public Types

enum  MatchingType {
  NONE = 0, ECALMATCH = 1, ESMATCH = 2, TRACKFILTERING = 3,
  MVA = 4, FINAL = 10
}

Public Member Functions

float chi2Ratio () const
PFClusterRef clusterRef () const
float dpt () const
bool ecalMatching (unsigned n=0) const
const math::XYZPointecalPos () const
float eopMatch () const
bool esMatching (unsigned n=0) const
float eta () const
const std::vector< float > & geomMatching () const
 Access methods.
float gsfChi2 () const
float kfChi2 () const
float kfNHits () const
bool matching (MatchingType type, unsigned n=0) const
const math::XYZPointmeanShower () const
float mva (unsigned n=0) const
bool mvaSelected (unsigned n=0) const
 PreId (unsigned nselection=1)
bool preIded (unsigned n=0) const
float pt () const
void setECALMatching (bool accepted, unsigned n=0)
void setECALMatchingProperties (PFClusterRef clusterRef, const math::XYZPoint &ecalpos, const math::XYZPoint &meanShower, float deta, float dphi, float chieta, float chiphi, float chi2, float eop)
void setESMatching (bool accepted, unsigned n=0)
void setFinalDecision (bool accepted, unsigned n=0)
void setMatching (MatchingType type, bool result, unsigned n=0)
void setMVA (bool accepted, float mva, unsigned n=0)
void setTrack (reco::TrackRef trackref)
void setTrackFiltering (bool accepted, unsigned n=0)
void setTrackProperties (float newchi2, float chi2ratio, float dpt)
bool trackFiltered (unsigned n=0) const
reco::TrackRef trackRef () const

Private Attributes

float chi2Ratio_
PFClusterRef clusterRef_
float dpt_
math::XYZPoint EcalPos_
std::vector< float > geomMatching_
float gsfChi2_
std::vector< int > matching_
float matchingEop_
math::XYZPoint meanShower_
std::vector< float > mva_
reco::TrackRef trackRef_

Detailed Description

Definition at line 14 of file PreId.h.


Member Enumeration Documentation

Enumerator:
NONE 
ECALMATCH 
ESMATCH 
TRACKFILTERING 
MVA 
FINAL 

Definition at line 16 of file PreId.h.

                          {
        NONE=0,
        ECALMATCH=1,
        ESMATCH=2,
        TRACKFILTERING=3,
        MVA=4,
        FINAL=10
    };

Constructor & Destructor Documentation

reco::PreId::PreId ( unsigned  nselection = 1) [inline]

Definition at line 26 of file PreId.h.

References geomMatching_, matching_, and mva_.

                              :trackRef_(reco::TrackRef()),clusterRef_(reco::PFClusterRef()),
      matchingEop_(-999.),EcalPos_(math::XYZPoint()),
      meanShower_(math::XYZPoint()),gsfChi2_(-999.),
      dpt_(0.),chi2Ratio_(0.){
      matching_.resize(nselection,false);
      mva_.resize(nselection,-999.);
      geomMatching_.resize(5,-999.);
    }

Member Function Documentation

float reco::PreId::chi2Ratio ( ) const [inline]

Definition at line 100 of file PreId.h.

References chi2Ratio_.

{return chi2Ratio_;}
PFClusterRef reco::PreId::clusterRef ( ) const [inline]

Definition at line 112 of file PreId.h.

References clusterRef_.

Referenced by setECALMatchingProperties().

{return clusterRef_;}
float reco::PreId::dpt ( ) const [inline]

Definition at line 110 of file PreId.h.

References dpt_.

Referenced by setTrackProperties().

{return dpt_;}
bool reco::PreId::ecalMatching ( unsigned  n = 0) const [inline]

Definition at line 103 of file PreId.h.

References ECALMATCH, matching(), and n.

{return matching(ECALMATCH,n);}
const math::XYZPoint& reco::PreId::ecalPos ( ) const [inline]

Definition at line 97 of file PreId.h.

References EcalPos_.

{return EcalPos_;}
float reco::PreId::eopMatch ( ) const [inline]

Definition at line 91 of file PreId.h.

References matchingEop_.

{return matchingEop_;}
bool reco::PreId::esMatching ( unsigned  n = 0) const [inline]

Definition at line 104 of file PreId.h.

References ESMATCH, matching(), and n.

{return matching(ESMATCH,n);}
float reco::PreId::eta ( ) const [inline]

Definition at line 93 of file PreId.h.

References trackRef_.

{return trackRef_->eta();}
const std::vector<float>& reco::PreId::geomMatching ( ) const [inline]

Access methods.

Definition at line 90 of file PreId.h.

References geomMatching_.

{return geomMatching_;}
float reco::PreId::gsfChi2 ( ) const [inline]

Definition at line 101 of file PreId.h.

References gsfChi2_.

{return gsfChi2_;}
float reco::PreId::kfChi2 ( ) const [inline]

Definition at line 94 of file PreId.h.

References trackRef_.

{return trackRef_->normalizedChi2();}
float reco::PreId::kfNHits ( ) const [inline]

Definition at line 95 of file PreId.h.

References trackRef_.

{return trackRef_->found();}
bool reco::PreId::matching ( MatchingType  type,
unsigned  n = 0 
) const [inline]

Definition at line 80 of file PreId.h.

References matching_, and n.

Referenced by ecalMatching(), esMatching(), mvaSelected(), preIded(), and trackFiltered().

    {
      if(n<matching_.size())
        {
          return matching_[n] & (1 << type);
        }
      return false;
    }
const math::XYZPoint& reco::PreId::meanShower ( ) const [inline]

Definition at line 98 of file PreId.h.

References meanShower_.

Referenced by setECALMatchingProperties().

{return meanShower_;}
float PreId::mva ( unsigned  n = 0) const

Definition at line 25 of file PreId.cc.

References mva_.

{
  if(n<mva_.size())
    return mva_[n];
  return -999.;
}
bool reco::PreId::mvaSelected ( unsigned  n = 0) const [inline]

Definition at line 106 of file PreId.h.

References matching(), MVA, and n.

{return matching(MVA,n);}
bool reco::PreId::preIded ( unsigned  n = 0) const [inline]

Definition at line 107 of file PreId.h.

References FINAL, matching(), and n.

{return matching(FINAL,n);}
float reco::PreId::pt ( ) const [inline]

Definition at line 92 of file PreId.h.

References trackRef_.

Referenced by GoodSeedProducer::produce().

{return trackRef_->pt();}
void reco::PreId::setECALMatching ( bool  accepted,
unsigned  n = 0 
) [inline]

Definition at line 60 of file PreId.h.

References ECALMATCH, n, and setMatching().

Referenced by GoodSeedProducer::produce().

    {
      setMatching(ECALMATCH,accepted,n);
    }
void reco::PreId::setECALMatchingProperties ( PFClusterRef  clusterRef,
const math::XYZPoint ecalpos,
const math::XYZPoint meanShower,
float  deta,
float  dphi,
float  chieta,
float  chiphi,
float  chi2,
float  eop 
) [inline]

Definition at line 38 of file PreId.h.

References clusterRef(), clusterRef_, EcalPos_, geomMatching_, matchingEop_, meanShower(), and meanShower_.

Referenced by GoodSeedProducer::produce().

                                                                                                                                                                                                 {
      clusterRef_ = clusterRef;
      EcalPos_ = ecalpos;
      meanShower_ = meanShower;
      geomMatching_[0] = deta;
      geomMatching_[1] = dphi;
      geomMatching_[2] = chieta;
      geomMatching_[3] = chiphi;
      geomMatching_[4] = chi2;
      matchingEop_= eop;      
    }
void reco::PreId::setESMatching ( bool  accepted,
unsigned  n = 0 
) [inline]

Definition at line 64 of file PreId.h.

References ESMATCH, n, and setMatching().

Referenced by GoodSeedProducer::produce().

    {
      setMatching(ESMATCH,accepted,n);
    }
void reco::PreId::setFinalDecision ( bool  accepted,
unsigned  n = 0 
) [inline]

Definition at line 56 of file PreId.h.

References FINAL, n, and setMatching().

Referenced by GoodSeedProducer::produce().

    {
      setMatching(FINAL,accepted,n);
    }
void PreId::setMatching ( MatchingType  type,
bool  result,
unsigned  n = 0 
)

Definition at line 6 of file PreId.cc.

References gather_cfg::cout, matching_, and n.

Referenced by setECALMatching(), setESMatching(), setFinalDecision(), setMVA(), and setTrackFiltering().

{
  if(n<matching_.size())
    {
      if(result)
        {
          matching_[n] |= (1 << type);
        }
      else
        {
          matching_[n] &= ~(1 <<type);
        }
    }
  else
    {
      std::cout << " Out of range " << std::endl;
    }
}
void reco::PreId::setMVA ( bool  accepted,
float  mva,
unsigned  n = 0 
) [inline]

Definition at line 72 of file PreId.h.

References MVA, mva_, n, and setMatching().

Referenced by GoodSeedProducer::produce().

    {
      setMatching(MVA,accepted,n);      
      if(n<mva_.size())
        mva_[n]=mva;
    }
void reco::PreId::setTrack ( reco::TrackRef  trackref) [inline]

Definition at line 34 of file PreId.h.

References trackRef_.

Referenced by GoodSeedProducer::produce().

                                             {
      trackRef_ = trackref;
    }
void reco::PreId::setTrackFiltering ( bool  accepted,
unsigned  n = 0 
) [inline]

Definition at line 68 of file PreId.h.

References n, setMatching(), and TRACKFILTERING.

Referenced by GoodSeedProducer::produce().

    {
      setMatching(TRACKFILTERING,accepted,n);
    }
void reco::PreId::setTrackProperties ( float  newchi2,
float  chi2ratio,
float  dpt 
) [inline]

Definition at line 50 of file PreId.h.

References chi2Ratio_, dpt(), dpt_, and gsfChi2_.

Referenced by GoodSeedProducer::produce().

                                                                     {
      gsfChi2_=newchi2;
      chi2Ratio_ = chi2ratio;
      dpt_ = dpt;
    }
bool reco::PreId::trackFiltered ( unsigned  n = 0) const [inline]

Definition at line 105 of file PreId.h.

References matching(), n, and TRACKFILTERING.

reco::TrackRef reco::PreId::trackRef ( ) const [inline]

Definition at line 111 of file PreId.h.

References trackRef_.

{return trackRef_;}

Member Data Documentation

float reco::PreId::chi2Ratio_ [private]

Definition at line 126 of file PreId.h.

Referenced by chi2Ratio(), and setTrackProperties().

Definition at line 116 of file PreId.h.

Referenced by clusterRef(), and setECALMatchingProperties().

float reco::PreId::dpt_ [private]

Definition at line 125 of file PreId.h.

Referenced by dpt(), and setTrackProperties().

Definition at line 121 of file PreId.h.

Referenced by ecalPos(), and setECALMatchingProperties().

std::vector<float> reco::PreId::geomMatching_ [private]

Definition at line 119 of file PreId.h.

Referenced by geomMatching(), PreId(), and setECALMatchingProperties().

float reco::PreId::gsfChi2_ [private]

Definition at line 124 of file PreId.h.

Referenced by gsfChi2(), and setTrackProperties().

std::vector<int> reco::PreId::matching_ [private]

Definition at line 133 of file PreId.h.

Referenced by matching(), PreId(), and setMatching().

float reco::PreId::matchingEop_ [private]

Definition at line 120 of file PreId.h.

Referenced by eopMatch(), and setECALMatchingProperties().

Definition at line 122 of file PreId.h.

Referenced by meanShower(), and setECALMatchingProperties().

std::vector<float> reco::PreId::mva_ [private]

Definition at line 127 of file PreId.h.

Referenced by mva(), PreId(), and setMVA().

Definition at line 115 of file PreId.h.

Referenced by eta(), kfChi2(), kfNHits(), pt(), setTrack(), and trackRef().