18 #include "TLorentzVector.h" 31 booleanOutput = iConfig.
getParameter<
bool>(
"BooleanOutput");
42 double threeProngFlightPathSig(
const PFTauRef&)
const ;
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);
96 transientTracks.push_back(transientTrack);
99 if(transientTracks.size() > 1){
110 flightPathSignificance = vertexSignificance(primaryVertexNonConst,secVer,tauDir);
113 return flightPathSignificance;
T getParameter(std::string const &) const
bool isNonnull() const
Checks for non-null.
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
static Measurement1D computeDist3d(const reco::Vertex &pv, const SV &sv, const GlobalVector &direction, bool withPVError)
double vertexSignificance(reco::Vertex const &, reco::Vertex const &, GlobalVector const &) const
PFRecoTauDiscriminationByFlightPathSignificance(const ParameterSet &iConfig)
reco::TrackRef trackRef() const
double threeProngFlightPathSig(const PFTauRef &) const
const TransientTrackBuilder * transientTrackBuilder
bool isNull() const
Checks for null.
double significance() const
reco::tau::RecoTauVertexAssociator * vertexAssociator_
Particle reconstructed by the particle flow algorithm.
reco::GsfTrackRef gsfTrackRef() const
double discriminate(const reco::PFTauRef &) const override
~PFRecoTauDiscriminationByFlightPathSignificance()
T const * product() const