#include <ImpactParameterAlgorithm.h>
Public Member Functions | |
ImpactParameterAlgorithm (const edm::ParameterSet ¶meters) | |
ImpactParameterAlgorithm () | |
void | setPrimaryVertex (reco::Vertex *pv) |
void | setTransientTrackBuilder (const TransientTrackBuilder *) |
std::pair< float, reco::TauImpactParameterInfo > | tag (const reco::IsolatedTauTagInfoRef &, const reco::Vertex &) |
~ImpactParameterAlgorithm () | |
Private Attributes | |
double | ip_max |
double | ip_min |
reco::Vertex * | primaryVertex |
double | sip_min |
const TransientTrackBuilder * | transientTrackBuilder |
bool | use3D |
bool | use_sign |
Definition at line 23 of file ImpactParameterAlgorithm.h.
ImpactParameterAlgorithm::ImpactParameterAlgorithm | ( | const edm::ParameterSet & | parameters | ) |
Definition at line 16 of file ImpactParameterAlgorithm.cc.
References edm::ParameterSet::getParameter(), ip_max, ip_min, sip_min, use3D, and use_sign.
{ ip_min = parameters.getParameter<double>("TauImpactParameterMin"); ip_max = parameters.getParameter<double>("TauImpactParameterMax"); sip_min = parameters.getParameter<double>("TauImpactParameterSignificanceMin"); use_sign = parameters.getParameter<bool>("UseTauImpactParameterSign"); use3D = parameters.getParameter<bool>("UseTau3DImpactParameter"); }
ImpactParameterAlgorithm::ImpactParameterAlgorithm | ( | ) |
ImpactParameterAlgorithm::~ImpactParameterAlgorithm | ( | ) | [inline] |
Definition at line 34 of file ImpactParameterAlgorithm.h.
{}
void ImpactParameterAlgorithm::setPrimaryVertex | ( | reco::Vertex * | pv | ) | [inline] |
Definition at line 36 of file ImpactParameterAlgorithm.h.
References primaryVertex.
{primaryVertex = pv;}
void ImpactParameterAlgorithm::setTransientTrackBuilder | ( | const TransientTrackBuilder * | builder | ) |
Definition at line 25 of file ImpactParameterAlgorithm.cc.
References transientTrackBuilder.
Referenced by ImpactParameter::produce().
{ transientTrackBuilder = builder; }
std::pair< float, reco::TauImpactParameterInfo > ImpactParameterAlgorithm::tag | ( | const reco::IsolatedTauTagInfoRef & | tauRef, |
const reco::Vertex & | pv | ||
) |
Definition at line 30 of file ImpactParameterAlgorithm.cc.
References SignedImpactParameter3D::apply(), SignedTransverseImpactParameter::apply(), TransientTrackBuilder::build(), gather_cfg::cout, reco::TauImpactParameterInfo::discriminator(), Measurement1D::error(), reco::TauImpactParameterTrackData::ip3D, ip_max, ip_min, metsig::jet, reco::LeafCandidate::px(), reco::LeafCandidate::py(), reco::LeafCandidate::pz(), reco::TauImpactParameterInfo::setIsolatedTauTag(), sip_min, reco::TauImpactParameterInfo::storeTrackData(), testEve_cfg::tracks, transientTrackBuilder, reco::TauImpactParameterTrackData::transverseIp, use3D, use_sign, and Measurement1D::value().
Referenced by ImpactParameter::produce().
{ if(transientTrackBuilder == 0){ std::cout << "Transient track builder is 0. abort!" << std::endl; abort(); //FIXME: trow an exception here } reco::TauImpactParameterInfo resultExtended; resultExtended.setIsolatedTauTag(tauRef); const reco::Jet* jet = tauRef->jet().get(); GlobalVector direction(jet->px(),jet->py(),jet->pz()); const reco::TrackRefVector& tracks = tauRef->selectedTracks(); edm::RefVector<reco::TrackCollection>::const_iterator iTrack; for(iTrack = tracks.begin(); iTrack!= tracks.end(); iTrack++){ const reco::TransientTrack transientTrack = (transientTrackBuilder->build(&(**iTrack))); SignedTransverseImpactParameter stip; Measurement1D ip = stip.apply(transientTrack,direction,pv).second; SignedImpactParameter3D signed_ip3D; Measurement1D ip3D = signed_ip3D.apply(transientTrack,direction,pv).second; //std::cout << "check pv,ip3d,track z " << pv.z() << " " << ip3D.value() << " " << transientTrack->dz() << std::endl; if(!use_sign){ Measurement1D tmp2D(fabs(ip.value()),ip.error()); ip = tmp2D; Measurement1D tmp3D(fabs(ip3D.value()),ip3D.error()); ip3D = tmp3D; } reco::TauImpactParameterTrackData theData; theData.transverseIp = ip; theData.ip3D = ip3D; resultExtended.storeTrackData(*iTrack,theData); } float discriminator = resultExtended.discriminator(ip_min,ip_max,sip_min,use_sign,use3D); return std::make_pair( discriminator, resultExtended ); }
double ImpactParameterAlgorithm::ip_max [private] |
Definition at line 47 of file ImpactParameterAlgorithm.h.
Referenced by ImpactParameterAlgorithm(), and tag().
double ImpactParameterAlgorithm::ip_min [private] |
Definition at line 47 of file ImpactParameterAlgorithm.h.
Referenced by ImpactParameterAlgorithm(), and tag().
Definition at line 44 of file ImpactParameterAlgorithm.h.
Referenced by setPrimaryVertex().
double ImpactParameterAlgorithm::sip_min [private] |
Definition at line 47 of file ImpactParameterAlgorithm.h.
Referenced by ImpactParameterAlgorithm(), and tag().
const TransientTrackBuilder* ImpactParameterAlgorithm::transientTrackBuilder [private] |
Definition at line 53 of file ImpactParameterAlgorithm.h.
Referenced by setTransientTrackBuilder(), and tag().
bool ImpactParameterAlgorithm::use3D [private] |
Definition at line 50 of file ImpactParameterAlgorithm.h.
Referenced by ImpactParameterAlgorithm(), and tag().
bool ImpactParameterAlgorithm::use_sign [private] |
Definition at line 50 of file ImpactParameterAlgorithm.h.
Referenced by ImpactParameterAlgorithm(), and tag().