Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-01-27 23:42:01

0001 #ifndef DATAFORMATS_TRACKERRECHIT2D_PHASE2TRACKERRECHIT1D_H
0002 #define DATAFORMATS_TRACKERRECHIT2D_PHASE2TRACKERRECHIT1D_H
0003 
0004 #include "DataFormats/Common/interface/DetSetVectorNew.h"
0005 
0006 #include "DataFormats/TrackerRecHit2D/interface/TrackerSingleRecHit.h"
0007 
0008 #include "TkCloner.h"
0009 
0010 class Phase2TrackerRecHit1D final : public TrackerSingleRecHit {
0011 public:
0012   typedef OmniClusterRef::Phase2Cluster1DRef ClusterRef;
0013 
0014   Phase2TrackerRecHit1D() {}
0015 
0016   ~Phase2TrackerRecHit1D() override {}
0017 
0018   Phase2TrackerRecHit1D(const LocalPoint& pos, const LocalError& err, GeomDet const& idet, ClusterRef const& clus)
0019       : TrackerSingleRecHit(pos, err, idet, clus) {}
0020 
0021   Phase2TrackerRecHit1D* clone() const override { return new Phase2TrackerRecHit1D(*this); }
0022   RecHitPointer cloneSH() const override { return std::make_shared<Phase2TrackerRecHit1D>(*this); }
0023 
0024   ClusterRef cluster() const { return cluster_phase2OT(); }
0025   void setClusterRef(ClusterRef const& ref) { setClusterPhase2Ref(ref); }
0026 
0027   bool isPhase2() const override { return true; }
0028   //FIXME::check dimension of this!!
0029   int dimension() const override { return 2; }
0030   void getKfComponents(KfComponentsHolder& holder) const override { getKfComponents2D(holder); }
0031 
0032   bool canImproveWithTrack() const override { return true; }
0033 
0034 private:
0035   // double dispatch
0036   Phase2TrackerRecHit1D* clone_(TkCloner const& cloner, TrajectoryStateOnSurface const& tsos) const override {
0037     return cloner(*this, tsos).release();
0038   }
0039   RecHitPointer cloneSH_(TkCloner const& cloner, TrajectoryStateOnSurface const& tsos) const override {
0040     return cloner.makeShared(*this, tsos);
0041   }
0042 };
0043 
0044 typedef edmNew::DetSetVector<Phase2TrackerRecHit1D> Phase2TrackerRecHit1DCollectionNew;
0045 
0046 #endif