Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:28:01

0001 #ifndef HitQuadrupletGeneratorFromLayerPairForPhotonConversion_h
0002 #define HitQuadrupletGeneratorFromLayerPairForPhotonConversion_h
0003 
0004 #include "RecoTracker/TkHitPairs/interface/OrderedHitPairs.h"
0005 #include "RecoTracker/TkHitPairs/interface/LayerHitMapCache.h"
0006 #include "FWCore/Framework/interface/EventSetup.h"
0007 
0008 #include "ConversionRegion.h"
0009 
0010 class DetLayer;
0011 class TrackingRegion;
0012 
0013 class HitQuadrupletGeneratorFromLayerPairForPhotonConversion {
0014 public:
0015   typedef LayerHitMapCache LayerCacheType;
0016   typedef SeedingLayerSetsHits::SeedingLayerSet Layers;
0017   typedef SeedingLayerSetsHits::SeedingLayer Layer;
0018 
0019   HitQuadrupletGeneratorFromLayerPairForPhotonConversion(unsigned int inner,
0020                                                          unsigned int outer,
0021                                                          LayerCacheType *layerCache,
0022                                                          unsigned int max = 0);
0023 
0024   ~HitQuadrupletGeneratorFromLayerPairForPhotonConversion() {}
0025 
0026   void hitPairs(const TrackingRegion &reg, OrderedHitPairs &prs, const Layers &layers);
0027 
0028   bool failCheckRZCompatibility(const RecHitsSortedInPhi::Hit &hit,
0029                                 const DetLayer &layer,
0030                                 const HitRZCompatibility *checkRZ,
0031                                 const TrackingRegion &region);
0032   //void checkPhiRange(double phi1, double phi2);
0033 
0034   bool failCheckSlopeTest(const RecHitsSortedInPhi::Hit &ohit,
0035                           const RecHitsSortedInPhi::Hit &nohit,
0036                           const RecHitsSortedInPhi::Hit &ihit,
0037                           const RecHitsSortedInPhi::Hit &nihit,
0038                           const TrackingRegion &region);
0039   void bubbleSortVsR(int n, double *ax, double *ay, double *aey);
0040   bool failCheckSegmentZCompatibility(double &rInn,
0041                                       double &zInnMin,
0042                                       double &zInnMax,
0043                                       double &rInt,
0044                                       double &zIntMin,
0045                                       double &zIntMax,
0046                                       double &rOut,
0047                                       double &zOutMin,
0048                                       double &zOutMax);
0049   double getZAtR(double &rInn, double &zInn, double &r, double &rOut, double &zOut);
0050   double verySimpleFit(int size, double *ax, double *ay, double *e2y, double &p0, double &e2p0, double &p1);
0051   double getSqrEffectiveErrorOnZ(const RecHitsSortedInPhi::Hit &hit, const TrackingRegion &region);
0052   double getEffectiveErrorOnZ(const RecHitsSortedInPhi::Hit &hit, const TrackingRegion &region);
0053 
0054 private:
0055   LayerCacheType &theLayerCache;
0056   const unsigned int theOuterLayer;
0057   const unsigned int theInnerLayer;
0058   const unsigned int theMaxElement;
0059 
0060   std::stringstream *ss;
0061 };
0062 
0063 #endif