CMS 3D CMS Logo

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

#include <HBHEPulseShapeFlag.h>

Public Member Functions

void Clear ()
 
 HBHEPulseShapeFlagSetter (double MinimumChargeThreshold, double TS4TS5ChargeThreshold, double TS3TS4ChargeThreshold, double TS3TS4UpperChargeThreshold, double TS5TS6ChargeThreshold, double TS5TS6UpperChargeThreshold, double R45PlusOneRange, double R45MinusOneRange, unsigned int TrianglePeakTS, const std::vector< double > &LinearThreshold, const std::vector< double > &LinearCut, const std::vector< double > &RMS8MaxThreshold, const std::vector< double > &RMS8MaxCut, const std::vector< double > &LeftSlopeThreshold, const std::vector< double > &LeftSlopeCut, const std::vector< double > &RightSlopeThreshold, const std::vector< double > &RightSlopeCut, const std::vector< double > &RightSlopeSmallThreshold, const std::vector< double > &RightSlopeSmallCut, const std::vector< double > &TS4TS5UpperThreshold, const std::vector< double > &TS4TS5UpperCut, const std::vector< double > &TS4TS5LowerThreshold, const std::vector< double > &TS4TS5LowerCut, bool UseDualFit, bool TriangleIgnoreSlow, bool setLegacyFlags=true)
 
void Initialize ()
 
template<class Dataframe >
void SetPulseShapeFlags (HBHERecHit &hbhe, const Dataframe &digi, const HcalCoder &coder, const HcalCalibrations &calib)
 
 ~HBHEPulseShapeFlagSetter ()
 

Private Member Functions

double CalculateRMS8Max (const std::vector< double > &Charge)
 
bool CheckPassFilter (double Charge, double Discriminant, std::vector< std::pair< double, double > > &Cuts, int Side)
 
double DualNominalFitSingleTry (const std::vector< double > &Charge, int Offset, int Distance, bool newCharges=true)
 
double PerformDualNominalFit (const std::vector< double > &Charge)
 
double PerformLinearFit (const std::vector< double > &Charge)
 
double PerformNominalFit (const std::vector< double > &Charge)
 
TriangleFitResult PerformTriangleFit (const std::vector< double > &Charge)
 

Private Attributes

std::vector< double > CumulativeIdealPulse
 
std::vector< double > errors_
 
std::vector< double > f1_
 
std::vector< double > f2_
 
std::vector< double > mCharge
 
std::vector< std::pair< double, double > > mLambdaLinearCut
 
std::vector< std::pair< double, double > > mLambdaRMS8MaxCut
 
std::vector< std::pair< double, double > > mLeftSlopeCut
 
double mMinimumChargeThreshold
 
double mR45MinusOneRange
 
double mR45PlusOneRange
 
std::vector< std::pair< double, double > > mRightSlopeCut
 
std::vector< std::pair< double, double > > mRightSlopeSmallCut
 
bool mSetLegacyFlags
 
bool mTriangleIgnoreSlow
 
int mTrianglePeakTS
 
double mTS3TS4ChargeThreshold
 
double mTS3TS4UpperChargeThreshold
 
double mTS4TS5ChargeThreshold
 
std::vector< std::pair< double, double > > mTS4TS5LowerCut
 
std::vector< std::pair< double, double > > mTS4TS5UpperCut
 
double mTS5TS6ChargeThreshold
 
double mTS5TS6UpperChargeThreshold
 
bool mUseDualFit
 

Detailed Description

Definition at line 30 of file HBHEPulseShapeFlag.h.

Constructor & Destructor Documentation

◆ HBHEPulseShapeFlagSetter()

HBHEPulseShapeFlagSetter::HBHEPulseShapeFlagSetter ( double  MinimumChargeThreshold,
double  TS4TS5ChargeThreshold,
double  TS3TS4ChargeThreshold,
double  TS3TS4UpperChargeThreshold,
double  TS5TS6ChargeThreshold,
double  TS5TS6UpperChargeThreshold,
double  R45PlusOneRange,
double  R45MinusOneRange,
unsigned int  TrianglePeakTS,
const std::vector< double > &  LinearThreshold,
const std::vector< double > &  LinearCut,
const std::vector< double > &  RMS8MaxThreshold,
const std::vector< double > &  RMS8MaxCut,
const std::vector< double > &  LeftSlopeThreshold,
const std::vector< double > &  LeftSlopeCut,
const std::vector< double > &  RightSlopeThreshold,
const std::vector< double > &  RightSlopeCut,
const std::vector< double > &  RightSlopeSmallThreshold,
const std::vector< double > &  RightSlopeSmallCut,
const std::vector< double > &  TS4TS5UpperThreshold,
const std::vector< double > &  TS4TS5UpperCut,
const std::vector< double > &  TS4TS5LowerThreshold,
const std::vector< double > &  TS4TS5LowerCut,
bool  UseDualFit,
bool  TriangleIgnoreSlow,
bool  setLegacyFlags = true 
)

Definition at line 17 of file HBHEPulseShapeFlag.cc.

References mps_fire::i, Initialize(), HLT_2024v12_cff::LeftSlopeCut, HLT_2024v12_cff::LeftSlopeThreshold, HLT_2024v12_cff::LinearCut, HLT_2024v12_cff::LinearThreshold, HLT_2024v12_cff::MinimumChargeThreshold, mLambdaLinearCut, mLambdaRMS8MaxCut, mLeftSlopeCut, mMinimumChargeThreshold, mR45MinusOneRange, mR45PlusOneRange, mRightSlopeCut, mRightSlopeSmallCut, mSetLegacyFlags, mTriangleIgnoreSlow, mTrianglePeakTS, mTS3TS4ChargeThreshold, mTS3TS4UpperChargeThreshold, mTS4TS5ChargeThreshold, mTS4TS5LowerCut, mTS4TS5UpperCut, mTS5TS6ChargeThreshold, mTS5TS6UpperChargeThreshold, mUseDualFit, HLT_2024v12_cff::R45MinusOneRange, HLT_2024v12_cff::R45PlusOneRange, HLT_2024v12_cff::RightSlopeCut, HLT_2024v12_cff::RightSlopeSmallCut, HLT_2024v12_cff::RightSlopeSmallThreshold, HLT_2024v12_cff::RightSlopeThreshold, HLT_2024v12_cff::RMS8MaxCut, HLT_2024v12_cff::RMS8MaxThreshold, jetUpdater_cfi::sort, HLT_2024v12_cff::TriangleIgnoreSlow, HLT_2024v12_cff::TrianglePeakTS, HLT_2024v12_cff::TS3TS4ChargeThreshold, HLT_2024v12_cff::TS3TS4UpperChargeThreshold, HLT_2024v12_cff::TS4TS5ChargeThreshold, HLT_2024v12_cff::TS4TS5LowerCut, HLT_2024v12_cff::TS4TS5LowerThreshold, HLT_2024v12_cff::TS4TS5UpperCut, HLT_2024v12_cff::TS4TS5UpperThreshold, HLT_2024v12_cff::TS5TS6ChargeThreshold, HLT_2024v12_cff::TS5TS6UpperChargeThreshold, and HLT_2024v12_cff::UseDualFit.

42  {
43  //
44  // The constructor that should be used
45  //
46  // Copies various thresholds and limits and parameters to the class for future use.
47  // Also calls the Initialize() function
48  //
49 
60  mSetLegacyFlags = setLegacyFlags;
61 
62  for (std::vector<double>::size_type i = 0; i < LinearThreshold.size() && i < LinearCut.size(); i++)
63  mLambdaLinearCut.push_back(std::pair<double, double>(LinearThreshold[i], LinearCut[i]));
64  sort(mLambdaLinearCut.begin(), mLambdaLinearCut.end());
65 
66  for (std::vector<double>::size_type i = 0; i < RMS8MaxThreshold.size() && i < RMS8MaxCut.size(); i++)
67  mLambdaRMS8MaxCut.push_back(std::pair<double, double>(RMS8MaxThreshold[i], RMS8MaxCut[i]));
69 
70  for (std::vector<double>::size_type i = 0; i < LeftSlopeThreshold.size() && i < LeftSlopeCut.size(); i++)
71  mLeftSlopeCut.push_back(std::pair<double, double>(LeftSlopeThreshold[i], LeftSlopeCut[i]));
72  sort(mLeftSlopeCut.begin(), mLeftSlopeCut.end());
73 
74  for (std::vector<double>::size_type i = 0; i < RightSlopeThreshold.size() && i < RightSlopeCut.size(); i++)
75  mRightSlopeCut.push_back(std::pair<double, double>(RightSlopeThreshold[i], RightSlopeCut[i]));
76  sort(mRightSlopeCut.begin(), mRightSlopeCut.end());
77 
79  mRightSlopeSmallCut.push_back(std::pair<double, double>(RightSlopeSmallThreshold[i], RightSlopeSmallCut[i]));
81 
82  for (std::vector<double>::size_type i = 0; i < TS4TS5UpperThreshold.size() && i < TS4TS5UpperCut.size(); i++)
83  mTS4TS5UpperCut.push_back(std::pair<double, double>(TS4TS5UpperThreshold[i], TS4TS5UpperCut[i]));
84  sort(mTS4TS5UpperCut.begin(), mTS4TS5UpperCut.end());
85 
86  for (std::vector<double>::size_type i = 0; i < TS4TS5LowerThreshold.size() && i < TS4TS5LowerCut.size(); i++)
87  mTS4TS5LowerCut.push_back(std::pair<double, double>(TS4TS5LowerThreshold[i], TS4TS5LowerCut[i]));
88  sort(mTS4TS5LowerCut.begin(), mTS4TS5LowerCut.end());
89 
91 
92  Initialize();
93 }
std::vector< std::pair< double, double > > mLambdaLinearCut
std::vector< std::pair< double, double > > mTS4TS5LowerCut
uint16_t size_type
std::vector< std::pair< double, double > > mLeftSlopeCut
std::vector< std::pair< double, double > > mRightSlopeCut
std::vector< std::pair< double, double > > mRightSlopeSmallCut
std::vector< std::pair< double, double > > mLambdaRMS8MaxCut
std::vector< std::pair< double, double > > mTS4TS5UpperCut

◆ ~HBHEPulseShapeFlagSetter()

HBHEPulseShapeFlagSetter::~HBHEPulseShapeFlagSetter ( )

Definition at line 95 of file HBHEPulseShapeFlag.cc.

95  {
96  // Dummy destructor - there's nothing to destruct by hand here
97 }

Member Function Documentation

◆ CalculateRMS8Max()

double HBHEPulseShapeFlagSetter::CalculateRMS8Max ( const std::vector< double > &  Charge)
private

Definition at line 453 of file HBHEPulseShapeFlag.cc.

References PixelTestBeamValidation_cfi::Charge, MillePedeFileConverter_cfg::e, mps_fire::i, RMS, jetUpdater_cfi::sort, mathSSE::sqrt(), and IntegrityTask_cfi::Total.

Referenced by SetPulseShapeFlags().

453  {
454  //
455  // CalculateRMS8Max
456  //
457  // returns "RMS" divided by the largest charge in the time slices
458  // "RMS" is calculated using all but the two largest time slices.
459  // The "RMS" is not quite the actual RMS (see note below), but the value is only
460  // used for determining max values, and is not quoted as the actual RMS anywhere.
461  //
462 
463  int DigiSize = Charge.size();
464 
465  if (DigiSize <= 2)
466  return 1e-5; // default statement when DigiSize is too small for useful RMS calculation
467  // Copy Charge vector again, since we are passing references around
468  std::vector<double> TempCharge = Charge;
469 
470  // Sort TempCharge vector from smallest to largest charge
471  sort(TempCharge.begin(), TempCharge.end());
472 
473  double Total = 0;
474  double Total2 = 0;
475  for (int i = 0; i < DigiSize - 2; i++) {
476  Total = Total + TempCharge[i];
477  Total2 = Total2 + TempCharge[i] * TempCharge[i];
478  }
479 
480  // This isn't quite the RMS (both Total2 and Total*Total need to be
481  // divided by an extra (DigiSize-2) within the sqrt to get the RMS.)
482  // We're only using this value for relative comparisons, though; we
483  // aren't explicitly interpreting it as the RMS. It might be nice
484  // to either change the calculation or rename the variable in the future, though.
485 
486  double RMS = sqrt(Total2 - Total * Total / (DigiSize - 2));
487 
488  double RMS8Max = RMS / TempCharge[DigiSize - 1];
489  if (RMS8Max < 1e-5) // protection against zero
490  RMS8Max = 1e-5;
491 
492  return RMS8Max;
493 }
T sqrt(T t)
Definition: SSEVec.h:19

◆ CheckPassFilter()

bool HBHEPulseShapeFlagSetter::CheckPassFilter ( double  Charge,
double  Discriminant,
std::vector< std::pair< double, double > > &  Cuts,
int  Side 
)
private

Definition at line 553 of file HBHEPulseShapeFlag.cc.

References PixelTestBeamValidation_cfi::Charge, dqmdumpme::first, mps_fire::i, createfilelist::int, PixelRegions::L1, PixelRegions::L2, and remoteMonitoring_LASER_era2018_cfg::limit.

Referenced by SetPulseShapeFlags().

