CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
CombinedSVComputerV2 Class Reference

#include <CombinedSVComputerV2.h>

Classes

struct  IterationRange
 

Public Member Functions

 CombinedSVComputerV2 (const edm::ParameterSet &params)
 
reco::TaggingVariableList operator() (const reco::TrackIPTagInfo &ipInfo, const reco::SecondaryVertexTagInfo &svInfo) const
 

Private Member Functions

IterationRange flipIterate (int size, bool vertex) const
 
double flipValue (double value, bool vertex) const
 
const
reco::TrackIPTagInfo::TrackIPData
threshTrack (const reco::TrackIPTagInfo &trackIPTagInfo, const reco::TrackIPTagInfo::SortCriteria sort, const reco::Jet &jet, const GlobalPoint &pv) const
 

Private Attributes

double charmCut
 
double minTrackWeight
 
unsigned int pseudoMultiplicityMin
 
reco::V0Filter pseudoVertexV0Filter
 
reco::TrackIPTagInfo::SortCriteria sortCriterium
 
bool trackFlip
 
unsigned int trackMultiplicityMin
 
reco::TrackSelector trackNoDeltaRSelector
 
reco::V0Filter trackPairV0Filter
 
reco::TrackSelector trackPseudoSelector
 
reco::TrackSelector trackSelector
 
bool useTrackWeights
 
bool vertexFlip
 
bool vertexMassCorrection
 

Detailed Description

Definition at line 14 of file CombinedSVComputerV2.h.

Constructor & Destructor Documentation

CombinedSVComputerV2::CombinedSVComputerV2 ( const edm::ParameterSet params)

Definition at line 54 of file CombinedSVComputerV2.cc.

54  :
55  trackFlip(params.getParameter<bool>("trackFlip")),
56  vertexFlip(params.getParameter<bool>("vertexFlip")),
57  charmCut(params.getParameter<double>("charmCut")),
59  trackSelector(params.getParameter<edm::ParameterSet>("trackSelection")),
61  trackPseudoSelector(params.getParameter<edm::ParameterSet>("trackPseudoSelection")),
62  pseudoMultiplicityMin(params.getParameter<unsigned int>("pseudoMultiplicityMin")),
63  trackMultiplicityMin(params.getParameter<unsigned int>("trackMultiplicityMin")),
64  minTrackWeight(params.getParameter<double>("minimumTrackWeight")),
65  useTrackWeights(params.getParameter<bool>("useTrackWeights")),
66  vertexMassCorrection(params.getParameter<bool>("correctVertexMass")),
67  pseudoVertexV0Filter(params.getParameter<edm::ParameterSet>("pseudoVertexV0Filter")),
68  trackPairV0Filter(params.getParameter<edm::ParameterSet>("trackPairV0Filter"))
69 {
70 }
T getParameter(std::string const &) const
reco::TrackIPTagInfo::SortCriteria getCriterium(const std::string &name)
Definition: TrackSorting.cc:11
reco::V0Filter pseudoVertexV0Filter
reco::V0Filter trackPairV0Filter
reco::TrackSelector trackPseudoSelector
reco::TrackSelector trackNoDeltaRSelector
reco::TrackSelector trackSelector
static edm::ParameterSet dropDeltaR(const edm::ParameterSet &pset)
unsigned int pseudoMultiplicityMin
unsigned int trackMultiplicityMin
reco::TrackIPTagInfo::SortCriteria sortCriterium

Member Function Documentation

CombinedSVComputerV2::IterationRange CombinedSVComputerV2::flipIterate ( int  size,
bool  vertex 
) const
inlineprivate

Definition at line 77 of file CombinedSVComputerV2.cc.

References CombinedSVComputerV2::IterationRange::begin, CombinedSVComputerV2::IterationRange::end, CombinedSVComputerV2::IterationRange::increment, findQualityFiles::size, trackFlip, and vertexFlip.

Referenced by operator()(), and threshTrack().

79 {
80  IterationRange range;
81  if (vertex ? vertexFlip : trackFlip) {
82  range.begin = size - 1;
83  range.end = -1;
84  range.increment = -1;
85  } else {
86  range.begin = 0;
87  range.end = size;
88  range.increment = +1;
89  }
90 
91  return range;
92 }
tuple size
Write out results.
double CombinedSVComputerV2::flipValue ( double  value,
bool  vertex 
) const
inlineprivate

