CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
PrimaryVertexSorter< ParticlesCollection > Class Template Reference

#include <PrimaryVertexSorter.h>

Inheritance diagram for PrimaryVertexSorter< ParticlesCollection >:
edm::stream::EDProducer<>

Public Types

typedef edm::Association< reco::VertexCollectionCandToVertex
 
typedef edm::ValueMap< int > CandToVertexQuality
 
typedef ParticlesCollection PFCollection
 
typedef edm::ValueMap< float > VertexScore
 
- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Public Member Functions

 PrimaryVertexSorter (const edm::ParameterSet &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
std::vector< reco::VertexsortedList (const reco::VertexCollection &primaryVertex) const
 
 ~PrimaryVertexSorter () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Private Member Functions

void doConsumesForTiming (const edm::ParameterSet &iConfig)
 
template<>
void doConsumesForTiming (const edm::ParameterSet &iConfig)
 
template<>
void doConsumesForTiming (const edm::ParameterSet &iConfig)
 
bool needsProductsForTiming ()
 
template<>
bool needsProductsForTiming ()
 
template<>
bool needsProductsForTiming ()
 
std::pair< int, PrimaryVertexAssignment::QualityrunAlgo (const reco::VertexCollection &vertices, const typename ParticlesCollection::value_type &pf, const edm::ValueMap< float > *trackTimeTag, const edm::ValueMap< float > *trackTimeResoTag, const edm::View< reco::Candidate > &jets, const TransientTrackBuilder &builder)
 
template<>
std::pair< int, PrimaryVertexAssignment::QualityrunAlgo (const reco::VertexCollection &vertices, const reco::RecoChargedRefCandidate &pf, const edm::ValueMap< float > *trackTimeTag, const edm::ValueMap< float > *trackTimeResoTag, const edm::View< reco::Candidate > &jets, const TransientTrackBuilder &builder)
 
template<>
std::pair< int, PrimaryVertexAssignment::QualityrunAlgo (const reco::VertexCollection &vertices, const reco::PFCandidate &pf, const edm::ValueMap< float > *trackTimeTag, const edm::ValueMap< float > *trackTimeResoTag, const edm::View< reco::Candidate > &jets, const TransientTrackBuilder &builder)
 

Private Attributes

PrimaryVertexAssignment assignmentAlgo_
 
bool produceOriginalMapping_
 
bool producePFNoPileUp_
 
bool producePFPileUp_
 
bool produceSortedVertices_
 
int qualityCut_
 
PrimaryVertexSorting sortingAlgo_
 
edm::EDGetTokenT< PFCollectiontokenCandidates_
 Candidates to be analyzed. More...
 
edm::EDGetTokenT< edm::View< reco::Candidate > > tokenJets_
 
edm::EDGetTokenT< edm::ValueMap< float > > tokenTrackTimeResoTag_
 
edm::EDGetTokenT< edm::ValueMap< float > > tokenTrackTimeTag_
 
edm::EDGetTokenT< reco::VertexCollectiontokenVertices_
 vertices More...
 
bool useMET_
 
bool useTiming_
 

Detailed Description

template<class ParticlesCollection>
class PrimaryVertexSorter< ParticlesCollection >

Author
Andrea Rizzi

class to sort VertexCollection in decreasing order of the sum of the squared track pT's

Definition at line 31 of file PrimaryVertexSorter.h.

Member Typedef Documentation

template<class ParticlesCollection >
typedef edm::Association<reco::VertexCollection> PrimaryVertexSorter< ParticlesCollection >::CandToVertex

Definition at line 33 of file PrimaryVertexSorter.h.

template<class ParticlesCollection >
typedef edm::ValueMap<int> PrimaryVertexSorter< ParticlesCollection >::CandToVertexQuality

Definition at line 34 of file PrimaryVertexSorter.h.

template<class ParticlesCollection >
typedef ParticlesCollection PrimaryVertexSorter< ParticlesCollection >::PFCollection

Definition at line 37 of file PrimaryVertexSorter.h.

template<class ParticlesCollection >
typedef edm::ValueMap<float> PrimaryVertexSorter< ParticlesCollection >::VertexScore

Definition at line 35 of file PrimaryVertexSorter.h.

Constructor & Destructor Documentation

template<class ParticlesCollection >
PrimaryVertexSorter< ParticlesCollection >::PrimaryVertexSorter ( const edm::ParameterSet iConfig)
explicit

Definition at line 86 of file PrimaryVertexSorter.h.

References PrimaryVertexSorter< ParticlesCollection >::doConsumesForTiming(), PrimaryVertexSorter< ParticlesCollection >::produceOriginalMapping_, PrimaryVertexSorter< ParticlesCollection >::producePFNoPileUp_, PrimaryVertexSorter< ParticlesCollection >::producePFPileUp_, PrimaryVertexSorter< ParticlesCollection >::produceSortedVertices_, and PrimaryVertexSorter< ParticlesCollection >::useTiming_.

87  : assignmentAlgo_(iConfig.getParameterSet("assignment")),
88  sortingAlgo_(iConfig.getParameterSet("sorting")),
89  tokenCandidates_(consumes<ParticlesCollection>(iConfig.getParameter<edm::InputTag>("particles"))),
90  tokenVertices_(consumes<reco::VertexCollection>(iConfig.getParameter<edm::InputTag>("vertices"))),
92  produceOriginalMapping_(iConfig.getParameter<bool>("produceAssociationToOriginalVertices")),
93  produceSortedVertices_(iConfig.getParameter<bool>("produceSortedVertices")),
94  producePFPileUp_(iConfig.getParameter<bool>("producePileUpCollection")),
95  producePFNoPileUp_(iConfig.getParameter<bool>("produceNoPileUpCollection")),
96  qualityCut_(iConfig.getParameter<int>("qualityForPrimary")),
97  useMET_(iConfig.getParameter<bool>("usePVMET")),
98  useTiming_(iConfig.getParameterSet("assignment").getParameter<bool>("useTiming")) {
99  using namespace std;
100  using namespace edm;
101  using namespace reco;
102 
104  produces<CandToVertex>("original");
105  produces<CandToVertexQuality>("original");
106  produces<VertexScore>("original");
107  }
109  produces<reco::VertexCollection>();
110  produces<CandToVertex>();
111  produces<CandToVertexQuality>();
112  produces<VertexScore>();
113  }
114 
115  if (producePFPileUp_) {
117  produces<PFCollection>("originalPileUp");
119  produces<PFCollection>("PileUp");
120  }
121 
122  if (producePFNoPileUp_) {
124  produces<PFCollection>("originalNoPileUp");
126  produces<PFCollection>("NoPileUp");
127  }
128 
129  if (useTiming_)
130  doConsumesForTiming(iConfig);
131 }
T getParameter(std::string const &) const
void doConsumesForTiming(const edm::ParameterSet &iConfig)
PrimaryVertexSorting sortingAlgo_
edm::EDGetTokenT< PFCollection > tokenCandidates_
Candidates to be analyzed.
ParameterSet const & getParameterSet(std::string const &) const
PrimaryVertexAssignment assignmentAlgo_
fixed size matrix
HLT enums.
edm::EDGetTokenT< reco::VertexCollection > tokenVertices_
vertices
edm::EDGetTokenT< edm::View< reco::Candidate > > tokenJets_
template<class ParticlesCollection >
PrimaryVertexSorter< ParticlesCollection >::~PrimaryVertexSorter ( )
inlineoverride

