File indexing completed on 2024-04-06 12:04:45
0001 #ifndef _DATAFORMATS_METRECO_HCALNOISERBX_H_
0002 #define _DATAFORMATS_METRECO_HCALNOISERBX_H_
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include "DataFormats/METReco/interface/HcalNoiseHPD.h"
0017
0018 namespace reco {
0019
0020
0021
0022
0023
0024 class HcalNoiseRBX;
0025
0026
0027
0028
0029
0030 typedef std::vector<HcalNoiseRBX> HcalNoiseRBXCollection;
0031
0032 class HcalNoiseRBX {
0033 friend class HcalNoiseInfoProducer;
0034 friend class HcalNoiseRBXArray;
0035
0036 public:
0037
0038 HcalNoiseRBX();
0039
0040
0041 ~HcalNoiseRBX();
0042
0043
0044
0045
0046
0047
0048 int idnumber(void) const;
0049
0050
0051
0052
0053
0054
0055
0056 const std::vector<HcalNoiseHPD> HPDs(void) const;
0057 inline std::vector<HcalNoiseHPD>::const_iterator HPDsBegin(void) const { return hpds_.begin(); }
0058 inline std::vector<HcalNoiseHPD>::const_iterator HPDsEnd(void) const { return hpds_.end(); }
0059
0060
0061
0062 std::vector<HcalNoiseHPD>::const_iterator maxHPD(double threshold = 1.5) const;
0063
0064
0065 const std::vector<float> allCharge(void) const;
0066 float allChargeTotal(void) const;
0067 float allChargeHighest2TS(unsigned int firstts = 4) const;
0068 float allChargeHighest3TS(unsigned int firstts = 4) const;
0069
0070
0071 int totalZeros(void) const;
0072
0073
0074 int maxZeros(void) const;
0075
0076
0077 double recHitEnergy(double theshold = 1.5) const;
0078 double recHitEnergyFailR45(double threshold = 1.5) const;
0079
0080
0081 double minRecHitTime(double threshold = 20.0) const;
0082 double maxRecHitTime(double threshold = 20.0) const;
0083
0084
0085 int numRecHits(double threshold = 1.5) const;
0086 int numRecHitsFailR45(double threshold = 1.5) const;
0087
0088
0089 double caloTowerHadE(void) const;
0090 double caloTowerEmE(void) const;
0091 double caloTowerTotalE(void) const;
0092 double caloTowerEmFraction(void) const;
0093
0094
0095 struct twrcomp {
0096 inline bool operator()(const CaloTower& t1, const CaloTower& t2) const { return t1.id() < t2.id(); }
0097 };
0098 typedef std::set<CaloTower, twrcomp> towerset_t;
0099
0100 private:
0101
0102 int idnumber_;
0103
0104
0105 std::vector<HcalNoiseHPD> hpds_;
0106
0107
0108 std::vector<float> allCharge_;
0109
0110 void uniqueTowers(towerset_t& twrs_) const;
0111 };
0112
0113 }
0114
0115 #endif