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
PFCand_AssoMapAlgos::token_VertexCollection_
edm::EDGetTokenT< reco::VertexCollection > token_VertexCollection_
Definition: PFCand_AssoMapAlgos.h:73
PFCand_AssoMapAlgos::CreatePFCandToVertexMap
std::unique_ptr< PFCandToVertexAssMap > CreatePFCandToVertexMap(edm::Handle< reco::PFCandidateCollection >, const edm::EventSetup &)
Definition: PFCand_AssoMapAlgos.cc:109
PFCand_AssoMapAlgos::PFCand_AssoMapAlgos
PFCand_AssoMapAlgos(const edm::ParameterSet &, edm::ConsumesCollector &&)
Definition: PFCand_AssoMapAlgos.cc:14
VertexPfcQuality
std::pair< reco::VertexRef, PFCandQualityPair > VertexPfcQuality
Definition: PFCand_AssoMapAlgos.h:36
PFCand_AssoMapAlgos::token_BeamSpot_
edm::EDGetTokenT< reco::BeamSpot > token_BeamSpot_
Definition: PFCand_AssoMapAlgos.h:76
PFCandidate.h
PF_PU_AssoMapAlgos
Definition: PF_PU_AssoMapAlgos.h:83
edm::EDGetTokenT< reco::VertexCollection >
edm
HLT enums.
Definition: AlignableModifier.h:19
PFCand_AssoMapAlgos::GetInputCollections
void GetInputCollections(edm::Event &, const edm::EventSetup &) override
Definition: PFCand_AssoMapAlgos.cc:27
PFCand_AssoMapAlgos::createMappings
std::pair< std::unique_ptr< PFCandToVertexAssMap >, std::unique_ptr< VertexToPFCandAssMap > > createMappings(edm::Handle< reco::PFCandidateCollection > pfCandH, const edm::EventSetup &iSetup)
Definition: PFCand_AssoMapAlgos.cc:43
edm::Handle
Definition: AssociativeIterator.h:50
edm::EDProductGetter
Definition: EDProductGetter.h:41
VertexToPFCandAssMap
edm::AssociationMap< edm::OneToManyWithQuality< reco::PFCandidateCollection, reco::VertexCollection, int > > VertexToPFCandAssMap
Definition: PFCand_AssoMapAlgos.h:31
VertexPtsumVector
std::vector< VertexPtsumPair > VertexPtsumVector
Definition: PFCand_AssoMapAlgos.h:39
edm::ESHandle< MagneticField >
PFCand_AssoMapAlgos
Definition: PFCand_AssoMapAlgos.h:41
PFCandQualityPairVector
std::vector< PFCandQualityPair > PFCandQualityPairVector
Definition: PFCand_AssoMapAlgos.h:34
VertexPtsumPair
std::pair< reco::VertexRef, float > VertexPtsumPair
Definition: PFCand_AssoMapAlgos.h:38
edm::ParameterSet
Definition: ParameterSet.h:47
EDProductGetter
edm::AssociationMap
Definition: AssociationMap.h:48
edm::EventSetup
Definition: EventSetup.h:57
PFCand_AssoMapAlgos::bFieldH
edm::ESHandle< MagneticField > bFieldH
Definition: PFCand_AssoMapAlgos.h:79
PFCandToVertexAssMap
edm::AssociationMap< edm::OneToManyWithQuality< reco::VertexCollection, reco::PFCandidateCollection, int > > PFCandToVertexAssMap
Definition: PFCand_AssoMapAlgos.h:29
PFCand_AssoMapAlgos::SortPFCandAssociationMap
std::unique_ptr< PFCandToVertexAssMap > SortPFCandAssociationMap(PFCandToVertexAssMap *, edm::EDProductGetter const *getter)
Definition: PFCand_AssoMapAlgos.cc:127
PF_PU_AssoMapAlgos.h
PFCand_AssoMapAlgos::vtxcollH
edm::Handle< reco::VertexCollection > vtxcollH
Definition: PFCand_AssoMapAlgos.h:74
PFCand_AssoMapAlgos::beamspotH
edm::Handle< reco::BeamSpot > beamspotH
Definition: PFCand_AssoMapAlgos.h:77
ConsumesCollector.h
PFCand_AssoMapAlgos::input_MaxNumAssociations_
int input_MaxNumAssociations_
Definition: PFCand_AssoMapAlgos.h:71
edm::Event
Definition: Event.h:73
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
PFCand_AssoMapAlgos::CreateVertexToPFCandMap
std::unique_ptr< VertexToPFCandAssMap > CreateVertexToPFCandMap(edm::Handle< reco::PFCandidateCollection >, const edm::EventSetup &)
Definition: PFCand_AssoMapAlgos.cc:118
PFCandidateFwd.h
PFCandQualityPair
std::pair< reco::PFCandidateRef, int > PFCandQualityPair
Definition: PFCand_AssoMapAlgos.h:33