Definition at line 41 of file PrimaryVertexSorter.h.

References PrimaryVertexSorter< ParticlesCollection >::produce().

41 {}

Member Function Documentation

template<class ParticlesCollection >
void PrimaryVertexSorter< ParticlesCollection >::doConsumesForTiming ( const edm::ParameterSet iConfig)
private
template<>
void PrimaryVertexSorter< std::vector< reco::RecoChargedRefCandidate > >::doConsumesForTiming ( const edm::ParameterSet iConfig)
private

Definition at line 304 of file PrimaryVertexSorter.h.

References edm::ParameterSet::getParameter(), PrimaryVertexSorter< ParticlesCollection >::tokenTrackTimeResoTag_, and PrimaryVertexSorter< ParticlesCollection >::tokenTrackTimeTag_.

305  {
306  tokenTrackTimeTag_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("trackTimeTag"));
307  tokenTrackTimeResoTag_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("trackTimeResoTag"));
308 }
T getParameter(std::string const &) const
edm::EDGetTokenT< edm::ValueMap< float > > tokenTrackTimeTag_
edm::EDGetTokenT< edm::ValueMap< float > > tokenTrackTimeResoTag_
template<>
void PrimaryVertexSorter< std::vector< reco::PFCandidate > >::doConsumesForTiming ( const edm::ParameterSet iConfig)
private

