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 
19 
20 namespace edm {
21  class EDProductGetter;
22 }
23 
24 //
25 // constants, enums and typedefs
26 //
27 
32 
33 typedef std::pair<reco::PFCandidateRef, int> PFCandQualityPair;
34 typedef std::vector<PFCandQualityPair> PFCandQualityPairVector;
35 
36 typedef std::pair<reco::VertexRef, PFCandQualityPair> VertexPfcQuality;
37 
38 typedef std::pair<reco::VertexRef, float> VertexPtsumPair;
39 typedef std::vector<VertexPtsumPair> VertexPtsumVector;
40 
42 public:
43  //dedicated constructor for the algorithms
45 
46  //get all needed collections at the beginning
47  void GetInputCollections(edm::Event&, const edm::EventSetup&) override;
48 
49  //create the pf candidate to vertex association and the inverse map
50  std::pair<std::unique_ptr<PFCandToVertexAssMap>, std::unique_ptr<VertexToPFCandAssMap>> createMappings(
52 
53  //create the pf candidate to vertex association map
54  std::unique_ptr<PFCandToVertexAssMap> CreatePFCandToVertexMap(edm::Handle<reco::PFCandidateCollection>,
55  const edm::EventSetup&);
56 
57  //create the vertex to pf candidate association map
58  std::unique_ptr<VertexToPFCandAssMap> CreateVertexToPFCandMap(edm::Handle<reco::PFCandidateCollection>,
59  const edm::EventSetup&);
60 
61  //function to sort the vertices in the AssociationMap by the sum of (pT - pT_Error)**2
62  std::unique_ptr<PFCandToVertexAssMap> SortPFCandAssociationMap(PFCandToVertexAssMap*,
63  edm::EDProductGetter const* getter);
64 
65 protected:
66  //protected functions
67 
68 private:
69  //private functions
70 
72 
75 
78 
80 };
81 
82 #endif
std::pair< reco::VertexRef, PFCandQualityPair > VertexPfcQuality
std::vector< VertexPtsumPair > VertexPtsumVector
std::pair< reco::PFCandidateRef, int > PFCandQualityPair
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
edm::ESHandle< MagneticField > bFieldH
HLT enums.
edm::EDGetTokenT< reco::VertexCollection > token_VertexCollection_
edm::Handle< reco::VertexCollection > vtxcollH
edm::EDGetTokenT< reco::BeamSpot > token_BeamSpot_