75 if(
abs(pdgCode)%100 <14 &&
abs(pdgCode) / 1000000 == 0){
76 edm::LogError(
"") <<
"Pdg code too low " << pdgCode <<
" "<<
abs(pdgCode) / 1000000;
81 G4String pType=
"custom";
83 G4double spectatormass = 0.0;
84 G4ParticleDefinition* spectator =
nullptr;
94 if (
name.compare(0,4,
"~HIP") == 0)
96 if ((
name.compare(0,7,
"~HIPbar") == 0)) {
98 charge=eplus*atoi(str.c_str())/3.;
101 charge=eplus*atoi(str.c_str())*-1./3.;
104 if (
name.compare(0,9,
"anti_~HIP") == 0)
106 if ((
name.compare(0,12,
"anti_~HIPbar") == 0)) {
108 charge=eplus*atoi(str.c_str())*-1./3.;
111 charge=eplus*atoi(str.c_str())*1./3.;
123 double lifetime = -1;
139 G4DecayTable *decaytable =
nullptr;
140 G4ParticleTable* theParticleTable = G4ParticleTable::GetParticleTable();
143 parity, conjugation, isospin, isospinZ,
144 gParity, pType, lepton, baryon, pdgCode,
145 stable, lifetime, decaytable);
147 if(pType ==
"rhadron" &&
name!=
"~g"){
148 G4String cloudname =
name+
"cloud";
149 G4String cloudtype = pType+
"cloud";
150 spectator = theParticleTable->FindParticle(1000021);
151 spectatormass = spectator->GetPDGMass();
152 G4double cloudmass =
mass-spectatormass/
GeV;
154 cloudname, cloudmass * GeV , 0.0*
MeV, 0 ,
158 true, -1.0,
nullptr );
163 <<
"CustomParticleFactory: " <<
name<<
" being assigned " 164 <<particle->
GetCloud()->GetParticleName()
165 <<
" and "<<particle->
GetSpectator()->GetParticleName() <<
"\n" 166 <<
" Masses: "<<particle->GetPDGMass()/GeV<<
" Gev, " 167 <<particle->
GetCloud()->GetPDGMass()/GeV<<
" GeV and " 169 }
else if(pType ==
"mesonino" || pType ==
"sbaryon") {
171 if(pdgCode < 0 ) sign=-1;
173 G4String cloudname =
name+
"cloud";
174 G4String cloudtype = pType+
"cloud";
176 spectator = theParticleTable->FindParticle(1000006*sign);
180 spectator = theParticleTable->FindParticle(1000005*sign);
183 edm::LogError(
"SimG4CoreCustomPhysics")<<
"CustomParticleFactory: Cannot find spectator parton";
186 if(spectator) spectatormass = spectator->GetPDGMass();
187 G4double cloudmass =
mass-spectatormass/
GeV;
189 cloudname, cloudmass * GeV , 0.0*
MeV, 0 ,
193 true, -1.0,
nullptr );
198 <<
"CustomParticleFactory: "<<
name<<
" being assigned " 199 <<particle->
GetCloud()->GetParticleName()
200 <<
" and "<<particle->
GetSpectator()->GetParticleName() <<
"\n" 202 <<particle->GetPDGMass()/GeV<<
" Gev, " 203 <<particle->
GetCloud()->GetPDGMass()/GeV<<
" GeV and "
static bool s_isDphoton(int pdg)
static double s_charge(int pdg)
static bool s_isSbaryon(int pdg)
void SetCloud(G4ParticleDefinition *theCloud)
G4ParticleDefinition * GetCloud()
static std::vector< G4ParticleDefinition * > m_particles
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)