7 #include <Math/VectorUtil.h>
44 #define range_for(i, x) \
45 for(int i = (x).begin; i != (x).end; i += (x).increment)
55 trackFlip(params.getParameter<bool>(
"trackFlip")),
56 vertexFlip(params.getParameter<bool>(
"vertexFlip")),
57 charmCut(params.getParameter<double>(
"charmCut")),
58 sortCriterium(TrackSorting::
getCriterium(params.getParameter<std::
string>(
"trackSort"))),
61 trackPseudoSelector(params.getParameter<edm::
ParameterSet>(
"trackPseudoSelection")),
62 pseudoMultiplicityMin(params.getParameter<unsigned int>(
"pseudoMultiplicityMin")),
63 trackMultiplicityMin(params.getParameter<unsigned int>(
"trackMultiplicityMin")),
64 minTrackWeight(params.getParameter<double>(
"minimumTrackWeight")),
66 vertexMassCorrection(params.getParameter<bool>(
"correctVertexMass")),
67 pseudoVertexV0Filter(params.getParameter<edm::
ParameterSet>(
"pseudoVertexV0Filter")),
68 trackPairV0Filter(params.getParameter<edm::
ParameterSet>(
"trackPairV0Filter"))
78 int size,
bool vertex)
const
82 range.
begin = size - 1;
102 const std::vector<TrackIPTagInfo::TrackIPData> &ipData =
104 std::vector<std::size_t> indices = trackIPTagInfo.
sortedIndexes(sort);
109 std::size_t
idx = indices[
i];
135 double momPar = dir.Dot(track);
138 return 0.5 *
std::log((energy + momPar) / (energy - momPar));
145 using namespace ROOT::Math;
171 double vtx_track_ptSum= 0.;
172 double vtx_track_ESum= 0.;
173 double jet_track_ESum= 0.;
176 unsigned int numberofvertextracks = 0;
181 if (vtx < 0) vtx =
i;
183 numberofvertextracks = numberofvertextracks + (svInfo.
secondaryVertex(
i)).nTracks();
192 if (hasRefittedTracks) {
195 vertexKinematics.add(actualTrack, w);
204 vertexKinematics.add(**track, w);
233 std::vector<TrackRef> pseudoVertexTracks;
237 std::size_t
idx = indices[
i];
240 const Track &track = *trackRef;
244 pseudoVertexTracks.push_back(trackRef);
245 vertexKinematics.add(track);
252 for(std::vector<TrackRef>::const_iterator track = pseudoVertexTracks.begin(); track != pseudoVertexTracks.end(); ++track)
270 std::size_t
idx = indices[
i];
273 const Track &track = *trackRef;
284 allKinematics.add(track);
293 std::size_t pairIdx = indices[
j];
296 const Track &pairTrack = *pairTrackRef;
301 trackPairV0Test[1] = pairTrackRef;
311 trackJetKinematics.add(track);
316 double trackMag =
std::sqrt(trackMom.Mag2());
363 varPi = (vertexMass/5.2794) * (vtx_track_ESum /jet_track_ESum);
368 if (allKinematics.numberOfTracks())
392 else if( patJet != 0)
404 vars.insert(
btau::hadronMultiplicity,patJet->chargedHadronMultiplicity()+patJet->neutralHadronMultiplicity(),
true);
405 vars.insert(
btau::hadronPhotonMultiplicity,patJet->chargedHadronMultiplicity()+patJet->neutralHadronMultiplicity()+patJet->photonMultiplicity(),
true);
406 vars.insert(
btau::totalMultiplicity,patJet->chargedHadronMultiplicity()+patJet->neutralHadronMultiplicity()+patJet->photonMultiplicity()+patJet->electronMultiplicity()+patJet->muonMultiplicity(),
true);
411 throw cms::Exception(
"InvalidConfiguration") <<
"From CombinedSVComputerV2::operator: reco::PFJet OR pat::Jet are required by this module" << std::endl;
bool vertexMassCorrection
virtual double et() const GCC11_FINAL
transverse energy
const Vector & momentum() const
track momentum vector
const reco::TrackIPTagInfo::TrackIPData & threshTrack(const reco::TrackIPTagInfo &trackIPTagInfo, const reco::TrackIPTagInfo::SortCriteria sort, const reco::Jet &jet, const GlobalPoint &pv) const
reco::TrackIPTagInfo::SortCriteria getCriterium(const std::string &name)
Measurement1D flightDistance(unsigned int index, bool in2d=false) const
const edm::Ref< VertexCollection > & primaryVertex() const
Track refittedTrack(const TrackBaseRef &track) const
Base class for all types of Jets.
bool hasRefittedTracks() const
Checks whether refitted tracks are stored.
Global3DPoint GlobalPoint
double flipValue(double value, bool vertex) const
const_iterator end() const
Termination of iteration.
Jets made from PFObjects.
const_iterator begin() const
Initialize an iterator over the RefVector.
reco::V0Filter pseudoVertexV0Filter
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
bool isNonnull() const
Checks for non-null.
const GlobalVector & flightDirection(unsigned int index) const
reco::V0Filter trackPairV0Filter
reco::TrackSelector trackPseudoSelector
const Vertex & secondaryVertex(unsigned int index) const
void addParameter(std::string const &name, T const &value)
reco::TrackSelector trackNoDeltaRSelector
reco::TaggingVariableList operator()(const reco::TrackIPTagInfo &ipInfo, const reco::SecondaryVertexTagInfo &svInfo) const
GlobalPoint closestToJetAxis
float trackWeight(unsigned int svIndex, unsigned int trackindex) const
static double etaRel(const math::XYZVector &dir, const math::XYZVector &track)
virtual edm::RefToBase< Jet > jet(void) const
returns a polymorphic reference to the tagged jet
TrackRefVector vertexTracks() const
double deltaR(double eta1, double eta2, double phi1, double phi2)
std::vector< size_t > sortedIndexes(SortCriteria mode=IP3DSig) const
double significance() const
Measurement1D distanceToJetAxis
XYZVectorD XYZVector
spatial vector with cartesian internal representation
IterationRange flipIterate(int size, bool vertex) const
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
reco::TrackSelector trackSelector
static edm::ParameterSet dropDeltaR(const edm::ParameterSet &pset)
Analysis-level calorimeter jet class.
unsigned int pseudoMultiplicityMin
char data[epos_bytes_allocation]
CombinedSVComputerV2(const edm::ParameterSet ¶ms)
const std::vector< TrackIPData > & impactParameterData() const
unsigned int trackMultiplicityMin
unsigned int nVertices() const
size_type size() const
Size of the RefVector.
reco::TrackIPTagInfo::SortCriteria sortCriterium
const edm::RefVector< TrackCollection > & selectedTracks() const
tuple size
Write out results.
Power< A, B >::type pow(const A &a, const B &b)
void insert(const TaggingVariable &variable, bool delayed=false)
tuple trackSelector
Tracks selection.