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")),
48 trackPairV0Filter(params.getParameter<edm::
ParameterSet>(
"trackPairV0Filter"))
60 const std::vector<TrackIPTagInfo::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) {
68 const Track &track = *tracks[*iter];
92 double momPar = dir.Dot(track);
96 return 0.5 *
std::log((energy + momPar) / (energy - momPar));
103 sum.first += weight * meas.
value();
111 using namespace ROOT::Math;
133 std::pair<double, double> vertexDist2D, vertexDist3D;
134 std::pair<double, double> tracksDist2D, tracksDist3D;
136 unsigned int nVertices = 0;
137 unsigned int nVertexTracks = 0;
138 unsigned int nTracks = 0;
145 track != tracks.
end(); track++)
151 bool isTrackVertex = (n == 1);
152 ++*(isTrackVertex ? &nTracks : &nVertices);
154 addMeas(*(isTrackVertex ? &tracksDist2D : &vertexDist2D),
156 addMeas(*(isTrackVertex ? &tracksDist3D : &vertexDist3D),
162 track != tracks.
end(); track++) {
166 if (hasRefittedTracks) {
169 kin.add(actualTrack, w);
175 (*track)->momentum()),
true);
186 if (nVertices == 1 && nTracks) {
187 vertexDist2D.first += tracksDist2D.first;
188 vertexDist2D.second += tracksDist2D.second;
189 vertexDist3D.first += tracksDist3D.first;
190 vertexDist3D.second += tracksDist3D.second;
191 vertexKinematics += trackKinematics;
195 vertexDist2D.first / vertexDist2D.second,
198 vertexDist3D.first / vertexDist3D.second,
203 }
else if (nTracks) {
205 vertexKinematics = trackKinematics;
208 tracksDist2D.first / tracksDist2D.second,
211 tracksDist3D.first / tracksDist3D.second,
215 if (nVertices || nTracks) {
226 const std::vector<TrackIPTagInfo::TrackIPData> &ipData =
232 for(
unsigned int i = 0;
i < indices.size();
i++) {
233 std::size_t
idx = indices[
i];
236 const Track &track = *trackRef;
245 allKinematics.add(track);
251 for(
unsigned int j = 0;
j < indices.size();
j++) {
255 std::size_t pairIdx = indices[
j];
259 const Track &pairTrack = *pairTrackRef;
264 trackPairV0Test[1] = pairTrackRef;
276 double trackMag =
std::sqrt(trackMom.Mag2());
300 VectorUtil::DeltaR(allKinematics.vectorSum(), jetDir),
true);
302 allKinematics.vectorSum().Et() / ipInfo.
jet()->
et(),
true);
305 .ip3d.significance(),
309 .ip2d.significance(),
317 if (allKinematics.numberOfTracks())
319 vertexSum.E() / allSum.E(),
true);
GlobalPoint closestToGhostTrack
virtual double et() const GCC11_FINAL
transverse energy
reco::TaggingVariableList operator()(const reco::TrackIPTagInfo &ipInfo, const reco::SecondaryVertexTagInfo &svInfo) const
const Vector & momentum() const
track momentum vector
reco::TrackIPTagInfo::SortCriteria getCriterium(const std::string &name)
Measurement1D flightDistance(unsigned int index, bool in2d=false) const
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
const edm::Ref< VertexCollection > & primaryVertex() const
void add(const reco::Track &track, double weight=1.0)
GhostTrackComputer(const edm::ParameterSet ¶ms)
Track refittedTrack(const TrackBaseRef &track) const
Base class for all types of Jets.
bool hasRefittedTracks() const
Checks whether refitted tracks are stored.
Global3DPoint GlobalPoint
int pixelLayersWithMeasurement() const
static edm::ParameterSet dropDeltaR(const edm::ParameterSet &pset)
const_iterator end() const
Termination of iteration.
const_iterator begin() const
Initialize an iterator over the RefVector.
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
bool isNonnull() const
Checks for non-null.
const GlobalVector & flightDirection(unsigned int index) const
const Vertex & secondaryVertex(unsigned int index) const
const reco::TrackIPTagInfo::TrackIPData & threshTrack(const reco::TrackIPTagInfo &trackIPTagInfo, const reco::TrackIPTagInfo::SortCriteria sort, const reco::Jet &jet, const GlobalPoint &pv) const
static void addMeas(std::pair< double, double > &sum, Measurement1D meas)
int trackerLayersWithMeasurement() const
void addParameter(std::string const &name, T const &value)
float trackWeight(unsigned int svIndex, unsigned int trackindex) const
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
reco::V0Filter trackPairV0Filter
virtual edm::RefToBase< Jet > jet(void) const
returns a polymorphic reference to the tagged jet
TrackRefVector vertexTracks() const
std::vector< size_t > sortedIndexes(SortCriteria mode=IP3DSig) const
double significance() const
Measurement1D distanceToJetAxis
Measurement1D distanceToGhostTrack
XYZVectorD XYZVector
spatial vector with cartesian internal representation
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
char data[epos_bytes_allocation]
double deltaR(const Vector1 &v1, const Vector2 &v2)
const math::XYZTLorentzVector & vectorSum() const
const std::vector< TrackIPData > & impactParameterData() const
reco::TrackIPTagInfo::SortCriteria sortCriterium
reco::TrackSelector trackNoDeltaRSelector
unsigned int nVertices() const
reco::TrackSelector trackSelector
const edm::RefVector< TrackCollection > & selectedTracks() const
static double etaRel(const math::XYZVector &dir, const math::XYZVector &track)
void insert(const TaggingVariable &variable, bool delayed=false)
tuple trackSelector
Tracks selection.