CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/DataFormats/JetReco/interface/TrackExtrapolation.h

Go to the documentation of this file.
00001 #ifndef DataFormats_TrackReco_interface_TrackExtrapolation_h
00002 #define DataFormats_TrackReco_interface_TrackExtrapolation_h
00003 /* \class reco::TrackExtrapolation TrackExtrapolation.h DataFormats/TrackReco/interface/TrackExtrapolation.h
00004 *
00005 * This class represents the track state at several radii (specified by user in producer).
00006 * It stores a TrackRef to the original track, as well as vectors of the positions, momenta,
00007 * and directions of the track at the various radii. 
00008 *
00009 * \author Salvatore Rappoccio, JHU
00010 *
00011 *
00012 */
00013 
00014 #include "DataFormats/TrackReco/interface/Track.h"
00015 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00016 #include "DataFormats/Math/interface/Vector3D.h"
00017 #include "DataFormats/Math/interface/Point3D.h"
00018 
00019 #include <vector>
00020 
00021 namespace reco {
00022   class TrackExtrapolation {
00023   public:
00024 
00025 
00026     TrackExtrapolation() {}
00027     TrackExtrapolation( reco::TrackRef const & track,
00028                         std::vector<bool> isValid,
00029                         std::vector<TrackBase::Point> const & pos,
00030                         std::vector<TrackBase::Vector> const & mom,
00031                         std::vector<TrackBase::Vector> const & dir ) :
00032     track_(track)
00033     {
00034       isValid_.resize(isValid.size());
00035       copy(isValid.begin(), isValid.end(), isValid_.begin() );
00036       pos_.resize( pos.size() );
00037       copy( pos.begin(), pos.end(), pos_.begin() );
00038       mom_.resize( mom.size() );
00039       copy( mom.begin(), mom.end(), mom_.begin() );
00040       dir_.resize( dir.size() );
00041       copy( dir.begin(), dir.end(), dir_.begin() );
00042     }
00043 
00044     ~TrackExtrapolation() {}
00045 
00046     reco::TrackRef const &                 track()      const { return track_;}
00047     std::vector<bool> const &              isValid()    const { return isValid_;}
00048     std::vector<TrackBase::Point> const &  positions()  const { return pos_;}
00049     std::vector<TrackBase::Vector> const & momenta()    const { return mom_;}
00050     std::vector<TrackBase::Vector> const & directions() const { return dir_;}
00051 
00052   protected:
00053     reco::TrackRef    track_;
00054     std::vector<bool>                  isValid_;
00055     std::vector<TrackBase::Point>      pos_;
00056     std::vector<TrackBase::Vector>     mom_;
00057     std::vector<TrackBase::Vector>     dir_;
00058   };
00059 }
00060 
00061 
00062 #endif