Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-07 04:37:42

0001 //---------------------------------------------------------------------------
0002 // class VectorHitBuilderAlgorithm
0003 // author: ebrondol,nathera
0004 // date: May, 2015
0005 //---------------------------------------------------------------------------
0006 
0007 #ifndef RecoLocalTracker_SiPhase2VectorHitBuilder_VectorHitBuilderAlgorithm_H
0008 #define RecoLocalTracker_SiPhase2VectorHitBuilder_VectorHitBuilderAlgorithm_H
0009 
0010 #include "RecoLocalTracker/SiPhase2VectorHitBuilder/interface/VectorHitBuilderAlgorithmBase.h"
0011 #include "DataFormats/TrackerRecHit2D/interface/VectorHit.h"
0012 #include "CommonTools/Statistics/interface/LinearFit.h"
0013 
0014 #include "DataFormats/Common/interface/DetSetVector.h"
0015 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0016 
0017 class VectorHitBuilderAlgorithm : public VectorHitBuilderAlgorithmBase {
0018 public:
0019   VectorHitBuilderAlgorithm(const edm::ParameterSet& conf,
0020                             const TrackerGeometry* tkGeomProd,
0021                             const TrackerTopology* tkTopoProd,
0022                             const ClusterParameterEstimator<Phase2TrackerCluster1D>* cpeProd)
0023       : VectorHitBuilderAlgorithmBase(conf, tkGeomProd, tkTopoProd, cpeProd) {}
0024   ~VectorHitBuilderAlgorithm() override = default;
0025 
0026   void run(edm::Handle<edmNew::DetSetVector<Phase2TrackerCluster1D>> clusters,
0027            VectorHitCollection& vhAcc,
0028            VectorHitCollection& vhRej,
0029            edmNew::DetSetVector<Phase2TrackerCluster1D>& clustersAcc,
0030            edmNew::DetSetVector<Phase2TrackerCluster1D>& clustersRej) const override;
0031 
0032   //not implemented yet
0033   bool checkClustersCompatibilityBeforeBuilding(edm::Handle<edmNew::DetSetVector<Phase2TrackerCluster1D>> clusters,
0034                                                 const Detset& theLowerDetSet,
0035                                                 const Detset& theUpperDetSet) const;
0036   bool checkClustersCompatibility(Local3DPoint& posinner,
0037                                   Local3DPoint& posouter,
0038                                   LocalError& errinner,
0039                                   LocalError& errouter) const;
0040   struct CurvatureAndPhi {
0041     float curvature;
0042     float curvatureError;
0043     float phi;
0044   };
0045   CurvatureAndPhi curvatureANDphi(Global3DPoint gPositionLower,
0046                                   Global3DPoint gPositionUpper,
0047                                   GlobalError gErrorLower,
0048                                   GlobalError gErrorUpper) const;
0049 
0050   void buildVectorHits(VectorHitCollection& vhAcc,
0051                        VectorHitCollection& vhRej,
0052                        DetId detIdStack,
0053                        const StackGeomDet* stack,
0054                        edm::Handle<edmNew::DetSetVector<Phase2TrackerCluster1D>> clusters,
0055                        const Detset& DSVinner,
0056                        const Detset& DSVouter,
0057                        const std::vector<bool>& phase2OTClustersToSkip = std::vector<bool>()) const override;
0058 
0059   VectorHit buildVectorHit(const StackGeomDet* stack,
0060                            Phase2TrackerCluster1DRef lower,
0061                            Phase2TrackerCluster1DRef upper) const override;
0062 
0063   void fit2Dzx(const Local3DPoint lpCI,
0064                const Local3DPoint lpCO,
0065                const LocalError leCI,
0066                const LocalError leCO,
0067                Local3DPoint& pos,
0068                Local3DVector& dir,
0069                AlgebraicSymMatrix22& covMatrix,
0070                double& chi2) const;
0071   void fit2Dzy(const Local3DPoint lpCI,
0072                const Local3DPoint lpCO,
0073                const LocalError leCI,
0074                const LocalError leCO,
0075                Local3DPoint& pos,
0076                Local3DVector& dir,
0077                AlgebraicSymMatrix22& covMatrix,
0078                double& chi2) const;
0079 
0080   void fit(float x[2],
0081            float y[2],
0082            float sigy[2],
0083            Local3DPoint& pos,
0084            Local3DVector& dir,
0085            AlgebraicSymMatrix22& covMatrix,
0086            double& chi2) const;
0087 };
0088 
0089 #endif