Skip to content

Commit

Permalink
Merge pull request cms-sw#5240 from cms-sw/revert-5204-l1t-updates-7_…
Browse files Browse the repository at this point in the history
…2_X-rebased

Revert "L1t updates 7 2 x rebased"
  • Loading branch information
davidlange6 committed Sep 9, 2014
2 parents d18aa83 + dcf3efe commit 6238f01
Show file tree
Hide file tree
Showing 138 changed files with 4,480 additions and 47,683 deletions.
148 changes: 81 additions & 67 deletions CondFormats/L1TObjects/interface/CaloParams.h
Expand Up @@ -4,7 +4,7 @@
/// Description: Placeholder for calorimeter trigger parameters
///
/// Implementation:
///
///
///
/// \author: Jim Brooke
///
Expand All @@ -20,9 +20,9 @@
#include <cmath>

namespace l1t {

class CaloParams {

public:

CaloParams() {}
Expand Down Expand Up @@ -65,15 +65,16 @@ namespace l1t {

// EG
double egLsb() const { return egLsb_; }
int egSeedThresholdHw() const { return floor(egSeedThreshold_/egLsb_); }
double egSeedThreshold() const { return egSeedThreshold_; }
int egNeighbourThresholdHw() const { return floor(egNeighbourThreshold_/egLsb_); }
double egNeighbourThreshold() const { return egNeighbourThreshold_; }
double egHcalThreshold() const { return egHcalThreshold_; }
int egMaxHcalEtHw() const { return floor(egMaxHcalEt_/egLsb_); }
double egMaxHcalEt() const { return egMaxHcalEt_; }
int egEtToRemoveHECutHw() const {return floor(egEtToRemoveHECut_/egLsb_);}
double egEtToRemoveHECut() const {return egEtToRemoveHECut_;}
l1t::LUT* egMaxHOverELUT() { return egMaxHOverELUT_.get(); }
l1t::LUT* egShapeIdLUT() { return egShapeIdLUT_.get(); }
double egRelativeJetIsolationBarrelCut() const { return egRelativeJetIsolationBarrelCut_; }
double egRelativeJetIsolationEndcapCut() const { return egRelativeJetIsolationEndcapCut_; }
double egMaxHOverE() const { return egMaxHOverE_; }
double egRelativeJetIsolationCut() const { return egRelativeJetIsolationCut_; }
unsigned egIsoAreaNrTowersEta()const{return egIsoAreaNrTowersEta_;}
unsigned egIsoAreaNrTowersPhi()const{return egIsoAreaNrTowersPhi_;}
unsigned egIsoVetoNrTowersPhi()const{return egIsoVetoNrTowersPhi_;}
Expand All @@ -84,19 +85,16 @@ namespace l1t {
l1t::LUT* egIsolationLUT() { return egIsolationLUT_.get(); }
std::string egCalibrationType() const { return egCalibrationType_; }
std::vector<double> egCalibrationParams() { return egCalibrationParams_; }
l1t::LUT* egCalibrationLUT() { return egCalibrationLUT_.get(); }


void setEgLsb(double lsb) { egLsb_ = lsb; }
void setEgSeedThreshold(double thresh) { egSeedThreshold_ = thresh; }
void setEgNeighbourThreshold(double thresh) { egNeighbourThreshold_ = thresh; }
void setEgHcalThreshold(double thresh) { egHcalThreshold_ = thresh; }
void setEgMaxHcalEt(double cut) { egMaxHcalEt_ = cut; }
void setEgEtToRemoveHECut(double thresh) { egEtToRemoveHECut_ = thresh;}
void setEgMaxHOverELUT(std::shared_ptr<LUT> lut) { egMaxHOverELUT_ = lut; }
void setEgShapeIdLUT(std::shared_ptr<LUT> lut) { egShapeIdLUT_ = lut; }
void setEgRelativeJetIsolationBarrelCut(double cutValue) { egRelativeJetIsolationBarrelCut_ = cutValue; }
void setEgRelativeJetIsolationEndcapCut(double cutValue) { egRelativeJetIsolationEndcapCut_ = cutValue; }

void setEgMaxHOverE(double cut) { egMaxHOverE_ = cut; }
void setEgRelativeJetIsolationCut(double cutValue) { egRelativeJetIsolationCut_ = cutValue; }

void setEgIsoAreaNrTowersEta(unsigned iEgIsoAreaNrTowersEta){egIsoAreaNrTowersEta_=iEgIsoAreaNrTowersEta;}
void setEgIsoAreaNrTowersPhi(unsigned iEgIsoAreaNrTowersPhi){egIsoAreaNrTowersPhi_=iEgIsoAreaNrTowersPhi;}
void setEgIsoVetoNrTowersPhi(unsigned iEgIsoVetoNrTowersPhi){egIsoVetoNrTowersPhi_=iEgIsoVetoNrTowersPhi;}
Expand All @@ -107,25 +105,19 @@ namespace l1t {
void setEgIsolationLUT(std::shared_ptr<LUT> lut) { egIsolationLUT_ = lut; }
void setEgCalibrationType(std::string type) { egCalibrationType_ = type; }
void setEgCalibrationParams(std::vector<double> params) { egCalibrationParams_ = params; }
void setEgCalibrationLUT(std::shared_ptr<LUT> lut) { egCalibrationLUT_ = lut; }


// tau
double tauLsb() const { return tauLsb_; }
int tauSeedThresholdHw() const { return floor(tauSeedThreshold_/tauLsb_); }
double tauSeedThreshold() const { return tauSeedThreshold_; }
int tauNeighbourThresholdHw() const { return floor(tauNeighbourThreshold_/tauLsb_); }
double tauNeighbourThreshold() const { return tauNeighbourThreshold_; }
double tauRelativeJetIsolationCut() const { return tauRelativeJetIsolationCut_; }
std::string tauIsoPUSType() const { return tauIsoPUSType_; }
l1t::LUT* tauIsolationLUT() { return tauIsolationLUT_.get(); }
std::string tauCalibrationType() const { return tauCalibrationType_; }
std::vector<double> tauCalibrationParams() { return tauCalibrationParams_; }
l1t::LUT* tauCalibrationLUTBarrelA() { return tauCalibrationLUTBarrelA_.get(); }
l1t::LUT* tauCalibrationLUTBarrelB() { return tauCalibrationLUTBarrelB_.get(); }
l1t::LUT* tauCalibrationLUTBarrelC() { return tauCalibrationLUTBarrelC_.get(); }
l1t::LUT* tauCalibrationLUTEndcapsA() { return tauCalibrationLUTEndcapsA_.get(); }
l1t::LUT* tauCalibrationLUTEndcapsB() { return tauCalibrationLUTEndcapsB_.get(); }
l1t::LUT* tauCalibrationLUTEndcapsC() { return tauCalibrationLUTEndcapsC_.get(); }
l1t::LUT* tauCalibrationLUTEta() { return tauCalibrationLUTEta_.get(); }

void setTauLsb(double lsb) { tauLsb_ = lsb; }
void setTauSeedThreshold(double thresh) { tauSeedThreshold_ = thresh; }
Expand All @@ -135,17 +127,12 @@ namespace l1t {
void setTauIsolationLUT(std::shared_ptr<LUT> lut) { tauIsolationLUT_ = lut; }
void setTauCalibrationType(std::string type) { tauCalibrationType_ = type; }
void setTauCalibrationParams(std::vector<double> params) { tauCalibrationParams_ = params; }
void setTauCalibrationLUTBarrelA(std::shared_ptr<LUT> lut) { tauCalibrationLUTBarrelA_ = lut; }
void setTauCalibrationLUTBarrelB(std::shared_ptr<LUT> lut) { tauCalibrationLUTBarrelB_ = lut; }
void setTauCalibrationLUTBarrelC(std::shared_ptr<LUT> lut) { tauCalibrationLUTBarrelC_ = lut; }
void setTauCalibrationLUTEndcapsA(std::shared_ptr<LUT> lut) { tauCalibrationLUTEndcapsA_ = lut; }
void setTauCalibrationLUTEndcapsB(std::shared_ptr<LUT> lut) { tauCalibrationLUTEndcapsB_ = lut; }
void setTauCalibrationLUTEndcapsC(std::shared_ptr<LUT> lut) { tauCalibrationLUTEndcapsC_ = lut; }
void setTauCalibrationLUTEta(std::shared_ptr<LUT> lut) { tauCalibrationLUTEta_ = lut; }

// jets
double jetLsb() const { return jetLsb_; }
int jetSeedThresholdHw() const { return floor(jetSeedThreshold_/jetLsb_); }
double jetSeedThreshold() const { return jetSeedThreshold_; }
int jetNeighbourThresholdHw() const { return floor(jetNeighbourThreshold_/jetLsb_); }
double jetNeighbourThreshold() const { return jetNeighbourThreshold_; }
std::string jetPUSType() const { return jetPUSType_; }
std::vector<double> jetPUSParams() { return jetPUSParams_; }
Expand All @@ -160,23 +147,52 @@ namespace l1t {
void setJetCalibrationType(std::string type) { jetCalibrationType_ = type; }
void setJetCalibrationParams(std::vector<double> params) { jetCalibrationParams_ = params; }


// sums
double etSumLsb() const { return etSumLsb_; }
int etSumEtaMin(unsigned isum) const;
int etSumEtaMax(unsigned isum) const;
int etSumEtThresholdHw(unsigned isum) const { return floor(etSumEtThreshold(isum)/etSumLsb_); }
double etSumEtThreshold(unsigned isum) const;

void setEtSumLsb(double lsb) { etSumLsb_ = lsb; }
void setEtSumEtaMin(unsigned isum, int eta);
void setEtSumEtaMax(unsigned isum, int eta);
void setEtSumEtThreshold(unsigned isum, double thresh);
void setEtSumEtThreshold(unsigned isum, double thresh);

// print parameters to stream:
void print(std::ostream&) const;
friend std::ostream& operator<<(std::ostream& o, const CaloParams & p) { p.print(o); return o; }



// redundant ?

bool PUSubtract() const { return PUSubtract_; }
std::vector<double> regionSubtraction() const { return regionSubtraction_; }
bool applyJetCalibration() const { return applyJetCalibration_; }
std::vector<double> jetSF() const { return jetSF_; }

void setPUSubtract(bool pusub) { PUSubtract_ = pusub; }
void setregionSubtraction(std::vector<double> regsub) { regionSubtraction_ = regsub; }
void setapplyJetCalibration(bool jetcalib) { applyJetCalibration_ = jetcalib; }
void setjetSF(std::vector<double> jetsf) { jetSF_ = jetsf; }
void setRegionETCutForHT(unsigned etcut) { regionETCutForHT_ = etcut; }
void setRegionETCutForMET(unsigned etcut) { regionETCutForMET_ = etcut; }
void setMinGctEtaForSums(int eta) { minGctEtaForSums_ = eta; }
void setMaxGctEtaForSums(int eta) { maxGctEtaForSums_ = eta; }

void setEmScale(double scale) { emScale_ = scale; }
void setJetScale(double scale) { jetScale_ = scale; }

unsigned int regionETCutForHT() const { return regionETCutForHT_; }
unsigned int regionETCutForMET() const { return regionETCutForMET_; }
int minGctEtaForSums() const { return minGctEtaForSums_; }
int maxGctEtaForSums() const { return maxGctEtaForSums_; }

double emScale() const { return emScale_; }
double jetScale() const { return jetScale_; }

private:

/* Towers */
Expand Down Expand Up @@ -213,7 +229,7 @@ namespace l1t {

// bitmask for storing ECAL/HCAL ratio in tower object
int towerMaskRatio_;

// turn encoding on/off
bool towerDoEncoding_;

Expand Down Expand Up @@ -243,38 +259,29 @@ namespace l1t {
// Et threshold on EG neighbour tower(s)
double egNeighbourThreshold_;

// Et threshold on HCAL for H/E computation
double egHcalThreshold_;

// EG maximum value of HCAL Et
double egMaxHcalEt_;

// Et threshold to remove the H/E cut from the EGammas
double egEtToRemoveHECut_;

// EG maximum value of H/E
double egMaxHOverE_;

// EG maximum values of H/E (indexed by |ieta|, ??)
std::shared_ptr<l1t::LUT> egMaxHOverELUT_;

// Shape identification bits (indexed by |ieta|, shape)
std::shared_ptr<l1t::LUT> egShapeIdLUT_;

// Relative jet isolation cut for EG in the barrel (Stage1Layer2)
double egRelativeJetIsolationBarrelCut_;

// Relative jet isolation cut for EG in the endcap (Stage1Layer2)
double egRelativeJetIsolationEndcapCut_;
// Relative jet isolation cut for EG (Stage1Layer2)
double egRelativeJetIsolationCut_;

// isolation area in eta is seed tower +/- <=egIsoAreaNrTowersPhi
unsigned egIsoAreaNrTowersEta_;
unsigned egIsoAreaNrTowersEta_;

// isolation area in phi is seed tower +/- <=egIsoAreaNrTowersPhi
unsigned egIsoAreaNrTowersPhi_;
unsigned egIsoAreaNrTowersPhi_;

// veto region is seed tower +/- <=egIsoVetoNrTowersPhi
unsigned egIsoVetoNrTowersPhi_;

unsigned egIsoVetoNrTowersPhi_;
// for # towers based PU estimator, estimator is #towers/egIsoPUEstTowerGranularity_
unsigned egIsoPUEstTowerGranularity_;
unsigned egIsoPUEstTowerGranularity_;

// eta range over which # towers is estimated
unsigned egIsoMaxEtaAbsForTowerSum_;
Expand All @@ -287,16 +294,14 @@ namespace l1t {

// EG calibration coefficients
std::vector<double> egCalibrationParams_;
std::shared_ptr<l1t::LUT> egCalibrationLUT_;


// EG isolation PUS
std::string egIsoPUSType_;

// EG isolation LUT (indexed by eta, Et ?)
std::shared_ptr<l1t::LUT> egIsolationLUT_;





/* Tau */

Expand All @@ -308,7 +313,7 @@ namespace l1t {

// Et threshold on tau neighbour towers
double tauNeighbourThreshold_;

// Relative jet isolation cut for Taus (Stage1Layer2)
double tauRelativeJetIsolationCut_;
// Tau isolation PUS
Expand All @@ -322,13 +327,6 @@ namespace l1t {

// Tau calibration coefficients
std::vector<double> tauCalibrationParams_;
std::shared_ptr<l1t::LUT> tauCalibrationLUTBarrelA_;
std::shared_ptr<l1t::LUT> tauCalibrationLUTBarrelB_;
std::shared_ptr<l1t::LUT> tauCalibrationLUTBarrelC_;
std::shared_ptr<l1t::LUT> tauCalibrationLUTEndcapsA_;
std::shared_ptr<l1t::LUT> tauCalibrationLUTEndcapsB_;
std::shared_ptr<l1t::LUT> tauCalibrationLUTEndcapsC_;
std::shared_ptr<l1t::LUT> tauCalibrationLUTEta_;



Expand All @@ -344,7 +342,7 @@ namespace l1t {
double jetNeighbourThreshold_;

// jet PUS scheme ("None" means no PU)
std::string jetPUSType_;
std::string jetPUSType_;

// jet PU params
std::vector<double> jetPUSParams_;
Expand All @@ -357,7 +355,6 @@ namespace l1t {




/* Sums */

// EtSum LSB
Expand All @@ -374,6 +371,23 @@ namespace l1t {




// probbaly redundant with above parameters ?
bool PUSubtract_;
std::vector<double> regionSubtraction_; //pu subtraction look up table, see region_cfi
bool applyJetCalibration_;
std::vector<double> jetSF_; // jet correction table, see jet_sfi

// these are redundant with etSumEtaMin_, etSumEtaMax_, etSumEtThreshold_ etc.
unsigned regionETCutForHT_;
unsigned regionETCutForMET_;
int minGctEtaForSums_;
int maxGctEtaForSums_;

//redundant with L1CaloEtScale for stage 1
// discussion needed for stage 2
double emScale_;
double jetScale_;
};

}// namespace
Expand Down
5 changes: 1 addition & 4 deletions CondFormats/L1TObjects/src/CaloParams.cc
Expand Up @@ -51,14 +51,12 @@ void CaloParams::print(std::ostream& out) const {

out << "Regions" << std::endl;
out << " PUS : " << this->regionPUSType() << std::endl;
out << " LSB : " << this->regionLsb() << std::endl;

out << "EG" << std::endl;
out << " LSB : " << this->egLsb() << std::endl;
out << " Seed thresh : " << this->egSeedThreshold() << std::endl;
out << " Neighbour thresh : " << this->egNeighbourThreshold() << std::endl;
out << " HCAL thresh : " << this->egHcalThreshold() << std::endl;
out << " HCAL max Et : " << this->egMaxHcalEt() << std::endl;
out << " H/E max : " << this->egMaxHOverE() << std::endl;
out << " Iso PUS type : " << this->egIsoPUSType() << std::endl;

out << "Tau" << std::endl;
Expand All @@ -67,7 +65,6 @@ void CaloParams::print(std::ostream& out) const {
out << " Iso PUS type : " << this->tauIsoPUSType() << std::endl;

out << "Jets" << std::endl;
out << " LSB : " << this->jetLsb() << std::endl;
out << " Seed thresh : " << this->jetSeedThreshold() << std::endl;
out << " Neighbour thresh : " << this->jetNeighbourThreshold() << std::endl;
out << " PUS type : " << this->jetPUSType() << std::endl;
Expand Down

0 comments on commit 6238f01

Please sign in to comment.