CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
egHLT::EgTagProbeCut< T > Struct Template Reference

#include <EgHLTDQMCut.h>

Inheritance diagram for egHLT::EgTagProbeCut< T >:
egHLT::EgHLTDQMCut< T >

Public Member Functions

EgHLTDQMCut< T > * clone () const override
 
 EgTagProbeCut (int probeCutCode, int(T::*probeCutCodeFunc)() const, int tagCutCode, int(OffEle::*tagCutCodeFunc)() const, float minMass=81., float maxMass=101.)
 
bool pass (const T &obj, const OffEvt &evt) const override
 
 ~EgTagProbeCut () override=default
 
- Public Member Functions inherited from egHLT::EgHLTDQMCut< T >
 EgHLTDQMCut ()=default
 
virtual ~EgHLTDQMCut ()=default
 

Private Attributes

float maxMass_
 
float minMass_
 
int probeCutCode_
 
int(T::* probeCutCodeFunc_ )() const
 
int tagCutCode_
 
int(OffEle::* tagCutCodeFunc_ )() const
 

Additional Inherited Members

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

Detailed Description

template<class T>
struct egHLT::EgTagProbeCut< T >

Definition at line 253 of file EgHLTDQMCut.h.

Constructor & Destructor Documentation

template<class T >
egHLT::EgTagProbeCut< T >::EgTagProbeCut ( int  probeCutCode,
int(T::*)() const  probeCutCodeFunc,
int  tagCutCode,
int(OffEle::*)() const  tagCutCodeFunc,
float  minMass = 81.,
float  maxMass = 101. 
)
inline
template<class T >
egHLT::EgTagProbeCut< T >::~EgTagProbeCut ( )
overridedefault

Member Function Documentation

template<class T >
EgHLTDQMCut<T>* egHLT::EgTagProbeCut< T >::clone ( void  ) const
inlineoverridevirtual

Implements egHLT::EgHLTDQMCut< T >.

Definition at line 266 of file EgHLTDQMCut.h.

266 {return new EgTagProbeCut(*this);}
EgTagProbeCut(int probeCutCode, int(T::*probeCutCodeFunc)() const, int tagCutCode, int(OffEle::*tagCutCodeFunc)() const, float minMass=81., float maxMass=101.)
Definition: EgHLTDQMCut.h:262
template<class T >
bool egHLT::EgTagProbeCut< T >::pass ( const T obj,
const OffEvt evt 
) const
overridevirtual

Implements egHLT::EgHLTDQMCut< T >.

Definition at line 269 of file EgHLTDQMCut.h.

References reco::deltaR2(), egHLT::OffEvt::eles(), mag(), ResonanceBuilder::mass, and egHLT::OffEle::p4().

270  {
271  int nrTags=0;
272  const OffEle* tagEle=nullptr;
273  const std::vector<OffEle>& eles = evt.eles();
274  //we are looking for an *additional* tag
275  for(const auto & ele : eles){
276  if( ((ele.*tagCutCodeFunc_)() & tagCutCode_)==0x0){
277  //now a check that the tag is not the same as the probe
278  if(reco::deltaR2(obj.eta(),obj.phi(),ele.eta(),ele.phi())>0.1*0.1){//not in a cone of 0.1 of probe object
279  nrTags++;
280  tagEle = &ele;
281  }
282  }
283  }
284  if(nrTags==1){ //we are requiring one and only one additional tag (the obj is automatically excluded from the tag list)
285  if(((obj.*probeCutCodeFunc_)() & probeCutCode_)==0x0){ //passes probe requirements, lets check the mass
286  float mass = (obj.p4()+tagEle->p4()).mag();
287  if(mass>minMass_ && mass<maxMass_) return true; //mass requirements
288  }
289  }
290  return false;
291  }
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
int(T::* probeCutCodeFunc_)() const
Definition: EgHLTDQMCut.h:256
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:16
int(OffEle::* tagCutCodeFunc_)() const
Definition: EgHLTDQMCut.h:258

Member Data Documentation

template<class T >
float egHLT::EgTagProbeCut< T >::maxMass_
private

Definition at line 260 of file EgHLTDQMCut.h.

template<class T >
float egHLT::EgTagProbeCut< T >::minMass_
private

Definition at line 259 of file EgHLTDQMCut.h.

template<class T >
int egHLT::EgTagProbeCut< T >::probeCutCode_
private

Definition at line 255 of file EgHLTDQMCut.h.

template<class T >
int(T::* egHLT::EgTagProbeCut< T >::probeCutCodeFunc_) () const
private

Definition at line 256 of file EgHLTDQMCut.h.

template<class T >
int egHLT::EgTagProbeCut< T >::tagCutCode_
private

Definition at line 257 of file EgHLTDQMCut.h.

template<class T >
int(OffEle::* egHLT::EgTagProbeCut< T >::tagCutCodeFunc_) () const
private

Definition at line 258 of file EgHLTDQMCut.h.