CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
L1GctConfigProducers Class Reference

#include <L1Trigger/L1GctConfigProducers/interface/L1GctConfigProducers.h>

Inheritance diagram for L1GctConfigProducers:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Types

using ChanMaskReturnType = std::unique_ptr< L1GctChannelMask >
 
using JfParamsReturnType = std::unique_ptr< L1GctJetFinderParams >
 

Public Member Functions

std::vector< double > etToEnergyConversion (const L1CaloGeometry *geom) const
 Legacy nonsense. More...
 
 L1GctConfigProducers (const edm::ParameterSet &)
 
ChanMaskReturnType produceChanMask (const L1GctChannelMaskRcd &)
 
JfParamsReturnType produceJfParams (const L1GctJetFinderParamsRcd &)
 
 ~L1GctConfigProducers () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
ESRecordIndex const * getTokenRecordIndices (unsigned int iIndex) const
 
bool hasMayConsumes () const noexcept
 
size_t numberOfTokenIndices (unsigned int iIndex) const
 
ESProducer const & operator= (const ESProducer &)=delete
 
SerialTaskQueueChainqueue ()
 
template<typename Record >
std::optional< std::vector< ESProxyIndex > > updateFromMayConsumes (unsigned int iIndex, const Record &iRecord) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
 ESProxyFactoryProducer (const ESProxyFactoryProducer &)=delete
 
