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" ||
35 trackQualityType ==
"Any" ||
65 std::vector<float> probabilities;
67 for(std::vector<float>::const_iterator it = allProbabilities.begin(); it!=allProbabilities.end(); ++it, i++)
69 if ( fabs(impactParameters[i].distanceToJetAxis.value()) < m_cutMaxDistToAxis &&
70 (impactParameters[i].closestToJetAxis -
pv).mag() < m_cutMaxDecayLen &&
77 if (*it >=0){p=*it/2.;}
else{p=1.+*it/2.;}
79 else if(m_trackSign > 0)
81 if(*it >=0 ) p=*it;
else continue;
84 if(*it <=0 ) p= -*it;
else continue;
88 probabilities.push_back(p);
91 probabilities.push_back(p);
100 int ngoodtracks=v.size();
103 for(std::vector<float>::const_iterator
q = v.begin();
q != v.end();
q++){
112 Loginvlog=
log(-SumJet);
116 for(
int l=1;
l!=ngoodtracks;
l++){
118 Prob+=
exp(
l*Loginvlog-
log(1.*lfact));
120 double LogProb=
log(Prob);
127 std::cout <<
"ProbJet too high: " << ProbJet << std::endl;
131 return -log10(ProbJet)/4.;
148 #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
EcalChannelStatus Container
TrackQuality
track quality
TemplatedJetProbabilityComputer(const edm::ParameterSet ¶meters)
const Container & selectedTracks() const
const reco::Track * toTrack(const reco::TrackBaseRef &t)
reco::IPTagInfo< Container, Base > TagInfo
const edm::Ref< VertexCollection > & primaryVertex() const
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)
float discriminator(const TagInfoHelper &ti) const
bool quality(const TrackQuality) const
Track quality.
double m_cutMaxDistToAxis