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