18 #include "TLorentzVector.h"
29 flightPathSig = iConfig.
getParameter<
double>(
"flightPathSig");
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);
95 if(transientTracks.size() > 1){
106 flightPathSignificance = vertexSignificance(primaryVertexNonConst,secVer,tauDir);
109 return flightPathSignificance;
T getParameter(std::string const &) const
bool isNonnull() const
Checks for non-null.
void beginEvent(const edm::Event &, const edm::EventSetup &) override
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
double discriminate(const reco::PFTauRef &) const override
const TransientTrackBuilder * transientTrackBuilder
bool isNull() const
Checks for null.
DEFINE_FWK_MODULE(CosmicTrackingParticleSelector)
double significance() const
reco::tau::RecoTauVertexAssociator * vertexAssociator_
T const * product() const
Particle reconstructed by the particle flow algorithm.
~PFRecoTauDiscriminationByFlightPathSignificance()