CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes
CandCombinerBase< OutputCollection, CandPtr > Class Template Referenceabstract

#include <CandCombinerBase.h>

Public Types

typedef std::vector< std::string > vstring
 
typedef std::vector< std::string > vstring
 

Public Member Functions

 CandCombinerBase (const std::string="")
 default construct More...
 
 CandCombinerBase (const std::string="")
 default construct More...
 
 CandCombinerBase (int, int, const std::string="")
 construct from two charge values 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, const std::string="")
 construct from three charge values More...
 
 CandCombinerBase (int, int, int, int, const std::string="")
 construct from four charge values More...
 
 CandCombinerBase (int, int, int, int, const std::string="")
 construct from four charge values More...
 
 CandCombinerBase (bool checkCharge, const std::vector< int > &, const std::string="")
 constructor from a selector, specifying optionally to check for charge More...
 
 CandCombinerBase (bool checkCharge, bool checkOverlap, const std::vector< int > &, const std::string="")
 constructor from a selector, specifying optionally to check for charge More...
 
std::auto_ptr< OutputCollection > combine (const std::vector< edm::Handle< reco::CandidateView > > &, const vstring=vstring()) const
 return all selected candidate pairs More...
 
std::auto_ptr< OutputCollection > combine (const std::vector< edm::Handle< reco::CandidateView > > &, const vstring &=vstring()) const
 return all selected candidate pairs More...
 
std::auto_ptr< OutputCollection > combine (const edm::Handle< reco::CandidateView > &, const vstring &=vstring()) const
 return all selected candidate pairs More...
 
std::auto_ptr< OutputCollection > combine (const edm::Handle< reco::CandidateView > &, const vstring=vstring()) const
 return all selected candidate pairs More...
 
std::auto_ptr< OutputCollection > combine (const edm::Handle< reco::CandidateView > &, const edm::Handle< reco::CandidateView > &, const vstring &=vstring()) const
 return all selected candidate pairs More...
 
std::auto_ptr< OutputCollection > combine (const edm::Handle< reco::CandidateView > &, const edm::Handle< reco::CandidateView > &, const vstring=vstring()) const
 return all selected candidate pairs More...
 
std::auto_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::auto_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::auto_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::auto_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...
 
virtual ~CandCombinerBase ()
 destructor More...
 
virtual ~CandCombinerBase ()
 destructor More...
 

Private Types

typedef std::vector< std::pair
< std::pair< CandPtr, size_t >
, std::vector< edm::Handle
< reco::CandidateView >
>::const_iterator > > 
CandStack
 temporary candidate stack More...
 
typedef std::vector< std::pair
< std::pair< CandPtr, size_t >
, std::vector< edm::Handle
< reco::CandidateView >
>::const_iterator > > 
CandStack
 temporary candidate stack More...
 
typedef std::vector< int > ChargeStack
 
typedef std::vector< int > ChargeStack
 

Private Member Functions

virtual void addDaughter (typename OutputCollection::value_type &cmp, const CandPtr &c, const std::string="") const =0
 add candidate daughter More...
 
virtual void addDaughter (typename OutputCollection::value_type &cmp, const CandPtr &c, const std::string="") const =0
 add candidate daughter More...
 
void combine (typename OutputCollection::value_type &, const CandPtr &, const CandPtr &, const std::string="", const std::string="") const
 returns a composite candidate combined from two daughters More...
 
void combine (typename OutputCollection::value_type &, const CandPtr &, const CandPtr &, const std::string="", const std::string="") const
 returns a composite candidate combined from two daughters More...
 
void combine (size_t collectionIndex, CandStack &, ChargeStack &, std::vector< edm::Handle< reco::CandidateView > >::const_iterator begin, std::vector< edm::Handle< reco::CandidateView > >::const_iterator end, std::auto_ptr< OutputCollection > &comps, const vstring name=vstring()) const
 returns a composite candidate combined from two daughters More...
 
