CMS 3D CMS Logo

PackedCandidate.cc
Go to the documentation of this file.
6 
8 using namespace logintpack;
9 
12 
13 void pat::PackedCandidate::pack(bool unpackAfterwards) {
14  float unpackedPt = std::min<float>(p4_.load()->Pt(), MiniFloatConverter::max());
15  packedPt_ = MiniFloatConverter::float32to16(unpackedPt);
16  packedEta_ = int16_t(std::round(p4_.load()->Eta() / 6.0f *
18  packedPhi_ = int16_t(std::round(p4_.load()->Phi() / 3.2f *
20  packedM_ = MiniFloatConverter::float32to16(p4_.load()->M());
21  if (unpackAfterwards) {
22  delete p4_.exchange(nullptr);
23  delete p4c_.exchange(nullptr);
24  unpack(); // force the values to match with the packed ones
25  }
26 }
27 
28 void pat::PackedCandidate::packVtx(bool unpackAfterwards) {
29  reco::VertexRef pvRef = vertexRef();
30  Point pv = pvRef.isNonnull() ? pvRef->position() : Point();
31  float dxPV = vertex_.load()->X() - pv.X(),
32  dyPV = vertex_.load()->Y() - pv.Y(); //, rPV = std::hypot(dxPV, dyPV);
33  float s = std::sin(float(p4_.load()->Phi()) + dphi_),
34  c = std::cos(
35  float(p4_.load()->Phi() +
36  dphi_)); // not the fastest option, but we're in reduced
37  // precision already, so let's avoid more roundoffs
38  dxy_ = -dxPV * s + dyPV * c;
39  // if we want to go back to the full x,y,z we need to store also
40  // float dl = dxPV * c + dyPV * s;
41  // float xRec = - dxy_ * s + dl * c, yRec = dxy_ * c + dl * s;
42  float pzpt = p4_.load()->Pz() / p4_.load()->Pt();
43  dz_ = vertex_.load()->Z() - pv.Z() - (dxPV * c + dyPV * s) * pzpt;
44  packedDxy_ = MiniFloatConverter::float32to16(dxy_ * 100);
45  packedDz_ = pvRef.isNonnull()
47  : int16_t(std::round(dz_ / 40.f *
49  packedDPhi_ =
50  int16_t(std::round(dphi_ / 3.2f * std::numeric_limits<int16_t>::max()));
51  packedDEta_ = MiniFloatConverter::float32to16(deta_);
52  packedDTrkPt_ = MiniFloatConverter::float32to16(dtrkpt_);
53 
54  if (unpackAfterwards) {
55  delete vertex_.exchange(nullptr);
56  unpackVtx();
57  }
58 }
59 
61  float pt = MiniFloatConverter::float16to32(packedPt_);
62  double shift =
63  (pt < 1. ? 0.1 * pt : 0.1 / pt); // shift particle phi to break
64  // degeneracies in angular separations
65  double sign = ((int(pt * 10) % 2 == 0)
66  ? 1
67  : -1); // introduce a pseudo-random sign of the shift
68  double phi =
69  int16_t(packedPhi_) * 3.2f / std::numeric_limits<int16_t>::max() +
70  sign * shift * 3.2 / std::numeric_limits<int16_t>::max();
71  auto p4 = std::make_unique<PolarLorentzVector>(
72  pt, int16_t(packedEta_) * 6.0f / std::numeric_limits<int16_t>::max(), phi,
74  auto p4c = std::make_unique<LorentzVector>(*p4);
75  PolarLorentzVector *expectp4 = nullptr;
76  if (p4_.compare_exchange_strong(expectp4, p4.get())) {
77  p4.release();
78  }
79 
80  // p4c_ works as the guard for unpacking so it
81  // must be set last
82  LorentzVector *expectp4c = nullptr;
83  if (p4c_.compare_exchange_strong(expectp4c, p4c.get())) {
84  p4c.release();
85  }
86 }
87 
89  const reco::TrackBase::CovarianceMatrix &m, bool unpackAfterwards) {
90  packedCovariance_.dptdpt = packCovarianceElement(m, 0, 0);
91  packedCovariance_.detadeta = packCovarianceElement(m, 1, 1);
92  packedCovariance_.dphidphi = packCovarianceElement(m, 2, 2);
93  packedCovariance_.dxydxy = packCovarianceElement(m, 3, 3);
94  packedCovariance_.dzdz = packCovarianceElement(m, 4, 4);
95  packedCovariance_.dxydz = packCovarianceElement(m, 3, 4);
96  packedCovariance_.dlambdadz = packCovarianceElement(m, 1, 4);
97  packedCovariance_.dphidxy = packCovarianceElement(m, 2, 3);
98  // unpack afterwards
99  if (unpackAfterwards)
100  unpackCovariance();
101 }
102 
104  const CovarianceParameterization &p = covarianceParameterization();
105  if (p.isValid()) {
106  auto m = std::make_unique<reco::TrackBase::CovarianceMatrix>();
107  for (int i = 0; i < 5; i++)
108  for (int j = 0; j < 5; j++) {
109  (*m)(i, j) = 0;
110  }
111  unpackCovarianceElement(*m, packedCovariance_.dptdpt, 0, 0);
112  unpackCovarianceElement(*m, packedCovariance_.detadeta, 1, 1);
113  unpackCovarianceElement(*m, packedCovariance_.dphidphi, 2, 2);
114  unpackCovarianceElement(*m, packedCovariance_.dxydxy, 3, 3);
115  unpackCovarianceElement(*m, packedCovariance_.dzdz, 4, 4);
116  unpackCovarianceElement(*m, packedCovariance_.dxydz, 3, 4);
117  unpackCovarianceElement(*m, packedCovariance_.dlambdadz, 1, 4);
118  unpackCovarianceElement(*m, packedCovariance_.dphidxy, 2, 3);
119  reco::TrackBase::CovarianceMatrix *expected = nullptr;
120  if (m_.compare_exchange_strong(expected, m.get())) {
121  m.release();
122  }
123 
124  } else {
126  << "You do not have a valid track parameters file loaded. "
127  << "Please check that the release version is compatible with your "
128  "input data"
129  << "or avoid accessing track parameter uncertainties. ";
130  }
131 }
132 
134  reco::VertexRef pvRef = vertexRef();
135  dphi_ = int16_t(packedDPhi_) * 3.2f / std::numeric_limits<int16_t>::max(),
136  deta_ = MiniFloatConverter::float16to32(packedDEta_);
137  dtrkpt_ = MiniFloatConverter::float16to32(packedDTrkPt_);
138  dxy_ = MiniFloatConverter::float16to32(packedDxy_) / 100.;
139  dz_ = pvRef.isNonnull()
140  ? MiniFloatConverter::float16to32(packedDz_) / 100.
141  : int16_t(packedDz_) * 40.f / std::numeric_limits<int16_t>::max();
142  Point pv = pvRef.isNonnull() ? pvRef->position() : Point();
143  float phi = p4_.load()->Phi() + dphi_, s = std::sin(phi), c = std::cos(phi);
144  auto vertex = std::make_unique<Point>(
145  pv.X() - dxy_ * s, pv.Y() + dxy_ * c,
146  pv.Z() +
147  dz_); // for our choice of using the PCA to the PV, by definition the
148  // remaining term -(dx*cos(phi) + dy*sin(phi))*(pz/pt) is zero
149 
150  Point *expected = nullptr;
151  if (vertex_.compare_exchange_strong(expected, vertex.get())) {
152  vertex.release();
153  }
154 }
155 
157  delete p4_.load();
158  delete p4c_.load();
159  delete vertex_.load();
160  delete track_.load();
161  delete m_.load();
162 }
163 
164 float pat::PackedCandidate::dxy(const Point &p) const {
165  maybeUnpackBoth();
166  const float phi = float(p4_.load()->Phi()) + dphi_;
167  return -(vertex_.load()->X() - p.X()) * std::sin(phi) +
168  (vertex_.load()->Y() - p.Y()) * std::cos(phi);
169 }
170 float pat::PackedCandidate::dz(const Point &p) const {
171  maybeUnpackBoth();
172  const float phi = float(p4_.load()->Phi()) + dphi_;
173  const float pzpt =
174  deta_ ? std::sinh(etaAtVtx()) : p4_.load()->Pz() / p4_.load()->Pt();
175  return (vertex_.load()->Z() - p.Z()) -
176  ((vertex_.load()->X() - p.X()) * std::cos(phi) +
177  (vertex_.load()->Y() - p.Y()) * std::sin(phi)) *
178  pzpt;
179 }
180 
182  maybeUnpackBoth();
183  math::RhoEtaPhiVector p3(ptTrk(), etaAtVtx(), phiAtVtx());
184  maybeUnpackCovariance();
185  int numberOfStripLayers = stripLayersWithMeasurement(),
186  numberOfPixelLayers = pixelLayersWithMeasurement();
187  int numberOfPixelHits = this->numberOfPixelHits();
188  int numberOfHits = this->numberOfHits();
189 
190  int ndof = numberOfHits + numberOfPixelHits - 5;
191  LostInnerHits innerLost = lostInnerHits();
192 
193  auto track = std::make_unique<reco::Track>(
194  normalizedChi2_ * ndof, ndof, *vertex_,
195  math::XYZVector(p3.x(), p3.y(), p3.z()), charge(), *(m_.load()),
197  int i = 0;
198  if (firstHit_ == 0) { // Backward compatible
199  if (innerLost == validHitInFirstPixelBarrelLayer) {
200  track->appendTrackerHitPattern(PixelSubdetector::PixelBarrel, 1, 0,
202  i = 1;
203  }
204  } else {
205  track->appendHitPattern(firstHit_, TrackingRecHit::valid);
206  }
207 
208  if (firstHit_ != 0 && reco::HitPattern::pixelHitFilter(firstHit_))
209  i = 1;
210 
211  // add hits to match the number of laters and validHitInFirstPixelBarrelLayer
212  if (innerLost == validHitInFirstPixelBarrelLayer) {
213  // then to encode the number of layers, we add more hits on distinct layers
214  // (B2, B3, B4, F1, ...)
215  for (; i < numberOfPixelLayers; i++) {
216  if (i <= 3) {
217  track->appendTrackerHitPattern(PixelSubdetector::PixelBarrel, i + 1, 0,
219  } else {
220  track->appendTrackerHitPattern(PixelSubdetector::PixelEndcap, i - 3, 0,
222  }
223  }
224  } else {
225  // to encode the information on the layers, we add one valid hits per layer
226  // but skipping PXB1
227  int iOffset = 0;
228  if (firstHit_ != 0 && reco::HitPattern::pixelHitFilter(firstHit_)) {
229  iOffset = reco::HitPattern::getLayer(firstHit_);
230  if (reco::HitPattern::getSubStructure(firstHit_) ==
232  iOffset += 3;
233  } else {
234  iOffset = 1;
235  }
236  for (; i < numberOfPixelLayers; i++) {
237  if (i + iOffset <= 2) {
238  track->appendTrackerHitPattern(PixelSubdetector::PixelBarrel,
239  i + iOffset + 1, 0,
241  } else {
242  track->appendTrackerHitPattern(PixelSubdetector::PixelEndcap,
243  i + iOffset - 3 + 1, 0,
245  }
246  }
247  }
248  // add extra hits (overlaps, etc), all on the first layer with a hit - to
249  // avoid increasing the layer count
250  for (; i < numberOfPixelHits; i++) {
251  if (firstHit_ != 0 && reco::HitPattern::pixelHitFilter(firstHit_)) {
252  track->appendTrackerHitPattern(
255  } else {
256  track->appendTrackerHitPattern(
258  (innerLost == validHitInFirstPixelBarrelLayer ? 1 : 2), 0,
260  }
261  }
262  // now start adding strip layers, putting one hit on each layer so that the
263  // hitPattern.stripLayersWithMeasurement works. we don't know what the layers
264  // where, so we just start with TIB (4 layers), then TOB (6 layers), then TEC
265  // (9) and then TID(3), so that we can get a number of valid strip layers up
266  // to 4+6+9+3
267  if (firstHit_ != 0 && reco::HitPattern::stripHitFilter(firstHit_))
268  i += 1;
269  int slOffset = 0;
270  if (firstHit_ != 0 && reco::HitPattern::stripHitFilter(firstHit_)) {
271  slOffset = reco::HitPattern::getLayer(firstHit_) - 1;
273  slOffset += 4;
275  slOffset += 7;
277  slOffset += 13;
278  }
279  for (int sl = slOffset; sl < numberOfStripLayers + slOffset; ++sl, ++i) {
280  if (sl < 4)
281  track->appendTrackerHitPattern(StripSubdetector::TIB, sl + 1, 1,
283  else if (sl < 4 + 3)
284  track->appendTrackerHitPattern(StripSubdetector::TID, (sl - 4) + 1, 1,
286  else if (sl < 7 + 6)
287  track->appendTrackerHitPattern(StripSubdetector::TOB, (sl - 7) + 1, 1,
289  else if (sl < 13 + 9)
290  track->appendTrackerHitPattern(StripSubdetector::TEC, (sl - 13) + 1, 1,
292  else
293  break; // wtf?
294  }
295  // finally we account for extra strip hits beyond the one-per-layer added
296  // above. we put them all on TIB1, to avoid incrementing the number of
297  // layersWithMeasurement.
298  for (; i < numberOfHits; i++) {
299  if (reco::HitPattern::stripHitFilter(firstHit_)) {
300  track->appendTrackerHitPattern(
303  } else {
304  track->appendTrackerHitPattern(StripSubdetector::TIB, 1, 1,
306  }
307  }
308 
309  switch (innerLost) {
310  case validHitInFirstPixelBarrelLayer:
311  break;
312  case noLostInnerHits:
313  break;
314  case oneLostInnerHit:
315  track->appendTrackerHitPattern(PixelSubdetector::PixelBarrel, 1, 0,
317  break;
318  case moreLostInnerHits:
319  track->appendTrackerHitPattern(PixelSubdetector::PixelBarrel, 1, 0,
321  track->appendTrackerHitPattern(PixelSubdetector::PixelBarrel, 2, 0,
323  break;
324  };
325 
326  if (trackHighPurity())
327  track->setQuality(reco::TrackBase::highPurity);
328 
329  reco::Track *expected = nullptr;
330  if (track_.compare_exchange_strong(expected, track.get())) {
331  track.release();
332  }
333 }
334 
336 
338  throw cms::Exception("Invalid Reference")
339  << "this Candidate has no master clone reference."
340  << "Can't call masterClone() method.\n";
341 }
342 
343 bool pat::PackedCandidate::hasMasterClone() const { return false; }
344 
345 bool pat::PackedCandidate::hasMasterClonePtr() const { return false; }
346 
348  throw cms::Exception("Invalid Reference")
349  << "this Candidate has no master clone ptr."
350  << "Can't call masterClonePtr() method.\n";
351 }
352 
353 size_t pat::PackedCandidate::numberOfDaughters() const { return 0; }
354 
355 size_t pat::PackedCandidate::numberOfMothers() const { return 0; }
356 
358  return p4() == o.p4() && vertex() == o.vertex() && charge() == o.charge();
359  // return p4() == o.p4() && charge() == o.charge();
360 }
361 
363  return nullptr;
364 }
365 
367  return nullptr;
368 }
369 
370 const reco::Candidate *
373  << "This Candidate type does not implement daughter(std::string). "
374  << "Please use CompositeCandidate or NamedCompositeCandidate.\n";
375 }
376 
379  << "This Candidate type does not implement daughter(std::string). "
380  << "Please use CompositeCandidate or NamedCompositeCandidate.\n";
381 }
382 
384 
385 double pat::PackedCandidate::vertexChi2() const { return 0; }
386 
387 double pat::PackedCandidate::vertexNdof() const { return 0; }
388 
389 double pat::PackedCandidate::vertexNormalizedChi2() const { return 0; }
390 
391 double pat::PackedCandidate::vertexCovariance(int i, int j) const {
393  << "reco::ConcreteCandidate does not implement vertex covariant "
394  "matrix.\n";
395 }
396 
399  << "reco::ConcreteCandidate does not implement vertex covariant "
400  "matrix.\n";
401 }
402 
403 bool pat::PackedCandidate::longLived() const { return false; }
404 
405 bool pat::PackedCandidate::massConstraint() const { return false; }
406 
407 // puppiweight
408 void pat::PackedCandidate::setPuppiWeight(float p, float p_nolep) {
409  // Set both weights at once to avoid misconfigured weights if called in the
410  // wrong order
411  packedPuppiweight_ = std::numeric_limits<uint8_t>::max() * p;
412  packedPuppiweightNoLepDiff_ =
413  std::numeric_limits<int8_t>::max() * (p_nolep - p);
414 }
415 
417  return 1.f * packedPuppiweight_ / std::numeric_limits<uint8_t>::max();
418 }
419 
421  return 1.f * packedPuppiweightNoLepDiff_ /
423  1.f * packedPuppiweight_ / std::numeric_limits<uint8_t>::max();
424 }
425 
427  if (100 * p > std::numeric_limits<uint8_t>::max())
428  rawCaloFraction_ =
429  std::numeric_limits<uint8_t>::max(); // Set to overflow value
430  else
431  rawCaloFraction_ = 100 * p;
432 }
433 
435  rawHcalFraction_ = 100 * p;
436 }
437 
438 void pat::PackedCandidate::setCaloFraction(float p) { caloFraction_ = 100 * p; }
439 
440 void pat::PackedCandidate::setHcalFraction(float p) { hcalFraction_ = 100 * p; }
441 
443  isIsolatedChargedHadron_ = p;
444 }
445 
446 void pat::PackedCandidate::setDTimeAssociatedPV(float aTime, float aTimeError) {
447  if (aTime == 0 && aTimeError == 0) {
448  packedTime_ = 0;
449  packedTimeError_ = 0;
450  } else if (aTimeError == 0) {
451  packedTimeError_ = 0;
452  packedTime_ = packTimeNoError(aTime);
453  } else {
454  packedTimeError_ = packTimeError(aTimeError);
455  aTimeError = unpackTimeError(packedTimeError_); // for reproducibility
456  packedTime_ = packTimeWithError(aTime, aTimeError);
457  }
458 }
459 
461 uint8_t pat::PackedCandidate::packTimeError(float timeError) {
462  if (timeError <= 0)
463  return 0;
464  // log-scale packing.
465  // for MIN_TIMEERROR = 0.002, EXPO_TIMEERROR = 5:
466  // minimum value 0.002 = 2ps (packed as 1)
467  // maximum value 0.5 ns (packed as 255)
468  // constant *relative* precision of about 2%
469  return std::max<uint8_t>(
470  std::min(std::round(std::ldexp(std::log2(timeError / MIN_TIMEERROR),
471  +EXPO_TIMEERROR)),
472  255.f),
473  1);
474 }
475 float pat::PackedCandidate::unpackTimeError(uint8_t timeError) {
476  return timeError > 0
477  ? MIN_TIMEERROR *
478  std::exp2(std::ldexp(float(timeError), -EXPO_TIMEERROR))
479  : -1.0f;
480 }
482  if (time == 0)
483  return 0.f;
484  return (time > 0 ? MIN_TIME_NOERROR : -MIN_TIME_NOERROR) *
485  std::exp2(std::ldexp(float(std::abs(time)), -EXPO_TIME_NOERROR));
486 }
488  // encoding in log scale to store times in a large range with few bits.
489  // for MIN_TIME_NOERROR = 0.0002 and EXPO_TIME_NOERROR = 6:
490  // smallest non-zero time = 0.2 ps (encoded as +/-1)
491  // one BX, +/- 12.5 ns, is fully covered with 11 bits (+/- 1023)
492  // 12 bits cover by far any plausible value (+/-2047 corresponds to about
493  // +/- 0.8 ms!) constant *relative* ~1% precision
494  if (std::abs(time) < MIN_TIME_NOERROR)
495  return 0; // prevent underflows
496  float fpacked = std::ldexp(std::log2(std::abs(time / MIN_TIME_NOERROR)),
497  +EXPO_TIME_NOERROR);
498  return (time > 0 ? +1 : -1) * std::min(std::round(fpacked), 2047.f);
499 }
501  uint8_t timeError) {
502  if (time % 2 == 0) {
503  // no overflow: drop rightmost bit and unpack in units of timeError
504  return std::ldexp(unpackTimeError(timeError), EXPO_TIME_WITHERROR) *
505  float(time / 2);
506  } else {
507  // overflow: drop rightmost bit, unpack using the noError encoding
509  }
510 }
511 int16_t pat::PackedCandidate::packTimeWithError(float time, float timeError) {
512  // Encode in units of timeError * 2^EXPO_TIME_WITHERROR (~1.6% if
513  // EXPO_TIME_WITHERROR = -6) the largest value that can be stored in 14 bits +
514  // sign bit + overflow bit is about 260 sigmas values larger than that will be
515  // stored using the no-timeError packing (with less precision). overflows of
516  // these kinds should happen only for particles that are late arriving,
517  // out-of-time, or mis-reconstructed, as timeError is O(20ps) and the beam
518  // spot witdth is O(200ps)
519  float fpacked = std::round(time / std::ldexp(timeError, EXPO_TIME_WITHERROR));
520  if (std::abs(fpacked) < 16383.f) { // 16383 = (2^14 - 1) = largest absolute
521  // value for a signed 15 bit integer
522  return int16_t(fpacked) * 2; // make it even, and fit in a signed 16 bit int
523  } else {
524  int16_t packed = packTimeNoError(time); // encode
525  return packed * 2 +
526  (time > 0 ? +1
527  : -1); // make it odd, to signal that there was an overlow
528  }
529 }
float puppiWeight() const
virtual float dz(size_t ipv=0) const
dz with respect to the PV[ipv]
static uint32_t getLayer(uint16_t pattern)
Definition: HitPattern.h:759
const reco::Candidate * daughter(size_type) const override
return daughter at a given position (throws an exception)
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:251
static bool pixelHitFilter(uint16_t pattern)
Definition: HitPattern.h:602
void fillVertexCovariance(CovarianceMatrix &v) const override
fill SMatrix
float puppiWeightNoLep() const
Weight from full PUPPI.
void setPuppiWeight(float p, float p_nolep=0.0)
size_t size_type
Definition: Candidate.h:30
CovarianceMatrix vertexCovariance() const override
return SMatrix
bool hasMasterClonePtr() const override
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
double vertexChi2() const override
chi-squares
bool longLived() const override
is long lived?
static float unpackTimeNoError(int16_t time)
double vertexNdof() const override
void setRawCaloFraction(float p)
Weight from PUPPI removing leptons.
const reco::CandidatePtr & masterClonePtr() const override
static int16_t packTimeNoError(float time)
static int16_t packTimeWithError(float time, float timeError)
std::pair< double, double > Point
Definition: CaloEllipse.h:18
static uint8_t packTimeError(float timeError)
static to allow unit testing
RhoEtaPhiVectorD RhoEtaPhiVector
spatial vector with cylindrical internal representation using pseudorapidity
Definition: Vector3D.h:32
static float float16to32(uint16_t h)
Definition: libminifloat.h:12
bool massConstraint() const override
do mass constraint?
size_t numberOfMothers() const override
number of mothers
void setHcalFraction(float p)
Fraction of ECAL+HCAL energy over candidate energy.
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector
double p4[4]
Definition: TauolaWrapper.h:92
static uint16_t float32to16(float x)
Definition: libminifloat.h:17
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
static bool stripHitFilter(uint16_t pattern)
Definition: HitPattern.h:633
static CovarianceParameterization covarianceParameterization_
def pv(vc)
Definition: MetAnalyzer.py:7
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double vertexNormalizedChi2() const override
chi-squared divided by n.d.o.f.
double f[11][100]
~PackedCandidate() override
destructor
T min(T a, T b)
Definition: MathUtil.h:58
static uint32_t getSubStructure(uint16_t pattern)
Definition: HitPattern.h:750
LostInnerHits
Enumerator specifying the.
void setRawHcalFraction(float p)
Raw ECAL+HCAL energy over candidate energy for isolated charged hadrons.
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
const reco::Candidate * mother(size_type) const override
return mother at a given position (throws an exception)
static std::once_flag covariance_load_flag
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37
void unpackCovariance() const
void setDTimeAssociatedPV(float aTime, float aTimeError=0)
set time measurement
virtual int charge() const =0
electric charge
Structure Point Contains parameters of Gaussian fits to DMRs.
Definition: DMRtrends.cc:55
size_t numberOfDaughters() const override
number of daughters
void packVtx(bool unpackAfterwards=true)
static unsigned int const shift
void setIsIsolatedChargedHadron(bool p)
Fraction of Hcal for HF, neutral hadrons, and charged particles.
virtual const Point & vertex() const =0
vertex position
void pack(bool unpackAfterwards=true)
static float max()
Definition: libminifloat.h:106
void packCovariance(const reco::TrackBase::CovarianceMatrix &m, bool unpackAfterwards=true)
const reco::CandidateBaseRef & masterClone() const override
virtual float dxy() const
dxy with respect to the PV ref
bool overlap(const reco::Candidate &) const override
check overlap with another Candidate
static float unpackTimeWithError(int16_t time, uint8_t timeError)
bool hasMasterClone() const override
static float unpackTimeError(uint8_t timeError)
math::Error< dimension >::type CovarianceMatrix
5 parameter covariance matrix
Definition: TrackBase.h:77
void setCaloFraction(float p)
Fraction of Hcal for isolated charged hadrons.
double p3[4]
Definition: TauolaWrapper.h:91
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:39