CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ChargeIsolation.h
Go to the documentation of this file.
1 // -*- C++ -*
2 /*
3 Functions to define isolation with respect to charge particles
4 
5 Authors: Seema Sharma, Sunanda Banerjee
6 Created: August 2009
7 */
8 
9 #ifndef CalibrationIsolatedParticlesChargeIsolation_h
10 #define CalibrationIsolatedParticlesChargeIsolation_h
11 
12 // system include files
13 #include <memory>
14 #include <cmath>
15 #include <string>
16 #include <map>
17 #include <vector>
18 
19 // user include files
22 
30 
36 
39 
40 namespace spr{
41  // Returns the maximum energy of a track within a NxN matrix around the
42  // impact of a given track on the ECAL surface. It assumes that all tracks
43  // are extrapolated to the ECAL surface and stored in a vectore *vdetIds*
44  double chargeIsolationEcal(unsigned int trkIndex, std::vector<spr::propagatedTrackID>& vdetIds, const CaloGeometry* geo, const CaloTopology* caloTopology, int ieta, int iphi, bool debug=false);
45 
46  // Returns the maximum energy of a track within a NxN matrix around the
47  // impact of a given track on the ECAL surface. It extrapolates all tracks
48  // in the collection to the ECAL surface in order to do the tests
49  double chargeIsolationEcal(const DetId& coreDet, reco::TrackCollection::const_iterator trkItr, edm::Handle<reco::TrackCollection> trkCollection, const CaloGeometry* geo, const CaloTopology* caloTopology, const MagneticField* bField, int ieta, int iphi, std::string& theTrackQuality, 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 HCAL surface. It assumes that all tracks
53  // are extrapolated to the HCAL surface and stored in a vectore *vdetIds*
54  double chargeIsolationHcal(unsigned int trkIndex, std::vector<spr::propagatedTrackID> & vdetIds, const HcalTopology* topology, int ieta, int iphi, bool debug=false);
55 
56  // Returns the maximum energy of a track within a NxN matrix around the
57  // impact of a given track on the HCAL surface. It extrapolates all tracks
58  // in the collection to the HCAL surface in order to do the tests
59  double chargeIsolationHcal(reco::TrackCollection::const_iterator trkItr, edm::Handle<reco::TrackCollection> trkCollection, const DetId ClosestCell, const HcalTopology* topology, const CaloSubdetectorGeometry* gHB, const MagneticField* bField, int ieta, int iphi, std::string& theTrackQuality, bool debug=false);
60 
61  bool chargeIsolation(const DetId anyCell, std::vector<DetId>& vdets) ;
62 
63  // Returns the maximum energy of a track within a cone of radius *dR*
64  // around the impact poiunt to the ECAL surface
65  double coneChargeIsolation(const edm::Event& iEvent, const edm::EventSetup& iSetup, reco::TrackCollection::const_iterator trkItr, edm::Handle<reco::TrackCollection> trkCollection, TrackDetectorAssociator& associator, TrackAssociatorParameters& parameters_, std::string theTrackQuality, int &nNearTRKs, int &nLayers_maxNearP, int &trkQual_maxNearP, double &maxNearP_goodTrk, const GlobalPoint& hpoint1, const GlobalVector& trackMom, double dR);
66  double chargeIsolationCone(unsigned int trkIndex, std::vector<spr::propagatedTrackDirection> & trkDirs, double dR, int & nNearTRKs, bool debug=false);
67 
68  int coneChargeIsolation(const GlobalPoint& hpoint1, const GlobalPoint& point2, const GlobalVector& trackMom, double dR);
69 
70 }
71 
72 #endif
bool chargeIsolation(const DetId anyCell, std::vector< DetId > &vdets)
double chargeIsolationCone(unsigned int trkIndex, std::vector< spr::propagatedTrackDirection > &trkDirs, double dR, int &nNearTRKs, bool debug=false)
double chargeIsolationEcal(unsigned int trkIndex, std::vector< spr::propagatedTrackID > &vdetIds, const CaloGeometry *geo, const CaloTopology *caloTopology, int ieta, int iphi, bool debug=false)
int iEvent
Definition: GenABIO.cc:243
Definition: DetId.h:20
#define debug
Definition: MEtoEDMFormat.h:34
double chargeIsolationHcal(unsigned int trkIndex, std::vector< spr::propagatedTrackID > &vdetIds, const HcalTopology *topology, int ieta, int iphi, bool debug=false)
double coneChargeIsolation(const edm::Event &iEvent, const edm::EventSetup &iSetup, reco::TrackCollection::const_iterator trkItr, edm::Handle< reco::TrackCollection > trkCollection, TrackDetectorAssociator &associator, TrackAssociatorParameters &parameters_, std::string theTrackQuality, int &nNearTRKs, int &nLayers_maxNearP, int &trkQual_maxNearP, double &maxNearP_goodTrk, const GlobalPoint &hpoint1, const GlobalVector &trackMom, double dR)