Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:04:45

0001 #ifndef _DATAFORMATS_METRECO_HCALNOISESUMMARY_H__
0002 #define _DATAFORMATS_METRECO_HCALNOISESUMMARY_H__
0003 
0004 //
0005 // HcalNoiseSummary.h
0006 //
0007 //    description: Container class for HCAL noise summary information
0008 //
0009 //    author: J.P. Chou, Brown
0010 //
0011 
0012 #include "DataFormats/METReco/interface/HcalNoiseHPD.h"
0013 #include "DataFormats/Common/interface/RefVector.h"
0014 #include "DataFormats/Common/interface/Ref.h"
0015 #include "DataFormats/Common/interface/RefProd.h"
0016 #include "DataFormats/JetReco/interface/CaloJetCollection.h"
0017 #include "DataFormats/CaloTowers/interface/CaloTowerCollection.h"
0018 
0019 //
0020 // forward declaration
0021 //
0022 
0023 namespace reco {
0024   class HcalNoiseInfoProducer;
0025 }
0026 
0027 //
0028 // class definition
0029 //
0030 
0031 class HcalNoiseSummary {
0032   friend class reco::HcalNoiseInfoProducer;  // allows this class to fill the info
0033 
0034 public:
0035   // constructor
0036   HcalNoiseSummary();
0037 
0038   // destructor
0039   virtual ~HcalNoiseSummary();
0040 
0041   // whether or not the event passed the event filter
0042   // note that these methods are deprecated
0043   // please see the instructions here: https://twiki.cern.ch/twiki/bin/view/CMS/HcalNoiseInfoLibrary
0044   bool passLooseNoiseFilter(void) const;
0045   bool passTightNoiseFilter(void) const;
0046   bool passHighLevelNoiseFilter(void) const;
0047 
0048   // the status with which the filter failed: this is a bitset
0049   // 0 is no failure
0050   int noiseFilterStatus(void) const;
0051 
0052   // noise type: 1=HPD Ionfeedback, 2=HPD Discharge, 3=RBX Noise
0053   // won't work with non-noise event
0054   int noiseType(void) const;
0055 
0056   // quantities to calculate EM fraction and charge fraction
0057   // of the event (|eta|<2.0)
0058   float eventEMEnergy(void) const;
0059   float eventHadEnergy(void) const;
0060   float eventTrackEnergy(void) const;
0061   float eventEMFraction(void) const;
0062   float eventChargeFraction(void) const;
0063 
0064   // minimum/maximum/RMS rechit time
0065   // rechit energy>10 GeV or 25 GeV
0066   float min10GeVHitTime(void) const;
0067   float max10GeVHitTime(void) const;
0068   float rms10GeVHitTime(void) const;
0069   float min25GeVHitTime(void) const;
0070   float max25GeVHitTime(void) const;
0071   float rms25GeVHitTime(void) const;
0072 
0073   // # of hits with E>10 GeV or 25 GeV
0074   int num10GeVHits(void) const;
0075   int num25GeVHits(void) const;
0076 
0077   // E(2TS), E(10TS), and E(2TS)/E(10TS) for the minimum and maximum E(2TS)/E(10TS) found in an RBX in the event
0078   // the total energy in the RBX must be > 50 GeV
0079   float minE2TS(void) const;
0080   float minE10TS(void) const;
0081   float minE2Over10TS(void) const;
0082   float maxE2TS(void) const;
0083   float maxE10TS(void) const;
0084   float maxE2Over10TS(void) const;
0085 
0086   // largest number of zeros found in a single RBX in the event
0087   // total energy in the RBX must be > 10 GeV
0088   int maxZeros(void) const;
0089 
0090   // largest number of hits in a single HPD/RBX in the event
0091   // each hit is >= 1.5 GeV
0092   int maxHPDHits(void) const;
0093   int maxRBXHits(void) const;
0094 
0095   // largest number of hits in a single HPD when no other hits are present in the RBX
0096   int maxHPDNoOtherHits(void) const;
0097 
0098   // smallest EMF found in an HPD/RBX in the event
0099   // the total energy in the HPD/RBX must be >50 GeV
0100   float minHPDEMF(void) const;
0101   float minRBXEMF(void) const;
0102 
0103   // number of "problematic" RBXs
0104   int numProblematicRBXs(void) const;
0105 
0106   int numIsolatedNoiseChannels(void) const;
0107   float isolatedNoiseSumE(void) const;
0108   float isolatedNoiseSumEt(void) const;
0109 
0110   int numFlatNoiseChannels(void) const;
0111   float flatNoiseSumE(void) const;
0112   float flatNoiseSumEt(void) const;
0113 
0114   int numSpikeNoiseChannels(void) const;
0115   float spikeNoiseSumE(void) const;
0116   float spikeNoiseSumEt(void) const;
0117 
0118   int numTriangleNoiseChannels(void) const;
0119   float triangleNoiseSumE(void) const;
0120   float triangleNoiseSumEt(void) const;
0121 
0122   int numTS4TS5NoiseChannels(void) const;
0123   float TS4TS5NoiseSumE(void) const;
0124   float TS4TS5NoiseSumEt(void) const;
0125 
0126   int numNegativeNoiseChannels(void) const;
0127   float NegativeNoiseSumE(void) const;
0128   float NegativeNoiseSumEt(void) const;
0129 
0130   int GetRecHitCount(void) const;
0131   int GetRecHitCount15(void) const;
0132   double GetRecHitEnergy(void) const;
0133   double GetRecHitEnergy15(void) const;
0134 
0135   double GetTotalCalibCharge(void) const;
0136   double GetLaserMonitorCharge(void) const;
0137 
0138   bool HasBadRBXTS4TS5(void) const;
0139   bool HasBadRBXRechitR45Loose(void) const;
0140   bool HasBadRBXRechitR45Tight(void) const;
0141   bool goodJetFoundInLowBVRegion(void) const;
0142 
0143   double GetCalibChargeHF(void) const;
0144   int GetCalibCountHF(void) const;
0145 
0146   // Get charge only in TS45
0147   int GetCalibCountTS45(void) const;          // get number of HBHE calibration channels
0148   int GetCalibgt15CountTS45(void) const;      // get number of HBHE calib channels > 15 fC
0149   double GetCalibChargeTS45(void) const;      // get Calib charge
0150   double GetCalibgt15ChargeTS45(void) const;  // get charge from all channels gt 15 fC
0151 
0152   int GetHitsInNonLaserRegion(void) const;       // get number of channels in HBHE regions with no laser
0153   int GetHitsInLaserRegion(void) const;          // get number of channels in HBHE region where laser pulses are seen
0154   double GetEnergyInNonLaserRegion(void) const;  // get energy in region with no laser
0155   double GetEnergyInLaserRegion(void) const;     // get energy in non-laser region
0156 
0157   // reference to problematic jets
0158   edm::RefVector<reco::CaloJetCollection> problematicJets(void) const;
0159 
0160   // reference to calotowers which fail loose, tight, and high-level noise criteria
0161   edm::RefVector<CaloTowerCollection> looseNoiseTowers(void) const;
0162   edm::RefVector<CaloTowerCollection> tightNoiseTowers(void) const;
0163   edm::RefVector<CaloTowerCollection> highLevelNoiseTowers(void) const;
0164 
0165 private:
0166   // data members corresponding to the values above
0167   int filterstatus_, noisetype_;
0168   float emenergy_, hadenergy_, trackenergy_;
0169   float min10_, max10_, rms10_;
0170   float min25_, max25_, rms25_;
0171   int cnthit10_, cnthit25_;
0172   float mine2ts_, mine10ts_;
0173   float maxe2ts_, maxe10ts_;
0174   int maxzeros_;
0175   int maxhpdhits_, maxhpdhitsnoother_, maxrbxhits_;
0176   float minhpdemf_, minrbxemf_;
0177   int nproblemRBXs_;
0178   int nisolnoise_;
0179   float isolnoisee_, isolnoiseet_;
0180   int nflatnoise_;
0181   float flatnoisee_, flatnoiseet_;
0182   int nspikenoise_;
0183   float spikenoisee_, spikenoiseet_;
0184   int ntrianglenoise_;
0185   float trianglenoisee_, trianglenoiseet_;
0186   int nts4ts5noise_;
0187   float ts4ts5noisee_, ts4ts5noiseet_;
0188   int nnegativenoise_;
0189   float negativenoisee_, negativenoiseet_;
0190 
0191   int rechitCount_;
0192   int rechitCount15_;
0193   double rechitEnergy_;
0194   double rechitEnergy15_;
0195   double calibCharge_;
0196   double lasmonCharge_;
0197 
0198   bool hasBadRBXTS4TS5_;
0199   bool hasBadRBXRechitR45Loose_;
0200   bool hasBadRBXRechitR45Tight_;
0201   bool goodJetFoundInLowBVRegion_;
0202 
0203   int calibCountTS45_;
0204   int calibCountgt15TS45_;
0205   double calibChargeTS45_;
0206   double calibChargegt15TS45_;
0207 
0208   int calibCountHF_;  // calibration channels only in HF; no threshold used for determining HF noise
0209   double calibChargeHF_;
0210 
0211   int hitsInLaserRegion_;
0212   int hitsInNonLaserRegion_;
0213   double energyInLaserRegion_;
0214   double energyInNonLaserRegion_;
0215 
0216   edm::RefVector<reco::CaloJetCollection> problemjets_;
0217 
0218   edm::RefVector<CaloTowerCollection> loosenoisetwrs_;
0219   edm::RefVector<CaloTowerCollection> tightnoisetwrs_;
0220   edm::RefVector<CaloTowerCollection> hlnoisetwrs_;
0221 };
0222 
0223 #endif