CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Namespaces | Functions | Variables
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

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

305  {
306  float flx = (num_bins_zdc*(wpksamp - wpksamp0_zdc)/scale_zdc);
307  int index = (int)flx;
308  float yval;
309 
310  if (index < 0) return actual_ns_zdc[0];
311  else if (index >= num_bins_zdc-1) return actual_ns_zdc[num_bins_zdc-1];
312 
313  // else interpolate:
314  float y1 = actual_ns_zdc[index];
315  float y2 = actual_ns_zdc[index+1];
316 
317  // float delta_x = 1/(float)num_bins_zdc;
318  // yval = y1 + (y2-y1)*(flx-(float)index)/delta_x;
319 
320  yval = y1 + (y2-y1)*(flx-(float)index);
321  return yval;
322 }
static const float scale_zdc
static const float wpksamp0_zdc
return((rh^lh)&mask)
static const float actual_ns_zdc[num_bins_zdc]
static const int num_bins_zdc

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