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();
191 if (hasRefittedTracks) {
194 vertexKinematics.add(actualTrack, w);
203 vertexKinematics.add(**track, w);
232 std::vector<TrackRef> pseudoVertexTracks;
236 std::size_t
idx = indices[
i];
239 const Track &track = *trackRef;
243 pseudoVertexTracks.push_back(trackRef);
244 vertexKinematics.add(track);
251 for(std::vector<TrackRef>::const_iterator track = pseudoVertexTracks.begin(); track != pseudoVertexTracks.end(); ++track)
269 std::size_t
idx = indices[
i];
272 const Track &track = *trackRef;
283 allKinematics.add(track);
292 std::size_t pairIdx = indices[
j];
295 const Track &pairTrack = *pairTrackRef;
300 trackPairV0Test[1] = pairTrackRef;
310 trackJetKinematics.add(track);
315 double trackMag =
std::sqrt(trackMom.Mag2());
362 varPi = (vertexMass/5.2794) * (vtx_track_ESum /jet_track_ESum);
367 if (allKinematics.numberOfTracks())
391 else if( patJet != 0)
403 vars.insert(
btau::hadronMultiplicity,patJet->chargedHadronMultiplicity()+patJet->neutralHadronMultiplicity(),
true);
404 vars.insert(
btau::hadronPhotonMultiplicity,patJet->chargedHadronMultiplicity()+patJet->neutralHadronMultiplicity()+patJet->photonMultiplicity(),
true);
405 vars.insert(
btau::totalMultiplicity,patJet->chargedHadronMultiplicity()+patJet->neutralHadronMultiplicity()+patJet->photonMultiplicity()+patJet->electronMultiplicity()+patJet->muonMultiplicity(),
true);
410 throw cms::Exception(
"InvalidConfiguration") <<
"From CombinedSVComputerV2::operator: reco::PFJet OR pat::Jet are required by this module" << std::endl;
bool vertexMassCorrection
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
trackRef_iterator tracks_end() const
last iterator over tracks
virtual double et() const
transverse energy
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
Jets made from PFObjects.
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
float trackWeight(const TrackBaseRef &r) const
returns the weight with which a Track has contributed to the vertex-fit.
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
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
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
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
size_type size() const
Size of the RefVector.
reco::TrackIPTagInfo::SortCriteria sortCriterium
trackRef_iterator tracks_begin() const
first iterator over tracks
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.