1 #ifndef ImpactParameter_TemplatedTrackCountingComputer_h
2 #define ImpactParameter_TemplatedTrackCountingComputer_h
8 #include "Math/GenVector/VectorUtil.h"
11 template <
class Container,
class Base>
20 ? parameters.
getParameter<
double>(
"minimumImpactParameter")
23 ? parameters.
getParameter<
bool>(
"useSignedImpactParameterSig")
36 if (trackQualityType ==
"any" || trackQualityType ==
"Any" || trackQualityType ==
"ANY")
42 parameters.
existsAs<
bool>(
"useVariableJTA") ? parameters.
getParameter<
bool>(
"useVariableJTA") :
false;
59 std::multiset<float>::reverse_iterator nth = significances.rbegin();
60 for (
int i = 0;
i <
m_nthTrack - 1 && nth != significances.rend();
i++)
62 if (nth != significances.rend())
72 std::multiset<float> significances;
75 return std::multiset<float>();
82 for (std::vector<reco::btag::TrackIPData>::const_iterator it = impactParameters.begin();
83 it != impactParameters.end();
85 if (fabs(impactParameters[i].distanceToJetAxis.value()) < m_cutMaxDistToAxis &&
86 (impactParameters[i].closestToJetAxis -
pv).mag() < m_cutMaxDecayLen &&
89 (fabs(((m_ipType == 0) ? it->ip3d : it->ip2d).value()) >
m_minIP)
92 float signed_sig = ((m_ipType == 0) ? it->ip3d : it->ip2d).significance();
93 float unsigned_sig = fabs(signed_sig);
98 significances.insert(significance);
102 significances.insert(significance);
106 return significances;
124 #endif // ImpactParameter_TemplatedTrackCountingComputer_h
const T & get(unsigned int index=0) const
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
std::vector< bool > variableJTA(const btag::variableJTAParameters ¶ms) const
TrackQuality
track quality
const Container & selectedTracks() const
reco::TrackBase::TrackQuality m_trackQuality
auto const & tracks
cannot be loose
const reco::Track * toTrack(const reco::TrackBaseRef &t)
TemplatedTrackCountingComputer(const edm::ParameterSet ¶meters)
const edm::Ref< VertexCollection > & primaryVertex() const
void uses(unsigned int id, const std::string &label)
reco::IPTagInfo< Container, Base > TagInfo
bool isNull() const
Checks for null.
const std::vector< btag::TrackIPData > & impactParameterData() const
std::multiset< float > orderedSignificances(const TagInfo &tkip) const
static TrackQuality qualityByName(const std::string &name)
reco::btag::variableJTAParameters varJTApars
T getParameter(std::string const &) const
float discriminator(const TagInfoHelper &ti) const override
bool quality(const TrackQuality) const
Track quality.
double m_cutMaxDistToAxis
edm::AssociationVector< reco::JetRefBaseProd, Values > Container