7 #include <Math/VectorUtil.h>
42 :
charmCut(params.getParameter<double>(
"charmCut")),
43 sortCriterium(TrackSorting::
getCriterium(params.getParameter<std::
string>(
"trackSort"))),
46 minTrackWeight(params.getParameter<double>(
"minimumTrackWeight")),
58 for (std::vector<std::size_t>::const_iterator iter = indices.begin(); iter != indices.end(); ++iter) {
59 const btag::TrackIPData &
data = ipData[*iter];
70 static const btag::TrackIPData dummy = {
GlobalPoint(),
86 std::vector<std::size_t> indices = trackIPTagInfo.
sortedIndexes(sort);
89 for (std::vector<std::size_t>::const_iterator iter = indices.begin(); iter != indices.end(); ++iter) {
90 const btag::TrackIPData &data = ipData[*iter];
101 static const btag::TrackIPData dummy = {
GlobalPoint(),
114 sum.first += weight * meas.
value();
120 using namespace ROOT::Math;
140 std::pair<double, double> vertexDist2D, vertexDist3D;
141 std::pair<double, double> tracksDist2D, tracksDist3D;
144 unsigned int nVertexTracks = 0;
157 bool isTrackVertex = (n == 1);
163 TrackKinematics &kin = isTrackVertex ? trackKinematics : vertexKinematics;
168 if (hasRefittedTracks) {
170 kin.add(actualTrack, w);
186 vertexDist2D.first += tracksDist2D.first;
187 vertexDist2D.second += tracksDist2D.second;
188 vertexDist3D.first += tracksDist3D.first;
189 vertexDist3D.second += tracksDist3D.second;
190 vertexKinematics += trackKinematics;
200 vertexKinematics = trackKinematics;
220 for (
unsigned int i = 0;
i < indices.size();
i++) {
221 std::size_t idx = indices[
i];
222 const btag::TrackIPData &data = ipData[idx];
223 const TrackRef &trackRef = tracks[idx];
224 const Track &track = *trackRef;
233 allKinematics.add(track);
237 trackPairV0Test[0] = tracks[idx];
239 for (
unsigned int j = 0;
j < indices.size();
j++) {
243 std::size_t pairIdx = indices[
j];
244 const btag::TrackIPData &pairTrackData = ipData[pairIdx];
245 const TrackRef &pairTrackRef = tracks[pairIdx];
246 const Track &pairTrack = *pairTrackRef;
251 trackPairV0Test[1] = pairTrackRef;
263 double trackMag =
std::sqrt(trackMom.Mag2());
298 if (allKinematics.numberOfTracks())
311 using namespace ROOT::Math;
331 std::pair<double, double> vertexDist2D, vertexDist3D;
332 std::pair<double, double> tracksDist2D, tracksDist3D;
335 unsigned int nVertexTracks = 0;
341 for (std::vector<CandidatePtr>::const_iterator track = tracks.begin(); track != tracks.end(); ++
track)
346 bool isTrackVertex = (n == 1);
352 TrackKinematics &kin = isTrackVertex ? trackKinematics : vertexKinematics;
354 for (std::vector<CandidatePtr>::const_iterator track = tracks.begin(); track != tracks.end(); ++
track) {
367 vertexDist2D.first += tracksDist2D.first;
368 vertexDist2D.second += tracksDist2D.second;
369 vertexDist3D.first += tracksDist3D.first;
370 vertexDist3D.second += tracksDist3D.second;
371 vertexKinematics += trackKinematics;
381 vertexKinematics = trackKinematics;
400 const Track *trackPairV0Test[2];
401 for (
unsigned int i = 0;
i < indices.size();
i++) {
402 std::size_t idx = indices[
i];
403 const btag::TrackIPData &data = ipData[idx];
405 const Track &track = *trackPtr;
414 allKinematics.add(track);
420 for (
unsigned int j = 0;
j < indices.size();
j++) {
424 std::size_t pairIdx = indices[
j];
425 const btag::TrackIPData &pairTrackData = ipData[pairIdx];
427 const Track &pairTrack = *pairTrackPtr;
432 trackPairV0Test[1] = pairTrackPtr;
444 double trackMag =
std::sqrt(trackMom.Mag2());
479 if (allKinematics.numberOfTracks())
reco::btag::SortCriteria getCriterium(const std::string &name)
Vector momentum() const final
spatial momentum vector
bool isNonnull() const
Checks for non-null.
virtual reco::TaggingVariableList operator()(const reco::TrackIPTagInfo &ipInfo, const reco::SecondaryVertexTagInfo &svInfo) const
double pt() const final
transverse momentum
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
void add(const reco::Track &track, double weight=1.0)
const VTX & secondaryVertex(unsigned int index) const
GhostTrackComputer(const edm::ParameterSet ¶ms)
Base class for all types of Jets.
double etaRel(const math::XYZVector &dir, const math::XYZVector &track)
bool hasRefittedTracks() const
Checks whether refitted tracks are stored.
Global3DPoint GlobalPoint
const Container & selectedTracks() const
static edm::ParameterSet dropDeltaR(const edm::ParameterSet &pset)
auto const & tracks
cannot be loose
int pixelLayersWithMeasurement() const
const Vector & momentum() const
track momentum vector
const_iterator end() const
Termination of iteration.
const reco::Track * toTrack(const reco::TrackBaseRef &t)
int trackerLayersWithMeasurement() const
const_iterator begin() const
Initialize an iterator over the RefVector.
virtual const daughters & daughterPtrVector() const
references to daughtes
const edm::Ref< VertexCollection > & primaryVertex() const
input_container vertexTracks() const
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
static void addMeas(std::pair< double, double > &sum, Measurement1D meas)
float trackWeight(unsigned int svIndex, unsigned int trackindex) const
void addParameter(std::string const &name, T const &value)
std::vector< size_t > sortedIndexes(btag::SortCriteria mode=reco::btag::IP3DSig) const
reco::V0Filter trackPairV0Filter
const GlobalVector & flightDirection(unsigned int index) const
const std::vector< btag::TrackIPData > & impactParameterData() const
unsigned int nVertices() const
reco::btag::SortCriteria sortCriterium
const reco::btag::TrackIPData & threshTrack(const reco::TrackIPTagInfo &trackIPTagInfo, const reco::btag::SortCriteria sort, const reco::Jet &jet, const GlobalPoint &pv) const
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
XYZVectorD XYZVector
spatial vector with cartesian internal representation
char data[epos_bytes_allocation]
const math::XYZTLorentzVector & vectorSum() const
Track refittedTrack(const TrackBaseRef &track) const
Measurement1D flightDistance(unsigned int index, int dim=0) const
reco::TrackSelector trackNoDeltaRSelector
reco::TrackSelector trackSelector
Container input_container
tuple trackSelector
Tracks selection.
double eta() const final
momentum pseudorapidity