Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:25:26

0001 // -*- C++ -*-
0002 //
0003 // Package:    METAlgorithms
0004 // Class:      CaloSpecificAlgo
0005 //
0006 /**\class CaloSpecificAlgo CaloSpecificAlgo.h RecoMET/METAlgorithms/interface/CaloSpecificAlgo.h
0007 
0008  Description: Adds Calorimeter specific information to MET base class
0009 
0010  Implementation:
0011      [Notes on implementation]
0012 */
0013 //
0014 // Original Author:  R. Cavanaugh (taken from F.Ratnikov, UMd)
0015 //         Created:  June 6, 2006
0016 //
0017 //
0018 #ifndef METProducers_CaloMETInfo_h
0019 #define METProducers_CaloMETInfo_h
0020 
0021 //____________________________________________________________________________||
0022 #include "DataFormats/Common/interface/Handle.h"
0023 #include "DataFormats/Common/interface/View.h"
0024 #include "DataFormats/Math/interface/LorentzVector.h"
0025 #include "DataFormats/Math/interface/Point3D.h"
0026 #include "DataFormats/METReco/interface/CaloMET.h"
0027 #include "DataFormats/METReco/interface/CommonMETData.h"
0028 #include "DataFormats/METReco/interface/SpecificCaloMETData.h"
0029 #include "DataFormats/DetId/interface/DetId.h"
0030 
0031 #include <vector>
0032 
0033 class CaloTower;
0034 struct SpecificCaloMETData;
0035 
0036 //____________________________________________________________________________||
0037 class CaloSpecificAlgo {
0038 public:
0039   reco::CaloMET addInfo(edm::Handle<edm::View<reco::Candidate> > towers,
0040                         const CommonMETData &met,
0041                         bool noHF,
0042                         double globalThreshold);
0043 
0044 private:
0045   typedef math::XYZTLorentzVector LorentzVector;
0046   typedef math::XYZPoint Point;
0047   void update_totalEt_totalEm(double &totalEt, double &totalEm, const CaloTower *calotower, bool noHF);
0048   void update_MaxTowerEm_MaxTowerHad(float &MaxTowerEm, float &MaxTowerHad, const CaloTower *calotower, bool noHF);
0049   void update_EmEtInEB_EmEtInEE(float &EmEtInEB, float &EmEtInEE, const CaloTower *calotower);
0050   void update_HadEtInHB_HadEtInHE_HadEtInHO_HadEtInHF_EmEtInHF(float &HadEtInHB,
0051                                                                float &HadEtInHE,
0052                                                                float &HadEtInHO,
0053                                                                float &HadEtInHF,
0054                                                                float &EmEtInHF,
0055                                                                const CaloTower *calotower,
0056                                                                bool noHF);
0057   void update_sumEtInpHF_MExInpHF_MEyInpHF_sumEtInmHF_MExInmHF_MEyInmHF(double &sumEtInpHF,
0058                                                                         double &MExInpHF,
0059                                                                         double &MEyInpHF,
0060                                                                         double &sumEtInmHF,
0061                                                                         double &MExInmHF,
0062                                                                         double &MEyInmHF,
0063                                                                         const CaloTower *calotower);
0064   void remove_HF_from_MET(CommonMETData &met,
0065                           double sumEtInpHF,
0066                           double MExInpHF,
0067                           double MEyInpHF,
0068                           double sumEtInmHF,
0069                           double MExInmHF,
0070                           double MEyInmHF);
0071   void add_MET_in_HF(SpecificCaloMETData &specific,
0072                      double sumEtInpHF,
0073                      double MExInpHF,
0074                      double MEyInpHF,
0075                      double sumEtInmHF,
0076                      double MExInmHF,
0077                      double MEyInmHF);
0078 
0079   DetId find_DetId_of_HCAL_cell_in_constituent_of(const CaloTower *calotower);
0080   DetId find_DetId_of_ECAL_cell_in_constituent_of(const CaloTower *calotower);
0081 };
0082 
0083 //____________________________________________________________________________||
0084 #endif  // METProducers_CaloMETInfo_h