556  {
557  //
558  // Checks whether Discriminant value passes Cuts for the specified Charge. True if pulse is good.
559  //
560  // The "Cuts" pairs are assumed to be sorted in terms of size from small to large,
561  // where each "pair" = (Charge, Discriminant)
562  // "Side" is either positive or negative, which determines whether to discard the pulse if discriminant
563  // is greater or smaller than the cut value
564  //
565 
566  if (Cuts.empty()) // safety check that there are some cuts defined
567  return true;
568 
569  if (Charge <= Cuts[0].first) // too small to cut on
570  return true;
571 
572  int IndexLargerThanCharge = -1; // find the range it is falling in
573  for (int i = 1; i < (int)Cuts.size(); i++) {
574  if (Cuts[i].first > Charge) {
575  IndexLargerThanCharge = i;
576  break;
577  }
578  }
579 
580  double limit = 1000000;
581 
582  if (IndexLargerThanCharge == -1) // if charge is greater than the last entry, assume flat line
583  limit = Cuts[Cuts.size() - 1].second;
584  else // otherwise, do a linear interpolation to find the cut position
585  {
586  double C1 = Cuts[IndexLargerThanCharge].first;
587  double C2 = Cuts[IndexLargerThanCharge - 1].first;
588  double L1 = Cuts[IndexLargerThanCharge].second;
589  double L2 = Cuts[IndexLargerThanCharge - 1].second;
590 
591  limit = (Charge - C1) / (C2 - C1) * (L2 - L1) + L1;
592  }
593 
594  if (Side > 0 && Discriminant > limit)
595  return false;
596  if (Side < 0 && Discriminant < limit)
597  return false;
598 
599  return true;
600 }

◆ Clear()

void HBHEPulseShapeFlagSetter::Clear ( )

Definition at line 99 of file HBHEPulseShapeFlag.cc.

99  {
100  // Dummy function in case something needs to be cleaned....but none right now
101 }

◆ DualNominalFitSingleTry()

double HBHEPulseShapeFlagSetter::DualNominalFitSingleTry ( const std::vector< double > &  Charge,
int  Offset,
int  Distance,
bool  newCharges = true 
)
private

Definition at line 364 of file HBHEPulseShapeFlag.cc.

References PixelTestBeamValidation_cfi::Charge, RecoSummaryTask_cfi::Chi2, CumulativeIdealPulse, MillePedeFileConverter_cfg::e, errors_, f1_, f2_, and dqmiolumiharvest::j.

Referenced by PerformDualNominalFit().

367  {
368  //
369  // Does a fit to dual signal pulse hypothesis given offset and distance of the two target pulses
370  //
371  // The only parameters to fit here are the two pulse heights of in-time and out-of-time components
372  // since offset is given
373  // The calculation here is based from writing down the Chi2 formula and minimize against the two parameters,
374  // ie., Chi2 = Sum{((T[i] - a1 * F1[i] - a2 * F2[i]) / (Sigma[i]))^2}, where T[i] is the input pulse shape,
375  // and F1[i], F2[i] are the two ideal pulse components
376  //
377 
378  int DigiSize = Charge.size();
379 
380  if (Offset < 0 || Offset + 250 >= (int)CumulativeIdealPulse.size())
381  return 1000000;
382  if (CumulativeIdealPulse[Offset + 250] - CumulativeIdealPulse[Offset] < 1e-5)
383  return 1000000;
384 
385  if (newCharges) {
386  f1_.resize(DigiSize);
387  f2_.resize(DigiSize);
388  errors_.resize(DigiSize);
389  for (int j = 0; j < DigiSize; j++) {
390  errors_[j] = Charge[j];
391  if (errors_[j] < 1)
392  errors_[j] = 1;
393  errors_[j] = 1.0 / errors_[j];
394  }
395  }
396 
397  double SumF1F1 = 0;
398  double SumF1F2 = 0;
399  double SumF2F2 = 0;
400  double SumTF1 = 0;
401  double SumTF2 = 0;
402 
403  unsigned int cipSize = CumulativeIdealPulse.size();
404  for (int j = 0; j < DigiSize; j++) {
405  // this is the TS value for in-time component - no problem we can do a subtraction directly
406  f1_[j] = CumulativeIdealPulse[Offset + j * 25 + 25] - CumulativeIdealPulse[Offset + j * 25];
407 
408  // However for the out-of-time component the index might go out-of-bound.
409  // Let's protect against this.
410 
411  int OffsetTemp = Offset + j * 25 + Distance;
412 
413  double C1 = 0; // lower-indexed value in the cumulative pulse shape
414  double C2 = 0; // higher-indexed value in the cumulative pulse shape
415 
416  if (OffsetTemp + 25 >= (int)cipSize)
417  C1 = CumulativeIdealPulse[cipSize - 1];
418  else if (OffsetTemp >= -25)
419  C1 = CumulativeIdealPulse[OffsetTemp + 25];
420  if (OffsetTemp >= (int)cipSize)
421  C2 = CumulativeIdealPulse[cipSize - 1];
422  else if (OffsetTemp >= 0)
423  C2 = CumulativeIdealPulse[OffsetTemp];
424  f2_[j] = C1 - C2;
425 
426  SumF1F1 += f1_[j] * f1_[j] * errors_[j];
427  SumF1F2 += f1_[j] * f2_[j] * errors_[j];
428  SumF2F2 += f2_[j] * f2_[j] * errors_[j];
429  SumTF1 += f1_[j] * Charge[j] * errors_[j];
430  SumTF2 += f2_[j] * Charge[j] * errors_[j];
431  }
432 
433  double Height = 0;
434  double Height2 = 0;
435  if (fabs(SumF1F2 * SumF1F2 - SumF1F1 * SumF2F2) > 1e-5) {
436  Height = (SumF1F2 * SumTF2 - SumF2F2 * SumTF1) / (SumF1F2 * SumF1F2 - SumF1F1 * SumF2F2);
437  Height2 = (SumF1F2 * SumTF1 - SumF1F1 * SumTF2) / (SumF1F2 * SumF1F2 - SumF1F1 * SumF2F2);
438  }
439 
440  double Chi2 = 0;
441  for (int j = 0; j < DigiSize; j++) {
442  double Residual = Height * f1_[j] + Height2 * f2_[j] - Charge[j];
443  Chi2 += Residual * Residual * errors_[j];
444  }
445 
446  // Safety protection in case of zero
447  if (Chi2 < 1e-5)
448  Chi2 = 1e-5;
449 
450  return Chi2;
451 }
std::vector< double > f1_
std::vector< double > f2_
DisplacedVertexCluster::Distance Distance
std::vector< double > errors_
std::vector< double > CumulativeIdealPulse
Definition: Chi2.h:15

◆ Initialize()

void HBHEPulseShapeFlagSetter::Initialize ( )

