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 
4 
9 //
10 // Original Author: Matthias Geisler,32 4-B20,+41227676487,
11 // $Id$
12 //
13 //
15 
17 
20 
21 namespace edm {
22  class EDProductGetter;
23 }
24 
25 //
26 // constants, enums and typedefs
27 //
28 
31 
32 typedef std::pair<reco::PFCandidateRef, int> PFCandQualityPair;
33 typedef std::vector<PFCandQualityPair > PFCandQualityPairVector;
34 
35 typedef std::pair<reco::VertexRef, PFCandQualityPair> VertexPfcQuality;
36 
37 typedef std::pair <reco::VertexRef, float> VertexPtsumPair;
38 typedef std::vector< VertexPtsumPair > VertexPtsumVector;
39 
41 
42  public:
43 
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>>
52  createMappings(edm::Handle<reco::PFCandidateCollection> pfCandH, const edm::EventSetup& iSetup);
53 
54  //create the pf candidate to vertex association map
55  std::unique_ptr<PFCandToVertexAssMap> CreatePFCandToVertexMap(edm::Handle<reco::PFCandidateCollection>, const edm::EventSetup&);
56 
57  //create the vertex to pf candidate association map
58  std::unique_ptr<VertexToPFCandAssMap> CreateVertexToPFCandMap(edm::Handle<reco::PFCandidateCollection>, const edm::EventSetup&);
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 
79 
80 };
81 
82 #endif
edm::AssociationMap< edm::OneToManyWithQuality< reco::PFCandidateCollection, reco::VertexCollection, int > > VertexToPFCandAssMap
std::pair< reco::VertexRef, PFCandQualityPair > VertexPfcQuality
edm::AssociationMap< edm::OneToManyWithQuality< reco::VertexCollection, reco::PFCandidateCollection, int > > PFCandToVertexAssMap
std::pair< reco::PFCandidateRef, int > PFCandQualityPair
std::vector< PFCandQualityPair > PFCandQualityPairVector
edm::Handle< reco::BeamSpot > beamspotH
std::pair< reco::VertexRef, float > VertexPtsumPair
edm::ESHandle< MagneticField > bFieldH
HLT enums.
edm::EDGetTokenT< reco::VertexCollection > token_VertexCollection_
edm::Handle< reco::VertexCollection > vtxcollH
edm::EDGetTokenT< reco::BeamSpot > token_BeamSpot_
std::vector< VertexPtsumPair > VertexPtsumVector