Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • readers/DelphesPythia8.cpp

    r2c81caa r341014c  
    122122
    123123    pdgParticle = pdg->GetParticle(pid);
    124 
    125     if(pdgParticle)
    126     {
    127       candidate->Charge = int(pdgParticle->Charge()/3.0);
    128     }
    129     else if(abs(pid) == 1000612) candidate->Charge = TMath::Sign(1, pid);
    130     else if(abs(pid) == 1000622) candidate->Charge = 0;
    131     else if(abs(pid) == 1000632) candidate->Charge = TMath::Sign(1, pid);
    132     else if(abs(pid) == 1000642) candidate->Charge = 0;
    133     else if(abs(pid) == 1000652) candidate->Charge = TMath::Sign(1, pid);
    134     else if(abs(pid) == 1006113) candidate->Charge = 0;
    135     else if(abs(pid) == 1006211) candidate->Charge = TMath::Sign(1, pid);
    136     else if(abs(pid) == 1006213) candidate->Charge = TMath::Sign(1, pid);
    137     else if(abs(pid) == 1006223) candidate->Charge = TMath::Sign(2, pid);
    138     else if(abs(pid) == 1006311) candidate->Charge = 0;
    139     else if(abs(pid) == 1006313) candidate->Charge = 0;
    140     else if(abs(pid) == 1006321) candidate->Charge = TMath::Sign(1, pid);
    141     else if(abs(pid) == 1006323) candidate->Charge = TMath::Sign(1, pid);
    142     else if(abs(pid) == 1006333) candidate->Charge = 0;
    143     else {
    144       candidate->Charge = -999;
    145       cout << "[WARNING] Unrecognised particle. PID: " << pid << endl;
    146     }
    147 
     124    candidate->Charge = pdgParticle ? Int_t(pdgParticle->Charge() / 3.0) : -999;
    148125    candidate->Mass = mass;
    149126
     
    151128
    152129    candidate->Position.SetXYZT(x, y, z, t);
     130
    153131    allParticleOutputArray->Add(candidate);
    154132
    155     if(!pdgParticle && (abs(pid) > 1006333 || abs(pid) < 1000612) )
    156       continue;
     133    if(!pdgParticle) continue;
    157134
    158135    if(status == 1)
Note: See TracChangeset for help on using the changeset viewer.