7 #include <Math/VectorUtil.h>
46 #define range_for(i, x) \
47 for(int i = (x).begin; i != (x).end; i += (x).increment)
57 trackFlip(params.getParameter<bool>(
"trackFlip")),
58 vertexFlip(params.getParameter<bool>(
"vertexFlip")),
59 charmCut(params.getParameter<double>(
"charmCut")),
60 sortCriterium(TrackSorting::
getCriterium(params.getParameter<std::
string>(
"trackSort"))),
63 trackPseudoSelector(params.getParameter<edm::
ParameterSet>(
"trackPseudoSelection")),
64 pseudoMultiplicityMin(params.getParameter<unsigned int>(
"pseudoMultiplicityMin")),
65 trackMultiplicityMin(params.getParameter<unsigned int>(
"trackMultiplicityMin")),
66 minTrackWeight(params.getParameter<double>(
"minimumTrackWeight")),
68 vertexMassCorrection(params.getParameter<bool>(
"correctVertexMass")),
69 pseudoVertexV0Filter(params.getParameter<edm::
ParameterSet>(
"pseudoVertexV0Filter")),
70 trackPairV0Filter(params.getParameter<edm::
ParameterSet>(
"trackPairV0Filter"))
81 int size,
bool vertex)
const
85 range.
begin = size - 1;
105 const std::vector<TrackIPTagInfo::TrackIPData> &ipData =
107 std::vector<std::size_t> indices = trackIPTagInfo.
sortedIndexes(sort);
112 std::size_t
idx = indices[
i];
138 double momPar = dir.Dot(track);
141 return 0.5 *
std::log((energy + momPar) / (energy - momPar));
151 using namespace ROOT::Math;
177 double vtx_track_ptSum= 0.;
178 double vtx_track_ESum= 0.;
179 double jet_track_ESum= 0.;
182 unsigned int numberofvertextracks = 0;
187 if (vtx < 0) vtx =
i;
189 numberofvertextracks = numberofvertextracks + (svInfo.
secondaryVertex(
i)).nTracks();
198 if (hasRefittedTracks) {
201 vertexKinematics.add(actualTrack, w);
210 vertexKinematics.add(**track, w);
239 std::vector<TrackRef> pseudoVertexTracks;
243 std::size_t
idx = indices[
i];
246 const Track &track = *trackRef;
250 pseudoVertexTracks.push_back(trackRef);
251 vertexKinematics.add(track);
258 for(std::vector<TrackRef>::const_iterator track = pseudoVertexTracks.begin(); track != pseudoVertexTracks.end(); ++track)
276 std::size_t
idx = indices[
i];
279 const Track &track = *trackRef;
290 allKinematics.add(track);
299 std::size_t pairIdx = indices[
j];
302 const Track &pairTrack = *pairTrackRef;
307 trackPairV0Test[1] = pairTrackRef;
317 trackJetKinematics.add(track);
321 double trackMag =
std::sqrt(trackMom.Mag2());
367 varPi = (vertexMass/5.2794) * (vtx_track_ESum /jet_track_ESum);
372 if (allKinematics.numberOfTracks())
396 else if( patJet != 0)
408 vars.insert(
btau::hadronMultiplicity,patJet->chargedHadronMultiplicity()+patJet->neutralHadronMultiplicity(),
true);
409 vars.insert(
btau::hadronPhotonMultiplicity,patJet->chargedHadronMultiplicity()+patJet->neutralHadronMultiplicity()+patJet->photonMultiplicity(),
true);
410 vars.insert(
btau::totalMultiplicity,patJet->chargedHadronMultiplicity()+patJet->neutralHadronMultiplicity()+patJet->photonMultiplicity()+patJet->electronMultiplicity()+patJet->muonMultiplicity(),
true);
415 throw cms::Exception(
"InvalidConfiguration") <<
"From CombinedSVSoftLeptonComputer::operator: reco::PFJet OR pat::Jet are required by this module" << std::endl;
418 int leptonCategory = 0;
420 for (
unsigned int i = 0;
i < muonInfo.
leptons();
i++) {
431 if(leptonCategory != 1){
432 for (
unsigned int i = 0;
i < elecInfo.
leptons();
i++) {
446 int vertexLepCat = 2;
448 if(leptonCategory == 0){
455 }
else if(leptonCategory == 1){
460 else vertexLepCat = 5;
461 }
else if(leptonCategory == 2){
reco::TrackSelector trackNoDeltaRSelector
unsigned int pseudoMultiplicityMin
virtual double et() const GCC11_FINAL
transverse energy
const Vector & momentum() const
track momentum vector
reco::V0Filter trackPairV0Filter
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
bool vertexMassCorrection
reco::V0Filter pseudoVertexV0Filter
reco::TrackIPTagInfo::SortCriteria sortCriterium
const_iterator end() const
Termination of iteration.
Jets made from PFObjects.
const_iterator begin() const
Initialize an iterator over the RefVector.
reco::TrackSelector trackPseudoSelector
reco::TrackSelector trackSelector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
bool isNonnull() const
Checks for non-null.
const GlobalVector & flightDirection(unsigned int index) const
const Vertex & secondaryVertex(unsigned int index) const
unsigned int leptons(void) const
void addParameter(std::string const &name, T const &value)
unsigned int trackMultiplicityMin
CombinedSVSoftLeptonComputer(const edm::ParameterSet ¶ms)
static double etaRel(const math::XYZVector &dir, const math::XYZVector &track)
double flipValue(double value, bool vertex) const
GlobalPoint closestToJetAxis
float trackWeight(unsigned int svIndex, unsigned int trackindex) const
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
const SoftLeptonProperties & properties(size_t i) const
double significance() const
Measurement1D distanceToJetAxis
static edm::ParameterSet dropDeltaR(const edm::ParameterSet &pset)
XYZVectorD XYZVector
spatial vector with cartesian internal representation
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
Analysis-level calorimeter jet class.
reco::TaggingVariableList operator()(const reco::TrackIPTagInfo &ipInfo, const reco::SecondaryVertexTagInfo &svInfo, const reco::SoftLeptonTagInfo &muonInfo, const reco::SoftLeptonTagInfo &elecInfo) const
char data[epos_bytes_allocation]
const std::vector< TrackIPData > & impactParameterData() const
unsigned int nVertices() const
size_type size() const
Size of the RefVector.
const reco::TrackIPTagInfo::TrackIPData & threshTrack(const reco::TrackIPTagInfo &trackIPTagInfo, const reco::TrackIPTagInfo::SortCriteria sort, const reco::Jet &jet, const GlobalPoint &pv) const
const edm::RefVector< TrackCollection > & selectedTracks() const
IterationRange flipIterate(int size, bool vertex) 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.