69 if(
abs(pdgCode)%100 <14 &&
abs(pdgCode) / 1000000 == 0){
70 edm::LogError(
"") <<
"Pdg code too low " << pdgCode <<
" "<<
abs(pdgCode) / 1000000 << std::endl;
76 G4String pType=
"custom";
78 G4double spectatormass;
79 G4ParticleDefinition* spectator;
86 double massGeV =mass*
GeV;
89 if (
name.compare(0,4,
"~HIP") == 0)
92 if ((
name.compare(0,7,
"~HIPbar") == 0)) {
std::string str =
name.substr (7); charge=eplus*atoi(str.c_str())/3.;}
93 else {
std::string str =
name.substr (4); charge=eplus*atoi(str.c_str())*-1./3.; }
95 if (
name.compare(0,9,
"anti_~HIP") == 0)
98 if ((
name.compare(0,12,
"anti_~HIPbar") == 0)) {
std::string str =
name.substr (12); charge=eplus*atoi(str.c_str())*-1./3.;}
99 else {
std::string str =
name.substr (9); charge=eplus*atoi(str.c_str())*1./3.; }
110 double lifetime = -1;
112 G4DecayTable *decaytable =
NULL;
113 G4ParticleTable* theParticleTable = G4ParticleTable::GetParticleTable();
116 parity, conjugation, isospin, isospinZ,
117 gParity, pType, lepton, baryon, pdgCode,
118 stable, lifetime, decaytable);
120 if(pType ==
"rhadron" &&
name!=
"~g"){
121 G4String cloudname =
name+
"cloud";
122 G4String cloudtype = pType+
"cloud";
123 spectator = theParticleTable->FindParticle(1000021);
124 spectatormass = spectator->GetPDGMass();
125 G4double cloudmass = mass-spectatormass/
GeV;
127 cloudname, cloudmass * GeV , 0.0*
MeV, 0 ,
136 <<particle->
GetCloud()->GetParticleName()
137 <<
" and "<<particle->
GetSpectator()->GetParticleName()<<std::endl;
139 <<particle->GetPDGMass()/GeV<<
" Gev, "
140 <<particle->
GetCloud()->GetPDGMass()/GeV<<
" GeV and "
143 }
else if(pType ==
"mesonino" || pType ==
"sbaryon")
146 if(pdgCode < 0 ) sign=-1;
148 G4String cloudname =
name+
"cloud";
149 G4String cloudtype = pType+
"cloud";
152 spectator = theParticleTable->FindParticle(1000006*sign);
157 spectator = theParticleTable->FindParticle(1000005*sign);
162 edm::LogError(
"CustomPhysics")<<
" Cannot find spectator parton";
165 spectatormass = spectator->GetPDGMass();
166 G4double cloudmass = mass-spectatormass/
GeV;
168 cloudname, cloudmass * GeV , 0.0*
MeV, 0 ,
177 <<particle->
GetCloud()->GetParticleName()
178 <<
" and "<<particle->
GetSpectator()->GetParticleName()<<std::endl;
180 <<particle->GetPDGMass()/GeV<<
" Gev, "
181 <<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)