CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup > Class Template Reference

#include <CandCombiner.h>

Inheritance diagram for CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >:
CandCombinerBase< OutputCollection, Cloner::CandPtr >

Public Types

typedef CandCombinerBase< OutputCollection, CandPtrbase
 
typedef Cloner::CandPtr CandPtr
 
- Public Types inherited from CandCombinerBase< OutputCollection, Cloner::CandPtr >
typedef std::vector< std::string > vstring
 

Public Member Functions

 CandCombiner ()
 default constructor More...
 
 CandCombiner (const Selector &select)
 default constructor More...
 
 CandCombiner (const Selector &select, const PairSelector &selectPair)
 constructor from selector More...
 
 CandCombiner (const Selector &select, const PairSelector &selectPair, const Setup &setup)
 
 CandCombiner (const Selector &select, const PairSelector &selectPair, const Setup &setup, bool checkCharge, bool checkOverlap, const std::vector< int > &dauCharge)
 constructor from a selector, specifying optionally to check for charge More...
 
 CandCombiner (const Selector &select, const PairSelector &selectPair, const Setup &setup, const std::vector< int > &dauCharge)
 constructor from a selector, specifying to check for charge More...
 
 CandCombiner (const Selector &select, const PairSelector &selectPair, const Setup &setup, int q1, int q2)
 constructor from a selector and two charges More...
 
 CandCombiner (const Selector &select, const PairSelector &selectPair, const Setup &setup, int q1, int q2, int q3)
 constructor from a selector and three charges More...
 
 CandCombiner (const Selector &select, const PairSelector &selectPair, const Setup &setup, int q1, int q2, int q3, int q4)
 constructor from a selector and four charges More...
 
 CandCombiner (const Selector &select, const PairSelector &selectPair, const std::vector< int > &dauCharge)
 constructor from a selector, specifying to check for charge More...
 
 CandCombiner (const Selector &select, const PairSelector &selectPair, int q1, int q2)
 constructor from a selector and two charges More...
 
 CandCombiner (const Selector &select, const PairSelector &selectPair, int q1, int q2, int q3)
 constructor from a selector and three charges More...
 
 CandCombiner (const Selector &select, const PairSelector &selectPair, int q1, int q2, int q3, int q4)
 constructor from a selector and four charges More...
 
 CandCombiner (const Selector &select, int q1, int q2)
 constructor from a selector and two charges More...
 
 CandCombiner (const Selector &select, int q1, int q2, int q3)
 constructor from a selector and three charges More...
 
 CandCombiner (const Selector &select, int q1, int q2, int q3, int q4)
 constructor from a selector and four charges More...
 
 CandCombiner (const std::vector< int > &dauCharge)
 constructor from a selector, specifying to check for charge More...
 
 CandCombiner (int q1, int q2)
 constructor from a selector and two charges More...
 
 CandCombiner (int q1, int q2, int q3)
 constructor from a selector and three charges More...
 
 CandCombiner (int q1, int q2, int q3, int q4)
 constructor from a selector and four charges More...
 
Setup & setup ()
 return reference to setup object to allow its initialization More...
 
- Public Member Functions inherited from CandCombinerBase< OutputCollection, Cloner::CandPtr >
 CandCombinerBase (bool checkCharge, bool checkOverlap, const std::vector< int > &, const std::string="")
 constructor from a selector, specifying optionally to check for charge More...
 
 CandCombinerBase (const std::string="")
 default construct More...
 
 CandCombinerBase (int, int, const std::string="")
 construct from two charge values More...
 
 CandCombinerBase (int, int, int, const std::string="")
 construct from three charge values More...
 
 CandCombinerBase (int, int, int, int, const std::string="")
 construct from four charge values More...
 
std::unique_ptr< OutputCollection > combine (const edm::Handle< reco::CandidateView > &, const edm::Handle< reco::CandidateView > &, const edm::Handle< reco::CandidateView > &, const edm::Handle< reco::CandidateView > &, const vstring &=vstring()) const
 return all selected candidate pairs More...
 
std::unique_ptr< OutputCollection > combine (const edm::Handle< reco::CandidateView > &, const edm::Handle< reco::CandidateView > &, const edm::Handle< reco::CandidateView > &, const vstring &=vstring()) const
 return all selected candidate pairs More...
 
std::unique_ptr< OutputCollection > combine (const edm::Handle< reco::CandidateView > &, const edm::Handle< reco::CandidateView > &, const vstring &=vstring()) const
 return all selected candidate pairs More...
 
std::unique_ptr< OutputCollection > combine (const edm::Handle< reco::CandidateView > &, const vstring &=vstring()) const
 return all selected candidate pairs More...
 
std::unique_ptr< OutputCollection > combine (const std::vector< edm::Handle< reco::CandidateView > > &, const vstring &=vstring()) const
 return all selected candidate pairs More...
 
virtual ~CandCombinerBase ()
 destructor More...
 

Private Member Functions

void addDaughter (typename OutputCollection::value_type &cmp, const CandPtr &c, const std::string name="") const override
 add candidate daughter More...
 
bool select (const reco::Candidate &c) const override
 select a candidate More...
 
