CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
PulseShapeFitOOTPileupCorrection Class Reference

#include <PulseShapeFitOOTPileupCorrection.h>

Public Member Functions

void phase1Apply (const HBHEChannelInfo &channelData, float &reconstructedEnergy, float &reconstructedTime, bool &useTriple, float &chi2) const
 
 PulseShapeFitOOTPileupCorrection ()
 
void resetPulseShapeTemplate (const HcalPulseShapes::Shape &ps, unsigned nSamples)
 
void setPulseShapeTemplate (const HcalPulseShapes::Shape &ps, bool isHPD, unsigned nSamples, const HcalTimeSlew *hcalTimeSlewDelay)
 
void setPUParams (bool iPedestalConstraint, bool iTimeConstraint, bool iAddPulseJitter, bool iApplyTimeSlew, double iTS4Min, const std::vector< double > &iTS4Max, double iPulseJitter, double iTimeMean, double iTimeSigHPD, double iTimeSigSiPM, double iPedMean, double iTMin, double iTMax, const std::vector< double > &its4Chi2, HcalTimeSlew::BiasSetting slewFlavor, int iFitTimes)
 
 ~PulseShapeFitOOTPileupCorrection ()
 

Public Attributes

const HcalPulseShapes::ShapecurrentPulseShape_ = nullptr
 
const HcalTimeSlewhcalTimeSlewDelay_ = nullptr
 
double tsDelay1GeV_ = 0
 

Private Member Functions

void fit (int iFit, float &timevalfit, float &chargevalfit, float &pedvalfit, float &chi2, bool &fitStatus, double &iTSMax, const double &iTSTOTen, double *iEnArr, unsigned(&iBX)[3]) const
 
int pulseShapeFit (const double *energyArr, const double *pedenArr, const double *chargeArr, const double *pedArr, const double *gainArr, const double tsTOTen, std::vector< float > &fitParsVec, const double *ADCnoise, unsigned int soi) const
 

Private Attributes

bool addPulseJitter_
 
bool applyTimeSlew_
 
double chargeThreshold_
 
int cntsetPulseShape
 
std::unique_ptr< ROOT::Math::Functor > dpfunctor_
 
int fitTimes_
 
PSFitter::HybridMinimizerhybridfitter
 
std::array< double, HcalConst::maxSamplesiniTimesArr
 
bool isCurrentChannelHPD_
 
bool pedestalConstraint_
 
double pedMean_
 
double pedSig_
 
std::unique_ptr< FitterFuncs::PulseShapeFunctorpsfPtr_
 
double pulseJitter_
 
HcalTimeSlew::BiasSetting slewFlavor_
 
std::unique_ptr< ROOT::Math::Functor > spfunctor_
 
bool timeConstraint_
 
double timeMean_
 
double timeSig_
 
double timeSigHPD_
 
double timeSigSiPM_
 
std::unique_ptr< ROOT::Math::Functor > tpfunctor_
 
double ts4Chi2_
 
double ts4Max_
 
double ts4Min_
 
int TSMax_
 
int TSMin_
 
bool unConstrainedFit_
 
std::vector< double > vts4Chi2_
 
std::vector< double > vts4Max_
 

Detailed Description

Definition at line 23 of file PulseShapeFitOOTPileupCorrection.h.

Constructor & Destructor Documentation

◆ PulseShapeFitOOTPileupCorrection()

PulseShapeFitOOTPileupCorrection::PulseShapeFitOOTPileupCorrection ( )

Definition at line 8 of file PulseShapeFitOOTPileupCorrection.cc.

9  : cntsetPulseShape(0),
10  psfPtr_(nullptr),
11  spfunctor_(nullptr),
12  dpfunctor_(nullptr),
13  tpfunctor_(nullptr),
14  TSMin_(0),
15  TSMax_(0),
16  vts4Chi2_(0),
17  pedestalConstraint_(false),
18  timeConstraint_(false),
19  addPulseJitter_(false),
20  applyTimeSlew_(false),
21  ts4Min_(0),
22  vts4Max_(0),
23  pulseJitter_(0),
24  timeMean_(0),
25  timeSig_(0),
26  pedMean_(0) {
28  iniTimesArr = {{-100, -75, -50, -25, 0, 25, 50, 75, 100, 125}};
29 }

References hybridfitter, iniTimesArr, and PSFitter::HybridMinimizer::kMigrad.

◆ ~PulseShapeFitOOTPileupCorrection()

PulseShapeFitOOTPileupCorrection::~PulseShapeFitOOTPileupCorrection ( )

Definition at line 31 of file PulseShapeFitOOTPileupCorrection.cc.

31  {
32  if (hybridfitter)
33  delete hybridfitter;
34 }

References hybridfitter.

Member Function Documentation

◆ fit()

void PulseShapeFitOOTPileupCorrection::fit ( int  iFit,
float &  timevalfit,
float &  chargevalfit,
float &  pedvalfit,
float &  chi2,
bool &  fitStatus,
double &  iTSMax,
const double &  iTSTOTen,
double *  iEnArr,
unsigned(&)  iBX[3] 
) const
private

Definition at line 194 of file PulseShapeFitOOTPileupCorrection.cc.

