CMS 3D CMS Logo

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