1 #ifndef ImpactParameter_JetBProbabilityComputer_h
2 #define ImpactParameter_JetBProbabilityComputer_h
8 #include "Math/GenVector/VectorUtil.h"
29 std::string trackQualityType = parameters.
getParameter<std::string>(
"trackQualityClass");
32 if (trackQualityType ==
"any" ||
33 trackQualityType ==
"Any" ||
50 std::vector<float> probabilities;
51 std::vector<float> probabilitiesB;
53 for(std::vector<float>::const_iterator it = allProbabilities.begin(); it!=allProbabilities.end(); ++it, i++)
65 if(
m_trackSign>0 || *it <0 ) probabilities.push_back(p);
67 if(
m_trackSign>0 && *it >=0){probabilitiesB.push_back(*it);}
68 if(
m_trackSign<0 && *it <=0){probabilitiesB.push_back(- *it);}
74 std::sort(probabilitiesB.begin(), probabilitiesB.end());
78 return -
log(b)/4-
log(all)/4;
83 int ngoodtracks=v.size();
86 for(std::vector<float>::const_iterator
q = v.begin();
q != v.end();
q++){
95 Loginvlog=
log(-SumJet);
99 for(
int l=1;
l!=ngoodtracks;
l++){
101 Prob+=
exp(
l*Loginvlog-
log(1.*lfact));
103 double LogProb=
log(Prob);
110 std::cout <<
"ProbJet too high: " << ProbJet << std::endl;
129 #endif // ImpactParameter_JetBProbabilityComputer_h
double m_cutMaxDistToAxis
T getParameter(std::string const &) const
JetBProbabilityComputer(const edm::ParameterSet ¶meters)
const T & get(unsigned int index=0) const
const edm::Ref< VertexCollection > & primaryVertex() const
TrackQuality
track quality
double jetProbability(const std::vector< float > &v) const
reco::TrackBase::TrackQuality m_trackQuality
bool isNull() const
Checks for null.
float discriminator(const TagInfoHelper &ti) const
const T & max(const T &a, const T &b)
void uses(unsigned int id, const std::string &label)
const std::vector< float > & probabilities(int ip) const
virtual edm::RefToBase< Jet > jet(void) const
returns a polymorphic reference to the tagged jet
static TrackQuality qualityByName(const std::string &name)
const std::vector< TrackIPData > & impactParameterData() const
const edm::RefVector< TrackCollection > & selectedTracks() const