Go to the documentation of this file.00001 #include "DQMOffline/Trigger/interface/EgHLTDQMCut.h"
00002
00003 using namespace egHLT;
00004
00005 bool EgTrigTagProbeCut::pass(const OffEle& theEle,const OffEvt& evt)const
00006 {
00007
00008 if( ((theEle.*cutCodeFunc_)() & cutCode_)!=0x0) return false;
00009
00010
00011 int nrTags=0;
00012 const OffEle* tagEle=NULL;
00013 const std::vector<OffEle>& eles = evt.eles();
00014
00015 for(size_t eleNr=0;eleNr<eles.size();eleNr++){
00016 if( ((eles[eleNr].*cutCodeFunc_)() & cutCode_)==0x0 && (bitsToPass_&eles[eleNr].trigBits())==bitsToPass_){
00017
00018 if(reco::deltaR2(theEle.eta(),theEle.phi(),eles[eleNr].eta(),eles[eleNr].phi())>0.1*0.1){
00019 nrTags++;
00020 tagEle = &eles[eleNr];
00021 }
00022 }
00023 }
00024 if(nrTags==1){
00025 float mass = (theEle.p4()+tagEle->p4()).mag();
00026 if(mass>minMass_ && mass<maxMass_) return true;
00027 }
00028 return false;
00029 }
00030
00031 bool EgDiEleCut::pass(const OffEle& obj,const OffEvt& evt)const
00032 {
00033 const std::vector<OffEle>& eles = evt.eles();
00034 for(size_t eleNr=0;eleNr<eles.size();eleNr++){
00035 if(&eles[eleNr]!=&obj){
00036
00037 int diEleCutCode = (obj.*cutCodeFunc_)() | (eles[eleNr].*cutCodeFunc_)();
00038 if( (diEleCutCode & cutCode_)==0x0) return true;
00039 }
00040 }
00041 return false;
00042 }
00043
00044
00045
00046 bool EgDiPhoCut::pass(const OffPho& obj,const OffEvt& evt)const
00047 {
00048 const std::vector<OffPho>& phos = evt.phos();
00049 for(size_t phoNr=0;phoNr<phos.size();phoNr++){
00050 if(&phos[phoNr]!=&obj){
00051
00052 int diPhoCutCode = (obj.*cutCodeFunc_)() | (phos[phoNr].*cutCodeFunc_)();
00053 if( (diPhoCutCode & cutCode_)==0x0) return true;
00054 }
00055 }
00056 return false;
00057 }