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, std::vector<spr::propagatedTrackID>& vdetIds, const CaloGeometry* geo, const CaloTopology* caloTopology, int ieta, int iphi, bool debug=false);
44 
45  // Returns the maximum energy of a track within a NxN matrix around the
46  // impact of a given track on the ECAL surface. It extrapolates all tracks
47  // in the collection to the ECAL surface in order to do the tests
48  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, const std::string& theTrackQuality, bool debug=false);
49 
50  // Returns the maximum energy of a track within a NxN matrix around the
51  // impact of a given track on the HCAL surface. It assumes that all tracks
52  // are extrapolated to the HCAL surface and stored in a vectore *vdetIds*
53  double chargeIsolationHcal(unsigned int trkIndex, std::vector<spr::propagatedTrackID> & vdetIds, const HcalTopology* topology, int ieta, int iphi, bool debug=false);
54 
55  // Returns the maximum energy of a track within a NxN matrix around the
56  // impact of a given track on the HCAL surface. It extrapolates all tracks
57  // in the collection to the HCAL surface in order to do the tests
58  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, const std::string& theTrackQuality, bool debug=false);
59 
60  bool chargeIsolation(const DetId anyCell, std::vector<DetId>& vdets) ;
61 
62  // Returns the maximum energy of a track within a cone of radius *dR*
63  // around the impact poiunt to the ECAL surface
64  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);
65  double chargeIsolationCone(unsigned int trkIndex, std::vector<spr::propagatedTrackDirection> & trkDirs, double dR, int & nNearTRKs, bool debug=false);
66  std::pair<double,double> chargeIsolationCone(unsigned int trkIndex, std::vector<spr::propagatedTrackDirection> & trkDirs, double dR, bool debug=false);
67 
68  int coneChargeIsolation(const GlobalPoint& hpoint1, const GlobalPoint& point2, const GlobalVector& trackMom, double dR);
69 
70 }
71 
72 #endif
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)
CaloTopology const * topology(0)
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:224
Definition: DetId.h:18
#define debug
Definition: HDRShower.cc:19
double chargeIsolationHcal(unsigned int trkIndex, std::vector< spr::propagatedTrackID > &vdetIds, const HcalTopology *topology, int ieta, int iphi, bool debug=false)