bool selectPair (const reco::Candidate &c1, const reco::Candidate &c2) const override
 select a candidate More...
 
void setup (typename OutputCollection::value_type &c) const override
 set kinematics to reconstructed composite More...
 

Private Attributes

Selector select_
 candidate selector More...
 
PairSelector selectPair_
 candidate pair selector More...
 
Setup setup_
 utility to setup composite candidate kinematics from daughters More...
 

Detailed Description

template<typename Selector, typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
class CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >

performs all possible and selected combinations of particle pairs using the CandCombiner utility

Author
Luca Lista, INFN
Version
Revision
1.2
Id
CandCombiner.h,v 1.2 2009/04/22 17:51:05 kaulmer Exp
Author
Luca Lista, INFN

Definition at line 49 of file CandCombiner.h.

Member Typedef Documentation

◆ base

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
typedef CandCombinerBase<OutputCollection, CandPtr> CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::base

Definition at line 52 of file CandCombiner.h.

◆ CandPtr

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
typedef Cloner::CandPtr CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::CandPtr

Definition at line 51 of file CandCombiner.h.

Constructor & Destructor Documentation

◆ CandCombiner() [1/20]

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::CandCombiner ( )
inline

default constructor

Definition at line 54 of file CandCombiner.h.

54 : base(), select_(), selectPair_(), setup_() {}

◆ CandCombiner() [2/20]

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::CandCombiner ( int  q1,
int  q2 
)
inline

constructor from a selector and two charges

Definition at line 56 of file CandCombiner.h.

56 : base(q1, q2), select_(), selectPair_(), setup_() {}

◆ CandCombiner() [3/20]

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::CandCombiner ( int  q1,
int  q2,
int  q3 
)
inline

constructor from a selector and three charges

Definition at line 58 of file CandCombiner.h.

58 : base(q1, q2, q3), select_(), selectPair_(), setup_() {}

◆ CandCombiner() [4/20]

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::CandCombiner ( int  q1,
int  q2,
int  q3,
int  q4 
)
inline

constructor from a selector and four charges

Definition at line 60 of file CandCombiner.h.

60 : base(q1, q2, q3, q4), select_(), selectPair_(), setup_() {}

◆ CandCombiner() [5/20]

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::CandCombiner ( const Selector select)
inline

default constructor

Definition at line 62 of file CandCombiner.h.

62 : base(), select_(select), selectPair_(), setup_() {}

◆ CandCombiner() [6/20]

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::CandCombiner ( const Selector select,
int  q1,
int  q2 
)
inline

constructor from a selector and two charges

Definition at line 64 of file CandCombiner.h.

64 : base(q1, q2), select_(select), selectPair_(), setup_() {}

◆ CandCombiner() [7/20]

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::CandCombiner ( const Selector select,
int  q1,
int  q2,
int  q3 
)
inline

constructor from a selector and three charges

Definition at line 66 of file CandCombiner.h.

67  : base(q1, q2, q3), select_(select), selectPair_(), setup_() {}

◆ CandCombiner() [8/20]

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::CandCombiner ( const Selector select,
int  q1,
int  q2,
int  q3,
int  q4 
)
inline

constructor from a selector and four charges

Definition at line 69 of file CandCombiner.h.

70  : base(q1, q2, q3, q4), select_(select), selectPair_(), setup_() {}

◆ CandCombiner() [9/20]

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::CandCombiner ( const Selector select,
const PairSelector selectPair 
)
inline

constructor from selector

Definition at line 72 of file CandCombiner.h.

◆ CandCombiner() [10/20]

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::CandCombiner ( const Selector select,
const PairSelector selectPair,
int  q1,
int  q2 
)
inline

constructor from a selector and two charges

Definition at line 75 of file CandCombiner.h.

◆ CandCombiner() [11/20]

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::CandCombiner ( const Selector select,
const PairSelector selectPair,
int  q1,
int  q2,
int  q3 
)
inline

constructor from a selector and three charges

Definition at line 78 of file CandCombiner.h.

◆ CandCombiner() [12/20]

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::CandCombiner ( const Selector select,
const PairSelector selectPair,
int  q1,
int  q2,
int  q3,
int  q4 
)
inline

constructor from a selector and four charges

Definition at line 81 of file CandCombiner.h.

82  : base(q1, q2, q3, q4), select_(select), selectPair_(selectPair), setup_() {}

◆ CandCombiner() [13/20]

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::CandCombiner ( const Selector select,
const PairSelector selectPair,
const Setup &  setup 
)
inline

Definition at line 83 of file CandCombiner.h.

◆ CandCombiner() [14/20]

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::CandCombiner ( const Selector select,
const PairSelector selectPair,
const Setup &  setup,
int  q1,
int  q2 
)
inline

constructor from a selector and two charges

Definition at line 86 of file CandCombiner.h.

◆ CandCombiner() [15/20]

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::CandCombiner ( const Selector select,
const PairSelector selectPair,
const Setup &  setup,
int  q1,
int  q2,
int  q3 
)
inline

constructor from a selector and three charges

Definition at line 89 of file CandCombiner.h.