Definition at line 103 of file HBHEPulseShapeFlag.cc.

References HcalPulseShape::at(), CumulativeIdealPulse, HcalPulseShapes::hbShape(), mps_fire::i, and mCharge.

Referenced by HBHEPulseShapeFlagSetter().

103  {
104  //
105  // Initialization: whatever preprocess is needed
106  //
107  // 1. Get the ideal pulse shape from CMSSW
108  //
109  // Since the HcalPulseShapes class stores the ideal pulse shape in terms of 256 numbers,
110  // each representing 1ns integral of the ideal pulse, here I'm taking out the vector
111  // by calling at() function.
112  //
113  // A cumulative distribution is formed and stored to save some time doing integration to TS later on
114  //
115  // 2. Reserve space for vector
116  //
117 
118  std::vector<double> PulseShape;
119 
120  HcalPulseShapes Shapes;
121  const HcalPulseShapes::Shape& HPDShape = Shapes.hbShape();
122 
123  PulseShape.reserve(350);
124  for (int i = 0; i < 200; i++)
125  PulseShape.push_back(HPDShape.at(i));
126  PulseShape.insert(PulseShape.begin(), 150, 0); // Safety margin of a lot of zeros in the beginning
127 
128  CumulativeIdealPulse.reserve(350);
129  CumulativeIdealPulse.clear();
130  CumulativeIdealPulse.push_back(0);
131  for (unsigned int i = 1; i < PulseShape.size(); i++)
132  CumulativeIdealPulse.push_back(CumulativeIdealPulse[i - 1] + PulseShape[i]);
133 
134  // reserve space for vector
135  mCharge.reserve(10);
136 }
std::vector< double > mCharge
const Shape & hbShape() const
std::vector< double > CumulativeIdealPulse
float at(double time) const

◆ PerformDualNominalFit()

double HBHEPulseShapeFlagSetter::PerformDualNominalFit ( const std::vector< double > &  Charge)
private

Definition at line 319 of file HBHEPulseShapeFlag.cc.

References PixelTestBeamValidation_cfi::Charge, RecoSummaryTask_cfi::Chi2, CumulativeIdealPulse, DualNominalFitSingleTry(), mps_fire::i, createfilelist::int, cuy::isFirst, and dqmdumpme::k.

Referenced by SetPulseShapeFlags().

319  {
320  //
321  // Perform dual nominal fit and returns the chi2
322  //
323  // In this function we do a scan over possible "distance" (number of time slices between two components)
324  // and overall offset for the two components; first coarse, then finer
325  // All the fitting is done in the DualNominalFitSingleTry function
326  //
327 
328  double OverallMinimumChi2 = 1000000;
329 
330  int AvailableDistance[] = {-100, -75, -50, 50, 75, 100};
331 
332  // loop over possible pulse distances between two components
333  bool isFirst = true;
334 
335  for (int k = 0; k < 6; k++) {
336  double SingleMinimumChi2 = 1000000;
337  int MinOffset = 0;
338 
339  // scan coarsely through different offsets and find the minimum
340  for (int i = 0; i + 250 < (int)CumulativeIdealPulse.size(); i += 10) {
341  double Chi2 = DualNominalFitSingleTry(Charge, i, AvailableDistance[k], isFirst);
342  isFirst = false;
343  if (Chi2 < SingleMinimumChi2) {
344  SingleMinimumChi2 = Chi2;
345  MinOffset = i;
346  }
347  }
348 
349  // around the minimum, scan finer for better a better minimum
350  for (int i = MinOffset - 15; i + 250 < (int)CumulativeIdealPulse.size() && i < MinOffset + 15; i++) {
351  double Chi2 = DualNominalFitSingleTry(Charge, i, AvailableDistance[k], false);
352  if (Chi2 < SingleMinimumChi2)
353  SingleMinimumChi2 = Chi2;
354  }
355 
356  // update overall minimum chi2
357  if (SingleMinimumChi2 < OverallMinimumChi2)
358  OverallMinimumChi2 = SingleMinimumChi2;
359  }
360 
361  return OverallMinimumChi2;
362 }
double DualNominalFitSingleTry(const std::vector< double > &Charge, int Offset, int Distance, bool newCharges=true)
isFirst
Definition: cuy.py:418
std::vector< double > CumulativeIdealPulse
Definition: Chi2.h:15

◆ PerformLinearFit()

double HBHEPulseShapeFlagSetter::PerformLinearFit ( const std::vector< double > &  Charge)
private

Definition at line 495 of file HBHEPulseShapeFlag.cc.

References PixelTestBeamValidation_cfi::Charge, RecoSummaryTask_cfi::Chi2, HLT_FULL_cff::Deviation, MillePedeFileConverter_cfg::e, mps_fire::i, eeNoiseFilter_cfi::Intercept, and eeNoiseFilter_cfi::Slope.

Referenced by SetPulseShapeFlags().

495  {
496  //
497  // Performs a straight-line fit over all time slices, and returns the chi2 value
498  //
499  // The calculation here is based from writing down the formula for chi2 and minimize
500  // with respect to the parameters in the fit, ie., slope and intercept of the straight line
501  // By doing two differentiation, we will get two equations, and the best parameters are determined by these
502  //
503 
504  int DigiSize = Charge.size();
505 
506  double SumTS2OverTi = 0;
507  double SumTSOverTi = 0;
508  double SumOverTi = 0;
509  double SumTiTS = 0;
510  double SumTi = 0;
511 
512  double Error2 = 0;
513  for (int i = 0; i < DigiSize; i++) {
514  Error2 = Charge[i];
515  if (Charge[i] < 1)
516  Error2 = 1;
517 
518  SumTS2OverTi += 1. * i * i / Error2;
519  SumTSOverTi += 1. * i / Error2;
520  SumOverTi += 1. / Error2;
521  SumTiTS += Charge[i] * i / Error2;
522  SumTi += Charge[i] / Error2;
523  }
524 
525  double CM1 = SumTS2OverTi; // Coefficient in front of slope in equation 1
526  double CM2 = SumTSOverTi; // Coefficient in front of slope in equation 2
527  double CD1 = SumTSOverTi; // Coefficient in front of intercept in equation 1
528  double CD2 = SumOverTi; // Coefficient in front of intercept in equation 2
529  double C1 = SumTiTS; // Constant coefficient in equation 1
530  double C2 = SumTi; // Constant coefficient in equation 2
531 
532  // Denominators always non-zero by construction
533  double Slope = (C1 * CD2 - C2 * CD1) / (CM1 * CD2 - CM2 * CD1);
534  double Intercept = (C1 * CM2 - C2 * CM1) / (CD1 * CM2 - CD2 * CM1);
535 
536  // now that the best parameters are found, calculate chi2 from those
537  double Chi2 = 0;
538  for (int i = 0; i < DigiSize; i++) {
539  double Deviation = Slope * i + Intercept - Charge[i];
540  double Error2 = Charge[i];
541  if (Charge[i] < 1)
542  Error2 = 1;
543  Chi2 += Deviation * Deviation / Error2;
544  }
545 
546  // safety protection in case of perfect fit
547  if (Chi2 < 1e-5)
548  Chi2 = 1e-5;
549 
550  return Chi2;
551 }
Definition: Chi2.h:15

