CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/DQMOffline/Trigger/src/EgHLTDQMCut.cc

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   //first we check if our electron passes our id
00008   if( ((theEle.*cutCodeFunc_)() & cutCode_)!=0x0) return false;
00009 
00010   //new we check that there is another tag in the event (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)
00011   int nrTags=0;
00012   const OffEle* tagEle=NULL;
00013   const std::vector<OffEle>& eles = evt.eles();
00014   //we are looking for an *additional* tag
00015   for(size_t eleNr=0;eleNr<eles.size();eleNr++){
00016     if( ((eles[eleNr].*cutCodeFunc_)() & cutCode_)==0x0 && (bitsToPass_&eles[eleNr].trigBits())==bitsToPass_){
00017       //now a check that the tag is not the same as the probe
00018       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
00019         nrTags++;
00020         tagEle = &eles[eleNr];
00021       }
00022     }
00023   }
00024   if(nrTags==1){ //we are requiring one and only one additional tag (the theEle is automatically excluded from the tag list) 
00025     float mass = (theEle.p4()+tagEle->p4()).mag();
00026     if(mass>minMass_ && mass<maxMass_) return true; //mass requirements
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){ //different electrons
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){ //different phos
00051      
00052       int diPhoCutCode = (obj.*cutCodeFunc_)() | (phos[phoNr].*cutCodeFunc_)();
00053       if( (diPhoCutCode & cutCode_)==0x0) return true;
00054     }
00055   }
00056   return false;
00057 }