Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:25:01

0001 #ifndef RecoLocalTracker_SiPhase2VectorHitBuilder_VectorHitBuilderAlgorithmBase_H
0002 #define RecoLocalTracker_SiPhase2VectorHitBuilder_VectorHitBuilderAlgorithmBase_H
0003 
0004 #include "FWCore/Framework/interface/ESHandle.h"
0005 #include "DataFormats/Common/interface/Handle.h"
0006 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0007 #include "DataFormats/Common/interface/DetSetVector.h"
0008 #include "DataFormats/Common/interface/DetSetVectorNew.h"
0009 #include "DataFormats/Phase2TrackerCluster/interface/Phase2TrackerCluster1D.h"
0010 #include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
0011 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0012 #include "Geometry/CommonDetUnit/interface/StackGeomDet.h"
0013 #include "RecoLocalTracker/Phase2TrackerRecHits/interface/Phase2StripCPE.h"
0014 #include "DataFormats/TrackerRecHit2D/interface/VectorHit.h"
0015 #include "Geometry/CommonDetUnit/interface/PixelGeomDetUnit.h"
0016 #include "FWCore/Framework/interface/FrameworkfwdMostUsed.h"
0017 
0018 class VectorHitBuilderAlgorithmBase {
0019 public:
0020   typedef edm::Ref<edmNew::DetSetVector<Phase2TrackerCluster1D>, Phase2TrackerCluster1D> Phase2TrackerCluster1DRef;
0021   typedef edmNew::DetSet<Phase2TrackerCluster1D> Detset;
0022   typedef Detset::const_iterator const_iterator;
0023   typedef edmNew::DetSetVector<VectorHit> output_t;
0024   typedef std::pair<StackGeomDet, std::vector<Phase2TrackerCluster1D>> StackClusters;
0025 
0026   VectorHitBuilderAlgorithmBase(const edm::ParameterSet&,
0027                                 const TrackerGeometry*,
0028                                 const TrackerTopology*,
0029                                 const ClusterParameterEstimator<Phase2TrackerCluster1D>*);
0030   virtual ~VectorHitBuilderAlgorithmBase() {}
0031 
0032   //FIXME::ERICA::this should be template, return different collection for different algo used!!
0033   virtual void run(edm::Handle<edmNew::DetSetVector<Phase2TrackerCluster1D>> clusters,
0034                    VectorHitCollection& vhAcc,
0035                    VectorHitCollection& vhRej,
0036                    edmNew::DetSetVector<Phase2TrackerCluster1D>& clustersAcc,
0037                    edmNew::DetSetVector<Phase2TrackerCluster1D>& clustersRej) const = 0;
0038 
0039   virtual void buildVectorHits(VectorHitCollection& vhAcc,
0040                                VectorHitCollection& vhRej,
0041                                DetId detIdStack,
0042                                const StackGeomDet* stack,
0043                                edm::Handle<edmNew::DetSetVector<Phase2TrackerCluster1D>> clusters,
0044                                const Detset& DSVinner,
0045                                const Detset& DSVouter,
0046                                const std::vector<bool>& phase2OTClustersToSkip = std::vector<bool>()) const = 0;
0047 
0048   virtual VectorHit buildVectorHit(const StackGeomDet* stack,
0049                                    Phase2TrackerCluster1DRef lower,
0050                                    Phase2TrackerCluster1DRef upper) const = 0;
0051 
0052   double computeParallaxCorrection(const PixelGeomDetUnit*,
0053                                    const Point3DBase<float, LocalTag>&,
0054                                    const PixelGeomDetUnit*,
0055                                    const Point3DBase<float, LocalTag>&) const;
0056 
0057   void printClusters(const edmNew::DetSetVector<Phase2TrackerCluster1D>& clusters) const;
0058   void printCluster(const GeomDet* geomDetUnit, const Phase2TrackerCluster1D* cluster) const;
0059 
0060   const TrackerGeometry* tkGeom_;
0061   const TrackerTopology* tkTopo_;
0062   const ClusterParameterEstimator<Phase2TrackerCluster1D>* cpe_;
0063   unsigned int nMaxVHforeachStack_;
0064   std::vector<double> barrelCut_;
0065   std::vector<double> endcapCut_;
0066 
0067 private:
0068   edm::ESInputTag cpeTag_;
0069 };
0070 
0071 #endif