The Gaudi Framework  v41r0 (bdbe7744)
Loading...
Searching...
No Matches
HepPDT::TestUnknownID Class Reference

#include </builds/gaudi/Gaudi/GaudiTestSuite/src/PartProp/PartPropExa.h>

Inheritance diagram for HepPDT::TestUnknownID:
Collaboration diagram for HepPDT::TestUnknownID:

Public Member Functions

 TestUnknownID ()=default
CommonParticleData * processUnknownID (ParticleID, const ParticleDataTable &pdt) override

Detailed Description

Definition at line 40 of file PartPropExa.h.

Constructor & Destructor Documentation

◆ TestUnknownID()

HepPDT::TestUnknownID::TestUnknownID ( )
default

Member Function Documentation

◆ processUnknownID()

CommonParticleData * HepPDT::TestUnknownID::processUnknownID ( ParticleID key,
const ParticleDataTable & pdt )
override

Definition at line 58 of file PartPropExa.cpp.

58 {
59
60 std::cout << "TestUnknownID: " << key.PDTname() << std::endl;
61
62 CommonParticleData* cpd = nullptr;
63 if ( key.isNucleus() ) {
64
65 // have to create a TempParticleData with all properties first
66 TempParticleData tpd( key );
67 // calculate approximate mass
68 // WARNING: any calls to particle() from here MUST reference
69 // a ParticleData which is already in the table
70 // This convention is enforced.
71 const ParticleData* proton = pdt.particle( 2212 );
72 if ( proton ) {
73 double protonMass = proton->mass();
74 tpd.tempMass = Measurement( key.A() * protonMass, 0. );
75 // now create CommonParticleData
76 cpd = new CommonParticleData( tpd );
77 }
78 }
79 return cpd;
80 }

The documentation for this class was generated from the following files: