CMS 3D CMS Logo

ChargeIsolation.h
Go to the documentation of this file.
1 /*
2 Functions to define isolation with respect to charge particles
3 
4 Authors: Seema Sharma, Sunanda Banerjee
5 Created: August 2009
6 */
7 
8 #ifndef CalibrationIsolatedParticlesChargeIsolation_h
9 #define CalibrationIsolatedParticlesChargeIsolation_h
10 
11 // system include files
12 #include <memory>
13 #include <cmath>
14 #include <string>
15 #include <map>
16 #include <vector>
17 
18 // user include files
21 
29 
35 
38 
39 namespace spr {
40  // Returns the maximum energy of a track within a NxN matrix around the
41  // impact of a given track on the ECAL surface. It assumes that all tracks
42  // are extrapolated to the ECAL surface and stored in a vectore *vdetIds*
43  double chargeIsolationEcal(unsigned int trkIndex,
44  std::vector<spr::propagatedTrackID>& vdetIds,
45  const CaloGeometry* geo,
46  const CaloTopology* caloTopology,
47  int ieta,
48  int iphi,
49  bool debug = false);
50 
51  // Returns the maximum energy of a track within a NxN matrix around the
52  // impact of a given track on the ECAL surface. It extrapolates all tracks
53  // in the collection to the ECAL surface in order to do the tests
54  double chargeIsolationEcal(const DetId& coreDet,
55  reco::TrackCollection::const_iterator trkItr,
57  const CaloGeometry* geo,
58  const CaloTopology* caloTopology,
59  const MagneticField* bField,
60  int ieta,
61  int iphi,
62  const std::string& theTrackQuality,
63  bool debug = false);
64 
65  // Returns the maximum energy of a track within a NxN matrix around the
66  // impact of a given track on the HCAL surface. It assumes that all tracks
67  // are extrapolated to the HCAL surface and stored in a vectore *vdetIds*
68  double chargeIsolationHcal(unsigned int trkIndex,
69  std::vector<spr::propagatedTrackID>& vdetIds,
70  const HcalTopology* topology,
71  int ieta,
72  int iphi,
73  bool debug = false);
74 
75  // Returns the maximum energy of a track within a NxN matrix around the
76  // impact of a given track on the HCAL surface. It extrapolates all tracks
77  // in the collection to the HCAL surface in order to do the tests
78  double chargeIsolationHcal(reco::TrackCollection::const_iterator trkItr,
80  const DetId ClosestCell,
81  const HcalTopology* topology,
82  const CaloSubdetectorGeometry* gHB,
83  const MagneticField* bField,
84  int ieta,
85  int iphi,
86  const std::string& theTrackQuality,
87  bool debug = false);
88 
89  bool chargeIsolation(const DetId anyCell, std::vector<DetId>& vdets);
90 
91  // Returns the maximum energy of a track within a cone of radius *dR*
92  // around the impact poiunt to the ECAL surface
94  const edm::EventSetup& iSetup,
95  reco::TrackCollection::const_iterator trkItr,
98  TrackAssociatorParameters& parameters_,
99  const std::string& theTrackQuality,
100  int& nNearTRKs,
101  int& nLayers_maxNearP,
102  int& trkQual_maxNearP,
103  double& maxNearP_goodTrk,
104  const GlobalPoint& hpoint1,
105  const GlobalVector& trackMom,
106  double dR);
107  double chargeIsolationCone(unsigned int trkIndex,
108  std::vector<spr::propagatedTrackDirection>& trkDirs,
109  double dR,
110  int& nNearTRKs,
111  bool debug = false);
112  std::pair<double, double> chargeIsolationCone(unsigned int trkIndex,
113  std::vector<spr::propagatedTrackDirection>& trkDirs,
114  double dR,
115  bool debug = false);
116 
117  int coneChargeIsolation(const GlobalPoint& hpoint1,
118  const GlobalPoint& point2,
119  const GlobalVector& trackMom,
120  double dR);
121 
122 } // namespace spr
123 
124 #endif
LCToCPAssociation_cfi.associator
associator
Definition: LCToCPAssociation_cfi.py:4
Vector3DBase
Definition: Vector3DBase.h:8
Handle.h
spr
Definition: CaloConstants.h:6
TrackDetectorAssociator.h
HcalTopology
Definition: HcalTopology.h:26
edm::Handle< reco::TrackCollection >
CaloTopology
Definition: CaloTopology.h:19
EcalRecHitCollections.h
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
DetId
Definition: DetId.h:17
CaloGeometry
Definition: CaloGeometry.h:21
debug
#define debug
Definition: HDRShower.cc:19
Track.h
TrackFwd.h
spr::chargeIsolationHcal
double chargeIsolationHcal(unsigned int trkIndex, std::vector< spr::propagatedTrackID > &vdetIds, const HcalTopology *topology, int ieta, int iphi, bool debug=false)
Definition: ChargeIsolation.cc:114
spr::coneChargeIsolation
double coneChargeIsolation(const edm::Event &iEvent, const edm::EventSetup &iSetup, reco::TrackCollection::const_iterator trkItr, edm::Handle< reco::TrackCollection > trkCollection, TrackDetectorAssociator &associator, TrackAssociatorParameters &parameters_, const std::string &theTrackQuality, int &nNearTRKs, int &nLayers_maxNearP, int &trkQual_maxNearP, double &maxNearP_goodTrk, const GlobalPoint &hpoint1, const GlobalVector &trackMom, double dR)
Definition: ChargeIsolation.cc:224
Point3DBase< float, GlobalTag >
spr::chargeIsolationCone
double chargeIsolationCone(unsigned int trkIndex, std::vector< spr::propagatedTrackDirection > &trkDirs, double dR, int &nNearTRKs, bool debug=false)
Definition: ChargeIsolation.cc:288
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
CaloSubdetectorGeometry.h
spr::chargeIsolation
bool chargeIsolation(const DetId anyCell, std::vector< DetId > &vdets)
Definition: ChargeIsolation.cc:213
Event.h
TrackDetectorAssociator
Definition: TrackDetectorAssociator.h:44
iEvent
int iEvent
Definition: GenABIO.cc:224
MagneticField.h
edm::EventSetup
Definition: EventSetup.h:58
CaloTopology.h
HcalTopology.h
Calorimetry_cff.bField
bField
Definition: Calorimetry_cff.py:284
DetId.h
CaloPropagateTrack.h
CaloGeometry.h
GlobalVector.h
EventSetup.h
CaloSubdetectorGeometry
Definition: CaloSubdetectorGeometry.h:22
spr::chargeIsolationEcal
double chargeIsolationEcal(unsigned int trkIndex, std::vector< spr::propagatedTrackID > &vdetIds, const CaloGeometry *geo, const CaloTopology *caloTopology, int ieta, int iphi, bool debug=false)
Definition: ChargeIsolation.cc:15
HGC3DClusterGenMatchSelector_cfi.dR
dR
Definition: HGC3DClusterGenMatchSelector_cfi.py:7
edm::Event
Definition: Event.h:73
MagneticField
Definition: MagneticField.h:19
GlobalPoint.h
TrackAssociatorParameters
Definition: TrackAssociatorParameters.h:43