CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SecondaryVertexFilter.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: SecondaryVertexFilter
4 // Class: SecondaryVertexFilter
5 //
13 //
14 // Original Author: Andrea RIZZI
15 // Created: Mon Dec 7 18:02:10 CET 2009
16 // $Id: SecondaryVertexFilter.cc,v 1.2 2010/02/17 23:39:10 wmtan Exp $
17 //
18 //
19 
20 
21 // system include files
22 #include <memory>
23 
24 // user include files
27 
30 
36 //
37 // class declaration
38 //
39 
41  public:
44 
45  private:
46  virtual bool filter(edm::Event&, const edm::EventSetup&) override;
48  unsigned int minNumTracks;
49  double maxAbsZ;
50  double maxd0;
51  // ----------member data ---------------------------
52 };
53 
55 {
56  vertexSrc = iConfig.getParameter<edm::InputTag>("vertexCollection");
57  minNumTracks = iConfig.getParameter<unsigned int>("minimumNumberOfTracks");
58  maxAbsZ = iConfig.getParameter<double>("maxAbsZ");
59  maxd0 = iConfig.getParameter<double>("maxd0");
60 
61 }
62 
63 
65 {
66 }
67 
68 bool
70 {
71  bool result = false;
73  iEvent.getByLabel(vertexSrc,pvHandle);
75  for(reco::SecondaryVertexTagInfoCollection::const_iterator it=vertices.begin() ; it!=vertices.end() ; ++it)
76  {
77  if(it->nVertices() > 0) result = true;
78 // if(it->tracksSize() > minNumTracks &&
79  // ( (maxAbsZ <=0 ) || fabs(it->z()) <= maxAbsZ ) &&
80  // ( (maxd0 <=0 ) || fabs(it->position().rho()) <= maxd0 )
81  //) result = true;
82  }
83 
84  return result;
85 }
86 
87 
88 //define this as a plug-in
T getParameter(std::string const &) const
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
virtual bool filter(edm::Event &, const edm::EventSetup &) override
int iEvent
Definition: GenABIO.cc:230
std::vector< SecondaryVertexTagInfo > SecondaryVertexTagInfoCollection
tuple result
Definition: query.py:137
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:420
T const * product() const
Definition: Handle.h:81
SecondaryVertexFilter(const edm::ParameterSet &)