13 static std::unique_ptr<MahiFit>
17 const bool iDynamicPed = conf.
getParameter<
bool> (
"dynamicPed");
18 const double iTS4Thresh = conf.
getParameter<
double> (
"ts4Thresh");
21 const bool iApplyTimeSlew = conf.
getParameter<
bool> (
"applyTimeSlew");
23 const bool iCalculateArrivalTime = conf.
getParameter<
bool> (
"calculateArrivalTime");
24 const double iMeanTime = conf.
getParameter<
double> (
"meanTime");
25 const double iTimeSigmaHPD = conf.
getParameter<
double> (
"timeSigmaHPD");
26 const double iTimeSigmaSiPM = conf.
getParameter<
double> (
"timeSigmaSiPM");
28 const std::vector<int> iActiveBXs = conf.
getParameter<std::vector<int>> (
"activeBXs");
29 const int iNMaxItersMin = conf.
getParameter<
int> (
"nMaxItersMin");
30 const int iNMaxItersNNLS = conf.
getParameter<
int> (
"nMaxItersNNLS");
31 const double iDeltaChiSqThresh = conf.
getParameter<
double> (
"deltaChiSqThresh");
32 const double iNnlsThresh = conf.
getParameter<
double> (
"nnlsThresh");
34 std::unique_ptr<MahiFit>
corr = std::make_unique<MahiFit>();
37 iCalculateArrivalTime, iMeanTime, iTimeSigmaHPD, iTimeSigmaSiPM,
38 iActiveBXs, iNMaxItersMin, iNMaxItersNNLS,
39 iDeltaChiSqThresh, iNnlsThresh);
45 static std::unique_ptr<PulseShapeFitOOTPileupCorrection>
48 const bool iPedestalConstraint = conf.
getParameter<
bool> (
"applyPedConstraint");
49 const bool iTimeConstraint = conf.
getParameter<
bool> (
"applyTimeConstraint");
50 const bool iAddPulseJitter = conf.
getParameter<
bool> (
"applyPulseJitter");
51 const bool iApplyTimeSlew = conf.
getParameter<
bool> (
"applyTimeSlew");
52 const double iTS4Min = conf.
getParameter<
double>(
"ts4Min");
53 const std::vector<double> iTS4Max = conf.
getParameter<std::vector<double>>(
"ts4Max");
54 const double iPulseJitter = conf.
getParameter<
double>(
"pulseJitter");
55 const double iTimeMean = conf.
getParameter<
double>(
"meanTime");
56 const double iTimeSigHPD = conf.
getParameter<
double>(
"timeSigmaHPD");
57 const double iTimeSigSiPM = conf.
getParameter<
double>(
"timeSigmaSiPM");
58 const double iPedMean = conf.
getParameter<
double>(
"meanPed");
59 const double iTMin = conf.
getParameter<
double>(
"timeMin");
60 const double iTMax = conf.
getParameter<
double>(
"timeMax");
61 const std::vector<double> its4Chi2 = conf.
getParameter<std::vector<double>>(
"ts4chi2");
62 const int iFitTimes = conf.
getParameter<
int> (
"fitTimes");
64 if (iTimeConstraint) assert(iTimeSigHPD);
65 if (iTimeConstraint) assert(iTimeSigSiPM);
67 std::unique_ptr<PulseShapeFitOOTPileupCorrection>
corr =
68 std::make_unique<PulseShapeFitOOTPileupCorrection>();
70 corr->setPUParams(iPedestalConstraint, iTimeConstraint, iAddPulseJitter,
71 iApplyTimeSlew, iTS4Min, iTS4Max,
73 iTimeMean,iTimeSigHPD, iTimeSigSiPM, iPedMean,
74 iTMin, iTMax, its4Chi2,
81 static std::unique_ptr<HcalDeterministicFit>
84 const bool iApplyTimeSlew = conf.
getParameter<
bool> (
"applyTimeSlewM3");
85 const int iTimeSlewParsType = conf.
getParameter<
int> (
"timeSlewParsType");
86 const double irespCorrM3 = conf.
getParameter<
double>(
"respCorrM3");
88 std::unique_ptr<HcalDeterministicFit>
fit = std::make_unique<HcalDeterministicFit>();
98 std::unique_ptr<AbsHBHEPhase1Algo>
101 std::unique_ptr<AbsHBHEPhase1Algo>
algo;
105 if (className ==
"SimpleHBHEPhase1Algo")
107 std::unique_ptr<MahiFit> mahi;
108 std::unique_ptr<PulseShapeFitOOTPileupCorrection> m2;
109 std::unique_ptr<HcalDeterministicFit> detFit;
114 "SimpleHBHEPhase1Algo does not allow both Mahi and Method 2 to be turned on together.";
123 algo = std::unique_ptr<AbsHBHEPhase1Algo>(
144 desc.
add<
bool>(
"useM2",
false);
145 desc.
add<
bool>(
"useM3",
true);
146 desc.
add<
bool>(
"useMahi",
true);
147 desc.
add<
int>(
"firstSampleShift", 0);
148 desc.
add<
int>(
"samplesToAdd", 2);
149 desc.
add<
double>(
"correctionPhaseNS", 6.0);
150 desc.
add<
double>(
"tdcTimeShift", 0.0);
151 desc.
add<
bool>(
"correctForPhaseContainment",
true);
152 desc.
add<
bool>(
"applyLegacyHBMCorrection",
true);
153 desc.
add<
bool>(
"calculateArrivalTime",
true);
T getParameter(std::string const &) const
void setAllowAnything()
allow any parameter label/value pairs
std::unique_ptr< AbsHBHEPhase1Algo > parseHBHEPhase1AlgoDescription(const edm::ParameterSet &ps)
static std::unique_ptr< PulseShapeFitOOTPileupCorrection > parseHBHEMethod2Description(const edm::ParameterSet &conf)
edm::ParameterSetDescription fillDescriptionForParseHBHEPhase1Algo()
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static std::unique_ptr< MahiFit > parseHBHEMahiDescription(const edm::ParameterSet &conf)
static std::unique_ptr< HcalDeterministicFit > parseHBHEMethod3Description(const edm::ParameterSet &conf)
std::string className(const T &t)