Public Member Functions | |
void | beginEvent (const edm::Event &, const edm::EventSetup &) |
CaloRecoTauDiscriminationByFlightPathSignificance (const edm::ParameterSet &iConfig) | |
double | discriminate (const reco::CaloTauRef &) |
~CaloRecoTauDiscriminationByFlightPathSignificance () | |
Private Member Functions | |
double | threeProngFlightPathSig (const CaloTauRef &) |
double | vertexSignificance (reco::Vertex &, reco::Vertex &, GlobalVector &) |
Private Attributes | |
bool | booleanOutput |
double | flightPathSig |
reco::Vertex | primaryVertex |
edm::InputTag | PVProducer |
const TransientTrackBuilder * | transientTrackBuilder |
bool | withPVError |
Definition at line 22 of file CaloRecoTauDiscriminationByFlightPathSignificance.cc.
CaloRecoTauDiscriminationByFlightPathSignificance::CaloRecoTauDiscriminationByFlightPathSignificance | ( | const edm::ParameterSet & | iConfig | ) | [inline, explicit] |
Definition at line 24 of file CaloRecoTauDiscriminationByFlightPathSignificance.cc.
References edm::ParameterSet::getParameter().
:CaloTauDiscriminationProducerBase(iConfig) { flightPathSig = iConfig.getParameter<double>("flightPathSig"); withPVError = iConfig.getParameter<bool>("UsePVerror"); PVProducer = iConfig.getParameter<edm::InputTag>("PVProducer"); booleanOutput = iConfig.getParameter<bool>("BooleanOutput"); }
CaloRecoTauDiscriminationByFlightPathSignificance::~CaloRecoTauDiscriminationByFlightPathSignificance | ( | ) | [inline] |
Definition at line 34 of file CaloRecoTauDiscriminationByFlightPathSignificance.cc.
{}
void CaloRecoTauDiscriminationByFlightPathSignificance::beginEvent | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [virtual] |
Reimplemented from TauDiscriminationProducerBase< TauType, TauDiscriminator >.
Definition at line 52 of file CaloRecoTauDiscriminationByFlightPathSignificance.cc.
References edm::View< T >::begin(), edm::EventSetup::get(), edm::Event::getByLabel(), edm::ESHandle< T >::product(), and GoodVertex_cfg::vertexCollection.
{ //Primary vertex edm::Handle<edm::View<reco::Vertex> > vertexHandle; iEvent.getByLabel(PVProducer, vertexHandle); const edm::View<reco::Vertex>& vertexCollection(*vertexHandle); primaryVertex = *(vertexCollection.begin()); // Transient Tracks edm::ESHandle<TransientTrackBuilder> builder; iSetup.get<TransientTrackRecord>().get("TransientTrackBuilder",builder); transientTrackBuilder = builder.product(); }
double CaloRecoTauDiscriminationByFlightPathSignificance::discriminate | ( | const reco::CaloTauRef & | tau | ) | [virtual] |
Implements TauDiscriminationProducerBase< TauType, TauDiscriminator >.
Definition at line 66 of file CaloRecoTauDiscriminationByFlightPathSignificance.cc.
{ if(booleanOutput) return ( threeProngFlightPathSig(tau) > flightPathSig ? 1. : 0. ); return threeProngFlightPathSig(tau); }
double CaloRecoTauDiscriminationByFlightPathSignificance::threeProngFlightPathSig | ( | const CaloTauRef & | tau | ) | [private] |
Definition at line 74 of file CaloRecoTauDiscriminationByFlightPathSignificance.cc.
References i, TransientVertex::isValid(), edm::RefVector< C, T, F >::size(), and KalmanVertexFitter::vertex().
{ double flightPathSignificance = 0; //Secondary vertex reco::TrackRefVector signalTracks = tau->signalTracks(); vector<TransientTrack> transientTracks; for(size_t i = 0; i < signalTracks.size(); ++i){ const TransientTrack transientTrack = transientTrackBuilder->build(signalTracks[i]); transientTracks.push_back(transientTrack); } if(transientTracks.size() > 1) { KalmanVertexFitter kvf(true); TransientVertex tv = kvf.vertex(transientTracks); if(tv.isValid()){ GlobalVector tauDir(tau->px(), tau->py(), tau->pz()); Vertex secVer = tv; flightPathSignificance = vertexSignificance(primaryVertex,secVer,tauDir); } } return flightPathSignificance; }
double CaloRecoTauDiscriminationByFlightPathSignificance::vertexSignificance | ( | reco::Vertex & | pv, |
reco::Vertex & | sv, | ||
GlobalVector & | direction | ||
) | [private] |
Definition at line 98 of file CaloRecoTauDiscriminationByFlightPathSignificance.cc.
References reco::SecondaryVertex::computeDist3d(), and Measurement1D::significance().
{ return SecondaryVertex::computeDist3d( pv,sv,direction,withPVError).significance(); }
Definition at line 49 of file CaloRecoTauDiscriminationByFlightPathSignificance.cc.
double CaloRecoTauDiscriminationByFlightPathSignificance::flightPathSig [private] |
Definition at line 42 of file CaloRecoTauDiscriminationByFlightPathSignificance.cc.
Definition at line 45 of file CaloRecoTauDiscriminationByFlightPathSignificance.cc.
Definition at line 47 of file CaloRecoTauDiscriminationByFlightPathSignificance.cc.
const TransientTrackBuilder* CaloRecoTauDiscriminationByFlightPathSignificance::transientTrackBuilder [private] |
Definition at line 46 of file CaloRecoTauDiscriminationByFlightPathSignificance.cc.
Definition at line 43 of file CaloRecoTauDiscriminationByFlightPathSignificance.cc.