203  {
204  int n = 3;
205  if (iFit == 2)
206  n = 5; //Two Pulse Fit
207  if (iFit == 3)
208  n = 7; //Three Pulse Fit
209  //Step 1 Single Pulse fit
210  float pedMax = iTSMax; //=> max timeslice
211  float tMin = TSMin_; //Fitting Time Min
212  float tMax = TSMax_; //Fitting Time Max
213  //Checks to make sure fitting happens
214  if (pedMax < 1.)
215  pedMax = 1.;
216  // Set starting values andf step sizes for parameters
217  double vstart[n];
218  for (int i = 0; i < int((n - 1) / 2); i++) {
219  vstart[2 * i + 0] = iniTimesArr[iBX[i]] + timeMean_;
220  vstart[2 * i + 1] = iEnArr[iBX[i]];
221  }
222  vstart[n - 1] = pedMean_;
223 
224  double step[n];
225  for (int i = 0; i < n; i++)
226  step[i] = 0.1;
227 
228  if (iFit == 1)
230  if (iFit == 2)
232  if (iFit == 3)
234  hybridfitter->Clear();
235  //Times and amplitudes
236  for (int i = 0; i < int((n - 1) / 2); i++) {
238  varNames[2 * i + 0],
239  vstart[0 + i * 2],
240  step[0 + i * 2],
241  iniTimesArr[iBX[i]] + tMin,
242  iniTimesArr[iBX[i]] + tMax);
244  1 + i * 2, varNames[2 * i + 1], vstart[1 + i * 2], step[1 + i * 2], 0, 1.2 * iTSTOTEn);
245  //Secret Option to fix the time
246  if (timeSig_ < 0)
247  hybridfitter->SetFixedVariable(0 + i * 2, varNames[2 * i + 0], vstart[0 + i * 2]);
248  }
249  //Pedestal
250  if (vstart[n - 1] > std::abs(pedMax))
251  vstart[n - 1] = pedMax;
252  hybridfitter->SetLimitedVariable(n - 1, varNames[n - 1], vstart[n - 1], step[n - 1], -pedMax, pedMax);
253  //Secret Option to fix the pedestal
254  if (pedSig_ < 0)
255  hybridfitter->SetFixedVariable(n - 1, varNames[n - 1], vstart[n - 1]);
256  //a special number to label the initial condition
257  chi2 = -1;
258  //3 fits why?!
259  const double *results = nullptr;
260  for (int tries = 0; tries <= 3; ++tries) {
261  if (fitTimes_ != 2 || tries != 1) {
263  fitStatus = hybridfitter->Minimize();
264  }
265  double chi2valfit = hybridfitter->MinValue();
266  const double *newresults = hybridfitter->X();
267  if (chi2 == -1 || chi2 > chi2valfit + 0.01) {
268  results = newresults;
269  chi2 = chi2valfit;
270  if (tries == 0 && fitTimes_ == 1)
271  break;
272  if (tries == 1 && (fitTimes_ == 2 || fitTimes_ == 3))
273  break;
274  if (tries == 2 && fitTimes_ == 4)
275  break;
276  if (tries == 3 && fitTimes_ == 5)
277  break;
278  //Secret option to speed up the fit => perhaps we should drop this
279  if (timeSig_ < 0 || pedSig_ < 0)
280  break;
281  if (tries == 0) {
283  fitStatus = hybridfitter->Minimize();
284  } else if (tries == 1) {
285  hybridfitter->SetStrategy(1);
286  } else if (tries == 2) {
287  hybridfitter->SetStrategy(2);
288  }
289  } else {
290  break;
291  }
292  }
293  assert(results);
294 
295  timevalfit = results[0];
296  chargevalfit = results[1];
297  pedvalfit = results[n - 1];
298 }

References funct::abs(), cms::cuda::assert(), hltPixelTracks_cff::chi2, PSFitter::HybridMinimizer::Clear(), dpfunctor_, fitTimes_, hybridfitter, mps_fire::i, iniTimesArr, createfilelist::int, PSFitter::HybridMinimizer::kMigrad, PSFitter::HybridMinimizer::kScan, PSFitter::HybridMinimizer::Minimize(), PSFitter::HybridMinimizer::MinValue(), dqmiodumpmetadata::n, pedMean_, pedSig_, bookConverter::results, PSFitter::HybridMinimizer::SetFixedVariable(), PSFitter::HybridMinimizer::SetFunction(), PSFitter::HybridMinimizer::SetLimitedVariable(), PSFitter::HybridMinimizer::SetMinimizerType(), spfunctor_, timeMean_, timeSig_, tpfunctor_, TSMax_, TSMin_, varNames, and PSFitter::HybridMinimizer::X().

Referenced by trackingPlots.Iteration::modules(), and pulseShapeFit().

◆ phase1Apply()

void PulseShapeFitOOTPileupCorrection::phase1Apply ( const HBHEChannelInfo channelData,
float &  reconstructedEnergy,
float &  reconstructedTime,
bool &  useTriple,
float &  chi2 
) const

Definition at line 300 of file PulseShapeFitOOTPileupCorrection.cc.

