18 #include "TLorentzVector.h"
29 flightPathSig = iConfig.
getParameter<
double>(
"flightPathSig");
31 booleanOutput = iConfig.
getParameter<
bool>(
"BooleanOutput");
42 double threeProngFlightPathSig(
const PFTauRef&);
57 vertexAssociator_->setEvent(iEvent);
62 transientTrackBuilder = builder.
product();
68 if(booleanOutput)
return ( threeProngFlightPathSig(tau) > flightPathSig ? 1. : 0. );
69 return threeProngFlightPathSig(tau);
74 double flightPathSignificance = 0;
78 if (primaryVertex.
isNull()) {
79 edm::LogError(
"FlightPathSignficance") <<
"Could not get vertex associated"
80 <<
" to tau, returning -999!" << std::endl;
85 const vector<PFCandidatePtr>& pfSignalCandidates = tau->signalPFChargedHadrCands();
86 vector<TransientTrack> transientTracks;
87 vector<PFCandidatePtr>::const_iterator iTrack;
88 for(iTrack = pfSignalCandidates.begin(); iTrack!= pfSignalCandidates.end(); iTrack++){
92 transientTracks.push_back(transientTrack);
95 if(transientTracks.size() > 1){
106 flightPathSignificance = vertexSignificance(primaryVertexNonConst,secVer,tauDir);
109 return flightPathSignificance;
T getParameter(std::string const &) const
double discriminate(const reco::PFTauRef &) override
double vertexSignificance(reco::Vertex &, reco::Vertex &, GlobalVector &)
void beginEvent(const edm::Event &, const edm::EventSetup &) override
#define DEFINE_FWK_MODULE(type)
virtual CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &tracks) const
PFRecoTauDiscriminationByFlightPathSignificance(const ParameterSet &iConfig)
reco::TrackRef trackRef() const
double threeProngFlightPathSig(const PFTauRef &)
bool isNonnull() const
Checks for non-null.
bool isNull() const
Checks for null.
const TransientTrackBuilder * transientTrackBuilder
static Measurement1D computeDist3d(const reco::Vertex &pv, const reco::Vertex &sv, const GlobalVector &direction, bool withPVError)
double significance() const
reco::tau::RecoTauVertexAssociator * vertexAssociator_
T const * product() const
Particle reconstructed by the particle flow algorithm.
~PFRecoTauDiscriminationByFlightPathSignificance()