CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/RecoTracker/ConversionSeedGenerators/interface/HitPairGeneratorFromLayerPairForPhotonConversion.h

Go to the documentation of this file.
00001 #ifndef HitPairGeneratorFromLayerPairForPhotonConversion_h
00002 #define HitPairGeneratorFromLayerPairForPhotonConversion_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 HitPairGeneratorFromLayerPairForPhotonConversion : public HitPairGenerator {
00015 
00016 public:
00017 
00018   typedef CombinedHitPairGenerator::LayerCacheType       LayerCacheType;
00019   typedef ctfseeding::SeedingLayer Layer;
00020  
00021   HitPairGeneratorFromLayerPairForPhotonConversion(const Layer& inner,
00022                                 const Layer& outer,
00023                                 LayerCacheType* layerCache,
00024                                 unsigned int nSize=30000,
00025                                 unsigned int max=0);
00026 
00027   virtual ~HitPairGeneratorFromLayerPairForPhotonConversion() { }
00028 
00029   void hitPairs( const ConversionRegion& convRegion, const TrackingRegion& reg, OrderedHitPairs & prs, 
00030                          const edm::Event & ev,  const edm::EventSetup& es);
00031 
00032   virtual void hitPairs( const TrackingRegion& reg, OrderedHitPairs & prs, 
00033                          const edm::Event & ev,  const edm::EventSetup& es){};
00034 
00035   virtual HitPairGeneratorFromLayerPairForPhotonConversion* clone() const {
00036     return new HitPairGeneratorFromLayerPairForPhotonConversion(*this);
00037   }
00038 
00039   const Layer & innerLayer() const { return theInnerLayer; }
00040   const Layer & outerLayer() const { return theOuterLayer; }
00041 
00042   float getLayerRadius(const DetLayer& layer);
00043   float getLayerZ(const DetLayer& layer);
00044 
00045   bool checkBoundaries(const DetLayer& layer,const ConversionRegion& convRegion,float maxSearchR, float maxSearchZ);
00046   bool getPhiRange(float& Phimin, float& Phimax,const DetLayer& layer, const ConversionRegion &convRegion, const edm::EventSetup& es);
00047   bool getPhiRange(float& Phimin, float& Phimax, const float& layerR, const ConversionRegion &convRegion, const edm::EventSetup& es);
00048   bool checkRZCompatibilityWithSeedTrack(const RecHitsSortedInPhi::Hit & hit, const DetLayer& layer, const ConversionRegion& convRegion);
00049 
00050 
00051 private:
00052   
00053   double getCot(double dz, double dr);
00054   
00055   LayerCacheType & theLayerCache;
00056   Layer theOuterLayer;  
00057   Layer theInnerLayer; 
00058 
00059   std::stringstream *ss;
00060 
00061 };
00062 
00063 #endif