CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CaloPropagateTrack.h
Go to the documentation of this file.
1 #ifndef CalibrationIsolatedParticlesCaloPropagateTrack_h
2 #define CalibrationIsolatedParticlesCaloPropagateTrack_h
3 
4 #include <cmath>
5 #include <vector>
6 #include <string>
7 
16 
17 namespace spr{
18 
19  struct propagatedTrack {
20  propagatedTrack() {ok=false;}
21  bool ok;
24  };
25 
27  propagatedTrackID() {ok=false; okECAL=false; okHCAL=false;}
28  bool ok, okECAL, okHCAL;
30  double etaECAL, etaHCAL;
31  double phiECAL, phiHCAL;
32  reco::TrackCollection::const_iterator trkItr;
33  };
34 
36  propagatedTrackDirection() {ok=false; okECAL=false; okHCAL=false;}
37  bool ok, okECAL, okHCAL;
41  reco::TrackCollection::const_iterator trkItr;
42  };
43 
44  // Returns a vector of DetID's of closest cell on the ECAL/HCAL surface of
45  // all the tracks in the collection. Also saves a boolean if extrapolation
46  // is satisfactory
47  std::vector<spr::propagatedTrackID> propagateCALO(edm::Handle<reco::TrackCollection>& trkCollection, const CaloGeometry* geo, const MagneticField* bField, std::string & theTrackQuality, bool debug=false);
48  void propagateCALO(edm::Handle<reco::TrackCollection>& trkCollection, const CaloGeometry* geo, const MagneticField* bField, std::string & theTrackQuality, std::vector<spr::propagatedTrackID>& vdets, bool debug=false);
49  void propagateCALO(edm::Handle<reco::TrackCollection>& trkCollection, const CaloGeometry* geo, const MagneticField* bField, std::string & theTrackQuality, std::vector<spr::propagatedTrackDirection>& trkDir, bool debug=false);
50 
51  // Propagate tracks to the ECAL surface and optionally returns the
52  // extrapolated point (and the track direction at point of extrapolation)
54  std::pair<math::XYZPoint,bool> propagateECAL(const reco::Track*, const MagneticField*, bool debug=false);
55  std::pair<math::XYZPoint,bool> propagateECAL(const GlobalPoint& vertex, const GlobalVector& momentum, int charge, const MagneticField*, bool debug=false);
56 
57  // Propagate tracks to the HCAL surface and optionally returns the
58  // extrapolated point (and the track direction at point of extrapolation)
60  std::pair<math::XYZPoint,bool> propagateHCAL(const reco::Track*, const MagneticField*, bool debug=false);
61  std::pair<math::XYZPoint,bool> propagateHCAL(const GlobalPoint& vertex, const GlobalVector& momentum, int charge, const MagneticField*, bool debug=false);
62 
63  // Propagate the track to the end of the tracker and returns the extrapolated
64  // point and optionally the length of the track upto the end
65  std::pair<math::XYZPoint,bool> propagateTracker(const reco::Track*, const MagneticField*, bool debug=false);
66  std::pair<math::XYZPoint,double> propagateTrackerEnd(const reco::Track*, const MagneticField*, bool debug=false);
67 
68  propagatedTrack propagateCalo(const GlobalPoint& vertex, const GlobalVector& momentum, int charge, const MagneticField*, float zdist, float radius, float corner, bool debug=false);
69 
70 }
71 #endif
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, std::string &theTrackQuality, bool debug=false)
std::pair< math::XYZPoint, bool > propagateHCAL(const reco::Track *, const MagneticField *, bool debug=false)
propagatedTrack propagateCalo(const GlobalPoint &vertex, const GlobalVector &momentum, int charge, const MagneticField *, float zdist, float radius, float corner, bool debug=false)
double charge(const std::vector< uint8_t > &Ampls)
reco::TrackCollection::const_iterator trkItr
std::pair< math::XYZPoint, bool > propagateTracker(const reco::Track *, const MagneticField *, bool debug=false)
std::pair< math::XYZPoint, bool > propagateECAL(const reco::Track *, const MagneticField *, bool debug=false)
propagatedTrack propagateTrackToECAL(const reco::Track *, const MagneticField *, bool debug=false)
Definition: DetId.h:20
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:13
std::pair< math::XYZPoint, double > propagateTrackerEnd(const reco::Track *, const MagneticField *, bool debug=false)
reco::TrackCollection::const_iterator trkItr
#define debug
Definition: MEtoEDMFormat.h:34
propagatedTrack propagateTrackToHCAL(const reco::Track *, const MagneticField *, bool debug=false)