|
double | EnergyThreshold () |
|
void | hbheSetTimeFlagsFromDigi (HBHERecHitCollection *, const std::vector< HBHEDataFrame > &, const std::vector< int > &) |
|
| HBHETimeProfileStatusBitSetter () |
|
| HBHETimeProfileStatusBitSetter (double R1Min, double R1Max, double R2Min, double R2Max, double FracLeaderMin, double FracLeaderMax, double SlopeMin, double SlopeMax, double OuterMin, double OuterMax, double EnergyThreshold) |
|
void | SetExpLimits (double R1Min, double R1Max, double R2Min, double R2Max) |
|
void | SetFracLeaderLimits (double FracLeaderMin, double FracLeaderMax) |
|
void | SetOuterLimits (double OuterMin, double OuterMax) |
|
void | SetSlopeLimits (double SlopeMin, double SlopeMax) |
|
| ~HBHETimeProfileStatusBitSetter () |
|
This class sets status bit in the status words for the revised CaloRecHit objets according to informatino from the digi associated to the hit.
- Author
- B Jones – University of Bristol / University of Maryland
Definition at line 15 of file HBHETimeProfileStatusBitSetter.h.
void HBHETimeProfileStatusBitSetter::hbheSetTimeFlagsFromDigi |
( |
HBHERecHitCollection * |
hbhe, |
|
|
const std::vector< HBHEDataFrame > & |
udigi, |
|
|
const std::vector< int > & |
RecHitIndex |
|
) |
| |
Definition at line 64 of file HBHETimeProfileStatusBitSetter.cc.
67 bool Bits[4] = {
false,
false,
false,
false};
68 std::vector<HBHEDataFrame> digi(udigi);
69 std::sort(digi.begin(), digi.end(), compareDigiEnergy);
70 std::vector<double> PulseShape;
74 bool FoundLeadingChannel =
false;
75 for (std::vector<HBHEDataFrame>::const_iterator itDigi = digi.begin(); itDigi != digi.end(); itDigi++) {
76 if (!FoundLeadingChannel) {
78 LeadingPhi = itDigi->id().iphi();
79 DigiSize = (*itDigi).size();
81 PulseShape.resize(DigiSize, 0);
82 FoundLeadingChannel =
true;
84 if (
abs(LeadingPhi - itDigi->id().iphi()) < 2)
85 for (
int i = 0;
i != DigiSize;
i++)
86 PulseShape[
i] += itDigi->sample(
i).nominal_fC();
89 if (!RecHitIndex.empty()) {
90 double FracInLeader = -1;
94 double OuterEnergy = -1;
95 double TotalEnergy = 0;
98 for (
int i = 0;
i != DigiSize;
i++) {
99 if (PulseShape[
i] > PulseShape[PeakPosition])
101 TotalEnergy += PulseShape[
i];
104 if (PeakPosition < (DigiSize - 2)) {
105 R1 = PulseShape[PeakPosition + 1] / PulseShape[PeakPosition];
106 R2 = PulseShape[PeakPosition + 2] / PulseShape[PeakPosition + 1];
109 FracInLeader = PulseShape[PeakPosition] / TotalEnergy;
111 if ((PeakPosition > 0) && (PeakPosition < (DigiSize - 2))) {
112 OuterEnergy = 1. - ((PulseShape[PeakPosition - 1] + PulseShape[PeakPosition] + PulseShape[PeakPosition + 1] +
113 PulseShape[PeakPosition + 2]) /
127 if (R1 != -1 && R2 != -1)
129 if (FracInLeader != -1)
131 if (OuterEnergy != -1)
145 for (
unsigned int i = 0;
i != RecHitIndex.size();
i++) {
References funct::abs(), FracLeaderMax_, FracLeaderMin_, HcalCaloFlagLabels::HSCP_ExpFit, HcalCaloFlagLabels::HSCP_FracLeader, HcalCaloFlagLabels::HSCP_OuterEnergy, HcalCaloFlagLabels::HSCP_R1R2, mps_fire::i, OuterMax_, OuterMin_, R1Max_, R1Min_, R2Max_, R2Min_, and jetUpdater_cfi::sort.