CMS 3D CMS Logo

NamedCandCombiner< Selector, PairSelector, Cloner, Setup > Class Template Reference

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

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

Inheritance diagram for NamedCandCombiner< Selector, PairSelector, Cloner, Setup >:

NamedCandCombinerBase

List of all members.

Public Member Functions

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

Private Member Functions

virtual void addDaughter (reco::NamedCompositeCandidate &cmp, const reco::CandidatePtr &c, std::string n) 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 (reco::NamedCompositeCandidate &c) const
 set kinematics to reconstructed composite

Private Attributes

std::string name_
 name
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 Setup = AddFourMomenta>
class NamedCandCombiner< Selector, PairSelector, Cloner, Setup >

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

Author:
Luca Lista, INFN

Luca Lista, INFN

Version:
Revision
1.2

Id
NamedCandCombiner.h,v 1.2 2008/05/09 20:11:50 srappocc Exp

Definition at line 41 of file NamedCandCombiner.h.


Constructor & Destructor Documentation

template<typename Selector, typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename Setup = AddFourMomenta>
NamedCandCombiner< Selector, PairSelector, Cloner, Setup >::NamedCandCombiner ( std::string  name  )  [inline]

default constructor

Definition at line 44 of file NamedCandCombiner.h.

00044                                     :
00045     NamedCandCombinerBase(name), 
00046     select_(), selectPair_(), setup_(), name_(name) { }

template<typename Selector, typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename Setup = AddFourMomenta>
NamedCandCombiner< Selector, PairSelector, Cloner, Setup >::NamedCandCombiner ( std::string  name,
int  q1,
int  q2 
) [inline]

constructor from a selector and two charges

Definition at line 48 of file NamedCandCombiner.h.

00048                                                     :
00049     NamedCandCombinerBase(name, q1, q2), 
00050     select_(), selectPair_(), setup_(), name_(name) { }

template<typename Selector, typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename Setup = AddFourMomenta>
NamedCandCombiner< Selector, PairSelector, Cloner, Setup >::NamedCandCombiner ( std::string  name,
int  q1,
int  q2,
int  q3 
) [inline]

constructor from a selector and three charges

Definition at line 52 of file NamedCandCombiner.h.

00052                                                               :
00053     NamedCandCombinerBase(name, q1, q2, q3), 
00054     select_(), selectPair_(), setup_(), name_(name) { }

template<typename Selector, typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename Setup = AddFourMomenta>
NamedCandCombiner< Selector, PairSelector, Cloner, Setup >::NamedCandCombiner ( std::string  name,
int  q1,
int  q2,
int  q3,
int  q4 
) [inline]

constructor from a selector and four charges

Definition at line 56 of file NamedCandCombiner.h.

00056                                                                     :
00057     NamedCandCombinerBase(name, q1, q2, q3, q4), 
00058     select_(), selectPair_(), setup_(), name_(name) { }

template<typename Selector, typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename Setup = AddFourMomenta>
NamedCandCombiner< Selector, PairSelector, Cloner, Setup >::NamedCandCombiner ( std::string  name,
const Selector &  select 
) [inline]

default constructor

Definition at line 60 of file NamedCandCombiner.h.

00060                                                              :
00061     NamedCandCombinerBase(name), 
00062     select_(select), selectPair_(), setup_(), name_(name) { }

template<typename Selector, typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename Setup = AddFourMomenta>
NamedCandCombiner< Selector, PairSelector, Cloner, Setup >::NamedCandCombiner ( std::string  name,
const Selector &  select,
int  q1,
int  q2 
) [inline]

constructor from a selector and two charges

Definition at line 64 of file NamedCandCombiner.h.

00064                                                                               :
00065     NamedCandCombinerBase(name, q1, q2), 
00066     select_(select), selectPair_(), setup_(), name_(name) { }

template<typename Selector, typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename Setup = AddFourMomenta>
NamedCandCombiner< Selector, PairSelector, Cloner, Setup >::NamedCandCombiner ( std::string  name,
const Selector &  select,
int  q1,
int  q2,
int  q3 
) [inline]

constructor from a selector and three charges

Definition at line 68 of file NamedCandCombiner.h.

00068                                                                                        :
00069     NamedCandCombinerBase(name, q1, q2, q3), 
00070     select_(select), selectPair_(), setup_(), name_(name) { }

template<typename Selector, typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename Setup = AddFourMomenta>
NamedCandCombiner< Selector, PairSelector, Cloner, Setup >::NamedCandCombiner ( std::string  name,
const Selector &  select,
int  q1,
int  q2,
int  q3,
int  q4 
) [inline]

