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")
45 parameters.getParameter<
double>(
"min_pT_dRcut"),
46 parameters.getParameter<
double>(
"max_pT_dRcut"),
47 parameters.getParameter<
double>(
"max_pT_trackPTcut")};
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 bool quality(const TrackQuality) const
Track quality.
reco::TrackBase::TrackQuality m_trackQuality
TrackQuality
track quality
TemplatedJetProbabilityComputer(const edm::ParameterSet ¶meters)
const T & get(unsigned int index=0) const
const Container & selectedTracks() const
const reco::Track * toTrack(const reco::TrackBaseRef &t)
TEMPL(T2) struct Divides void
reco::IPTagInfo< Container, Base > TagInfo
float discriminator(const TagInfoHelper &ti) const override
void uses(unsigned int id, const std::string &label)
const std::vector< btag::TrackIPData > & impactParameterData() const
double jetProbability(const std::vector< float > &v) const
reco::btag::variableJTAParameters varJTApars
bool isNull() const
Checks for null.
static TrackQuality qualityByName(const std::string &name)
std::vector< bool > variableJTA(const btag::variableJTAParameters ¶ms) const
const edm::Ref< VertexCollection > & primaryVertex() const
double m_cutMaxDistToAxis
edm::AssociationVector< reco::JetRefBaseProd, Values > Container
const std::vector< float > & probabilities(int ip) const