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