Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:04:44

0001 #ifndef DATAFORMATS_METRECO_BEAMHALOSUMMARY_H
0002 #define DATAFORMATS_METRECO_BEAMHALOSUMMARY_H
0003 
0004 /*
0005   [class]:  BeamHaloSummary
0006   [authors]: R. Remington, The University of Florida
0007   [description]: Container class that stores Ecal,CSC,Hcal, and Global BeamHalo data
0008   [date]: October 15, 2009
0009 */
0010 
0011 #include "DataFormats/Common/interface/RefVector.h"
0012 #include "DataFormats/Common/interface/Ref.h"
0013 #include "DataFormats/Common/interface/RefProd.h"
0014 
0015 #include "DataFormats/METReco/interface/CSCHaloData.h"
0016 #include "DataFormats/METReco/interface/EcalHaloData.h"
0017 #include "DataFormats/METReco/interface/HcalHaloData.h"
0018 #include "DataFormats/METReco/interface/GlobalHaloData.h"
0019 
0020 #include "DataFormats/DetId/interface/DetId.h"
0021 #include "DataFormats/CaloTowers/interface/CaloTowerDetId.h"
0022 
0023 namespace reco {
0024   class BeamHaloInfoProducer;
0025 
0026   class BeamHaloSummary {
0027     friend class reco::BeamHaloInfoProducer;
0028 
0029   public:
0030     //constructors
0031     BeamHaloSummary();
0032     BeamHaloSummary(CSCHaloData& csc, EcalHaloData& ecal, HcalHaloData& hcal, GlobalHaloData& global);
0033 
0034     //destructor
0035     virtual ~BeamHaloSummary() {}
0036 
0037     const bool HcalLooseHaloId() const { return !HcalHaloReport.empty() ? HcalHaloReport[0] : false; }
0038     const bool HcalTightHaloId() const { return HcalHaloReport.size() > 1 ? HcalHaloReport[1] : false; }
0039 
0040     const bool EcalLooseHaloId() const { return !EcalHaloReport.empty() ? EcalHaloReport[0] : false; }
0041     const bool EcalTightHaloId() const { return EcalHaloReport.size() > 1 ? EcalHaloReport[1] : false; }
0042 
0043     const bool CSCLooseHaloId() const { return !CSCHaloReport.empty() ? CSCHaloReport[0] : false; }
0044     const bool CSCTightHaloId() const { return CSCHaloReport.size() > 1 ? CSCHaloReport[1] : false; }
0045     const bool CSCTightHaloIdTrkMuUnveto() const { return CSCHaloReport.size() > 4 ? CSCHaloReport[4] : false; }
0046     const bool CSCTightHaloId2015() const { return CSCHaloReport.size() > 5 ? CSCHaloReport[5] : false; }
0047 
0048     const bool GlobalLooseHaloId() const { return !GlobalHaloReport.empty() ? GlobalHaloReport[0] : false; }
0049     const bool GlobalTightHaloId() const { return GlobalHaloReport.size() > 1 ? GlobalHaloReport[1] : false; }
0050     const bool GlobalTightHaloId2016() const { return GlobalHaloReport.size() > 2 ? GlobalHaloReport[2] : false; }
0051     const bool GlobalSuperTightHaloId2016() const { return GlobalHaloReport.size() > 3 ? GlobalHaloReport[3] : false; }
0052 
0053     const bool EventSmellsLikeHalo() const {
0054       return HcalLooseHaloId() || EcalLooseHaloId() || CSCLooseHaloId() || GlobalLooseHaloId();
0055     }
0056     const bool LooseId() const { return EventSmellsLikeHalo(); }
0057     const bool TightId() const {
0058       return HcalTightHaloId() || EcalTightHaloId() || CSCTightHaloId() || GlobalTightHaloId();
0059     }
0060     const bool ExtremeTightId() const { return GlobalTightHaloId(); }
0061 
0062     //  Getters
0063     std::vector<char>& GetHcalHaloReport() { return HcalHaloReport; }
0064     const std::vector<char>& GetHcalHaloReport() const { return HcalHaloReport; }
0065 
0066     std::vector<char>& GetEcalHaloReport() { return EcalHaloReport; }
0067     const std::vector<char>& GetEcalHaloReport() const { return EcalHaloReport; }
0068 
0069     std::vector<char>& GetCSCHaloReport() { return CSCHaloReport; }
0070     const std::vector<char>& GetCSCHaloReport() const { return CSCHaloReport; }
0071 
0072     std::vector<char>& GetGlobalHaloReport() { return GlobalHaloReport; }
0073     const std::vector<char>& GetGlobalHaloReport() const { return GlobalHaloReport; }
0074 
0075     std::vector<int>& GetHcaliPhiSuspects() { return HcaliPhiSuspects; }
0076     const std::vector<int>& GetHcaliPhiSuspects() const { return HcaliPhiSuspects; }
0077 
0078     std::vector<int>& GetEcaliPhiSuspects() { return EcaliPhiSuspects; }
0079     const std::vector<int>& GetEcaliPhiSuspects() const { return EcaliPhiSuspects; }
0080 
0081     std::vector<int>& GetGlobaliPhiSuspects() { return GlobaliPhiSuspects; }
0082     const std::vector<int>& GetGlobaliPhiSuspects() const { return GlobaliPhiSuspects; }
0083 
0084     std::vector<HaloTowerStrip>& getProblematicStrips() { return problematicStrips; }
0085     const std::vector<HaloTowerStrip>& getProblematicStrips() const { return problematicStrips; }
0086 
0087   private:
0088     std::vector<char> HcalHaloReport;
0089     std::vector<char> EcalHaloReport;
0090     std::vector<char> CSCHaloReport;
0091     std::vector<char> GlobalHaloReport;
0092 
0093     std::vector<int> HcaliPhiSuspects;
0094     std::vector<int> EcaliPhiSuspects;
0095     std::vector<int> GlobaliPhiSuspects;
0096 
0097     std::vector<HaloTowerStrip> problematicStrips;
0098   };
0099 
0100 }  // namespace reco
0101 
0102 #endif