304  {
305  psfPtr_->setDefaultcntNANinfit();
306 
307  const unsigned cssize = channelData.nSamples();
308  const unsigned int soi = channelData.soi();
309 
310  // initialize arrays to be zero
311  double chargeArr[HcalConst::maxSamples] = {}, pedArr[HcalConst::maxSamples] = {}, gainArr[HcalConst::maxSamples] = {};
312  double energyArr[HcalConst::maxSamples] = {}, pedenArr[HcalConst::maxSamples] = {};
313  double noiseADCArr[HcalConst::maxSamples] = {};
314  double noiseArrSq[HcalConst::maxSamples] = {};
315  double noisePHArr[HcalConst::maxSamples] = {};
316  double tsTOT = 0, tstrig = 0; // in fC
317  double tsTOTen = 0; // in GeV
318 
319  // go over the time slices
320  for (unsigned int ip = 0; ip < cssize; ++ip) {
321  if (ip >= (unsigned)HcalConst::maxSamples)
322  continue; // Too many samples than what we wanna fit (10 is enough...) -> skip them
323 
324  // const int capid = channelData.capid(); // not needed
325  double charge = channelData.tsRawCharge(ip);
326  double ped = channelData.tsPedestal(ip);
327  double gain = channelData.tsGain(ip);
328 
329  double energy = charge * gain;
330  double peden = ped * gain;
331 
332  chargeArr[ip] = charge;
333  pedArr[ip] = ped;
334  gainArr[ip] = gain;
335  energyArr[ip] = energy;
336  pedenArr[ip] = peden;
337 
338  // quantization noise from the ADC (QIE8 or QIE10/11)
339  noiseADCArr[ip] = (1. / sqrt(12)) * channelData.tsDFcPerADC(ip);
340 
341  // Photo statistics uncertainties
342  // sigmaFC/FC = 1/sqrt(Ne);
343  // Note2. (from kPedro): the output number of photoelectrons after smearing is treated very differently for SiPMs: *each* pe is assigned a different time based on a random generation from the Y11 pulse plus the SimHit time. In HPDs, the overall pulse is shaped all at once using just the SimHit time.
344 
345  noisePHArr[ip] = 0;
346  if ((charge - ped) > channelData.tsPedestalWidth(ip)) {
347  noisePHArr[ip] = sqrt((charge - ped) * channelData.fcByPE());
348  }
349 
350  // sum all in quadrature
351  noiseArrSq[ip] = noiseADCArr[ip] * noiseADCArr[ip] +
352  channelData.tsPedestalWidth(ip) * channelData.tsPedestalWidth(ip) +
353  noisePHArr[ip] * noisePHArr[ip];
354 
355  tsTOT += charge - ped;
356  tsTOTen += energy - peden;
357  if (ip == soi || ip == soi + 1) {
358  tstrig += charge - ped;
359  }
360  }
361 
362  double averagePedSig2GeV =
363  0.25 *
364  (channelData.tsPedestalWidth(0) * channelData.tsPedestalWidth(0) * channelData.tsGain(0) * channelData.tsGain(0) +
365  channelData.tsPedestalWidth(1) * channelData.tsPedestalWidth(1) * channelData.tsGain(1) * channelData.tsGain(1) +
366  channelData.tsPedestalWidth(2) * channelData.tsPedestalWidth(2) * channelData.tsGain(2) * channelData.tsGain(2) +
367  channelData.tsPedestalWidth(3) * channelData.tsPedestalWidth(3) * channelData.tsGain(3) * channelData.tsGain(3));
368 
369  // redefine the invertpedSig2
370  psfPtr_->setinvertpedSig2(1. / (averagePedSig2GeV));
371 
372  if (channelData.hasTimeInfo()) {
373  ts4Chi2_ = vts4Chi2_[1];
374  if (channelData.id().depth() == 1)
375  ts4Max_ = vts4Max_[1];
376  else
377  ts4Max_ = vts4Max_[2];
378 
379  } else {
380  ts4Max_ = vts4Max_[0];
381  ts4Chi2_ = vts4Chi2_[0];
382  }
383 
384  std::vector<float> fitParsVec;
385  if (tstrig >= ts4Min_ && tsTOTen > 0.) { //Two sigma from 0
386  pulseShapeFit(energyArr, pedenArr, chargeArr, pedArr, gainArr, tsTOTen, fitParsVec, noiseArrSq, channelData.soi());
387  } else {
388  fitParsVec.clear();
389  fitParsVec.push_back(0.); //charge
390  fitParsVec.push_back(-9999); // time
391  fitParsVec.push_back(0.); // ped
392  fitParsVec.push_back(-9999); // chi2
393  fitParsVec.push_back(false); // triple
394  }
395 
396  reconstructedEnergy = fitParsVec[0];
397  reconstructedTime = fitParsVec[1];
398  chi2 = fitParsVec[3];
399  useTriple = fitParsVec[4];
400 }

References ALCARECOTkAlJpsiMuMu_cff::charge, hltPixelTracks_cff::chi2, HcalDetId::depth(), HCALHighEnergyHPDFilter_cfi::energy, HBHEChannelInfo::fcByPE(), PedestalClient_cfi::gain, HBHEChannelInfo::hasTimeInfo(), HBHEChannelInfo::id(), HcalConst::maxSamples, HBHEChannelInfo::nSamples(), psfPtr_, pulseShapeFit(), HBHEChannelInfo::soi(), mathSSE::sqrt(), ts4Chi2_, ts4Max_, ts4Min_, HBHEChannelInfo::tsDFcPerADC(), HBHEChannelInfo::tsGain(), HBHEChannelInfo::tsPedestal(), HBHEChannelInfo::tsPedestalWidth(), HBHEChannelInfo::tsRawCharge(), vts4Chi2_, and vts4Max_.

Referenced by SimpleHBHEPhase1Algo::reconstruct().

◆ pulseShapeFit()

int PulseShapeFitOOTPileupCorrection::pulseShapeFit ( const double *  energyArr,
const double *  pedenArr,
const double *  chargeArr,
const double *  pedArr,
const double *  gainArr,
const double  tsTOTen,
std::vector< float > &  fitParsVec,
const double *  ADCnoise,
unsigned int  soi 
) const
private

