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();
197 if (hasRefittedTracks) {
200 vertexKinematics.add(actualTrack, w);
209 vertexKinematics.add(**track, w);
238 std::vector<TrackRef> pseudoVertexTracks;
242 std::size_t
idx = indices[
i];
245 const Track &track = *trackRef;
249 pseudoVertexTracks.push_back(trackRef);
250 vertexKinematics.add(track);
257 for(std::vector<TrackRef>::const_iterator track = pseudoVertexTracks.begin(); track != pseudoVertexTracks.end(); ++track)
275 std::size_t
idx = indices[
i];
278 const Track &track = *trackRef;
289 allKinematics.add(track);
298 std::size_t pairIdx = indices[
j];
301 const Track &pairTrack = *pairTrackRef;
306 trackPairV0Test[1] = pairTrackRef;
316 trackJetKinematics.add(track);
320 double trackMag =
std::sqrt(trackMom.Mag2());
366 varPi = (vertexMass/5.2794) * (vtx_track_ESum /jet_track_ESum);
371 if (allKinematics.numberOfTracks())
395 else if( patJet != 0)
407 vars.insert(
btau::hadronMultiplicity,patJet->chargedHadronMultiplicity()+patJet->neutralHadronMultiplicity(),
true);
408 vars.insert(
btau::hadronPhotonMultiplicity,patJet->chargedHadronMultiplicity()+patJet->neutralHadronMultiplicity()+patJet->photonMultiplicity(),
true);
409 vars.insert(
btau::totalMultiplicity,patJet->chargedHadronMultiplicity()+patJet->neutralHadronMultiplicity()+patJet->photonMultiplicity()+patJet->electronMultiplicity()+patJet->muonMultiplicity(),
true);
414 throw cms::Exception(
"InvalidConfiguration") <<
"From CombinedSVSoftLeptonComputer::operator: reco::PFJet OR pat::Jet are required by this module" << std::endl;
417 int leptonCategory = 0;
419 for (
unsigned int i = 0;
i < muonInfo.
leptons();
i++) {
430 if(leptonCategory != 1){
431 for (
unsigned int i = 0;
i < elecInfo.
leptons();
i++) {
445 int vertexLepCat = 2;
447 if(leptonCategory == 0){
454 }
else if(leptonCategory == 1){
459 else vertexLepCat = 5;
460 }
else if(leptonCategory == 2){
reco::TrackSelector trackNoDeltaRSelector
unsigned int pseudoMultiplicityMin
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
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
bool vertexMassCorrection
reco::V0Filter pseudoVertexV0Filter
reco::TrackIPTagInfo::SortCriteria sortCriterium
Jets made from PFObjects.
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
float trackWeight(const TrackBaseRef &r) const
returns the weight with which a Track has contributed to the vertex-fit.
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
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
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
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
size_type size() const
Size of the RefVector.
trackRef_iterator tracks_begin() const
first iterator over tracks
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.