const ESProxyFactoryProduceroperator= (const ESProxyFactoryProducer &)=delete
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
void createKeyedProxies (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
 DataProxyProvider ()
 
 DataProxyProvider (const DataProxyProvider &)=delete
 
const ComponentDescriptiondescription () const
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const DataProxyProvideroperator= (const DataProxyProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 

Private Attributes

double m_CenJetSeed
 
bool m_convertToEnergy
 
unsigned m_corrFunType
 
unsigned m_EtaBoundry
 
double m_FwdJetSeed
 
double m_htJetThresh
 
double m_htLsb
 
std::vector< std::vector< double > > m_jetCalibFunc
 
unsigned m_metEtaMask
 
unsigned m_mhtEtaMask
 
double m_mhtJetThresh
 
double m_rgnEtLsb
 
std::vector< std::vector< double > > m_tauCalibFunc
 
double m_tauIsoThresh
 
double m_TauJetSeed
 
unsigned m_tetEtaMask
 
unsigned m_thtEtaMask
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Types inherited from edm::ESProxyFactoryProducer
using EventSetupRecordKey = eventsetup::EventSetupRecordKey
 
- Protected Types inherited from edm::eventsetup::DataProxyProvider
using KeyedProxiesVector = std::vector< std::pair< DataKey, std::shared_ptr< DataProxy > >>
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
auto setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord >
auto setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
ESConsumesCollectorT< TRecord > setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
void usesResources (std::vector< std::string > const &)
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
KeyedProxiesVector registerProxies (const EventSetupRecordKey &, unsigned int iovIndex) override
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 47 of file L1GctConfigProducers.h.

Member Typedef Documentation

◆ ChanMaskReturnType

Definition at line 53 of file L1GctConfigProducers.h.

◆ JfParamsReturnType

Definition at line 52 of file L1GctConfigProducers.h.

Constructor & Destructor Documentation

◆ L1GctConfigProducers()

L1GctConfigProducers::L1GctConfigProducers ( const edm::ParameterSet iConfig)

Definition at line 26 of file L1GctConfigProducers.cc.

27  : m_rgnEtLsb(iConfig.getParameter<double>("RctRegionEtLSB")),
28  m_htLsb(iConfig.getParameter<double>("GctHtLSB")),
29  m_CenJetSeed(iConfig.getParameter<double>("JetFinderCentralJetSeed")),
30  m_FwdJetSeed(iConfig.getParameter<double>("JetFinderForwardJetSeed")),
31  m_TauJetSeed(iConfig.getParameter<double>("JetFinderCentralJetSeed")), // no separate tau jet seed yet
32  m_tauIsoThresh(iConfig.getParameter<double>("TauIsoEtThreshold")),
33  m_htJetThresh(iConfig.getParameter<double>("HtJetEtThreshold")),
34  m_mhtJetThresh(iConfig.getParameter<double>("MHtJetEtThreshold")),
35  m_EtaBoundry(7), // not programmable!
36  m_corrFunType(0),
37  m_convertToEnergy(iConfig.getParameter<bool>("ConvertEtValuesToEnergy")),
40  m_metEtaMask(iConfig.getParameter<unsigned>("MEtEtaMask")),
41  m_tetEtaMask(iConfig.getParameter<unsigned>("TEtEtaMask")),
42  m_mhtEtaMask(iConfig.getParameter<unsigned>("MHtEtaMask")),
43  m_thtEtaMask(iConfig.getParameter<unsigned>("HtEtaMask")) {
44  //the following lines are needed to tell the framework what
45  // data is being produced
48 
49  //now do what ever other initialization is needed
50  std::string CalibStyle = iConfig.getParameter<std::string>("CalibrationStyle");
51  edm::ParameterSet calibCoeffs;
52 
53  if (CalibStyle == "PowerSeries") {
54  m_corrFunType = 1;
55  calibCoeffs = iConfig.getParameter<edm::ParameterSet>("PowerSeriesCoefficients");
56  }
57 
58  if (CalibStyle == "ORCAStyle") {
59  m_corrFunType = 2;
60  calibCoeffs = iConfig.getParameter<edm::ParameterSet>("OrcaStyleCoefficients");
61  }
62 
63  if (CalibStyle == "Simple") {
64  m_corrFunType = 3;
65  calibCoeffs = iConfig.getParameter<edm::ParameterSet>("SimpleCoefficients");
66  }
67 
68  if (CalibStyle == "PiecewiseCubic") {
69  m_corrFunType = 4;
70  calibCoeffs = iConfig.getParameter<edm::ParameterSet>("PiecewiseCubicCoefficients");
71  }
72 
73  if (CalibStyle == "PF") {
74  m_corrFunType = 5;
75  calibCoeffs = iConfig.getParameter<edm::ParameterSet>("PFCoefficients");
76  }
77 
78  // check
79  if (CalibStyle != "None") {
80  // Read the coefficients from file
81  // coefficients for non-tau jet corrections
82  for (unsigned i = 0; i < L1GctJetFinderParams::NUMBER_ETA_VALUES; ++i) {
83  std::stringstream ss;
85  ss << "nonTauJetCalib" << i;
86  ss >> str;
87  m_jetCalibFunc.push_back(calibCoeffs.getParameter<std::vector<double> >(str));
88  }
89  // coefficients for tau jet corrections
90  for (unsigned i = 0; i < L1GctJetFinderParams::N_CENTRAL_ETA_VALUES; ++i) {
91  std::stringstream ss;
93  ss << "tauJetCalib" << i;
94  ss >> str;
95  m_tauCalibFunc.push_back(calibCoeffs.getParameter<std::vector<double> >(str));
96  }
97 
98  } else {
99  // No corrections to be applied
100  m_corrFunType = 0; // no correction
101  // Set the vector sizes to those expected by the CalibrationFunction
104  }
105 
106  edm::LogWarning("L1GctConfig") << "Calibration Style option " << CalibStyle << std::endl;
107 }

References edm::ParameterSet::getParameter(), mps_fire::i, m_corrFunType, m_jetCalibFunc, m_tauCalibFunc, L1GctJetFinderParams::N_CENTRAL_ETA_VALUES, L1GctJetFinderParams::NUMBER_ETA_VALUES, produceChanMask(), produceJfParams(), edm::ESProducer::setWhatProduced(), contentValuesCheck::ss, str, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ ~L1GctConfigProducers()

L1GctConfigProducers::~L1GctConfigProducers ( )
override

Definition at line 109 of file L1GctConfigProducers.cc.

109  {
110  // do anything here that needs to be done at desctruction time
111  // (e.g. close files, deallocate resources etc.)
112 }

Member Function Documentation

◆ etToEnergyConversion()

std::vector< double > L1GctConfigProducers::etToEnergyConversion ( const L1CaloGeometry geom) const

Legacy nonsense.

Calculate Et-to-energy conversion factors for eta bins

Definition at line 161 of file L1GctConfigProducers.cc.

161  {
162  // L1CaloGeometry* geom = new L1CaloGeometry();
163  std::vector<double> result;
164  // Factors for central eta bins
165  for (unsigned ieta = 0; ieta < 7; ieta++) {
166  double bineta = geom->etaBinCenter(ieta, true);
167  double factor = 0.5 * (exp(bineta) + exp(-bineta)); // Conversion from eta to cosec(theta)
168  result.push_back(factor);
169  }
170  // Factors for forward eta bins
171  for (unsigned ieta = 0; ieta < 4; ieta++) {
172  double bineta = geom->etaBinCenter(ieta, false);
173  double factor = 0.5 * (exp(bineta) + exp(-bineta)); // Conversion from eta to cosec(theta)
174  result.push_back(factor);
175  }
176  return result;
177 }

References JetChargeProducer_cfi::exp, DQMScaleToClient_cfi::factor, relativeConstraints::geom, LEDCalibrationChannels::ieta, and mps_fire::result.

Referenced by produceJfParams().

◆ produceChanMask()

L1GctConfigProducers::ChanMaskReturnType L1GctConfigProducers::produceChanMask ( const L1GctChannelMaskRcd )

Definition at line 141 of file L1GctConfigProducers.cc.

141  {
143 
144  for (unsigned ieta = 0; ieta < 22; ++ieta) {
145  if (((m_metEtaMask >> ieta) & 0x1) == 1)
146  mask->maskMissingEt(ieta);
147  if (((m_tetEtaMask >> ieta) & 0x1) == 1)
148  mask->maskTotalEt(ieta);
149  if (((m_mhtEtaMask >> ieta) & 0x1) == 1)
150  mask->maskMissingHt(ieta);
151  if (((m_thtEtaMask >> ieta) & 0x1) == 1)
152  mask->maskTotalHt(ieta);
153  }
154 
155  return std::unique_ptr<L1GctChannelMask>(mask);
156 }

References LEDCalibrationChannels::ieta, m_metEtaMask, m_mhtEtaMask, m_tetEtaMask, m_thtEtaMask, L1GctChannelMask::maskMissingEt(), L1GctChannelMask::maskMissingHt(), L1GctChannelMask::maskTotalEt(), L1GctChannelMask::maskTotalHt(), and testProducerWithPsetDescEmpty_cfi::x1.

Referenced by L1GctConfigProducers().

◆ produceJfParams()

L1GctConfigProducers::JfParamsReturnType L1GctConfigProducers::produceJfParams ( const L1GctJetFinderParamsRcd aRcd)

Definition at line 116 of file L1GctConfigProducers.cc.

116  {
117  // get geometry
118  const L1CaloGeometryRecord& geomRcd = aRcd.getRecord<L1CaloGeometryRecord>();
120  geomRcd.get(geom);
121 
122  // construct jet finder params object
123  auto pL1GctJetFinderParams = std::make_unique<L1GctJetFinderParams>(m_rgnEtLsb,
124  m_htLsb,
125  m_CenJetSeed,
126  m_FwdJetSeed,
127  m_TauJetSeed,
131  m_EtaBoundry,
136  etToEnergyConversion(geom.product()));
137 
138  return pL1GctJetFinderParams;
139 }

References etToEnergyConversion(), relativeConstraints::geom, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), m_CenJetSeed, m_convertToEnergy, m_corrFunType, m_EtaBoundry, m_FwdJetSeed, m_htJetThresh, m_htLsb, m_jetCalibFunc, m_mhtJetThresh, m_rgnEtLsb, m_tauCalibFunc, m_tauIsoThresh, and m_TauJetSeed.

Referenced by L1GctConfigProducers().

Member Data Documentation

◆ m_CenJetSeed

double L1GctConfigProducers::m_CenJetSeed
private

Definition at line 64 of file L1GctConfigProducers.h.

Referenced by produceJfParams().

◆ m_convertToEnergy

bool L1GctConfigProducers::m_convertToEnergy
private

Definition at line 72 of file L1GctConfigProducers.h.

Referenced by produceJfParams().

◆ m_corrFunType

unsigned L1GctConfigProducers::m_corrFunType
private

Definition at line 71 of file L1GctConfigProducers.h.

Referenced by L1GctConfigProducers(), and produceJfParams().

◆ m_EtaBoundry

unsigned L1GctConfigProducers::m_EtaBoundry
private

Definition at line 70 of file L1GctConfigProducers.h.

Referenced by produceJfParams().

◆ m_FwdJetSeed

double L1GctConfigProducers::m_FwdJetSeed
private

Definition at line 65 of file L1GctConfigProducers.h.

Referenced by produceJfParams().

◆ m_htJetThresh

double L1GctConfigProducers::m_htJetThresh
private

Definition at line 68 of file L1GctConfigProducers.h.

Referenced by produceJfParams().

◆ m_htLsb

double L1GctConfigProducers::m_htLsb
private

Definition at line 63 of file L1GctConfigProducers.h.

Referenced by produceJfParams().

◆ m_jetCalibFunc

std::vector<std::vector<double> > L1GctConfigProducers::m_jetCalibFunc
private

Definition at line 74 of file L1GctConfigProducers.h.

Referenced by L1GctConfigProducers(), and produceJfParams().

◆ m_metEtaMask

unsigned L1GctConfigProducers::m_metEtaMask
private

Definition at line 77 of file L1GctConfigProducers.h.

Referenced by produceChanMask().

◆ m_mhtEtaMask

unsigned L1GctConfigProducers::m_mhtEtaMask
private

Definition at line 79 of file L1GctConfigProducers.h.

Referenced by produceChanMask().

◆ m_mhtJetThresh

double L1GctConfigProducers::m_mhtJetThresh
private

Definition at line 69 of file L1GctConfigProducers.h.

Referenced by produceJfParams().

◆ m_rgnEtLsb

double L1GctConfigProducers::m_rgnEtLsb
private

Definition at line 62 of file L1GctConfigProducers.h.

Referenced by produceJfParams().

◆ m_tauCalibFunc

std::vector<std::vector<double> > L1GctConfigProducers::m_tauCalibFunc
private

Definition at line 75 of file L1GctConfigProducers.h.

Referenced by L1GctConfigProducers(), and produceJfParams().

◆ m_tauIsoThresh

double L1GctConfigProducers::m_tauIsoThresh
private

Definition at line 67 of file L1GctConfigProducers.h.

Referenced by produceJfParams().

◆ m_TauJetSeed

double L1GctConfigProducers::m_TauJetSeed
private

Definition at line 66 of file L1GctConfigProducers.h.

Referenced by produceJfParams().

◆ m_tetEtaMask

unsigned L1GctConfigProducers::m_tetEtaMask
private

Definition at line 78 of file L1GctConfigProducers.h.

Referenced by produceChanMask().

◆ m_thtEtaMask

unsigned L1GctConfigProducers::m_thtEtaMask
private

Definition at line 80 of file L1GctConfigProducers.h.

Referenced by produceChanMask().

edm::eventsetup::DependentRecordImplementation::getRecord
const DepRecordT getRecord() const
Definition: DependentRecordImplementation.h:50
L1GctConfigProducers::m_convertToEnergy
bool m_convertToEnergy
Definition: L1GctConfigProducers.h:72
mps_fire.i
i
Definition: mps_fire.py:428
L1GctConfigProducers::m_rgnEtLsb
double m_rgnEtLsb
Definition: L1GctConfigProducers.h:62
L1GctChannelMask::maskMissingEt
void maskMissingEt(unsigned ieta)
mask eta range from missing Et sum
Definition: L1GctChannelMask.cc:35
L1GctConfigProducers::m_corrFunType
unsigned m_corrFunType
Definition: L1GctConfigProducers.h:71
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
L1GctConfigProducers::etToEnergyConversion
std::vector< double > etToEnergyConversion(const L1CaloGeometry *geom) const
Legacy nonsense.
Definition: L1GctConfigProducers.cc:161
L1GctConfigProducers::m_EtaBoundry
unsigned m_EtaBoundry
Definition: L1GctConfigProducers.h:70
L1GctConfigProducers::produceChanMask
ChanMaskReturnType produceChanMask(const L1GctChannelMaskRcd &)
Definition: L1GctConfigProducers.cc:141
L1GctConfigProducers::m_FwdJetSeed
double m_FwdJetSeed
Definition: L1GctConfigProducers.h:65
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
L1GctConfigProducers::m_TauJetSeed
double m_TauJetSeed
Definition: L1GctConfigProducers.h:66
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
L1GctConfigProducers::m_CenJetSeed
double m_CenJetSeed
Definition: L1GctConfigProducers.h:64
L1GctConfigProducers::m_htLsb
double m_htLsb
Definition: L1GctConfigProducers.h:63
str
#define str(s)
Definition: TestProcessor.cc:53
edm::ESHandle
Definition: DTSurvey.h:22
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
DQMScaleToClient_cfi.factor
factor
Definition: DQMScaleToClient_cfi.py:8
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:109
L1CaloGeometryRecord
Definition: L1CaloGeometryRecord.h:30
L1GctConfigProducers::m_metEtaMask
unsigned m_metEtaMask
Definition: L1GctConfigProducers.h:77
L1GctChannelMask::maskMissingHt
void maskMissingHt(unsigned ieta)
mask eta range from missing Ht sum
Definition: L1GctChannelMask.cc:45
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
L1GctChannelMask::maskTotalEt
void maskTotalEt(unsigned ieta)
mask eta range from total Et sum
Definition: L1GctChannelMask.cc:30
edm::ParameterSet
Definition: ParameterSet.h:47
L1GctConfigProducers::m_jetCalibFunc
std::vector< std::vector< double > > m_jetCalibFunc
Definition: L1GctConfigProducers.h:74
L1GctConfigProducers::produceJfParams
JfParamsReturnType produceJfParams(const L1GctJetFinderParamsRcd &)
Definition: L1GctConfigProducers.cc:116
L1GctConfigProducers::m_tetEtaMask
unsigned m_tetEtaMask
Definition: L1GctConfigProducers.h:78
L1GctConfigProducers::m_tauIsoThresh
double m_tauIsoThresh
Definition: L1GctConfigProducers.h:67
L1GctChannelMask::maskTotalHt
void maskTotalHt(unsigned ieta)
mask eta range from total Ht sum
Definition: L1GctChannelMask.cc:40
L1GctJetFinderParams::N_CENTRAL_ETA_VALUES
static const unsigned N_CENTRAL_ETA_VALUES
Number of eta bins used in correction.
Definition: L1GctJetFinderParams.h:13
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
mps_fire.result
result
Definition: mps_fire.py:311
L1GctChannelMask
Definition: L1GctChannelMask.h:8
L1GctConfigProducers::m_tauCalibFunc
std::vector< std::vector< double > > m_tauCalibFunc
Definition: L1GctConfigProducers.h:75
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
L1GctConfigProducers::m_htJetThresh
double m_htJetThresh
Definition: L1GctConfigProducers.h:68
L1GctConfigProducers::m_mhtJetThresh
double m_mhtJetThresh
Definition: L1GctConfigProducers.h:69
L1GctConfigProducers::m_thtEtaMask
unsigned m_thtEtaMask
Definition: L1GctConfigProducers.h:80
L1GctJetFinderParams::NUMBER_ETA_VALUES
static const unsigned NUMBER_ETA_VALUES
Number of eta bins used in correction.
Definition: L1GctJetFinderParams.h:12
L1GctConfigProducers::m_mhtEtaMask
unsigned m_mhtEtaMask
Definition: L1GctConfigProducers.h:79