void combine (size_t collectionIndex, CandStack &, ChargeStack &, std::vector< edm::Handle< reco::CandidateView > >::const_iterator begin, std::vector< edm::Handle< reco::CandidateView > >::const_iterator end, std::auto_ptr< OutputCollection > &comps, const vstring &name=vstring()) const
 returns a composite candidate combined from two daughters More...
 
bool preselect (const reco::Candidate &, const reco::Candidate &) const
 verify that the two candidate don't overlap and check charge More...
 
bool preselect (const reco::Candidate &, const reco::Candidate &) const
 verify that the two candidate don't overlap and check charge More...
 
virtual bool select (const reco::Candidate &) const =0
 select a candidate More...
 
virtual bool select (const reco::Candidate &) const =0
 select a candidate More...
 
virtual bool selectPair (const reco::Candidate &c1, const reco::Candidate &c2) const =0
 select a candidate pair More...
 
virtual bool selectPair (const reco::Candidate &c1, const reco::Candidate &c2) const =0
 select a candidate pair More...
 
virtual void setup (typename OutputCollection::value_type &) const =0
 set kinematics to reconstructed composite More...
 
virtual void setup (typename OutputCollection::value_type &) const =0
 set kinematics to reconstructed composite More...
 

Private Attributes

bool checkCharge_
 flag to specify the checking of electric charge More...
 
bool checkOverlap_
 flag to specify the checking of overlaps More...
 
std::vector< int > dauCharge_
 electric charges of the daughters More...
 
std::string name_
 composite name (if applies) More...
 
OverlapChecker overlap_
 utility to check candidate daughters overlap More...
 

Detailed Description

template<typename OutputCollection, typename CandPtr>
class CandCombinerBase< OutputCollection, CandPtr >

Author
Luca Lista, INFN

Definition at line 14 of file CandCombinerBase.h.

Member Typedef Documentation

template<typename OutputCollection, typename CandPtr>
typedef std::vector<std::pair<std::pair<CandPtr, size_t>, std::vector<edm::Handle<reco::CandidateView> >::const_iterator> > CandCombinerBase< OutputCollection, CandPtr >::CandStack
private

temporary candidate stack

Definition at line 60 of file CandCombinerBase.h.

template<typename OutputCollection, typename CandPtr>
typedef std::vector<std::pair<std::pair<CandPtr, size_t>, std::vector<edm::Handle<reco::CandidateView> >::const_iterator> > CandCombinerBase< OutputCollection, CandPtr >::CandStack
private

temporary candidate stack

Definition at line 60 of file CandCombinerBase.h.

template<typename OutputCollection, typename CandPtr>
typedef std::vector<int> CandCombinerBase< OutputCollection, CandPtr >::ChargeStack
private

Definition at line 61 of file CandCombinerBase.h.

template<typename OutputCollection, typename CandPtr>
typedef std::vector<int> CandCombinerBase< OutputCollection, CandPtr >::ChargeStack
private

Definition at line 61 of file CandCombinerBase.h.

template<typename OutputCollection, typename CandPtr>
typedef std::vector<std::string> CandCombinerBase< OutputCollection, CandPtr >::vstring

Definition at line 16 of file CandCombinerBase.h.

template<typename OutputCollection, typename CandPtr>
typedef std::vector<std::string> CandCombinerBase< OutputCollection, CandPtr >::vstring

Definition at line 16 of file CandCombinerBase.h.

Constructor & Destructor Documentation

template<typename OutputCollection , typename CandPtr >
CandCombinerBase< OutputCollection, CandPtr >::CandCombinerBase ( const std::string  name = "")
explicit

default construct

Definition at line 89 of file CandCombinerBase.h.

template<typename OutputCollection , typename CandPtr >
CandCombinerBase< OutputCollection, CandPtr >::CandCombinerBase ( int  q1,
int  q2,
const std::string  name = "" 
)

construct from two charge values

Definition at line 94 of file CandCombinerBase.h.

