#include <L1Trigger/L1GctConfigProducers/interface/L1GctConfigProducers.h>
Public Types | |
typedef boost::shared_ptr < L1GctChannelMask > | ChanMaskReturnType |
typedef boost::shared_ptr < L1GctJetFinderParams > | JfParamsReturnType |
Public Member Functions | |
std::vector< double > | etToEnergyConversion (const L1CaloGeometry *geom) const |
Legacy nonsense. | |
L1GctConfigProducers (const edm::ParameterSet &) | |
ChanMaskReturnType | produceChanMask (const L1GctChannelMaskRcd &) |
JfParamsReturnType | produceJfParams (const L1GctJetFinderParamsRcd &) |
~L1GctConfigProducers () | |
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 |
Description: <one line="" class="" summary>="">
Implementation: <Notes on="" implementation>="">
Definition at line 51 of file L1GctConfigProducers.h.
typedef boost::shared_ptr<L1GctChannelMask> L1GctConfigProducers::ChanMaskReturnType |
Definition at line 57 of file L1GctConfigProducers.h.
typedef boost::shared_ptr<L1GctJetFinderParams> L1GctConfigProducers::JfParamsReturnType |
Definition at line 56 of file L1GctConfigProducers.h.
L1GctConfigProducers::L1GctConfigProducers | ( | const edm::ParameterSet & | iConfig | ) |
Definition at line 25 of file L1GctConfigProducers.cc.
References edm::ParameterSet::getParameter(), i, m_corrFunType, m_jetCalibFunc, m_tauCalibFunc, L1GctJetFinderParams::N_CENTRAL_ETA_VALUES, L1GctJetFinderParams::NUMBER_ETA_VALUES, produceChanMask(), produceJfParams(), and edm::ESProducer::setWhatProduced().
: m_rgnEtLsb(iConfig.getParameter<double>("RctRegionEtLSB")), m_htLsb(iConfig.getParameter<double>("GctHtLSB")), m_CenJetSeed(iConfig.getParameter<double>("JetFinderCentralJetSeed")), m_FwdJetSeed(iConfig.getParameter<double>("JetFinderForwardJetSeed")), m_TauJetSeed(iConfig.getParameter<double>("JetFinderCentralJetSeed")), // no separate tau jet seed yet m_tauIsoThresh(iConfig.getParameter<double>("TauIsoEtThreshold")), m_htJetThresh(iConfig.getParameter<double>("HtJetEtThreshold")), m_mhtJetThresh(iConfig.getParameter<double>("MHtJetEtThreshold")), m_EtaBoundry(7), // not programmable! m_corrFunType(0), m_convertToEnergy (iConfig.getParameter<bool>("ConvertEtValuesToEnergy")), m_jetCalibFunc(), m_tauCalibFunc(), m_metEtaMask(iConfig.getParameter<unsigned>("MEtEtaMask")), m_tetEtaMask(iConfig.getParameter<unsigned>("TEtEtaMask")), m_mhtEtaMask(iConfig.getParameter<unsigned>("MHtEtaMask")), m_thtEtaMask(iConfig.getParameter<unsigned>("HtEtaMask")) { //the following lines are needed to tell the framework what // data is being produced setWhatProduced(this,&L1GctConfigProducers::produceJfParams); setWhatProduced(this,&L1GctConfigProducers::produceChanMask); //now do what ever other initialization is needed std::string CalibStyle = iConfig.getParameter<std::string>("CalibrationStyle"); edm::ParameterSet calibCoeffs; if (CalibStyle == "PowerSeries") { m_corrFunType = 1; calibCoeffs = iConfig.getParameter<edm::ParameterSet>("PowerSeriesCoefficients"); } if (CalibStyle == "ORCAStyle") { m_corrFunType = 2; calibCoeffs = iConfig.getParameter<edm::ParameterSet>("OrcaStyleCoefficients"); } if (CalibStyle == "Simple") { m_corrFunType = 3; calibCoeffs = iConfig.getParameter<edm::ParameterSet>("SimpleCoefficients"); } if (CalibStyle == "PiecewiseCubic") { m_corrFunType = 4; calibCoeffs = iConfig.getParameter<edm::ParameterSet>("PiecewiseCubicCoefficients"); } if (CalibStyle == "PF") { m_corrFunType = 5; calibCoeffs = iConfig.getParameter<edm::ParameterSet>("PFCoefficients"); } // check if (CalibStyle != "None") { // Read the coefficients from file // coefficients for non-tau jet corrections for (unsigned i=0; i<L1GctJetFinderParams::NUMBER_ETA_VALUES; ++i) { std::stringstream ss; std::string str; ss << "nonTauJetCalib" << i; ss >> str; m_jetCalibFunc.push_back(calibCoeffs.getParameter< std::vector<double> >(str)); } // coefficients for tau jet corrections for (unsigned i=0; i<L1GctJetFinderParams::N_CENTRAL_ETA_VALUES; ++i) { std::stringstream ss; std::string str; ss << "tauJetCalib" << i; ss >> str; m_tauCalibFunc.push_back(calibCoeffs.getParameter< std::vector<double> >(str)); } } else { // No corrections to be applied m_corrFunType = 0; // no correction // Set the vector sizes to those expected by the CalibrationFunction m_jetCalibFunc.resize(L1GctJetFinderParams::NUMBER_ETA_VALUES); m_tauCalibFunc.resize(L1GctJetFinderParams::N_CENTRAL_ETA_VALUES); } edm::LogWarning("L1GctConfig") << "Calibration Style option " << CalibStyle << std::endl; }
L1GctConfigProducers::~L1GctConfigProducers | ( | ) |
Definition at line 113 of file L1GctConfigProducers.cc.
{ // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) }
std::vector< double > L1GctConfigProducers::etToEnergyConversion | ( | const L1CaloGeometry * | geom | ) | const |
Legacy nonsense.
Calculate Et-to-energy conversion factors for eta bins
Definition at line 173 of file L1GctConfigProducers.cc.
References L1CaloGeometry::etaBinCenter(), funct::exp(), and query::result.
Referenced by produceJfParams().
{ // L1CaloGeometry* geom = new L1CaloGeometry(); std::vector<double> result; // Factors for central eta bins for (unsigned ieta=0; ieta<7; ieta++) { double bineta = geom->etaBinCenter(ieta, true); double factor = 0.5*(exp(bineta)+exp(-bineta)); // Conversion from eta to cosec(theta) result.push_back(factor); } // Factors for forward eta bins for (unsigned ieta=0; ieta<4; ieta++) { double bineta = geom->etaBinCenter(ieta, false); double factor = 0.5*(exp(bineta)+exp(-bineta)); // Conversion from eta to cosec(theta) result.push_back(factor); } return result; }
L1GctConfigProducers::ChanMaskReturnType L1GctConfigProducers::produceChanMask | ( | const L1GctChannelMaskRcd & | ) |
Definition at line 153 of file L1GctConfigProducers.cc.
References m_metEtaMask, m_mhtEtaMask, m_tetEtaMask, m_thtEtaMask, L1GctChannelMask::maskMissingEt(), L1GctChannelMask::maskMissingHt(), L1GctChannelMask::maskTotalEt(), and L1GctChannelMask::maskTotalHt().
Referenced by L1GctConfigProducers().
{ L1GctChannelMask* mask = new L1GctChannelMask; for (unsigned ieta=0; ieta<22; ++ieta) { if (((m_metEtaMask>>ieta)&0x1)==1) mask->maskMissingEt(ieta); if (((m_tetEtaMask>>ieta)&0x1)==1) mask->maskTotalEt(ieta); if (((m_mhtEtaMask>>ieta)&0x1)==1) mask->maskMissingHt(ieta); if (((m_thtEtaMask>>ieta)&0x1)==1) mask->maskTotalHt(ieta); } return boost::shared_ptr<L1GctChannelMask>(mask); }
L1GctConfigProducers::JfParamsReturnType L1GctConfigProducers::produceJfParams | ( | const L1GctJetFinderParamsRcd & | aRcd | ) |
Definition at line 124 of file L1GctConfigProducers.cc.
References etToEnergyConversion(), relativeConstraints::geom, edm::eventsetup::EventSetupRecord::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().
{ // get geometry const L1CaloGeometryRecord& geomRcd = aRcd.getRecord< L1CaloGeometryRecord >() ; edm::ESHandle< L1CaloGeometry > geom ; geomRcd.get( geom ) ; // construct jet finder params object boost::shared_ptr<L1GctJetFinderParams> pL1GctJetFinderParams = boost::shared_ptr<L1GctJetFinderParams> (new L1GctJetFinderParams(m_rgnEtLsb, m_htLsb, m_CenJetSeed, m_FwdJetSeed, m_TauJetSeed, m_tauIsoThresh, m_htJetThresh, m_mhtJetThresh, m_EtaBoundry, m_corrFunType, m_jetCalibFunc, m_tauCalibFunc, m_convertToEnergy, etToEnergyConversion(geom.product())) ); return pL1GctJetFinderParams ; }
double L1GctConfigProducers::m_CenJetSeed [private] |
Definition at line 68 of file L1GctConfigProducers.h.
Referenced by produceJfParams().
bool L1GctConfigProducers::m_convertToEnergy [private] |
Definition at line 76 of file L1GctConfigProducers.h.
Referenced by produceJfParams().
unsigned L1GctConfigProducers::m_corrFunType [private] |
Definition at line 75 of file L1GctConfigProducers.h.
Referenced by L1GctConfigProducers(), and produceJfParams().
unsigned L1GctConfigProducers::m_EtaBoundry [private] |
Definition at line 74 of file L1GctConfigProducers.h.
Referenced by produceJfParams().
double L1GctConfigProducers::m_FwdJetSeed [private] |
Definition at line 69 of file L1GctConfigProducers.h.
Referenced by produceJfParams().
double L1GctConfigProducers::m_htJetThresh [private] |
Definition at line 72 of file L1GctConfigProducers.h.
Referenced by produceJfParams().
double L1GctConfigProducers::m_htLsb [private] |
Definition at line 67 of file L1GctConfigProducers.h.
Referenced by produceJfParams().
std::vector< std::vector<double> > L1GctConfigProducers::m_jetCalibFunc [private] |
Definition at line 78 of file L1GctConfigProducers.h.
Referenced by L1GctConfigProducers(), and produceJfParams().
unsigned L1GctConfigProducers::m_metEtaMask [private] |
Definition at line 81 of file L1GctConfigProducers.h.
Referenced by produceChanMask().
unsigned L1GctConfigProducers::m_mhtEtaMask [private] |
Definition at line 83 of file L1GctConfigProducers.h.
Referenced by produceChanMask().
double L1GctConfigProducers::m_mhtJetThresh [private] |
Definition at line 73 of file L1GctConfigProducers.h.
Referenced by produceJfParams().
double L1GctConfigProducers::m_rgnEtLsb [private] |
Definition at line 66 of file L1GctConfigProducers.h.
Referenced by produceJfParams().
std::vector< std::vector<double> > L1GctConfigProducers::m_tauCalibFunc [private] |
Definition at line 79 of file L1GctConfigProducers.h.
Referenced by L1GctConfigProducers(), and produceJfParams().
double L1GctConfigProducers::m_tauIsoThresh [private] |
Definition at line 71 of file L1GctConfigProducers.h.
Referenced by produceJfParams().
double L1GctConfigProducers::m_TauJetSeed [private] |
Definition at line 70 of file L1GctConfigProducers.h.
Referenced by produceJfParams().
unsigned L1GctConfigProducers::m_tetEtaMask [private] |
Definition at line 82 of file L1GctConfigProducers.h.
Referenced by produceChanMask().
unsigned L1GctConfigProducers::m_thtEtaMask [private] |
Definition at line 84 of file L1GctConfigProducers.h.
Referenced by produceChanMask().