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 <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 27 of file OniaPhotonConversionProducer.cc.

References reco::Conversion::tracks().

Referenced by OniaPhotonConversionProducer::removeDuplicates().

27  {
28  bool atLeastOneInCommon=false;
29  for(auto const& tk1 : c1.tracks()){
30  for(auto const& tk2 : c2.tracks()){
31  if(tk1==tk2){
32  atLeastOneInCommon=true;
33  break;
34  }
35  }
36  }
37  return atLeastOneInCommon;
38 }
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 22 of file OniaPhotonConversionProducer.cc.

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

Referenced by OniaPhotonConversionProducer::removeDuplicates().

22  {
23  return TMath::Prob(c1.conversionVertex().chi2(),c1.conversionVertex().ndof()) > TMath::Prob(c2.conversionVertex().chi2(),c2.conversionVertex().ndof());
24 }
const reco::Vertex & conversionVertex() const
returns the reco conversion vertex
Definition: Conversion.h:98
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 40 of file OniaPhotonConversionProducer.cc.

Referenced by OniaPhotonConversionProducer::checkTkVtxCompatibility().

40  {
41  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