◆ PerformNominalFit()

double HBHEPulseShapeFlagSetter::PerformNominalFit ( const std::vector< double > &  Charge)
private

Definition at line 255 of file HBHEPulseShapeFlag.cc.

References PixelTestBeamValidation_cfi::Charge, RecoSummaryTask_cfi::Chi2, CumulativeIdealPulse, MillePedeFileConverter_cfg::e, F(), mps_fire::i, createfilelist::int, and dqmiolumiharvest::j.

Referenced by SetPulseShapeFlags().

255  {
256  //
257  // Performs a fit to the ideal pulse shape. Returns best chi2
258  //
259  // A scan over different timing offset (for the ideal pulse) is carried out,
260  // and for each offset setting a one-parameter fit is performed
261  //
262 
263  int DigiSize = Charge.size();
264 
265  double MinimumChi2 = 100000;
266 
267  double F = 0;
268 
269  double SumF2 = 0;
270  double SumTF = 0;
271  double SumT2 = 0;
272 
273  for (int i = 0; i + 250 < (int)CumulativeIdealPulse.size(); i++) {
274  if (CumulativeIdealPulse[i + 250] - CumulativeIdealPulse[i] < 1e-5)
275  continue;
276 
277  SumF2 = 0;
278  SumTF = 0;
279  SumT2 = 0;
280 
281  double ErrorTemp = 0;
282  for (int j = 0; j < DigiSize; j++) {
283  // get ideal pulse component for this time slice....
284  F = CumulativeIdealPulse[i + j * 25 + 25] - CumulativeIdealPulse[i + j * 25];
285 
286  ErrorTemp = Charge[j];
287  if (ErrorTemp < 1) // protection against small charges
288  ErrorTemp = 1;
289  // ...and increment various summations
290  SumF2 += F * F / ErrorTemp;
291  SumTF += F * Charge[j] / ErrorTemp;
292  SumT2 += fabs(Charge[j]);
293  }
294 
295  /*
296  chi2= sum((Charge[j]-aF)^2/|Charge[j]|
297  ( |Charge[j]| = assumed sigma^2 for Charge[j]; a bit wonky for Charge[j]<1 )
298  chi2 = sum(|Charge[j]|) - 2*sum(aF*Charge[j]/|Charge[j]|) +sum( a^2*F^2/|Charge[j]|)
299  chi2 minimimized when d(chi2)/da = 0:
300  a = sum(F*Charge[j])/sum(F^2)
301  ...
302  chi2= sum(|Q[j]|) - sum(Q[j]/|Q[j]|*F)*sum(Q[j]/|Q[j]|*F)/sum(F^2/|Q[j]|), where Q = Charge
303  chi2 = SumT2 - SumTF*SumTF/SumF2
304  */
305 
306  double Chi2 = SumT2 - SumTF * SumTF / SumF2;
307 
308  if (Chi2 < MinimumChi2)
309  MinimumChi2 = Chi2;
310  }
311 
312  // safety protection in case of perfect fit - don't want the log(...) to explode
313  if (MinimumChi2 < 1e-5)
314  MinimumChi2 = 1e-5;
315 
316  return MinimumChi2;
317 }
std::vector< double > CumulativeIdealPulse
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:163
Definition: Chi2.h:15

◆ PerformTriangleFit()

TriangleFitResult HBHEPulseShapeFlagSetter::PerformTriangleFit ( const std::vector< double > &  Charge)
private

Definition at line 138 of file HBHEPulseShapeFlag.cc.

References PixelTestBeamValidation_cfi::Charge, RecoSummaryTask_cfi::Chi2, mps_fire::i, createfilelist::int, mTrianglePeakTS, and mps_fire::result.

Referenced by SetPulseShapeFlags().

