00001 #ifndef CalibrationIsolatedParticlesCaloPropagateTrack_h
00002 #define CalibrationIsolatedParticlesCaloPropagateTrack_h
00003
00004 #include <cmath>
00005 #include <vector>
00006 #include <string>
00007
00008 #include "DataFormats/Common/interface/Handle.h"
00009 #include "DataFormats/DetId/interface/DetId.h"
00010 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00011 #include "DataFormats/TrackReco/interface/Track.h"
00012 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00013 #include "MagneticField/Engine/interface/MagneticField.h"
00014 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
00015 #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
00016
00017 namespace spr{
00018
00019 struct propagatedTrack {
00020 propagatedTrack() {ok=false;}
00021 bool ok;
00022 math::XYZPoint point;
00023 GlobalVector direction;
00024 };
00025
00026 struct propagatedTrackID {
00027 propagatedTrackID() {ok=false; okECAL=false; okHCAL=false;}
00028 bool ok, okECAL, okHCAL;
00029 DetId detIdECAL, detIdHCAL, detIdEHCAL;
00030 double etaECAL, etaHCAL;
00031 double phiECAL, phiHCAL;
00032 reco::TrackCollection::const_iterator trkItr;
00033 };
00034
00035 struct propagatedTrackDirection {
00036 propagatedTrackDirection() {ok=false; okECAL=false; okHCAL=false;}
00037 bool ok, okECAL, okHCAL;
00038 DetId detIdECAL, detIdHCAL, detIdEHCAL;
00039 GlobalPoint pointECAL, pointHCAL;
00040 GlobalVector directionECAL, directionHCAL;
00041 reco::TrackCollection::const_iterator trkItr;
00042 };
00043
00044
00045
00046
00047 std::vector<spr::propagatedTrackID> propagateCALO(edm::Handle<reco::TrackCollection>& trkCollection, const CaloGeometry* geo, const MagneticField* bField, std::string & theTrackQuality, bool debug=false);
00048 void propagateCALO(edm::Handle<reco::TrackCollection>& trkCollection, const CaloGeometry* geo, const MagneticField* bField, std::string & theTrackQuality, std::vector<spr::propagatedTrackID>& vdets, bool debug=false);
00049 void propagateCALO(edm::Handle<reco::TrackCollection>& trkCollection, const CaloGeometry* geo, const MagneticField* bField, std::string & theTrackQuality, std::vector<spr::propagatedTrackDirection>& trkDir, bool debug=false);
00050
00051
00052
00053 propagatedTrack propagateTrackToECAL(const reco::Track*, const MagneticField*, bool debug=false);
00054 std::pair<math::XYZPoint,bool> propagateECAL(const reco::Track*, const MagneticField*, bool debug=false);
00055 std::pair<math::XYZPoint,bool> propagateECAL(const GlobalPoint& vertex, const GlobalVector& momentum, int charge, const MagneticField*, bool debug=false);
00056
00057
00058
00059 propagatedTrack propagateTrackToHCAL(const reco::Track*, const MagneticField*, bool debug=false);
00060 std::pair<math::XYZPoint,bool> propagateHCAL(const reco::Track*, const MagneticField*, bool debug=false);
00061 std::pair<math::XYZPoint,bool> propagateHCAL(const GlobalPoint& vertex, const GlobalVector& momentum, int charge, const MagneticField*, bool debug=false);
00062
00063
00064
00065 std::pair<math::XYZPoint,bool> propagateTracker(const reco::Track*, const MagneticField*, bool debug=false);
00066 std::pair<math::XYZPoint,double> propagateTrackerEnd(const reco::Track*, const MagneticField*, bool debug=false);
00067
00068 propagatedTrack propagateCalo(const GlobalPoint& vertex, const GlobalVector& momentum, int charge, const MagneticField*, float zdist, float radius, float corner, bool debug=false);
00069
00070 }
00071 #endif