Definition at line 110 of file PulseShapeFitOOTPileupCorrection.cc.

118  {
119  double tsMAX = 0;
121  tmperry2[HcalConst::maxSamples], tmpslew[HcalConst::maxSamples];
122  double tstrig = 0; // in fC
123  for (unsigned int i = 0; i < HcalConst::maxSamples; ++i) {
124  tmpx[i] = i;
125  tmpy[i] = energyArr[i] - pedenArr[i];
126  //Add Time Slew !!! does this need to be pedestal subtracted
127  tmpslew[i] = 0;
128  if (applyTimeSlew_) {
129  if (chargeArr[i] <= 1.0)
130  tmpslew[i] = tsDelay1GeV_;
131  else
132  tmpslew[i] = hcalTimeSlewDelay_->delay(chargeArr[i], slewFlavor_);
133  }
134 
135  // add the noise components
136  tmperry2[i] = noiseArrSq[i];
137 
138  //Propagate it through
139  tmperry2[i] *= (gainArr[i] * gainArr[i]); //Convert from fC to GeV
140  tmperry[i] = sqrt(tmperry2[i]);
141 
142  if (std::abs(energyArr[i]) > tsMAX)
143  tsMAX = std::abs(tmpy[i]);
144  if (i == soi || i == (soi + 1)) {
145  tstrig += chargeArr[i] - pedArr[i];
146  }
147  }
148  psfPtr_->setpsFitx(tmpx);
149  psfPtr_->setpsFity(tmpy);
150  psfPtr_->setpsFiterry(tmperry);
151  psfPtr_->setpsFiterry2(tmperry2);
152  psfPtr_->setpsFitslew(tmpslew);
153 
154  //Fit 1 single pulse
155  float timevalfit = 0;
156  float chargevalfit = 0;
157  float pedvalfit = 0;
158  float chi2 = 999; //cannot be zero
159  bool fitStatus = false;
160  bool useTriple = false;
161 
162  unsigned BX[3] = {soi, soi + 1, soi - 1};
163  if (ts4Chi2_ != 0)
164  fit(1, timevalfit, chargevalfit, pedvalfit, chi2, fitStatus, tsMAX, tsTOTen, tmpy, BX);
165  // Based on the pulse shape ( 2. likely gives the same performance )
166  if (tmpy[soi - 2] > 3. * tmpy[soi - 1])
167  BX[2] = soi - 2;
168  // Only do three-pulse fit when tstrig < ts4Max_, otherwise one-pulse fit is used (above)
169  if (chi2 > ts4Chi2_ && tstrig < ts4Max_) { //fails chi2 cut goes straight to 3 Pulse fit
170  fit(3, timevalfit, chargevalfit, pedvalfit, chi2, fitStatus, tsMAX, tsTOTen, tmpy, BX);
171  useTriple = true;
172  }
173 
174  timevalfit -= (int(soi) - HcalConst::shiftTS) * HcalConst::nsPerBX;
175 
176  /*
177  if(chi2 > ts345Chi2_) { //fails do two pulse chi2 for TS5
178  BX[1] = 5;
179  fit(3,timevalfit,chargevalfit,pedvalfit,chi2,fitStatus,tsMAX,tsTOTen,BX);
180  }
181  */
182  //Fix back the timeslew
183  //if(applyTimeSlew_) timevalfit+=HcalTimeSlew::delay(std::max(1.0,chargeArr[4]),slewFlavor_);
184  int outfitStatus = (fitStatus ? 1 : 0);
185  fitParsVec.clear();
186  fitParsVec.push_back(chargevalfit);
187  fitParsVec.push_back(timevalfit);
188  fitParsVec.push_back(pedvalfit);
189  fitParsVec.push_back(chi2);
190  fitParsVec.push_back(useTriple);
191  return outfitStatus;
192 }

References funct::abs(), applyTimeSlew_, L1TStage2uGTEmulatorClient_cff::BX, hltPixelTracks_cff::chi2, HcalTimeSlew::delay(), fit(), hcalTimeSlewDelay_, mps_fire::i, createfilelist::int, HcalConst::maxSamples, HcalConst::nsPerBX, psfPtr_, HcalConst::shiftTS, slewFlavor_, mathSSE::sqrt(), ts4Chi2_, ts4Max_, and tsDelay1GeV_.

Referenced by phase1Apply().

◆ resetPulseShapeTemplate()

void PulseShapeFitOOTPileupCorrection::resetPulseShapeTemplate ( const HcalPulseShapes::Shape ps,
unsigned  nSamples 
)

◆ setPulseShapeTemplate()

void PulseShapeFitOOTPileupCorrection::setPulseShapeTemplate ( const HcalPulseShapes::Shape ps,
bool  isHPD,
unsigned  nSamples,
const HcalTimeSlew hcalTimeSlewDelay 
)

Definition at line 73 of file PulseShapeFitOOTPileupCorrection.cc.

76  {
77  // initialize for every different channel types (HPD vs SiPM)
78 
79  if (!(&ps == currentPulseShape_ && isHPD == isCurrentChannelHPD_)) {
81 
82  // redefine the inverttimeSig2
83  if (!isHPD)
84  psfPtr_->setinverttimeSig2(1. / (timeSigSiPM_ * timeSigSiPM_));
85  else
86  psfPtr_->setinverttimeSig2(1. / (timeSigHPD_ * timeSigHPD_));
87 
88  currentPulseShape_ = &ps;
89  isCurrentChannelHPD_ = isHPD;
90 
91  hcalTimeSlewDelay_ = hcalTimeSlewDelay;
92  tsDelay1GeV_ = hcalTimeSlewDelay->delay(1.0, slewFlavor_);
93  }
94 }

