CMS 3D CMS Logo

CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup > Class Template Reference

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

#include <PhysicsTools/CandUtils/interface/CandCombiner.h>

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

CandCombinerBase< OutputCollection, CandPtr >

List of all members.

Public Types

typedef CandCombinerBase
< OutputCollection, CandPtr
base
typedef Cloner::CandPtr CandPtr

Public Member Functions

 CandCombiner (const Selector &select, const PairSelector &selectPair, const Setup &setup, bool checkCharge, const std::vector< int > &dauCharge)
 constructor from a selector, specifying optionally to check for charge
 CandCombiner (const std::vector< int > &dauCharge)
 constructor from a selector, specifying to check for charge
 CandCombiner (const Selector &select, const PairSelector &selectPair, const std::vector< int > &dauCharge)
 constructor from a selector, specifying to check for charge
 CandCombiner (const Selector &select, const PairSelector &selectPair, const Setup &setup, const std::vector< int > &dauCharge)
 constructor from a selector, specifying to check for charge
 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
 CandCombiner (const Selector &select, const PairSelector &selectPair, const Setup &setup, int q1, int q2, int q3)
 constructor from a selector and three charges
 CandCombiner (const Selector &select, const PairSelector &selectPair, const Setup &setup, int q1, int q2)
 constructor from a selector and two charges
 CandCombiner (const Selector &select, const PairSelector &selectPair, const Setup &setup)
 CandCombiner (const Selector &select, const PairSelector &selectPair, int q1, int q2, int q3, int q4)
 constructor from a selector and four charges
 CandCombiner (const Selector &select, const PairSelector &selectPair, int q1, int q2, int q3)
 constructor from a selector and three charges
 CandCombiner (const Selector &select, const PairSelector &selectPair, int q1, int q2)
 constructor from a selector and two charges
 CandCombiner (const Selector &select, const PairSelector &selectPair)
 constructor from selector
 CandCombiner (const Selector &select, int q1, int q2, int q3, int q4)
 constructor from a selector and four charges
 CandCombiner (const Selector &select, int q1, int q2, int q3)
 constructor from a selector and three charges
 CandCombiner (const Selector &select, int q1, int q2)
 constructor from a selector and two charges
 CandCombiner (const Selector &select)
 default constructor
 CandCombiner (int q1, int q2, int q3, int q4)
 constructor from a selector and four charges
 CandCombiner (int q1, int q2, int q3)
 constructor from a selector and three charges
 CandCombiner (int q1, int q2)
 constructor from a selector and two charges
 CandCombiner ()
 default constructor
Setup & setup ()
 return reference to setup object to allow its initialization

Private Member Functions

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

Private Attributes

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


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

Luca Lista, INFN

Version:
Revision
1.26

Id
CandCombiner.h,v 1.26 2008/06/20 16:18:28 srappocc Exp

Definition at line 53 of file CandCombiner.h.


Member Typedef Documentation

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 56 of file CandCombiner.h.

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 55 of file CandCombiner.h.


Constructor & Destructor Documentation

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 58 of file CandCombiner.h.

00058                  :
00059   base(), 
00060     select_(), selectPair_(), setup_() { }

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 62 of file CandCombiner.h.

00062                                :
00063     base(q1, q2), 
00064     select_(), selectPair_(), setup_() { }

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 66 of file CandCombiner.h.

00066                                          :
00067     base(q1, q2, q3), 
00068     select_(), selectPair_(), setup_() { }

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 70 of file CandCombiner.h.

00070                                                :
00071     base(q1, q2, q3, q4), 
00072     select_(), selectPair_(), setup_() { }

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 74 of file CandCombiner.h.

00074                                         :
00075     base( ), 
00076     select_(select), selectPair_(), setup_() { }

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 78 of file CandCombiner.h.

00078                                                           :
00079     base(q1, q2), 
00080     select_(select), selectPair_(), setup_() { }

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 82 of file CandCombiner.h.

00082                                                                   :
00083     base(q1, q2, q3), 
00084     select_(select), selectPair_(), setup_() { }

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 86 of file CandCombiner.h.

00086                                                                           :
00087     base(q1, q2, q3, q4), 
00088     select_(select), selectPair_(), setup_() { }

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 90 of file CandCombiner.h.

00090                                                                          :
00091     base( ), 
00092     select_(select), selectPair_(selectPair), setup_() { }

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 94 of file CandCombiner.h.

00094                                                                                          :
00095     base(q1, q2), 
00096     select_(select), selectPair_(selectPair), setup_() { }

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 98 of file CandCombiner.h.

00098                                                                                                  :
00099     base(q1, q2, q3), 
00100     select_(select), selectPair_(selectPair), setup_() { }

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 102 of file CandCombiner.h.

00102                                                                                                          :
00103     base(q1, q2, q3, q4), 
00104     select_(select), selectPair_(selectPair), setup_() { }
  CandCombiner(const Selector & select, const PairSelector & selectPair, const Setup & setup) :

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 105 of file CandCombiner.h.

00105                                                                                               :
00106     base(), 
00107     select_(select), selectPair_(selectPair), setup_(setup) { }

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 109 of file CandCombiner.h.

00109                                                                                                               :
00110     base(q1, q2), 
00111     select_(select), selectPair_(selectPair), setup_(setup) { }

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 113 of file CandCombiner.h.

00113                                                                                                                       :
00114     base(q1, q2, q3), 
00115     select_(select), selectPair_(selectPair), setup_(setup) { }

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 117 of file CandCombiner.h.

00117                                                                                                                               :
00118     base(q1, q2, q3, q4), 
00119     select_(select), selectPair_(selectPair), setup_(setup) { }

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 121 of file CandCombiner.h.

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

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 124 of file CandCombiner.h.

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

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 127 of file CandCombiner.h.

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

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,
const std::vector< int > &  dauCharge 
) [inline]

constructor from a selector, specifying optionally to check for charge

Definition at line 130 of file CandCombiner.h.

00131                                                                     : 
00132     base(checkCharge, dauCharge), 
00133     select_(select), selectPair_(selectPair), setup_(setup) { }


Member Function Documentation

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

add candidate daughter

Definition at line 151 of file CandCombiner.h.

References name.

00151                                                                                                                           {
00152     Cloner::addDaughter(cmp, c, name);
00153   }

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

select a candidate

Implements CandCombinerBase< OutputCollection, CandPtr >.

Definition at line 139 of file CandCombiner.h.

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

00139                                                      {
00140     return select_(c);
00141   } 

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

select a candidate

Implements CandCombinerBase< OutputCollection, CandPtr >.

Definition at line 143 of file CandCombiner.h.

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

00143                                                                                     {
00144     return selectPair_(c1, c2);
00145   } 

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

set kinematics to reconstructed composite

Implements CandCombinerBase< OutputCollection, CandPtr >.

Definition at line 147 of file CandCombiner.h.

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

00147                                                                     {
00148     setup_.set(c);
00149   }

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 ( void   )  [inline]

return reference to setup object to allow its initialization

Definition at line 135 of file CandCombiner.h.

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

00135 { return setup_; }


Member Data Documentation

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 155 of file CandCombiner.h.

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

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 157 of file CandCombiner.h.

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

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 159 of file CandCombiner.h.

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


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:16:03 2009 for CMSSW by  doxygen 1.5.4