35 double sumEtInpHF = 0.0;
36 double sumEtInmHF = 0.0;
37 double MExInpHF = 0.0;
38 double MEyInpHF = 0.0;
39 double MExInmHF = 0.0;
40 double MEyInmHF = 0.0;
48 update_totalEt_totalEm(totalEt, totalEm, calotower, noHF);
51 update_HadEtInHB_HadEtInHE_HadEtInHO_HadEtInHF_EmEtInHF(specific.
HadEtInHB,
58 update_sumEtInpHF_MExInpHF_MEyInpHF_sumEtInmHF_MExInmHF_MEyInmHF(
59 sumEtInpHF, MExInpHF, MEyInpHF, sumEtInmHF, MExInmHF, MEyInmHF, calotower);
62 double totalHad = totalEt - totalEm;
65 remove_HF_from_MET(met, sumEtInpHF, MExInpHF, MEyInpHF, sumEtInmHF, MExInmHF, MEyInmHF);
68 add_MET_in_HF(specific, sumEtInpHF, MExInpHF, MEyInpHF, sumEtInmHF, MExInmHF, MEyInmHF);
71 specific.
EtFractionEm = (totalEt == 0.0) ? 0.0 : totalEm / totalEt;
74 const Point vtx(0.0, 0.0, 0.0);
82 DetId detIdHcal = find_DetId_of_HCAL_cell_in_constituent_of(calotower);
83 if (!detIdHcal.
null()) {
90 totalEt += calotower->
et();
91 totalEm += calotower->
emEt();
99 DetId detIdHcal = find_DetId_of_HCAL_cell_in_constituent_of(calotower);
100 DetId detIdEcal = find_DetId_of_ECAL_cell_in_constituent_of(calotower);
102 if (!detIdHcal.
null()) {
105 if (calotower->
hadEt() > MaxTowerHad)
106 MaxTowerHad = calotower->
hadEt();
107 if (calotower->
emEt() > MaxTowerEm)
108 MaxTowerEm = calotower->
emEt();
112 if (!detIdEcal.
null()) {
113 if (calotower->
emEt() > MaxTowerEm)
114 MaxTowerEm = calotower->
emEt();
120 DetId detIdEcal = find_DetId_of_ECAL_cell_in_constituent_of(calotower);
121 if (detIdEcal.
null())
126 EmEtInEB += calotower->
emEt();
128 EmEtInEE += calotower->
emEt();
140 DetId detIdHcal = find_DetId_of_HCAL_cell_in_constituent_of(calotower);
141 if (detIdHcal.
null())
146 HadEtInHB += calotower->
hadEt();
147 HadEtInHO += calotower->
outerEt();
151 HadEtInHE += calotower->
hadEt();
155 HadEtInHF += calotower->
hadEt();
156 EmEtInHF += calotower->
emEt();
168 DetId detIdHcal = find_DetId_of_HCAL_cell_in_constituent_of(calotower);
169 if (detIdHcal.
null())
176 if (calotower->
eta() >= 0) {
177 sumEtInpHF += calotower->
et();
178 MExInpHF -= (calotower->
et() *
cos(calotower->
phi()));
179 MEyInpHF -= (calotower->
et() *
sin(calotower->
phi()));
181 sumEtInmHF += calotower->
et();
182 MExInmHF -= (calotower->
et() *
cos(calotower->
phi()));
183 MEyInmHF -= (calotower->
et() *
sin(calotower->
phi()));
195 met.
mex -= (MExInmHF + MExInpHF);
196 met.
mey -= (MEyInmHF + MEyInpHF);
197 met.
sumet -= (sumEtInpHF + sumEtInmHF);
209 LorentzVector METpHF(MExInpHF, MEyInpHF, 0,
sqrt(MExInpHF * MExInpHF + MEyInpHF * MEyInpHF));
210 LorentzVector METmHF(MExInmHF, MEyInmHF, 0,
sqrt(MExInmHF * MExInmHF + MEyInmHF * MEyInmHF));
DetId find_DetId_of_HCAL_cell_in_constituent_of(const CaloTower *calotower)
tuple ret
prodAgent to be discontinued
void update_HadEtInHB_HadEtInHE_HadEtInHO_HadEtInHF_EmEtInHF(float &HadEtInHB, float &HadEtInHE, float &HadEtInHO, float &HadEtInHF, float &EmEtInHF, const CaloTower *calotower, bool noHF)
void remove_HF_from_MET(CommonMETData &met, double sumEtInpHF, double MExInpHF, double MEyInpHF, double sumEtInmHF, double MExInmHF, double MEyInmHF)
size_t constituentsSize() const
uint16_t *__restrict__ id
void add_MET_in_HF(SpecificCaloMETData &specific, double sumEtInpHF, double MExInpHF, double MEyInpHF, double sumEtInmHF, double MExInmHF, double MEyInmHF)
DetId constituent(size_t i) const
constexpr bool null() const
is this a null id ?
Sin< T >::type sin(const T &t)
void update_EmEtInEB_EmEtInEE(float &EmEtInEB, float &EmEtInEE, const CaloTower *calotower)
void update_totalEt_totalEm(double &totalEt, double &totalEm, const CaloTower *calotower, bool noHF)
constexpr HcalSubdetector subdet() const
get the subdetector
void update_sumEtInpHF_MExInpHF_MEyInpHF_sumEtInmHF_MExInmHF_MEyInmHF(double &sumEtInpHF, double &MExInpHF, double &MEyInpHF, double &sumEtInmHF, double &MExInmHF, double &MEyInmHF, const CaloTower *calotower)
Cos< T >::type cos(const T &t)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
Structure containing data common to all types of MET.
reco::CaloMET addInfo(edm::Handle< edm::View< reco::Candidate > > towers, const CommonMETData &met, bool noHF, double globalThreshold)
void update_MaxTowerEm_MaxTowerHad(float &MaxTowerEm, float &MaxTowerHad, const CaloTower *calotower, bool noHF)
math::XYZTLorentzVector LorentzVector
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Structure Point Contains parameters of Gaussian fits to DMRs.
double et(double vtxZ) const
double phi() const final
momentum azimuthal angle
DetId find_DetId_of_ECAL_cell_in_constituent_of(const CaloTower *calotower)
double eta() const final
momentum pseudorapidity