CMS 3D CMS Logo

PFElecTkProducer.h
Go to the documentation of this file.
1 #ifndef PFElecTkProducer_H
2 #define PFElecTkProducer_H
6 
27 
29 
30 class PFTrackTransformer;
31 class GsfTrack;
32 class MagneticField;
33 class TrackerGeometry;
35 
37 
46 #include <unordered_map>
47 
48 
49 class PFElecTkProducer final : public edm::stream::EDProducer<edm::GlobalCache<convbremhelpers::HeavyObjectCache> > {
50  public:
51 
54 
55 
56  static std::unique_ptr<convbremhelpers::HeavyObjectCache>
58  return std::unique_ptr<convbremhelpers::HeavyObjectCache>(new convbremhelpers::HeavyObjectCache(conf));
59  }
60 
62  }
63 
65  ~PFElecTkProducer() override;
66 
67  private:
68  void beginRun(const edm::Run&,const edm::EventSetup&) override;
69  void endRun(const edm::Run&,const edm::EventSetup&) override;
70 
72  void produce(edm::Event&, const edm::EventSetup&) override;
73 
74 
75  int FindPfRef(const reco::PFRecTrackCollection & PfRTkColl,
76  const reco::GsfTrack&, bool);
77 
78 
79 
80  bool applySelection(const reco::GsfTrack&);
81 
82  bool resolveGsfTracks(const std::vector<reco::GsfPFRecTrack> &GsfPFVec,
83  unsigned int ngsf,
84  std::vector<unsigned int> &secondaries,
85  const reco::PFClusterCollection & theEClus);
86 
87  float minTangDist(const reco::GsfPFRecTrack& primGsf,
88  const reco::GsfPFRecTrack& secGsf);
89 
90  bool isSameEgSC(const reco::ElectronSeed& nSeed,
91  const reco::ElectronSeed& iSeed,
92  bool& bothGsfEcalDriven,
93  float& SCEnergy);
94 
95  bool isSharingEcalEnergyWithEgSC(const reco::GsfPFRecTrack& nGsfPFRecTrack,
96  const reco::GsfPFRecTrack& iGsfPFRecTrack,
97  const reco::ElectronSeed& nSeed,
98  const reco::ElectronSeed& iSeed,
99  const reco::PFClusterCollection& theEClus,
100  bool& bothGsfTrackerDriven,
101  bool& nEcalDriven,
102  bool& iEcalDriven,
103  float& nEnergy,
104  float& iEnergy);
105 
106  bool isInnerMost(const reco::GsfTrackRef& nGsfTrack,
107  const reco::GsfTrackRef& iGsfTrack,
108  bool& sameLayer);
109 
110  bool isInnerMostWithLostHits(const reco::GsfTrackRef& nGsfTrack,
111  const reco::GsfTrackRef& iGsfTrack,
112  bool& sameLayer);
113 
115  std::vector<reco::GsfPFRecTrack>& gsfPFRecTrackPrimary,
116  const std::map<unsigned int, std::vector<reco::GsfPFRecTrack> >& MapPrimSec);
117 
118  // ----------member data ---------------------------
131  bool useV0_;
135 
137  std::unique_ptr<PFTrackTransformer> pfTransformer_;
139  std::unique_ptr<ConvBremPFTrackFinder> convBremFinder_;
140 
141 
143  bool trajinev_;
145  bool applySel_;
149  // bool useFifthStepSec_;
151  double SCEne_;
152  double detaGsfSC_;
153  double dphiGsfSC_;
155 
158 
167 
168  // cache for multitrajectory states
169  std::vector<double> gsfInnerMomentumCache_;
170 
171 };
172 #endif
bool trajinev_
Trajectory of GSfTracks in the event?
edm::EDGetTokenT< reco::PFRecTrackCollection > pfTrackLabel_
edm::EDGetTokenT< reco::GsfTrackCollection > gsfTrackLabel_
void createGsfPFRecTrackRef(const edm::OrphanHandle< reco::GsfPFRecTrackCollection > &gsfPfHandle, std::vector< reco::GsfPFRecTrack > &gsfPFRecTrackPrimary, const std::map< unsigned int, std::vector< reco::GsfPFRecTrack > > &MapPrimSec)
double mvaConvBremFinderIDEndcapsLowPt_
std::string path_mvaWeightFileConvBremEndcapsLowPt_
static std::unique_ptr< convbremhelpers::HeavyObjectCache > initializeGlobalCache(const edm::ParameterSet &conf)
bool applySelection(const reco::GsfTrack &)
reco::GsfPFRecTrack secpftrack_
std::unique_ptr< ConvBremPFTrackFinder > convBremFinder_
~PFElecTkProducer() override
Destructor.
edm::EDGetTokenT< reco::VertexCollection > primVtxLabel_
std::string path_mvaWeightFileConvBremBarrelHighPt_
double mvaConvBremFinderIDBarrelLowPt_
edm::EDGetTokenT< reco::PFV0Collection > pfV0_
std::string path_mvaWeightFileConvBremEndcapsHighPt_
edm::EDGetTokenT< reco::PFDisplacedTrackerVertexCollection > pfNuclear_
bool isSameEgSC(const reco::ElectronSeed &nSeed, const reco::ElectronSeed &iSeed, bool &bothGsfEcalDriven, float &SCEnergy)
bool isInnerMostWithLostHits(const reco::GsfTrackRef &nGsfTrack, const reco::GsfTrackRef &iGsfTrack, bool &sameLayer)
PFElecTkProducer(const edm::ParameterSet &, const convbremhelpers::HeavyObjectCache *)
Constructor.
void endRun(const edm::Run &, const edm::EventSetup &) override
int FindPfRef(const reco::PFRecTrackCollection &PfRTkColl, const reco::GsfTrack &, bool)
std::string path_mvaWeightFileConvBremBarrelLowPt_
bool resolveGsfTracks(const std::vector< reco::GsfPFRecTrack > &GsfPFVec, unsigned int ngsf, std::vector< unsigned int > &secondaries, const reco::PFClusterCollection &theEClus)
double mvaConvBremFinderIDBarrelHighPt_
double mvaConvBremFinderIDEndcapsHighPt_
edm::EDGetTokenT< reco::PFConversionCollection > pfConv_
void beginRun(const edm::Run &, const edm::EventSetup &) override
reco::GsfPFRecTrack pftrack_
void produce(edm::Event &, const edm::EventSetup &) override
Produce the PFRecTrack collection.
bool useConvBremFinder_
Conv Brem Finder.
std::vector< PFCluster > PFClusterCollection
collection of PFCluster objects
Definition: PFClusterFwd.h:9
std::unique_ptr< PFTrackTransformer > pfTransformer_
PFTrackTransformer.
std::vector< double > gsfInnerMomentumCache_
edm::ParameterSet conf_
float minTangDist(const reco::GsfPFRecTrack &primGsf, const reco::GsfPFRecTrack &secGsf)
std::vector< PFRecTrack > PFRecTrackCollection
collection of PFRecTrack objects
Definition: PFRecTrackFwd.h:9
edm::EDGetTokenT< reco::PFClusterCollection > pfEcalClusters_
bool isSharingEcalEnergyWithEgSC(const reco::GsfPFRecTrack &nGsfPFRecTrack, const reco::GsfPFRecTrack &iGsfPFRecTrack, const reco::ElectronSeed &nSeed, const reco::ElectronSeed &iSeed, const reco::PFClusterCollection &theEClus, bool &bothGsfTrackerDriven, bool &nEcalDriven, bool &iEcalDriven, float &nEnergy, float &iEnergy)
Definition: Run.h:45
MultiTrajectoryStateTransform mtsTransform_
static void globalEndJob(convbremhelpers::HeavyObjectCache const *)
bool isInnerMost(const reco::GsfTrackRef &nGsfTrack, const reco::GsfTrackRef &iGsfTrack, bool &sameLayer)