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 //
5 
20 
23 
24 namespace pat {
25 
27 
28  public:
29 
30  explicit PATSingleVertexSelector(const edm::ParameterSet & iConfig);
32 
33  virtual bool filter(edm::Event & iEvent, const edm::EventSetup& iSetup) override;
34 
35  private:
39 
40  static Mode parseMode(const std::string &name) ;
41  std::auto_ptr<std::vector<reco::Vertex> >
42  filter_(Mode mode, const edm::Event & iEvent, const edm::EventSetup & iSetup);
43  bool hasMode_(Mode mode) const ;
44  // configurables
45  std::vector<Mode> modes_; // mode + optional fallbacks
47  std::vector<edm::EDGetTokenT<edm::View<reco::Candidate> > > candidatesToken_;
48  std::auto_ptr<VtxSel > vtxPreselection_;
49  std::auto_ptr<CandSel> candPreselection_;
51  // transient data. meaningful while 'filter()' is on the stack
52  std::vector<const reco::Vertex *> selVtxs_;
54 
55  // flag to enable/disable EDFilter functionality:
56  // if set to false, PATSingleVertexSelector selects the "one" event vertex,
57  // but does not reject any events
59  };
60 
61 }
62 
63 #endif
64 
Produces a list containing a single vertex selected by some criteria.
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
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)
edm::EDGetTokenT< std::vector< reco::Vertex > > verticesToken_
std::auto_ptr< CandSel > candPreselection_
std::vector< const reco::Vertex * > selVtxs_
int iEvent
Definition: GenABIO.cc:230
std::vector< edm::EDGetTokenT< edm::View< reco::Candidate > > > candidatesToken_
virtual bool filter(edm::Event &iEvent, const edm::EventSetup &iSetup) override
PATSingleVertexSelector(const edm::ParameterSet &iConfig)
StringCutObjectSelector< reco::Vertex > VtxSel
StringCutObjectSelector< reco::Candidate > CandSel
const reco::Candidate * bestCand_