00001 #ifndef PFConversionsProducer_H
00002 #define PFConversionsProducer_H
00003 #include "FWCore/Framework/interface/EDProducer.h"
00004 #include "DataFormats/EgammaCandidates/interface/Conversion.h"
00005 #include "DataFormats/EgammaCandidates/interface/ConversionFwd.h"
00006 #include "DataFormats/ParticleFlowReco/interface/PFConversion.h"
00007 #include "DataFormats/ParticleFlowReco/interface/PFConversionFwd.h"
00008
00009
00010 #include <map>
00011 #include <vector>
00012
00013 class PFTrackTransformer;
00014
00015 class PFConversionsProducer : public edm::EDProducer
00016 {
00017
00018 public:
00019
00020
00021 explicit PFConversionsProducer( const edm::ParameterSet& ) ;
00022 virtual ~PFConversionsProducer();
00023
00024 virtual void produce(edm::Event&, const edm::EventSetup&);
00025
00026 virtual void beginJob(const edm::EventSetup & c);
00027
00028 virtual void endJob ();
00029
00030 bool isNotUsed(reco::ConversionRef newPf,reco::PFConversionCollection PFC);
00031
00032 bool SameTrack(reco::TrackRef t1, reco::TrackRef t2);
00033 private:
00034
00035 void fillPFConversions ( reco::ConversionRef& ,
00036 const edm::Handle<reco::TrackCollection> & outInTrkHandle,
00037 const edm::Handle<reco::TrackCollection> & inOutTrkHandle,
00038 const edm::Handle<std::vector<Trajectory> > & outInTrajectoryHandle,
00039 const edm::Handle<std::vector<Trajectory> > & inOutTrajectoryHandle,
00040 int ipfTk,
00041 reco::PFRecTrackRefProd& tkRefProd,
00042 reco::PFConversionCollection& pfconv,
00043 reco::PFRecTrackCollection& pfrectrack );
00044
00045
00046 int nEvt_;
00047 std::string conversionCollectionProducer_;
00048 std::string conversionCollection_;
00049
00050 std::string PFConversionCollection_;
00051 std::string PFConversionRecTracks_;
00052
00053 std::vector< edm::InputTag > OtherConvLabels_;
00054 std::vector< edm::InputTag > OtherOutInLabels_;
00055 std::vector< edm::InputTag > OtherInOutLabels_;
00056
00058 PFTrackTransformer *pfTransformer_;
00059
00060 bool debug_;
00061
00062 };
00063
00064 #endif