1 #ifndef RecoBTag_SecondaryVertex_CombinedSVComputer_h
2 #define RecoBTag_SecondaryVertex_CombinedSVComputer_h
10 #include <Math/VectorUtil.h>
38 #define range_for(i, x) \
39 for(int i = (x).begin; i != (x).end; i += (x).increment)
71 template <
class SVTI,
class IPTI>
73 const IPTI & ipInfo,
const SVTI & svInfo,
74 double & vtx_track_ptSum,
double & vtx_track_ESum)
const;
94 template <
class SVTI,
class IPTI>
96 const IPTI & ipInfo,
const SVTI & svInfo,
97 double & vtx_track_ptSum,
double & vtx_track_ESum)
const
99 using namespace ROOT::Math;
100 using namespace reco;
104 bool havePv = ipInfo.primaryVertex().isNonnull();
108 ipInfo.primaryVertex()->y(),
109 ipInfo.primaryVertex()->z());
125 double jet_track_ESum= 0.;
131 if (vtx < 0) vtx =
i;
145 std::vector<std::size_t> indices = ipInfo.sortedIndexes(
sortCriterium);
146 const std::vector<reco::btag::TrackIPData> &ipData = ipInfo.impactParameterData();
148 const typename IPTI::input_container &
tracks = ipInfo.selectedTracks();
149 std::vector<const Track *> pseudoVertexTracks;
151 const Track * trackPairV0Test[2];
154 std::size_t
idx = indices[
i];
157 const Track &track = *trackPtr;
169 allKinematics.add(track);
173 pseudoVertexTracks.push_back(trackPtr);
174 vertexKinematics.
add(track);
184 std::size_t pairIdx = indices[
j];
187 const Track &pairTrack = *pairTrackPtr;
192 trackPairV0Test[1] = pairTrackPtr;
201 trackJetKinematics.add(track);
205 double trackMag =
std::sqrt(trackMom.Mag2());
231 for(std::vector<const Track *>::const_iterator track = pseudoVertexTracks.begin(); track != pseudoVertexTracks.end(); ++track)
234 vtx_track_ptSum +=
std::sqrt((*track)->momentum().Perp2());
252 ? allKinematics.weightedVectorSum()
253 : allKinematics.vectorSum();
272 double varPi = (vertexMass/5.2794) * (vtx_track_ESum /jet_track_ESum);
277 if (allKinematics.numberOfTracks()) {
301 vars.
insert(
btau::totalMultiplicity,pfJet->chargedHadronMultiplicity()+pfJet->neutralHadronMultiplicity()+pfJet->photonMultiplicity()+pfJet->electronMultiplicity()+pfJet->muonMultiplicity(),
true);
304 else if( patJet != 0 && patJet->isPFJet() )
318 vars.
insert(
btau::totalMultiplicity,patJet->chargedHadronMultiplicity()+patJet->neutralHadronMultiplicity()+patJet->photonMultiplicity()+patJet->electronMultiplicity()+patJet->muonMultiplicity(),
true);
340 #endif // RecoBTag_SecondaryVertex_CombinedSVComputer_h
reco::TrackSelector trackSelector
const math::XYZTLorentzVector & weightedVectorSum() const
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
virtual reco::TaggingVariableList operator()(const reco::TrackIPTagInfo &ipInfo, const reco::SecondaryVertexTagInfo &svInfo) const
CombinedSVComputer(const edm::ParameterSet ¶ms)
const Vector & momentum() const
track momentum vector
const reco::Track * toTrack(const reco::TrackBaseRef &t)
Jets made from PFObjects.
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
reco::btag::SortCriteria sortCriterium
reco::TrackSelector trackPseudoSelector
IterationRange flipIterate(int size, bool vertex) const
reco::V0Filter trackPairV0Filter
double deltaR(double eta1, double eta2, double phi1, double phi2)
std::vector< reco::btau::TaggingVariableName > taggingVariables
double significance() const
unsigned int numberOfTracks() const
GlobalPoint closestToJetAxis
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
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
const math::XYZTLorentzVector & vectorSum() const
tuple size
Write out results.
void insert(const TaggingVariable &variable, bool delayed=false)
unsigned int trackMultiplicityMin