File indexing completed on 2024-09-07 04:35:54
0001 #ifndef DataFormats_L1TCalorimeterPhase2_CaloJets_h
0002 #define DataFormats_L1TCalorimeterPhase2_CaloJets_h
0003
0004 #include <vector>
0005 #include <map>
0006 #include <string>
0007 #include <algorithm>
0008 #include "DataFormats/L1Trigger/interface/L1Candidate.h"
0009
0010 namespace l1tp2 {
0011
0012 class CaloJet : public l1t::L1Candidate {
0013 public:
0014 CaloJet() : l1t::L1Candidate(), calibratedPt_(0.), hovere_(0.), iso_(0.), puCorrPt_(0.) {}
0015
0016 CaloJet(const PolarLorentzVector& p4, float calibratedPt, float hovere, float iso, float puCorrPt = 0.)
0017 : l1t::L1Candidate(p4), calibratedPt_(calibratedPt), hovere_(hovere), iso_(iso), puCorrPt_(puCorrPt) {}
0018
0019 inline float calibratedPt() const { return calibratedPt_; };
0020 inline float hovere() const { return hovere_; };
0021 inline float isolation() const { return iso_; };
0022 inline float puCorrPt() const { return puCorrPt_; };
0023 const std::vector<std::vector<float>>& associated_l1EGs() const { return associated_l1EGs_; };
0024
0025 void setExperimentalParams(const std::map<std::string, float>& params) { experimentalParams_ = params; };
0026 void setAssociated_l1EGs(const std::vector<std::vector<float>> l1EGs) { associated_l1EGs_ = l1EGs; };
0027
0028 const std::map<std::string, float>& experimentalParams() const { return experimentalParams_; };
0029
0030 inline float experimentalParam(std::string const& name) const {
0031 auto iter = experimentalParams_.find(name);
0032 if (iter != experimentalParams_.end()) {
0033 return iter->second;
0034 } else {
0035 warningNoMapping(name);
0036 return -99.;
0037 }
0038 };
0039
0040 private:
0041 static void warningNoMapping(std::string const&);
0042
0043 float calibratedPt_;
0044
0045 float hovere_;
0046
0047 float iso_;
0048
0049 float puCorrPt_;
0050
0051 std::map<std::string, float> experimentalParams_;
0052
0053 std::vector<std::vector<float>> associated_l1EGs_;
0054 };
0055
0056
0057 typedef std::vector<l1tp2::CaloJet> CaloJetsCollection;
0058 }
0059 #endif