00001 #include "SeedCombiner.h" 00002 00003 #include "FWCore/Framework/interface/Event.h" 00004 #include "FWCore/Framework/interface/EventSetup.h" 00005 #include "DataFormats/Common/interface/Handle.h" 00006 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00007 00008 #include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h" 00009 00010 #include "RecoTracker/TkTrackingRegions/interface/TrackingRegionProducerFactory.h" 00011 #include "RecoTracker/TkTrackingRegions/interface/TrackingRegionProducer.h" 00012 #include "RecoTracker/TkTrackingRegions/interface/TrackingRegion.h" 00013 00014 #include "RecoTracker/TkTrackingRegions/interface/OrderedHitsGeneratorFactory.h" 00015 #include "RecoTracker/TkTrackingRegions/interface/OrderedHitsGenerator.h" 00016 00017 #include "RecoTracker/TkSeedingLayers/interface/SeedComparitorFactory.h" 00018 #include "RecoTracker/TkSeedingLayers/interface/SeedComparitor.h" 00019 #include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h" 00020 00021 #include "RecoTracker/TkSeedGenerator/interface/SeedGeneratorFromRegionHits.h" 00022 00023 using namespace edm; 00024 //using namespace reco; 00025 00026 SeedCombiner::SeedCombiner( 00027 const edm::ParameterSet& cfg) 00028 : 00029 seedPairCollectionName_(cfg.getParameter<InputTag>("PairCollection")), 00030 seedTripletCollectionName_(cfg.getParameter<InputTag>("TripletCollection")) 00031 { 00032 produces<TrajectorySeedCollection>(); 00033 } 00034 00035 00036 SeedCombiner::~SeedCombiner() 00037 { 00038 } 00039 00040 00041 void SeedCombiner::beginJob(const edm::EventSetup& es) 00042 { 00043 } 00044 00045 void SeedCombiner::produce(edm::Event& ev, const edm::EventSetup& es) 00046 { 00047 std::auto_ptr<TrajectorySeedCollection> result(new TrajectorySeedCollection()); 00048 00049 Handle<TrajectorySeedCollection > seedPairList; 00050 Handle<TrajectorySeedCollection > seedTripletList; 00051 00052 ev.getByLabel(seedPairCollectionName_,seedPairList); 00053 ev.getByLabel(seedTripletCollectionName_,seedTripletList); 00054 00055 //std::cout << "=== collection triplets: " << seedTripletList->size() << std::endl; 00056 //std::cout << "=== collection pairs: " << seedPairList->size() << std::endl; 00057 00058 result->reserve( seedTripletList->size() + seedPairList->size() ); 00059 result->insert(result->end(), seedTripletList->begin(), seedTripletList->end() ); 00060 result->insert(result->end(), seedPairList->begin() , seedPairList->end() ); 00061 00062 ev.put(result); 00063 }