Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:09:50

0001 #ifndef DQMOFFLINE_TRIGGER_EGHLTOFFEGSEL
0002 #define DQMOFFLINE_TRIGGER_EGHLTOFFEGSEL
0003 
0004 //this class works out which cuts the electron/photon passes/fails
0005 //why am I rolling my own, simply put there is no electron/photon cut class that I know off
0006 //which will allow isolation and id variables to be cut on at the same time and return
0007 //a int with the bits corresponding to cut pass/fail
0008 //also I'm going to need to modify this to keep up with trigger cuts
0009 #include "DQMOffline/Trigger/interface/EgHLTOffEle.h"
0010 #include "DQMOffline/Trigger/interface/EgHLTEgCutValues.h"
0011 
0012 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0013 
0014 #include <iostream>
0015 
0016 namespace edm {
0017   class ParameterSet;
0018 }
0019 
0020 namespace egHLT {
0021   class OffEle;
0022   class OffPho;
0023 
0024   class OffEgSel {
0025   private:
0026     EgCutValues ebCutValues_;
0027     EgCutValues eeCutValues_;
0028 
0029   public:
0030     OffEgSel() = default;  //default, it doesnt to anything
0031     explicit OffEgSel(const edm::ParameterSet& config) { setup(config); }
0032     ~OffEgSel() = default;  //we own nothing so default destructor, copy and assignment okay
0033 
0034     bool passCuts(const OffEle& ele, int cutMask = ~0x0) const { return getCutCode(ele, cutMask) == 0x0; }
0035     int getCutCode(const OffEle& ele, int cutMask = ~0x0) const;
0036     static int getCutCode(const OffEle& ele, const EgCutValues& cuts, int cutMask = ~0x0);
0037 
0038     bool passCuts(const OffPho& pho, int cutMask = ~0x0) const { return getCutCode(pho, cutMask) == 0x0; }
0039     int getCutCode(const OffPho& pho, int cutMask = ~0x0) const;
0040     static int getCutCode(const OffPho& pho, const EgCutValues& cuts, int cutMask = ~0x0);
0041 
0042     void setEBCuts(const EgCutValues& cuts) { ebCutValues_ = cuts; }
0043     void setEECuts(const EgCutValues& cuts) { eeCutValues_ = cuts; }
0044 
0045     const EgCutValues& ebCuts() const { return ebCutValues_; }
0046     const EgCutValues& eeCuts() const { return eeCutValues_; }
0047 
0048     void setup(const edm::ParameterSet&);
0049   };
0050 }  // namespace egHLT
0051 
0052 #endif