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 
36 
37 #include <TFormula.h>
38 
40 public:
41  enum Alg { useInputPV = 0, useFrontPV };
42 
43  struct DiscCutPair {
44  DiscCutPair() : discr_(nullptr), cutFormula_(nullptr) {}
45  ~DiscCutPair() { delete cutFormula_; }
48  double cut_;
49  TFormula* cutFormula_;
50  };
51  typedef std::vector<DiscCutPair*> DiscCutPairVec;
52 
53  explicit PFTauPrimaryVertexProducerBase(const edm::ParameterSet& iConfig);
55  void produce(edm::Event&, const edm::EventSetup&) override;
56 
58 
59  // called at the beginning of every event - override if necessary
60  virtual void beginEvent(const edm::Event&, const edm::EventSetup&) {}
61 
62 protected:
63  // abstract function implemented in derived classes
64  virtual void nonTauTracksInPV(const reco::VertexRef&,
65  const std::vector<edm::Ptr<reco::TrackBase> >&,
66  std::vector<const reco::Track*>&) = 0;
67 
68 private:
81  std::unique_ptr<StringCutObjectSelector<reco::PFTau> > cut_;
82  std::unique_ptr<reco::tau::RecoTauVertexAssociator> vertexAssociator_;
83 };
84 
85 #endif
ConfigurationDescriptions.h
PFTauPrimaryVertexProducerBase::cut_
std::unique_ptr< StringCutObjectSelector< reco::PFTau > > cut_
Definition: PFTauPrimaryVertexProducerBase.h:81
PFTauPrimaryVertexProducerBase::algorithm_
int algorithm_
Definition: PFTauPrimaryVertexProducerBase.h:74
PFTauFwd.h
PFTauPrimaryVertexProducerBase::removeMuonTracks_
bool removeMuonTracks_
Definition: PFTauPrimaryVertexProducerBase.h:78
PFTauPrimaryVertexProducerBase::useInputPV
Definition: PFTauPrimaryVertexProducerBase.h:41
Muon.h
PFTauPrimaryVertexProducerBase::DiscCutPair::DiscCutPair
DiscCutPair()
Definition: PFTauPrimaryVertexProducerBase.h:44
PFTauPrimaryVertexProducerBase::Alg
Alg
Definition: PFTauPrimaryVertexProducerBase.h:41
PFTauPrimaryVertexProducerBase::DiscCutPair
Definition: PFTauPrimaryVertexProducerBase.h:43
PFTauDiscriminator.h
PFTauPrimaryVertexProducerBase::qualityCutsPSet_
edm::ParameterSet qualityCutsPSet_
Definition: PFTauPrimaryVertexProducerBase.h:75
edm::EDGetTokenT< reco::PFTauDiscriminator >
PFTauPrimaryVertexProducerBase::DiscCutPairVec
std::vector< DiscCutPair * > DiscCutPairVec
Definition: PFTauPrimaryVertexProducerBase.h:51
reco::PFTauDiscriminator
Definition: PFTauDiscriminator.h:12
PFTauPrimaryVertexProducerBase::pftauToken_
edm::EDGetTokenT< std::vector< reco::PFTau > > pftauToken_
Definition: PFTauPrimaryVertexProducerBase.h:69
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
EDProducer.h
PFTauPrimaryVertexProducerBase::muonToken_
edm::EDGetTokenT< edm::View< reco::Muon > > muonToken_
Definition: PFTauPrimaryVertexProducerBase.h:71
PFTauPrimaryVertexProducerBase::nonTauTracksInPV
virtual void nonTauTracksInPV(const reco::VertexRef &, const std::vector< edm::Ptr< reco::TrackBase > > &, std::vector< const reco::Track * > &)=0
PFTauPrimaryVertexProducerBase::~PFTauPrimaryVertexProducerBase
~PFTauPrimaryVertexProducerBase() override
Definition: PFTauPrimaryVertexProducerBase.cc:56
RecoTauVertexAssociator.h
PFTauPrimaryVertexProducerBase::DiscCutPair::discr_
const reco::PFTauDiscriminator * discr_
Definition: PFTauPrimaryVertexProducerBase.h:46
edm::Ref< VertexCollection >
PFTauPrimaryVertexProducerBase::beginEvent
virtual void beginEvent(const edm::Event &, const edm::EventSetup &)
Definition: PFTauPrimaryVertexProducerBase.h:60
PFTauPrimaryVertexProducerBase::useSelectedTaus_
bool useSelectedTaus_
Definition: PFTauPrimaryVertexProducerBase.h:77
PFTauPrimaryVertexProducerBase::useBeamSpot_
bool useBeamSpot_
Definition: PFTauPrimaryVertexProducerBase.h:76
Track.h
TrackFwd.h
BeamSpot.h
PFTauPrimaryVertexProducerBase::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: PFTauPrimaryVertexProducerBase.cc:78
PFTauPrimaryVertexProducerBase::useFrontPV
Definition: PFTauPrimaryVertexProducerBase.h:41
MuonFwd.h
PFTauPrimaryVertexProducerBase::PFTauPrimaryVertexProducerBase
PFTauPrimaryVertexProducerBase(const edm::ParameterSet &iConfig)
Definition: PFTauPrimaryVertexProducerBase.cc:20
Vertex.h
ElectronFwd.h
edm::ParameterSet
Definition: ParameterSet.h:36
Event.h
PFTauPrimaryVertexProducerBase::electronToken_
edm::EDGetTokenT< edm::View< reco::Electron > > electronToken_
Definition: PFTauPrimaryVertexProducerBase.h:70
edm::stream::EDProducer
Definition: EDProducer.h:38
edm::EventSetup
Definition: EventSetup.h:57
PFTauPrimaryVertexProducerBase::DiscCutPair::cutFormula_
TFormula * cutFormula_
Definition: PFTauPrimaryVertexProducerBase.h:49
edm::Ptr
Definition: AssociationVector.h:31
VertexFwd.h
PFTauPrimaryVertexProducerBase::DiscCutPair::cut_
double cut_
Definition: PFTauPrimaryVertexProducerBase.h:48
Electron.h
StringCutObjectSelector.h
Frameworkfwd.h
PFTauPrimaryVertexProducerBase::getDescriptionsBase
static edm::ParameterSetDescription getDescriptionsBase()
Definition: PFTauPrimaryVertexProducerBase.cc:220
PFTau.h
PFTauPrimaryVertexProducerBase::DiscCutPair::~DiscCutPair
~DiscCutPair()
Definition: PFTauPrimaryVertexProducerBase.h:45
PFTauPrimaryVertexProducerBase
Definition: PFTauPrimaryVertexProducerBase.h:39
EventSetup.h
PFTauPrimaryVertexProducerBase::removeElectronTracks_
bool removeElectronTracks_
Definition: PFTauPrimaryVertexProducerBase.h:79
PFTauPrimaryVertexProducerBase::discriminators_
DiscCutPairVec discriminators_
Definition: PFTauPrimaryVertexProducerBase.h:80
ParameterSet.h
PFTauPrimaryVertexProducerBase::DiscCutPair::inputToken_
edm::EDGetTokenT< reco::PFTauDiscriminator > inputToken_
Definition: PFTauPrimaryVertexProducerBase.h:47
PFTauPrimaryVertexProducerBase::vertexAssociator_
std::unique_ptr< reco::tau::RecoTauVertexAssociator > vertexAssociator_
Definition: PFTauPrimaryVertexProducerBase.h:82
edm::Event
Definition: Event.h:73
PFTauPrimaryVertexProducerBase::pvToken_
edm::EDGetTokenT< reco::VertexCollection > pvToken_
Definition: PFTauPrimaryVertexProducerBase.h:72
PFTauPrimaryVertexProducerBase::beamSpotToken_
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
Definition: PFTauPrimaryVertexProducerBase.h:73