CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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/StringCutObjectSelector.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 29 of file OniaPhotonConversionProducer.cc.

References reco::Conversion::tracks().

Referenced by OniaPhotonConversionProducer::removeDuplicates().

29  {
30  bool atLeastOneInCommon=false;
31  BOOST_FOREACH(const edm::RefToBase<reco::Track> tk1, c1.tracks()){
32  BOOST_FOREACH(const edm::RefToBase<reco::Track> tk2, c2.tracks()){
33  if(tk1==tk2){
34  atLeastOneInCommon=true;
35  break;
36  }
37  }
38  }
39  return atLeastOneInCommon;
40 }
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 24 of file OniaPhotonConversionProducer.cc.

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

Referenced by OniaPhotonConversionProducer::removeDuplicates().

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

Definition at line 42 of file OniaPhotonConversionProducer.cc.

Referenced by OniaPhotonConversionProducer::checkTkVtxCompatibility().

42  {
43  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