CMS 3D CMS Logo

Namespaces | Functions
OniaPhotonConversionProducer.cc File Reference
#include "HeavyFlavorAnalysis/Onia2MuMu/interface/OniaPhotonConversionProducer.h"
#include "DataFormats/EgammaCandidates/interface/Conversion.h"
#include "DataFormats/PatCandidates/interface/CompositeCandidate.h"
#include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h"
#include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h"
#include "DataFormats/TrackReco/interface/Track.h"
#include "DataFormats/TrackReco/interface/TrackBase.h"
#include "CommonTools/Utils/interface/StringToEnumValue.h"
#include "CommonTools/Statistics/interface/ChiSquaredProbability.h"
#include "RecoVertex/VertexTools/interface/VertexDistanceXY.h"
#include "DataFormats/VertexReco/interface/VertexFwd.h"
#include <TMath.h>
#include <boost/foreach.hpp>
#include <vector>

Go to the source code of this file.

Namespaces

 reco
 fixed size matrix
 

Functions

bool ConversionEqualByTrack (const reco::Conversion &c1, const reco::Conversion &c2)
 
bool ConversionLessByChi2 (const reco::Conversion &c1, const reco::Conversion &c2)
 
bool lt_ (std::pair< double, short > a, std::pair< double, short > b)
 
bool reco::operator== (const reco::Conversion &c1, const reco::Conversion &c2)
 
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker< edm::ParameterSetDescriptionFiller< OniaPhotonConversionProducer > > s_filler__LINE__ ("OniaPhotonConversionProducer")
 
static const edm::MakerPluginFactory::PMaker< edm::WorkerMaker< OniaPhotonConversionProducer > > s_maker__LINE__ ("OniaPhotonConversionProducer")
 

Function Documentation

bool ConversionEqualByTrack ( const reco::Conversion c1,
const reco::Conversion c2 
)

Definition at line 28 of file OniaPhotonConversionProducer.cc.

References reco::Conversion::tracks().

Referenced by OniaPhotonConversionProducer::removeDuplicates().

28  {
29  bool atLeastOneInCommon=false;
30  BOOST_FOREACH(const edm::RefToBase<reco::Track> tk1, c1.tracks()){
31  BOOST_FOREACH(const edm::RefToBase<reco::Track> tk2, c2.tracks()){
32  if(tk1==tk2){
33  atLeastOneInCommon=true;
34  break;
35  }
36  }
37  }
38  return atLeastOneInCommon;
39 }
std::vector< edm::RefToBase< reco::Track > > const & tracks() const
vector of track to base references
Definition: Conversion.cc:176
bool ConversionLessByChi2 ( const reco::Conversion c1,
const reco::Conversion c2 
)

Definition at line 23 of file OniaPhotonConversionProducer.cc.

References reco::Vertex::chi2(), reco::Conversion::conversionVertex(), and reco::Vertex::ndof().

Referenced by OniaPhotonConversionProducer::removeDuplicates().

23  {
24  return TMath::Prob(c1.conversionVertex().chi2(),c1.conversionVertex().ndof()) > TMath::Prob(c2.conversionVertex().chi2(),c2.conversionVertex().ndof());
25 }
const reco::Vertex & conversionVertex() const
returns the reco conversion vertex
Definition: Conversion.h:97
double chi2() const
chi-squares
Definition: Vertex.h:98
double ndof() const
Definition: Vertex.h:105
bool lt_ ( std::pair< double, short >  a,
std::pair< double, short >  b 
)

Definition at line 41 of file OniaPhotonConversionProducer.cc.

Referenced by OniaPhotonConversionProducer::checkTkVtxCompatibility().

41  {
42  return a.first < b.first; }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller< OniaPhotonConversionProducer > > s_filler__LINE__ ( "OniaPhotonConversionProducer"  )
static
static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< OniaPhotonConversionProducer > > s_maker__LINE__ ( "OniaPhotonConversionProducer"  )
static