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;
177 track != tracks.
end(); track++) {
181 if (hasRefittedTracks) {
184 vertexKinematics.add(actualTrack, w);
188 vertexKinematics.add(**track, w);
190 (*track)->momentum()),
true);
225 const std::vector<TrackIPTagInfo::TrackIPData> &ipData =
229 std::vector<TrackRef> pseudoVertexTracks;
234 std::size_t
idx = indices[
i];
237 const Track &track = *trackRef;
246 allKinematics.add(track);
252 pseudoVertexTracks.push_back(trackRef);
253 vertexKinematics.add(track);
264 std::size_t pairIdx = indices[
j];
268 const Track &pairTrack = *pairTrackRef;
273 trackPairV0Test[1] = pairTrackRef;
285 double trackMag =
std::sqrt(trackMom.Mag2());
316 for(std::vector<TrackRef>::const_iterator track =
317 pseudoVertexTracks.begin();
318 track != pseudoVertexTracks.end(); ++track)
320 (*track)->momentum()),
true);
325 VectorUtil::DeltaR(allKinematics.vectorSum(), jetDir),
true);
327 allKinematics.vectorSum().Et() / ipInfo.
jet()->
et(),
true);
331 .ip3d.significance(),
337 .ip2d.significance(),
343 ? allKinematics.weightedVectorSum()
344 : allKinematics.vectorSum();
346 ? vertexKinematics.weightedVectorSum()
347 : vertexKinematics.vectorSum();
351 vertexKinematics.numberOfTracks(),
true);
353 VectorUtil::DeltaR(vertexSum, jetDir),
true);
362 Cross(vertexSum).Mag2() / dir.
mag2();
363 vertexMass =
std::sqrt(vertexMass * vertexMass +
367 if (allKinematics.numberOfTracks())
369 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
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)
const_iterator end() const
Termination of iteration.
const_iterator begin() const
Initialize an iterator over the RefVector.
virtual TrackRefVector tracks(void) const
returns a list of tracks associated to the jet
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
GlobalPoint closestToJetAxis
float trackWeight(unsigned int svIndex, unsigned int trackindex) const
IterationRange flipIterate(int size, bool vertex) const
virtual edm::RefToBase< Jet > jet(void) const
returns a polymorphic reference to the tagged jet
TrackRefVector vertexTracks() const
reco::V0Filter trackPairV0Filter
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]
double deltaR(const Vector1 &v1, const Vector2 &v2)
const std::vector< TrackIPData > & impactParameterData() const
unsigned int nVertices() const
size_type size() const
Size of the RefVector.
unsigned int nVertexTracks() const
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.