#include <TrackCountingComputer.h>
Public Member Functions | |
float | discriminator (const TagInfoHelper &ti) const |
TrackCountingComputer (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 |
int | m_ipType |
int | m_nthTrack |
reco::TrackBase::TrackQuality | m_trackQuality |
bool | m_useAllQualities |
bool | useVariableJTA_ |
reco::TrackIPTagInfo::variableJTAParameters | varJTApars |
Definition at line 12 of file TrackCountingComputer.h.
TrackCountingComputer::TrackCountingComputer | ( | const edm::ParameterSet & | parameters | ) | [inline] |
Definition at line 16 of file TrackCountingComputer.h.
References edm::ParameterSet::existsAs(), funct::false, edm::ParameterSet::getParameter(), m_cutMaxDecayLen, m_cutMaxDistToAxis, m_deltaR, m_ipType, m_nthTrack, m_trackQuality, m_useAllQualities, reco::TrackBase::qualityByName(), AlCaHLTBitMon_QueryRunRegistry::string, JetTagComputer::uses(), useVariableJTA_, and varJTApars.
{ m_nthTrack = parameters.getParameter<int>("nthTrack"); m_ipType = parameters.getParameter<int>("impactParameterType"); m_deltaR = parameters.getParameter<double>("deltaR"); 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"); useVariableJTA_ = parameters.existsAs<bool>("useVariableJTA") ? parameters.getParameter<bool>("useVariableJTA") : false ; if (useVariableJTA_){ varJTApars = { parameters.getParameter<double>("a_dR"), parameters.getParameter<double>("b_dR"), parameters.getParameter<double>("a_pT"), parameters.getParameter<double>("b_pT"), parameters.getParameter<double>("min_pT"), parameters.getParameter<double>("max_pT"), parameters.getParameter<double>("min_pT_dRcut"), parameters.getParameter<double>("max_pT_dRcut"), parameters.getParameter<double>("max_pT_trackPTcut") }; } }
float TrackCountingComputer::discriminator | ( | const TagInfoHelper & | ti | ) | const [inline, virtual] |
Reimplemented from JetTagComputer.
Reimplemented in NegativeTrackCountingComputer.
Definition at line 51 of file TrackCountingComputer.h.
References JetTagComputer::TagInfoHelper::get(), i, m_nthTrack, and orderedSignificances().
{ const reco::TrackIPTagInfo & tkip = ti.get<reco::TrackIPTagInfo>(); std::multiset<float> significances = orderedSignificances(tkip); std::multiset<float>::reverse_iterator nth=significances.rbegin(); for(int i=0;i<m_nthTrack-1 && nth!=significances.rend();i++) nth++; if(nth!=significances.rend()) return *nth; else return -100.; }
std::multiset<float> TrackCountingComputer::orderedSignificances | ( | const reco::TrackIPTagInfo & | tkip | ) | const [inline, protected] |
Definition at line 62 of file TrackCountingComputer.h.
References i, reco::TrackIPTagInfo::impactParameterData(), PyquenDefaultSettings_cff::impactParameters, edm::Ref< C, T, F >::isNull(), reco::JTATagInfo::jet(), m_useAllQualities, p4, reco::TrackIPTagInfo::primaryVertex(), reco::TrackIPTagInfo::selectedTracks(), testEve_cfg::tracks, useVariableJTA_, reco::TrackIPTagInfo::variableJTA(), and varJTApars.
Referenced by NegativeTrackCountingComputer::discriminator(), and 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 (useVariableJTA_) { if (tkip.variableJTA( varJTApars )[i]) significances.insert( ((m_ipType==0)?it->ip3d:it->ip2d).significance() ); } else // no using variable JTA, use the default method if(m_deltaR <=0 || ROOT::Math::VectorUtil::DeltaR((*tkip.jet()).p4().Vect(), (*tracks[i]).momentum()) < m_deltaR) significances.insert( ((m_ipType==0)?it->ip3d:it->ip2d).significance() ); } } return significances; }
double TrackCountingComputer::m_cutMaxDecayLen [protected] |
Definition at line 96 of file TrackCountingComputer.h.
Referenced by TrackCountingComputer().
double TrackCountingComputer::m_cutMaxDistToAxis [protected] |
Definition at line 97 of file TrackCountingComputer.h.
Referenced by TrackCountingComputer().
double TrackCountingComputer::m_deltaR [protected] |
Definition at line 95 of file TrackCountingComputer.h.
Referenced by TrackCountingComputer().
int TrackCountingComputer::m_ipType [protected] |
Definition at line 94 of file TrackCountingComputer.h.
Referenced by TrackCountingComputer().
int TrackCountingComputer::m_nthTrack [protected] |
Definition at line 93 of file TrackCountingComputer.h.
Referenced by NegativeTrackCountingComputer::discriminator(), discriminator(), and TrackCountingComputer().
Definition at line 98 of file TrackCountingComputer.h.
Referenced by TrackCountingComputer().
bool TrackCountingComputer::m_useAllQualities [protected] |
Definition at line 99 of file TrackCountingComputer.h.
Referenced by orderedSignificances(), and TrackCountingComputer().
bool TrackCountingComputer::useVariableJTA_ [protected] |
Definition at line 90 of file TrackCountingComputer.h.
Referenced by orderedSignificances(), and TrackCountingComputer().
Definition at line 91 of file TrackCountingComputer.h.
Referenced by orderedSignificances(), and TrackCountingComputer().