CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/DataFormats/ParticleFlowReco/interface/PFTrajectoryPoint.h

Go to the documentation of this file.
00001 #ifndef DataFormats_ParticleFlowReco_PFTrajectoryPoint_h
00002 #define DataFormats_ParticleFlowReco_PFTrajectoryPoint_h
00003 
00005 #include <vector>
00006 #include <map>
00007 #include <iosfwd>
00008 
00009 #include "DataFormats/Math/interface/Point3D.h"
00010 #include "Rtypes.h" 
00011 #include "DataFormats/Math/interface/LorentzVector.h"
00012 #include "Math/GenVector/PositionVector3D.h"
00013 
00014 namespace reco {
00015 
00026   class PFTrajectoryPoint {
00027 
00028   public:
00029     typedef ROOT::Math::PositionVector3D<ROOT::Math::CylindricalEta3D<Double32_t> > REPPoint;
00030 
00032     enum LayerType {
00034       ClosestApproach = 0,
00035       BeamPipeOrEndVertex = 1,       
00037       PS1 = 2,             
00039       PS2 = 3,             
00041       ECALEntrance = 4,  
00044       ECALShowerMax = 5,   
00046       HCALEntrance = 6,
00048       HCALExit = 7,
00049       NLayers = 8
00050     };
00051 
00053     PFTrajectoryPoint();
00054 
00057     PFTrajectoryPoint(int detId,
00058                       int layer,
00059                       const math::XYZPoint& posxyz, 
00060                       const math::XYZTLorentzVector& momentum); 
00061 
00063     PFTrajectoryPoint(const PFTrajectoryPoint& other);
00064 
00066     virtual ~PFTrajectoryPoint();
00067 
00068 
00070     int detId() const    { return detId_; }
00071 
00073     int layer() const    { return layer_; }
00074 
00076     bool     isValid() const {
00077       if( layer_ == -1 && detId_ == -1 ) return false;
00078       else return true;
00079     }
00080 
00082     bool isTrackerLayer() const {
00083       if(detId_ >= 0 ) return true; 
00084       else return false;
00085     }
00086 
00088     const math::XYZPoint& position() const { return posxyz_; }
00089 
00091     const REPPoint& positionREP() const { return posrep_; }
00092 
00094     void calculatePositionREP() {
00095       posrep_.SetCoordinates( posxyz_.Rho(), posxyz_.Eta(), posxyz_.Phi() );
00096     }
00097 
00099     const math::XYZTLorentzVector& momentum() const    { return momentum_; }
00100 
00101     bool   operator==(const reco::PFTrajectoryPoint& other) const;
00102 
00103     friend std::ostream& operator<<(std::ostream& out, const reco::PFTrajectoryPoint& trajPoint);
00104 
00105   private:
00106 
00109     bool isTrackerLayer_;
00110 
00112     int detId_;             
00113 
00115     int layer_;
00116 
00118     math::XYZPoint          posxyz_;
00119 
00121     REPPoint                posrep_;
00122 
00124     math::XYZTLorentzVector momentum_;
00125 
00126   };
00127 
00128   std::ostream& operator<<(std::ostream& out, const reco::PFTrajectoryPoint& trajPoint); 
00129 }
00130 
00131 #endif