#include "RecoLocalCalo/CastorReco/interface/CastorSimpleRecAlgo.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "CalibCalorimetry/CastorCalib/interface/CastorTimeSlew.h"
#include <algorithm>
#include <math.h>
Go to the source code of this file.
Namespaces | |
namespace | CastorSimpleRecAlgoImpl |
Functions | |
template<class Digi, class RecHit> | |
RecHit | CastorSimpleRecAlgoImpl::reco (const Digi &digi, const CastorCoder &coder, const CastorCalibrations &calibs, int ifirst, int n, bool slewCorrect, const CastorPulseContainmentCorrection *corr, CastorTimeSlew::BiasSetting slewFlavor) |
static float | timeshift_ns_hf (float wpksamp) |
Timeshift correction for HPDs based on the position of the peak ADC measurement. | |
Variables | |
static const float | actual_ns_hf [num_bins_hf] |
static double | MaximumFractionalError = 0.0005 |
static const int | num_bins_hf = 100 |
static const float | scale_hf = 0.999301 |
static const float | wpksamp0_hf = 0.500635 |
float timeshift_ns_hf | ( | float | wpksamp | ) | [static] |
Timeshift correction for HPDs based on the position of the peak ADC measurement.
Allows for an accurate determination of the relative phase of the pulse shape from the HPD. Calculated based on a weighted sum of the -1,0,+1 samples relative to the peak as follows: wpksamp = (0*sample[0] + 1*sample[1] + 2*sample[2]) / (sample[0] + sample[1] + sample[2]) where sample[1] is the maximum ADC sample value. Same as above, but for the HF PMTs.
Definition at line 204 of file CastorSimpleRecAlgo.cc.
References actual_ns_hf, index, int, num_bins_hf, scale_hf, and wpksamp0_hf.
Referenced by CastorSimpleRecAlgoImpl::reco(), and HcalSimpleRecAlgo::reconstruct().
00204 { 00205 float flx = (num_bins_hf*(wpksamp - wpksamp0_hf)/scale_hf); 00206 int index = (int)flx; 00207 float yval; 00208 00209 if (index < 0) return actual_ns_hf[0]; 00210 else if (index >= num_bins_hf-1) return actual_ns_hf[num_bins_hf-1]; 00211 00212 // else interpolate: 00213 float y1 = actual_ns_hf[index]; 00214 float y2 = actual_ns_hf[index+1]; 00215 00216 // float delta_x = 1/(float)num_bins_hf; 00217 // yval = y1 + (y2-y1)*(flx-(float)index)/delta_x; 00218 00219 yval = y1 + (y2-y1)*(flx-(float)index); 00220 return yval; 00221 }
const float actual_ns_hf[num_bins_hf] [static] |
double MaximumFractionalError = 0.0005 [static] |
Definition at line 7 of file CastorSimpleRecAlgo.cc.
Referenced by CastorSimpleRecAlgo::CastorSimpleRecAlgo(), and HcalSimpleRecAlgo::HcalSimpleRecAlgo().
const int num_bins_hf = 100 [static] |
const float scale_hf = 0.999301 [static] |
const float wpksamp0_hf = 0.500635 [static] |