CMS 3D CMS Logo

Namespaces | Functions | Variables

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/RecoLocalCalo/HcalRecAlgos/src/ZdcSimpleRecAlgo.cc File Reference

#include "RecoLocalCalo/HcalRecAlgos/interface/ZdcSimpleRecAlgo.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "CalibCalorimetry/HcalAlgos/interface/HcalTimeSlew.h"
#include <algorithm>
#include <iostream>
#include <math.h>

Go to the source code of this file.

Namespaces

namespace  ZdcSimpleRecAlgoImpl

Functions

template<class Digi , class RecHit >
RecHit ZdcSimpleRecAlgoImpl::reco1 (const Digi &digi, const HcalCoder &coder, const HcalCalibrations &calibs, const std::vector< unsigned int > &myNoiseTS, const std::vector< unsigned int > &mySignalTS, bool slewCorrect, const HcalPulseContainmentCorrection *corr, HcalTimeSlew::BiasSetting slewFlavor)
template<class Digi , class RecHit >
RecHit ZdcSimpleRecAlgoImpl::reco2 (const Digi &digi, const HcalCoder &coder, const HcalCalibrations &calibs, const std::vector< unsigned int > &myNoiseTS, const std::vector< unsigned int > &mySignalTS, bool slewCorrect, const HcalPulseContainmentCorrection *corr, HcalTimeSlew::BiasSetting slewFlavor)
static float timeshift_ns_zdc (float wpksamp)

Variables

static const float actual_ns_zdc [num_bins_zdc]
static double MaximumFractionalError = 0.0005
static const int num_bins_zdc = 100
static const float scale_zdc = 0.999683
static const float wpksamp0_zdc = 0.500053

Function Documentation

float timeshift_ns_zdc ( float  wpksamp) [static]

Definition at line 305 of file ZdcSimpleRecAlgo.cc.

References actual_ns_zdc, getHLTprescales::index, num_bins_zdc, scale_zdc, and wpksamp0_zdc.

Referenced by ZdcSimpleRecAlgoImpl::reco1().

                                      {
  float flx = (num_bins_zdc*(wpksamp - wpksamp0_zdc)/scale_zdc);
  int index = (int)flx;
  float yval;
  
  if      (index <    0)        return actual_ns_zdc[0];
  else if (index >= num_bins_zdc-1) return actual_ns_zdc[num_bins_zdc-1];

  // else interpolate:
  float y1       = actual_ns_zdc[index];
  float y2       = actual_ns_zdc[index+1];

  // float delta_x  = 1/(float)num_bins_zdc;
  // yval = y1 + (y2-y1)*(flx-(float)index)/delta_x;

  yval = y1 + (y2-y1)*(flx-(float)index);
  return yval;
}

Variable Documentation

const float actual_ns_zdc[num_bins_zdc] [static]

Definition at line 202 of file ZdcSimpleRecAlgo.cc.

Referenced by timeshift_ns_zdc().

double MaximumFractionalError = 0.0005 [static]

Definition at line 10 of file ZdcSimpleRecAlgo.cc.

Referenced by ZdcSimpleRecAlgo::initPulseCorr().

const int num_bins_zdc = 100 [static]

Definition at line 200 of file ZdcSimpleRecAlgo.cc.

Referenced by timeshift_ns_zdc().

const float scale_zdc = 0.999683 [static]

Definition at line 199 of file ZdcSimpleRecAlgo.cc.

Referenced by timeshift_ns_zdc().

const float wpksamp0_zdc = 0.500053 [static]

Definition at line 198 of file ZdcSimpleRecAlgo.cc.

Referenced by timeshift_ns_zdc().