template<typename OutputCollection , typename CandPtr >
CandCombinerBase< OutputCollection, CandPtr >::CandCombinerBase ( int  q1,
int  q2,
int  q3,
const std::string  name = "" 
)

construct from three charge values

Definition at line 101 of file CandCombinerBase.h.

template<typename OutputCollection , typename CandPtr >
CandCombinerBase< OutputCollection, CandPtr >::CandCombinerBase ( int  q1,
int  q2,
int  q3,
int  q4,
const std::string  name = "" 
)

construct from four charge values

Definition at line 109 of file CandCombinerBase.h.

template<typename OutputCollection , typename CandPtr >
CandCombinerBase< OutputCollection, CandPtr >::CandCombinerBase ( bool  checkCharge,
bool  checkOverlap,
const std::vector< int > &  dauCharge,
const std::string  name = "" 
)

constructor from a selector, specifying optionally to check for charge

Definition at line 118 of file CandCombinerBase.h.

template<typename OutputCollection , typename CandPtr >
CandCombinerBase< OutputCollection, CandPtr >::~CandCombinerBase ( )
virtual

destructor

Definition at line 123 of file CandCombinerBase.h.

template<typename OutputCollection, typename CandPtr>
CandCombinerBase< OutputCollection, CandPtr >::CandCombinerBase ( const std::string  = "")
explicit

default construct

template<typename OutputCollection, typename CandPtr>
CandCombinerBase< OutputCollection, CandPtr >::CandCombinerBase ( int  ,
int  ,
const std::string  = "" 
)

construct from two charge values

template<typename OutputCollection, typename CandPtr>
CandCombinerBase< OutputCollection, CandPtr >::CandCombinerBase ( int  ,
int  ,
int  ,
const std::string  = "" 
)

construct from three charge values

template<typename OutputCollection, typename CandPtr>
CandCombinerBase< OutputCollection, CandPtr >::CandCombinerBase ( int  ,
int  ,
int  ,
int  ,
const std::string  = "" 
)

construct from four charge values

template<typename OutputCollection , typename CandPtr >
CandCombinerBase< OutputCollection, CandPtr >::CandCombinerBase ( bool  checkCharge,
const std::vector< int > &  dauCharge,
const std::string  name = "" 
)

constructor from a selector, specifying optionally to check for charge

Definition at line 116 of file CandCombinerBase.h.

template<typename OutputCollection, typename CandPtr>
virtual CandCombinerBase< OutputCollection, CandPtr >::~CandCombinerBase ( )
virtual

destructor

Member Function Documentation

template<typename OutputCollection, typename CandPtr>
virtual void CandCombinerBase< OutputCollection, CandPtr >::addDaughter ( typename OutputCollection::value_type &  cmp,
const CandPtr &  c,
const std::string  = "" 
) const
privatepure virtual
template<typename OutputCollection, typename CandPtr>
virtual void CandCombinerBase< OutputCollection, CandPtr >::addDaughter ( typename OutputCollection::value_type &  cmp,
const CandPtr &  c,
const std::string  = "" 
) const
privatepure virtual
template<typename OutputCollection , typename CandPtr >
std::auto_ptr< OutputCollection > CandCombinerBase< OutputCollection, CandPtr >::combine ( const std::vector< edm::Handle< reco::CandidateView > > &  src,
const vstring names = vstring() 
) const

return all selected candidate pairs

Definition at line 148 of file CandCombinerBase.h.

template<typename OutputCollection, typename CandPtr>
std::auto_ptr< OutputCollection > CandCombinerBase< OutputCollection, CandPtr >::combine ( const std::vector< edm::Handle< reco::CandidateView > > &  src,
const vstring  names = vstring() 
) const

return all selected candidate pairs

Definition at line 146 of file CandCombinerBase.h.

template<typename OutputCollection , typename CandPtr >
std::auto_ptr< OutputCollection > CandCombinerBase< OutputCollection, CandPtr >::combine ( const edm::Handle< reco::CandidateView > &  src,
const vstring names = vstring() 
) const

