Go to the documentation of this file.00001 #ifndef HitQuadrupletGeneratorFromLayerPairForPhotonConversion_h
00002 #define HitQuadrupletGeneratorFromLayerPairForPhotonConversion_h
00003
00004 #include "RecoTracker/TkHitPairs/interface/HitPairGenerator.h"
00005 #include "RecoTracker/TkHitPairs/interface/CombinedHitPairGenerator.h"
00006 #include "RecoTracker/TkSeedingLayers/interface/SeedingLayer.h"
00007 #include "FWCore/Framework/interface/EventSetup.h"
00008
00009 #include "RecoTracker/ConversionSeedGenerators/interface/ConversionRegion.h"
00010
00011 class DetLayer;
00012 class TrackingRegion;
00013
00014 class HitQuadrupletGeneratorFromLayerPairForPhotonConversion : public HitPairGenerator {
00015
00016 public:
00017
00018 typedef CombinedHitPairGenerator::LayerCacheType LayerCacheType;
00019 typedef ctfseeding::SeedingLayer Layer;
00020
00021 HitQuadrupletGeneratorFromLayerPairForPhotonConversion(const Layer& inner,
00022 const Layer& outer,
00023 LayerCacheType* layerCache,
00024 unsigned int nSize=30000,
00025 unsigned int max=0);
00026
00027 virtual ~HitQuadrupletGeneratorFromLayerPairForPhotonConversion() { }
00028
00029 virtual void hitPairs( const TrackingRegion& reg, OrderedHitPairs & prs,
00030 const edm::Event & ev, const edm::EventSetup& es);
00031
00032 virtual HitQuadrupletGeneratorFromLayerPairForPhotonConversion* clone() const {
00033 return new HitQuadrupletGeneratorFromLayerPairForPhotonConversion(*this);
00034 }
00035
00036 const Layer & innerLayer() const { return theInnerLayer; }
00037 const Layer & outerLayer() const { return theOuterLayer; }
00038
00039 bool failCheckRZCompatibility(const RecHitsSortedInPhi::Hit & hit, const DetLayer& layer, const HitRZCompatibility *checkRZ, const TrackingRegion & region);
00040
00041
00042 bool failCheckSlopeTest(const RecHitsSortedInPhi::Hit & ohit, const RecHitsSortedInPhi::Hit & nohit, const RecHitsSortedInPhi::Hit & ihit, const RecHitsSortedInPhi::Hit & nihit, const TrackingRegion & region);
00043 void bubbleSortVsR(int n, double* ax, double* ay, double* aey);
00044 bool failCheckSegmentZCompatibility(double &rInn, double &zInnMin, double &zInnMax,
00045 double &rInt, double &zIntMin, double &zIntMax,
00046 double &rOut, double &zOutMin, double &zOutMax);
00047 double getZAtR(double &rInn, double &zInn, double &r, double &rOut, double &zOut);
00048 double verySimpleFit(int size, double* ax, double* ay, double* e2y, double& p0, double& e2p0, double& p1);
00049 double getSqrEffectiveErrorOnZ(const RecHitsSortedInPhi::Hit & hit, const TrackingRegion & region);
00050 double getEffectiveErrorOnZ(const RecHitsSortedInPhi::Hit & hit, const TrackingRegion & region);
00051
00052 private:
00053
00054 LayerCacheType & theLayerCache;
00055 Layer theOuterLayer;
00056 Layer theInnerLayer;
00057
00058 std::stringstream *ss;
00059
00060 };
00061
00062 #endif