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 
43 // ROOT includes
44 #include "TF1.h"
45 
46 namespace reco { namespace modules {
47 
49 
50  public:
55 
56  private:
58  typedef reco::PFCandidateCollection::const_iterator CI;
59  typedef reco::TrackCollection::const_iterator TI;
60 
62  void produce( edm::Event& evt, const edm::EventSetup& es ) ;
63 
64  void matchByDrAllowReuse(const reco::Track & trk, const edm::Handle<CaloTowerCollection> & towers, double & bestdr, double & bestpt);
65 
66  double matchPFCandToTrack(const edm::Handle<PFCandidateCollection> & pfCandidates, unsigned it, double trkPt);
67 
68  bool selectByPFCands(TI ti, const edm::Handle<TrackCollection> hSrcTrack, const edm::Handle<PFCandidateCollection> pfCandidates, bool isPFThere);
69  bool selectByTowers(TI ti, const edm::Handle<TrackCollection> hSrcTrack, const edm::Handle<CaloTowerCollection> towers, bool isTowerThere);
70 
77 
78  //
82  double trkCompPtMin_;
83  double trkEtaMax_;
84  double towerPtMin_;
86 
92 
98 
99  bool passMuons_;
101 
102  // string of functional form
105 
107  std::unique_ptr<reco::TrackCollection> selTracks_;
108  std::unique_ptr<reco::TrackExtraCollection> selTrackExtras_;
109  std::unique_ptr<TrackingRecHitCollection> selHits_;
110  std::unique_ptr<std::vector<Trajectory>> selTrajs_;
111  std::unique_ptr<std::vector<const Trajectory*>> selTrajPtrs_;
112  std::unique_ptr<TrajTrackAssociationCollection> selTTAss_;
117  std::vector<reco::TrackRef> trackRefs_;
118 
119  // TF1
121 
122 
123  };
124 
125  }
126 }
127 
128 #endif
edm::EDGetTokenT< CaloTowerCollection > srcTower_
void produce(edm::Event &evt, const edm::EventSetup &es)
process one event
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_
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::RefProd< std::vector< Trajectory > > rTrajectories_
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_