19 #include "TLorentzVector.h"
31 vertexAssociator_(iConfig.getParameter<
ParameterSet>(
"qualityCuts")) {
32 flightPathSig = iConfig.
getParameter<
double>(
"flightPathSig");
34 booleanOutput = iConfig.
getParameter<
bool>(
"BooleanOutput");
43 double threeProngFlightPathSig(
const PFTauRef&);
58 vertexAssociator_.setEvent(iEvent);
63 transientTrackBuilder = builder.
product();
69 if(booleanOutput)
return ( threeProngFlightPathSig(tau) > flightPathSig ? 1. : 0. );
70 return threeProngFlightPathSig(tau);
75 double flightPathSignificance = 0;
77 reco::VertexRef primaryVertex = vertexAssociator_.associatedVertex(*tau);
79 if (primaryVertex.
isNull()) {
80 edm::LogError(
"FlightPathSignficance") <<
"Could not get vertex associated"
81 <<
" to tau, returning -999!" << std::endl;
87 vector<TransientTrack> transientTracks;
89 for(iTrack = pfSignalCandidates.
begin(); iTrack!= pfSignalCandidates.
end(); iTrack++){
93 transientTracks.push_back(transientTrack);
96 if(transientTracks.size() > 1){
107 flightPathSignificance = vertexSignificance(primaryVertexNonConst,secVer,tauDir);
110 return flightPathSignificance;
T getParameter(std::string const &) const
reco::tau::RecoTauVertexAssociator vertexAssociator_
double vertexSignificance(reco::Vertex &, reco::Vertex &, GlobalVector &)
virtual CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &tracks) const
PFRecoTauDiscriminationByFlightPathSignificance(const ParameterSet &iConfig)
const_iterator end() const
Termination of iteration.
double discriminate(const reco::PFTauRef &)
const_iterator begin() const
Initialize an iterator over the RefVector.
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)
DEFINE_FWK_MODULE(CosmicTrackingParticleSelector)
double significance() const
T const * product() const
Particle reconstructed by the particle flow algorithm.
void beginEvent(const edm::Event &, const edm::EventSetup &)
~PFRecoTauDiscriminationByFlightPathSignificance()