Definition at line 311 of file PrimaryVertexSorter.h.

311 {}
template<class ParticlesCollection >
bool PrimaryVertexSorter< ParticlesCollection >::needsProductsForTiming ( )
private
template<>
bool PrimaryVertexSorter< std::vector< reco::RecoChargedRefCandidate > >::needsProductsForTiming ( )
private

Definition at line 314 of file PrimaryVertexSorter.h.

314  {
315  return true;
316 }
template<>
bool PrimaryVertexSorter< std::vector< reco::PFCandidate > >::needsProductsForTiming ( )
private

Definition at line 319 of file PrimaryVertexSorter.h.

319  {
320  return false;
321 }
template<class ParticlesCollection >
void PrimaryVertexSorter< ParticlesCollection >::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 134 of file PrimaryVertexSorter.h.

References edm::helper::Filler< Map >::fill(), edm::EventSetup::get(), edm::Event::getByToken(), mps_fire::i, training_settings::idx, edm::helper::Filler< Map >::insert(), singleTopDQM_cfi::jets, eostools::move(), PrimaryVertexSorter< ParticlesCollection >::needsProductsForTiming(), ecalTrigSettings_cff::particles, packedPFCandidateRefMixer_cfi::pf, PrimaryVertexSorter< ParticlesCollection >::produceOriginalMapping_, PrimaryVertexSorter< ParticlesCollection >::producePFNoPileUp_, PrimaryVertexSorter< ParticlesCollection >::producePFPileUp_, PrimaryVertexSorter< ParticlesCollection >::produceSortedVertices_, edm::Handle< T >::product(), edm::Event::put(), MetAnalyzer::pv(), PrimaryVertexSorter< ParticlesCollection >::qualityCut_, PrimaryVertexSorter< ParticlesCollection >::runAlgo(), alignCSCRings::s, PrimaryVertexSorting::score(), PrimaryVertexSorter< ParticlesCollection >::sortingAlgo_, PrimaryVertexSorter< ParticlesCollection >::tokenCandidates_, PrimaryVertexSorter< ParticlesCollection >::tokenJets_, PrimaryVertexSorter< ParticlesCollection >::tokenTrackTimeResoTag_, PrimaryVertexSorter< ParticlesCollection >::tokenTrackTimeTag_, PrimaryVertexSorter< ParticlesCollection >::tokenVertices_, RecoVertex_phase2_timing_cff::trackTimeResoTag, RecoVertex_phase2_timing_cff::trackTimeTag, PrimaryVertexSorter< ParticlesCollection >::useMET_, PrimaryVertexSorter< ParticlesCollection >::useTiming_, and pwdgSkimBPark_cfi::vertices.

Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), HTMLExport.HTMLExportStatic::export(), and PrimaryVertexSorter< ParticlesCollection >::~PrimaryVertexSorter().

