1 |
+ |
//-------- |
2 |
+ |
// code copied from /UserCode/Mangano/WWAnalysis/Tools/interface/VertexReProducer.h |
3 |
+ |
//-------- |
4 |
+ |
|
5 |
+ |
#ifndef MITEDM_TOOLS_VERTEXREPRODUCER_H |
6 |
+ |
#define MITEDM_TOOLS_VERTEXREPRODUCER_H |
7 |
+ |
|
8 |
+ |
#include "DataFormats/Common/interface/Handle.h" |
9 |
+ |
#include "DataFormats/TrackReco/interface/TrackFwd.h" |
10 |
+ |
#include "DataFormats/BeamSpot/interface/BeamSpot.h" |
11 |
+ |
#include "DataFormats/VertexReco/interface/VertexFwd.h" |
12 |
+ |
|
13 |
+ |
#include "FWCore/Framework/interface/Event.h" |
14 |
+ |
#include "FWCore/Framework/interface/EventSetup.h" |
15 |
+ |
#include "FWCore/ParameterSet/interface/ParameterSet.h" |
16 |
+ |
#include "RecoVertex/VertexPrimitives/interface/TransientVertex.h" |
17 |
+ |
#include "RecoVertex/PrimaryVertexProducer/interface/PrimaryVertexProducerAlgorithm.h" |
18 |
+ |
|
19 |
+ |
class VertexReProducer |
20 |
+ |
{ |
21 |
+ |
public: |
22 |
+ |
/// This is the real constructor to be used |
23 |
+ |
VertexReProducer(const edm::Handle<reco::VertexCollection> &configFromOriginalVertexCollection, const edm::Event &iEvent ) ; |
24 |
+ |
/// This is only for testing |
25 |
+ |
VertexReProducer(const edm::ParameterSet &configByHand) { configure(configByHand); } |
26 |
+ |
|
27 |
+ |
/// Make the vertices |
28 |
+ |
std::vector<TransientVertex> makeVertices(const reco::TrackCollection &tracks, const reco::BeamSpot &bs, const edm::EventSetup &iSetup) const; |
29 |
+ |
|
30 |
+ |
/// Get the configuration used in the VertexProducer |
31 |
+ |
const edm::ParameterSet & inputConfig() const { return config_; } |
32 |
+ |
|
33 |
+ |
/// Get the InputTag of the TrackCollection used in the VertexProducer |
34 |
+ |
const edm::InputTag & inputTracks() const { return tracksTag_; } |
35 |
+ |
|
36 |
+ |
/// Get the InputTag of the BeamSpot used in the VertexProducer |
37 |
+ |
const edm::InputTag & inputBeamSpot() const { return beamSpotTag_; } |
38 |
+ |
private: |
39 |
+ |
void configure(const edm::ParameterSet &iConfig) ; |
40 |
+ |
|
41 |
+ |
edm::ParameterSet config_; |
42 |
+ |
edm::InputTag tracksTag_; |
43 |
+ |
edm::InputTag beamSpotTag_; |
44 |
+ |
std::auto_ptr<PrimaryVertexProducerAlgorithm> algo_; |
45 |
+ |
}; |
46 |
+ |
|
47 |
+ |
|
48 |
+ |
#endif |