CMS 3D CMS Logo

V0Fitter.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: V0Producer
4 // Class: V0Fitter
5 //
13 //
14 // Original Author: Brian Drell
15 // Created: Fri May 18 22:57:40 CEST 2007
16 //
17 //
18 
19 #include "V0Fitter.h"
20 
28 #include <Math/Functions.h>
29 #include <Math/SVector.h>
30 #include <Math/SMatrix.h>
31 #include <typeinfo>
32 #include <memory>
35 
36 // pdg mass constants
37 namespace {
38  const double piMass = 0.13957018;
39  const double piMassSquared = piMass * piMass;
40  const double protonMass = 0.938272046;
41  const double protonMassSquared = protonMass * protonMass;
42  const double kShortMass = 0.497614;
43  const double lambdaMass = 1.115683;
44 } // namespace
45 
46 typedef ROOT::Math::SMatrix<double, 3, 3, ROOT::Math::MatRepSym<double, 3>> SMatrixSym3D;
47 typedef ROOT::Math::SVector<double, 3> SVector3;
48 
50  token_beamSpot = iC.consumes<reco::BeamSpot>(theParameters.getParameter<edm::InputTag>("beamSpot"));
51  useVertex_ = theParameters.getParameter<bool>("useVertex");
52  token_vertices = iC.consumes<std::vector<reco::Vertex>>(theParameters.getParameter<edm::InputTag>("vertices"));
53 
54  token_tracks = iC.consumes<reco::TrackCollection>(theParameters.getParameter<edm::InputTag>("trackRecoAlgorithm"));
55  vertexFitter_ = theParameters.getParameter<bool>("vertexFitter");
56  useRefTracks_ = theParameters.getParameter<bool>("useRefTracks");
57 
58  // whether to reconstruct KShorts
59  doKShorts_ = theParameters.getParameter<bool>("doKShorts");
60  // whether to reconstruct Lambdas
61  doLambdas_ = theParameters.getParameter<bool>("doLambdas");
62 
63  // cuts on initial track selection
64  tkChi2Cut_ = theParameters.getParameter<double>("tkChi2Cut");
65  tkNHitsCut_ = theParameters.getParameter<int>("tkNHitsCut");
66  tkPtCut_ = theParameters.getParameter<double>("tkPtCut");
67  tkIPSigXYCut_ = theParameters.getParameter<double>("tkIPSigXYCut");
68  tkIPSigZCut_ = theParameters.getParameter<double>("tkIPSigZCut");
69 
70  // cuts on vertex
71  vtxChi2Cut_ = theParameters.getParameter<double>("vtxChi2Cut");
72  vtxDecaySigXYZCut_ = theParameters.getParameter<double>("vtxDecaySigXYZCut");
73  vtxDecaySigXYCut_ = theParameters.getParameter<double>("vtxDecaySigXYCut");
74  // miscellaneous cuts
75  tkDCACut_ = theParameters.getParameter<double>("tkDCACut");
76  mPiPiCut_ = theParameters.getParameter<double>("mPiPiCut");
77  innerHitPosCut_ = theParameters.getParameter<double>("innerHitPosCut");
78  cosThetaXYCut_ = theParameters.getParameter<double>("cosThetaXYCut");
79  cosThetaXYZCut_ = theParameters.getParameter<double>("cosThetaXYZCut");
80  // cuts on the V0 candidate mass
81  kShortMassCut_ = theParameters.getParameter<double>("kShortMassCut");
82  lambdaMassCut_ = theParameters.getParameter<double>("lambdaMassCut");
83 }
84 
85 // method containing the algorithm for vertex reconstruction
87  const edm::EventSetup& iSetup,
90  using std::vector;
91 
93  iEvent.getByToken(token_tracks, theTrackHandle);
94  if (theTrackHandle->empty())
95  return;
96  const reco::TrackCollection* theTrackCollection = theTrackHandle.product();
97 
98  edm::Handle<reco::BeamSpot> theBeamSpotHandle;
99  iEvent.getByToken(token_beamSpot, theBeamSpotHandle);
100  const reco::BeamSpot* theBeamSpot = theBeamSpotHandle.product();
101  math::XYZPoint referencePos(theBeamSpot->position());
102 
103  reco::Vertex referenceVtx;
104  if (useVertex_) {
106  iEvent.getByToken(token_vertices, vertices);
107  referenceVtx = vertices->at(0);
108  referencePos = referenceVtx.position();
109  }
110 
111  edm::ESHandle<MagneticField> theMagneticFieldHandle;
112  iSetup.get<IdealMagneticFieldRecord>().get(theMagneticFieldHandle);
113  const MagneticField* theMagneticField = theMagneticFieldHandle.product();
114 
115  std::vector<reco::TrackRef> theTrackRefs;
116  std::vector<reco::TransientTrack> theTransTracks;
117 
118  // fill vectors of TransientTracks and TrackRefs after applying preselection cuts
119  for (reco::TrackCollection::const_iterator iTk = theTrackCollection->begin(); iTk != theTrackCollection->end();
120  ++iTk) {
121  const reco::Track* tmpTrack = &(*iTk);
122  double ipsigXY = std::abs(tmpTrack->dxy(*theBeamSpot) / tmpTrack->dxyError());
123  if (useVertex_)
124  ipsigXY = std::abs(tmpTrack->dxy(referencePos) / tmpTrack->dxyError());
125  double ipsigZ = std::abs(tmpTrack->dz(referencePos) / tmpTrack->dzError());
126  if (tmpTrack->normalizedChi2() < tkChi2Cut_ && tmpTrack->numberOfValidHits() >= tkNHitsCut_ &&
127  tmpTrack->pt() > tkPtCut_ && ipsigXY > tkIPSigXYCut_ && ipsigZ > tkIPSigZCut_) {
128  reco::TrackRef tmpRef(theTrackHandle, std::distance(theTrackCollection->begin(), iTk));
129  theTrackRefs.push_back(std::move(tmpRef));
130  reco::TransientTrack tmpTransient(*tmpRef, theMagneticField);
131  theTransTracks.push_back(std::move(tmpTransient));
132  }
133  }
134  // good tracks have now been selected for vertexing
135 
136  // loop over tracks and vertex good charged track pairs
137  for (unsigned int trdx1 = 0; trdx1 < theTrackRefs.size(); ++trdx1) {
138  for (unsigned int trdx2 = trdx1 + 1; trdx2 < theTrackRefs.size(); ++trdx2) {
139  reco::TrackRef positiveTrackRef;
140  reco::TrackRef negativeTrackRef;
141  reco::TransientTrack* posTransTkPtr = nullptr;
142  reco::TransientTrack* negTransTkPtr = nullptr;
143 
144  if (theTrackRefs[trdx1]->charge() < 0. && theTrackRefs[trdx2]->charge() > 0.) {
145  negativeTrackRef = theTrackRefs[trdx1];
146  positiveTrackRef = theTrackRefs[trdx2];
147  negTransTkPtr = &theTransTracks[trdx1];
148  posTransTkPtr = &theTransTracks[trdx2];
149  } else if (theTrackRefs[trdx1]->charge() > 0. && theTrackRefs[trdx2]->charge() < 0.) {
150  negativeTrackRef = theTrackRefs[trdx2];
151  positiveTrackRef = theTrackRefs[trdx1];
152  negTransTkPtr = &theTransTracks[trdx2];
153  posTransTkPtr = &theTransTracks[trdx1];
154  } else {
155  continue;
156  }
157 
158  // measure distance between tracks at their closest approach
159 
160  //these two variables are needed to 'pin' the temporary value returned to the stack
161  // in order to keep posState and negState from pointing to destructed objects
162  auto const& posImpact = posTransTkPtr->impactPointTSCP();
163  auto const& negImpact = negTransTkPtr->impactPointTSCP();
164  if (!posImpact.isValid() || !negImpact.isValid())
165  continue;
166  FreeTrajectoryState const& posState = posImpact.theState();
167  FreeTrajectoryState const& negState = negImpact.theState();
169  cApp.calculate(posState, negState);
170  if (!cApp.status())
171  continue;
172  float dca = std::abs(cApp.distance());
173  if (dca > tkDCACut_)
174  continue;
175 
176  // the POCA should at least be in the sensitive volume
177  GlobalPoint cxPt = cApp.crossingPoint();
178  if ((cxPt.x() * cxPt.x() + cxPt.y() * cxPt.y()) > 120. * 120. || std::abs(cxPt.z()) > 300.)
179  continue;
180 
181  // the tracks should at least point in the same quadrant
182  TrajectoryStateClosestToPoint const& posTSCP = posTransTkPtr->trajectoryStateClosestToPoint(cxPt);
183  TrajectoryStateClosestToPoint const& negTSCP = negTransTkPtr->trajectoryStateClosestToPoint(cxPt);
184  if (!posTSCP.isValid() || !negTSCP.isValid())
185  continue;
186  if (posTSCP.momentum().dot(negTSCP.momentum()) < 0)
187  continue;
188 
189  // calculate mPiPi
190  double totalE = sqrt(posTSCP.momentum().mag2() + piMassSquared) + sqrt(negTSCP.momentum().mag2() + piMassSquared);
191  double totalESq = totalE * totalE;
192  double totalPSq = (posTSCP.momentum() + negTSCP.momentum()).mag2();
193  double massSquared = totalESq - totalPSq;
194  if (massSquared > mPiPiCut_ * mPiPiCut_)
195  continue;
196 
197  // Fill the vector of TransientTracks to send to KVF
198  std::vector<reco::TransientTrack> transTracks;
199  transTracks.reserve(2);
200  transTracks.push_back(*posTransTkPtr);
201  transTracks.push_back(*negTransTkPtr);
202 
203  // create the vertex fitter object and vertex the tracks
204  TransientVertex theRecoVertex;
205  if (vertexFitter_) {
206  KalmanVertexFitter theKalmanFitter(useRefTracks_ == 0 ? false : true);
207  theRecoVertex = theKalmanFitter.vertex(transTracks);
208  } else if (!vertexFitter_) {
209  useRefTracks_ = false;
210  AdaptiveVertexFitter theAdaptiveFitter;
211  theRecoVertex = theAdaptiveFitter.vertex(transTracks);
212  }
213  if (!theRecoVertex.isValid())
214  continue;
215 
216  reco::Vertex theVtx = theRecoVertex;
217  if (theVtx.normalizedChi2() > vtxChi2Cut_)
218  continue;
219  GlobalPoint vtxPos(theVtx.x(), theVtx.y(), theVtx.z());
220 
221  // 2D decay significance
222  SMatrixSym3D totalCov = theBeamSpot->rotatedCovariance3D() + theVtx.covariance();
223  if (useVertex_)
224  totalCov = referenceVtx.covariance() + theVtx.covariance();
225  SVector3 distVecXY(vtxPos.x() - referencePos.x(), vtxPos.y() - referencePos.y(), 0.);
226  double distMagXY = ROOT::Math::Mag(distVecXY);
227  double sigmaDistMagXY = sqrt(ROOT::Math::Similarity(totalCov, distVecXY)) / distMagXY;
228  if (distMagXY / sigmaDistMagXY < vtxDecaySigXYCut_)
229  continue;
230 
231  // 3D decay significance
232  if (vtxDecaySigXYZCut_ > 0.) {
233  SVector3 distVecXYZ(
234  vtxPos.x() - referencePos.x(), vtxPos.y() - referencePos.y(), vtxPos.z() - referencePos.z());
235  double distMagXYZ = ROOT::Math::Mag(distVecXYZ);
236  double sigmaDistMagXYZ = sqrt(ROOT::Math::Similarity(totalCov, distVecXYZ)) / distMagXYZ;
237  if (distMagXYZ / sigmaDistMagXYZ < vtxDecaySigXYZCut_)
238  continue;
239  }
240 
241  // make sure the vertex radius is within the inner track hit radius
242  double tkHitPosLimitSquared =
243  (distMagXY - sigmaDistMagXY * innerHitPosCut_) * (distMagXY - sigmaDistMagXY * innerHitPosCut_);
244  if (innerHitPosCut_ > 0. && positiveTrackRef->innerOk()) {
245  reco::Vertex::Point posTkHitPos = positiveTrackRef->innerPosition();
246  double posTkHitPosD2 = (posTkHitPos.x() - referencePos.x()) * (posTkHitPos.x() - referencePos.x()) +
247  (posTkHitPos.y() - referencePos.y()) * (posTkHitPos.y() - referencePos.y());
248  if (posTkHitPosD2 < tkHitPosLimitSquared)
249  continue;
250  }
251  if (innerHitPosCut_ > 0. && negativeTrackRef->innerOk()) {
252  reco::Vertex::Point negTkHitPos = negativeTrackRef->innerPosition();
253  double negTkHitPosD2 = (negTkHitPos.x() - referencePos.x()) * (negTkHitPos.x() - referencePos.x()) +
254  (negTkHitPos.y() - referencePos.y()) * (negTkHitPos.y() - referencePos.y());
255  if (negTkHitPosD2 < tkHitPosLimitSquared)
256  continue;
257  }
258 
259  std::unique_ptr<TrajectoryStateClosestToPoint> trajPlus;
260  std::unique_ptr<TrajectoryStateClosestToPoint> trajMins;
261  std::vector<reco::TransientTrack> theRefTracks;
262  if (theRecoVertex.hasRefittedTracks()) {
263  theRefTracks = theRecoVertex.refittedTracks();
264  }
265 
266  if (useRefTracks_ && theRefTracks.size() > 1) {
267  reco::TransientTrack* thePositiveRefTrack = nullptr;
268  reco::TransientTrack* theNegativeRefTrack = nullptr;
269  for (std::vector<reco::TransientTrack>::iterator iTrack = theRefTracks.begin(); iTrack != theRefTracks.end();
270  ++iTrack) {
271  if (iTrack->track().charge() > 0.) {
272  thePositiveRefTrack = &*iTrack;
273  } else if (iTrack->track().charge() < 0.) {
274  theNegativeRefTrack = &*iTrack;
275  }
276  }
277  if (thePositiveRefTrack == nullptr || theNegativeRefTrack == nullptr)
278  continue;
279  trajPlus.reset(new TrajectoryStateClosestToPoint(thePositiveRefTrack->trajectoryStateClosestToPoint(vtxPos)));
280  trajMins.reset(new TrajectoryStateClosestToPoint(theNegativeRefTrack->trajectoryStateClosestToPoint(vtxPos)));
281  } else {
282  trajPlus.reset(new TrajectoryStateClosestToPoint(posTransTkPtr->trajectoryStateClosestToPoint(vtxPos)));
283  trajMins.reset(new TrajectoryStateClosestToPoint(negTransTkPtr->trajectoryStateClosestToPoint(vtxPos)));
284  }
285 
286  if (trajPlus.get() == nullptr || trajMins.get() == nullptr || !trajPlus->isValid() || !trajMins->isValid())
287  continue;
288 
289  GlobalVector positiveP(trajPlus->momentum());
290  GlobalVector negativeP(trajMins->momentum());
291  GlobalVector totalP(positiveP + negativeP);
292 
293  // 2D pointing angle
294  double dx = theVtx.x() - referencePos.x();
295  double dy = theVtx.y() - referencePos.y();
296  double px = totalP.x();
297  double py = totalP.y();
298  double angleXY = (dx * px + dy * py) / (sqrt(dx * dx + dy * dy) * sqrt(px * px + py * py));
299  if (angleXY < cosThetaXYCut_)
300  continue;
301 
302  // 3D pointing angle
303  if (cosThetaXYZCut_ > -1.) {
304  double dz = theVtx.z() - referencePos.z();
305  double pz = totalP.z();
306  double angleXYZ =
307  (dx * px + dy * py + dz * pz) / (sqrt(dx * dx + dy * dy + dz * dz) * sqrt(px * px + py * py + pz * pz));
308  if (angleXYZ < cosThetaXYZCut_)
309  continue;
310  }
311 
312  // calculate total energy of V0 3 ways: assume it's a kShort, a Lambda, or a LambdaBar.
313  double piPlusE = sqrt(positiveP.mag2() + piMassSquared);
314  double piMinusE = sqrt(negativeP.mag2() + piMassSquared);
315  double protonE = sqrt(positiveP.mag2() + protonMassSquared);
316  double antiProtonE = sqrt(negativeP.mag2() + protonMassSquared);
317  double kShortETot = piPlusE + piMinusE;
318  double lambdaEtot = protonE + piMinusE;
319  double lambdaBarEtot = antiProtonE + piPlusE;
320 
321  // Create momentum 4-vectors for the 3 candidate types
322  const reco::Particle::LorentzVector kShortP4(totalP.x(), totalP.y(), totalP.z(), kShortETot);
323  const reco::Particle::LorentzVector lambdaP4(totalP.x(), totalP.y(), totalP.z(), lambdaEtot);
324  const reco::Particle::LorentzVector lambdaBarP4(totalP.x(), totalP.y(), totalP.z(), lambdaBarEtot);
325 
326  reco::Particle::Point vtx(theVtx.x(), theVtx.y(), theVtx.z());
327  const reco::Vertex::CovarianceMatrix vtxCov(theVtx.covariance());
328  double vtxChi2(theVtx.chi2());
329  double vtxNdof(theVtx.ndof());
330 
331  // Create the VertexCompositeCandidate object that will be stored in the Event
332  reco::VertexCompositeCandidate* theKshort = nullptr;
333  reco::VertexCompositeCandidate* theLambda = nullptr;
334  reco::VertexCompositeCandidate* theLambdaBar = nullptr;
335 
336  if (doKShorts_) {
337  theKshort = new reco::VertexCompositeCandidate(0, kShortP4, vtx, vtxCov, vtxChi2, vtxNdof);
338  }
339  if (doLambdas_) {
340  if (positiveP.mag2() > negativeP.mag2()) {
341  theLambda = new reco::VertexCompositeCandidate(0, lambdaP4, vtx, vtxCov, vtxChi2, vtxNdof);
342  } else {
343  theLambdaBar = new reco::VertexCompositeCandidate(0, lambdaBarP4, vtx, vtxCov, vtxChi2, vtxNdof);
344  }
345  }
346 
347  // Create daughter candidates for the VertexCompositeCandidates
348  reco::RecoChargedCandidate thePiPlusCand(
349  1, reco::Particle::LorentzVector(positiveP.x(), positiveP.y(), positiveP.z(), piPlusE), vtx);
350  thePiPlusCand.setTrack(positiveTrackRef);
351 
352  reco::RecoChargedCandidate thePiMinusCand(
353  -1, reco::Particle::LorentzVector(negativeP.x(), negativeP.y(), negativeP.z(), piMinusE), vtx);
354  thePiMinusCand.setTrack(negativeTrackRef);
355 
356  reco::RecoChargedCandidate theProtonCand(
357  1, reco::Particle::LorentzVector(positiveP.x(), positiveP.y(), positiveP.z(), protonE), vtx);
358  theProtonCand.setTrack(positiveTrackRef);
359 
360  reco::RecoChargedCandidate theAntiProtonCand(
361  -1, reco::Particle::LorentzVector(negativeP.x(), negativeP.y(), negativeP.z(), antiProtonE), vtx);
362  theAntiProtonCand.setTrack(negativeTrackRef);
363 
364  AddFourMomenta addp4;
365  // Store the daughter Candidates in the VertexCompositeCandidates if they pass mass cuts
366  if (doKShorts_) {
367  theKshort->addDaughter(thePiPlusCand);
368  theKshort->addDaughter(thePiMinusCand);
369  theKshort->setPdgId(310);
370  addp4.set(*theKshort);
371  if (theKshort->mass() < kShortMass + kShortMassCut_ && theKshort->mass() > kShortMass - kShortMassCut_) {
372  theKshorts.push_back(std::move(*theKshort));
373  }
374  }
375  if (doLambdas_ && theLambda) {
376  theLambda->addDaughter(theProtonCand);
377  theLambda->addDaughter(thePiMinusCand);
378  theLambda->setPdgId(3122);
379  addp4.set(*theLambda);
380  if (theLambda->mass() < lambdaMass + lambdaMassCut_ && theLambda->mass() > lambdaMass - lambdaMassCut_) {
381  theLambdas.push_back(std::move(*theLambda));
382  }
383  } else if (doLambdas_ && theLambdaBar) {
384  theLambdaBar->addDaughter(theAntiProtonCand);
385  theLambdaBar->addDaughter(thePiPlusCand);
386  theLambdaBar->setPdgId(-3122);
387  addp4.set(*theLambdaBar);
388  if (theLambdaBar->mass() < lambdaMass + lambdaMassCut_ && theLambdaBar->mass() > lambdaMass - lambdaMassCut_) {
389  theLambdas.push_back(std::move(*theLambdaBar));
390  }
391  }
392 
393  delete theKshort;
394  delete theLambda;
395  delete theLambdaBar;
396  theKshort = theLambda = theLambdaBar = nullptr;
397  }
398  }
399 }
Vector3DBase
Definition: Vector3DBase.h:8
AdaptiveVertexFitter
Definition: AdaptiveVertexFitter.h:29
V0Fitter::tkChi2Cut_
double tkChi2Cut_
Definition: V0Fitter.h:55
reco::LeafCandidate::setPdgId
void setPdgId(int pdgId) final
Definition: LeafCandidate.h:178
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
TSCBLBuilderNoMaterial.h
allConversions_cfi.vtxChi2
vtxChi2
Definition: allConversions_cfi.py:37
V0Fitter::vtxDecaySigXYCut_
double vtxDecaySigXYCut_
Definition: V0Fitter.h:62
KalmanVertexFitter::vertex
CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &tracks) const override
Definition: KalmanVertexFitter.h:49
TransientVertex::hasRefittedTracks
bool hasRefittedTracks() const
Definition: TransientVertex.h:206
MessageLogger.h
V0Fitter::token_vertices
edm::EDGetTokenT< std::vector< reco::Vertex > > token_vertices
Definition: V0Fitter.h:77
edm::Handle::product
T const * product() const
Definition: Handle.h:70
TransientVertex::refittedTracks
std::vector< reco::TransientTrack > const & refittedTracks() const
Definition: TransientVertex.h:211
ClosestApproachInRPhi::status
bool status() const override
Definition: ClosestApproachInRPhi.h:37
TransientVertex::isValid
bool isValid() const
Definition: TransientVertex.h:195
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
reco::Vertex::z
double z() const
z coordinate
Definition: Vertex.h:120
multPhiCorr_741_25nsDY_cfi.py
py
Definition: multPhiCorr_741_25nsDY_cfi.py:12
V0Fitter::V0Fitter
V0Fitter(const edm::ParameterSet &theParams, edm::ConsumesCollector &&iC)
Definition: V0Fitter.cc:49
reco::BeamSpot::rotatedCovariance3D
Covariance3DMatrix rotatedCovariance3D() const
Definition: BeamSpot.cc:73
ProxyBase11::reset
void reset()
Definition: ProxyBase11.h:49
HLT_2018_cff.distance
distance
Definition: HLT_2018_cff.py:6417
V0Fitter::innerHitPosCut_
double innerHitPosCut_
Definition: V0Fitter.h:67
reco::Vertex::CovarianceMatrix
math::Error< dimension >::type CovarianceMatrix
covariance error matrix (3x3)
Definition: Vertex.h:46
reco::VertexCompositeCandidate
Definition: VertexCompositeCandidate.h:16
PV3DBase::mag2
T mag2() const
Definition: PV3DBase.h:63
V0Fitter::vtxChi2Cut_
double vtxChi2Cut_
Definition: V0Fitter.h:61
AdaptiveVertexFitter::vertex
CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &) const override
Definition: AdaptiveVertexFitter.cc:158
edm::Handle< reco::TrackCollection >
reco::TrackBase::numberOfValidHits
unsigned short numberOfValidHits() const
number of valid hits found
Definition: TrackBase.h:751
reco::TrackBase::dxyError
double dxyError() const
error on dxy
Definition: TrackBase.h:722
V0Fitter::kShortMassCut_
double kShortMassCut_
Definition: V0Fitter.h:71
reco::Particle::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Particle.h:21
V0Fitter::tkIPSigZCut_
double tkIPSigZCut_
Definition: V0Fitter.h:59
edm::Ref< TrackCollection >
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
reco::TrackBase::pt
double pt() const
track transverse momentum
Definition: TrackBase.h:608
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
V0Fitter::tkDCACut_
double tkDCACut_
Definition: V0Fitter.h:65
reco::RecoChargedCandidate::setTrack
void setTrack(const reco::TrackRef &r)
set reference to track
Definition: RecoChargedCandidate.h:32
V0Fitter::tkIPSigXYCut_
double tkIPSigXYCut_
Definition: V0Fitter.h:58
ClosestApproachInRPhi.h
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
ClosestApproachInRPhi::calculate
bool calculate(const TrajectoryStateOnSurface &sta, const TrajectoryStateOnSurface &stb) override
Definition: ClosestApproachInRPhi.cc:8
V0Fitter::mPiPiCut_
double mPiPiCut_
Definition: V0Fitter.h:66
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
reco::BeamSpot
Definition: BeamSpot.h:21
reco::Track
Definition: Track.h:27
edm::ESHandle< MagneticField >
ClosestApproachInRPhi
Definition: ClosestApproachInRPhi.h:26
V0Fitter::vtxDecaySigXYZCut_
double vtxDecaySigXYZCut_
Definition: V0Fitter.h:63
reco::TrackBase::dz
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
Definition: TrackBase.h:602
reco::BeamSpot::position
const Point & position() const
position
Definition: BeamSpot.h:59
Point3DBase< float, GlobalTag >
V0Fitter::vertexFitter_
bool vertexFitter_
Definition: V0Fitter.h:49
reco::CompositeCandidate::addDaughter
void addDaughter(const Candidate &, const std::string &s="")
add a clone of the passed candidate as daughter
Definition: CompositeCandidate.cc:108
SVector3
ROOT::Math::SVector< double, 3 > SVector3
Definition: V0Fitter.cc:47
badGlobalMuonTaggersAOD_cff.vtx
vtx
Definition: badGlobalMuonTaggersAOD_cff.py:5
Vertex.h
reco::TransientTrack::impactPointTSCP
TrajectoryStateClosestToPoint impactPointTSCP() const
Definition: TransientTrack.h:96
reco::TransientTrack::trajectoryStateClosestToPoint
TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const GlobalPoint &point) const
Definition: TransientTrack.h:90
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
V0Fitter::useVertex_
bool useVertex_
Definition: V0Fitter.h:76
TransientTrackBuilder.h
edm::ParameterSet
Definition: ParameterSet.h:36
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
reco::LeafCandidate::mass
double mass() const final
mass
Definition: LeafCandidate.h:131
reco::Vertex::x
double x() const
x coordinate
Definition: Vertex.h:116
V0Fitter::tkNHitsCut_
int tkNHitsCut_
Definition: V0Fitter.h:56
AddFourMomenta.h
reco::TrackBase::dzError
double dzError() const
error on dz
Definition: TrackBase.h:731
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
iEvent
int iEvent
Definition: GenABIO.cc:224
ClosestApproachInRPhi::crossingPoint
GlobalPoint crossingPoint() const override
Definition: ClosestApproachInRPhi.cc:46
mag2
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
Definition: Basic3DVectorLD.h:124
PVValHelper::dy
Definition: PVValidationHelpers.h:49
reco::RecoChargedCandidate
Definition: RecoChargedCandidate.h:15
TransientVertex
Definition: TransientVertex.h:18
edm::EventSetup
Definition: EventSetup.h:57
TrajectoryStateClosestToPoint
Definition: TrajectoryStateClosestToPoint.h:18
reco::TrackBase::normalizedChi2
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
Definition: TrackBase.h:578
V0Fitter::token_beamSpot
edm::EDGetTokenT< reco::BeamSpot > token_beamSpot
Definition: V0Fitter.h:75
SMatrixSym3D
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > SMatrixSym3D
Definition: V0Fitter.cc:46
TransientTrackRecord.h
get
#define get
V0Fitter::lambdaMassCut_
double lambdaMassCut_
Definition: V0Fitter.h:72
Vector3DBase::dot
PreciseFloatType< T, U >::Type dot(const Vector3DBase< U, FrameTag > &v) const
Definition: Vector3DBase.h:99
V0Fitter::useRefTracks_
bool useRefTracks_
Definition: V0Fitter.h:50
reco::Vertex::chi2
double chi2() const
chi-squares
Definition: Vertex.h:103
reco::VertexCompositeCandidateCollection
std::vector< VertexCompositeCandidate > VertexCompositeCandidateCollection
collection of Candidate objects
Definition: VertexCompositeCandidateFwd.h:19
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
multPhiCorr_741_25nsDY_cfi.px
px
Definition: multPhiCorr_741_25nsDY_cfi.py:10
reco::Vertex::covariance
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
Definition: Vertex.h:135
reco::Vertex::Point
math::XYZPoint Point
point in the space
Definition: Vertex.h:40
eostools.move
def move(src, dest)
Definition: eostools.py:511
V0Fitter::doLambdas_
bool doLambdas_
Definition: V0Fitter.h:52
reco::Vertex::y
double y() const
y coordinate
Definition: Vertex.h:118
reco::TransientTrack
Definition: TransientTrack.h:19
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
PVValHelper::dz
Definition: PVValidationHelpers.h:50
V0Fitter::tkPtCut_
double tkPtCut_
Definition: V0Fitter.h:57
reco::Vertex::normalizedChi2
double normalizedChi2() const
chi-squared divided by n.d.o.f.
Definition: Vertex.h:112
AddFourMomenta::set
void set(reco::Candidate &c) const
set up a candidate
Definition: AddFourMomenta.cc:6
V0Fitter::fitAll
void fitAll(const edm::Event &iEvent, const edm::EventSetup &iSetup, reco::VertexCompositeCandidateCollection &k, reco::VertexCompositeCandidateCollection &l)
Definition: V0Fitter.cc:86
TrajectoryStateTransform.h
TrajectoryStateClosestToPoint::isValid
bool isValid() const
Definition: TrajectoryStateClosestToPoint.h:111
reco::Particle::Point
math::XYZPoint Point
point in the space
Definition: Particle.h:25
AddFourMomenta
Definition: AddFourMomenta.h:18
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
V0Fitter.h
V0Fitter::token_tracks
edm::EDGetTokenT< reco::TrackCollection > token_tracks
Definition: V0Fitter.h:74
GlobalTrackingGeometry.h
TrajectoryStateClosestToPoint::momentum
GlobalVector momentum() const
Definition: TrajectoryStateClosestToPoint.h:92
edm::Event
Definition: Event.h:73
V0Fitter::cosThetaXYZCut_
double cosThetaXYZCut_
Definition: V0Fitter.h:69
MagneticField
Definition: MagneticField.h:19
ClosestApproachInRPhi::distance
float distance() const override
Definition: ClosestApproachInRPhi.cc:54
reco::TrackBase::dxy
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
Definition: TrackBase.h:593
reco::Vertex::ndof
double ndof() const
Definition: Vertex.h:110
V0Fitter::doKShorts_
bool doKShorts_
Definition: V0Fitter.h:51
edm::InputTag
Definition: InputTag.h:15
PVValHelper::dx
Definition: PVValidationHelpers.h:48
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
reco::Vertex
Definition: Vertex.h:35
V0Fitter::cosThetaXYCut_
double cosThetaXYCut_
Definition: V0Fitter.h:68
pwdgSkimBPark_cfi.vertices
vertices
Definition: pwdgSkimBPark_cfi.py:7
KalmanVertexFitter
Definition: KalmanVertexFitter.h:22