134  {
135  using namespace std;
136  using namespace edm;
137  using namespace reco;
138 
140  iEvent.getByToken(tokenJets_, jets);
141 
143  iSetup.get<TransientTrackRecord>().get("TransientTrackBuilder", builder);
144 
146  iEvent.getByToken(tokenVertices_, vertices);
147 
148  Handle<ParticlesCollection> particlesHandle;
149  iEvent.getByToken(tokenCandidates_, particlesHandle);
150 
151  Handle<edm::ValueMap<float>> trackTimeTagHandle;
152  Handle<edm::ValueMap<float>> trackTimeResoTagHandle;
153 
154  const edm::ValueMap<float>* trackTimeTag = nullptr;
155  const edm::ValueMap<float>* trackTimeResoTag = nullptr;
157  iEvent.getByToken(tokenTrackTimeTag_, trackTimeTagHandle);
158  iEvent.getByToken(tokenTrackTimeResoTag_, trackTimeResoTagHandle);
159 
160  trackTimeTag = trackTimeTagHandle.product();
161  trackTimeResoTag = trackTimeResoTagHandle.product();
162  }
163 
164  ParticlesCollection particles = *particlesHandle.product();
165  std::vector<int> pfToPVVector;
166  std::vector<PrimaryVertexAssignment::Quality> pfToPVQualityVector;
167  //reverse mapping
168  std::vector<std::vector<int>> pvToPFVector(vertices->size());
169  std::vector<std::vector<const reco::Candidate*>> pvToCandVector(vertices->size());
170  std::vector<std::vector<PrimaryVertexAssignment::Quality>> pvToPFQualityVector(vertices->size());
171  std::vector<float> vertexScoreOriginal(vertices->size());
172  std::vector<float> vertexScore(vertices->size());
173 
174  for (auto const& pf : particles) {
175  std::pair<int, PrimaryVertexAssignment::Quality> vtxWithQuality =
176  runAlgo(*vertices, pf, trackTimeTag, trackTimeResoTag, *jets, *builder);
177  pfToPVVector.push_back(vtxWithQuality.first);
178  pfToPVQualityVector.push_back(vtxWithQuality.second);
179  }
180 
181  //Invert the mapping
182  for (size_t i = 0; i < pfToPVVector.size(); i++) {
183  auto pv = pfToPVVector[i];
184  auto qual = pfToPVQualityVector[i];
185  if (pv >= 0 and qual >= qualityCut_) {
186  pvToPFVector[pv].push_back(i);
187  // std::cout << i << std::endl;
188  // const typename ParticlesCollection::value_type & cp = particles[i];
189  // std::cout << "CP " << &cp << std::endl;
190  pvToCandVector[pv].push_back(&particles[i]);
191  pvToPFQualityVector[pv].push_back(qual);
192  }
193  }
194 
195  //Use multimap for sorting of indices
196  std::multimap<float, int> scores;
197  for (unsigned int i = 0; i < vertices->size(); i++) {
198  float s = sortingAlgo_.score((*vertices)[i], pvToCandVector[i], useMET_);
199  vertexScoreOriginal[i] = s;
200  scores.insert(std::pair<float, int>(-s, i));
201  }
202 
203  //create indices
204  std::vector<int> oldToNew(vertices->size()), newToOld(vertices->size());
205  size_t newIdx = 0;
206  for (auto const& idx : scores) {
207  // std::cout << newIdx << " score: " << idx.first << " oldidx: " << idx.second << " "<< producePFPileUp_ << std::endl;
208  vertexScore[newIdx] = -idx.first;
209  oldToNew[idx.second] = newIdx;
210  newToOld[newIdx] = idx.second;
211  newIdx++;
212  }
213 
215  unique_ptr<CandToVertex> pfCandToOriginalVertexOutput(new CandToVertex(vertices));
216  unique_ptr<CandToVertexQuality> pfCandToOriginalVertexQualityOutput(new CandToVertexQuality());
217  CandToVertex::Filler cand2VertexFiller(*pfCandToOriginalVertexOutput);
218  CandToVertexQuality::Filler cand2VertexQualityFiller(*pfCandToOriginalVertexQualityOutput);
219 
220  cand2VertexFiller.insert(particlesHandle, pfToPVVector.begin(), pfToPVVector.end());
221  cand2VertexQualityFiller.insert(particlesHandle, pfToPVQualityVector.begin(), pfToPVQualityVector.end());
222 
223  cand2VertexFiller.fill();
224  cand2VertexQualityFiller.fill();
225  iEvent.put(std::move(pfCandToOriginalVertexOutput), "original");
226  iEvent.put(std::move(pfCandToOriginalVertexQualityOutput), "original");
227 
228  unique_ptr<VertexScore> vertexScoreOriginalOutput(new VertexScore);
229  VertexScore::Filler vertexScoreOriginalFiller(*vertexScoreOriginalOutput);
230  vertexScoreOriginalFiller.insert(vertices, vertexScoreOriginal.begin(), vertexScoreOriginal.end());
231  vertexScoreOriginalFiller.fill();
232  iEvent.put(std::move(vertexScoreOriginalOutput), "original");
233  }
234 
236  std::vector<int> pfToSortedPVVector;
237  // std::vector<int> pfToSortedPVQualityVector;
238  for (size_t i = 0; i < pfToPVVector.size(); i++) {
239  pfToSortedPVVector.push_back(oldToNew[pfToPVVector[i]]);
240  // pfToSortedPVQualityVector.push_back(pfToPVQualityVector[i]); //same as old!
241  }
242 
243  unique_ptr<reco::VertexCollection> sortedVerticesOutput(new reco::VertexCollection);
244  for (size_t i = 0; i < vertices->size(); i++) {
245  sortedVerticesOutput->push_back((*vertices)[newToOld[i]]);
246  }
247  edm::OrphanHandle<reco::VertexCollection> oh = iEvent.put(std::move(sortedVerticesOutput));
248  unique_ptr<CandToVertex> pfCandToVertexOutput(new CandToVertex(oh));
249  unique_ptr<CandToVertexQuality> pfCandToVertexQualityOutput(new CandToVertexQuality());
250  CandToVertex::Filler cand2VertexFiller(*pfCandToVertexOutput);
251  CandToVertexQuality::Filler cand2VertexQualityFiller(*pfCandToVertexQualityOutput);
252 
253  cand2VertexFiller.insert(particlesHandle, pfToSortedPVVector.begin(), pfToSortedPVVector.end());
254  cand2VertexQualityFiller.insert(particlesHandle, pfToPVQualityVector.begin(), pfToPVQualityVector.end());
255 
256  cand2VertexFiller.fill();
257  cand2VertexQualityFiller.fill();
258  iEvent.put(std::move(pfCandToVertexOutput));
259  iEvent.put(std::move(pfCandToVertexQualityOutput));
260 
261  unique_ptr<VertexScore> vertexScoreOutput(new VertexScore);
262  VertexScore::Filler vertexScoreFiller(*vertexScoreOutput);
263  vertexScoreFiller.insert(oh, vertexScore.begin(), vertexScore.end());
264  vertexScoreFiller.fill();
265  iEvent.put(std::move(vertexScoreOutput));
266  }
267 
268  unique_ptr<PFCollection> pfCollectionNOPUOriginalOutput(new PFCollection);
269  unique_ptr<PFCollection> pfCollectionNOPUOutput(new PFCollection);
270  unique_ptr<PFCollection> pfCollectionPUOriginalOutput(new PFCollection);
271  unique_ptr<PFCollection> pfCollectionPUOutput(new PFCollection);
272 
273  for (size_t i = 0; i < particles.size(); i++) {
274  auto pv = pfToPVVector[i];
275  auto qual = pfToPVQualityVector[i];
276 
278  if (pv == newToOld[0] and qual >= qualityCut_)
279  pfCollectionNOPUOutput->push_back(particles[i]);
280 
282  if (pv != newToOld[0] and qual >= qualityCut_)
283  pfCollectionPUOutput->push_back(particles[i]);
284 
286  if (pv == 0 and qual >= qualityCut_)
287  pfCollectionNOPUOriginalOutput->push_back(particles[i]);
288 
290  if (pv != 0 and qual >= qualityCut_)
291  pfCollectionPUOriginalOutput->push_back(particles[i]);
292  }
294  iEvent.put(std::move(pfCollectionNOPUOutput), "NoPileUp");
296  iEvent.put(std::move(pfCollectionPUOutput), "PileUp");
298  iEvent.put(std::move(pfCollectionNOPUOriginalOutput), "originalNoPileUp");
300  iEvent.put(std::move(pfCollectionPUOriginalOutput), "originalPileUp");
301 }
edm::Association< reco::VertexCollection > CandToVertex
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:131
PrimaryVertexSorting sortingAlgo_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
edm::EDGetTokenT< PFCollection > tokenCandidates_
Candidates to be analyzed.
ParticlesCollection PFCollection
def pv(vc)
Definition: MetAnalyzer.py:7
bool needsProductsForTiming()
edm::EDGetTokenT< edm::ValueMap< float > > tokenTrackTimeTag_
helper::Filler< ValueMap< int > > Filler
Definition: ValueMap.h:168
edm::ValueMap< float > VertexScore
T const * product() const
Definition: Handle.h:69
float score(const reco::Vertex &pv, const std::vector< const reco::Candidate * > &candidates, bool useMet) const
edm::ValueMap< int > CandToVertexQuality
fixed size matrix
HLT enums.
T get() const
Definition: EventSetup.h:73
edm::EDGetTokenT< edm::ValueMap< float > > tokenTrackTimeResoTag_
edm::EDGetTokenT< reco::VertexCollection > tokenVertices_
vertices
def move(src, dest)
Definition: eostools.py:511
edm::EDGetTokenT< edm::View< reco::Candidate > > tokenJets_
std::pair< int, PrimaryVertexAssignment::Quality > runAlgo(const reco::VertexCollection &vertices, const typename ParticlesCollection::value_type &pf, const edm::ValueMap< float > *trackTimeTag, const edm::ValueMap< float > *trackTimeResoTag, const edm::View< reco::Candidate > &jets, const TransientTrackBuilder &builder)
template<class ParticlesCollection >
std::pair<int, PrimaryVertexAssignment::Quality> PrimaryVertexSorter< ParticlesCollection >::runAlgo ( const reco::VertexCollection vertices,
const typename ParticlesCollection::value_type &  pf,
const edm::ValueMap< float > *  trackTimeTag,
const edm::ValueMap< float > *  trackTimeResoTag,
const edm::View< reco::Candidate > &  jets,
const TransientTrackBuilder builder 
)
private
template<>
std::pair< int, PrimaryVertexAssignment::Quality > PrimaryVertexSorter< std::vector< reco::RecoChargedRefCandidate > >::runAlgo ( const reco::VertexCollection vertices,
const reco::RecoChargedRefCandidate pf,
const edm::ValueMap< float > *  trackTimeTag,
const edm::ValueMap< float > *  trackTimeResoTag,
const edm::View< reco::Candidate > &  jets,
const TransientTrackBuilder builder 
)
private

