#include <genlkupmap.h>
Public Member Functions | |
std::pair< double, double > | calcpair (double) |
template<> | |
std::pair< double, double > | calcpair (double truefc) |
template<> | |
std::pair< double, double > | calcpair (double truefc) |
RecoFCcorFactorAlgo (int num_samples, double fixedphase_ns) | |
template<> | |
RecoFCcorFactorAlgo (int num_samples, double fixedphase_ns) | |
template<> | |
RecoFCcorFactorAlgo (int num_samples, double fixedphase_ns) | |
Private Attributes | |
double | fixedphasens_ |
double | integrationwindowns_ |
S | shape_ |
double | time0shiftns_ |
Definition at line 122 of file genlkupmap.h.
RecoFCcorFactorAlgo< S >::RecoFCcorFactorAlgo | ( | int | num_samples, |
double | fixedphase_ns | ||
) |
RecoFCcorFactorAlgo< CastorPulseShapes::Shape >::RecoFCcorFactorAlgo | ( | int | num_samples, |
double | fixedphase_ns | ||
) |
Definition at line 13 of file CastorPulseContainmentCorrection.cc.
References CastorPulseShapes::castorShape(), gather_cfg::cout, and asciidump::s.
{ fixedphasens_ = fixedphase_ns; CastorPulseShapes shapes; shape_=shapes.castorShape(); const int binsize_ns = 25; // First set up controlling parameters for calculating the correction factor: // Integration window size... // integrationwindowns_ = (double)(binsize_ns*num_samples); // First find the point at which time bin "1" exceeds time bin "0", // and call that point "time 0". // for (int shift_ns=0; shift_ns<binsize_ns; shift_ns++) { // Digitize by integrating to find all time sample // bin values for this shift. // double tmin = -(double)shift_ns; double bin0val = (double)shape_.integrate(tmin, tmin+binsize_ns); double bin1val = (double)shape_.integrate(tmin+binsize_ns, tmin+2*binsize_ns); #if 0 char s[80]; sprintf (s, "%7.3f %8.5f %8.5f\n", tmin, bin0val, bin1val); cout << s; #endif if (bin1val > bin0val) { time0shiftns_ = shift_ns; break; } } #if 0 cout << "time0shiftns_ = " << time0shiftns_ << endl; #endif }
RecoFCcorFactorAlgo< HcalPulseShapes::Shape >::RecoFCcorFactorAlgo | ( | int | num_samples, |
double | fixedphase_ns | ||
) |
Definition at line 20 of file HcalPulseContainmentCorrection.cc.
References gather_cfg::cout, HcalPulseShapes::hbShape(), and asciidump::s.
{ fixedphasens_ = fixedphase_ns; HcalPulseShapes shapes; shape_=shapes.hbShape(); const int binsize_ns = 25; // First set up controlling parameters for calculating the correction factor: // Integration window size... // integrationwindowns_ = (double)(binsize_ns*num_samples); // First find the point at which time bin "1" exceeds time bin "0", // and call that point "time 0". // for (int shift_ns=0; shift_ns<binsize_ns; shift_ns++) { // Digitize by integrating to find all time sample // bin values for this shift. // double tmin = -(double)shift_ns; double bin0val = (double)shape_.integrate(tmin, tmin+binsize_ns); double bin1val = (double)shape_.integrate(tmin+binsize_ns, tmin+2*binsize_ns); #if 0 char s[80]; sprintf (s, "%7.3f %8.5f %8.5f\n", tmin, bin0val, bin1val); cout << s; #endif if (bin1val > bin0val) { time0shiftns_ = shift_ns; break; } } #if 0 cout << "time0shiftns_ = " << time0shiftns_ << endl; #endif }
std::pair<double,double> RecoFCcorFactorAlgo< S >::calcpair | ( | double | ) |
std::pair< double, double > RecoFCcorFactorAlgo< HcalPulseShapes::Shape >::calcpair | ( | double | truefc | ) |
Definition at line 63 of file HcalPulseContainmentCorrection.cc.
References gather_cfg::cout, HcalTimeSlew::delay(), funct::integral(), max(), HcalTimeSlew::Medium, asciidump::s, and tmax.
{ double timeslew_ns = HcalTimeSlew::delay(std::max(0.0,(double)truefc), HcalTimeSlew::Medium); double shift_ns = fixedphasens_ - time0shiftns_ + timeslew_ns; double tmin = -shift_ns; double tmax = tmin+integrationwindowns_; double integral = shape_.integrate( tmin, tmax ); double corfactor = 1.0/integral; double recofc = (double)truefc * integral; #if 0 char s[80]; sprintf (s, "%8.2f %8.4f %8.4f %8.5f %8.5f %8.5f ", truefc, tmin, tmax, integral, corfactor, recofc); cout << s; #endif std::pair<double,double> thepair(recofc,corfactor); return thepair; }
std::pair< double, double > RecoFCcorFactorAlgo< CastorPulseShapes::Shape >::calcpair | ( | double | truefc | ) |
Definition at line 55 of file CastorPulseContainmentCorrection.cc.
References gather_cfg::cout, CastorTimeSlew::delay(), funct::integral(), max(), CastorTimeSlew::Medium, asciidump::s, and tmax.
{ double timeslew_ns = CastorTimeSlew::delay(std::max(0.0,(double)truefc), CastorTimeSlew::Medium); double shift_ns = fixedphasens_ - time0shiftns_ + timeslew_ns; double tmin = -shift_ns; double tmax = tmin+integrationwindowns_; double integral = shape_.integrate( tmin, tmax ); double corfactor = 1.0/integral; double recofc = (double)truefc * integral; #if 0 char s[80]; sprintf (s, "%8.2f %8.4f %8.4f %8.5f %8.5f %8.5f ", truefc, tmin, tmax, integral, corfactor, recofc); cout << s; #endif std::pair<double,double> thepair(recofc,corfactor); return thepair; }
double RecoFCcorFactorAlgo< S >::fixedphasens_ [private] |
Definition at line 130 of file genlkupmap.h.
double RecoFCcorFactorAlgo< S >::integrationwindowns_ [private] |
Definition at line 131 of file genlkupmap.h.
S RecoFCcorFactorAlgo< S >::shape_ [private] |
Definition at line 133 of file genlkupmap.h.
double RecoFCcorFactorAlgo< S >::time0shiftns_ [private] |
Definition at line 132 of file genlkupmap.h.