1 #ifndef RecoBTag_SecondaryVertex_CombinedSVComputer_h
2 #define RecoBTag_SecondaryVertex_CombinedSVComputer_h
10 #include <Math/VectorUtil.h>
37 #define range_for(i, x) for (int i = (x).begin; i != (x).end; i += (x).increment)
64 template <
class SVTI,
class IPTI>
69 double &vtx_track_ptSum,
70 double &vtx_track_ESum)
const;
90 template <
class SVTI,
class IPTI>
95 double &vtx_track_ptSum,
96 double &vtx_track_ESum)
const {
97 using namespace ROOT::Math;
100 typedef typename IPTI::input_container
Container;
105 bool havePv = ipInfo.primaryVertex().isNonnull();
108 pv =
GlobalPoint(ipInfo.primaryVertex()->x(), ipInfo.primaryVertex()->y(), ipInfo.primaryVertex()->z());
124 double jet_track_ESum = 0.;
147 const std::vector<reco::btag::TrackIPData> &ipData = ipInfo.impactParameterData();
150 std::vector<TrackRef> pseudoVertexTracks;
152 std::vector<TrackRef> trackPairV0Test(2);
169 allKinematics.add(track);
173 pseudoVertexTracks.push_back(track);
174 vertexKinematics.
add(track);
178 trackPairV0Test[0] =
track;
191 trackPairV0Test[1] = pairTrack;
200 trackJetKinematics.add(track);
204 double trackMag =
std::sqrt(trackMom.Mag2());
221 double perp_trackMom_jetDir = VectorUtil::Perp2(trackMom, jetDir);
222 perp_trackMom_jetDir = (perp_trackMom_jetDir > 0. ?
std::sqrt(perp_trackMom_jetDir) : 0.);
234 for (
typename std::vector<TrackRef>::const_iterator trkIt = pseudoVertexTracks.begin();
235 trkIt != pseudoVertexTracks.end();
238 vtx_track_ptSum +=
std::sqrt((*trkIt)->momentum().Perp2());
280 double varPi = (vertexMass / 5.2794) *
281 (vtx_track_ESum / jet_track_ESum);
286 if (allKinematics.numberOfTracks()) {
295 if (pfJet !=
nullptr) {
309 pfJet->chargedHadronMultiplicity() + pfJet->neutralHadronMultiplicity() + pfJet->photonMultiplicity(),
312 pfJet->chargedHadronMultiplicity() + pfJet->neutralHadronMultiplicity() + pfJet->photonMultiplicity() +
313 pfJet->electronMultiplicity() + pfJet->muonMultiplicity(),
316 }
else if (patJet !=
nullptr && patJet->isPFJet()) {
331 patJet->chargedHadronMultiplicity() + patJet->neutralHadronMultiplicity() + patJet->photonMultiplicity(),
334 patJet->chargedHadronMultiplicity() + patJet->neutralHadronMultiplicity() +
335 patJet->photonMultiplicity() + patJet->electronMultiplicity() + patJet->muonMultiplicity(),
355 #endif // RecoBTag_SecondaryVertex_CombinedSVComputer_h
reco::TrackSelector trackSelector
const math::XYZTLorentzVector & weightedVectorSum() const
virtual ~CombinedSVComputer()=default
unsigned int pseudoMultiplicityMin
void add(const reco::Track &track, double weight=1.0)
bool vertexMassCorrection
Base class for all types of Jets.
double etaRel(const math::XYZVector &dir, const math::XYZVector &track)
reco::TrackSelector trackNoDeltaRSelector
reco::V0Filter pseudoVertexV0Filter
Global3DPoint GlobalPoint
auto const & tracks
cannot be loose
virtual reco::TaggingVariableList operator()(const reco::TrackIPTagInfo &ipInfo, const reco::SecondaryVertexTagInfo &svInfo) const
CombinedSVComputer(const edm::ParameterSet ¶ms)
Jets made from PFObjects.
const uint16_t range(const Frame &aFrame)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
reco::btag::SortCriteria sortCriterium
Container::value_type value_type
reco::TrackSelector trackPseudoSelector
IterationRange flipIterate(int size, bool vertex) const
reco::V0Filter trackPairV0Filter
std::vector< reco::btau::TaggingVariableName > taggingVariables
double significance() const
unsigned int numberOfTracks() const
GlobalPoint closestToJetAxis
XYZVectorD XYZVector
spatial vector with cartesian internal representation
double flipValue(double value, bool vertex) const
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Analysis-level calorimeter jet class.
edm::ParameterSet dropDeltaR(const edm::ParameterSet &pset) const
const reco::btag::TrackIPData & threshTrack(const reco::CandIPTagInfo &trackIPTagInfo, const reco::btag::SortCriteria sort, const reco::Jet &jet, const GlobalPoint &pv) const
Measurement1D distanceToJetAxis
void fillCommonVariables(reco::TaggingVariableList &vars, reco::TrackKinematics &vertexKinematics, const IPTI &ipInfo, const SVTI &svInfo, double &vtx_track_ptSum, double &vtx_track_ESum) const
char data[epos_bytes_allocation]
const math::XYZTLorentzVector & vectorSum() const
edm::AssociationVector< reco::JetRefBaseProd, Values > Container
tuple size
Write out results.
void insert(const TaggingVariable &variable, bool delayed=false)
unsigned int trackMultiplicityMin