CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Functions
MatchingUtils.h File Reference

Go to the source code of this file.

Functions

template<class C1 , class C2 >
bool matchByCommonParentSuperClusterRef (const C1 &c1, const C2 &c2)
 
template<class C1 , class C2 >
bool matchByCommonSourceCandidatePtr (const C1 &c1, const C2 &c2)
 

Function Documentation

◆ matchByCommonParentSuperClusterRef()

template<class C1 , class C2 >
bool matchByCommonParentSuperClusterRef ( const C1 &  c1,
const C2 &  c2 
)

Definition at line 21 of file MatchingUtils.h.

References alignmentValidation::c1.

Referenced by PATObjectCrossLinker::matchElectronToPhoton().

21  {
22  auto c1s = c1.parentSuperCluster();
23  auto c2s = c2.parentSuperCluster();
24  return (c1s == c2s);
25 }

◆ matchByCommonSourceCandidatePtr()

template<class C1 , class C2 >
bool matchByCommonSourceCandidatePtr ( const C1 &  c1,
const C2 &  c2 
)

Definition at line 9 of file MatchingUtils.h.

References alignmentValidation::c1, testProducerWithPsetDescEmpty_cfi::i1, and testProducerWithPsetDescEmpty_cfi::i2.

Referenced by PATObjectCrossLinker::matchOneToMany(), PATObjectCrossLinker::matchOneToVertices(), PATObjectCrossLinker::matchVertexToMany(), LeptonInJetProducer< T >::produce(), and LeptonJetVarProducer< T >::produce().

9  {
10  for (unsigned int i1 = 0; i1 < c1.numberOfSourceCandidatePtrs(); i1++) {
11  auto c1s = c1.sourceCandidatePtr(i1);
12  for (unsigned int i2 = 0; i2 < c2.numberOfSourceCandidatePtrs(); i2++) {
13  if (c2.sourceCandidatePtr(i2) == c1s)
14  return true;
15  }
16  }
17  return false;
18 }