Go to the documentation of this file.00001 #ifndef CombinedHitPairGeneratorForPhotonConversion_H
00002 #define CombinedHitPairGeneratorForPhotonConversion_H
00003
00004 #include <vector>
00005 #include "RecoTracker/TkHitPairs/interface/HitPairGenerator.h"
00006 #include "RecoTracker/TkHitPairs/interface/LayerHitMapCache.h"
00007 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00008
00009
00010 class TrackingRegion;
00011 class OrderedHitPairs;
00012 class HitPairGeneratorFromLayerPairForPhotonConversion;
00013 namespace ctfseeding { class SeedingLayer;}
00014 namespace edm { class Event; class EventSetup; }
00015
00016 #include "FWCore/Framework/interface/ESWatcher.h"
00017 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
00018 #include "RecoTracker/TkSeedingLayers/interface/SeedingLayerSets.h"
00019
00020 #include "RecoTracker/ConversionSeedGenerators/interface/ConversionRegion.h"
00021
00026 class CombinedHitPairGeneratorForPhotonConversion : public HitPairGenerator {
00027 public:
00028 typedef LayerHitMapCache LayerCacheType;
00029
00030 public:
00031 CombinedHitPairGeneratorForPhotonConversion(const edm::ParameterSet & cfg);
00032 virtual ~CombinedHitPairGeneratorForPhotonConversion();
00033
00034 void add(const ctfseeding::SeedingLayer & inner,
00035 const ctfseeding::SeedingLayer & outer);
00036
00038 virtual void hitPairs(const TrackingRegion&, OrderedHitPairs&, const edm::Event&, const edm::EventSetup&){};
00039
00041 virtual CombinedHitPairGeneratorForPhotonConversion * clone() const
00042 { return new CombinedHitPairGeneratorForPhotonConversion(theConfig); }
00043
00044
00045 const OrderedHitPairs & run(
00046 const ConversionRegion& convRegion,
00047 const TrackingRegion& region, const edm::Event & ev, const edm::EventSetup& es);
00048
00049 void hitPairs( const ConversionRegion& convRegion, const TrackingRegion& reg,
00050 OrderedHitPairs & result, const edm::Event& ev, const edm::EventSetup& es);
00051
00052
00053 void clearLayerCache(){theLayerCache.clear();}
00054
00055
00056 private:
00057 CombinedHitPairGeneratorForPhotonConversion(const CombinedHitPairGeneratorForPhotonConversion & cb);
00058 void init(const ctfseeding::SeedingLayerSets & layerSets);
00059 void init(const edm::ParameterSet & cfg, const edm::EventSetup& es);
00060 void cleanup();
00061
00062
00063 mutable bool initialised;
00064 edm::ParameterSet theConfig;
00065 uint32_t maxHitPairsPerTrackAndGenerator;
00066
00067 LayerCacheType theLayerCache;
00068
00069 edm::ESWatcher<TrackerDigiGeometryRecord> theESWatcher;
00070
00071 typedef std::vector<HitPairGeneratorFromLayerPairForPhotonConversion *> Container;
00072 Container theGenerators;
00073
00074 OrderedHitPairs thePairs;
00075
00076 };
00077 #endif