#include "RecoLocalCalo/CastorReco/interface/CastorSimpleRecAlgo.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "CalibCalorimetry/CastorCalib/interface/CastorTimeSlew.h"
#include "RecoLocalCalo/HcalRecAlgos/interface/HcalCaloFlagLabels.h"
#include <algorithm>
#include <math.h>
Go to the source code of this file.
Namespaces | |
namespace | CastorSimpleRecAlgoImpl |
Functions | |
template<class Digi , class RecHit > | |
bool | CastorSimpleRecAlgoImpl::corrSaturation (RecHit &rechit, const CastorCoder &coder, const CastorCalibrations &calibs, const Digi &digi, const int &maxADCvalue, const double &satCorrConst, int ifirst, int n) |
template<class Digi > | |
bool | CastorSimpleRecAlgoImpl::isSaturated (const Digi &digi, const int &maxADCvalue, int ifirst, int n) |
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) |
Same as above, but for the HF PMTs. | |
Variables | |
static const float | actual_ns_hf [num_bins_hf] |
constexpr 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] |
Same as above, but for the HF PMTs.
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.
Definition at line 282 of file CastorSimpleRecAlgo.cc.
References actual_ns_hf, getHLTprescales::index, num_bins_hf, scale_hf, and wpksamp0_hf.
Referenced by CastorSimpleRecAlgoImpl::reco().
{ float flx = (num_bins_hf*(wpksamp - wpksamp0_hf)/scale_hf); int index = (int)flx; float yval; if (index < 0) return actual_ns_hf[0]; else if (index >= num_bins_hf-1) return actual_ns_hf[num_bins_hf-1]; // else interpolate: float y1 = actual_ns_hf[index]; float y2 = actual_ns_hf[index+1]; // float delta_x = 1/(float)num_bins_hf; // yval = y1 + (y2-y1)*(flx-(float)index)/delta_x; yval = y1 + (y2-y1)*(flx-(float)index); return yval; }
const float actual_ns_hf[num_bins_hf] [static] |
Definition at line 178 of file CastorSimpleRecAlgo.cc.
Referenced by timeshift_ns_hf().
constexpr double MaximumFractionalError = 0.0005 |
Definition at line 8 of file CastorSimpleRecAlgo.cc.
Referenced by CastorSimpleRecAlgo::CastorSimpleRecAlgo(), HcalSimpleRecAlgo::HcalSimpleRecAlgo(), and ZdcSimpleRecAlgo::initPulseCorr().
const int num_bins_hf = 100 [static] |
Definition at line 176 of file CastorSimpleRecAlgo.cc.
Referenced by timeshift_ns_hf().
const float scale_hf = 0.999301 [static] |
Definition at line 175 of file CastorSimpleRecAlgo.cc.
Referenced by timeshift_ns_hf().
const float wpksamp0_hf = 0.500635 [static] |
Definition at line 174 of file CastorSimpleRecAlgo.cc.
Referenced by timeshift_ns_hf().