CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/DataFormats/METReco/src/HcalNoiseSummary.cc

Go to the documentation of this file.
00001 //
00002 // HcalNoiseSummary.cc
00003 //
00004 //    description: implementation of container class of HCAL noise summary
00005 //
00006 //    author: J.P. Chou, Brown
00007 //
00008 
00009 
00010 #include "DataFormats/METReco/interface/HcalNoiseSummary.h"
00011 
00012 // default constructor
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     hasBadRBXTS4TS5_(false)
00030 {
00031 }
00032 
00033 // destructor
00034 HcalNoiseSummary::~HcalNoiseSummary()
00035 {
00036 }
00037 
00038 // accessors
00039 bool HcalNoiseSummary::passLooseNoiseFilter(void) const
00040 {
00041   return (filterstatus_ & 0xFF)==0;
00042 }
00043 
00044 bool HcalNoiseSummary::passTightNoiseFilter(void) const
00045 {
00046   return (filterstatus_ & 0xFF00)==0;
00047 }
00048 
00049 bool HcalNoiseSummary::passHighLevelNoiseFilter(void) const
00050 {
00051   return (filterstatus_ & 0xFF0000)==0;
00052 }
00053 
00054 int HcalNoiseSummary::noiseType(void) const
00055 {
00056   if(maxRBXHits()>18) return 3;
00057   else if(maxRBXHits()>8) return 2;
00058   return 1;
00059 }
00060 
00061 int HcalNoiseSummary::noiseFilterStatus(void) const
00062 {
00063   return filterstatus_;
00064 }
00065 
00066 float HcalNoiseSummary::eventEMEnergy(void) const
00067 {
00068   return emenergy_;
00069 }
00070 
00071 float HcalNoiseSummary::eventHadEnergy(void) const
00072 {
00073   return hadenergy_;
00074 }
00075 
00076 float HcalNoiseSummary::eventTrackEnergy(void) const
00077 {
00078   return trackenergy_;
00079 }
00080 
00081 float HcalNoiseSummary::eventEMFraction(void) const
00082 {
00083   if(hadenergy_+emenergy_==0.0) return -999.;
00084   else return emenergy_/(hadenergy_+emenergy_);
00085 }
00086 
00087 float HcalNoiseSummary::eventChargeFraction(void) const
00088 {
00089   if(hadenergy_+emenergy_==0.0) return -999.;
00090   else return trackenergy_/(hadenergy_+emenergy_);
00091 }
00092 
00093 float HcalNoiseSummary::min10GeVHitTime(void) const
00094 {
00095   return min10_;
00096 }
00097 
00098 float HcalNoiseSummary::max10GeVHitTime(void) const
00099 {
00100   return max10_;
00101 }
00102 
00103 float HcalNoiseSummary::rms10GeVHitTime(void) const
00104 {
00105   return cnthit10_>0 ? std::sqrt(rms10_/cnthit10_) : 999;
00106 }
00107 
00108 float HcalNoiseSummary::min25GeVHitTime(void) const
00109 {
00110   return min25_;
00111 }
00112  
00113 float HcalNoiseSummary::max25GeVHitTime(void) const
00114 {
00115   return max25_;
00116 }
00117  
00118 float HcalNoiseSummary::rms25GeVHitTime(void) const
00119 {
00120   return cnthit25_>0 ? std::sqrt(rms25_/cnthit25_) : 999;
00121 }
00122 
00123 int HcalNoiseSummary::num10GeVHits(void) const
00124 {
00125   return cnthit10_;
00126 }
00127 
00128 int HcalNoiseSummary::num25GeVHits(void) const
00129 {
00130   return cnthit25_;
00131 }
00132 
00133 float HcalNoiseSummary::minE2TS(void) const
00134 {
00135   return mine2ts_;
00136 }
00137 
00138 float HcalNoiseSummary::minE10TS(void) const
00139 {
00140   return mine10ts_;
00141 }
00142 
00143 float HcalNoiseSummary::minE2Over10TS(void) const
00144 {
00145   return mine10ts_==0 ? 999999. : mine2ts_/mine10ts_;
00146 }
00147 
00148 float HcalNoiseSummary::maxE2TS(void) const
00149 {
00150   return maxe2ts_;
00151 }
00152 
00153 float HcalNoiseSummary::maxE10TS(void) const
00154 {
00155   return maxe10ts_;
00156 }
00157 
00158 float HcalNoiseSummary::maxE2Over10TS(void) const
00159 {
00160   return maxe10ts_==0 ? -999999. : maxe2ts_/maxe10ts_;
00161 }
00162 
00163 int HcalNoiseSummary::maxZeros(void) const
00164 {
00165   return maxzeros_;
00166 }
00167 
00168 int HcalNoiseSummary::maxHPDHits(void) const
00169 {
00170   return maxhpdhits_;
00171 }
00172 
00173 int HcalNoiseSummary::maxHPDNoOtherHits(void) const
00174 {
00175   return maxhpdhitsnoother_;
00176 }
00177 
00178 int HcalNoiseSummary::maxRBXHits(void) const
00179 {
00180   return maxrbxhits_;
00181 }
00182 
00183 float HcalNoiseSummary::minHPDEMF(void) const
00184 {
00185   return minhpdemf_;
00186 }
00187 
00188 float HcalNoiseSummary::minRBXEMF(void) const
00189 {
00190   return minrbxemf_;
00191 }
00192 
00193 int HcalNoiseSummary::numProblematicRBXs(void) const
00194 {
00195   return nproblemRBXs_;
00196 }
00197 
00198 int HcalNoiseSummary::numIsolatedNoiseChannels(void) const
00199 {
00200   return nisolnoise_;
00201 }
00202 
00203 float HcalNoiseSummary::isolatedNoiseSumE(void) const
00204 {
00205   return isolnoisee_;
00206 }
00207 
00208 float HcalNoiseSummary::isolatedNoiseSumEt(void) const
00209 {
00210   return isolnoiseet_;
00211 }
00212 
00213 int HcalNoiseSummary::numFlatNoiseChannels(void) const
00214 {
00215   return nflatnoise_;
00216 }
00217 
00218 float HcalNoiseSummary::flatNoiseSumE(void) const
00219 {
00220   return flatnoisee_;
00221 }
00222 
00223 float HcalNoiseSummary::flatNoiseSumEt(void) const
00224 {
00225   return flatnoiseet_;
00226 }
00227 
00228 int HcalNoiseSummary::numSpikeNoiseChannels(void) const
00229 {
00230   return nspikenoise_;
00231 }
00232 
00233 float HcalNoiseSummary::spikeNoiseSumE(void) const
00234 {
00235   return spikenoisee_;
00236 }
00237 
00238 float HcalNoiseSummary::spikeNoiseSumEt(void) const
00239 {
00240   return spikenoiseet_;
00241 }
00242 
00243 int HcalNoiseSummary::numTriangleNoiseChannels(void) const
00244 {
00245   return ntrianglenoise_;
00246 }
00247 
00248 float HcalNoiseSummary::triangleNoiseSumE(void) const
00249 {
00250   return trianglenoisee_;
00251 }
00252 
00253 float HcalNoiseSummary::triangleNoiseSumEt(void) const
00254 {
00255   return trianglenoiseet_;
00256 }
00257 
00258 int HcalNoiseSummary::numTS4TS5NoiseChannels(void) const
00259 {
00260   return nts4ts5noise_;
00261 }
00262 
00263 float HcalNoiseSummary::TS4TS5NoiseSumE(void) const
00264 {
00265   return ts4ts5noisee_;
00266 }
00267 
00268 float HcalNoiseSummary::TS4TS5NoiseSumEt(void) const
00269 {
00270   return ts4ts5noiseet_;
00271 }
00272 
00273 bool HcalNoiseSummary::HasBadRBXTS4TS5(void) const
00274 {
00275    return hasBadRBXTS4TS5_;
00276 }
00277 
00278 edm::RefVector<reco::CaloJetCollection> HcalNoiseSummary::problematicJets(void) const
00279 {
00280   return problemjets_;
00281 }
00282 
00283 edm::RefVector<CaloTowerCollection> HcalNoiseSummary::looseNoiseTowers(void) const
00284 {
00285   return loosenoisetwrs_;
00286 }
00287 
00288 edm::RefVector<CaloTowerCollection> HcalNoiseSummary::tightNoiseTowers(void) const
00289 {
00290   return tightnoisetwrs_;
00291 }
00292 
00293 edm::RefVector<CaloTowerCollection> HcalNoiseSummary::highLevelNoiseTowers(void) const
00294 {
00295   return hlnoisetwrs_;
00296 }