138  {
139  //
140  // Perform a "triangle fit", and extract the slopes
141  //
142  // Left-hand side and right-hand side are not correlated to each other - do them separately
143  //
144 
146  result.Chi2 = 0;
147  result.LeftSlope = 0;
148  result.RightSlope = 0;
149 
150  int DigiSize = Charge.size();
151 
152  // right side, starting from TS4
153  double MinimumRightChi2 = 1000000;
154  double Numerator = 0;
155  double Denominator = 0;
156 
157  for (int iTS = mTrianglePeakTS + 2; iTS <= DigiSize; iTS++) // the place where first TS center in flat line
158  {
159  // fit a straight line to the triangle part
160  Numerator = 0;
161  Denominator = 0;
162 
163  for (int i = mTrianglePeakTS + 1; i < iTS; i++) {
164  Numerator += (i - mTrianglePeakTS) * (Charge[i] - Charge[mTrianglePeakTS]);
165  Denominator += (i - mTrianglePeakTS) * (i - mTrianglePeakTS);
166  }
167 
168  double BestSlope = 0;
169  if (Denominator != 0)
170  BestSlope = Numerator / Denominator;
171  if (BestSlope > 0)
172  BestSlope = 0;
173 
174  // check if the slope is reasonable
175  if (iTS != DigiSize) {
176  // iTS starts at mTrianglePeak+2; denominator never zero
177  if (BestSlope > -1 * Charge[mTrianglePeakTS] / (iTS - mTrianglePeakTS))
178  BestSlope = -1 * Charge[mTrianglePeakTS] / (iTS - mTrianglePeakTS);
179  if (BestSlope < -1 * Charge[mTrianglePeakTS] / (iTS - 1 - mTrianglePeakTS))
180  BestSlope = -1 * Charge[mTrianglePeakTS] / (iTS - 1 - mTrianglePeakTS);
181  } else {
182  // iTS starts at mTrianglePeak+2; denominator never zero
183  if (BestSlope < -1 * Charge[mTrianglePeakTS] / (iTS - 1 - mTrianglePeakTS))
184  BestSlope = -1 * Charge[mTrianglePeakTS] / (iTS - 1 - mTrianglePeakTS);
185  }
186 
187  // calculate partial chi2
188 
189  // The shape I'm fitting is more like a tent than a triangle.
190  // After the end of triangle edge assume a flat line
191 
192  double Chi2 = 0;
193  for (int i = mTrianglePeakTS + 1; i < iTS; i++)
194  Chi2 += (Charge[mTrianglePeakTS] - Charge[i] + (i - mTrianglePeakTS) * BestSlope) *
195  (Charge[mTrianglePeakTS] - Charge[i] + (i - mTrianglePeakTS) * BestSlope);
196  for (int i = iTS; i < DigiSize; i++) // Assumes fit line = 0 for iTS > fit
197  Chi2 += Charge[i] * Charge[i];
198 
199  if (Chi2 < MinimumRightChi2) {
200  MinimumRightChi2 = Chi2;
201  result.RightSlope = BestSlope;
202  }
203  } // end of right-hand side loop
204 
205  // left side
206  double MinimumLeftChi2 = 1000000;
207 
208  for (int iTS = 0; iTS < (int)mTrianglePeakTS; iTS++) // the first time after linear fit ends
209  {
210  // fit a straight line to the triangle part
211  Numerator = 0;
212  Denominator = 0;
213  for (int i = iTS; i < (int)mTrianglePeakTS; i++) {
214  Numerator = Numerator + (i - mTrianglePeakTS) * (Charge[i] - Charge[mTrianglePeakTS]);
215  Denominator = Denominator + (i - mTrianglePeakTS) * (i - mTrianglePeakTS);
216  }
217 
218  double BestSlope = 0;
219  if (Denominator != 0)
220  BestSlope = Numerator / Denominator;
221  if (BestSlope < 0)
222  BestSlope = 0;
223 
224  // check slope
225  if (iTS != 0) {
226  // iTS must be >0 and < mTrianglePeakTS; slope never 0
227  if (BestSlope > Charge[mTrianglePeakTS] / (mTrianglePeakTS - iTS))
228  BestSlope = Charge[mTrianglePeakTS] / (mTrianglePeakTS - iTS);
229  if (BestSlope < Charge[mTrianglePeakTS] / (mTrianglePeakTS + 1 - iTS))
230  BestSlope = Charge[mTrianglePeakTS] / (mTrianglePeakTS + 1 - iTS);
231  } else {
232  if (BestSlope > Charge[mTrianglePeakTS] / (mTrianglePeakTS - iTS))
233  BestSlope = Charge[mTrianglePeakTS] / (mTrianglePeakTS - iTS);
234  }
235 
236  // calculate minimum chi2
237  double Chi2 = 0;
238  for (int i = 0; i < iTS; i++)
239  Chi2 += Charge[i] * Charge[i];
240  for (int i = iTS; i < (int)mTrianglePeakTS; i++)
241  Chi2 += (Charge[mTrianglePeakTS] - Charge[i] + (i - mTrianglePeakTS) * BestSlope) *
242  (Charge[mTrianglePeakTS] - Charge[i] + (i - mTrianglePeakTS) * BestSlope);
243 
244  if (MinimumLeftChi2 > Chi2) {
245  MinimumLeftChi2 = Chi2;
246  result.LeftSlope = BestSlope;
247  }
248  } // end of left-hand side loop
249 
250  result.Chi2 = MinimumLeftChi2 + MinimumRightChi2;
251 
252  return result;
253 }
Definition: Chi2.h:15

◆ SetPulseShapeFlags()

template<class Dataframe >
void HBHEPulseShapeFlagSetter::SetPulseShapeFlags ( HBHERecHit hbhe,
const Dataframe &  digi,
const HcalCoder coder,
const HcalCalibrations calib 
)

Definition at line 117 of file HBHEPulseShapeFlag.h.

References HcalCoder::adc2fC(), CalculateRMS8Max(), CheckPassFilter(), MillePedeFileConverter_cfg::e, photonIsolationHIProducer_cfi::hbhe, HcalCaloFlagLabels::HBHEFlatNoise, HcalCaloFlagLabels::HBHEOOTPU, HcalCaloFlagLabels::HBHESpikeNoise, HcalCaloFlagLabels::HBHETriangleNoise, HcalCaloFlagLabels::HBHETS4TS5Noise, mps_fire::i, TriangleFitResult::LeftSlope, dqm-mbProfile::log, mCharge, mLambdaLinearCut, mLambdaRMS8MaxCut, mLeftSlopeCut, mMinimumChargeThreshold, mR45MinusOneRange, mR45PlusOneRange, mRightSlopeCut, mRightSlopeSmallCut, mSetLegacyFlags, mTriangleIgnoreSlow, mTrianglePeakTS, mTS3TS4ChargeThreshold, mTS3TS4UpperChargeThreshold, mTS4TS5ChargeThreshold, mTS4TS5LowerCut, mTS4TS5UpperCut, mTS5TS6ChargeThreshold, mTS5TS6UpperChargeThreshold, mUseDualFit, PerformDualNominalFit(), PerformLinearFit(), PerformNominalFit(), PerformTriangleFit(), and TriangleFitResult::RightSlope.

