CMS 3D CMS Logo

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

#include <EgHLTDQMCut.h>

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

Public Member Functions

EgHLTDQMCut< OffEle > * clone () const
 
 EgTrigTagProbeCut_New (TrigCodes::TrigBitSet bit1ToPass, TrigCodes::TrigBitSet bit2ToPass, int cutCode, int(OffEle::*cutCodeFunc)() const, float minMass=81., float maxMass=101.)
 
bool pass (const OffEle &ele, const OffEvt &evt) const
 
 ~EgTrigTagProbeCut_New ()
 
- Public Member Functions inherited from egHLT::EgHLTDQMCut< OffEle >
 EgHLTDQMCut ()
 
virtual ~EgHLTDQMCut ()
 

Private Attributes

TrigCodes::TrigBitSet bit1ToPass_
 
TrigCodes::TrigBitSet bit2ToPass_
 
int cutCode_
 
int(OffEle::* cutCodeFunc_ )() const
 
float maxMass_
 
float minMass_
 

Additional Inherited Members

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

Detailed Description

Definition at line 468 of file EgHLTDQMCut.h.

Constructor & Destructor Documentation

egHLT::EgTrigTagProbeCut_New::EgTrigTagProbeCut_New ( TrigCodes::TrigBitSet  bit1ToPass,
TrigCodes::TrigBitSet  bit2ToPass,
int  cutCode,
int(OffEle::*)() const  cutCodeFunc,
float  minMass = 81.,
float  maxMass = 101. 
)
inline

Definition at line 477 of file EgHLTDQMCut.h.

Referenced by clone().

egHLT::EgTrigTagProbeCut_New::~EgTrigTagProbeCut_New ( )
inline

Definition at line 478 of file EgHLTDQMCut.h.

478 {}

Member Function Documentation

EgHLTDQMCut<OffEle>* egHLT::EgTrigTagProbeCut_New::clone ( void  ) const
inlinevirtual

Implements egHLT::EgHLTDQMCut< OffEle >.

Definition at line 481 of file EgHLTDQMCut.h.

References EgTrigTagProbeCut_New().

481 {return new EgTrigTagProbeCut_New(*this);}
EgTrigTagProbeCut_New(TrigCodes::TrigBitSet bit1ToPass, TrigCodes::TrigBitSet bit2ToPass, int cutCode, int(OffEle::*cutCodeFunc)() const, float minMass=81., float maxMass=101.)
Definition: EgHLTDQMCut.h:477
bool EgTrigTagProbeCut_New::pass ( const OffEle ele,
const OffEvt evt 
) const
virtual

Implements egHLT::EgHLTDQMCut< OffEle >.

Definition at line 31 of file EgHLTDQMCut.cc.

References bit1ToPass_, bit2ToPass_, cutCode_, cutCodeFunc_, reco::deltaR2(), egHLT::OffEvt::eles(), egHLT::OffEle::eta(), mag(), maxMass_, minMass_, NULL, egHLT::OffEle::p4(), egHLT::OffEle::phi(), and egHLT::OffEle::trigBits().

32 {
33  //looking at only Et>20, since probe is required to pass SC17
34  //if(theEle.et()>20/* && theEle.et()<20*/){
35  //first we check if our probe electron passes WP80 and the second leg of our T&P trigger
36  if( ((theEle.*cutCodeFunc_)() & cutCode_)!=0x0 || (bit2ToPass_&theEle.trigBits())!=bit2ToPass_) return false;
37 
38  //now we check that there is a WP80 tag electron that passes the first leg of the trigger(this electron may be a tag, we are not going to test this, all we care about is that another electron in the event is a tag)
39  int nrTags=0;
40  const OffEle* tagEle=NULL;
41  const std::vector<OffEle>& eles = evt.eles();
42  //we are looking for an *additional* tag
43  for(size_t eleNr=0;eleNr<eles.size();eleNr++){
44  if( ((eles[eleNr].*cutCodeFunc_)() & cutCode_)==0x0 && (bit1ToPass_&eles[eleNr].trigBits())==bit1ToPass_){
45  //now a check that the tag is not the same as the probe
46  if(reco::deltaR2(theEle.eta(),theEle.phi(),eles[eleNr].eta(),eles[eleNr].phi())>0.1*0.1){//not in a cone of 0.1 of probe electron
47  nrTags++;
48  tagEle = &eles[eleNr];
49  }
50  }
51  }
52  if(nrTags==1){ //we are requiring one and only one additional tag (the theEle is automatically excluded from the tag list)
53  float mass = (theEle.p4()+tagEle->p4()).mag();
54  if(mass>minMass_ && mass<maxMass_) return true; //mass requirements
55  }
56  //}//if 10<pt<20
57  return false;
58 }
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
#define NULL
Definition: scimark2.h:8
TrigCodes::TrigBitSet bit1ToPass_
Definition: EgHLTDQMCut.h:470
double deltaR2(const T1 &t1, const T2 &t2)
Definition: deltaR.h:36
const std::vector< OffEle > & eles() const
Definition: EgHLTOffEvt.h:46
const math::XYZTLorentzVector & p4() const
Definition: EgHLTOffEle.h:128
int(OffEle::* cutCodeFunc_)() const
Definition: EgHLTDQMCut.h:473
TrigCodes::TrigBitSet bit2ToPass_
Definition: EgHLTDQMCut.h:471

Member Data Documentation

TrigCodes::TrigBitSet egHLT::EgTrigTagProbeCut_New::bit1ToPass_
private

Definition at line 470 of file EgHLTDQMCut.h.

Referenced by pass().

TrigCodes::TrigBitSet egHLT::EgTrigTagProbeCut_New::bit2ToPass_
private

Definition at line 471 of file EgHLTDQMCut.h.

Referenced by pass().

int egHLT::EgTrigTagProbeCut_New::cutCode_
private

Definition at line 472 of file EgHLTDQMCut.h.

Referenced by pass().

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

Definition at line 473 of file EgHLTDQMCut.h.

Referenced by pass().

float egHLT::EgTrigTagProbeCut_New::maxMass_
private

Definition at line 475 of file EgHLTDQMCut.h.

Referenced by pass().

float egHLT::EgTrigTagProbeCut_New::minMass_
private

Definition at line 474 of file EgHLTDQMCut.h.

Referenced by pass().