Fork me on GitHub

Changeset 84a097e in git for readers/DelphesPythia8.cpp


Ignore:
Timestamp:
Dec 2, 2019, 6:55:22 PM (5 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
Timing
Children:
2ad823e, 6fc566b
Parents:
c614dd7
Message:

first iteration of adding timing in Delphes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • readers/DelphesPythia8.cpp

    rc614dd7 r84a097e  
    122122
    123123    pdgParticle = pdg->GetParticle(pid);
    124     candidate->Charge = pdgParticle ? Int_t(pdgParticle->Charge() / 3.0) : -999;
     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
    125148    candidate->Mass = mass;
    126149
Note: See TracChangeset for help on using the changeset viewer.