** Warning **

Issuing rollback() due to DESTROY without explicit disconnect() of DBD::mysql::db handle dbname=lxr at /lxr/lib/LXR/Common.pm line 1103.

Last-Modified: Fri, 18 Aug 2022 23:54:11 GMT Content-Type: text/html; charset=utf-8 /CMSSW_12_5_X_2022-08-18-2300/RecoTracker/TkHitPairs/interface/HitPairGeneratorFromLayerPair.h
Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef HitPairGeneratorFromLayerPair_h
0002 #define HitPairGeneratorFromLayerPair_h
0003 
0004 #include "FWCore/Framework/interface/ConsumesCollector.h"
0005 #include "RecoTracker/TkHitPairs/interface/OrderedHitPairs.h"
0006 #include "RecoTracker/TkHitPairs/interface/LayerHitMapCache.h"
0007 #include "TrackingTools/TransientTrackingRecHit/interface/SeedingLayerSetsHits.h"
0008 
0009 class DetLayer;
0010 class IdealMagneticFieldRecord;
0011 class MagneticField;
0012 class MultipleScatteringParametrisationMaker;
0013 class TrackerMultipleScatteringRecord;
0014 class TrackingRegion;
0015 
0016 class HitPairGeneratorFromLayerPair {
0017 public:
0018   typedef LayerHitMapCache LayerCacheType;
0019   typedef SeedingLayerSetsHits::SeedingLayerSet Layers;
0020   typedef SeedingLayerSetsHits::SeedingLayer Layer;
0021 
0022   HitPairGeneratorFromLayerPair(edm::ConsumesCollector iC,
0023                                 unsigned int inner,
0024                                 unsigned int outer,
0025                                 LayerCacheType* layerCache,
0026                                 unsigned int max = 0);
0027 
0028   ~HitPairGeneratorFromLayerPair();
0029 
0030   HitDoublets doublets(const TrackingRegion& reg, const edm::Event& ev, const edm::EventSetup& es, Layers layers) {
0031     assert(theLayerCache);
0032     return doublets(reg, ev, es, layers, *theLayerCache);
0033   }
0034   HitDoublets doublets(const TrackingRegion& reg,
0035                        const edm::Event& ev,
0036                        const edm::EventSetup& es,
0037                        const Layer& innerLayer,
0038                        const Layer& outerLayer) {
0039     assert(theLayerCache);
0040     return doublets(reg, ev, es, innerLayer, outerLayer, *theLayerCache);
0041   }
0042   HitDoublets doublets(const TrackingRegion& reg,
0043                        const edm::Event& ev,
0044                        const edm::EventSetup& es,
0045                        Layers layers,
0046                        LayerCacheType& layerCache) {
0047     Layer innerLayerObj = innerLayer(layers);
0048     Layer outerLayerObj = outerLayer(layers);
0049     return doublets(reg, ev, es, innerLayerObj, outerLayerObj, layerCache);
0050   }
0051   HitDoublets doublets(const TrackingRegion& reg,
0052                        const edm::Event& ev,
0053                        const edm::EventSetup& es,
0054                        const Layer& innerLayer,
0055                        const Layer& outerLayer,
0056                        LayerCacheType& layerCache);
0057 
0058   void hitPairs(
0059       const TrackingRegion& reg, OrderedHitPairs& prs, const edm::Event& ev, const edm::EventSetup& es, Layers layers);
0060   static void doublets(const TrackingRegion& region,
0061                        const DetLayer& innerHitDetLayer,
0062                        const DetLayer& outerHitDetLayer,
0063                        const RecHitsSortedInPhi& innerHitsMap,
0064                        const RecHitsSortedInPhi& outerHitsMap,
0065                        const MagneticField& field,
0066                        const MultipleScatteringParametrisationMaker& msmaker,
0067                        const unsigned int theMaxElement,
0068                        HitDoublets& result);
0069 
0070   Layer innerLayer(const Layers& layers) const { return layers[theInnerLayer]; }
0071   Layer outerLayer(const Layers& layers) const { return layers[theOuterLayer]; }
0072 
0073 private:
0074   LayerCacheType* theLayerCache;
0075   const edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> theFieldToken;
0076   const edm::ESGetToken<MultipleScatteringParametrisationMaker, TrackerMultipleScatteringRecord> theMSMakerToken;
0077   const unsigned int theOuterLayer;
0078   const unsigned int theInnerLayer;
0079   const unsigned int theMaxElement;
0080 };
0081 
0082 #endif