CMS 3D CMS Logo

PFCand_AssoMapAlgos.h
Go to the documentation of this file.
1 #ifndef PFCand_AssoMapAlgos_h
2 #define PFCand_AssoMapAlgos_h
3 
8 //
9 // Original Author: Matthias Geisler,32 4-B20,+41227676487,
10 // $Id$
11 //
12 //
14 
16 
20 
21 namespace edm {
22  class EDProductGetter;
23 }
24 
25 //
26 // constants, enums and typedefs
27 //
28 
33 
34 typedef std::pair<reco::PFCandidateRef, int> PFCandQualityPair;
35 typedef std::vector<PFCandQualityPair> PFCandQualityPairVector;
36 
37 typedef std::pair<reco::VertexRef, PFCandQualityPair> VertexPfcQuality;
38 
39 typedef std::pair<reco::VertexRef, float> VertexPtsumPair;
40 typedef std::vector<VertexPtsumPair> VertexPtsumVector;
41 
43 public:
44  //dedicated constructor for the algorithms
46 
47  //get all needed collections at the beginning
48  void GetInputCollections(edm::Event&, const edm::EventSetup&) override;
49 
50  //create the pf candidate to vertex association and the inverse map
51  std::pair<std::unique_ptr<PFCandToVertexAssMap>, std::unique_ptr<VertexToPFCandAssMap>> createMappings(
53 
54  //create the pf candidate to vertex association map
55  std::unique_ptr<PFCandToVertexAssMap> CreatePFCandToVertexMap(edm::Handle<reco::PFCandidateCollection>);
56 
57  //create the vertex to pf candidate association map
58  std::unique_ptr<VertexToPFCandAssMap> CreateVertexToPFCandMap(edm::Handle<reco::PFCandidateCollection>);
59 
60  //function to sort the vertices in the AssociationMap by the sum of (pT - pT_Error)**2
61  std::unique_ptr<PFCandToVertexAssMap> SortPFCandAssociationMap(PFCandToVertexAssMap*,
62  edm::EDProductGetter const* getter);
63 
64 protected:
65  //protected functions
66 
67 private:
68  //private functions
69 
71 
74 
77 
82 };
83 
84 #endif
void GetInputCollections(edm::Event &, const edm::EventSetup &) override
std::pair< reco::VertexRef, PFCandQualityPair > VertexPfcQuality
std::vector< VertexPtsumPair > VertexPtsumVector
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > token_TrackingGeometry_
edm::ESHandle< GlobalTrackingGeometry > trackingGeometryH
std::pair< reco::PFCandidateRef, int > PFCandQualityPair
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > token_bField_
edm::AssociationMap< edm::OneToManyWithQuality< reco::VertexCollection, reco::PFCandidateCollection, int > > PFCandToVertexAssMap
edm::AssociationMap< edm::OneToManyWithQuality< reco::PFCandidateCollection, reco::VertexCollection, int > > VertexToPFCandAssMap
edm::Handle< reco::BeamSpot > beamspotH
std::pair< reco::VertexRef, float > VertexPtsumPair
std::vector< PFCandQualityPair > PFCandQualityPairVector
std::unique_ptr< PFCandToVertexAssMap > CreatePFCandToVertexMap(edm::Handle< reco::PFCandidateCollection >)
edm::ESHandle< MagneticField > bFieldH
std::unique_ptr< VertexToPFCandAssMap > CreateVertexToPFCandMap(edm::Handle< reco::PFCandidateCollection >)
HLT enums.
edm::EDGetTokenT< reco::VertexCollection > token_VertexCollection_
edm::Handle< reco::VertexCollection > vtxcollH
PFCand_AssoMapAlgos(const edm::ParameterSet &, edm::ConsumesCollector &&)
std::unique_ptr< PFCandToVertexAssMap > SortPFCandAssociationMap(PFCandToVertexAssMap *, edm::EDProductGetter const *getter)
edm::EDGetTokenT< reco::BeamSpot > token_BeamSpot_
std::pair< std::unique_ptr< PFCandToVertexAssMap >, std::unique_ptr< VertexToPFCandAssMap > > createMappings(edm::Handle< reco::PFCandidateCollection > pfCandH)