CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2/src/DataFormats/TrackerRecHit2D/interface/SiTrackerGSRecHit2D.h

Go to the documentation of this file.
00001 #ifndef SiTrackerGSRecHit2D_H
00002 #define SiTrackerGSRecHit2D_H
00003 
00004 #include "DataFormats/TrackerRecHit2D/interface/GSSiTrackerRecHit2DLocalPos.h"
00005 #include "DataFormats/Common/interface/Ref.h"
00006 #include "FastSimDataFormats/External/interface/FastTrackerClusterCollection.h" 
00007 
00008 // typedef edm::Ref<FastTrackerClusterCollection, FastTrackerCluster > ClusterRef;
00009 // typedef edm::RefProd<FastTrackerClusterCollection> ClusterRefProd;
00010 
00011 class SiTrackerGSRecHit2D : public GSSiTrackerRecHit2DLocalPos{
00012   
00013 public:
00014   
00015  
00016   
00017   SiTrackerGSRecHit2D(): GSSiTrackerRecHit2DLocalPos(),
00018                          simhitId_(),
00019                          simtrackId_(),
00020                          eeId_(),
00021                          cluster_(),  
00022                          pixelMultiplicityAlpha_(), 
00023                          pixelMultiplicityBeta_() {}
00024   
00025   ~SiTrackerGSRecHit2D() {}
00026   
00027  typedef edm::Ref<FastTrackerClusterCollection, FastTrackerCluster > ClusterRef;
00028  typedef edm::RefProd<FastTrackerClusterCollection> ClusterRefProd;
00029 
00030 
00031   SiTrackerGSRecHit2D( const LocalPoint&, const LocalError&,
00032                        const DetId&,
00033                        const int simhitId,
00034                        const int simtrackId,
00035                        const uint32_t eeId,
00036                        ClusterRef const&  cluster,
00037                        const int pixelMultiplicityX,
00038                        const int pixelMultiplicityY);     
00039   
00040   virtual SiTrackerGSRecHit2D * clone() const {return new SiTrackerGSRecHit2D( * this); }
00041   
00042   const int& simhitId()    const { return simhitId_;}
00043   const int& simtrackId()  const { return simtrackId_;}
00044   const uint32_t& eeId()   const { return eeId_;}
00045   const int& simMultX()    const { return pixelMultiplicityAlpha_;}
00046   const int& simMultY()    const { return pixelMultiplicityBeta_;}
00047 
00048   ClusterRef const& cluster() const { return cluster_;}
00049   void setClusterRef(const ClusterRef &ref) { cluster_  = ref; }
00050   
00051   virtual bool sharesInput( const TrackingRecHit* other, SharedInputType what) const {return false;}
00052   
00053  private:
00054   
00055   int simhitId_;
00056   int simtrackId_;
00057   uint32_t eeId_;
00058   ClusterRef cluster_;
00059   int pixelMultiplicityAlpha_;
00060   int pixelMultiplicityBeta_;
00061   
00062 };
00063 
00064 // Comparison operators
00065 inline bool operator<( const SiTrackerGSRecHit2D& one, const SiTrackerGSRecHit2D& other) {
00066   if ( one.geographicalId() < other.geographicalId() ) {
00067     return true;
00068   } else {
00069     return false;
00070   }
00071 }
00072 
00073 #endif