CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PATSingleVertexSelector.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_PatAlgos_PATSingleVertexSelector_h
2 #define PhysicsTools_PatAlgos_PATSingleVertexSelector_h
3 //
4 // $Id: PATSingleVertexSelector.h,v 1.6 2013/02/27 23:26:56 wmtan Exp $
5 //
6 
21 
24 
25 namespace pat {
26 
28 
29  public:
30 
31  explicit PATSingleVertexSelector(const edm::ParameterSet & iConfig);
33 
34  virtual bool filter(edm::Event & iEvent, const edm::EventSetup& iSetup) override;
35 
36  private:
40 
41  static Mode parseMode(const std::string &name) ;
42  std::auto_ptr<std::vector<reco::Vertex> >
43  filter_(Mode mode, const edm::Event & iEvent, const edm::EventSetup & iSetup);
44  bool hasMode_(Mode mode) const ;
45  // configurables
46  std::vector<Mode> modes_; // mode + optional fallbacks
48  std::vector<edm::InputTag> candidates_;
49  std::auto_ptr<VtxSel > vtxPreselection_;
50  std::auto_ptr<CandSel> candPreselection_;
52  // transient data. meaningful while 'filter()' is on the stack
53  std::vector<const reco::Vertex *> selVtxs_;
55 
56  // flag to enable/disable EDFilter functionality:
57  // if set to false, PATSingleVertexSelector selects the "one" event vertex,
58  // but does not reject any events
60  };
61 
62 }
63 
64 #endif
65 
Produces a list containing a single vertex selected by some criteria.
std::auto_ptr< VtxSel > vtxPreselection_
std::auto_ptr< std::vector< reco::Vertex > > filter_(Mode mode, const edm::Event &iEvent, const edm::EventSetup &iSetup)
static Mode parseMode(const std::string &name)
std::auto_ptr< CandSel > candPreselection_
std::vector< const reco::Vertex * > selVtxs_
int iEvent
Definition: GenABIO.cc:243
virtual bool filter(edm::Event &iEvent, const edm::EventSetup &iSetup) override
PATSingleVertexSelector(const edm::ParameterSet &iConfig)
StringCutObjectSelector< reco::Vertex > VtxSel
StringCutObjectSelector< reco::Candidate > CandSel
std::vector< edm::InputTag > candidates_
const reco::Candidate * bestCand_