00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #include "DataFormats/METReco/interface/HcalNoiseSummary.h"
00011
00012
00013 HcalNoiseSummary::HcalNoiseSummary()
00014 : filterstatus_(0), noisetype_(0), emenergy_(0.0), hadenergy_(0.0), trackenergy_(0.0),
00015 min10_(999999.), max10_(-999999.), rms10_(0.0),
00016 min25_(999999.), max25_(-999999.), rms25_(0.0),
00017 cnthit10_(0), cnthit25_(0),
00018 mine2ts_(0.), mine10ts_(0.),
00019 maxe2ts_(0.), maxe10ts_(0.),
00020 maxzeros_(0),
00021 maxhpdhits_(0), maxhpdhitsnoother_(0), maxrbxhits_(0),
00022 minhpdemf_(999999.), minrbxemf_(999999.),
00023 nproblemRBXs_(0),
00024 nisolnoise_(0), isolnoisee_(0), isolnoiseet_(0),
00025 nflatnoise_(0), flatnoisee_(0), flatnoiseet_(0),
00026 nspikenoise_(0), spikenoisee_(0), spikenoiseet_(0),
00027 ntrianglenoise_(0), trianglenoisee_(0), trianglenoiseet_(0),
00028 nts4ts5noise_(0), ts4ts5noisee_(0), ts4ts5noiseet_(0),
00029 rechitCount_(0), rechitCount15_(0), rechitEnergy_(0), rechitEnergy15_(0), calibCharge_(0),
00030 hasBadRBXTS4TS5_(false),
00031 calibCountTS45_(0),
00032 calibCountgt15TS45_(0),
00033 calibChargeTS45_(0.),
00034 calibChargegt15TS45_(0.),
00035 calibCountHF_(0),
00036 calibChargeHF_(0.),
00037 hitsInLaserRegion_(0),
00038 hitsInNonLaserRegion_(0),
00039 energyInLaserRegion_(0.),
00040 energyInNonLaserRegion_(0.)
00041 {
00042 }
00043
00044
00045 HcalNoiseSummary::~HcalNoiseSummary()
00046 {
00047 }
00048
00049
00050 bool HcalNoiseSummary::passLooseNoiseFilter(void) const
00051 {
00052 return (filterstatus_ & 0xFF)==0;
00053 }
00054
00055 bool HcalNoiseSummary::passTightNoiseFilter(void) const
00056 {
00057 return (filterstatus_ & 0xFF00)==0;
00058 }
00059
00060 bool HcalNoiseSummary::passHighLevelNoiseFilter(void) const
00061 {
00062 return (filterstatus_ & 0xFF0000)==0;
00063 }
00064
00065 int HcalNoiseSummary::noiseType(void) const
00066 {
00067 if(maxRBXHits()>18) return 3;
00068 else if(maxRBXHits()>8) return 2;
00069 return 1;
00070 }
00071
00072 int HcalNoiseSummary::noiseFilterStatus(void) const
00073 {
00074 return filterstatus_;
00075 }
00076
00077 float HcalNoiseSummary::eventEMEnergy(void) const
00078 {
00079 return emenergy_;
00080 }
00081
00082 float HcalNoiseSummary::eventHadEnergy(void) const
00083 {
00084 return hadenergy_;
00085 }
00086
00087 float HcalNoiseSummary::eventTrackEnergy(void) const
00088 {
00089 return trackenergy_;
00090 }
00091
00092 float HcalNoiseSummary::eventEMFraction(void) const
00093 {
00094 if(hadenergy_+emenergy_==0.0) return -999.;
00095 else return emenergy_/(hadenergy_+emenergy_);
00096 }
00097
00098 float HcalNoiseSummary::eventChargeFraction(void) const
00099 {
00100 if(hadenergy_+emenergy_==0.0) return -999.;
00101 else return trackenergy_/(hadenergy_+emenergy_);
00102 }
00103
00104 float HcalNoiseSummary::min10GeVHitTime(void) const
00105 {
00106 return min10_;
00107 }
00108
00109 float HcalNoiseSummary::max10GeVHitTime(void) const
00110 {
00111 return max10_;
00112 }
00113
00114 float HcalNoiseSummary::rms10GeVHitTime(void) const
00115 {
00116 return cnthit10_>0 ? std::sqrt(rms10_/cnthit10_) : 999;
00117 }
00118
00119 float HcalNoiseSummary::min25GeVHitTime(void) const
00120 {
00121 return min25_;
00122 }
00123
00124 float HcalNoiseSummary::max25GeVHitTime(void) const
00125 {
00126 return max25_;
00127 }
00128
00129 float HcalNoiseSummary::rms25GeVHitTime(void) const
00130 {
00131 return cnthit25_>0 ? std::sqrt(rms25_/cnthit25_) : 999;
00132 }
00133
00134 int HcalNoiseSummary::num10GeVHits(void) const
00135 {
00136 return cnthit10_;
00137 }
00138
00139 int HcalNoiseSummary::num25GeVHits(void) const
00140 {
00141 return cnthit25_;
00142 }
00143
00144 float HcalNoiseSummary::minE2TS(void) const
00145 {
00146 return mine2ts_;
00147 }
00148
00149 float HcalNoiseSummary::minE10TS(void) const
00150 {
00151 return mine10ts_;
00152 }
00153
00154 float HcalNoiseSummary::minE2Over10TS(void) const
00155 {
00156 return mine10ts_==0 ? 999999. : mine2ts_/mine10ts_;
00157 }
00158
00159 float HcalNoiseSummary::maxE2TS(void) const
00160 {
00161 return maxe2ts_;
00162 }
00163
00164 float HcalNoiseSummary::maxE10TS(void) const
00165 {
00166 return maxe10ts_;
00167 }
00168
00169 float HcalNoiseSummary::maxE2Over10TS(void) const
00170 {
00171 return maxe10ts_==0 ? -999999. : maxe2ts_/maxe10ts_;
00172 }
00173
00174 int HcalNoiseSummary::maxZeros(void) const
00175 {
00176 return maxzeros_;
00177 }
00178
00179 int HcalNoiseSummary::maxHPDHits(void) const
00180 {
00181 return maxhpdhits_;
00182 }
00183
00184 int HcalNoiseSummary::maxHPDNoOtherHits(void) const
00185 {
00186 return maxhpdhitsnoother_;
00187 }
00188
00189 int HcalNoiseSummary::maxRBXHits(void) const
00190 {
00191 return maxrbxhits_;
00192 }
00193
00194 float HcalNoiseSummary::minHPDEMF(void) const
00195 {
00196 return minhpdemf_;
00197 }
00198
00199 float HcalNoiseSummary::minRBXEMF(void) const
00200 {
00201 return minrbxemf_;
00202 }
00203
00204 int HcalNoiseSummary::numProblematicRBXs(void) const
00205 {
00206 return nproblemRBXs_;
00207 }
00208
00209 int HcalNoiseSummary::numIsolatedNoiseChannels(void) const
00210 {
00211 return nisolnoise_;
00212 }
00213
00214 float HcalNoiseSummary::isolatedNoiseSumE(void) const
00215 {
00216 return isolnoisee_;
00217 }
00218
00219 float HcalNoiseSummary::isolatedNoiseSumEt(void) const
00220 {
00221 return isolnoiseet_;
00222 }
00223
00224 int HcalNoiseSummary::numFlatNoiseChannels(void) const
00225 {
00226 return nflatnoise_;
00227 }
00228
00229 float HcalNoiseSummary::flatNoiseSumE(void) const
00230 {
00231 return flatnoisee_;
00232 }
00233
00234 float HcalNoiseSummary::flatNoiseSumEt(void) const
00235 {
00236 return flatnoiseet_;
00237 }
00238
00239 int HcalNoiseSummary::numSpikeNoiseChannels(void) const
00240 {
00241 return nspikenoise_;
00242 }
00243
00244 float HcalNoiseSummary::spikeNoiseSumE(void) const
00245 {
00246 return spikenoisee_;
00247 }
00248
00249 float HcalNoiseSummary::spikeNoiseSumEt(void) const
00250 {
00251 return spikenoiseet_;
00252 }
00253
00254 int HcalNoiseSummary::numTriangleNoiseChannels(void) const
00255 {
00256 return ntrianglenoise_;
00257 }
00258
00259 float HcalNoiseSummary::triangleNoiseSumE(void) const
00260 {
00261 return trianglenoisee_;
00262 }
00263
00264 float HcalNoiseSummary::triangleNoiseSumEt(void) const
00265 {
00266 return trianglenoiseet_;
00267 }
00268
00269 int HcalNoiseSummary::numTS4TS5NoiseChannels(void) const
00270 {
00271 return nts4ts5noise_;
00272 }
00273
00274 float HcalNoiseSummary::TS4TS5NoiseSumE(void) const
00275 {
00276 return ts4ts5noisee_;
00277 }
00278
00279 float HcalNoiseSummary::TS4TS5NoiseSumEt(void) const
00280 {
00281 return ts4ts5noiseet_;
00282 }
00283
00284 int HcalNoiseSummary::GetRecHitCount(void) const
00285 {
00286 return rechitCount_;
00287 }
00288
00289 int HcalNoiseSummary::GetRecHitCount15(void) const
00290 {
00291 return rechitCount15_;
00292 }
00293
00294 double HcalNoiseSummary::GetRecHitEnergy(void) const
00295 {
00296 return rechitEnergy_;
00297 }
00298
00299 double HcalNoiseSummary::GetRecHitEnergy15(void) const
00300 {
00301 return rechitEnergy15_;
00302 }
00303
00304 double HcalNoiseSummary::GetTotalCalibCharge(void) const
00305 {
00306 return calibCharge_;
00307 }
00308
00309 bool HcalNoiseSummary::HasBadRBXTS4TS5(void) const
00310 {
00311 return hasBadRBXTS4TS5_;
00312 }
00313
00314 int HcalNoiseSummary::GetCalibCountTS45(void) const
00315 {
00316 return calibCountTS45_;
00317 }
00318
00319 int HcalNoiseSummary::GetCalibgt15CountTS45(void) const
00320 {
00321 return calibCountgt15TS45_;
00322 }
00323
00324 double HcalNoiseSummary::GetCalibChargeTS45(void) const
00325 {
00326 return calibChargeTS45_;
00327 }
00328
00329 double HcalNoiseSummary::GetCalibgt15ChargeTS45(void) const
00330 {
00331 return calibChargegt15TS45_;
00332 }
00333
00334 int HcalNoiseSummary::GetCalibCountHF(void) const
00335 {
00336
00337 return calibCountHF_;
00338 }
00339
00340 double HcalNoiseSummary::GetCalibChargeHF(void) const
00341 {
00342
00343 return calibChargeHF_;
00344 }
00345
00346 int HcalNoiseSummary::GetHitsInNonLaserRegion(void) const
00347 {
00348 return hitsInNonLaserRegion_;
00349 }
00350
00351 double HcalNoiseSummary::GetEnergyInNonLaserRegion(void) const
00352 {
00353 return energyInNonLaserRegion_;
00354 }
00355
00356 int HcalNoiseSummary::GetHitsInLaserRegion(void) const
00357 {
00358 return hitsInLaserRegion_;
00359 }
00360
00361 double HcalNoiseSummary::GetEnergyInLaserRegion(void) const
00362 {
00363 return energyInLaserRegion_;
00364 }
00365
00366 edm::RefVector<reco::CaloJetCollection> HcalNoiseSummary::problematicJets(void) const
00367 {
00368 return problemjets_;
00369 }
00370
00371 edm::RefVector<CaloTowerCollection> HcalNoiseSummary::looseNoiseTowers(void) const
00372 {
00373 return loosenoisetwrs_;
00374 }
00375
00376 edm::RefVector<CaloTowerCollection> HcalNoiseSummary::tightNoiseTowers(void) const
00377 {
00378 return tightnoisetwrs_;
00379 }
00380
00381 edm::RefVector<CaloTowerCollection> HcalNoiseSummary::highLevelNoiseTowers(void) const
00382 {
00383 return hlnoisetwrs_;
00384 }