Definition at line 325 of file PrimaryVertexSorter.h.

References PrimaryVertexSorter< ParticlesCollection >::assignmentAlgo_, and PrimaryVertexAssignment::chargedHadronVertex().

330  {
331  return assignmentAlgo_.chargedHadronVertex(vertices, pf, trackTimeTag, trackTimeResoTag, jets, builder);
332 }
std::pair< int, PrimaryVertexAssignment::Quality > chargedHadronVertex(const reco::VertexCollection &vertices, const reco::TrackRef &trackRef, const reco::Track *track, float trackTime, float trackTimeResolution, const edm::View< reco::Candidate > &jets, const TransientTrackBuilder &builder) const
PrimaryVertexAssignment assignmentAlgo_
template<>
std::pair< int, PrimaryVertexAssignment::Quality > PrimaryVertexSorter< std::vector< reco::PFCandidate > >::runAlgo ( const reco::VertexCollection vertices,
const reco::PFCandidate pf,
const edm::ValueMap< float > *  trackTimeTag,
const edm::ValueMap< float > *  trackTimeResoTag,
const edm::View< reco::Candidate > &  jets,
const TransientTrackBuilder builder 
)
private

Definition at line 335 of file PrimaryVertexSorter.h.

References PrimaryVertexSorter< ParticlesCollection >::assignmentAlgo_, and PrimaryVertexAssignment::chargedHadronVertex().