References currentPulseShape_, HcalTimeSlew::delay(), hcalTimeSlewDelay_, isCurrentChannelHPD_, PresampleTask_cfi::nSamples, psfPtr_, resetPulseShapeTemplate(), slewFlavor_, timeSigHPD_, timeSigSiPM_, and tsDelay1GeV_.

◆ setPUParams()

void PulseShapeFitOOTPileupCorrection::setPUParams ( bool  iPedestalConstraint,
bool  iTimeConstraint,
bool  iAddPulseJitter,
bool  iApplyTimeSlew,
double  iTS4Min,
const std::vector< double > &  iTS4Max,
double  iPulseJitter,
double  iTimeMean,
double  iTimeSigHPD,
double  iTimeSigSiPM,
double  iPedMean,
double  iTMin,
double  iTMax,
const std::vector< double > &  its4Chi2,
HcalTimeSlew::BiasSetting  slewFlavor,
int  iFitTimes 
)

Definition at line 36 of file PulseShapeFitOOTPileupCorrection.cc.

51  {
52  TSMin_ = iTMin;
53  TSMax_ = iTMax;
54  // ts4Chi2_ = its4Chi2;
55  vts4Chi2_ = its4Chi2;
56  pedestalConstraint_ = iPedestalConstraint;
57  timeConstraint_ = iTimeConstraint;
58  addPulseJitter_ = iAddPulseJitter;
59  applyTimeSlew_ = iApplyTimeSlew;
60  ts4Min_ = iTS4Min;
61  // ts4Max_ = iTS4Max;
62  vts4Max_ = iTS4Max;
63  pulseJitter_ = iPulseJitter * iPulseJitter;
64  timeMean_ = iTimeMean;
65  // timeSig_ = iTimeSig;
66  timeSigHPD_ = iTimeSigHPD;
67  timeSigSiPM_ = iTimeSigSiPM;
68  pedMean_ = iPedMean;
69  slewFlavor_ = slewFlavor;
70  fitTimes_ = iFitTimes;
71 }

References addPulseJitter_, applyTimeSlew_, fitTimes_, pedestalConstraint_, pedMean_, pulseJitter_, slewFlavor_, timeConstraint_, timeMean_, timeSigHPD_, timeSigSiPM_, ts4Min_, TSMax_, TSMin_, vts4Chi2_, and vts4Max_.

Member Data Documentation

◆ addPulseJitter_

bool PulseShapeFitOOTPileupCorrection::addPulseJitter_
private

Definition at line 98 of file PulseShapeFitOOTPileupCorrection.h.

Referenced by resetPulseShapeTemplate(), and setPUParams().

◆ applyTimeSlew_

bool PulseShapeFitOOTPileupCorrection::applyTimeSlew_
private

Definition at line 100 of file PulseShapeFitOOTPileupCorrection.h.

Referenced by pulseShapeFit(), and setPUParams().

◆ chargeThreshold_

double PulseShapeFitOOTPileupCorrection::chargeThreshold_
private

Definition at line 85 of file PulseShapeFitOOTPileupCorrection.h.

◆ cntsetPulseShape

int PulseShapeFitOOTPileupCorrection::cntsetPulseShape
private

Definition at line 83 of file PulseShapeFitOOTPileupCorrection.h.

Referenced by resetPulseShapeTemplate().

◆ currentPulseShape_

const HcalPulseShapes::Shape* PulseShapeFitOOTPileupCorrection::currentPulseShape_ = nullptr

Definition at line 51 of file PulseShapeFitOOTPileupCorrection.h.

Referenced by setPulseShapeTemplate().

◆ dpfunctor_

std::unique_ptr<ROOT::Math::Functor> PulseShapeFitOOTPileupCorrection::dpfunctor_
private

Definition at line 90 of file PulseShapeFitOOTPileupCorrection.h.

Referenced by fit(), and resetPulseShapeTemplate().

◆ fitTimes_

int PulseShapeFitOOTPileupCorrection::fitTimes_
private

Definition at line 86 of file PulseShapeFitOOTPileupCorrection.h.

Referenced by fit(), and setPUParams().

◆ hcalTimeSlewDelay_

const HcalTimeSlew* PulseShapeFitOOTPileupCorrection::hcalTimeSlewDelay_ = nullptr

Definition at line 52 of file PulseShapeFitOOTPileupCorrection.h.

Referenced by pulseShapeFit(), and setPulseShapeTemplate().

◆ hybridfitter

PSFitter::HybridMinimizer* PulseShapeFitOOTPileupCorrection::hybridfitter
private

◆ iniTimesArr

std::array<double, HcalConst::maxSamples> PulseShapeFitOOTPileupCorrection::iniTimesArr
private

Definition at line 84 of file PulseShapeFitOOTPileupCorrection.h.

Referenced by fit(), and PulseShapeFitOOTPileupCorrection().

◆ isCurrentChannelHPD_

bool PulseShapeFitOOTPileupCorrection::isCurrentChannelHPD_
private

Definition at line 113 of file PulseShapeFitOOTPileupCorrection.h.

Referenced by setPulseShapeTemplate().

◆ pedestalConstraint_

bool PulseShapeFitOOTPileupCorrection::pedestalConstraint_
private

Definition at line 96 of file PulseShapeFitOOTPileupCorrection.h.