constructor from a selector and four charges

Definition at line 72 of file NamedCandCombiner.h.

00072                                                                                                :
00073     NamedCandCombinerBase(name, q1, q2, q3, q4), 
00074     select_(select), selectPair_(), setup_(), name_(name) { }

template<typename Selector, typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename Setup = AddFourMomenta>
NamedCandCombiner< Selector, PairSelector, Cloner, Setup >::NamedCandCombiner ( std::string  name,
const Selector &  select,
const PairSelector selectPair 
) [inline]

constructor from selector

Definition at line 76 of file NamedCandCombiner.h.

00076                                                                                               :
00077     NamedCandCombinerBase(name), 
00078     select_(select), selectPair_(selectPair), setup_(), name_(name) { }

template<typename Selector, typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename Setup = AddFourMomenta>
NamedCandCombiner< Selector, PairSelector, Cloner, Setup >::NamedCandCombiner ( std::string  name,
const Selector &  select,
const PairSelector selectPair,
int  q1,
int  q2 
) [inline]

constructor from a selector and two charges

Definition at line 80 of file NamedCandCombiner.h.

00080                                                                                                               :
00081     NamedCandCombinerBase(name, q1, q2), 
00082     select_(select), selectPair_(selectPair), setup_(), name_(name) { }

template<typename Selector, typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename Setup = AddFourMomenta>
NamedCandCombiner< Selector, PairSelector, Cloner, Setup >::NamedCandCombiner ( std::string  name,
const Selector &  select,
const PairSelector selectPair,
int  q1,
int  q2,
int  q3 
) [inline]

constructor from a selector and three charges

Definition at line 84 of file NamedCandCombiner.h.

00084                                                                                                                       :
00085     NamedCandCombinerBase(name, q1, q2, q3), 
00086     select_(select), selectPair_(selectPair), setup_(), name_(name) { }

