#include <PromptTrackCountingComputer.h>
Public Member Functions | |
float | discriminator (const TagInfoHelper &ti) const |
PromptTrackCountingComputer (const edm::ParameterSet ¶meters) | |
Protected Member Functions | |
std::multiset< float > | orderedSignificances (const reco::TrackIPTagInfo &tkip) const |
Protected Attributes | |
double | m_cutMaxDecayLen |
double | m_cutMaxDistToAxis |
double | m_deltaR |
double | m_deltaRmin |
int | m_ipType |
int | m_nthTrack |
reco::TrackBase::TrackQuality | m_trackQuality |
bool | m_useAllQualities |
double | maxImpactParameter |
double | maxImpactParameterSig |
Definition at line 16 of file PromptTrackCountingComputer.h.
PromptTrackCountingComputer::PromptTrackCountingComputer | ( | const edm::ParameterSet & | parameters | ) | [inline] |
Definition at line 19 of file PromptTrackCountingComputer.h.
References edm::ParameterSet::getParameter(), m_cutMaxDecayLen, m_cutMaxDistToAxis, m_deltaR, m_deltaRmin, m_ipType, m_nthTrack, m_trackQuality, m_useAllQualities, maxImpactParameter, maxImpactParameterSig, reco::TrackBase::qualityByName(), AlCaHLTBitMon_QueryRunRegistry::string, and JetTagComputer::uses().
{ m_nthTrack = parameters.getParameter<int>("nthTrack"); m_ipType = parameters.getParameter<int>("impactParameterType"); // Maximum and minimum allowed deltaR respectively. m_deltaR = parameters.getParameter<double>("deltaR"); m_deltaRmin = parameters.getParameter<double>("deltaRmin"); maxImpactParameter = parameters.getParameter<double>("maxImpactParameter"); maxImpactParameterSig = parameters.getParameter<double>("maxImpactParameterSig"); m_cutMaxDecayLen = parameters.getParameter<double>("maximumDecayLength"); //used m_cutMaxDistToAxis = parameters.getParameter<double>("maximumDistanceToJetAxis"); //used // // access track quality class; "any" takes everything // std::string trackQualityType = parameters.getParameter<std::string>("trackQualityClass"); //used m_trackQuality = reco::TrackBase::qualityByName(trackQualityType); m_useAllQualities = false; if (trackQualityType == "any" || trackQualityType == "Any" || trackQualityType == "ANY" ) m_useAllQualities = true; uses("ipTagInfos"); }
float PromptTrackCountingComputer::discriminator | ( | const TagInfoHelper & | ti | ) | const [inline, virtual] |
Reimplemented from JetTagComputer.
Definition at line 43 of file PromptTrackCountingComputer.h.
References JetTagComputer::TagInfoHelper::get(), maxImpactParameterSig, and orderedSignificances().
{ const reco::TrackIPTagInfo & tkip = ti.get<reco::TrackIPTagInfo>(); std::multiset<float> significances = orderedSignificances(tkip); std::multiset<float>::iterator sig; unsigned int nPromptTrk = 0; for(sig=significances.begin(); sig!=significances.end(); sig++) { if (fabs(*sig) < maxImpactParameterSig) nPromptTrk++; // edm::LogDebug("") << "Track "<< nPromptTrk << " sig=" << *sig; } return double(nPromptTrk); }
std::multiset<float> PromptTrackCountingComputer::orderedSignificances | ( | const reco::TrackIPTagInfo & | tkip | ) | const [inline, protected] |
Definition at line 57 of file PromptTrackCountingComputer.h.
References i, reco::TrackIPTagInfo::impactParameterData(), PyquenDefaultSettings_cff::impactParameters, edm::Ref< C, T, F >::isNull(), reco::JTATagInfo::jet(), m_cutMaxDecayLen, m_cutMaxDistToAxis, m_deltaR, m_deltaRmin, m_ipType, m_trackQuality, m_useAllQualities, maxImpactParameter, p4, reco::TrackIPTagInfo::primaryVertex(), reco::TrackIPTagInfo::selectedTracks(), testEve_cfg::tracks, and relativeConstraints::value.
Referenced by discriminator().
{ const std::vector<reco::TrackIPTagInfo::TrackIPData> & impactParameters((tkip.impactParameterData())); const edm::RefVector<reco::TrackCollection> & tracks(tkip.selectedTracks()); std::multiset<float> significances; int i=0; if(tkip.primaryVertex().isNull()) { return std::multiset<float>();} GlobalPoint pv(tkip.primaryVertex()->position().x(),tkip.primaryVertex()->position().y(),tkip.primaryVertex()->position().z()); for(std::vector<reco::TrackIPTagInfo::TrackIPData>::const_iterator it = impactParameters.begin(); it!=impactParameters.end(); ++it, i++) { if( fabs(impactParameters[i].distanceToJetAxis.value()) < m_cutMaxDistToAxis && // distance to JetAxis (impactParameters[i].closestToJetAxis - pv).mag() < m_cutMaxDecayLen && // max decay len (m_useAllQualities == true || (*tracks[i]).quality(m_trackQuality)) // use selected track qualities ) { if ( ( m_deltaR <=0 || ROOT::Math::VectorUtil::DeltaR((*tkip.jet()).p4().Vect(), (*tracks[i]).momentum()) < m_deltaR ) && ( m_deltaRmin <=0 || ROOT::Math::VectorUtil::DeltaR((*tkip.jet()).p4().Vect(), (*tracks[i]).momentum()) > m_deltaRmin ) ) { if ( fabs(((m_ipType==0)?it->ip3d:it->ip2d).value()) < maxImpactParameter ) { significances.insert( ((m_ipType==0)?it->ip3d:it->ip2d).significance() ); } } } } return significances; }
double PromptTrackCountingComputer::m_cutMaxDecayLen [protected] |
Definition at line 92 of file PromptTrackCountingComputer.h.
Referenced by orderedSignificances(), and PromptTrackCountingComputer().
double PromptTrackCountingComputer::m_cutMaxDistToAxis [protected] |
Definition at line 93 of file PromptTrackCountingComputer.h.
Referenced by orderedSignificances(), and PromptTrackCountingComputer().
double PromptTrackCountingComputer::m_deltaR [protected] |
Definition at line 88 of file PromptTrackCountingComputer.h.
Referenced by orderedSignificances(), and PromptTrackCountingComputer().
double PromptTrackCountingComputer::m_deltaRmin [protected] |
Definition at line 89 of file PromptTrackCountingComputer.h.
Referenced by orderedSignificances(), and PromptTrackCountingComputer().
int PromptTrackCountingComputer::m_ipType [protected] |
Definition at line 87 of file PromptTrackCountingComputer.h.
Referenced by orderedSignificances(), and PromptTrackCountingComputer().
int PromptTrackCountingComputer::m_nthTrack [protected] |
Definition at line 86 of file PromptTrackCountingComputer.h.
Referenced by PromptTrackCountingComputer().
Definition at line 94 of file PromptTrackCountingComputer.h.
Referenced by orderedSignificances(), and PromptTrackCountingComputer().
bool PromptTrackCountingComputer::m_useAllQualities [protected] |
Definition at line 95 of file PromptTrackCountingComputer.h.
Referenced by orderedSignificances(), and PromptTrackCountingComputer().
double PromptTrackCountingComputer::maxImpactParameter [protected] |
Definition at line 90 of file PromptTrackCountingComputer.h.
Referenced by orderedSignificances(), and PromptTrackCountingComputer().
double PromptTrackCountingComputer::maxImpactParameterSig [protected] |
Definition at line 91 of file PromptTrackCountingComputer.h.
Referenced by discriminator(), and PromptTrackCountingComputer().