CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch12/src/DataFormats/TrackerRecHit2D/interface/SiStripRecHit2D.h

Go to the documentation of this file.
00001 #ifndef SiStripRecHit2D_H
00002 #define SiStripRecHit2D_H
00003 
00004 #include "DataFormats/TrackerRecHit2D/interface/BaseSiTrackerRecHit2DLocalPos.h"
00005 #include "DataFormats/SiStripCluster/interface/SiStripCluster.h"
00006 #include "DataFormats/Common/interface/DetSetVector.h"
00007 #include "DataFormats/Common/interface/DetSetVectorNew.h"
00008 #include "DataFormats/Common/interface/RefGetter.h"
00009 
00010 class SiStripRecHit2D : public  BaseSiTrackerRecHit2DLocalPos{
00011 public:
00012 
00013   SiStripRecHit2D(): BaseSiTrackerRecHit2DLocalPos(),cluster_(),clusterRegional_(),
00014                      sigmaPitch_(-1.){}
00015 
00016   ~SiStripRecHit2D() {} 
00017 
00018   typedef edm::Ref<edmNew::DetSetVector<SiStripCluster>,SiStripCluster > ClusterRef;
00019   SiStripRecHit2D( const LocalPoint&, const LocalError&,
00020                    const DetId&, 
00021                    ClusterRef const&  cluster); 
00022 
00023   typedef edm::Ref< edm::LazyGetter<SiStripCluster>, SiStripCluster, edm::FindValue<SiStripCluster> >  ClusterRegionalRef;
00024   SiStripRecHit2D( const LocalPoint&, const LocalError&,
00025                    const DetId&, 
00026                    ClusterRegionalRef const& cluster);
00027   
00028   virtual SiStripRecHit2D * clone() const {return new SiStripRecHit2D( * this); }
00029   
00030   ClusterRegionalRef const&  cluster_regional()  const { return clusterRegional_;}
00031 
00032   ClusterRef const&  cluster()  const { return cluster_;}
00033 
00034   void setClusterRef(ClusterRef const & ref) { cluster_ = ref; }
00035   void setClusterRegionalRef(ClusterRegionalRef const & ref) { clusterRegional_ = ref; }
00036   
00037   virtual bool sharesInput( const TrackingRecHit* other, SharedInputType what) const;
00038   
00039   double sigmaPitch() const { return sigmaPitch_;}
00040   void setSigmaPitch(double sigmap) const { sigmaPitch_=sigmap;}
00041 
00042  private:
00043 
00044   // DetSetVector ref
00045   ClusterRef cluster_;
00046 
00047 
00048   // SiStripRefGetter ref.
00049   ClusterRegionalRef clusterRegional_;
00050 
00052   mutable double sigmaPitch_;  // transient....
00053  
00054 };
00055 
00056 // Comparison operators
00057 inline bool operator<( const SiStripRecHit2D& one, const SiStripRecHit2D& other) {
00058   if ( one.geographicalId() < other.geographicalId() ) {
00059     return true;
00060   } else {
00061     return false;
00062   }
00063 }
00064 
00065 #endif