Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:26:39

0001 #ifndef RECOMET_METALGORITHMS_HCALHALOALGO_H
0002 #define RECOMET_METALGORITHMS_HCALHALOALGO_H
0003 
0004 #include "DataFormats/METReco/interface/HcalHaloData.h"
0005 
0006 /*
0007   [class]:  HcalHaloAlgo
0008   [authors]: R. Remington, The University of Florida
0009   [description]: Algorithm to calculate quantities relevant to HcalHaloData object
0010   [date]: October 15, 2009
0011 */
0012 
0013 #include "Geometry/CaloTopology/interface/EcalBarrelTopology.h"
0014 #include "Geometry/CaloTopology/interface/EcalEndcapTopology.h"
0015 
0016 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
0017 #include "Geometry/HcalTowerAlgo/interface/HcalGeometry.h"
0018 #include "Geometry/Records/interface/CaloGeometryRecord.h"
0019 
0020 #include "DataFormats/DetId/interface/DetId.h"
0021 
0022 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
0023 #include "DataFormats/EcalRecHit/interface/EcalRecHit.h"
0024 
0025 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
0026 #include "DataFormats/HcalDetId/interface/HcalSubdetector.h"
0027 #include "DataFormats/HcalRecHit/interface/HBHERecHit.h"
0028 #include "DataFormats/HcalRecHit/interface/HFRecHit.h"
0029 #include "DataFormats/HcalRecHit/interface/HORecHit.h"
0030 #include "DataFormats/HcalRecHit/interface/HcalRecHitDefs.h"
0031 #include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h"
0032 #include "DataFormats/CaloRecHit/interface/CaloRecHit.h"
0033 #include "DataFormats/CaloTowers/interface/CaloTower.h"
0034 #include "DataFormats/CaloTowers/interface/CaloTowerDetId.h"
0035 #include "DataFormats/CaloTowers/interface/CaloTowerCollection.h"
0036 #include "DataFormats/VertexReco/interface/Vertex.h"
0037 #include "DataFormats/METReco/interface/HaloClusterCandidateHCAL.h"
0038 
0039 #include "FWCore/Framework/interface/FrameworkfwdMostUsed.h"
0040 
0041 class HcalHaloAlgo {
0042 public:
0043   //constructor
0044   explicit HcalHaloAlgo(edm::ConsumesCollector iC);
0045 
0046   // run algorithm
0047   reco::HcalHaloData Calculate(const CaloGeometry& TheCaloGeometry,
0048                                edm::Handle<HBHERecHitCollection>& TheHBHERecHits,
0049                                edm::Handle<CaloTowerCollection>& TheCaloTowers,
0050                                edm::Handle<EBRecHitCollection>& TheEBRecHits,
0051                                edm::Handle<EERecHitCollection>& TheEERecHits,
0052                                const edm::EventSetup& TheSetup);
0053 
0054   reco::HcalHaloData Calculate(const CaloGeometry& TheCaloGeometry,
0055                                edm::Handle<HBHERecHitCollection>& TheHBHERecHits,
0056                                edm::Handle<EBRecHitCollection>& TheEBRecHits,
0057                                edm::Handle<EERecHitCollection>& TheEERecHits,
0058                                const edm::EventSetup& TheSetup);
0059 
0060   // Set RecHit Energy Thresholds
0061   void SetRecHitEnergyThresholds(float HB, float HE) {
0062     HBRecHitEnergyThreshold = HB;
0063     HERecHitEnergyThreshold = HE;
0064   }
0065 
0066   // Set Phi Wedge Thresholds
0067   void SetPhiWedgeEnergyThreshold(float SumE) { SumEnergyThreshold = SumE; }
0068   void SetPhiWedgeNHitsThreshold(int nhits) { NHitsThreshold = nhits; }
0069   void SetPhiWedgeThresholds(float SumE, int nhits) {
0070     SumEnergyThreshold = SumE;
0071     NHitsThreshold = nhits;
0072   }
0073 
0074   // Get RecHit Energy Threshold
0075   float GetHBRecHitEnergyThreshold() { return HBRecHitEnergyThreshold; }
0076   float GetHERecHitEnergyThreshold() { return HERecHitEnergyThreshold; }
0077 
0078   // Get Phi Wedge Threhsolds
0079   float GetPhiWedgeEnergyThreshold() { return SumEnergyThreshold; }
0080   int GetPhiWedgeNHitsThreshold() { return NHitsThreshold; }
0081 
0082   std::vector<reco::HaloClusterCandidateHCAL> GetHaloClusterCandidateHB(
0083       edm::Handle<EcalRecHitCollection>& ebrechitcoll,
0084       edm::Handle<HBHERecHitCollection>& hbherechitcoll,
0085       float et_thresh_seedrh);
0086   std::vector<reco::HaloClusterCandidateHCAL> GetHaloClusterCandidateHE(
0087       edm::Handle<EcalRecHitCollection>& eerechitcoll,
0088       edm::Handle<HBHERecHitCollection>& hbherechitcoll,
0089       float et_thresh_seedrh);
0090   bool HBClusterShapeandTimeStudy(reco::HaloClusterCandidateHCAL hcand, bool ishlt);
0091   bool HEClusterShapeandTimeStudy(reco::HaloClusterCandidateHCAL hcand, bool ishlt);
0092 
0093 private:
0094   // Invidiual RecHit Threhsolds
0095   float HBRecHitEnergyThreshold;
0096   float HERecHitEnergyThreshold;
0097 
0098   // Phi Wedge Thresholds
0099   float SumEnergyThreshold;
0100   int NHitsThreshold;
0101 
0102   edm::ESGetToken<CaloGeometry, CaloGeometryRecord> geoToken_;
0103   const CaloGeometry* geo_;
0104   const HcalGeometry* hgeo_;
0105   math::XYZPoint getPosition(const DetId& id, reco::Vertex::Point vtx);
0106 };
0107 
0108 #endif