CMS 3D CMS Logo

HICaloCompatibleTrackSelector.h
Go to the documentation of this file.
1 #ifndef HICaloCompatibleTrackSelector_H
2 #define HICaloCompatibleTrackSelector_H
3 
12 #include <utility>
13 #include <vector>
14 #include <memory>
15 #include <algorithm>
16 #include <map>
20 
29 
34 
38 
41 
42 // ROOT includes
43 #include "TF1.h"
44 
45 namespace reco {
46  namespace modules {
47 
49  public:
54 
55  private:
57  typedef reco::PFCandidateCollection::const_iterator CI;
58  typedef reco::TrackCollection::const_iterator TI;
59 
61  void produce(edm::Event& evt, const edm::EventSetup& es) override;
62 
63  void matchByDrAllowReuse(const reco::Track& trk,
65  double& bestdr,
66  double& bestpt);
67 
68  double matchPFCandToTrack(const edm::Handle<PFCandidateCollection>& pfCandidates, unsigned it, double trkPt);
69 
70  bool selectByPFCands(TI ti,
71  const edm::Handle<TrackCollection> hSrcTrack,
73  bool isPFThere);
74  bool selectByTowers(TI ti,
75  const edm::Handle<TrackCollection> hSrcTrack,
77  bool isTowerThere);
78 
85 
86  //
90  double trkCompPtMin_;
91  double trkEtaMax_;
92  double towerPtMin_;
94 
100 
106 
109 
110  // string of functional form
113 
115  std::unique_ptr<reco::TrackCollection> selTracks_;
116  std::unique_ptr<reco::TrackExtraCollection> selTrackExtras_;
117  std::unique_ptr<TrackingRecHitCollection> selHits_;
118  std::unique_ptr<std::vector<Trajectory>> selTrajs_;
119  std::unique_ptr<std::vector<const Trajectory*>> selTrajPtrs_;
120  std::unique_ptr<TrajTrackAssociationCollection> selTTAss_;
125  std::vector<reco::TrackRef> trackRefs_;
126 
127  // TF1
129  };
130 
131  } // namespace modules
132 } // namespace reco
133 
134 #endif
edm::EDGetTokenT< CaloTowerCollection > srcTower_
std::unique_ptr< TrackingRecHitCollection > selHits_
edm::EDGetTokenT< reco::TrackCollection > srcTracks_
source collection label
edm::EDGetTokenT< std::vector< Trajectory > > srcTrackTrajs_
reco::PFCandidateCollection::const_iterator CI
std::unique_ptr< std::vector< const Trajectory * > > selTrajPtrs_
std::unique_ptr< std::vector< Trajectory > > selTrajs_
edm::RefProd< std::vector< Trajectory > > rTrajectories_
void produce(edm::Event &evt, const edm::EventSetup &es) override
process one event
bool selectByTowers(TI ti, const edm::Handle< TrackCollection > hSrcTrack, const edm::Handle< CaloTowerCollection > towers, bool isTowerThere)
bool copyExtras_
copy only the tracks, not extras and rechits (for AOD)
edm::EDGetTokenT< reco::PFCandidateCollection > srcPFCands_
std::unique_ptr< TrajTrackAssociationCollection > selTTAss_
double matchPFCandToTrack(const edm::Handle< PFCandidateCollection > &pfCandidates, unsigned it, double trkPt)
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
HICaloCompatibleTrackSelector(const edm::ParameterSet &cfg)
constructor
fixed size matrix
std::unique_ptr< reco::TrackExtraCollection > selTrackExtras_
std::unique_ptr< reco::TrackCollection > selTracks_
storage
bool selectByPFCands(TI ti, const edm::Handle< TrackCollection > hSrcTrack, const edm::Handle< PFCandidateCollection > pfCandidates, bool isPFThere)
void matchByDrAllowReuse(const reco::Track &trk, const edm::Handle< CaloTowerCollection > &towers, double &bestdr, double &bestpt)
bool copyTrajectories_
copy also trajectories and trajectory->track associations
edm::EDGetTokenT< TrajTrackAssociationCollection > srcTrackTrajAssoc_