7 #include <Math/VectorUtil.h>
43 charmCut(params.getParameter<double>(
"charmCut")),
44 sortCriterium(TrackSorting::
getCriterium(params.getParameter<std::
string>(
"trackSort"))),
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];
68 const Track &track = *tracks[*iter];
78 static const btag::TrackIPData dummy = {
94 sum.first += weight * meas.
value();
102 using namespace ROOT::Math;
124 std::pair<double, double> vertexDist2D, vertexDist3D;
125 std::pair<double, double> tracksDist2D, tracksDist3D;
127 unsigned int nVertices = 0;
128 unsigned int nVertexTracks = 0;
136 track != tracks.
end(); track++)
142 bool isTrackVertex = (n == 1);
143 ++*(isTrackVertex ? &
nTracks : &nVertices);
145 addMeas(*(isTrackVertex ? &tracksDist2D : &vertexDist2D),
147 addMeas(*(isTrackVertex ? &tracksDist3D : &vertexDist3D),
153 track != tracks.
end(); track++) {
157 if (hasRefittedTracks) {
160 kin.add(actualTrack, w);
166 (*track)->momentum()),
true);
177 if (nVertices == 1 &&
nTracks) {
178 vertexDist2D.first += tracksDist2D.first;
179 vertexDist2D.second += tracksDist2D.second;
180 vertexDist3D.first += tracksDist3D.first;
181 vertexDist3D.second += tracksDist3D.second;
182 vertexKinematics += trackKinematics;
186 vertexDist2D.first / vertexDist2D.second,
189 vertexDist3D.first / vertexDist3D.second,
196 vertexKinematics = trackKinematics;
199 tracksDist2D.first / tracksDist2D.second,
202 tracksDist3D.first / tracksDist3D.second,
217 const std::vector<btag::TrackIPData> &ipData =
223 for(
unsigned int i = 0;
i < indices.size();
i++) {
224 std::size_t
idx = indices[
i];
225 const btag::TrackIPData &
data = ipData[
idx];
227 const Track &track = *trackRef;
236 allKinematics.add(track);
242 for(
unsigned int j = 0;
j < indices.size();
j++) {
246 std::size_t pairIdx = indices[
j];
247 const btag::TrackIPData &pairTrackData =
250 const Track &pairTrack = *pairTrackRef;
255 trackPairV0Test[1] = pairTrackRef;
267 double trackMag =
std::sqrt(trackMom.Mag2());
293 allKinematics.vectorSum().Et() / ipInfo.jet()->et(),
true);
296 .ip3d.significance(),
300 .ip2d.significance(),
308 if (allKinematics.numberOfTracks())
310 vertexSum.E() / allSum.E(),
true);
Measurement1D flightDistance(unsigned int index, bool in2d=false) const
reco::btag::SortCriteria getCriterium(const std::string &name)
const unsigned int nTracks(const reco::Vertex &sv)
bool isNonnull() const
Checks for non-null.
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.
int trackerLayersWithMeasurement() const
const_iterator begin() const
Initialize an iterator over the RefVector.
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
double deltaR(double eta1, double eta2, double phi1, double phi2)
unsigned int nVertices() const
reco::btag::SortCriteria sortCriterium
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
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
const math::XYZTLorentzVector & vectorSum() const
reco::TrackSelector trackNoDeltaRSelector
reco::TrackSelector trackSelector
const reco::btag::TrackIPData & threshTrack(const reco::TrackIPTagInfo &trackIPTagInfo, const reco::btag::SortCriteria sort, const reco::Jet &jet, const GlobalPoint &pv) const
void insert(const TaggingVariable &variable, bool delayed=false)
tuple trackSelector
Tracks selection.