CMS 3D CMS Logo

makeParticle.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: FastSimulation/Particle
4 // Class : makeParticle
5 //
6 // Implementation:
7 // [Notes on implementation]
8 //
9 // Original Author: Christopher Jones
10 // Created: Mon, 04 Mar 2019 17:15:41 GMT
11 //
12 
13 // system include files
14 
15 // user include files
18 
19 inline RawParticle unchecked_makeParticle(int id, const math::XYZTLorentzVector& p, double mass, double charge) {
20  return RawParticle(id, p, mass, charge);
21 }
22 
24  int id, const math::XYZTLorentzVector& p, const math::XYZTLorentzVector& xStart, double mass, double charge) {
25  return RawParticle(id, p, xStart, mass, charge);
26 }
27 
29  double charge = 0.;
30  double mass = 0.;
31  auto info = table->particle(HepPDT::ParticleID(id));
32  if (info) {
33  charge = info->charge();
34  mass = info->mass().value();
35  }
36 
37  return unchecked_makeParticle(id, p, mass, charge);
38 }
39 
41  int id,
43  const math::XYZTLorentzVector& xStart) {
44  double charge = 0.;
45  double mass = 0.;
46  auto info = table->particle(HepPDT::ParticleID(id));
47  if (info) {
48  charge = info->charge();
49  mass = info->mass().value();
50  }
51  return unchecked_makeParticle(id, p, xStart, mass, charge);
52 }
RawParticle
Definition: RawParticle.h:37
makeParticle
RawParticle makeParticle(HepPDT::ParticleDataTable const *table, int id, const math::XYZTLorentzVector &p)
Definition: makeParticle.cc:28
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
makeParticle.h
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
RawParticle.h
unchecked_makeParticle
RawParticle unchecked_makeParticle(int id, const math::XYZTLorentzVector &p, double mass, double charge)
Definition: makeParticle.cc:19
EgHLTOffHistBins_cfi.mass
mass
Definition: EgHLTOffHistBins_cfi.py:34
TableParser.table
table
Definition: TableParser.py:111
LHEGenericFilter_cfi.ParticleID
ParticleID
Definition: LHEGenericFilter_cfi.py:6
ParticleDataTable
HepPDT::ParticleDataTable ParticleDataTable
Definition: ParticleDataTable.h:8