120  {
121  //
122  // Decide if a digi/pulse is good or bad using fit-based discriminants
123  //
124  // SetPulseShapeFlags determines the total charge in the digi.
125  // If the charge is above the minimum threshold, the code then
126  // runs the flag-setting algorithms to determine whether the
127  // flags should be set.
128  //
129 
130  // hack to exclude ieta=28/29 for the moment...
131  int abseta = hbhe.id().ietaAbs();
132  if (abseta == 28 || abseta == 29)
133  return;
134 
135  CaloSamples Tool;
136  coder.adc2fC(digi, Tool);
137 
138  // mCharge.clear(); // mCharge is a vector of (pedestal-subtracted) Charge values vs. time slice
139  const unsigned nRead = digi.size();
140  mCharge.resize(nRead);
141 
142  double TotalCharge = 0.0;
143  for (unsigned i = 0; i < nRead; ++i) {
144  mCharge[i] = Tool[i] - calib.pedestal(digi[i].capid());
145  TotalCharge += mCharge[i];
146  }
147 
148  // No flagging if TotalCharge is less than threshold
149  if (TotalCharge < mMinimumChargeThreshold)
150  return;
151 
152  if (mSetLegacyFlags) {
153  double NominalChi2 = 0;
154  if (mUseDualFit == true)
155  NominalChi2 = PerformDualNominalFit(mCharge);
156  else
157  NominalChi2 = PerformNominalFit(mCharge);
158 
159  double LinearChi2 = PerformLinearFit(mCharge);
160 
161  double RMS8Max = CalculateRMS8Max(mCharge);
162 
163  // Set the HBHEFlatNoise and HBHESpikeNoise flags
164  if (CheckPassFilter(TotalCharge, log(LinearChi2) - log(NominalChi2), mLambdaLinearCut, -1) == false)
165  hbhe.setFlagField(1, HcalCaloFlagLabels::HBHEFlatNoise);
166  if (CheckPassFilter(TotalCharge, log(RMS8Max) * 2 - log(NominalChi2), mLambdaRMS8MaxCut, -1) == false)
167  hbhe.setFlagField(1, HcalCaloFlagLabels::HBHESpikeNoise);
168 
169  // Set the HBHETriangleNoise flag
170  if ((int)mCharge.size() >=
171  mTrianglePeakTS) // can't compute flag if peak TS isn't present; revise this at some point?
172  {
173  TriangleFitResult TriangleResult = PerformTriangleFit(mCharge);
174 
175  // initial values
176  double TS4Left = 1000;
177  double TS4Right = 1000;
178 
179  // Use 'if' statements to protect against slopes that are either 0 or very small
180  if (TriangleResult.LeftSlope > 1e-5)
181  TS4Left = mCharge[mTrianglePeakTS] / TriangleResult.LeftSlope;
182  if (TriangleResult.RightSlope < -1e-5)
183  TS4Right = mCharge[mTrianglePeakTS] / -TriangleResult.RightSlope;
184 
185  if (TS4Left > 1000 || TS4Left < -1000)
186  TS4Left = 1000;
187  if (TS4Right > 1000 || TS4Right < -1000)
188  TS4Right = 1000;
189 
190  if (mTriangleIgnoreSlow == false) // the slow-rising and slow-dropping edges won't be useful in 50ns/75ns
191  {
192  if (CheckPassFilter(mCharge[mTrianglePeakTS], TS4Left, mLeftSlopeCut, 1) == false)
194  else if (CheckPassFilter(mCharge[mTrianglePeakTS], TS4Right, mRightSlopeCut, 1) == false)
196  }
197 
198  // fast-dropping ones should be checked in any case
199  if (CheckPassFilter(mCharge[mTrianglePeakTS], TS4Right, mRightSlopeSmallCut, -1) == false)
201  }
202  }
203 
204  int soi = digi.presamples();
205 
206  if (mCharge[soi] + mCharge[soi + 1] > mTS4TS5ChargeThreshold &&
207  mTS4TS5ChargeThreshold > 0) // silly protection against negative charge values
208  {
209  double TS4TS5 = (mCharge[soi] - mCharge[soi + 1]) / (mCharge[soi] + mCharge[soi + 1]);
210  if (CheckPassFilter(mCharge[soi] + mCharge[soi + 1], TS4TS5, mTS4TS5UpperCut, 1) == false)
211  hbhe.setFlagField(1, HcalCaloFlagLabels::HBHETS4TS5Noise);
212  if (CheckPassFilter(mCharge[soi] + mCharge[soi + 1], TS4TS5, mTS4TS5LowerCut, -1) == false)
213  hbhe.setFlagField(1, HcalCaloFlagLabels::HBHETS4TS5Noise);
214 
215  if (CheckPassFilter(mCharge[soi] + mCharge[soi + 1], TS4TS5, mTS4TS5UpperCut, 1) ==
216  false && // TS4TS5 is above envelope
217  mCharge[soi - 1] + mCharge[soi] > mTS3TS4ChargeThreshold &&
218  mTS3TS4ChargeThreshold > 0 && // enough charge in 34
219  mCharge[soi + 1] + mCharge[soi + 2] < mTS5TS6UpperChargeThreshold &&
220  mTS5TS6UpperChargeThreshold > 0 && // low charge in 56
221  fabs((mCharge[soi] - mCharge[soi + 1]) / (mCharge[soi] + mCharge[soi + 1]) - 1.0) <
222  mR45PlusOneRange) // R45 is around +1
223  {
224  double TS3TS4 = (mCharge[soi - 1] - mCharge[soi]) / (mCharge[soi - 1] + mCharge[soi]);
225  if (CheckPassFilter(mCharge[soi - 1] + mCharge[soi], TS3TS4, mTS4TS5UpperCut, 1) ==
226  true && // use the same envelope as TS4TS5
227  CheckPassFilter(mCharge[soi - 1] + mCharge[soi], TS3TS4, mTS4TS5LowerCut, -1) ==
228  true && // use the same envelope as TS4TS5
229  TS3TS4 > (mR45MinusOneRange - 1)) // horizontal cut on R34 (R34>-0.8)
230  hbhe.setFlagField(
231  1, HcalCaloFlagLabels::HBHEOOTPU); // set to 1 if there is a pulse-shape-wise good OOTPU in TS3TS4.
232  }
233 
234  if (CheckPassFilter(mCharge[soi] + mCharge[soi + 1], TS4TS5, mTS4TS5LowerCut, -1) ==
235  false && // TS4TS5 is below envelope
236  mCharge[soi - 1] + mCharge[soi] < mTS3TS4UpperChargeThreshold &&
237  mTS3TS4UpperChargeThreshold > 0 && // low charge in 34
238  mCharge[soi + 1] + mCharge[soi + 2] > mTS5TS6ChargeThreshold &&
239  mTS5TS6ChargeThreshold > 0 && // enough charge in 56
240  fabs((mCharge[soi] - mCharge[soi + 1]) / (mCharge[soi] + mCharge[soi + 1]) + 1.0) <
241  mR45MinusOneRange) // R45 is around -1
242  {
243  double TS5TS6 = (mCharge[soi + 1] - mCharge[soi + 2]) / (mCharge[soi + 1] + mCharge[soi + 2]);
244  if (CheckPassFilter(mCharge[soi + 1] + mCharge[soi + 2], TS5TS6, mTS4TS5UpperCut, 1) ==
245  true && // use the same envelope as TS4TS5
246  CheckPassFilter(mCharge[soi + 1] + mCharge[soi + 2], TS5TS6, mTS4TS5LowerCut, -1) ==
247  true && // use the same envelope as TS4TS5
248  TS5TS6 < (1 - mR45PlusOneRange)) // horizontal cut on R56 (R56<+0.8)
249  hbhe.setFlagField(
250  1, HcalCaloFlagLabels::HBHEOOTPU); // set to 1 if there is a pulse-shape-wise good OOTPU in TS5TS6.
251  }
252  }
253 }
std::vector< std::pair< double, double > > mLambdaLinearCut
double CalculateRMS8Max(const std::vector< double > &Charge)
std::vector< std::pair< double, double > > mTS4TS5LowerCut
double PerformNominalFit(const std::vector< double > &Charge)
double PerformDualNominalFit(const std::vector< double > &Charge)
double PerformLinearFit(const std::vector< double > &Charge)
std::vector< std::pair< double, double > > mLeftSlopeCut
TriangleFitResult PerformTriangleFit(const std::vector< double > &Charge)
std::vector< std::pair< double, double > > mRightSlopeCut
bool CheckPassFilter(double Charge, double Discriminant, std::vector< std::pair< double, double > > &Cuts, int Side)
std::vector< double > mCharge
std::vector< std::pair< double, double > > mRightSlopeSmallCut
virtual void adc2fC(const HBHEDataFrame &df, CaloSamples &lf) const =0
std::vector< std::pair< double, double > > mLambdaRMS8MaxCut
std::vector< std::pair< double, double > > mTS4TS5UpperCut

