CMS 3D CMS Logo

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 
25 
26 namespace pat {
27 
29  public:
30  explicit PATSingleVertexSelector(const edm::ParameterSet& iConfig);
31  ~PATSingleVertexSelector() override;
32 
33  bool filter(edm::Event& iEvent, const edm::EventSetup& iSetup) override;
34 
35  private:
39 
40  Mode parseMode(const std::string& name) const;
41 
42  std::unique_ptr<std::vector<reco::Vertex> > filter_(Mode mode,
43  const edm::Event& iEvent,
44  const edm::EventSetup& iSetup);
45  bool hasMode_(Mode mode) const;
46  // configurables
47  std::vector<Mode> modes_; // mode + optional fallbacks
49  std::vector<edm::EDGetTokenT<edm::View<reco::Candidate> > > candidatesToken_;
53  // transient data. meaningful while 'filter()' is on the stack
54  std::vector<reco::VertexRef> selVtxs_;
56 
57  // flag to enable/disable EDFilter functionality:
58  // if set to false, PATSingleVertexSelector selects the "one" event vertex,
59  // but does not reject any events
61  };
62 
63 } // namespace pat
64 
65 #endif
pat::PATSingleVertexSelector::hasMode_
bool hasMode_(Mode mode) const
Definition: PATSingleVertexSelector.cc:64
pat::PATSingleVertexSelector::FromBeamSpot
Definition: PATSingleVertexSelector.h:36
pat::PATSingleVertexSelector::beamSpotToken_
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
Definition: PATSingleVertexSelector.h:52
pat::PATSingleVertexSelector::modes_
std::vector< Mode > modes_
Definition: PATSingleVertexSelector.h:47
pat::PATSingleVertexSelector::verticesToken_
edm::EDGetTokenT< std::vector< reco::Vertex > > verticesToken_
Definition: PATSingleVertexSelector.h:48
edm::EDGetTokenT
Definition: EDGetToken.h:33
pat::PATSingleVertexSelector::~PATSingleVertexSelector
~PATSingleVertexSelector() override
Definition: PATSingleVertexSelector.cc:62
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition: ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
pat::PATSingleVertexSelector::NearestToCand
Definition: PATSingleVertexSelector.h:36
pat::PATSingleVertexSelector::PATSingleVertexSelector
PATSingleVertexSelector(const edm::ParameterSet &iConfig)
Definition: PATSingleVertexSelector.cc:27
CandidateFwd.h
pat::PATSingleVertexSelector::bestCand_
reco::CandidatePtr bestCand_
Definition: PATSingleVertexSelector.h:55
pat::PATSingleVertexSelector::parseMode
Mode parseMode(const std::string &name) const
Definition: PATSingleVertexSelector.cc:12
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Vertex.h
pat::PATSingleVertexSelector
Produces a list containing a single vertex selected by some criteria.
Definition: PATSingleVertexSelector.h:28
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
pat::PATSingleVertexSelector::vtxPreselection_
const VtxSel vtxPreselection_
Definition: PATSingleVertexSelector.h:50
iEvent
int iEvent
Definition: GenABIO.cc:224
pat::PATSingleVertexSelector::filter
bool filter(edm::Event &iEvent, const edm::EventSetup &iSetup) override
Definition: PATSingleVertexSelector.cc:68
edm::EventSetup
Definition: EventSetup.h:57
pat
Definition: HeavyIon.h:7
pat::PATSingleVertexSelector::First
Definition: PATSingleVertexSelector.h:36
InputTag.h
edm::Ptr< Candidate >
VertexFwd.h
StringCutObjectSelector.h
pat::PATSingleVertexSelector::VtxSel
StringCutObjectSelector< reco::Vertex > VtxSel
Definition: PATSingleVertexSelector.h:37
StringCutObjectSelector< reco::Vertex >
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
pat::PATSingleVertexSelector::CandSel
StringCutObjectSelector< reco::Candidate > CandSel
Definition: PATSingleVertexSelector.h:38
pat::PATSingleVertexSelector::doFilterEvents_
bool doFilterEvents_
Definition: PATSingleVertexSelector.h:60
pat::PATSingleVertexSelector::Mode
Mode
Definition: PATSingleVertexSelector.h:36
EDFilter.h
Candidate.h
ParameterSet.h
pat::PATSingleVertexSelector::filter_
std::unique_ptr< std::vector< reco::Vertex > > filter_(Mode mode, const edm::Event &iEvent, const edm::EventSetup &iSetup)
Definition: PATSingleVertexSelector.cc:127
edm::stream::EDFilter
Definition: EDFilter.h:38
edm::Event
Definition: Event.h:73
pat::PATSingleVertexSelector::selVtxs_
std::vector< reco::VertexRef > selVtxs_
Definition: PATSingleVertexSelector.h:54
pat::PATSingleVertexSelector::candidatesToken_
std::vector< edm::EDGetTokenT< edm::View< reco::Candidate > > > candidatesToken_
Definition: PATSingleVertexSelector.h:49
pat::PATSingleVertexSelector::FromCand
Definition: PATSingleVertexSelector.h:36
pat::PATSingleVertexSelector::candPreselection_
const CandSel candPreselection_
Definition: PATSingleVertexSelector.h:51