Referenced by resetPulseShapeTemplate(), and setPUParams().

◆ pedMean_

double PulseShapeFitOOTPileupCorrection::pedMean_
private

Definition at line 109 of file PulseShapeFitOOTPileupCorrection.h.

Referenced by fit(), resetPulseShapeTemplate(), and setPUParams().

◆ pedSig_

double PulseShapeFitOOTPileupCorrection::pedSig_
private

Definition at line 110 of file PulseShapeFitOOTPileupCorrection.h.

Referenced by fit().

◆ psfPtr_

std::unique_ptr<FitterFuncs::PulseShapeFunctor> PulseShapeFitOOTPileupCorrection::psfPtr_
private

◆ pulseJitter_

double PulseShapeFitOOTPileupCorrection::pulseJitter_
private

Definition at line 104 of file PulseShapeFitOOTPileupCorrection.h.

Referenced by resetPulseShapeTemplate(), and setPUParams().

◆ slewFlavor_

HcalTimeSlew::BiasSetting PulseShapeFitOOTPileupCorrection::slewFlavor_
private

◆ spfunctor_

std::unique_ptr<ROOT::Math::Functor> PulseShapeFitOOTPileupCorrection::spfunctor_
private

Definition at line 89 of file PulseShapeFitOOTPileupCorrection.h.

Referenced by fit(), and resetPulseShapeTemplate().

◆ timeConstraint_

bool PulseShapeFitOOTPileupCorrection::timeConstraint_
private

Definition at line 97 of file PulseShapeFitOOTPileupCorrection.h.

Referenced by resetPulseShapeTemplate(), and setPUParams().

◆ timeMean_

double PulseShapeFitOOTPileupCorrection::timeMean_
private

Definition at line 105 of file PulseShapeFitOOTPileupCorrection.h.

Referenced by fit(), resetPulseShapeTemplate(), and setPUParams().

◆ timeSig_

double PulseShapeFitOOTPileupCorrection::timeSig_
private

Definition at line 106 of file PulseShapeFitOOTPileupCorrection.h.

Referenced by fit().

◆ timeSigHPD_

double PulseShapeFitOOTPileupCorrection::timeSigHPD_
private

Definition at line 107 of file PulseShapeFitOOTPileupCorrection.h.

Referenced by setPulseShapeTemplate(), and setPUParams().

◆ timeSigSiPM_

double PulseShapeFitOOTPileupCorrection::timeSigSiPM_
private

Definition at line 108 of file PulseShapeFitOOTPileupCorrection.h.

Referenced by setPulseShapeTemplate(), and setPUParams().

◆ tpfunctor_

std::unique_ptr<ROOT::Math::Functor> PulseShapeFitOOTPileupCorrection::tpfunctor_
private

Definition at line 91 of file PulseShapeFitOOTPileupCorrection.h.

Referenced by fit(), and resetPulseShapeTemplate().

◆ ts4Chi2_

double PulseShapeFitOOTPileupCorrection::ts4Chi2_
mutableprivate

Definition at line 94 of file PulseShapeFitOOTPileupCorrection.h.

Referenced by phase1Apply(), and pulseShapeFit().

◆ ts4Max_

double PulseShapeFitOOTPileupCorrection::ts4Max_
mutableprivate

Definition at line 102 of file PulseShapeFitOOTPileupCorrection.h.

Referenced by phase1Apply(), and pulseShapeFit().

◆ ts4Min_

double PulseShapeFitOOTPileupCorrection::ts4Min_
private

Definition at line 101 of file PulseShapeFitOOTPileupCorrection.h.

Referenced by phase1Apply(), and setPUParams().

◆ tsDelay1GeV_

double PulseShapeFitOOTPileupCorrection::tsDelay1GeV_ = 0

Definition at line 53 of file PulseShapeFitOOTPileupCorrection.h.

Referenced by pulseShapeFit(), and setPulseShapeTemplate().

◆ TSMax_

int PulseShapeFitOOTPileupCorrection::TSMax_
private

Definition at line 93 of file PulseShapeFitOOTPileupCorrection.h.

Referenced by fit(), and setPUParams().

◆ TSMin_

int PulseShapeFitOOTPileupCorrection::TSMin_
private

Definition at line 92 of file PulseShapeFitOOTPileupCorrection.h.

Referenced by fit(), and setPUParams().

◆ unConstrainedFit_

bool PulseShapeFitOOTPileupCorrection::unConstrainedFit_
private

Definition at line 99 of file PulseShapeFitOOTPileupCorrection.h.

◆ vts4Chi2_

std::vector<double> PulseShapeFitOOTPileupCorrection::vts4Chi2_
private

Definition at line 95 of file PulseShapeFitOOTPileupCorrection.h.

Referenced by phase1Apply(), and setPUParams().

◆ vts4Max_

std::vector<double> PulseShapeFitOOTPileupCorrection::vts4Max_
private

Definition at line 103 of file PulseShapeFitOOTPileupCorrection.h.

Referenced by phase1Apply(), and setPUParams().

