7 #include <Math/VectorUtil.h>
41 #define range_for(i, x) \
42 for(int i = (x).begin; i != (x).end; i += (x).increment)
52 trackFlip(params.getParameter<bool>(
"trackFlip")),
53 vertexFlip(params.getParameter<bool>(
"vertexFlip")),
54 charmCut(params.getParameter<double>(
"charmCut")),
55 sortCriterium(TrackSorting::
getCriterium(params.getParameter<std::
string>(
"trackSort"))),
58 trackPseudoSelector(params.getParameter<edm::
ParameterSet>(
"trackPseudoSelection")),
59 pseudoMultiplicityMin(params.getParameter<unsigned int>(
"pseudoMultiplicityMin")),
60 trackMultiplicityMin(params.getParameter<unsigned int>(
"trackMultiplicityMin")),
61 minTrackWeight(params.getParameter<double>(
"minimumTrackWeight")),
63 vertexMassCorrection(params.getParameter<bool>(
"correctVertexMass")),
64 pseudoVertexV0Filter(params.getParameter<edm::
ParameterSet>(
"pseudoVertexV0Filter")),
65 trackPairV0Filter(params.getParameter<edm::
ParameterSet>(
"trackPairV0Filter"))
75 int size,
bool vertex)
const
79 range.
begin = size - 1;
99 const std::vector<TrackIPTagInfo::TrackIPData> &ipData =
101 std::vector<std::size_t> indices = trackIPTagInfo.
sortedIndexes(sort);
106 std::size_t
idx = indices[
i];
132 double momPar = dir.Dot(track);
136 return 0.5 *
std::log((energy + momPar) / (energy - momPar));
143 using namespace ROOT::Math;
168 unsigned int numberofvertextracks = 0;
175 numberofvertextracks = numberofvertextracks + (svInfo.
secondaryVertex(
i)).nTracks();
183 if (hasRefittedTracks) {
186 vertexKinematics.add(actualTrack, w);
190 vertexKinematics.add(**track, w);
192 (*track)->momentum()),
true);
227 const std::vector<TrackIPTagInfo::TrackIPData> &ipData =
231 std::vector<TrackRef> pseudoVertexTracks;
236 std::size_t
idx = indices[
i];
239 const Track &track = *trackRef;
248 allKinematics.add(track);
254 pseudoVertexTracks.push_back(trackRef);
255 vertexKinematics.add(track);
266 std::size_t pairIdx = indices[
j];
270 const Track &pairTrack = *pairTrackRef;
275 trackPairV0Test[1] = pairTrackRef;
287 double trackMag =
std::sqrt(trackMom.Mag2());
318 for(std::vector<TrackRef>::const_iterator track =
319 pseudoVertexTracks.begin();
320 track != pseudoVertexTracks.end(); ++track)
322 (*track)->momentum()),
true);
327 VectorUtil::DeltaR(allKinematics.vectorSum(), jetDir),
true);
329 allKinematics.vectorSum().Et() / ipInfo.
jet()->
et(),
true);
333 .ip3d.significance(),
339 .ip2d.significance(),
345 ? allKinematics.weightedVectorSum()
346 : allKinematics.vectorSum();
348 ? vertexKinematics.weightedVectorSum()
349 : vertexKinematics.vectorSum();
353 vertexKinematics.numberOfTracks(),
true);
355 VectorUtil::DeltaR(vertexSum, jetDir),
true);
364 Cross(vertexSum).Mag2() / dir.
mag2();
365 vertexMass =
std::sqrt(vertexMass * vertexMass +
369 if (allKinematics.numberOfTracks())
371 vertexSum.E() / allSum.E(),
true);
reco::TrackSelector trackSelector
virtual double et() const GCC11_FINAL
transverse energy
const Vector & momentum() const
track momentum vector
static edm::ParameterSet dropDeltaR(const edm::ParameterSet &pset)
reco::TrackIPTagInfo::SortCriteria getCriterium(const std::string &name)
Measurement1D flightDistance(unsigned int index, bool in2d=false) const
unsigned int pseudoMultiplicityMin
trackRef_iterator tracks_end() const
last iterator over tracks
const edm::Ref< VertexCollection > & primaryVertex() const
Track refittedTrack(const TrackBaseRef &track) const
bool vertexMassCorrection
Base class for all types of Jets.
reco::TrackSelector trackNoDeltaRSelector
bool hasRefittedTracks() const
Checks whether refitted tracks are stored.
reco::V0Filter pseudoVertexV0Filter
Global3DPoint GlobalPoint
reco::TaggingVariableList operator()(const reco::TrackIPTagInfo &ipInfo, const reco::SecondaryVertexTagInfo &svInfo) const
CombinedSVComputer(const edm::ParameterSet ¶ms)
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
reco::TrackSelector trackPseudoSelector
void addParameter(std::string const &name, T const &value)
const reco::TrackIPTagInfo::TrackIPData & threshTrack(const reco::TrackIPTagInfo &trackIPTagInfo, const reco::TrackIPTagInfo::SortCriteria sort, const reco::Jet &jet, const GlobalPoint &pv) const
float trackWeight(const TREF &r) const
returns the weight with which a Track has contributed to the vertex-fit.
GlobalPoint closestToJetAxis
IterationRange flipIterate(int size, bool vertex) const
virtual edm::RefToBase< Jet > jet(void) const
returns a polymorphic reference to the tagged jet
reco::V0Filter trackPairV0Filter
double deltaR(double eta1, double eta2, double phi1, double phi2)
std::vector< size_t > sortedIndexes(SortCriteria mode=IP3DSig) const
static double etaRel(const math::XYZVector &dir, const math::XYZVector &track)
double significance() const
Measurement1D distanceToJetAxis
XYZVectorD XYZVector
spatial vector with cartesian internal representation
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
double flipValue(double value, bool vertex) const
char data[epos_bytes_allocation]
const std::vector< TrackIPData > & impactParameterData() const
unsigned int nVertices() const
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
size_type size() const
Size of the RefVector.
trackRef_iterator tracks_begin() const
first iterator over tracks
const edm::RefVector< TrackCollection > & selectedTracks() const
reco::TrackIPTagInfo::SortCriteria sortCriterium
tuple size
Write out results.
void insert(const TaggingVariable &variable, bool delayed=false)
unsigned int trackMultiplicityMin
tuple trackSelector
Tracks selection.