CMS 3D CMS Logo

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 override
 
 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 override
 
 ~EgTrigTagProbeCut_NewPho () override=default
 
- Public Member Functions inherited from egHLT::EgHLTDQMCut< OffPho >
 EgHLTDQMCut ()=default
 
virtual ~EgHLTDQMCut ()=default
 

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)=default
 

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
egHLT::EgTrigTagProbeCut_NewPho::~EgTrigTagProbeCut_NewPho ( )
overridedefault

Member Function Documentation

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

Implements egHLT::EgHLTDQMCut< OffPho >.

Definition at line 498 of file EgHLTDQMCut.h.

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
overridevirtual

Implements egHLT::EgHLTDQMCut< OffPho >.

Definition at line 60 of file EgHLTDQMCut.cc.

References egHLT::EgTrigTagProbeCut::cutCode_, egHLT::EgTrigTagProbeCut::cutCodeFunc_, reco::deltaR2(), egHLT::OffPho::eta(), mag(), ResonanceBuilder::mass, egHLT::EgTrigTagProbeCut::maxMass_, egHLT::EgTrigTagProbeCut::minMass_, 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=nullptr;
70  const std::vector<OffPho>& phos = evt.phos();
71  //we are looking for an *additional* tag
72  for(auto const & pho : phos){
73  if( ((pho.*cutCodeFunc_)() & cutCode_)==0x0 && (bit1ToPass_&pho.trigBits())==bit1ToPass_){
74  //now a check that the tag is not the same as the probe
75  if(reco::deltaR2(thePho.eta(),thePho.phi(),pho.eta(),pho.phi())>0.1*0.1){//not in a cone of 0.1 of probe "photon"
76  nrTags++;
77  tagPho = &pho;
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())
float eta() const
Definition: EgHLTOffPho.h:104
TrigCodes::TrigBitSet trigBits() const
Definition: EgHLTOffPho.h:155
int(OffPho::* cutCodeFunc_)() const
Definition: EgHLTDQMCut.h:490
TrigCodes::TrigBitSet bit2ToPass_
Definition: EgHLTDQMCut.h:488
const std::vector< OffPho > & phos() const
Definition: EgHLTOffEvt.h:50
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:16
float phi() const
Definition: EgHLTOffPho.h:105
const math::XYZTLorentzVector & p4() const
Definition: EgHLTOffPho.h:111

Member Data Documentation

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

Definition at line 487 of file EgHLTDQMCut.h.

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

Definition at line 488 of file EgHLTDQMCut.h.

int egHLT::EgTrigTagProbeCut_NewPho::cutCode_
private

Definition at line 489 of file EgHLTDQMCut.h.

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

Definition at line 490 of file EgHLTDQMCut.h.

float egHLT::EgTrigTagProbeCut_NewPho::maxMass_
private

Definition at line 492 of file EgHLTDQMCut.h.

float egHLT::EgTrigTagProbeCut_NewPho::minMass_
private

Definition at line 491 of file EgHLTDQMCut.h.