Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:43:26

0001 #ifndef CalibrationIsolatedParticlesFindCaloHitCone_h
0002 #define CalibrationIsolatedParticlesFindCaloHitCone_h
0003 
0004 // system include files
0005 #include <memory>
0006 #include <cmath>
0007 #include <string>
0008 #include <map>
0009 #include <vector>
0010 
0011 // user include files
0012 #include "FWCore/Framework/interface/Frameworkfwd.h"
0013 
0014 #include "DataFormats/Common/interface/Handle.h"
0015 
0016 #include "DataFormats/Candidate/interface/Candidate.h"
0017 
0018 #include "DataFormats/DetId/interface/DetId.h"
0019 #include "DataFormats/EcalDetId/interface/EBDetId.h"
0020 #include "DataFormats/EcalDetId/interface/EEDetId.h"
0021 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
0022 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
0023 #include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h"
0024 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0025 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
0026 
0027 #include "SimDataFormats/CaloHit/interface/PCaloHitContainer.h"
0028 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
0029 
0030 #include <cmath>
0031 
0032 namespace spr {
0033 
0034   // One Hit Collection
0035   template <typename T>
0036   std::vector<typename T::const_iterator> findHitCone(const CaloGeometry* geo,
0037                                                       edm::Handle<T>& hits,
0038                                                       const GlobalPoint& hpoint1,
0039                                                       const GlobalPoint& point1,
0040                                                       double dR,
0041                                                       const GlobalVector& trackMom,
0042                                                       bool debug = false);
0043 
0044   // Two Hit Collections - needed for looping over Ecal Endcap/Barrel Hits
0045   template <typename T>
0046   std::vector<typename T::const_iterator> findHitCone(const CaloGeometry* geo,
0047                                                       edm::Handle<T>& barrelhits,
0048                                                       edm::Handle<T>& endcaphits,
0049                                                       const GlobalPoint& hpoint1,
0050                                                       const GlobalPoint& point1,
0051                                                       double dR,
0052                                                       const GlobalVector& trackMom,
0053                                                       bool debug = false);
0054 
0055   //Ecal Endcap OR Barrel RecHits
0056   std::vector<EcalRecHitCollection::const_iterator> findCone(const CaloGeometry* geo,
0057                                                              edm::Handle<EcalRecHitCollection>& hits,
0058                                                              const GlobalPoint& hpoint1,
0059                                                              const GlobalPoint& point1,
0060                                                              double dR,
0061                                                              bool debug = false);
0062 
0063   // Ecal Endcap AND Barrel RecHits
0064   std::vector<EcalRecHitCollection::const_iterator> findCone(const CaloGeometry* geo,
0065                                                              edm::Handle<EcalRecHitCollection>& barrelhits,
0066                                                              edm::Handle<EcalRecHitCollection>& endcaphits,
0067                                                              const GlobalPoint& hpoint1,
0068                                                              const GlobalPoint& point1,
0069                                                              double dR,
0070                                                              const GlobalVector& trackMom,
0071                                                              bool debug = false);
0072 
0073   //HBHE RecHits
0074   std::vector<HBHERecHitCollection::const_iterator> findCone(const CaloGeometry* geo,
0075                                                              edm::Handle<HBHERecHitCollection>& hits,
0076                                                              const GlobalPoint& hpoint1,
0077                                                              const GlobalPoint& point1,
0078                                                              double dR,
0079                                                              const GlobalVector& trackMom,
0080                                                              bool debug = false);
0081 
0082   // PCalo SimHits
0083   std::vector<edm::PCaloHitContainer::const_iterator> findCone(const CaloGeometry* geo,
0084                                                                edm::Handle<edm::PCaloHitContainer>& hits,
0085                                                                const GlobalPoint& hpoint1,
0086                                                                const GlobalPoint& point1,
0087                                                                double dR,
0088                                                                const GlobalVector& trackMom,
0089                                                                bool debug = false);
0090 
0091 }  // namespace spr
0092 
0093 #include "FindCaloHitCone.icc"
0094 
0095 #endif