Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:49:19

0001 #ifndef HeavyFlavorAnalysis_Onia2MuMu_interface_OniaVtxReProducer_h
0002 #define HeavyFlavorAnalysis_Onia2MuMu_interface_OniaVtxReProducer_h
0003 
0004 #include "DataFormats/Common/interface/Handle.h"
0005 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0006 #include "DataFormats/BeamSpot/interface/BeamSpot.h"
0007 #include "DataFormats/VertexReco/interface/VertexFwd.h"
0008 
0009 #include "FWCore/Framework/interface/Event.h"
0010 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0011 #include "RecoVertex/VertexPrimitives/interface/TransientVertex.h"
0012 #include "RecoVertex/PrimaryVertexProducer/interface/PrimaryVertexProducerAlgorithm.h"
0013 #include "TrackingTools/TransientTrack/interface/TransientTrackBuilder.h"
0014 
0015 class OniaVtxReProducer {
0016 public:
0017   /// This is the real constructor to be used
0018   OniaVtxReProducer(const edm::Handle<reco::VertexCollection> &configFromOriginalVertexCollection,
0019                     const edm::Event &iEvent);
0020   /// This is only for testing
0021   OniaVtxReProducer(const edm::ParameterSet &configByHand) { configure(configByHand); }
0022 
0023   /// Make the vertices
0024   std::vector<TransientVertex> makeVertices(const reco::TrackCollection &tracks,
0025                                             const reco::BeamSpot &bs,
0026                                             const TransientTrackBuilder &theB) const;
0027 
0028   /// Get the configuration used in the VertexProducer
0029   const edm::ParameterSet &inputConfig() const { return config_; }
0030 
0031   /// Get the InputTag of the TrackCollection used in the VertexProducer
0032   const edm::InputTag &inputTracks() const { return tracksTag_; }
0033 
0034   /// Get the InputTag of the BeamSpot used in the VertexProducer
0035   const edm::InputTag &inputBeamSpot() const { return beamSpotTag_; }
0036 
0037 private:
0038   void configure(const edm::ParameterSet &iConfig);
0039 
0040   edm::ParameterSet config_;
0041   edm::InputTag tracksTag_;
0042   edm::InputTag beamSpotTag_;
0043   std::unique_ptr<PrimaryVertexProducerAlgorithm> algo_;
0044 };
0045 
0046 #endif