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;
134 G4DecayTable *decaytable =
NULL;
135 G4ParticleTable* theParticleTable = G4ParticleTable::GetParticleTable();
138 parity, conjugation, isospin, isospinZ,
139 gParity, pType, lepton, baryon, pdgCode,
140 stable, lifetime, decaytable);
142 if(pType ==
"rhadron" &&
name!=
"~g"){
143 G4String cloudname =
name+
"cloud";
144 G4String cloudtype = pType+
"cloud";
145 spectator = theParticleTable->FindParticle(1000021);
146 spectatormass = spectator->GetPDGMass();
147 G4double cloudmass = mass-spectatormass/
GeV;
149 cloudname, cloudmass * GeV , 0.0*
MeV, 0 ,
158 <<particle->
GetCloud()->GetParticleName()
161 <<particle->GetPDGMass()/GeV<<
" Gev, "
162 <<particle->
GetCloud()->GetPDGMass()/GeV<<
" GeV and "
164 }
else if(pType ==
"mesonino" || pType ==
"sbaryon") {
166 if(pdgCode < 0 ) sign=-1;
168 G4String cloudname =
name+
"cloud";
169 G4String cloudtype = pType+
"cloud";
171 spectator = theParticleTable->FindParticle(1000006*sign);
175 spectator = theParticleTable->FindParticle(1000005*sign);
178 edm::LogError(
"CustomPhysics")<<
" Cannot find spectator parton";
181 spectatormass = spectator->GetPDGMass();
182 G4double cloudmass = mass-spectatormass/
GeV;
184 cloudname, cloudmass * GeV , 0.0*
MeV, 0 ,
193 <<particle->
GetCloud()->GetParticleName()
196 <<particle->GetPDGMass()/GeV<<
" Gev, "
197 <<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)