File indexing completed on 2024-04-06 11:59:09
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef CalibrationIsolatedParticlesChargeIsolation_h
0009 #define CalibrationIsolatedParticlesChargeIsolation_h
0010
0011
0012 #include <memory>
0013 #include <cmath>
0014 #include <string>
0015 #include <map>
0016 #include <vector>
0017
0018
0019 #include "FWCore/Framework/interface/Event.h"
0020 #include "FWCore/Framework/interface/EventSetup.h"
0021
0022 #include "DataFormats/Common/interface/Handle.h"
0023 #include "DataFormats/DetId/interface/DetId.h"
0024 #include "DataFormats/TrackReco/interface/Track.h"
0025 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0026 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
0027 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0028 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
0029
0030 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
0031 #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
0032 #include "Geometry/CaloTopology/interface/CaloTopology.h"
0033 #include "Geometry/CaloTopology/interface/HcalTopology.h"
0034 #include "MagneticField/Engine/interface/MagneticField.h"
0035
0036 #include "TrackingTools/TrackAssociator/interface/TrackDetectorAssociator.h"
0037 #include "RecoCaloTools/Navigation/interface/CaloNavigator.h"
0038 #include "Calibration/IsolatedParticles/interface/CaloPropagateTrack.h"
0039
0040 namespace spr {
0041
0042
0043
0044 double chargeIsolationEcal(unsigned int trkIndex,
0045 std::vector<spr::propagatedTrackID>& vdetIds,
0046 const CaloGeometry* geo,
0047 const CaloTopology* caloTopology,
0048 int ieta,
0049 int iphi,
0050 bool debug = false);
0051
0052 double chargeIsolationGenEcal(unsigned int trkIndex,
0053 std::vector<spr::propagatedGenParticleID>& trackIDs,
0054 const CaloGeometry* geo,
0055 const CaloTopology* caloTopology,
0056 int ieta,
0057 int iphi,
0058 bool debug = false);
0059
0060
0061
0062
0063 double chargeIsolationEcal(const DetId& coreDet,
0064 reco::TrackCollection::const_iterator trkItr,
0065 edm::Handle<reco::TrackCollection> trkCollection,
0066 const CaloGeometry* geo,
0067 const CaloTopology* caloTopology,
0068 const MagneticField* bField,
0069 int ieta,
0070 int iphi,
0071 const std::string& theTrackQuality,
0072 bool debug = false);
0073
0074
0075
0076
0077 double chargeIsolationHcal(unsigned int trkIndex,
0078 std::vector<spr::propagatedTrackID>& vdetIds,
0079 const HcalTopology* topology,
0080 int ieta,
0081 int iphi,
0082 bool debug = false);
0083
0084
0085
0086
0087 double chargeIsolationHcal(reco::TrackCollection::const_iterator trkItr,
0088 edm::Handle<reco::TrackCollection> trkCollection,
0089 const DetId ClosestCell,
0090 const HcalTopology* topology,
0091 const CaloSubdetectorGeometry* gHB,
0092 const MagneticField* bField,
0093 int ieta,
0094 int iphi,
0095 const std::string& theTrackQuality,
0096 bool debug = false);
0097
0098 bool chargeIsolation(const DetId anyCell, std::vector<DetId>& vdets);
0099
0100
0101
0102 double coneChargeIsolation(const edm::Event& iEvent,
0103 const edm::EventSetup& iSetup,
0104 reco::TrackCollection::const_iterator trkItr,
0105 edm::Handle<reco::TrackCollection> trkCollection,
0106 TrackDetectorAssociator& associator,
0107 TrackAssociatorParameters& parameters_,
0108 const std::string& theTrackQuality,
0109 int& nNearTRKs,
0110 int& nLayers_maxNearP,
0111 int& trkQual_maxNearP,
0112 double& maxNearP_goodTrk,
0113 const GlobalPoint& hpoint1,
0114 const GlobalVector& trackMom,
0115 double dR);
0116
0117 double chargeIsolationCone(unsigned int trkIndex,
0118 std::vector<spr::propagatedTrackDirection>& trkDirs,
0119 double dR,
0120 int& nNearTRKs,
0121 bool debug = false);
0122
0123 double chargeIsolationGenCone(unsigned int trkIndex,
0124 std::vector<spr::propagatedGenParticleID>& trackIDs,
0125 double dR,
0126 int& nNearTRKs,
0127 bool debug = false);
0128
0129 std::pair<double, double> chargeIsolationCone(unsigned int trkIndex,
0130 std::vector<spr::propagatedTrackDirection>& trkDirs,
0131 double dR,
0132 bool debug = false);
0133
0134 int coneChargeIsolation(const GlobalPoint& hpoint1,
0135 const GlobalPoint& point2,
0136 const GlobalVector& trackMom,
0137 double dR);
0138
0139 double chargeIsolation(const edm::Event& iEvent,
0140 const edm::EventSetup& iSetup,
0141 CaloNavigator<DetId>& navigator,
0142 reco::TrackCollection::const_iterator trkItr,
0143 edm::Handle<reco::TrackCollection> trkCollection,
0144 const CaloSubdetectorGeometry* gEB,
0145 const CaloSubdetectorGeometry* gEE,
0146 TrackDetectorAssociator& associator,
0147 TrackAssociatorParameters& parameters_,
0148 int ieta,
0149 int iphi,
0150 const std::string& theTrackQuality,
0151 bool debug = false);
0152
0153 bool chargeIsolation(const DetId anyCell, CaloNavigator<DetId>& navigator, int deta, int dphi);
0154
0155 double chargeIsolationEcal(const edm::Event& iEvent,
0156 const edm::EventSetup& iSetup,
0157 const DetId& coreDet,
0158 reco::TrackCollection::const_iterator trkItr,
0159 edm::Handle<reco::TrackCollection> trkCollection,
0160 const CaloGeometry* geo,
0161 const CaloTopology* caloTopology,
0162 TrackDetectorAssociator& associator,
0163 TrackAssociatorParameters& parameters_,
0164 int ieta,
0165 int iphi,
0166 const std::string& theTrackQuality,
0167 bool debug = false);
0168
0169 double chargeIsolationHcal(const edm::Event& iEvent,
0170 const edm::EventSetup& iSetup,
0171 reco::TrackCollection::const_iterator trkItr,
0172 edm::Handle<reco::TrackCollection> trkCollection,
0173 const DetId ClosestCell,
0174 const HcalTopology* topology,
0175 const CaloSubdetectorGeometry* gHB,
0176 TrackDetectorAssociator& associator,
0177 TrackAssociatorParameters& parameters_,
0178 int ieta,
0179 int iphi,
0180 const std::string& theTrackQuality,
0181 bool debug = false);
0182
0183 }
0184
0185 #endif