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")
53 const TagInfo& tkip = ti.
get<TagInfo>();
65 std::vector<float> probabilities;
67 for (std::vector<float>::const_iterator it = allProbabilities.begin(); it != allProbabilities.end(); ++it, i++) {
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 T getParameter(std::string const &) const
const std::vector< float > & probabilities(int ip) const
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
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
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)
bool quality(const TrackQuality) const
Track quality.
double m_cutMaxDistToAxis
float discriminator(const TagInfoHelper &ti) const override
edm::AssociationVector< reco::JetRefBaseProd, Values > Container