1 #ifndef ImpactParameter_TemplatedJetProbabilityComputer_h
2 #define ImpactParameter_TemplatedJetProbabilityComputer_h
9 #include "Math/GenVector/VectorUtil.h"
14 template <
class Container,
class Base>
34 if (trackQualityType ==
"any" || trackQualityType ==
"Any" || trackQualityType ==
"ANY")
65 std::vector<float> probabilities;
67 for (std::vector<float>::const_iterator it = allProbabilities.begin(); it != allProbabilities.end(); ++it, i++) {
68 if (fabs(impactParameters[i].distanceToJetAxis.value()) < m_cutMaxDistToAxis &&
69 (impactParameters[i].closestToJetAxis -
pv).mag() < m_cutMaxDecayLen &&
74 if (m_trackSign == 0) {
80 }
else if (m_trackSign > 0) {
93 probabilities.push_back(p);
97 probabilities.push_back(p);
105 int ngoodtracks = v.size();
108 for (std::vector<float>::const_iterator
q = v.begin();
q != v.end();
q++) {
113 double Loginvlog = 0;
116 if (ngoodtracks >= 2) {
117 Loginvlog =
log(-SumJet);
121 for (
int l = 1;
l != ngoodtracks;
l++) {
123 Prob +=
exp(
l * Loginvlog -
log(1. * lfact));
125 double LogProb =
log(Prob);
131 std::cout <<
"ProbJet too high: " << ProbJet << std::endl;
135 return -log10(ProbJet) / 4.;
151 #endif // ImpactParameter_TemplatedJetProbabilityComputer_h
const std::vector< float > & probabilities(int ip) const
static std::vector< std::string > checklist log
const T & get(unsigned int index=0) const
reco::TrackBase::TrackQuality m_trackQuality
std::vector< bool > variableJTA(const btag::variableJTAParameters ¶ms) const
TrackQuality
track quality
TemplatedJetProbabilityComputer(const edm::ParameterSet ¶meters)
const Container & selectedTracks() const
auto const & tracks
cannot be loose
Exp< T >::type exp(const T &t)
const reco::Track * toTrack(const reco::TrackBaseRef &t)
const edm::Ref< VertexCollection > & primaryVertex() const
reco::IPTagInfo< Container, Base > TagInfo
double jetProbability(const std::vector< float > &v) const
float discriminator(const TagInfoHelper &ti) const override
void uses(unsigned int id, const std::string &label)
reco::btag::variableJTAParameters varJTApars
bool isNull() const
Checks for null.
const std::vector< btag::TrackIPData > & impactParameterData() const
static TrackQuality qualityByName(const std::string &name)
T getParameter(std::string const &) const
bool quality(const TrackQuality) const
Track quality.
double m_cutMaxDistToAxis
edm::AssociationVector< reco::JetRefBaseProd, Values > Container