CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
egHLT::EgDiEleCut Struct Reference

#include <EgHLTDQMCut.h>

Inheritance diagram for egHLT::EgDiEleCut:
egHLT::EgHLTDQMCut< OffEle >

Public Member Functions

EgHLTDQMCut< OffEle > * clone () const override
 
 EgDiEleCut (int cutCode, int(OffEle::*cutCodeFunc)() const)
 
bool pass (const OffEle &obj, const OffEvt &evt) const override
 
- Public Member Functions inherited from egHLT::EgHLTDQMCut< OffEle >
 EgHLTDQMCut ()=default
 
virtual ~EgHLTDQMCut ()=default
 

Private Attributes

int cutCode_
 
int(OffEle::* cutCodeFunc_ )() const
 

Additional Inherited Members

- Protected Member Functions inherited from egHLT::EgHLTDQMCut< OffEle >
 EgHLTDQMCut (const EgHLTDQMCut &rhs)=default
 

Detailed Description

Definition at line 391 of file EgHLTDQMCut.h.

Constructor & Destructor Documentation

egHLT::EgDiEleCut::EgDiEleCut ( int  cutCode,
int(OffEle::*)() const  cutCodeFunc 
)
inline

Definition at line 397 of file EgHLTDQMCut.h.

Referenced by clone().

397 : cutCode_(cutCode), cutCodeFunc_(cutCodeFunc) {}
int(OffEle::* cutCodeFunc_)() const
Definition: EgHLTDQMCut.h:394

Member Function Documentation

EgHLTDQMCut<OffEle>* egHLT::EgDiEleCut::clone ( void  ) const
inlineoverridevirtual

Implements egHLT::EgHLTDQMCut< OffEle >.

Definition at line 399 of file EgHLTDQMCut.h.

References EgDiEleCut().

399 { return new EgDiEleCut(*this); }
EgDiEleCut(int cutCode, int(OffEle::*cutCodeFunc)() const)
Definition: EgHLTDQMCut.h:397
bool EgDiEleCut::pass ( const OffEle obj,
const OffEvt evt 
) const
overridevirtual

Implements egHLT::EgHLTDQMCut< OffEle >.

Definition at line 98 of file EgHLTDQMCut.cc.

References cutCode_, cutCodeFunc_, and egHLT::OffEvt::eles().

98  {
99  const std::vector<OffEle>& eles = evt.eles();
100  for (auto const& ele : eles) {
101  if (&ele != &obj) { //different electrons
102 
103  int diEleCutCode = (obj.*cutCodeFunc_)() | (ele.*cutCodeFunc_)();
104  if ((diEleCutCode & cutCode_) == 0x0)
105  return true;
106  }
107  }
108  return false;
109 }
const std::vector< OffEle > & eles() const
Definition: EgHLTOffEvt.h:48
int(OffEle::* cutCodeFunc_)() const
Definition: EgHLTDQMCut.h:394

Member Data Documentation

int egHLT::EgDiEleCut::cutCode_
private

Definition at line 393 of file EgHLTDQMCut.h.

Referenced by pass().

int(OffEle::* egHLT::EgDiEleCut::cutCodeFunc_)() const
private

Definition at line 394 of file EgHLTDQMCut.h.

Referenced by pass().