CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
BPHMultiSelect< T > Class Template Reference

#include <BPHMultiSelect.h>

Inheritance diagram for BPHMultiSelect< T >:

Classes

struct  SelectElement
 

Public Member Functions

template<>
bool accept (const reco::Candidate &cand, const BPHRecoBuilder *build) const
 
template<>
bool accept (const reco::Candidate &cand) const
 
template<>
bool accept (const BPHDecayMomentum &cand) const
 
template<>
bool accept (const BPHDecayVertex &cand) const
 
template<>
bool accept (const BPHKinematicFit &cand) const
 
virtual bool accept (const reco::Candidate &cand, const BPHRecoBuilder *build) const
 accept function More...
 
virtual bool accept (const reco::Candidate &cand) const
 
virtual bool accept (const BPHDecayMomentum &cand) const
 
virtual bool accept (const BPHDecayVertex &cand) const
 
virtual bool accept (const BPHKinematicFit &cand) const
 
template<>
bool accept (const reco::Candidate &cand, const BPHRecoBuilder *build) const
 
template<>
bool accept (const reco::Candidate &cand) const
 
template<>
bool accept (const BPHDecayMomentum &cand) const
 
template<>
bool accept (const BPHDecayVertex &cand) const
 
template<>
bool accept (const BPHKinematicFit &cand) const
 
 BPHMultiSelect (BPHSelectOperation::mode op)
 
void include (T &s, bool m=true)
 include selection More...
 
virtual ~BPHMultiSelect ()
 

Private Member Functions

 BPHMultiSelect (const BPHMultiSelect< T > &x)
 
BPHMultiSelectoperator= (const BPHMultiSelect< T > &x)
 
template<class Obj >
bool select (const Obj &cand) const
 
template<class Obj >
bool select (const Obj &cand, const BPHRecoBuilder *build) const
 

Private Attributes

bool breakValue
 
bool finalValue
 
std::vector< SelectElementselectList
 

Detailed Description

template<class T>
class BPHMultiSelect< T >

Description: Class to combine multiple selection (OR mode)

Author
Paolo Ronchese INFN Padova

Definition at line 47 of file BPHMultiSelect.h.

Constructor & Destructor Documentation

template<class T>
BPHMultiSelect< T >::BPHMultiSelect ( BPHSelectOperation::mode  op)
inline

Constructor

Definition at line 53 of file BPHMultiSelect.h.

References BPHSelectOperation::and_mode, and BPHSelectOperation::or_mode.

53  {
54  switch ( op ) {
56  breakValue = true;
57  finalValue = false;
58  break;
60  breakValue = false;
61  finalValue = true;
62  break;
63  }
64  }
template<class T>
virtual BPHMultiSelect< T >::~BPHMultiSelect ( )
inlinevirtual
template<class T>
BPHMultiSelect< T >::BPHMultiSelect ( const BPHMultiSelect< T > &  x)
private

Member Function Documentation

template<>
bool BPHMultiSelect< BPHRecoSelect >::accept ( const reco::Candidate cand,
const BPHRecoBuilder build 
) const
template<>
bool BPHMultiSelect< BPHRecoSelect >::accept ( const reco::Candidate cand) const
template<>
bool BPHMultiSelect< BPHMomentumSelect >::accept ( const BPHDecayMomentum cand) const
template<>
bool BPHMultiSelect< BPHVertexSelect >::accept ( const BPHDecayVertex cand) const
template<>
bool BPHMultiSelect< BPHFitSelect >::accept ( const BPHKinematicFit cand) const
template<class T>
virtual bool BPHMultiSelect< T >::accept ( const reco::Candidate cand,
const BPHRecoBuilder build 
) const
inlinevirtual
template<class T>
virtual bool BPHMultiSelect< T >::accept ( const reco::Candidate cand) const
inlinevirtual
template<class T>
virtual bool BPHMultiSelect< T >::accept ( const BPHDecayMomentum cand) const
inlinevirtual
template<class T>
virtual bool BPHMultiSelect< T >::accept ( const BPHDecayVertex cand) const
inlinevirtual
template<class T>
virtual bool BPHMultiSelect< T >::accept ( const BPHKinematicFit cand) const
inlinevirtual
template<>
bool BPHMultiSelect< BPHRecoSelect >::accept ( const reco::Candidate cand,
const BPHRecoBuilder build 
) const
template<>
bool BPHMultiSelect< BPHRecoSelect >::accept ( const reco::Candidate cand) const
template<>
bool BPHMultiSelect< BPHMomentumSelect >::accept ( const BPHDecayMomentum cand) const
template<>
bool BPHMultiSelect< BPHVertexSelect >::accept ( const BPHDecayVertex cand) const
template<>
bool BPHMultiSelect< BPHFitSelect >::accept ( const BPHKinematicFit cand) const
template<class T>
void BPHMultiSelect< T >::include ( T s,
bool  m = true 
)
inline

include selection

Operations

Definition at line 73 of file BPHMultiSelect.h.

Referenced by BPHOniaToMuMuBuilder::build().

73  {
74  SelectElement e;
75  e.selector = &s;
76  e.mode = m;
77  selectList.push_back( e );
78  return;
79  }
std::vector< SelectElement > selectList
template<class T>
BPHMultiSelect& BPHMultiSelect< T >::operator= ( const BPHMultiSelect< T > &  x)
private
template<class T>
template<class Obj >
bool BPHMultiSelect< T >::select ( const Obj &  cand) const
inlineprivate

Definition at line 104 of file BPHMultiSelect.h.

References MillePedeFileConverter_cfg::e, mps_fire::i, BPHMultiSelect< T >::SelectElement::mode, gen::n, and BPHMultiSelect< T >::SelectElement::selector.

104  {
105  int i;
106  int n = selectList.size();
107  for ( i = 0; i < n; ++i ) {
108  const SelectElement& e = selectList[i];
109  if ( ( e.selector->accept( cand ) == e.mode ) == breakValue )
110  return breakValue;
111  }
112  return finalValue;
113  }
std::vector< SelectElement > selectList
template<class T>
template<class Obj >
bool BPHMultiSelect< T >::select ( const Obj &  cand,
const BPHRecoBuilder build 
) const
inlineprivate

Definition at line 114 of file BPHMultiSelect.h.

References BPHMultiSelect< T >::accept(), MillePedeFileConverter_cfg::e, mps_fire::i, BPHMultiSelect< T >::SelectElement::mode, gen::n, and BPHMultiSelect< T >::SelectElement::selector.

115  {
116  int i;
117  int n = selectList.size();
118  for ( i = 0; i < n; ++i ) {
119  const SelectElement& e = selectList[i];
120  if ( ( e.selector->accept( cand, build ) == e.mode ) == breakValue )
121  return breakValue;
122  }
123  return finalValue;
124  }
std::vector< SelectElement > selectList

Member Data Documentation

template<class T>
bool BPHMultiSelect< T >::breakValue
private

Definition at line 100 of file BPHMultiSelect.h.

template<class T>
bool BPHMultiSelect< T >::finalValue
private

Definition at line 101 of file BPHMultiSelect.h.

template<class T>
std::vector<SelectElement> BPHMultiSelect< T >::selectList
private

Definition at line 102 of file BPHMultiSelect.h.