Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

* rename Particle_t enum Unknown to UnknownParticle, to coordinate with #346

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/programs/Simulation/GEN2HDDM/GEN2HDDM_jpsi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ void Usage(void)
int Str2GeantParticleID(char *str)
{
if (strcmp(str, "unknown") == 0 || strcmp(str, "Unknown") == 0)
return Unknown;
return UnknownParticle;
if (strcmp(str, "gamma") == 0 || strcmp(str, "Gamma") == 0)
return Gamma;
if (strcmp(str, "positron") == 0 || strcmp(str, "Positron") == 0)
Expand Down
2 changes: 1 addition & 1 deletion src/programs/Simulation/GEN2HDDM/GEN2HDDM_new.cc
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ void Usage(void)
int Str2GeantParticleID(char *str)
{
if (strcmp(str, "unknown") == 0 || strcmp(str, "Unknown") == 0)
return Unknown;
return UnknownParticle;
if (strcmp(str, "gamma") == 0 || strcmp(str, "Gamma") == 0)
return Gamma;
if (strcmp(str, "positron") == 0 || strcmp(str, "Positron") == 0)
Expand Down
2 changes: 1 addition & 1 deletion src/programs/Simulation/HDGeant/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ else:
version_string = postgcc[0:vers_end]
else:
version_string = postgcc
versions = version_string.split('.')
versions = (version_string + ".0.0").split('.')
if int(versions[0]) >= 4 and int(versions[1]) >= 8 or int(versions[0]) >= 5:
env.PrependUnique(FORTRANFLAGS = ['-fno-aggressive-loop-optimizations'])

Expand Down
4 changes: 2 additions & 2 deletions src/programs/Simulation/decay_evtgen/decay_evtgen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ using namespace std;

typedef struct {
int id = -1;
Particle_t type = Unknown;
Particle_t type = UnknownParticle;
int pdgtype = -1;
bool decayed = false;
TLorentzVector momentum;
Expand Down Expand Up @@ -228,7 +228,7 @@ void DecayParticles(hddm_s::HDDM * hddmevent, vector< gen_particle_info_t > &par
default:
myGenerator->generateDecay(parent);
if(parent->getNDaug() > 0)
part.hddmProduct->setType(Unknown); // zero out particle type info so that hdgeant won't decay the particle. maybe there is a better way?
part.hddmProduct->setType(UnknownParticle); // zero out particle type info so that hdgeant won't decay the particle. maybe there is a better way?
break;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ inline static char* EvtGenOutputString(Particle_t p)
p = RemapParticleID(p);

switch (p) {
case Unknown:
case UnknownParticle:
return (char*)"Unknown";
case Gamma:
return (char*)"gamma";
Expand Down
4 changes: 2 additions & 2 deletions src/programs/Simulation/genEtaRegge/genEtaRegge.cc
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ void WriteEvent(unsigned int eventNumber,TLorentzVector &beam,TLorentzVector &ta
for (unsigned int i=0;i<particle_vectors.size();i++,ps->mult++){
Particle_t my_particle=particle_types[i];
if(particle_decayed[i])
ps->in[ps->mult].type = Unknown; // zero out particle type info so that hdgeant won't decay the particle. maybe there is a better way?
ps->in[ps->mult].type = UnknownParticle; // zero out particle type info so that hdgeant won't decay the particle. maybe there is a better way?
else
ps->in[ps->mult].type = my_particle;
ps->in[ps->mult].pdgtype = PDGtype(my_particle);
Expand Down Expand Up @@ -1191,7 +1191,7 @@ int main(int narg, char *argv[])
}

for (int j=0;j<num_decay_particles;j++){
if (particle_types[j]!=Unknown) {
if (particle_types[j]!=UnknownParticle) {
output_particle_vectors.push_back(*phase_space.GetDecay(j));
output_particle_types.push_back(particle_types[j]);
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/programs/Simulation/gen_ALP/gen_ALP.cc
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,8 @@ void fini()
p2().setPz(v2.Z());
p2().setE(v2.T());
} else if (str_decay == "a") {
ps(1).setType(Unknown);
ps(1).setPdgtype(PDGtype(Unknown));
ps(1).setType(UnknownParticle);
ps(1).setPdgtype(PDGtype(UnknownParticle));
ps(1).setId(2);
ps(1).setParentid(1);
ps(1).setMech(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ int main( int argc, char* argv[] ){
TH1F * m_h_PFermi = new TH1F("PFermi", "", 1000, 0.0, 1.0);
Particle_t t_target;
Particle_t t_meson;
Particle_t t_spectator = Unknown;
Particle_t t_participant = Unknown;
Particle_t t_spectator = UnknownParticle;
Particle_t t_participant = UnknownParticle;
if (ReadFile->GetConfigName("fermi_file") != "" && ReadFile->GetConfigName("participant") != "" && ReadFile->GetConfigName("spectator") != "") {
m_Fermi_file = ReadFile->GetConfigName("fermi_file");
cout << "Fermi_file " << m_Fermi_file << endl;
Expand Down
2 changes: 1 addition & 1 deletion src/programs/Simulation/gen_schannel/gen_schannel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ void WriteEvent(unsigned int eventNumber, TLorentzVector &beam, float vert[3],
origin->vy = vert[1];
origin->vz = vert[2];
// Final state particle
ps->in[0].type = Unknown; // zero out particle type info so that hdgeant won't decay the particle. maybe there is a better way?
ps->in[0].type = UnknownParticle; // zero out particle type info so that hdgeant won't decay the particle. maybe there is a better way?
//ps->in[0].type = particle_type;
ps->in[0].pdgtype = particle_type;
ps->in[0].id = 0; /* unique value for this particle within the event */
Expand Down
2 changes: 1 addition & 1 deletion src/programs/Simulation/gen_whizard/HddmOut.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class HddmOut {
} else if (evt.rxn != "a_to_e") {

for (int i = 0; i < (evt.nGen -1); i ++) {
Particle_t TYPE = Unknown;
Particle_t TYPE = UnknownParticle;
if (evt.pdg[i] == 11) TYPE = Electron;
if (evt.pdg[i] == -11) TYPE = Positron;
if (evt.pdg[i] == 22) TYPE = Gamma;
Expand Down
4 changes: 2 additions & 2 deletions src/programs/Simulation/geneta/bg_hddm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ int GEANT_to_PDG(Particle_t type)

map<Particle_t, int>::iterator iter = GEANT_to_PDG_map.find(type);
if (iter == GEANT_to_PDG_map.end())
type = Unknown;
type = UnknownParticle;

return GEANT_to_PDG_map[type];
}
Expand All @@ -192,7 +192,7 @@ int GEANT_to_PDG(Particle_t type)
void InitializePDGGEANTmaps(void)
{
// Set values in GEANT_to_PDG_map first, then copy them into PDG_to_GEANT_map
GEANT_to_PDG_map[Unknown] = 0;
GEANT_to_PDG_map[UnknownParticle] = 0;
GEANT_to_PDG_map[Gamma] = 22;
GEANT_to_PDG_map[Positron] = -11;
GEANT_to_PDG_map[Electron] = 11;
Expand Down
2 changes: 1 addition & 1 deletion src/programs/Simulation/genr8_2_hddm/genr8_2_hddm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ void Usage(void)
int Str2GeantParticleID(char *str)
{
if (strcmp(str, "unknown") == 0 || strcmp(str, "Unknown") == 0)
return Unknown;
return UnknownParticle;
if (strcmp(str, "gamma") == 0 || strcmp(str, "Gamma") == 0)
return Gamma;
if (strcmp(str, "positron") == 0 || strcmp(str, "Positron") == 0)
Expand Down