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;
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;
144 G4DecayTable *decaytable =
nullptr;
145 G4ParticleTable* theParticleTable = G4ParticleTable::GetParticleTable();
148 parity, conjugation, isospin, isospinZ,
149 gParity, pType, lepton, baryon, pdgCode,
150 stable, lifetime, decaytable);
152 if(pType ==
"rhadron" &&
name!=
"~g"){
153 G4String cloudname =
name+
"cloud";
154 G4String cloudtype = pType+
"cloud";
155 spectator = theParticleTable->FindParticle(1000021);
156 spectatormass = spectator->GetPDGMass();
157 G4double cloudmass =
mass-spectatormass/
GeV;
159 cloudname, cloudmass * GeV , 0.0*
MeV, 0 ,
168 <<
"CustomParticleFactory: " <<
name<<
" being assigned "
169 <<particle->
GetCloud()->GetParticleName()
170 <<
" and "<<particle->
GetSpectator()->GetParticleName() <<
"\n"
171 <<
" Masses: "<<particle->GetPDGMass()/GeV<<
" Gev, "
172 <<particle->
GetCloud()->GetPDGMass()/GeV<<
" GeV and "
174 }
else if(pType ==
"mesonino" || pType ==
"sbaryon") {
176 if(pdgCode < 0 ) sign=-1;
178 G4String cloudname =
name+
"cloud";
179 G4String cloudtype = pType+
"cloud";
181 spectator = theParticleTable->FindParticle(1000006*sign);
185 spectator = theParticleTable->FindParticle(1000005*sign);
188 edm::LogError(
"SimG4CoreCustomPhysics")<<
"CustomParticleFactory: Cannot find spectator parton";
191 if(spectator) spectatormass = spectator->GetPDGMass();
192 G4double cloudmass =
mass-spectatormass/
GeV;
194 cloudname, cloudmass * GeV , 0.0*
MeV, 0 ,
203 <<
"CustomParticleFactory: "<<
name<<
" being assigned "
204 <<particle->
GetCloud()->GetParticleName()
205 <<
" and "<<particle->
GetSpectator()->GetParticleName() <<
"\n"
207 <<particle->GetPDGMass()/GeV<<
" Gev, "
208 <<particle->
GetCloud()->GetPDGMass()/GeV<<
" GeV and "
static bool s_isDphoton(int pdg)
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)