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_NewPho Struct Reference

#include <EgHLTDQMCut.h>

Inheritance diagram for egHLT::EgTrigTagProbeCut_NewPho:
egHLT::EgHLTDQMCut< OffPho >

Public Member Functions

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

Private Attributes

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

Additional Inherited Members

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

Detailed Description

Definition at line 485 of file EgHLTDQMCut.h.

Constructor & Destructor Documentation

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

Definition at line 494 of file EgHLTDQMCut.h.

Referenced by clone().

egHLT::EgTrigTagProbeCut_NewPho::~EgTrigTagProbeCut_NewPho ( )
inline

Definition at line 495 of file EgHLTDQMCut.h.

495 {}

Member Function Documentation

EgHLTDQMCut<OffPho>* egHLT::EgTrigTagProbeCut_NewPho::clone ( void  ) const
inlinevirtual

Implements egHLT::EgHLTDQMCut< OffPho >.

Definition at line 498 of file EgHLTDQMCut.h.

References EgTrigTagProbeCut_NewPho().

498 {return new EgTrigTagProbeCut_NewPho(*this);}
EgTrigTagProbeCut_NewPho(TrigCodes::TrigBitSet bit1ToPass, TrigCodes::TrigBitSet bit2ToPass, int cutCode, int(OffPho::*cutCodeFunc)() const, float minMass=81., float maxMass=101.)
Definition: EgHLTDQMCut.h:494
bool EgTrigTagProbeCut_NewPho::pass ( const OffPho pho,
const OffEvt evt 
) const
virtual

Implements egHLT::EgHLTDQMCut< OffPho >.

Definition at line 60 of file EgHLTDQMCut.cc.

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

61 {
62  //looking at only Et>20, since probe is required to pass SC17
63  //if(theEle.et()>20/* && theEle.et()<20*/){
64  //first we check if our probe electron passes WP80 and the second leg of our T&P trigger
65  if( ((thePho.*cutCodeFunc_)() & cutCode_)!=0x0 || (bit2ToPass_&thePho.trigBits())!=bit2ToPass_) return false;
66 
67  //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)
68  int nrTags=0;
69  const OffPho* tagPho=NULL;
70  const std::vector<OffPho>& phos = evt.phos();
71  //we are looking for an *additional* tag
72  for(size_t phoNr=0;phoNr<phos.size();phoNr++){
73  if( ((phos[phoNr].*cutCodeFunc_)() & cutCode_)==0x0 && (bit1ToPass_&phos[phoNr].trigBits())==bit1ToPass_){
74  //now a check that the tag is not the same as the probe
75  if(reco::deltaR2(thePho.eta(),thePho.phi(),phos[phoNr].eta(),phos[phoNr].phi())>0.1*0.1){//not in a cone of 0.1 of probe "photon"
76  nrTags++;
77  tagPho = &phos[phoNr];
78  }
79  }
80  }
81  if(nrTags==1){ //we are requiring one and only one additional tag (the thePho is automatically excluded from the tag list)
82  float mass = (thePho.p4()+tagPho->p4()).mag();
83  if(mass>minMass_ && mass<maxMass_) return true; //mass requirements
84  }
85  //}//if 10<pt<20
86  return false;
87 }
TrigCodes::TrigBitSet bit1ToPass_
Definition: EgHLTDQMCut.h:487
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
#define NULL
Definition: scimark2.h:8
TrigCodes::TrigBitSet bit2ToPass_
Definition: EgHLTDQMCut.h:488
double deltaR2(const T1 &t1, const T2 &t2)
Definition: deltaR.h:36
const std::vector< OffPho > & phos() const
Definition: EgHLTOffEvt.h:48
const math::XYZTLorentzVector & p4() const
Definition: EgHLTOffPho.h:111
int(OffPho::* cutCodeFunc_)() const
Definition: EgHLTDQMCut.h:490

Member Data Documentation

TrigCodes::TrigBitSet egHLT::EgTrigTagProbeCut_NewPho::bit1ToPass_
private

Definition at line 487 of file EgHLTDQMCut.h.

Referenced by pass().

TrigCodes::TrigBitSet egHLT::EgTrigTagProbeCut_NewPho::bit2ToPass_
private

Definition at line 488 of file EgHLTDQMCut.h.

Referenced by pass().

int egHLT::EgTrigTagProbeCut_NewPho::cutCode_
private

Definition at line 489 of file EgHLTDQMCut.h.

Referenced by pass().

int(OffPho::* egHLT::EgTrigTagProbeCut_NewPho::cutCodeFunc_)() const
private

Definition at line 490 of file EgHLTDQMCut.h.

Referenced by pass().

float egHLT::EgTrigTagProbeCut_NewPho::maxMass_
private

Definition at line 492 of file EgHLTDQMCut.h.

Referenced by pass().

float egHLT::EgTrigTagProbeCut_NewPho::minMass_
private

Definition at line 491 of file EgHLTDQMCut.h.

Referenced by pass().