◆ CandCombiner() [16/20]

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::CandCombiner ( const Selector select,
const PairSelector selectPair,
const Setup &  setup,
int  q1,
int  q2,
int  q3,
int  q4 
)
inline

constructor from a selector and four charges

Definition at line 92 of file CandCombiner.h.

◆ CandCombiner() [17/20]

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::CandCombiner ( const Selector select,
const PairSelector selectPair,
const Setup &  setup,
const std::vector< int > &  dauCharge 
)
inline

constructor from a selector, specifying to check for charge

Definition at line 96 of file CandCombiner.h.

100  : base(true, dauCharge), select_(select), selectPair_(selectPair), setup_(setup) {}

◆ CandCombiner() [18/20]

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::CandCombiner ( const Selector select,
const PairSelector selectPair,
const std::vector< int > &  dauCharge 
)
inline

constructor from a selector, specifying to check for charge

Definition at line 102 of file CandCombiner.h.

103  : base(true, dauCharge), select_(select), selectPair_(selectPair), setup_() {}

◆ CandCombiner() [19/20]

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::CandCombiner ( const std::vector< int > &  dauCharge)
inline

constructor from a selector, specifying to check for charge

Definition at line 105 of file CandCombiner.h.

105 : base(true, dauCharge), select_(), selectPair_(), setup_() {}

◆ CandCombiner() [20/20]

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::CandCombiner ( const Selector select,
const PairSelector selectPair,
const Setup &  setup,
bool  checkCharge,
bool  checkOverlap,
const std::vector< int > &  dauCharge 
)
inline

constructor from a selector, specifying optionally to check for charge

Definition at line 107 of file CandCombiner.h.

Member Function Documentation

◆ addDaughter()

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
void CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::addDaughter ( typename OutputCollection::value_type &  cmp,
const CandPtr c,
const std::string  name = "" 
) const
inlineoverrideprivatevirtual

add candidate daughter

Implements CandCombinerBase< OutputCollection, Cloner::CandPtr >.

Definition at line 125 of file CandCombiner.h.

127  {
128  Cloner::addDaughter(cmp, c, name);
129  }

References c, fileCollector::cmp, and Skims_PA_cff::name.

◆ select()

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
bool CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::select ( const reco::Candidate c) const
inlineoverrideprivatevirtual

◆ selectPair()

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
bool CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::selectPair ( const reco::Candidate c1,
const reco::Candidate c2 
) const
inlineoverrideprivatevirtual

◆ setup() [1/2]

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
Setup& CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::setup ( )
inline

return reference to setup object to allow its initialization

Definition at line 115 of file CandCombiner.h.

115 { return setup_; }

References CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::setup_.

Referenced by o2olib.O2OTool::execute().

◆ setup() [2/2]

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
void CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::setup ( typename OutputCollection::value_type &  c) const
inlineoverrideprivatevirtual

set kinematics to reconstructed composite

Implements CandCombinerBase< OutputCollection, Cloner::CandPtr >.

Definition at line 123 of file CandCombiner.h.

123 { setup_.set(c); }

References c, and CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::setup_.

Referenced by o2olib.O2OTool::execute().

Member Data Documentation

◆ select_

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
Selector CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::select_
private

candidate selector

Definition at line 131 of file CandCombiner.h.

Referenced by CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::select().

◆ selectPair_

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
PairSelector CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::selectPair_
private

candidate pair selector

Definition at line 133 of file CandCombiner.h.

Referenced by CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::selectPair().

◆ setup_

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta>
Setup CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::setup_
private

utility to setup composite candidate kinematics from daughters

Definition at line 135 of file CandCombiner.h.

Referenced by CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >::setup(), and upgradeWorkflowComponents.UpgradeWorkflow::setup().

PA_ZEESkim_cff.checkCharge
checkCharge
Definition: PA_ZEESkim_cff.py:27
CandCombiner::select
bool select(const reco::Candidate &c) const override
select a candidate
Definition: CandCombiner.h:119
CandCombiner::setup
Setup & setup()
return reference to setup object to allow its initialization
Definition: CandCombiner.h:115
CandCombiner::selectPair
bool selectPair(const reco::Candidate &c1, const reco::Candidate &c2) const override
select a candidate
Definition: CandCombiner.h:121
q2
double q2[4]
Definition: TauolaWrapper.h:88
CandCombiner::select_
Selector select_
candidate selector
Definition: CandCombiner.h:131
q1
double q1[4]
Definition: TauolaWrapper.h:87
g4TestGeometry_cfi.checkOverlap
def checkOverlap(process)
Definition: g4TestGeometry_cfi.py:3
alignmentValidation.c1
c1
do drawing
Definition: alignmentValidation.py:1025
CandCombiner::base
CandCombinerBase< OutputCollection, CandPtr > base
Definition: CandCombiner.h:52
CandCombiner::selectPair_
PairSelector selectPair_
candidate pair selector
Definition: CandCombiner.h:133
fileCollector.cmp
cmp
Definition: fileCollector.py:125
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
CandCombiner::setup_
Setup setup_
utility to setup composite candidate kinematics from daughters
Definition: CandCombiner.h:135