1 #ifndef ImpactParameter_JetProbabilityComputer_h
2 #define ImpactParameter_JetProbabilityComputer_h
9 #include "Math/GenVector/VectorUtil.h"
31 if (trackQualityType ==
"any" ||
32 trackQualityType ==
"Any" ||
63 std::vector<float> probabilities;
65 for(std::vector<float>::const_iterator it = allProbabilities.begin(); it!=allProbabilities.end(); ++it, i++)
67 if ( fabs(impactParameters[i].distanceToJetAxis.value()) < m_cutMaxDistToAxis &&
68 (impactParameters[i].closestToJetAxis - pv).mag() < m_cutMaxDecayLen &&
75 if (*it >=0){p=*it/2.;}
else{p=1.+*it/2.;}
77 else if(m_trackSign > 0)
79 if(*it >=0 ) p=*it;
else continue;
82 if(*it <=0 ) p= -*it;
else continue;
86 probabilities.push_back(p);
88 if(m_deltaR <= 0 || ROOT::Math::VectorUtil::DeltaR((*tkip.
jet()).
p4().Vect(), (*
tracks[
i]).momentum()) < m_deltaR )
89 probabilities.push_back(p);
98 int ngoodtracks=v.size();
101 for(std::vector<float>::const_iterator
q = v.begin();
q != v.end();
q++){
110 Loginvlog=
log(-SumJet);
114 for(
int l=1;
l!=ngoodtracks;
l++){
116 Prob+=
exp(
l*Loginvlog-
log(1.*lfact));
118 double LogProb=
log(Prob);
125 std::cout <<
"ProbJet too high: " << ProbJet << std::endl;
129 return -log10(ProbJet)/4.;
146 #endif // ImpactParameter_JetProbabilityComputer_h
T getParameter(std::string const &) const
static std::vector< std::string > checklist log
double m_cutMaxDistToAxis
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
bool isNull() const
Checks for null.
std::vector< bool > variableJTA(const variableJTAParameters ¶ms) const
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)
const std::vector< TrackIPData > & impactParameterData() const
const edm::RefVector< TrackCollection > & selectedTracks() const
reco::TrackIPTagInfo::variableJTAParameters varJTApars