File indexing completed on 2024-04-06 12:04:45
0001 #ifndef _DATAFORMATS_METRECO_HCALNOISEHPD_H_
0002 #define _DATAFORMATS_METRECO_HCALNOISEHPD_H_
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #include <algorithm>
0016
0017 #include "DataFormats/HcalDetId/interface/HcalSubdetector.h"
0018 #include "DataFormats/HcalDigi/interface/HBHEDataFrame.h"
0019 #include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h"
0020 #include "DataFormats/HcalRecHit/interface/HBHERecHitAuxSetter.h"
0021 #include "DataFormats/HcalRecHit/interface/CaloRecHitAuxSetter.h"
0022 #include "DataFormats/Common/interface/RefVector.h"
0023 #include "DataFormats/Common/interface/Ref.h"
0024 #include "DataFormats/Common/interface/RefProd.h"
0025 #include "DataFormats/CaloTowers/interface/CaloTowerCollection.h"
0026 #include "DataFormats/METReco/interface/HcalCaloFlagLabels.h"
0027
0028 namespace reco {
0029
0030
0031
0032
0033
0034 class HcalNoiseHPD;
0035 class RefHBHERecHitEnergyComparison;
0036
0037
0038
0039
0040
0041 typedef std::vector<HcalNoiseHPD> HcalNoiseHPDCollection;
0042
0043
0044
0045
0046 class RefHBHERecHitEnergyComparison {
0047 public:
0048 bool operator()(const edm::Ref<HBHERecHitCollection>& x, const edm::Ref<HBHERecHitCollection>& y) const {
0049 return x->energy() > y->energy();
0050 }
0051 };
0052
0053
0054
0055
0056
0057 class HcalNoiseHPD {
0058 friend class HcalNoiseInfoProducer;
0059 friend class HcalNoiseRBXArray;
0060
0061 public:
0062
0063 HcalNoiseHPD();
0064
0065
0066 virtual ~HcalNoiseHPD();
0067
0068
0069
0070
0071
0072
0073
0074 int idnumber(void) const;
0075
0076
0077
0078
0079
0080
0081 const std::vector<float> bigCharge(void) const;
0082 float bigChargeTotal(void) const;
0083 float bigChargeHighest2TS(unsigned int firstts = 4) const;
0084 float bigChargeHighest3TS(unsigned int firstts = 4) const;
0085
0086
0087 const std::vector<float> big5Charge(void) const;
0088 float big5ChargeTotal(void) const;
0089 float big5ChargeHighest2TS(unsigned int firstts = 4) const;
0090 float big5ChargeHighest3TS(unsigned int firstts = 4) const;
0091
0092
0093 int totalZeros(void) const;
0094
0095
0096 int maxZeros(void) const;
0097
0098
0099
0100
0101
0102
0103 const edm::RefVector<HBHERecHitCollection> recHits(void) const;
0104
0105
0106 float recHitEnergy(float threshold = 1.5) const;
0107 float recHitEnergyFailR45(float threshold = 1.5) const;
0108
0109
0110 float minRecHitTime(float threshold = 10.0) const;
0111 float maxRecHitTime(float threshold = 10.0) const;
0112
0113
0114 int numRecHits(float threshold = 1.5) const;
0115 int numRecHitsFailR45(float threshold = 1.5) const;
0116
0117
0118
0119
0120
0121
0122 const edm::RefVector<CaloTowerCollection> caloTowers(void) const;
0123
0124
0125 double caloTowerHadE(void) const;
0126 double caloTowerEmE(void) const;
0127 double caloTowerTotalE(void) const;
0128 double caloTowerEmFraction(void) const;
0129
0130 private:
0131
0132 int idnumber_;
0133
0134
0135 int totalZeros_;
0136 int maxZeros_;
0137 std::vector<float> bigCharge_;
0138 std::vector<float> big5Charge_;
0139
0140
0141 edm::RefVector<HBHERecHitCollection> rechits_;
0142
0143
0144
0145 std::set<edm::Ref<HBHERecHitCollection>, RefHBHERecHitEnergyComparison> refrechitset_;
0146
0147
0148 edm::RefVector<CaloTowerCollection> calotowers_;
0149 };
0150
0151 }
0152
0153 #endif