Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-10-01 22:41:00

0001 #ifndef HitPairGeneratorFromLayerPairForPhotonConversion_h
0002 #define HitPairGeneratorFromLayerPairForPhotonConversion_h
0003 
0004 #include "RecoTracker/TkHitPairs/interface/HitPairGenerator.h"
0005 #include "RecoTracker/TkHitPairs/interface/LayerHitMapCache.h"
0006 #include "FWCore/Framework/interface/ConsumesCollector.h"
0007 #include "FWCore/Framework/interface/EventSetup.h"
0008 #include "FWCore/Utilities/interface/Visibility.h"
0009 
0010 #include "ConversionRegion.h"
0011 
0012 class DetLayer;
0013 class IdealMagneticFieldRecord;
0014 class MagneticField;
0015 class TrackingRegion;
0016 
0017 class dso_hidden HitPairGeneratorFromLayerPairForPhotonConversion {  // : public HitPairGenerator {
0018 
0019 public:
0020   typedef LayerHitMapCache LayerCacheType;
0021   typedef SeedingLayerSetsHits::SeedingLayerSet Layers;
0022   typedef SeedingLayerSetsHits::SeedingLayer Layer;
0023 
0024   HitPairGeneratorFromLayerPairForPhotonConversion(edm::ConsumesCollector iC,
0025                                                    unsigned int inner,
0026                                                    unsigned int outer,
0027                                                    LayerCacheType* layerCache,
0028                                                    unsigned int nSize = 30000,
0029                                                    unsigned int max = 0);
0030 
0031   //  virtual ~HitPairGeneratorFromLayerPairForPhotonConversion() { }
0032 
0033   void hitPairs(const ConversionRegion& convRegion,
0034                 const TrackingRegion& reg,
0035                 OrderedHitPairs& prs,
0036                 const Layers& layers,
0037                 const edm::Event& ev,
0038                 const edm::EventSetup& es);
0039 
0040   float getLayerRadius(const DetLayer& layer);
0041   float getLayerZ(const DetLayer& layer);
0042 
0043   bool checkBoundaries(const DetLayer& layer, const ConversionRegion& convRegion, float maxSearchR, float maxSearchZ);
0044   bool getPhiRange(float& Phimin,
0045                    float& Phimax,
0046                    const DetLayer& layer,
0047                    const ConversionRegion& convRegion,
0048                    const MagneticField& field);
0049   bool getPhiRange(float& Phimin,
0050                    float& Phimax,
0051                    const float& layerR,
0052                    const ConversionRegion& convRegion,
0053                    const MagneticField& field);
0054   bool checkRZCompatibilityWithSeedTrack(const RecHitsSortedInPhi::Hit& hit,
0055                                          const DetLayer& layer,
0056                                          const ConversionRegion& convRegion);
0057 
0058 private:
0059   double getCot(double dz, double dr);
0060 
0061   LayerCacheType& theLayerCache;
0062   const unsigned int theOuterLayer;
0063   const unsigned int theInnerLayer;
0064   const unsigned int theMaxElement;
0065   const edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> theFieldToken;
0066 
0067   std::stringstream ss;
0068 };
0069 
0070 #endif