HBHEChannelInfo::tsDFcPerADC
constexpr float tsDFcPerADC(const unsigned ts) const
Definition: HBHEChannelInfo.h:167
PulseShapeFitOOTPileupCorrection::cntsetPulseShape
int cntsetPulseShape
Definition: PulseShapeFitOOTPileupCorrection.h:83
mps_fire.i
i
Definition: mps_fire.py:355
HBHEChannelInfo::hasTimeInfo
constexpr bool hasTimeInfo() const
Definition: HBHEChannelInfo.h:134
PulseShapeFitOOTPileupCorrection::fitTimes_
int fitTimes_
Definition: PulseShapeFitOOTPileupCorrection.h:86
HBHEChannelInfo::nSamples
constexpr unsigned nSamples() const
Definition: HBHEChannelInfo.h:131
PulseShapeFitOOTPileupCorrection::ts4Max_
double ts4Max_
Definition: PulseShapeFitOOTPileupCorrection.h:102
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
step
step
Definition: StallMonitor.cc:94
PulseShapeFitOOTPileupCorrection::pulseShapeFit
int pulseShapeFit(const double *energyArr, const double *pedenArr, const double *chargeArr, const double *pedArr, const double *gainArr, const double tsTOTen, std::vector< float > &fitParsVec, const double *ADCnoise, unsigned int soi) const
Definition: PulseShapeFitOOTPileupCorrection.cc:110
PulseShapeFitOOTPileupCorrection::tpfunctor_
std::unique_ptr< ROOT::Math::Functor > tpfunctor_
Definition: PulseShapeFitOOTPileupCorrection.h:91
HcalConst::maxSamples
constexpr int maxSamples
Definition: PulseShapeFunctor.h:8
HBHEChannelInfo::tsPedestalWidth
constexpr double tsPedestalWidth(const unsigned ts) const
Definition: HBHEChannelInfo.h:161
FitterFuncs::PulseShapeFunctor
Definition: PulseShapeFunctor.h:19
PulseShapeFitOOTPileupCorrection::isCurrentChannelHPD_
bool isCurrentChannelHPD_
Definition: PulseShapeFitOOTPileupCorrection.h:113
PulseShapeFitOOTPileupCorrection::hybridfitter
PSFitter::HybridMinimizer * hybridfitter
Definition: PulseShapeFitOOTPileupCorrection.h:82
FitterFuncs::PulseShapeFunctor::doublePulseShapeFunc
double doublePulseShapeFunc(const double *x)
Definition: PulseShapeFunctor.h:64
HBHEChannelInfo::tsGain
constexpr double tsGain(const unsigned ts) const
Definition: HBHEChannelInfo.h:162
cms::cuda::assert
assert(be >=bs)
bookConverter.results
results
Definition: bookConverter.py:144
HcalDetId::depth
constexpr int depth() const
get the tower depth
Definition: HcalDetId.h:164
hltPixelTracks_cff.chi2
chi2
Definition: hltPixelTracks_cff.py:25
PSFitter::HybridMinimizer::SetFunction
void SetFunction(const ROOT::Math::IMultiGenFunction &func) override
set the function to minimize
Definition: HybridMinimizer.cc:262
PresampleTask_cfi.nSamples
nSamples
Definition: PresampleTask_cfi.py:7
HcalTimeSlew::delay
float delay(float fC, BiasSetting bias=Medium) const
Returns the amount (ns) by which a pulse of the given number of fC will be delayed by the timeslew ef...
Definition: HcalTimeSlew.cc:20
PulseShapeFitOOTPileupCorrection::currentPulseShape_
const HcalPulseShapes::Shape * currentPulseShape_
Definition: PulseShapeFitOOTPileupCorrection.h:51
PulseShapeFitOOTPileupCorrection::hcalTimeSlewDelay_
const HcalTimeSlew * hcalTimeSlewDelay_
Definition: PulseShapeFitOOTPileupCorrection.h:52
HcalConst::nsPerBX
constexpr int nsPerBX
Definition: PulseShapeFunctor.h:10
PulseShapeFitOOTPileupCorrection::psfPtr_
std::unique_ptr< FitterFuncs::PulseShapeFunctor > psfPtr_
Definition: PulseShapeFitOOTPileupCorrection.h:88
PulseShapeFitOOTPileupCorrection::spfunctor_
std::unique_ptr< ROOT::Math::Functor > spfunctor_
Definition: PulseShapeFitOOTPileupCorrection.h:89
PSFitter::HybridMinimizer::MinValue
double MinValue() const override
return minimum function value
Definition: HybridMinimizer.h:130
PSFitter::HybridMinimizer::SetMinimizerType
void SetMinimizerType(EMinimizerType type)
Definition: HybridMinimizer.cc:100
FitterFuncs::PulseShapeFunctor::singlePulseShapeFunc
double singlePulseShapeFunc(const double *x)
Definition: PulseShapeFunctor.h:63
HBHEChannelInfo::fcByPE
constexpr double fcByPE() const
Definition: HBHEChannelInfo.h:137
PulseShapeFitOOTPileupCorrection::dpfunctor_
std::unique_ptr< ROOT::Math::Functor > dpfunctor_
Definition: PulseShapeFitOOTPileupCorrection.h:90
PSFitter::HybridMinimizer::X
const double * X() const override
return pointer to X values at the minimum
Definition: HybridMinimizer.cc:507
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
PulseShapeFitOOTPileupCorrection::timeSig_
double timeSig_
Definition: PulseShapeFitOOTPileupCorrection.h:106
PulseShapeFitOOTPileupCorrection::pedSig_
double pedSig_
Definition: PulseShapeFitOOTPileupCorrection.h:110
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
HBHEChannelInfo::tsPedestal
constexpr double tsPedestal(const unsigned ts) const
Definition: HBHEChannelInfo.h:160
PulseShapeFitOOTPileupCorrection::pedestalConstraint_
bool pedestalConstraint_
Definition: PulseShapeFitOOTPileupCorrection.h:96
PulseShapeFitOOTPileupCorrection::tsDelay1GeV_
double tsDelay1GeV_
Definition: PulseShapeFitOOTPileupCorrection.h:53
FitterFuncs::PulseShapeFunctor::triplePulseShapeFunc
double triplePulseShapeFunc(const double *x)
Definition: PulseShapeFunctor.h:65
PulseShapeFitOOTPileupCorrection::slewFlavor_
HcalTimeSlew::BiasSetting slewFlavor_
Definition: PulseShapeFitOOTPileupCorrection.h:111
PSFitter::HybridMinimizer::Minimize
bool Minimize() override
Definition: HybridMinimizer.cc:298
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
PulseShapeFitOOTPileupCorrection::resetPulseShapeTemplate
void resetPulseShapeTemplate(const HcalPulseShapes::Shape &ps, unsigned nSamples)
Definition: PulseShapeFitOOTPileupCorrection.cc:96
PSFitter::HybridMinimizer::kScan
Definition: HybridMinimizer.h:46
HcalConst::shiftTS
constexpr int shiftTS
Definition: PulseShapeFunctor.h:13
createfilelist.int
int
Definition: createfilelist.py:10
PSFitter::HybridMinimizer::kMigrad
Definition: HybridMinimizer.h:46
PSFitter::HybridMinimizer::SetLimitedVariable
bool SetLimitedVariable(unsigned int ivar, const std::string &name, double val, double step, double, double) override
set upper/lower limited variable (override if minimizer supports them )
Definition: HybridMinimizer.cc:210
PulseShapeFitOOTPileupCorrection::pedMean_
double pedMean_
Definition: PulseShapeFitOOTPileupCorrection.h:109
PulseShapeFitOOTPileupCorrection::applyTimeSlew_
bool applyTimeSlew_
Definition: PulseShapeFitOOTPileupCorrection.h:100
PulseShapeFitOOTPileupCorrection::timeMean_
double timeMean_
Definition: PulseShapeFitOOTPileupCorrection.h:105
PulseShapeFitOOTPileupCorrection::vts4Max_
std::vector< double > vts4Max_
Definition: PulseShapeFitOOTPileupCorrection.h:103
PSFitter::HybridMinimizer
Definition: HybridMinimizer.h:44
PedestalClient_cfi.gain
gain
Definition: PedestalClient_cfi.py:37
HBHEChannelInfo::id
constexpr HcalDetId id() const
Definition: HBHEChannelInfo.h:126
PulseShapeFitOOTPileupCorrection::addPulseJitter_
bool addPulseJitter_
Definition: PulseShapeFitOOTPileupCorrection.h:98
PulseShapeFitOOTPileupCorrection::ts4Chi2_
double ts4Chi2_
Definition: PulseShapeFitOOTPileupCorrection.h:94
PulseShapeFitOOTPileupCorrection::TSMax_
int TSMax_
Definition: PulseShapeFitOOTPileupCorrection.h:93
PulseShapeFitOOTPileupCorrection::TSMin_
int TSMin_
Definition: PulseShapeFitOOTPileupCorrection.h:92
PSFitter::HybridMinimizer::Clear
void Clear() override
Definition: HybridMinimizer.cc:153
PulseShapeFitOOTPileupCorrection::timeConstraint_
bool timeConstraint_
Definition: PulseShapeFitOOTPileupCorrection.h:97
HBHEChannelInfo::tsRawCharge
constexpr double tsRawCharge(const unsigned ts) const
Definition: HBHEChannelInfo.h:159
PulseShapeFitOOTPileupCorrection::iniTimesArr
std::array< double, HcalConst::maxSamples > iniTimesArr
Definition: PulseShapeFitOOTPileupCorrection.h:84
L1TStage2uGTEmulatorClient_cff.BX
BX
Definition: L1TStage2uGTEmulatorClient_cff.py:9
varNames
constexpr const char * varNames[]
Definition: PulseShapeFitOOTPileupCorrection.cc:108
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HBHEChannelInfo::soi
constexpr unsigned soi() const
Definition: HBHEChannelInfo.h:132
PulseShapeFitOOTPileupCorrection::ts4Min_
double ts4Min_
Definition: PulseShapeFitOOTPileupCorrection.h:101
PSFitter::HybridMinimizer::SetFixedVariable
bool SetFixedVariable(unsigned int, const std::string &, double) override
set fixed variable (override if minimizer supports them )
Definition: HybridMinimizer.cc:219
PulseShapeFitOOTPileupCorrection::timeSigSiPM_
double timeSigSiPM_
Definition: PulseShapeFitOOTPileupCorrection.h:108
PulseShapeFitOOTPileupCorrection::timeSigHPD_
double timeSigHPD_
Definition: PulseShapeFitOOTPileupCorrection.h:107
PulseShapeFitOOTPileupCorrection::vts4Chi2_
std::vector< double > vts4Chi2_
Definition: PulseShapeFitOOTPileupCorrection.h:95
PulseShapeFitOOTPileupCorrection::pulseJitter_
double pulseJitter_
Definition: PulseShapeFitOOTPileupCorrection.h:104
PulseShapeFitOOTPileupCorrection::fit
void fit(int iFit, float &timevalfit, float &chargevalfit, float &pedvalfit, float &chi2, bool &fitStatus, double &iTSMax, const double &iTSTOTen, double *iEnArr, unsigned(&iBX)[3]) const
Definition: PulseShapeFitOOTPileupCorrection.cc:194