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