77 if(
abs(pdgCode)%100 <14 &&
abs(pdgCode) / 1000000 == 0){
78 edm::LogError(
"") <<
"Pdg code too low " << pdgCode <<
" "<<
abs(pdgCode) / 1000000;
84 G4String pType=
"custom";
86 G4double spectatormass;
87 G4ParticleDefinition* spectator;
94 double massGeV =mass*
GeV;
97 if (
name.compare(0,4,
"~HIP") == 0)
100 if ((
name.compare(0,7,
"~HIPbar") == 0)) {
std::string str =
name.substr (7); charge=eplus*atoi(str.c_str())/3.;}
101 else {
std::string str =
name.substr (4); charge=eplus*atoi(str.c_str())*-1./3.; }
103 if (
name.compare(0,9,
"anti_~HIP") == 0)
106 if ((
name.compare(0,12,
"anti_~HIPbar") == 0)) {
std::string str =
name.substr (12); charge=eplus*atoi(str.c_str())*-1./3.;}
107 else {
std::string str =
name.substr (9); charge=eplus*atoi(str.c_str())*1./3.; }
118 double lifetime = -1;
120 G4DecayTable *decaytable =
NULL;
121 G4ParticleTable* theParticleTable = G4ParticleTable::GetParticleTable();
124 parity, conjugation, isospin, isospinZ,
125 gParity, pType, lepton, baryon, pdgCode,
126 stable, lifetime, decaytable);
128 if(pType ==
"rhadron" &&
name!=
"~g"){
129 G4String cloudname =
name+
"cloud";
130 G4String cloudtype = pType+
"cloud";
131 spectator = theParticleTable->FindParticle(1000021);
132 spectatormass = spectator->GetPDGMass();
133 G4double cloudmass = mass-spectatormass/
GeV;
135 cloudname, cloudmass * GeV , 0.0*
MeV, 0 ,
144 <<particle->
GetCloud()->GetParticleName()
147 <<particle->GetPDGMass()/GeV<<
" Gev, "
148 <<particle->
GetCloud()->GetPDGMass()/GeV<<
" GeV and "
150 }
else if(pType ==
"mesonino" || pType ==
"sbaryon") {
152 if(pdgCode < 0 ) sign=-1;
154 G4String cloudname =
name+
"cloud";
155 G4String cloudtype = pType+
"cloud";
157 spectator = theParticleTable->FindParticle(1000006*sign);
161 spectator = theParticleTable->FindParticle(1000005*sign);
164 edm::LogError(
"CustomPhysics")<<
" Cannot find spectator parton";
167 spectatormass = spectator->GetPDGMass();
168 G4double cloudmass = mass-spectatormass/
GeV;
170 cloudname, cloudmass * GeV , 0.0*
MeV, 0 ,
179 <<particle->
GetCloud()->GetParticleName()
182 <<particle->GetPDGMass()/GeV<<
" Gev, "
183 <<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)