80 if(
abs(pdgCode)%100 <14 &&
abs(pdgCode) / 1000000 == 0){
81 edm::LogError(
"") <<
"Pdg code too low " << pdgCode <<
" "<<
abs(pdgCode) / 1000000;
86 G4String pType=
"custom";
88 G4double spectatormass = 0.0;
89 G4ParticleDefinition* spectator =
nullptr;
96 double massGeV =mass*
GeV;
99 if (
name.compare(0,4,
"~HIP") == 0)
101 if ((
name.compare(0,7,
"~HIPbar") == 0)) {
103 charge=eplus*atoi(str.c_str())/3.;
106 charge=eplus*atoi(str.c_str())*-1./3.;
109 if (
name.compare(0,9,
"anti_~HIP") == 0)
111 if ((
name.compare(0,12,
"anti_~HIPbar") == 0)) {
113 charge=eplus*atoi(str.c_str())*-1./3.;
116 charge=eplus*atoi(str.c_str())*1./3.;
128 double lifetime = -1;
130 G4DecayTable *decaytable =
nullptr;
131 G4ParticleTable* theParticleTable = G4ParticleTable::GetParticleTable();
134 parity, conjugation, isospin, isospinZ,
135 gParity, pType, lepton, baryon, pdgCode,
136 stable, lifetime, decaytable);
138 if(pType ==
"rhadron" &&
name!=
"~g"){
139 G4String cloudname =
name+
"cloud";
140 G4String cloudtype = pType+
"cloud";
141 spectator = theParticleTable->FindParticle(1000021);
142 spectatormass = spectator->GetPDGMass();
143 G4double cloudmass = mass-spectatormass/
GeV;
145 cloudname, cloudmass * GeV , 0.0*
MeV, 0 ,
154 <<
"CustomParticleFactory: " <<
name<<
" being assigned "
155 <<particle->
GetCloud()->GetParticleName()
156 <<
" and "<<particle->
GetSpectator()->GetParticleName() <<
"\n"
157 <<
" Masses: "<<particle->GetPDGMass()/GeV<<
" Gev, "
158 <<particle->
GetCloud()->GetPDGMass()/GeV<<
" GeV and "
160 }
else if(pType ==
"mesonino" || pType ==
"sbaryon") {
162 if(pdgCode < 0 ) sign=-1;
164 G4String cloudname =
name+
"cloud";
165 G4String cloudtype = pType+
"cloud";
167 spectator = theParticleTable->FindParticle(1000006*sign);
171 spectator = theParticleTable->FindParticle(1000005*sign);
174 edm::LogError(
"SimG4CoreCustomPhysics")<<
"CustomParticleFactory: Cannot find spectator parton";
177 if(spectator) spectatormass = spectator->GetPDGMass();
178 G4double cloudmass = mass-spectatormass/
GeV;
180 cloudname, cloudmass * GeV , 0.0*
MeV, 0 ,
189 <<
"CustomParticleFactory: "<<
name<<
" being assigned "
190 <<particle->
GetCloud()->GetParticleName()
191 <<
" and "<<particle->
GetSpectator()->GetParticleName() <<
"\n"
193 <<particle->GetPDGMass()/GeV<<
" Gev, "
194 <<particle->
GetCloud()->GetPDGMass()/GeV<<
" GeV and "
static std::set< G4ParticleDefinition * > m_particles
static double s_charge(int pdg)
static bool s_isSbaryon(int pdg)
void SetCloud(G4ParticleDefinition *theCloud)
G4ParticleDefinition * GetCloud()
static bool s_isMesonino(int pdg)
static bool s_isSLepton(int pdg)
Abs< T >::type abs(const T &t)
void SetSpectator(G4ParticleDefinition *theSpectator)
static double s_spin(int pdg)
G4ParticleDefinition * GetSpectator()
static bool s_isRHadron(int pdg)
static bool s_issbottomHadron(int pdg)
static bool s_isstopHadron(int pdg)