Go to the documentation of this file.00001 #ifndef PFElecTkProducer_H
00002 #define PFElecTkProducer_H
00003
00004 #include "FWCore/Framework/interface/EDProducer.h"
00005 #include "FWCore/Framework/interface/Event.h"
00006 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00007 #include "FWCore/Framework/interface/MakerMacros.h"
00008 #include "FWCore/Framework/interface/Frameworkfwd.h"
00009 #include "DataFormats/ParticleFlowReco/interface/GsfPFRecTrackFwd.h"
00010 #include "DataFormats/ParticleFlowReco/interface/GsfPFRecTrack.h"
00011 #include "DataFormats/ParticleFlowReco/interface/PFRecTrack.h"
00012 #include "DataFormats/GsfTrackReco/interface/GsfTrack.h"
00013 #include "TrackingTools/GsfTools/interface/MultiTrajectoryStateMode.h"
00014 #include "TrackingTools/GsfTools/interface/MultiTrajectoryStateTransform.h"
00015 #include "DataFormats/EgammaReco/interface/ElectronSeed.h"
00016 #include "DataFormats/ParticleFlowReco/interface/PFCluster.h"
00017 #include "DataFormats/ParticleFlowReco/interface/PFClusterFwd.h"
00018
00019 class PFTrackTransformer;
00020 class GsfTrack;
00021 class MagneticField;
00022 class TrackerGeometry;
00023 class ConvBremPFTrackFinder;
00024
00026
00035 class PFElecTkProducer : public edm::EDProducer {
00036 public:
00037
00039 explicit PFElecTkProducer(const edm::ParameterSet&);
00040
00042 ~PFElecTkProducer();
00043
00044 private:
00045 virtual void beginRun(edm::Run&,const edm::EventSetup&) ;
00046 virtual void endRun() ;
00047
00049 virtual void produce(edm::Event&, const edm::EventSetup&);
00050
00051
00052 int FindPfRef(const reco::PFRecTrackCollection & PfRTkColl,
00053 reco::GsfTrack, bool);
00054
00055 bool isFifthStep(reco::PFRecTrackRef pfKfTrack);
00056
00057 bool applySelection(reco::GsfTrack);
00058
00059 bool resolveGsfTracks(const std::vector<reco::GsfPFRecTrack> &GsfPFVec,
00060 unsigned int ngsf,
00061 std::vector<unsigned int> &secondaries,
00062 const reco::PFClusterCollection & theEClus);
00063
00064 float minTangDist(const reco::GsfPFRecTrack& primGsf,
00065 const reco::GsfPFRecTrack& secGsf);
00066
00067 bool isSameEgSC(const reco::ElectronSeedRef& nSeedRef,
00068 const reco::ElectronSeedRef& iSeedRef,
00069 bool& bothGsfEcalDriven,
00070 float& SCEnergy);
00071
00072 bool isSharingEcalEnergyWithEgSC(const reco::GsfPFRecTrack& nGsfPFRecTrack,
00073 const reco::GsfPFRecTrack& iGsfPFRecTrack,
00074 const reco::ElectronSeedRef& nSeedRef,
00075 const reco::ElectronSeedRef& iSeedRef,
00076 const reco::PFClusterCollection& theEClus,
00077 bool& bothGsfTrackerDriven,
00078 bool& nEcalDriven,
00079 bool& iEcalDriven,
00080 float& nEnergy,
00081 float& iEnergy);
00082
00083 bool isInnerMost(const reco::GsfTrackRef& nGsfTrack,
00084 const reco::GsfTrackRef& iGsfTrack,
00085 bool& sameLayer);
00086
00087 bool isInnerMostWithLostHits(const reco::GsfTrackRef& nGsfTrack,
00088 const reco::GsfTrackRef& iGsfTrack,
00089 bool& sameLayer);
00090
00091 void createGsfPFRecTrackRef(const edm::OrphanHandle<reco::GsfPFRecTrackCollection>& gsfPfHandle,
00092 std::vector<reco::GsfPFRecTrack>& gsfPFRecTrackPrimary,
00093 const std::map<unsigned int, std::vector<reco::GsfPFRecTrack> >& MapPrimSec);
00094
00095
00096 reco::GsfPFRecTrack pftrack_;
00097 reco::GsfPFRecTrack secpftrack_;
00098 edm::ParameterSet conf_;
00099 edm::InputTag gsfTrackLabel_;
00100 edm::InputTag pfTrackLabel_;
00101 edm::InputTag primVtxLabel_;
00102 edm::InputTag pfEcalClusters_;
00103 edm::InputTag pfNuclear_;
00104 edm::InputTag pfConv_;
00105 edm::InputTag pfV0_;
00106 bool useNuclear_;
00107 bool useConversions_;
00108 bool useV0_;
00109 bool applyAngularGsfClean_;
00110 double detaCutGsfClean_;
00111 double dphiCutGsfClean_;
00112
00114 PFTrackTransformer *pfTransformer_;
00115 const MultiTrajectoryStateMode *mtsMode_;
00116 MultiTrajectoryStateTransform mtsTransform_;
00117 ConvBremPFTrackFinder *convBremFinder_;
00118
00119
00121 bool trajinev_;
00122 bool modemomentum_;
00123 bool applySel_;
00124 bool applyGsfClean_;
00125 bool useFifthStep_;
00126 bool useFifthStepForEcalDriven_;
00127 bool useFifthStepForTrackDriven_;
00128
00129 bool debugGsfCleaning_;
00130 double SCEne_;
00131 double detaGsfSC_;
00132 double dphiGsfSC_;
00133 double maxPtConvReco_;
00134
00136 bool useConvBremFinder_;
00137 double mvaConvBremFinderID_;
00138 std::string path_mvaWeightFileConvBrem_;
00139 };
00140 #endif