CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/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,
00050       HOLayer = 8,
00051 
00052       NLayers = 9
00053     };
00054 
00056     PFTrajectoryPoint();
00057 
00060     PFTrajectoryPoint(int detId,
00061                       int layer,
00062                       const math::XYZPoint& posxyz, 
00063                       const math::XYZTLorentzVector& momentum); 
00064 
00066     PFTrajectoryPoint(const PFTrajectoryPoint& other);
00067 
00069     virtual ~PFTrajectoryPoint();
00070 
00071 
00073     int detId() const    { return detId_; }
00074 
00076     int layer() const    { return layer_; }
00077 
00079     bool     isValid() const {
00080       if( layer_ == -1 && detId_ == -1 ) return false;
00081       else return true;
00082     }
00083 
00085     bool isTrackerLayer() const {
00086       if(detId_ >= 0 ) return true; 
00087       else return false;
00088     }
00089 
00091     const math::XYZPoint& position() const { return posxyz_; }
00092 
00094     const REPPoint& positionREP() const { return posrep_; }
00095 
00097     void calculatePositionREP() {
00098       posrep_.SetCoordinates( posxyz_.Rho(), posxyz_.Eta(), posxyz_.Phi() );
00099     }
00100 
00102     const math::XYZTLorentzVector& momentum() const    { return momentum_; }
00103 
00104     bool   operator==(const reco::PFTrajectoryPoint& other) const;
00105 
00106     friend std::ostream& operator<<(std::ostream& out, const reco::PFTrajectoryPoint& trajPoint);
00107 
00108   private:
00109 
00112     bool isTrackerLayer_;
00113 
00115     int detId_;             
00116 
00118     int layer_;
00119 
00121     math::XYZPoint          posxyz_;
00122 
00124     REPPoint                posrep_;
00125 
00127     math::XYZTLorentzVector momentum_;
00128 
00129   };
00130 
00131   std::ostream& operator<<(std::ostream& out, const reco::PFTrajectoryPoint& trajPoint); 
00132 }
00133 
00134 #endif