1 #ifndef ImpactParameter_JetProbabilityComputer_h
2 #define ImpactParameter_JetProbabilityComputer_h
9 #include "Math/GenVector/VectorUtil.h"
28 std::string trackQualityType = parameters.
getParameter<std::string>(
"trackQualityClass");
31 if (trackQualityType ==
"any" ||
32 trackQualityType ==
"Any" ||
50 std::vector<float> probabilities;
52 for(std::vector<float>::const_iterator it = allProbabilities.begin(); it!=allProbabilities.end(); ++it, i++)
62 if (*it >=0){p=*it/2.;}
else{p=1.+*it/2.;}
66 if(*it >=0 ) p=*it;
else continue;
69 if(*it <=0 ) p= -*it;
else continue;
72 probabilities.push_back(p);
80 int ngoodtracks=v.size();
83 for(std::vector<float>::const_iterator
q = v.begin();
q != v.end();
q++){
92 Loginvlog=
log(-SumJet);
96 for(
int l=1;
l!=ngoodtracks;
l++){
98 Prob+=
exp(
l*Loginvlog-
log(1.*lfact));
100 double LogProb=
log(Prob);
107 std::cout <<
"ProbJet too high: " << ProbJet << std::endl;
111 return -log10(ProbJet)/4.;
126 #endif // ImpactParameter_JetProbabilityComputer_h
T getParameter(std::string const &) const
double m_cutMaxDistToAxis
const T & get(unsigned int index=0) const
const edm::Ref< VertexCollection > & primaryVertex() const
TrackQuality
track quality
Exp< T >::type exp(const T &t)
double jetProbability(const std::vector< float > &v) const
bool isNull() const
Checks for null.
const T & max(const T &a, const T &b)
void uses(unsigned int id, const std::string &label)
reco::TrackBase::TrackQuality m_trackQuality
const std::vector< float > & probabilities(int ip) const
virtual edm::RefToBase< Jet > jet(void) const
returns a polymorphic reference to the tagged jet
JetProbabilityComputer(const edm::ParameterSet ¶meters)
float discriminator(const TagInfoHelper &ti) const
static TrackQuality qualityByName(const std::string &name)
Log< T >::type log(const T &t)
const std::vector< TrackIPData > & impactParameterData() const
const edm::RefVector< TrackCollection > & selectedTracks() const