7 #include <Math/VectorUtil.h> 43 charmCut(params.getParameter<double>(
"charmCut")),
45 trackSelector(params.getParameter<
edm::
ParameterSet>(
"trackSelection")),
47 minTrackWeight(params.getParameter<double>(
"minimumTrackWeight")),
52 const btag::TrackIPData &
60 const std::vector<btag::TrackIPData> &ipData =
62 std::vector<std::size_t> indices = trackIPTagInfo.
sortedIndexes(sort);
65 for(std::vector<std::size_t>::const_iterator iter = indices.begin();
66 iter != indices.end(); ++iter) {
67 const btag::TrackIPData &
data = ipData[*iter];
78 static const btag::TrackIPData
dummy = {
90 const btag::TrackIPData &
98 const std::vector<btag::TrackIPData> &ipData =
100 std::vector<std::size_t> indices = trackIPTagInfo.
sortedIndexes(sort);
103 for(std::vector<std::size_t>::const_iterator iter = indices.begin(); iter != indices.end(); ++iter) {
104 const btag::TrackIPData &
data = ipData[*iter];
115 static const btag::TrackIPData
dummy = {
131 sum.first += weight * meas.
value();
161 std::pair<double, double> vertexDist2D, vertexDist3D;
162 std::pair<double, double> tracksDist2D, tracksDist3D;
165 unsigned int nVertexTracks = 0;
179 bool isTrackVertex = (n == 1);
180 ++*(isTrackVertex ? &nTracks : &
nVertices);
182 addMeas(*(isTrackVertex ? &tracksDist2D : &vertexDist2D),
184 addMeas(*(isTrackVertex ? &tracksDist3D : &vertexDist3D),
194 if (hasRefittedTracks) {
197 kin.add(actualTrack, w);
203 (*track)->momentum()),
true);
214 if (nVertices == 1 && nTracks) {
215 vertexDist2D.first += tracksDist2D.first;
216 vertexDist2D.second += tracksDist2D.second;
217 vertexDist3D.first += tracksDist3D.first;
218 vertexDist3D.second += tracksDist3D.second;
219 vertexKinematics += trackKinematics;
223 vertexDist2D.first / vertexDist2D.second,
226 vertexDist3D.first / vertexDist3D.second,
231 }
else if (nTracks) {
233 vertexKinematics = trackKinematics;
236 tracksDist2D.first / tracksDist2D.second,
239 tracksDist3D.first / tracksDist3D.second,
243 if (nVertices || nTracks) {
254 const std::vector<btag::TrackIPData> &ipData =
260 for(
unsigned int i = 0;
i < indices.size();
i++) {
261 std::size_t
idx = indices[
i];
262 const btag::TrackIPData &
data = ipData[
idx];
273 allKinematics.
add(track);
277 trackPairV0Test[0] = tracks[
idx];
279 for(
unsigned int j = 0; j < indices.size(); j++) {
283 std::size_t pairIdx = indices[j];
284 const btag::TrackIPData &pairTrackData =
286 const TrackRef &pairTrackRef = tracks[pairIdx];
287 const Track &pairTrack = *pairTrackRef;
292 trackPairV0Test[1] = pairTrackRef;
304 double trackMag =
std::sqrt(trackMom.Mag2());
330 allKinematics.
vectorSum().Et() / ipInfo.jet()->et(),
true);
333 .
ip3d.significance(),
337 .ip2d.significance(),
347 vertexSum.E() / allSum.E(),
true);
383 std::pair<double, double> vertexDist2D, vertexDist3D;
384 std::pair<double, double> tracksDist2D, tracksDist3D;
387 unsigned int nVertexTracks = 0;
393 for(std::vector<CandidatePtr>::const_iterator
track = tracks.begin();
track != tracks.end(); ++
track)
398 bool isTrackVertex = (n == 1);
399 ++*(isTrackVertex ? &nTracks : &
nVertices);
401 addMeas(*(isTrackVertex ? &tracksDist2D : &vertexDist2D),
403 addMeas(*(isTrackVertex ? &tracksDist3D : &vertexDist3D),
406 TrackKinematics &kin = isTrackVertex ? trackKinematics : vertexKinematics;
408 for(std::vector<CandidatePtr>::const_iterator
track = tracks.begin();
track != tracks.end(); ++
track) {
420 if (nVertices == 1 && nTracks) {
421 vertexDist2D.first += tracksDist2D.first;
422 vertexDist2D.second += tracksDist2D.second;
423 vertexDist3D.first += tracksDist3D.first;
424 vertexDist3D.second += tracksDist3D.second;
425 vertexKinematics += trackKinematics;
429 vertexDist2D.first / vertexDist2D.second,
432 vertexDist3D.first / vertexDist3D.second,
437 }
else if (nTracks) {
439 vertexKinematics = trackKinematics;
442 tracksDist2D.first / tracksDist2D.second,
445 tracksDist3D.first / tracksDist3D.second,
449 if (nVertices || nTracks) {
462 const Track * trackPairV0Test[2];
463 for(
unsigned int i = 0;
i < indices.size();
i++) {
464 std::size_t
idx = indices[
i];
465 const btag::TrackIPData &
data = ipData[
idx];
476 allKinematics.
add(track);
482 for(
unsigned int j = 0; j < indices.size(); j++) {
486 std::size_t pairIdx = indices[j];
487 const btag::TrackIPData &pairTrackData = ipData[pairIdx];
489 const Track &pairTrack = *pairTrackPtr;
494 trackPairV0Test[1] = pairTrackPtr;
506 double trackMag =
std::sqrt(trackMom.Mag2());
reco::btag::SortCriteria getCriterium(const std::string &name)
const unsigned int nTracks(const reco::Vertex &sv)
bool isNonnull() const
Checks for non-null.
virtual reco::TaggingVariableList operator()(const reco::TrackIPTagInfo &ipInfo, const reco::SecondaryVertexTagInfo &svInfo) const
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)
Track refittedTrack(const TrackBaseRef &track) const
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)
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
double significance() const
unsigned int numberOfTracks() 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
Measurement1D flightDistance(unsigned int index, int dim=0) const
reco::TrackSelector trackNoDeltaRSelector
reco::TrackSelector trackSelector
Container input_container
void insert(const TaggingVariable &variable, bool delayed=false)