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
PFCand_AssoMapAlgos::token_VertexCollection_
edm::EDGetTokenT< reco::VertexCollection > token_VertexCollection_
Definition: PFCand_AssoMapAlgos.h:72
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:37
PFCand_AssoMapAlgos::createMappings
std::pair< std::unique_ptr< PFCandToVertexAssMap >, std::unique_ptr< VertexToPFCandAssMap > > createMappings(edm::Handle< reco::PFCandidateCollection > pfCandH)
Definition: PFCand_AssoMapAlgos.cc:44
PFCand_AssoMapAlgos::token_BeamSpot_
edm::EDGetTokenT< reco::BeamSpot > token_BeamSpot_
Definition: PFCand_AssoMapAlgos.h:75
PFCandidate.h
PF_PU_AssoMapAlgos
Definition: PF_PU_AssoMapAlgos.h:84
edm::EDGetTokenT< reco::VertexCollection >
PFCand_AssoMapAlgos::token_TrackingGeometry_
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > token_TrackingGeometry_
Definition: PFCand_AssoMapAlgos.h:80
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::token_bField_
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > token_bField_
Definition: PFCand_AssoMapAlgos.h:78
PFCand_AssoMapAlgos::CreatePFCandToVertexMap
std::unique_ptr< PFCandToVertexAssMap > CreatePFCandToVertexMap(edm::Handle< reco::PFCandidateCollection >)
Definition: PFCand_AssoMapAlgos.cc:111
edm::Handle
Definition: AssociativeIterator.h:50
edm::EDProductGetter
Definition: EDProductGetter.h:41
PFCand_AssoMapAlgos::trackingGeometryH
edm::ESHandle< GlobalTrackingGeometry > trackingGeometryH
Definition: PFCand_AssoMapAlgos.h:81
VertexToPFCandAssMap
edm::AssociationMap< edm::OneToManyWithQuality< reco::PFCandidateCollection, reco::VertexCollection, int > > VertexToPFCandAssMap
Definition: PFCand_AssoMapAlgos.h:32
VertexPtsumVector
std::vector< VertexPtsumPair > VertexPtsumVector
Definition: PFCand_AssoMapAlgos.h:40
edm::ESHandle< MagneticField >
PFCand_AssoMapAlgos
Definition: PFCand_AssoMapAlgos.h:42
PFCandQualityPairVector
std::vector< PFCandQualityPair > PFCandQualityPairVector
Definition: PFCand_AssoMapAlgos.h:35
GlobalTrackingGeometryRecord.h
VertexPtsumPair
std::pair< reco::VertexRef, float > VertexPtsumPair
Definition: PFCand_AssoMapAlgos.h:39
edm::ParameterSet
Definition: ParameterSet.h:47
EDProductGetter
edm::AssociationMap
Definition: AssociationMap.h:48
edm::EventSetup
Definition: EventSetup.h:58
PFCand_AssoMapAlgos::CreateVertexToPFCandMap
std::unique_ptr< VertexToPFCandAssMap > CreateVertexToPFCandMap(edm::Handle< reco::PFCandidateCollection >)
Definition: PFCand_AssoMapAlgos.cc:120
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord >
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:30
PFCand_AssoMapAlgos::SortPFCandAssociationMap
std::unique_ptr< PFCandToVertexAssMap > SortPFCandAssociationMap(PFCandToVertexAssMap *, edm::EDProductGetter const *getter)
Definition: PFCand_AssoMapAlgos.cc:129
PF_PU_AssoMapAlgos.h
PFCand_AssoMapAlgos::vtxcollH
edm::Handle< reco::VertexCollection > vtxcollH
Definition: PFCand_AssoMapAlgos.h:73
PFCand_AssoMapAlgos::beamspotH
edm::Handle< reco::BeamSpot > beamspotH
Definition: PFCand_AssoMapAlgos.h:76
ConsumesCollector.h
PFCand_AssoMapAlgos::input_MaxNumAssociations_
int input_MaxNumAssociations_
Definition: PFCand_AssoMapAlgos.h:70
edm::Event
Definition: Event.h:73
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
PFCandidateFwd.h
PFCandQualityPair
std::pair< reco::PFCandidateRef, int > PFCandQualityPair
Definition: PFCand_AssoMapAlgos.h:34