return all selected candidate pairs

Definition at line 214 of file CandCombinerBase.h.

template<typename OutputCollection, typename CandPtr>
std::auto_ptr< OutputCollection > CandCombinerBase< OutputCollection, CandPtr >::combine ( const edm::Handle< reco::CandidateView > &  src,
const vstring  names = vstring() 
) const

return all selected candidate pairs

Definition at line 212 of file CandCombinerBase.h.

template<typename OutputCollection , typename CandPtr >
std::auto_ptr< OutputCollection > CandCombinerBase< OutputCollection, CandPtr >::combine ( const edm::Handle< reco::CandidateView > &  src1,
const edm::Handle< reco::CandidateView > &  src2,
const vstring names = vstring() 
) const

return all selected candidate pairs

Definition at line 254 of file CandCombinerBase.h.

template<typename OutputCollection, typename CandPtr>
std::auto_ptr< OutputCollection > CandCombinerBase< OutputCollection, CandPtr >::combine ( const edm::Handle< reco::CandidateView > &  src1,
const edm::Handle< reco::CandidateView > &  src2,
const vstring  names = vstring() 
) const

return all selected candidate pairs

Definition at line 252 of file CandCombinerBase.h.

template<typename OutputCollection , typename CandPtr >
std::auto_ptr< OutputCollection > CandCombinerBase< OutputCollection, CandPtr >::combine ( const edm::Handle< reco::CandidateView > &  src1,
const edm::Handle< reco::CandidateView > &  src2,
const edm::Handle< reco::CandidateView > &  src3,
const vstring names = vstring() 
) const

return all selected candidate pairs

Definition at line 265 of file CandCombinerBase.h.

template<typename OutputCollection, typename CandPtr>
std::auto_ptr< OutputCollection > CandCombinerBase< OutputCollection, CandPtr >::combine ( const edm::Handle< reco::CandidateView > &  src1,
const edm::Handle< reco::CandidateView > &  src2,
const edm::Handle< reco::CandidateView > &  src3,
const vstring  names = vstring() 
) const

return all selected candidate pairs

Definition at line 263 of file CandCombinerBase.h.

template<typename OutputCollection, typename CandPtr>
std::auto_ptr< OutputCollection > CandCombinerBase< OutputCollection, CandPtr >::combine ( const edm::Handle< reco::CandidateView > &  src1,
const edm::Handle< reco::CandidateView > &  src2,
const edm::Handle< reco::CandidateView > &  src3,
const edm::Handle< reco::CandidateView > &  src4,
const vstring  names = vstring() 
) const

return all selected candidate pairs

Definition at line 276 of file CandCombinerBase.h.

template<typename OutputCollection , typename CandPtr >
std::auto_ptr< OutputCollection > CandCombinerBase< OutputCollection, CandPtr >::combine ( const edm::Handle< reco::CandidateView > &  src1,
const edm::Handle< reco::CandidateView > &  src2,
const edm::Handle< reco::CandidateView > &  src3,
const edm::Handle< reco::CandidateView > &  src4,
const vstring names = vstring() 
) const

return all selected candidate pairs

Definition at line 278 of file CandCombinerBase.h.

template<typename OutputCollection, typename CandPtr>
void CandCombinerBase< OutputCollection, CandPtr >::combine ( typename OutputCollection::value_type &  ,
const CandPtr &  ,
const CandPtr &  ,
const std::string  = "",
const std::string  = "" 
) const
private

returns a composite candidate combined from two daughters

template<typename OutputCollection, typename CandPtr>
void CandCombinerBase< OutputCollection, CandPtr >::combine ( typename OutputCollection::value_type &  cmp,
const CandPtr &  c1,
const CandPtr &  c2,
const std::string  name1 = "",
const std::string  name2 = "" 
) const
private

returns a composite candidate combined from two daughters

Definition at line 138 of file CandCombinerBase.h.

