-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13861 from kpedro88/Phase1-DbHardcode1
Configurable hardcode conditions for HCAL
- Loading branch information
Showing
13 changed files
with
506 additions
and
886 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
CalibCalorimetry/HcalAlgos/interface/HcalHardcodeParameters.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#ifndef HcalAlgos_HcalHardcodeParameters_h | ||
#define HcalAlgos_HcalHardcodeParameters_h | ||
|
||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
|
||
#include <vector> | ||
|
||
class HcalHardcodeParameters { | ||
public: | ||
//default constructor | ||
HcalHardcodeParameters() {} | ||
//construct from values | ||
HcalHardcodeParameters(double pedestal, double pedestalWidth, std::vector<double> gain, std::vector<double> gainWidth, | ||
int qieType, std::vector<double> qieOffset, std::vector<double> qieSlope); | ||
//construct from pset | ||
HcalHardcodeParameters(const edm::ParameterSet & p); | ||
|
||
//destructor | ||
virtual ~HcalHardcodeParameters() {} | ||
|
||
//accessors | ||
//note: all vector accessors use at() in order to throw exceptions for malformed conditions | ||
const double pedestal() const { return pedestal_; } | ||
const double pedestalWidth() const { return pedestalWidth_; } | ||
const double gain(unsigned index) const { return gain_.at(index); } | ||
const double gainWidth(unsigned index) const { return gainWidth_.at(index); } | ||
const int qieType() const { return qieType_; } | ||
const double qieOffset(unsigned range) const { return qieOffset_.at(range); } | ||
const double qieSlope(unsigned range) const { return qieSlope_.at(range); } | ||
|
||
private: | ||
//member variables | ||
double pedestal_, pedestalWidth_; | ||
std::vector<double> gain_, gainWidth_; | ||
int qieType_; | ||
std::vector<double> qieOffset_, qieSlope_; | ||
}; | ||
|
||
#endif |
Oops, something went wrong.