Member Data Documentation

◆ CumulativeIdealPulse

std::vector<double> HBHEPulseShapeFlagSetter::CumulativeIdealPulse
private

◆ errors_

std::vector<double> HBHEPulseShapeFlagSetter::errors_
private

Definition at line 106 of file HBHEPulseShapeFlag.h.

Referenced by DualNominalFitSingleTry().

◆ f1_

std::vector<double> HBHEPulseShapeFlagSetter::f1_
private

Definition at line 104 of file HBHEPulseShapeFlag.h.

Referenced by DualNominalFitSingleTry().

◆ f2_

std::vector<double> HBHEPulseShapeFlagSetter::f2_
private

Definition at line 105 of file HBHEPulseShapeFlag.h.

Referenced by DualNominalFitSingleTry().

◆ mCharge

std::vector<double> HBHEPulseShapeFlagSetter::mCharge
private

Definition at line 80 of file HBHEPulseShapeFlag.h.

Referenced by Initialize(), and SetPulseShapeFlags().

◆ mLambdaLinearCut

std::vector<std::pair<double, double> > HBHEPulseShapeFlagSetter::mLambdaLinearCut
private

Definition at line 82 of file HBHEPulseShapeFlag.h.

Referenced by HBHEPulseShapeFlagSetter(), and SetPulseShapeFlags().

◆ mLambdaRMS8MaxCut

std::vector<std::pair<double, double> > HBHEPulseShapeFlagSetter::mLambdaRMS8MaxCut
private

Definition at line 83 of file HBHEPulseShapeFlag.h.

Referenced by HBHEPulseShapeFlagSetter(), and SetPulseShapeFlags().

◆ mLeftSlopeCut

std::vector<std::pair<double, double> > HBHEPulseShapeFlagSetter::mLeftSlopeCut
private

Definition at line 84 of file HBHEPulseShapeFlag.h.

Referenced by HBHEPulseShapeFlagSetter(), and SetPulseShapeFlags().

◆ mMinimumChargeThreshold

double HBHEPulseShapeFlagSetter::mMinimumChargeThreshold
private

Definition at line 71 of file HBHEPulseShapeFlag.h.

Referenced by HBHEPulseShapeFlagSetter(), and SetPulseShapeFlags().

◆ mR45MinusOneRange

double HBHEPulseShapeFlagSetter::mR45MinusOneRange
private

Definition at line 78 of file HBHEPulseShapeFlag.h.

Referenced by HBHEPulseShapeFlagSetter(), and SetPulseShapeFlags().

◆ mR45PlusOneRange

double HBHEPulseShapeFlagSetter::mR45PlusOneRange
private

Definition at line 77 of file HBHEPulseShapeFlag.h.

Referenced by HBHEPulseShapeFlagSetter(), and SetPulseShapeFlags().

◆ mRightSlopeCut

std::vector<std::pair<double, double> > HBHEPulseShapeFlagSetter::mRightSlopeCut
private

Definition at line 85 of file HBHEPulseShapeFlag.h.

Referenced by HBHEPulseShapeFlagSetter(), and SetPulseShapeFlags().

◆ mRightSlopeSmallCut

std::vector<std::pair<double, double> > HBHEPulseShapeFlagSetter::mRightSlopeSmallCut
private

Definition at line 86 of file HBHEPulseShapeFlag.h.

Referenced by HBHEPulseShapeFlagSetter(), and SetPulseShapeFlags().

◆ mSetLegacyFlags

bool HBHEPulseShapeFlagSetter::mSetLegacyFlags
private

Definition at line 91 of file HBHEPulseShapeFlag.h.

Referenced by HBHEPulseShapeFlagSetter(), and SetPulseShapeFlags().

◆ mTriangleIgnoreSlow

bool HBHEPulseShapeFlagSetter::mTriangleIgnoreSlow
private

Definition at line 90 of file HBHEPulseShapeFlag.h.

Referenced by HBHEPulseShapeFlagSetter(), and SetPulseShapeFlags().

◆ mTrianglePeakTS

int HBHEPulseShapeFlagSetter::mTrianglePeakTS
private

◆ mTS3TS4ChargeThreshold

double HBHEPulseShapeFlagSetter::mTS3TS4ChargeThreshold
private

Definition at line 75 of file HBHEPulseShapeFlag.h.

Referenced by HBHEPulseShapeFlagSetter(), and SetPulseShapeFlags().

◆ mTS3TS4UpperChargeThreshold

double HBHEPulseShapeFlagSetter::mTS3TS4UpperChargeThreshold
private

Definition at line 73 of file HBHEPulseShapeFlag.h.

Referenced by HBHEPulseShapeFlagSetter(), and SetPulseShapeFlags().

◆ mTS4TS5ChargeThreshold

double HBHEPulseShapeFlagSetter::mTS4TS5ChargeThreshold
private

Definition at line 72 of file HBHEPulseShapeFlag.h.

Referenced by HBHEPulseShapeFlagSetter(), and SetPulseShapeFlags().

◆ mTS4TS5LowerCut

std::vector<std::pair<double, double> > HBHEPulseShapeFlagSetter::mTS4TS5LowerCut
private

Definition at line 88 of file HBHEPulseShapeFlag.h.

Referenced by HBHEPulseShapeFlagSetter(), and SetPulseShapeFlags().

◆ mTS4TS5UpperCut

std::vector<std::pair<double, double> > HBHEPulseShapeFlagSetter::mTS4TS5UpperCut
private

Definition at line 87 of file HBHEPulseShapeFlag.h.

Referenced by HBHEPulseShapeFlagSetter(), and SetPulseShapeFlags().

◆ mTS5TS6ChargeThreshold

double HBHEPulseShapeFlagSetter::mTS5TS6ChargeThreshold
private

Definition at line 76 of file HBHEPulseShapeFlag.h.

Referenced by HBHEPulseShapeFlagSetter(), and SetPulseShapeFlags().

◆ mTS5TS6UpperChargeThreshold

double HBHEPulseShapeFlagSetter::mTS5TS6UpperChargeThreshold
private

Definition at line 74 of file HBHEPulseShapeFlag.h.

Referenced by HBHEPulseShapeFlagSetter(), and SetPulseShapeFlags().

◆ mUseDualFit

bool HBHEPulseShapeFlagSetter::mUseDualFit
private

Definition at line 89 of file HBHEPulseShapeFlag.h.

Referenced by HBHEPulseShapeFlagSetter(), and SetPulseShapeFlags().