template<typename OutputCollection, typename CandPtr>
void CandCombinerBase< OutputCollection, CandPtr >::combine ( size_t  collectionIndex,
CandStack stack,
ChargeStack qStack,
std::vector< edm::Handle< reco::CandidateView > >::const_iterator  begin,
std::vector< edm::Handle< reco::CandidateView > >::const_iterator  end,
std::auto_ptr< OutputCollection > &  comps,
const vstring name = vstring() 
) const
private

returns a composite candidate combined from two daughters

Definition at line 292 of file CandCombinerBase.h.

template<typename OutputCollection, typename CandPtr>
void CandCombinerBase< OutputCollection, CandPtr >::combine ( size_t  collectionIndex,
CandStack stack,
ChargeStack qStack,
std::vector< edm::Handle< reco::CandidateView > >::const_iterator  begin,
std::vector< edm::Handle< reco::CandidateView > >::const_iterator  end,
std::auto_ptr< OutputCollection > &  comps,
const vstring  name = vstring() 
) const
private

returns a composite candidate combined from two daughters

Definition at line 290 of file CandCombinerBase.h.

template<typename OutputCollection , typename CandPtr >
bool CandCombinerBase< OutputCollection, CandPtr >::preselect ( const reco::Candidate c1,
const reco::Candidate c2 
) const
private

verify that the two candidate don't overlap and check charge

Definition at line 127 of file CandCombinerBase.h.

template<typename OutputCollection, typename CandPtr>
bool CandCombinerBase< OutputCollection, CandPtr >::preselect ( const reco::Candidate ,
const reco::Candidate  
) const
private

verify that the two candidate don't overlap and check charge

template<typename OutputCollection, typename CandPtr>
virtual bool CandCombinerBase< OutputCollection, CandPtr >::select ( const reco::Candidate ) const
privatepure virtual
template<typename OutputCollection, typename CandPtr>
virtual bool CandCombinerBase< OutputCollection, CandPtr >::select ( const reco::Candidate ) const
privatepure virtual
template<typename OutputCollection, typename CandPtr>
virtual bool CandCombinerBase< OutputCollection, CandPtr >::selectPair ( const reco::Candidate c1,
const reco::Candidate c2 
) const
privatepure virtual
template<typename OutputCollection, typename CandPtr>
virtual bool CandCombinerBase< OutputCollection, CandPtr >::selectPair ( const reco::Candidate c1,
const reco::Candidate c2 
) const
privatepure virtual
template<typename OutputCollection, typename CandPtr>
virtual void CandCombinerBase< OutputCollection, CandPtr >::setup ( typename OutputCollection::value_type &  ) const
privatepure virtual
template<typename OutputCollection, typename CandPtr>
virtual void CandCombinerBase< OutputCollection, CandPtr >::setup ( typename OutputCollection::value_type &  ) const
privatepure virtual

Member Data Documentation

template<typename OutputCollection, typename CandPtr>
bool CandCombinerBase< OutputCollection, CandPtr >::checkCharge_
private

flag to specify the checking of electric charge

Definition at line 77 of file CandCombinerBase.h.

template<typename OutputCollection, typename CandPtr>
bool CandCombinerBase< OutputCollection, CandPtr >::checkOverlap_
private

flag to specify the checking of overlaps

Definition at line 79 of file CandCombinerBase.h.

template<typename OutputCollection, typename CandPtr>
std::vector< int > CandCombinerBase< OutputCollection, CandPtr >::dauCharge_
private

electric charges of the daughters

Definition at line 81 of file CandCombinerBase.h.

template<typename OutputCollection, typename CandPtr>
std::string CandCombinerBase< OutputCollection, CandPtr >::name_
private

composite name (if applies)

Definition at line 85 of file CandCombinerBase.h.

template<typename OutputCollection, typename CandPtr>
OverlapChecker CandCombinerBase< OutputCollection, CandPtr >::overlap_
private

utility to check candidate daughters overlap

Definition at line 83 of file CandCombinerBase.h.