File indexing completed on 2024-04-06 12:04:45
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "DataFormats/METReco/interface/HcalNoiseSummary.h"
0010
0011
0012 HcalNoiseSummary::HcalNoiseSummary()
0013 : filterstatus_(0),
0014 noisetype_(0),
0015 emenergy_(0.0),
0016 hadenergy_(0.0),
0017 trackenergy_(0.0),
0018 min10_(999999.),
0019 max10_(-999999.),
0020 rms10_(0.0),
0021 min25_(999999.),
0022 max25_(-999999.),
0023 rms25_(0.0),
0024 cnthit10_(0),
0025 cnthit25_(0),
0026 mine2ts_(0.),
0027 mine10ts_(0.),
0028 maxe2ts_(0.),
0029 maxe10ts_(0.),
0030 maxzeros_(0),
0031 maxhpdhits_(0),
0032 maxhpdhitsnoother_(0),
0033 maxrbxhits_(0),
0034 minhpdemf_(999999.),
0035 minrbxemf_(999999.),
0036 nproblemRBXs_(0),
0037 nisolnoise_(0),
0038 isolnoisee_(0),
0039 isolnoiseet_(0),
0040 nflatnoise_(0),
0041 flatnoisee_(0),
0042 flatnoiseet_(0),
0043 nspikenoise_(0),
0044 spikenoisee_(0),
0045 spikenoiseet_(0),
0046 ntrianglenoise_(0),
0047 trianglenoisee_(0),
0048 trianglenoiseet_(0),
0049 nts4ts5noise_(0),
0050 ts4ts5noisee_(0),
0051 ts4ts5noiseet_(0),
0052 nnegativenoise_(0),
0053 negativenoisee_(0),
0054 negativenoiseet_(0),
0055 rechitCount_(0),
0056 rechitCount15_(0),
0057 rechitEnergy_(0),
0058 rechitEnergy15_(0),
0059 calibCharge_(0),
0060 lasmonCharge_(0),
0061 hasBadRBXTS4TS5_(false),
0062 hasBadRBXRechitR45Loose_(false),
0063 hasBadRBXRechitR45Tight_(false),
0064 goodJetFoundInLowBVRegion_(false),
0065 calibCountTS45_(0),
0066 calibCountgt15TS45_(0),
0067 calibChargeTS45_(0.),
0068 calibChargegt15TS45_(0.),
0069 calibCountHF_(0),
0070 calibChargeHF_(0.),
0071 hitsInLaserRegion_(0),
0072 hitsInNonLaserRegion_(0),
0073 energyInLaserRegion_(0.),
0074 energyInNonLaserRegion_(0.) {}
0075
0076
0077 HcalNoiseSummary::~HcalNoiseSummary() {}
0078
0079
0080 bool HcalNoiseSummary::passLooseNoiseFilter(void) const { return (filterstatus_ & 0xFF) == 0; }
0081
0082 bool HcalNoiseSummary::passTightNoiseFilter(void) const { return (filterstatus_ & 0xFF00) == 0; }
0083
0084 bool HcalNoiseSummary::passHighLevelNoiseFilter(void) const { return (filterstatus_ & 0xFF0000) == 0; }
0085
0086 int HcalNoiseSummary::noiseType(void) const {
0087 if (maxRBXHits() > 18)
0088 return 3;
0089 else if (maxRBXHits() > 8)
0090 return 2;
0091 return 1;
0092 }
0093
0094 int HcalNoiseSummary::noiseFilterStatus(void) const { return filterstatus_; }
0095
0096 float HcalNoiseSummary::eventEMEnergy(void) const { return emenergy_; }
0097
0098 float HcalNoiseSummary::eventHadEnergy(void) const { return hadenergy_; }
0099
0100 float HcalNoiseSummary::eventTrackEnergy(void) const { return trackenergy_; }
0101
0102 float HcalNoiseSummary::eventEMFraction(void) const {
0103 if (hadenergy_ + emenergy_ == 0.0)
0104 return -999.;
0105 else
0106 return emenergy_ / (hadenergy_ + emenergy_);
0107 }
0108
0109 float HcalNoiseSummary::eventChargeFraction(void) const {
0110 if (hadenergy_ + emenergy_ == 0.0)
0111 return -999.;
0112 else
0113 return trackenergy_ / (hadenergy_ + emenergy_);
0114 }
0115
0116 float HcalNoiseSummary::min10GeVHitTime(void) const { return min10_; }
0117
0118 float HcalNoiseSummary::max10GeVHitTime(void) const { return max10_; }
0119
0120 float HcalNoiseSummary::rms10GeVHitTime(void) const { return cnthit10_ > 0 ? std::sqrt(rms10_ / cnthit10_) : 999; }
0121
0122 float HcalNoiseSummary::min25GeVHitTime(void) const { return min25_; }
0123
0124 float HcalNoiseSummary::max25GeVHitTime(void) const { return max25_; }
0125
0126 float HcalNoiseSummary::rms25GeVHitTime(void) const { return cnthit25_ > 0 ? std::sqrt(rms25_ / cnthit25_) : 999; }
0127
0128 int HcalNoiseSummary::num10GeVHits(void) const { return cnthit10_; }
0129
0130 int HcalNoiseSummary::num25GeVHits(void) const { return cnthit25_; }
0131
0132 float HcalNoiseSummary::minE2TS(void) const { return mine2ts_; }
0133
0134 float HcalNoiseSummary::minE10TS(void) const { return mine10ts_; }
0135
0136 float HcalNoiseSummary::minE2Over10TS(void) const { return mine10ts_ == 0 ? 999999. : mine2ts_ / mine10ts_; }
0137
0138 float HcalNoiseSummary::maxE2TS(void) const { return maxe2ts_; }
0139
0140 float HcalNoiseSummary::maxE10TS(void) const { return maxe10ts_; }
0141
0142 float HcalNoiseSummary::maxE2Over10TS(void) const { return maxe10ts_ == 0 ? -999999. : maxe2ts_ / maxe10ts_; }
0143
0144 int HcalNoiseSummary::maxZeros(void) const { return maxzeros_; }
0145
0146 int HcalNoiseSummary::maxHPDHits(void) const { return maxhpdhits_; }
0147
0148 int HcalNoiseSummary::maxHPDNoOtherHits(void) const { return maxhpdhitsnoother_; }
0149
0150 int HcalNoiseSummary::maxRBXHits(void) const { return maxrbxhits_; }
0151
0152 float HcalNoiseSummary::minHPDEMF(void) const { return minhpdemf_; }
0153
0154 float HcalNoiseSummary::minRBXEMF(void) const { return minrbxemf_; }
0155
0156 int HcalNoiseSummary::numProblematicRBXs(void) const { return nproblemRBXs_; }
0157
0158 int HcalNoiseSummary::numIsolatedNoiseChannels(void) const { return nisolnoise_; }
0159
0160 float HcalNoiseSummary::isolatedNoiseSumE(void) const { return isolnoisee_; }
0161
0162 float HcalNoiseSummary::isolatedNoiseSumEt(void) const { return isolnoiseet_; }
0163
0164 int HcalNoiseSummary::numFlatNoiseChannels(void) const { return nflatnoise_; }
0165
0166 float HcalNoiseSummary::flatNoiseSumE(void) const { return flatnoisee_; }
0167
0168 float HcalNoiseSummary::flatNoiseSumEt(void) const { return flatnoiseet_; }
0169
0170 int HcalNoiseSummary::numSpikeNoiseChannels(void) const { return nspikenoise_; }
0171
0172 float HcalNoiseSummary::spikeNoiseSumE(void) const { return spikenoisee_; }
0173
0174 float HcalNoiseSummary::spikeNoiseSumEt(void) const { return spikenoiseet_; }
0175
0176 int HcalNoiseSummary::numTriangleNoiseChannels(void) const { return ntrianglenoise_; }
0177
0178 float HcalNoiseSummary::triangleNoiseSumE(void) const { return trianglenoisee_; }
0179
0180 float HcalNoiseSummary::triangleNoiseSumEt(void) const { return trianglenoiseet_; }
0181
0182 int HcalNoiseSummary::numTS4TS5NoiseChannels(void) const { return nts4ts5noise_; }
0183
0184 float HcalNoiseSummary::TS4TS5NoiseSumE(void) const { return ts4ts5noisee_; }
0185
0186 float HcalNoiseSummary::TS4TS5NoiseSumEt(void) const { return ts4ts5noiseet_; }
0187
0188 int HcalNoiseSummary::numNegativeNoiseChannels(void) const { return nnegativenoise_; }
0189
0190 float HcalNoiseSummary::NegativeNoiseSumE(void) const { return negativenoisee_; }
0191
0192 float HcalNoiseSummary::NegativeNoiseSumEt(void) const { return negativenoiseet_; }
0193
0194 int HcalNoiseSummary::GetRecHitCount(void) const { return rechitCount_; }
0195
0196 int HcalNoiseSummary::GetRecHitCount15(void) const { return rechitCount15_; }
0197
0198 double HcalNoiseSummary::GetRecHitEnergy(void) const { return rechitEnergy_; }
0199
0200 double HcalNoiseSummary::GetRecHitEnergy15(void) const { return rechitEnergy15_; }
0201
0202 double HcalNoiseSummary::GetTotalCalibCharge(void) const { return calibCharge_; }
0203
0204 double HcalNoiseSummary::GetLaserMonitorCharge(void) const { return lasmonCharge_; }
0205
0206 bool HcalNoiseSummary::HasBadRBXTS4TS5(void) const { return hasBadRBXTS4TS5_; }
0207
0208 bool HcalNoiseSummary::HasBadRBXRechitR45Loose(void) const { return hasBadRBXRechitR45Loose_; }
0209
0210 bool HcalNoiseSummary::HasBadRBXRechitR45Tight(void) const { return hasBadRBXRechitR45Tight_; }
0211
0212 bool HcalNoiseSummary::goodJetFoundInLowBVRegion(void) const { return goodJetFoundInLowBVRegion_; }
0213
0214 int HcalNoiseSummary::GetCalibCountTS45(void) const { return calibCountTS45_; }
0215
0216 int HcalNoiseSummary::GetCalibgt15CountTS45(void) const { return calibCountgt15TS45_; }
0217
0218 double HcalNoiseSummary::GetCalibChargeTS45(void) const { return calibChargeTS45_; }
0219
0220 double HcalNoiseSummary::GetCalibgt15ChargeTS45(void) const { return calibChargegt15TS45_; }
0221
0222 int HcalNoiseSummary::GetCalibCountHF(void) const {
0223
0224 return calibCountHF_;
0225 }
0226
0227 double HcalNoiseSummary::GetCalibChargeHF(void) const {
0228
0229 return calibChargeHF_;
0230 }
0231
0232 int HcalNoiseSummary::GetHitsInNonLaserRegion(void) const { return hitsInNonLaserRegion_; }
0233
0234 double HcalNoiseSummary::GetEnergyInNonLaserRegion(void) const { return energyInNonLaserRegion_; }
0235
0236 int HcalNoiseSummary::GetHitsInLaserRegion(void) const { return hitsInLaserRegion_; }
0237
0238 double HcalNoiseSummary::GetEnergyInLaserRegion(void) const { return energyInLaserRegion_; }
0239
0240 edm::RefVector<reco::CaloJetCollection> HcalNoiseSummary::problematicJets(void) const { return problemjets_; }
0241
0242 edm::RefVector<CaloTowerCollection> HcalNoiseSummary::looseNoiseTowers(void) const { return loosenoisetwrs_; }
0243
0244 edm::RefVector<CaloTowerCollection> HcalNoiseSummary::tightNoiseTowers(void) const { return tightnoisetwrs_; }
0245
0246 edm::RefVector<CaloTowerCollection> HcalNoiseSummary::highLevelNoiseTowers(void) const { return hlnoisetwrs_; }