341  {
342  return assignmentAlgo_.chargedHadronVertex(vertices, pf, jets, builder);
343 }
std::pair< int, PrimaryVertexAssignment::Quality > chargedHadronVertex(const reco::VertexCollection &vertices, const reco::TrackRef &trackRef, const reco::Track *track, float trackTime, float trackTimeResolution, const edm::View< reco::Candidate > &jets, const TransientTrackBuilder &builder) const
PrimaryVertexAssignment assignmentAlgo_
template<class ParticlesCollection >
VertexCollection PrimaryVertexSorter< ParticlesCollection >::sortedList ( const reco::VertexCollection primaryVertex) const

Definition at line 7 of file PrimaryVertexSorter.cc.

References FSQDQM_cfi::pvs.

Referenced by QualityCutsAnalyzer::LoopOverJetTracksAssociation().

7  {
8  VertexCollection pvs = unsortedPVColl;
9  sort(pvs.begin(), pvs.end(), VertexHigherPtSquared());
10  return pvs;
11 }
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9

Member Data Documentation

template<class ParticlesCollection >
PrimaryVertexAssignment PrimaryVertexSorter< ParticlesCollection >::assignmentAlgo_
private
template<class ParticlesCollection >
bool PrimaryVertexSorter< ParticlesCollection >::produceOriginalMapping_
private
template<class ParticlesCollection >
bool PrimaryVertexSorter< ParticlesCollection >::producePFNoPileUp_
private
template<class ParticlesCollection >
bool PrimaryVertexSorter< ParticlesCollection >::producePFPileUp_
private
template<class ParticlesCollection >
bool PrimaryVertexSorter< ParticlesCollection >::produceSortedVertices_
private
template<class ParticlesCollection >
int PrimaryVertexSorter< ParticlesCollection >::qualityCut_
private
template<class ParticlesCollection >
PrimaryVertexSorting PrimaryVertexSorter< ParticlesCollection >::sortingAlgo_
private
template<class ParticlesCollection >
edm::EDGetTokenT<PFCollection> PrimaryVertexSorter< ParticlesCollection >::tokenCandidates_
private

Candidates to be analyzed.

Definition at line 50 of file PrimaryVertexSorter.h.

Referenced by PrimaryVertexSorter< ParticlesCollection >::produce().

template<class ParticlesCollection >
edm::EDGetTokenT<edm::View<reco::Candidate> > PrimaryVertexSorter< ParticlesCollection >::tokenJets_
private
template<class ParticlesCollection >
edm::EDGetTokenT<edm::ValueMap<float> > PrimaryVertexSorter< ParticlesCollection >::tokenTrackTimeResoTag_
private
template<class ParticlesCollection >
edm::EDGetTokenT<edm::ValueMap<float> > PrimaryVertexSorter< ParticlesCollection >::tokenTrackTimeTag_
private
template<class ParticlesCollection >
edm::EDGetTokenT<reco::VertexCollection> PrimaryVertexSorter< ParticlesCollection >::tokenVertices_
private

vertices

Definition at line 53 of file PrimaryVertexSorter.h.

Referenced by PrimaryVertexSorter< ParticlesCollection >::produce().

template<class ParticlesCollection >
bool PrimaryVertexSorter< ParticlesCollection >::useMET_
private
template<class ParticlesCollection >
bool PrimaryVertexSorter< ParticlesCollection >::useTiming_
private