CMS 3D CMS Logo

PFTauPrimaryVertexProducerBase.h
Go to the documentation of this file.
1 #ifndef RecoTauTag_RecoTau_PFTauPrimaryVertexProducerBase_H_
2 #define RecoTauTag_RecoTau_PFTauPrimaryVertexProducerBase_H_
3 
4 /* class PFTauPrimaryVertexProducerBase
5  * EDProducer of the
6  * authors: Ian M. Nugent
7  * This work is based on the impact parameter work by Rosamaria Venditti and reconstructing the 3 prong taus.
8  * The idea of the fully reconstructing the tau using a kinematic fit comes from
9  * Lars Perchalla and Philip Sauerland Theses under Achim Stahl supervision. This
10  * work was continued by Ian M. Nugent and Vladimir Cherepanov.
11  * Thanks goes to Christian Veelken and Evan Klose Friis for their help and suggestions.
12  */
13 
20 
32 
35 
40 
41 #include <TFormula.h>
42 
44 public:
45  enum Alg { useInputPV = 0, useFrontPV };
46 
47  struct DiscCutPair {
48  DiscCutPair() : discr_(nullptr), cutFormula_(nullptr) {}
49  ~DiscCutPair() { delete cutFormula_; }
52  double cut_;
53  TFormula* cutFormula_;
54  };
55  typedef std::vector<DiscCutPair*> DiscCutPairVec;
56 
57  explicit PFTauPrimaryVertexProducerBase(const edm::ParameterSet& iConfig);
59  void produce(edm::Event&, const edm::EventSetup&) override;
60 
62 
63  // called at the beginning of every event - override if necessary
64  virtual void beginEvent(const edm::Event&, const edm::EventSetup&) {}
65 
66 protected:
67  // abstract function implemented in derived classes
68  virtual void nonTauTracksInPV(const reco::VertexRef&,
70  std::vector<const reco::Track*>&) = 0;
71 
72 private:
86  std::unique_ptr<StringCutObjectSelector<reco::PFTau> > cut_;
87  std::unique_ptr<reco::tau::RecoTauVertexAssociator> vertexAssociator_;
88 };
89 
90 #endif
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
edm::EDGetTokenT< edm::View< reco::Muon > > muonToken_
edm::EDGetTokenT< reco::VertexCollection > pvToken_
virtual void beginEvent(const edm::Event &, const edm::EventSetup &)
edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > transTrackBuilderToken_
std::vector< DiscCutPair * > DiscCutPairVec
edm::EDGetTokenT< std::vector< reco::PFTau > > pftauToken_
std::unique_ptr< reco::tau::RecoTauVertexAssociator > vertexAssociator_
virtual void nonTauTracksInPV(const reco::VertexRef &, const std::vector< edm::Ptr< reco::TrackBase > > &, std::vector< const reco::Track *> &)=0
PFTauPrimaryVertexProducerBase(const edm::ParameterSet &iConfig)
static edm::ParameterSetDescription getDescriptionsBase()
void produce(edm::Event &, const edm::EventSetup &) override
std::unique_ptr< StringCutObjectSelector< reco::PFTau > > cut_
edm::EDGetTokenT< reco::PFTauDiscriminator > inputToken_
edm::EDGetTokenT< edm::View< reco::Electron > > electronToken_