Skip to content

Commit

Permalink
Change isRHadron() to isgluinoHadron() and added stop and sbottom to …
Browse files Browse the repository at this point in the history
…conditional in CustomPhysicsList
  • Loading branch information
tvami committed Jul 15, 2021
1 parent 80166d5 commit 4c373dd
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion SimG4Core/CustomPhysics/interface/CustomPDGParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class CustomPDGParser {
public:
static bool s_isRHadron(int pdg);
static bool s_isgluinoHadron(int pdg);
static bool s_isstopHadron(int pdg);
static bool s_issbottomHadron(int pdg);
static bool s_isSLepton(int pdg);
Expand Down
3 changes: 2 additions & 1 deletion SimG4Core/CustomPhysics/src/CustomPDGParser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
}*/

bool CustomPDGParser::s_isRHadron(int pdg) {
// check for R-hadron with gluino content
bool CustomPDGParser::s_isgluinoHadron(int pdg) {
int pdgAbs = abs(pdg);
return ((pdgAbs % 100000 / 10000 == 9) || (pdgAbs % 10000 / 1000 == 9) || s_isRGlueball(pdg));
}
Expand Down
6 changes: 3 additions & 3 deletions SimG4Core/CustomPhysics/src/CustomParticleFactory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void CustomParticleFactory::addCustomParticle(int pdgCode, double mass, const st
G4double spectatormass = 0.0;
G4ParticleDefinition *spectator = nullptr;
//////////////////////
if (CustomPDGParser::s_isRHadron(pdgCode)) {
if (CustomPDGParser::s_isgluinoHadron(pdgCode)) {
pType = "rhadron";
}
if (CustomPDGParser::s_isSLepton(pdgCode)) {
Expand Down Expand Up @@ -261,7 +261,7 @@ void CustomParticleFactory::getMassTable(std::ifstream *configFile) {

edm::LogInfo("SimG4CoreCustomPhysics")
<< "CustomParticleFactory: Calling addCustomParticle for pdgId: " << pdgId << ", mass " << mass << " GeV "
<< name << ", isRHadron: " << CustomPDGParser::s_isRHadron(pdgId)
<< name << ", isgluinoHadron: " << CustomPDGParser::s_isgluinoHadron(pdgId)
<< ", isstopHadron: " << CustomPDGParser::s_isstopHadron(pdgId);
addCustomParticle(pdgId, mass, name);

Expand All @@ -275,7 +275,7 @@ void CustomParticleFactory::getMassTable(std::ifstream *configFile) {
<< " pdgId= " << pdgId << ", pdgIdPartner= " << pdgIdPartner << " " << aParticle->GetParticleName();
}

if (aParticle && !CustomPDGParser::s_isRHadron(pdgId) && !CustomPDGParser::s_isstopHadron(pdgId) &&
if (aParticle && !CustomPDGParser::s_isgluinoHadron(pdgId) && !CustomPDGParser::s_isstopHadron(pdgId) &&
pdgId != 1000006 && pdgId != -1000006 && pdgId != 25 && pdgId != 35 && pdgId != 36 && pdgId != 37) {
int sign = aParticle->GetAntiPDGEncoding() / pdgIdPartner;
edm::LogInfo("SimG4CoreCustomPhysics")
Expand Down
5 changes: 4 additions & 1 deletion SimG4Core/CustomPhysics/src/CustomPhysicsList.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ void CustomPhysicsList::ConstructProcess() {
ph->RegisterProcess(new G4hMultipleScattering, particle);
ph->RegisterProcess(new G4hIonisation, particle);
}
if (cp->GetCloud() && fHadronicInteraction && CustomPDGParser::s_isRHadron(particle->GetPDGEncoding())) {
if (cp->GetCloud() && fHadronicInteraction &&
(CustomPDGParser::s_isgluinoHadron(particle->GetPDGEncoding()) ||
(CustomPDGParser::s_isstopHadron(particle->GetPDGEncoding())) ||
(CustomPDGParser::s_issbottomHadron(particle->GetPDGEncoding())))) {
edm::LogVerbatim("SimG4CoreCustomPhysics")
<< "CustomPhysicsList: " << particle->GetParticleName()
<< " CloudMass= " << cp->GetCloud()->GetPDGMass() / GeV
Expand Down
5 changes: 4 additions & 1 deletion SimG4Core/CustomPhysics/src/CustomPhysicsListSS.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ void CustomPhysicsListSS::ConstructProcess() {
ph->RegisterProcess(new G4CoulombScattering, particle);
ph->RegisterProcess(new G4hIonisation, particle);
}
if (cp->GetCloud() && fHadronicInteraction && CustomPDGParser::s_isRHadron(particle->GetPDGEncoding())) {
if (cp->GetCloud() && fHadronicInteraction &&
(CustomPDGParser::s_isgluinoHadron(particle->GetPDGEncoding()) ||
(CustomPDGParser::s_isstopHadron(particle->GetPDGEncoding())) ||
(CustomPDGParser::s_issbottomHadron(particle->GetPDGEncoding())))) {
edm::LogVerbatim("SimG4CoreCustomPhysics")
<< "CustomPhysicsListSS: " << particle->GetParticleName()
<< " CloudMass= " << cp->GetCloud()->GetPDGMass() / GeV
Expand Down

0 comments on commit 4c373dd

Please sign in to comment.