Definition at line 72 of file CombinedSVComputerV2.cc.

References trackFlip, relativeConstraints::value, and vertexFlip.

Referenced by operator()().

TaggingVariableList CombinedSVComputerV2::operator() ( const reco::TrackIPTagInfo ipInfo,
const reco::SecondaryVertexTagInfo svInfo 
) const

Definition at line 142 of file CombinedSVComputerV2.cc.

References edm::RefVector< C, T, F >::begin(), reco::btau::chargedHadronEnergyFraction, reco::btau::chargedHadronMultiplicity, reco::TrackIPTagInfo::TrackIPData::closestToJetAxis, data, deltaR(), dir, reco::TrackIPTagInfo::TrackIPData::distanceToJetAxis, reco::btau::electronEnergyFraction, reco::btau::electronMultiplicity, edm::RefVector< C, T, F >::end(), reco::LeafCandidate::et(), etaRel(), edm::hlt::Exception, reco::SecondaryVertexTagInfo::flightDirection(), reco::SecondaryVertexTagInfo::flightDistance(), reco::btau::flightDistance2dSig, reco::btau::flightDistance2dVal, reco::btau::flightDistance3dSig, reco::btau::flightDistance3dVal, flipIterate(), flipValue(), reco::btau::hadronMultiplicity, reco::btau::hadronPhotonMultiplicity, reco::Vertex::hasRefittedTracks(), i, customizeTrackingMonitorSeedNumber::idx, reco::TrackIPTagInfo::impactParameterData(), reco::TaggingVariableList::insert(), reco::TrackIPTagInfo::TrackIPData::ip2d, reco::TrackIPTagInfo::TrackIPData::ip3d, edm::Ref< C, T, F >::isNonnull(), j, reco::JTATagInfo::jet(), metsig::jet, reco::btau::jetEta, reco::btau::jetNSecondaryVertices, reco::btau::jetNTracks, reco::btau::jetPt, PV3DBase< T, PVType, FrameType >::mag2(), reco::btau::massVertexEnergyFraction, minTrackWeight, reco::TrackBase::momentum(), reco::btau::muonEnergyFraction, reco::btau::muonMultiplicity, reco::btau::neutralHadronEnergyFraction, reco::btau::neutralHadronMultiplicity, reco::btag::Vertices::NoVertex, reco::SecondaryVertexTagInfo::nVertices(), convertSQLiteXML::ok, pfJet, reco::btau::photonEnergyFraction, reco::btau::photonMultiplicity, reco::ParticleMasses::piPlus, funct::pow(), reco::TrackIPTagInfo::primaryVertex(), pseudoMultiplicityMin, reco::btag::Vertices::PseudoVertex, pseudoVertexV0Filter, range_for, reco::btag::Vertices::RecoVertex, reco::Vertex::refittedTrack(), reco::SecondaryVertexTagInfo::secondaryVertex(), reco::TrackIPTagInfo::selectedTracks(), Measurement1D::significance(), edm::RefVector< C, T, F >::size(), sortCriterium, reco::TrackIPTagInfo::sortedIndexes(), mathSSE::sqrt(), threshTrack(), reco::btau::totalMultiplicity, reco::btau::trackDecayLenVal, reco::btau::trackDeltaR, reco::btau::trackEtaRel, reco::btau::trackJetDistVal, reco::btau::trackJetPt, trackMultiplicityMin, trackPairV0Filter, reco::btau::trackPPar, reco::btau::trackPParRatio, trackPseudoSelector, reco::btau::trackPtRatio, reco::btau::trackPtRel, testEve_cfg::tracks, trackSelector, reco::btau::trackSip2dSig, reco::btau::trackSip2dSigAboveCharm, reco::btau::trackSip2dVal, reco::btau::trackSip2dValAboveCharm, reco::btau::trackSip3dSig, reco::btau::trackSip3dSigAboveCharm, reco::btau::trackSip3dVal, reco::btau::trackSip3dValAboveCharm, reco::btau::trackSumJetDeltaR, reco::btau::trackSumJetEtRatio, reco::SecondaryVertexTagInfo::trackWeight(), useTrackWeights, Measurement1D::value(), reco::btau::vertexBoostOverSqrtJetPt, reco::btau::vertexCategory, reco::btau::vertexEnergyRatio, reco::btau::vertexFitProb, reco::btau::vertexJetDeltaR, reco::btau::vertexMass, vertexMassCorrection, reco::btau::vertexNTracks, reco::SecondaryVertexTagInfo::vertexTracks(), w(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

144 {
145  using namespace ROOT::Math;
146 
147  edm::RefToBase<Jet> jet = ipInfo.jet();
148 
149  math::XYZVector jetDir = jet->momentum().Unit();
150  bool havePv = ipInfo.primaryVertex().isNonnull();
151  GlobalPoint pv;
152  if (havePv)
153  pv = GlobalPoint(ipInfo.primaryVertex()->x(), ipInfo.primaryVertex()->y(), ipInfo.primaryVertex()->z());
154 
156 
157  TaggingVariableList vars;
158 
159  vars.insert(btau::jetPt, jet->pt(), true);
160  vars.insert(btau::jetEta, jet->eta(), true);
161 
162  if (ipInfo.selectedTracks().size() < trackMultiplicityMin)
163  return vars;
164 
165  vars.insert(btau::jetNTracks, ipInfo.selectedTracks().size(), true);
166 
167  TrackKinematics allKinematics;
168  TrackKinematics vertexKinematics;
169  TrackKinematics trackJetKinematics;
170 
171  double vtx_track_ptSum= 0.;
172  double vtx_track_ESum= 0.;
173  double jet_track_ESum= 0.;
174 
175  int vtx = -1;
176  unsigned int numberofvertextracks = 0;
177 
178  //IF THERE ARE SECONDARY VERTICES THE JET FALLS IN THE RECOVERTEX CATEGORY
179  IterationRange range = flipIterate(svInfo.nVertices(), true);
180  range_for(i, range) {
181  if (vtx < 0) vtx = i; //RecoVertex category (vtx=0) if we enter at least one time in this loop!
182 
183  numberofvertextracks = numberofvertextracks + (svInfo.secondaryVertex(i)).nTracks();
184 
185  const Vertex &vertex = svInfo.secondaryVertex(i);
186  bool hasRefittedTracks = vertex.hasRefittedTracks();
188  for(TrackRefVector::const_iterator track = tracks.begin(); track != tracks.end(); track++) {
189  double w = svInfo.trackWeight(i, *track);
190  if (w < minTrackWeight)
191  continue;
192  if (hasRefittedTracks) {
193  Track actualTrack = vertex.refittedTrack(*track);
194  vars.insert(btau::trackEtaRel, etaRel(jetDir,actualTrack.momentum()), true);
195  vertexKinematics.add(actualTrack, w);
196  if(i==0)
197  {
198  math::XYZVector vtx_trackMom = actualTrack.momentum();
199  vtx_track_ptSum += std::sqrt(std::pow(vtx_trackMom.X(),2) + std::pow(vtx_trackMom.Y(),2));
200  vtx_track_ESum += std::sqrt(vtx_trackMom.Mag2() + ROOT::Math::Square(ParticleMasses::piPlus));
201  }
202  } else { //THIS ONE IS TAKEN...
203  vars.insert(btau::trackEtaRel, etaRel(jetDir,(*track)->momentum()), true);
204  vertexKinematics.add(**track, w);
205  if(i==0) // calculate this only for the first vertex
206  {
207  math::XYZVector vtx_trackMom = (*track)->momentum();
208  vtx_track_ptSum += std::sqrt(std::pow(vtx_trackMom.X(),2) + std::pow(vtx_trackMom.Y(),2));
209  vtx_track_ESum += std::sqrt(vtx_trackMom.Mag2() + std::pow(ParticleMasses::piPlus,2));
210  }
211  }
212  }
213  }
214 
215  if (vtx >= 0) {
216  vtxType = btag::Vertices::RecoVertex;
217  vars.insert(btau::flightDistance2dVal,flipValue(svInfo.flightDistance(vtx, true).value(),true),true);
218  vars.insert(btau::flightDistance2dSig,flipValue(svInfo.flightDistance(vtx, true).significance(),true),true);
219  vars.insert(btau::flightDistance3dVal,flipValue(svInfo.flightDistance(vtx, false).value(),true),true);
220  vars.insert(btau::flightDistance3dSig,flipValue(svInfo.flightDistance(vtx, false).significance(),true),true);
221  vars.insert(btau::vertexJetDeltaR,Geom::deltaR(svInfo.flightDirection(vtx), jetDir),true);
222  vars.insert(btau::jetNSecondaryVertices, svInfo.nVertices(), true);
223  vars.insert(btau::vertexNTracks, numberofvertextracks, true);
224  vars.insert(btau::vertexFitProb,(svInfo.secondaryVertex(vtx)).normalizedChi2(), true);
225  }
226 
227 
228  //NOW ATTEMPT TO RECONSTRUCT PSEUDOVERTEX!!!
229  std::vector<std::size_t> indices = ipInfo.sortedIndexes(sortCriterium);
230  const std::vector<TrackIPTagInfo::TrackIPData> &ipData = ipInfo.impactParameterData();
231  const edm::RefVector<TrackCollection> &tracks = ipInfo.selectedTracks();
232 
233  std::vector<TrackRef> pseudoVertexTracks;
234 
235  range = flipIterate(indices.size(), false);
236  range_for(i, range) {
237  std::size_t idx = indices[i];
238  const TrackIPTagInfo::TrackIPData &data = ipData[idx];
239  const TrackRef &trackRef = tracks[idx];
240  const Track &track = *trackRef;
241 
242  // if no vertex was reconstructed, attempt pseudo vertex
243  if (vtxType == btag::Vertices::NoVertex && trackPseudoSelector(track, data, *jet, pv)) {
244  pseudoVertexTracks.push_back(trackRef);
245  vertexKinematics.add(track);
246  }
247  }
248 
249  if (vtxType == btag::Vertices::NoVertex && vertexKinematics.numberOfTracks() >= pseudoMultiplicityMin && pseudoVertexV0Filter(pseudoVertexTracks))
250  {
252  for(std::vector<TrackRef>::const_iterator track = pseudoVertexTracks.begin(); track != pseudoVertexTracks.end(); ++track)
253  {
254  vars.insert(btau::trackEtaRel, etaRel(jetDir, (*track)->momentum()), true);
255  math::XYZVector vtx_trackMom = (*track)->momentum();
256  vtx_track_ptSum += std::sqrt(std::pow(vtx_trackMom.X(),2) + std::pow(vtx_trackMom.Y(),2));
257  vtx_track_ESum += std::sqrt(vtx_trackMom.Mag2() + std::pow(ParticleMasses::piPlus,2));
258  }
259  }
260 
261  vars.insert(btau::vertexCategory, vtxType, true);
262 
263 
264 
265  // do a tighter track selection to fill the variable plots...
266  TrackRef trackPairV0Test[2];
267  range = flipIterate(indices.size(), false);
268  range_for(i, range) {
269 
270  std::size_t idx = indices[i];
271  const TrackIPTagInfo::TrackIPData &data = ipData[idx];
272  const TrackRef &trackRef = tracks[idx];
273  const Track &track = *trackRef;
274 
275  jet_track_ESum += std::sqrt((track.momentum()).Mag2() + std::pow(ParticleMasses::piPlus,2));
276  // add track to kinematics for all tracks in jet
277  //allKinematics.add(track); //would make more sense for some variables, e.g. vertexEnergyRatio nicely between 0 and 1, but not necessarily the best option for the discriminating power...
278 
279  // filter tracks -> this track selection can be more tight (used to fill the track related variables...)
280  if (!trackSelector(track, data, *jet, pv))
281  continue;
282 
283  // add track to kinematics for all tracks in jet
284  allKinematics.add(track);
285 
286  // check against all other tracks for K0 track pairs setting the track mass to pi+
287  trackPairV0Test[0] = tracks[idx];
288  bool ok = true;
289  range_for(j, range) {
290  if (i == j)
291  continue;
292 
293  std::size_t pairIdx = indices[j];
294  const TrackIPTagInfo::TrackIPData &pairTrackData = ipData[pairIdx];
295  const TrackRef &pairTrackRef = tracks[pairIdx];
296  const Track &pairTrack = *pairTrackRef;
297 
298  if (!trackSelector(pairTrack, pairTrackData, *jet, pv))
299  continue;
300 
301  trackPairV0Test[1] = pairTrackRef;
302  if (!trackPairV0Filter(trackPairV0Test, 2)) { //V0 filter is more tight (0.03) than the one used for the RecoVertex and PseudoVertex tracks (0.05)
303  ok = false;
304  break;
305  }
306  }
307 
308  if (!ok)
309  continue;
310 
311  trackJetKinematics.add(track);
312 
313 
314  // add track variables
315  math::XYZVector trackMom = track.momentum();
316  double trackMag = std::sqrt(trackMom.Mag2());
317 
318  vars.insert(btau::trackSip3dVal, flipValue(data.ip3d.value(), false), true);
319  vars.insert(btau::trackSip3dSig, flipValue(data.ip3d.significance(), false), true);
320  vars.insert(btau::trackSip2dVal, flipValue(data.ip2d.value(), false), true);
321  vars.insert(btau::trackSip2dSig, flipValue(data.ip2d.significance(), false), true);
322  vars.insert(btau::trackJetDistVal, data.distanceToJetAxis.value(), true);
323  vars.insert(btau::trackDecayLenVal, havePv ? (data.closestToJetAxis - pv).mag() : -1.0, true);
324 
325  vars.insert(btau::trackPtRel, VectorUtil::Perp(trackMom, jetDir), true);
326  vars.insert(btau::trackPPar, jetDir.Dot(trackMom), true);
327  vars.insert(btau::trackDeltaR, VectorUtil::DeltaR(trackMom, jetDir), true);
328  vars.insert(btau::trackPtRatio, VectorUtil::Perp(trackMom, jetDir) / trackMag, true);
329  vars.insert(btau::trackPParRatio, jetDir.Dot(trackMom) / trackMag, true);
330  }
331 
332  vars.insert(btau::trackJetPt, trackJetKinematics.vectorSum().Pt(), true);
333 
334 
335  vars.insert(btau::trackSumJetDeltaR,VectorUtil::DeltaR(allKinematics.vectorSum(), jetDir), true);
336  vars.insert(btau::trackSumJetEtRatio,allKinematics.vectorSum().Et() / ipInfo.jet()->et(), true);
337  vars.insert(btau::trackSip3dSigAboveCharm, flipValue(threshTrack(ipInfo, TrackIPTagInfo::IP3DSig, *jet, pv).ip3d.significance(),false),true);
338  vars.insert(btau::trackSip3dValAboveCharm, flipValue(threshTrack(ipInfo, TrackIPTagInfo::IP3DSig, *jet, pv).ip3d.value(),false),true);
339  vars.insert(btau::trackSip2dSigAboveCharm, flipValue(threshTrack(ipInfo, TrackIPTagInfo::IP2DSig, *jet, pv).ip2d.significance(),false),true);
340  vars.insert(btau::trackSip2dValAboveCharm, flipValue(threshTrack(ipInfo, TrackIPTagInfo::IP2DSig, *jet, pv).ip2d.value(),false),true);
341 
342  if (vtxType != btag::Vertices::NoVertex) {
343  math::XYZTLorentzVector allSum = useTrackWeights ? allKinematics.weightedVectorSum() : allKinematics.vectorSum();
344  math::XYZTLorentzVector vertexSum = useTrackWeights ? vertexKinematics.weightedVectorSum() : vertexKinematics.vectorSum();
345 
346  if (vtxType != btag::Vertices::RecoVertex) {
347  vars.insert(btau::vertexNTracks,vertexKinematics.numberOfTracks(), true);
348  vars.insert(btau::vertexJetDeltaR,VectorUtil::DeltaR(vertexSum, jetDir), true);
349  }
350 
351  double vertexMass = vertexSum.M();
352  double varPi = 0;
353  double varB = 0;
354  if (vtxType == btag::Vertices::RecoVertex) {
356  {
357  GlobalVector dir = svInfo.flightDirection(vtx);
358  double vertexPt2 = math::XYZVector(dir.x(), dir.y(), dir.z()).Cross(vertexSum).Mag2() / dir.mag2();
359  vertexMass = std::sqrt(vertexMass * vertexMass + vertexPt2) + std::sqrt(vertexPt2);
360  }
361  }
362  vars.insert(btau::vertexMass, vertexMass, true);
363  varPi = (vertexMass/5.2794) * (vtx_track_ESum /jet_track_ESum); //5.2794 should be average B meson mass of PDG! CHECK!!!
364  vars.insert(btau::massVertexEnergyFraction, varPi, true);
365  varB = (std::sqrt(5.2794) * vtx_track_ptSum) / ( vertexMass * std::sqrt(jet->pt()));
366  vars.insert(btau::vertexBoostOverSqrtJetPt,varB*varB/(varB*varB + 10.), true);
367 
368  if (allKinematics.numberOfTracks())
369  vars.insert(btau::vertexEnergyRatio, vertexSum.E() / allSum.E(), true);
370  else
371  vars.insert(btau::vertexEnergyRatio, 1, true);
372  }
373 
374  reco::PFJet const * pfJet = dynamic_cast<reco::PFJet const *>( &* jet ) ;
375  pat::Jet const * patJet = dynamic_cast<pat::Jet const *>( &* jet ) ;
376  if ( pfJet != 0 ) {
377  vars.insert(btau::chargedHadronEnergyFraction,pfJet->chargedHadronEnergyFraction(), true);
378  vars.insert(btau::neutralHadronEnergyFraction,pfJet->neutralHadronEnergyFraction(), true);
379  vars.insert(btau::photonEnergyFraction,pfJet->photonEnergyFraction(), true);
380  vars.insert(btau::electronEnergyFraction,pfJet->electronEnergyFraction(), true);
381  vars.insert(btau::muonEnergyFraction,pfJet->muonEnergyFraction(), true);
382  vars.insert(btau::chargedHadronMultiplicity,pfJet->chargedHadronMultiplicity(), true);
383  vars.insert(btau::neutralHadronMultiplicity,pfJet->neutralHadronMultiplicity(), true);
384  vars.insert(btau::photonMultiplicity,pfJet->photonMultiplicity(), true);
385  vars.insert(btau::electronMultiplicity,pfJet->electronMultiplicity(), true);
386  vars.insert(btau::muonMultiplicity,pfJet->muonMultiplicity(), true);
387  vars.insert(btau::hadronMultiplicity,pfJet->chargedHadronMultiplicity()+pfJet->neutralHadronMultiplicity(), true);
388  vars.insert(btau::hadronPhotonMultiplicity,pfJet->chargedHadronMultiplicity()+pfJet->neutralHadronMultiplicity()+pfJet->photonMultiplicity(), true);
389  vars.insert(btau::totalMultiplicity,pfJet->chargedHadronMultiplicity()+pfJet->neutralHadronMultiplicity()+pfJet->photonMultiplicity()+pfJet->electronMultiplicity()+pfJet->muonMultiplicity(), true);
390 
391  }
392  else if( patJet != 0)
393  {
394  vars.insert(btau::chargedHadronEnergyFraction,patJet->chargedHadronEnergyFraction(), true);
395  vars.insert(btau::neutralHadronEnergyFraction,patJet->neutralHadronEnergyFraction(), true);
396  vars.insert(btau::photonEnergyFraction,patJet->photonEnergyFraction(), true);
397  vars.insert(btau::electronEnergyFraction,patJet->electronEnergyFraction(), true);
398  vars.insert(btau::muonEnergyFraction,patJet->muonEnergyFraction(), true);
399  vars.insert(btau::chargedHadronMultiplicity,patJet->chargedHadronMultiplicity(), true);
400  vars.insert(btau::neutralHadronMultiplicity,patJet->neutralHadronMultiplicity(), true);
401  vars.insert(btau::photonMultiplicity,patJet->photonMultiplicity(), true);
402  vars.insert(btau::electronMultiplicity,patJet->electronMultiplicity(), true);
403  vars.insert(btau::muonMultiplicity,patJet->muonMultiplicity(), true);
404  vars.insert(btau::hadronMultiplicity,patJet->chargedHadronMultiplicity()+patJet->neutralHadronMultiplicity(), true);
405  vars.insert(btau::hadronPhotonMultiplicity,patJet->chargedHadronMultiplicity()+patJet->neutralHadronMultiplicity()+patJet->photonMultiplicity(), true);
406  vars.insert(btau::totalMultiplicity,patJet->chargedHadronMultiplicity()+patJet->neutralHadronMultiplicity()+patJet->photonMultiplicity()+patJet->electronMultiplicity()+patJet->muonMultiplicity(), true);
407 
408  }
409  else
410  {
411  throw cms::Exception("InvalidConfiguration") << "From CombinedSVComputerV2::operator: reco::PFJet OR pat::Jet are required by this module" << std::endl;
412  }
413 
414  vars.finalize();
415 
416  return vars;
417 }
virtual double et() const GCC11_FINAL
transverse energy
int i
Definition: DBlmapReader.cc:9
T mag2() const
Definition: PV3DBase.h:66
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:148
const reco::TrackIPTagInfo::TrackIPData & threshTrack(const reco::TrackIPTagInfo &trackIPTagInfo, const reco::TrackIPTagInfo::SortCriteria sort, const reco::Jet &jet, const GlobalPoint &pv) const
Measurement1D flightDistance(unsigned int index, bool in2d=false) const
const edm::Ref< VertexCollection > & primaryVertex() const
Track refittedTrack(const TrackBaseRef &track) const
bool hasRefittedTracks() const
Checks whether refitted tracks are stored.
Definition: Vertex.h:134
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
T y() const
Definition: PV3DBase.h:63
double flipValue(double value, bool vertex) const
const_iterator end() const
Termination of iteration.
Definition: RefVector.h:249
Jets made from PFObjects.
Definition: PFJet.h:21
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:244
reco::V0Filter pseudoVertexV0Filter
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:250
const GlobalVector & flightDirection(unsigned int index) const
reco::V0Filter trackPairV0Filter
reco::TrackSelector trackPseudoSelector
const Vertex & secondaryVertex(unsigned int index) const
T sqrt(T t)
Definition: SSEVec.h:48
T z() const
Definition: PV3DBase.h:64
int j
Definition: DBlmapReader.cc:9
float trackWeight(unsigned int svIndex, unsigned int trackindex) const
static double etaRel(const math::XYZVector &dir, const math::XYZVector &track)
virtual edm::RefToBase< Jet > jet(void) const
returns a polymorphic reference to the tagged jet
Definition: JTATagInfo.h:20
TrackRefVector vertexTracks() const
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
std::vector< size_t > sortedIndexes(SortCriteria mode=IP3DSig) const
double significance() const
Definition: Measurement1D.h:32
tuple tracks
Definition: testEve_cfg.py:39
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
IterationRange flipIterate(int size, bool vertex) const
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
reco::TrackSelector trackSelector
Analysis-level calorimeter jet class.
Definition: Jet.h:73
double value() const
Definition: Measurement1D.h:28
unsigned int pseudoMultiplicityMin
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
const std::vector< TrackIPData > & impactParameterData() const
unsigned int trackMultiplicityMin
size_type size() const
Size of the RefVector.
Definition: RefVector.h:89
reco::TrackIPTagInfo::SortCriteria sortCriterium
T w() const
dbl *** dir
Definition: mlp_gen.cc:35
#define range_for(i, x)
const edm::RefVector< TrackCollection > & selectedTracks() const
T x() const
Definition: PV3DBase.h:62
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
void insert(const TaggingVariable &variable, bool delayed=false)
const TrackIPTagInfo::TrackIPData & CombinedSVComputerV2::threshTrack ( const reco::TrackIPTagInfo trackIPTagInfo,
const reco::TrackIPTagInfo::SortCriteria  sort,
const reco::Jet jet,
const GlobalPoint pv 
) const
private

Definition at line 95 of file CombinedSVComputerV2.cc.

References charmCut, data, flipIterate(), i, customizeTrackingMonitorSeedNumber::idx, reco::TrackIPTagInfo::impactParameterData(), range_for, reco::TrackIPTagInfo::selectedTracks(), reco::TrackIPTagInfo::sortedIndexes(), trackNoDeltaRSelector, and testEve_cfg::tracks.

Referenced by operator()().

99 {
101  trackIPTagInfo.selectedTracks();
102  const std::vector<TrackIPTagInfo::TrackIPData> &ipData =
103  trackIPTagInfo.impactParameterData();
104  std::vector<std::size_t> indices = trackIPTagInfo.sortedIndexes(sort);
105 
106  IterationRange range = flipIterate(indices.size(), false);
107  TrackKinematics kin;
108  range_for(i, range) {
109  std::size_t idx = indices[i];
110  const TrackIPTagInfo::TrackIPData &data = ipData[idx];
111  const Track &track = *tracks[idx];
112 
113  if (!trackNoDeltaRSelector(track, data, jet, pv))
114  continue;
115 
116  kin.add(track);
117  if (kin.vectorSum().M() > charmCut)
118  return data;
119  }
120 
121  static const TrackIPTagInfo::TrackIPData dummy = {
122  GlobalPoint(),
123  GlobalPoint(),
124  Measurement1D(-1.0, 1.0),
125  Measurement1D(-1.0, 1.0),
126  Measurement1D(-1.0, 1.0),
127  Measurement1D(-1.0, 1.0),
128  0.
129  };
130  return dummy;
131 }
int i
Definition: DBlmapReader.cc:9
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
reco::TrackSelector trackNoDeltaRSelector
std::vector< size_t > sortedIndexes(SortCriteria mode=IP3DSig) const
tuple tracks
Definition: testEve_cfg.py:39
IterationRange flipIterate(int size, bool vertex) const
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
const std::vector< TrackIPData > & impactParameterData() const
#define range_for(i, x)
const edm::RefVector< TrackCollection > & selectedTracks() const

Member Data Documentation

double CombinedSVComputerV2::charmCut
private

Definition at line 36 of file CombinedSVComputerV2.h.

Referenced by threshTrack().

double CombinedSVComputerV2::minTrackWeight
private

Definition at line 43 of file CombinedSVComputerV2.h.

Referenced by operator()().

unsigned int CombinedSVComputerV2::pseudoMultiplicityMin
private

Definition at line 41 of file CombinedSVComputerV2.h.

Referenced by operator()().

reco::V0Filter CombinedSVComputerV2::pseudoVertexV0Filter
private

Definition at line 46 of file CombinedSVComputerV2.h.

Referenced by operator()().

reco::TrackIPTagInfo::SortCriteria CombinedSVComputerV2::sortCriterium
private

Definition at line 37 of file CombinedSVComputerV2.h.

Referenced by operator()().

bool CombinedSVComputerV2::trackFlip
private

Definition at line 34 of file CombinedSVComputerV2.h.

Referenced by flipIterate(), and flipValue().

unsigned int CombinedSVComputerV2::trackMultiplicityMin
private

Definition at line 42 of file CombinedSVComputerV2.h.

Referenced by operator()().

reco::TrackSelector CombinedSVComputerV2::trackNoDeltaRSelector
private

Definition at line 39 of file CombinedSVComputerV2.h.

Referenced by threshTrack().

reco::V0Filter CombinedSVComputerV2::trackPairV0Filter
private

Definition at line 47 of file CombinedSVComputerV2.h.

Referenced by operator()().

reco::TrackSelector CombinedSVComputerV2::trackPseudoSelector
private

Definition at line 40 of file CombinedSVComputerV2.h.

Referenced by operator()().

reco::TrackSelector CombinedSVComputerV2::trackSelector
private

Definition at line 38 of file CombinedSVComputerV2.h.

Referenced by operator()().

bool CombinedSVComputerV2::useTrackWeights
private

Definition at line 44 of file CombinedSVComputerV2.h.

Referenced by operator()().

bool CombinedSVComputerV2::vertexFlip
private

Definition at line 35 of file CombinedSVComputerV2.h.

Referenced by flipIterate(), and flipValue().

bool CombinedSVComputerV2::vertexMassCorrection
private

Definition at line 45 of file CombinedSVComputerV2.h.

Referenced by operator()().