template<typename Selector, typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename Setup = AddFourMomenta>
NamedCandCombiner< Selector, PairSelector, Cloner, Setup >::NamedCandCombiner ( std::string  name,
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 88 of file NamedCandCombiner.h.

00088                                                                                                                               :
00089    NamedCandCombinerBase(name, q1, q2, q3, q4), 
00090     select_(select), selectPair_(selectPair), setup_(), name_(name) { }

template<typename Selector, typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename Setup = AddFourMomenta>
NamedCandCombiner< Selector, PairSelector, Cloner, Setup >::NamedCandCombiner ( std::string  name,
const Selector &  select,
const PairSelector selectPair,
const Setup &  setup 
) [inline]

Definition at line 91 of file NamedCandCombiner.h.

00091                                                                                                                    :
00092     NamedCandCombinerBase(name), 
00093     select_(select), selectPair_(selectPair), setup_(setup), name_(name) { }

template<typename Selector, typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename Setup = AddFourMomenta>
NamedCandCombiner< Selector, PairSelector, Cloner, Setup >::NamedCandCombiner ( std::string  name,
const Selector &  select,
const PairSelector selectPair,
const Setup &  setup,
int  q1,
int  q2 
) [inline]

constructor from a selector and two charges

Definition at line 95 of file NamedCandCombiner.h.

00095                                                                                                                                    :
00096     NamedCandCombinerBase(name, q1, q2), 
00097     select_(select), selectPair_(selectPair), setup_(setup), name_(name) { }

template<typename Selector, typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename Setup = AddFourMomenta>
NamedCandCombiner< Selector, PairSelector, Cloner, Setup >::NamedCandCombiner ( std::string  name,
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 99 of file NamedCandCombiner.h.

00099                                                                                                                                            :
00100     NamedCandCombinerBase(name, q1, q2, q3), 
00101     select_(select), selectPair_(selectPair), setup_(setup), name_(name) { }

template<typename Selector, typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename Setup = AddFourMomenta>
NamedCandCombiner< Selector, PairSelector, Cloner, Setup >::NamedCandCombiner ( std::string  name,
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 103 of file NamedCandCombiner.h.

00103                                                                                                                                                    :
00104     NamedCandCombinerBase(name, q1, q2, q3, q4), 
00105     select_(select), selectPair_(selectPair), setup_(setup), name_(name) { }

template<typename Selector, typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename Setup = AddFourMomenta>
NamedCandCombiner< Selector, PairSelector, Cloner, Setup >::NamedCandCombiner ( std::string  name,
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 107 of file NamedCandCombiner.h.

00107                                                                                                                                                      : 
00108     NamedCandCombinerBase(name, true, dauCharge), select_(select), selectPair_(selectPair), setup_(setup), name_(name) { }

template<typename Selector, typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename Setup = AddFourMomenta>
NamedCandCombiner< Selector, PairSelector, Cloner, Setup >::NamedCandCombiner ( std::string  name,
const Selector &  select,
const PairSelector selectPair,
const std::vector< int > &  dauCharge 
) [inline]

constructor from a selector, specifying to check for charge

Definition at line 110 of file NamedCandCombiner.h.

00110                                                                                                                                    : 
00111     NamedCandCombinerBase(name, true, dauCharge), select_(select), selectPair_(selectPair), setup_(), name_(name) { }

template<typename Selector, typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename Setup = AddFourMomenta>
NamedCandCombiner< Selector, PairSelector, Cloner, Setup >::NamedCandCombiner ( std::string  name,
const std::vector< int > &  dauCharge 
) [inline]

constructor from a selector, specifying to check for charge

Definition at line 113 of file NamedCandCombiner.h.

00113                                                                        : 
00114     NamedCandCombinerBase(name, true, dauCharge), select_(), selectPair_(), setup_(), name_(name) { }

template<typename Selector, typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename Setup = AddFourMomenta>
NamedCandCombiner< Selector, PairSelector, Cloner, Setup >::NamedCandCombiner ( std::string  name,
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 116 of file NamedCandCombiner.h.

00117                                                                     : 
00118     NamedCandCombinerBase(name, checkCharge, dauCharge), 
00119     select_(select), selectPair_(selectPair), setup_(setup), name_(name) { }


Member Function Documentation

template<typename Selector, typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename Setup = AddFourMomenta>
virtual void NamedCandCombiner< Selector, PairSelector, Cloner, Setup >::addDaughter ( reco::NamedCompositeCandidate cmp,
const reco::CandidatePtr c,
std::string  n 
) const [inline, private, virtual]

add candidate daughter

Implements NamedCandCombinerBase.

Definition at line 137 of file NamedCandCombiner.h.

00137                                                                                                              {
00138     Cloner::addDaughter(cmp, c, n);
00139   }

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

select a candidate

Implements NamedCandCombinerBase.

Definition at line 125 of file NamedCandCombiner.h.

References NamedCandCombiner< Selector, PairSelector, Cloner, Setup >::select_.

00125                                                      {
00126     return select_(c);
00127   } 

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

select a candidate

Implements NamedCandCombinerBase.

Definition at line 129 of file NamedCandCombiner.h.

References NamedCandCombiner< Selector, PairSelector, Cloner, Setup >::selectPair_.

00129                                                                                     {
00130     return selectPair_(c1, c2);
00131   } 

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

set kinematics to reconstructed composite

Implements NamedCandCombinerBase.

Definition at line 133 of file NamedCandCombiner.h.

References NamedCandCombiner< Selector, PairSelector, Cloner, Setup >::setup_.

00133                                                             {
00134     setup_.set(c);
00135   }

template<typename Selector, typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename Setup = AddFourMomenta>
Setup& NamedCandCombiner< Selector, PairSelector, Cloner, Setup >::setup ( void   )  [inline]

return reference to setup object to allow its initialization

Definition at line 121 of file NamedCandCombiner.h.

References NamedCandCombiner< Selector, PairSelector, Cloner, Setup >::setup_.

00121 { return setup_; }


Member Data Documentation

template<typename Selector, typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename Setup = AddFourMomenta>
std::string NamedCandCombiner< Selector, PairSelector, Cloner, Setup >::name_ [private]

name

Reimplemented from NamedCandCombinerBase.

Definition at line 147 of file NamedCandCombiner.h.

template<typename Selector, typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename Setup = AddFourMomenta>
Selector NamedCandCombiner< Selector, PairSelector, Cloner, Setup >::select_ [private]

candidate selector

Definition at line 141 of file NamedCandCombiner.h.

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

template<typename Selector, typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename Setup = AddFourMomenta>
PairSelector NamedCandCombiner< Selector, PairSelector, Cloner, Setup >::selectPair_ [private]

candidate pair selector

Definition at line 143 of file NamedCandCombiner.h.

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

template<typename Selector, typename PairSelector = AnyPairSelector, typename Cloner = combiner::helpers::NormalClone, typename Setup = AddFourMomenta>
Setup NamedCandCombiner< Selector, PairSelector, Cloner, Setup >::setup_ [private]

utility to setup composite candidate kinematics from daughters

Definition at line 145 of file NamedCandCombiner.h.

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


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