CMS 3D CMS Logo

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

List of all members.

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

Detailed Description

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

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

Definition at line 51 of file L1GctConfigProducers.h.


Member Typedef Documentation

Definition at line 57 of file L1GctConfigProducers.h.

Definition at line 56 of file L1GctConfigProducers.h.


Constructor & Destructor Documentation

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(), edm::ESProducer::setWhatProduced(), and AlCaHLTBitMon_QueryRunRegistry::string.

                                                                         :
  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.)

}

Member Function Documentation

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)

Member Data Documentation

Definition at line 68 of file L1GctConfigProducers.h.

Referenced by produceJfParams().

Definition at line 76 of file L1GctConfigProducers.h.

Referenced by produceJfParams().

Definition at line 75 of file L1GctConfigProducers.h.

Referenced by L1GctConfigProducers(), and produceJfParams().

Definition at line 74 of file L1GctConfigProducers.h.

Referenced by produceJfParams().

Definition at line 69 of file L1GctConfigProducers.h.

Referenced by produceJfParams().

Definition at line 72 of file L1GctConfigProducers.h.

Referenced by produceJfParams().

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().

Definition at line 81 of file L1GctConfigProducers.h.

Referenced by produceChanMask().

Definition at line 83 of file L1GctConfigProducers.h.

Referenced by produceChanMask().

Definition at line 73 of file L1GctConfigProducers.h.

Referenced by produceJfParams().

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().

Definition at line 71 of file L1GctConfigProducers.h.

Referenced by produceJfParams().

Definition at line 70 of file L1GctConfigProducers.h.

Referenced by produceJfParams().

Definition at line 82 of file L1GctConfigProducers.h.

Referenced by produceChanMask().

Definition at line 84 of file L1GctConfigProducers.h.

Referenced by produceChanMask().