CMS 3D CMS Logo

PFTauPrimaryVertexProducer.cc
Go to the documentation of this file.
3 
6 public:
7  explicit PFTauPrimaryVertexProducer(const edm::ParameterSet& iConfig);
9 
10  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
11 
12 protected:
14  const std::vector<edm::Ptr<reco::TrackBase> >&,
15  std::vector<const reco::Track*>&) override;
16 };
17 
20 
22 
24  const std::vector<edm::Ptr<reco::TrackBase> >& tauTracks,
25  std::vector<const reco::Track*>& nonTauTracks) {
26  //Find non-tau tracks associated to thePV
27  for (reco::Vertex::trackRef_iterator vtxTrkRef = thePVRef->tracks_begin(); vtxTrkRef != thePVRef->tracks_end();
28  vtxTrkRef++) {
29  bool matched = false;
30  for (const auto& tauTrack : tauTracks) {
31  if (tauTrack.id() == vtxTrkRef->id() && tauTrack.key() == vtxTrkRef->key()) {
32  matched = true;
33  break;
34  }
35  }
36  if (!matched)
37  nonTauTracks.push_back((*vtxTrkRef).get());
38  }
39 }
40 
43  descriptions.add("pfTauPrimaryVertexProducer", desc);
44 }
45 
muonTagProbeFilters_cff.matched
matched
Definition: muonTagProbeFilters_cff.py:62
PFTauPrimaryVertexProducer::PFTauPrimaryVertexProducer
PFTauPrimaryVertexProducer(const edm::ParameterSet &iConfig)
Definition: PFTauPrimaryVertexProducer.cc:18
reco::Vertex::trackRef_iterator
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
Definition: Vertex.h:38
PFTauPrimaryVertexProducer::~PFTauPrimaryVertexProducer
~PFTauPrimaryVertexProducer() override
Definition: PFTauPrimaryVertexProducer.cc:21
edm::Ref< VertexCollection >
PFTauPrimaryVertexProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: PFTauPrimaryVertexProducer.cc:41
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
edm::ParameterSet
Definition: ParameterSet.h:36
PFTauPrimaryVertexProducer
RECO/AOD implementation of the PFTauPrimaryVertexProducer plugin.
Definition: PFTauPrimaryVertexProducer.cc:5
edm::Ptr
Definition: AssociationVector.h:31
PFTauPrimaryVertexProducerBase.h
PFTauPrimaryVertexProducerBase::getDescriptionsBase
static edm::ParameterSetDescription getDescriptionsBase()
Definition: PFTauPrimaryVertexProducerBase.cc:220
PFTauPrimaryVertexProducerBase
Definition: PFTauPrimaryVertexProducerBase.h:39
PFTauPrimaryVertexProducer::nonTauTracksInPV
void nonTauTracksInPV(const reco::VertexRef &, const std::vector< edm::Ptr< reco::TrackBase > > &, std::vector< const reco::Track * > &) override
Definition: PFTauPrimaryVertexProducer.cc:23