Fork me on GitHub

Changeset 1134 in svn for trunk/examples


Ignore:
Timestamp:
Jun 5, 2013, 11:43:57 PM (11 years ago)
Author:
Pavel Demin
Message:

fix particles status selection in DelphesCMSFWLite.cpp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/DelphesCMSFWLite.cpp

    r1133 r1134  
    6060    const reco::GenParticle &particle = (*handleParticle)[i];
    6161
    62      pid = particle.pdgId();
    63      status = particle.status();
    64      px = particle.px(), py = particle.py(), pz = particle.pz(), e = particle.energy();
    65      x = particle.vx(), y = particle.vy(), z = particle.vz();
    66 
    67     if(status == 1 || status == 2)
    68     {
    69       candidate = factory->NewCandidate();
    70 
    71       candidate->PID = pid;
    72       pdgCode = TMath::Abs(candidate->PID);
    73 
    74       candidate->Status = status;
    75 
    76       pdgParticle = pdg->GetParticle(pid);
    77       candidate->Charge = pdgParticle ? Int_t(pdgParticle->Charge()/3.0) : -999;
    78       candidate->Mass = pdgParticle ? pdgParticle->Mass() : -999.9;
    79 
    80       candidate->Momentum.SetPxPyPzE(px, py, pz, e);
    81 
    82       candidate->Position.SetXYZT(x, y, z, 0.0);
    83 
    84       allParticleOutputArray->Add(candidate);
    85 
    86       if(!pdgParticle) return;
    87 
    88       if(status == 1)
    89       {
    90         stableParticleOutputArray->Add(candidate);
    91       }
    92       else if(pdgCode <= 5 || pdgCode == 21 || pdgCode == 15)
    93       {
    94         partonOutputArray->Add(candidate);
    95       }
     62    pid = particle.pdgId();
     63    status = particle.status();
     64    px = particle.px(); py = particle.py(); pz = particle.pz(); e = particle.energy();
     65    x = particle.vx(); y = particle.vy(); z = particle.vz();
     66
     67    candidate = factory->NewCandidate();
     68
     69    candidate->PID = pid;
     70    pdgCode = TMath::Abs(candidate->PID);
     71
     72    candidate->Status = status;
     73
     74    pdgParticle = pdg->GetParticle(pid);
     75    candidate->Charge = pdgParticle ? Int_t(pdgParticle->Charge()/3.0) : -999;
     76    candidate->Mass = pdgParticle ? pdgParticle->Mass() : -999.9;
     77
     78    candidate->Momentum.SetPxPyPzE(px, py, pz, e);
     79
     80    candidate->Position.SetXYZT(x, y, z, 0.0);
     81
     82    allParticleOutputArray->Add(candidate);
     83
     84    if(!pdgParticle) return;
     85
     86    if(status == 1)
     87    {
     88      stableParticleOutputArray->Add(candidate);
     89    }
     90    else if(pdgCode <= 5 || pdgCode == 21 || pdgCode == 15)
     91    {
     92      partonOutputArray->Add(candidate);
    9693    }
    9794  }
Note: See TracChangeset for help on using the changeset viewer.