165 auto tagInfos = std::make_unique<std::vector<reco::BoostedDoubleSVTagInfo>>();
168 for (std::vector<reco::CandSecondaryVertexTagInfo>::const_iterator iterTI =
svTagInfos->begin();
191 float jetNTracks = 0, nSV = 0, tau1_nSecondaryVertices = 0, tau2_nSecondaryVertices = 0;
196 std::vector<fastjet::PseudoJet> currentAxes;
204 pv =
GlobalPoint(vertexRef->x(), vertexRef->y(), vertexRef->z());
211 std::vector<float> IP3Ds, IP3Ds_1, IP3Ds_2;
215 for (
size_t itt = 0; itt < trackSize; ++itt) {
218 float track_PVweight = 0.;
220 if (track_PVweight > 0.5)
221 allKinematics.
add(trackRef);
229 bool isfromV0 =
false, isfromV0Tight =
false;
230 std::vector<reco::CandidatePtr> trackPairV0Test(2);
232 trackPairV0Test[0] = trackRef;
234 for (
size_t jtt = 0; jtt < trackSize; ++jtt) {
241 trackPairV0Test[1] = pairTrackRef;
247 isfromV0Tight =
true;
250 if (isfromV0 && isfromV0Tight)
261 if (currentAxes.size() > 1 &&
267 float decayLengthTau = -1;
268 float distTauAxis = -1;
280 IP3Ds.push_back(IP3Dsig < -50. ? -50. : IP3Dsig);
282 if (currentAxes.size() > 1) {
284 IP3Ds_1.push_back(IP3Dsig < -50. ? -50. : IP3Dsig);
286 IP3Ds_2.push_back(IP3Dsig < -50. ? -50. : IP3Dsig);
288 IP3Ds_1.push_back(IP3Dsig < -50. ? -50. : IP3Dsig);
293 bool charmThreshSet =
false;
304 && !charmThreshSet) {
305 trackSip2dSigAboveCharm_0 =
data.ip2d.significance();
307 charmThreshSet =
true;
320 float dummyTrack = -50.;
322 std::sort(IP3Ds.begin(), IP3Ds.end(), std::greater<float>());
323 std::sort(IP3Ds_1.begin(), IP3Ds_1.end(), std::greater<float>());
324 std::sort(IP3Ds_2.begin(), IP3Ds_2.end(), std::greater<float>());
325 int num_1 = IP3Ds_1.size();
326 int num_2 = IP3Ds_2.size();
417 std::vector<float> tau1_trackEtaRels, tau2_trackEtaRels;
419 std::map<double, size_t> VTXmap;
425 if (currentAxes.size() > 1) {
428 tau2Kinematics = tau2Kinematics + vertexKinematic;
434 tau2_nSecondaryVertices += 1.;
436 tau1Kinematics = tau1Kinematics + vertexKinematic;
442 tau1_nSecondaryVertices += 1.;
445 }
else if (!currentAxes.empty()) {
446 tau1Kinematics = tau1Kinematics + vertexKinematic;
452 tau1_nSecondaryVertices += 1.;
462 if (tau1_nSecondaryVertices > 0.) {
472 if (tau2_nSecondaryVertices > 0.) {
482 float dummyEtaRel = -1.;
484 std::sort(tau1_trackEtaRels.begin(), tau1_trackEtaRels.end());
485 std::sort(tau2_trackEtaRels.begin(), tau2_trackEtaRels.end());
487 switch (tau2_trackEtaRels.size()) {
519 switch (tau1_trackEtaRels.size()) {
556 for (std::map<double, size_t>::iterator iVtx = VTXmap.begin(); iVtx != VTXmap.end(); ++iVtx) {
560 flightDir_0 =
svTagInfo.flightDirection(iVtx->second);
568 flightDir_1 =
svTagInfo.flightDirection(iVtx->second);
581 if ((tau1_vertexMass < 0 && tau2_vertexMass > 0)) {
static constexpr float charmThreshold
static constexpr float dummyTrackSip2dSigAbove
reco::Vertex::Point convertPos(const GlobalPoint &p)
const edm::EDGetTokenT< std::vector< reco::CandSecondaryVertexTagInfo > > svTagInfos_
void calcNsubjettiness(const reco::JetBaseRef &jet, float &tau1, float &tau2, std::vector< fastjet::PseudoJet > ¤tAxes) const
const double maxDistToAxis_
const double maxDecayLen_
const double maxSVDeltaRToJet_
void add(const reco::Track &track, double weight=1.0)
int closest(std::vector< int > const &vec, int value)
constexpr bool isUninitialized() const noexcept
Global3DPoint GlobalPoint
const Container & selectedTracks() const
bool isNonnull() const
Checks for non-null.
static constexpr float dummyTrackEtaRel
reco::V0Filter trackPairV0Filter
reco::TrackSelector trackSelector
void setTracksPV(const reco::CandidatePtr &trackRef, const reco::VertexRef &vertexRef, float &PVweight) const
reco::TransientTrack build(const reco::Track *p) const
U second(std::pair< T, U > const &p)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
void etaRelToTauAxis(const reco::VertexCompositePtrCandidate &vertex, const fastjet::PseudoJet &tauAxis, std::vector< float > &tau_trackEtaRel) const
static constexpr float dummyTrackSip3dSig
edm::Handle< edm::ValueMap< float > > weightsHandle_
std::vector< size_t > sortedIndexes(btag::SortCriteria mode=reco::btag::IP3DSig) const
const MagneticField * field() const
static constexpr float dummyFlightDistance2dSig
const math::XYZTLorentzVector & vectorSum() const
Abs< T >::type abs(const T &t)
const std::vector< btag::TrackIPData > & impactParameterData() const
static constexpr float dummyVertexEnergyRatio
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
static constexpr float bottomThreshold
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
XYZVectorD XYZVector
spatial vector with cartesian internal representation
edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > trackBuilderToken_
bool isSelected(const std::vector< L1HPSPFTauQualityCut > &qualityCuts, const l1t::PFCandidate &pfCand, float_t primaryVertexZ)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
static constexpr float dummyZ_ratio
static constexpr float dummyVertexMass
char data[epos_bytes_allocation]
const math::XYZTLorentzVector & weightedVectorSum() const
const edm::Ref< VertexCollection > & primaryVertex() const
static constexpr float dummyVertexDeltaR
TrajectoryStateOnSurface impactPointState() const
cont
load Luminosity info ##
edm::EDGetTokenT< edm::ValueMap< float > > weightsToken_
Global3DVector GlobalVector