Fork me on GitHub

Changes between Version 37 and Version 38 of WorkBook/LibraryInterface


Ignore:
Timestamp:
Feb 26, 2013, 9:01:20 AM (12 years ago)
Author:
Pavel Demin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WorkBook/LibraryInterface

    v37 v38  
    7777
    7878  int appargc = 1;
    79   char *appName = "DelphesExample";
     79  char appName[] = "DelphesExample";
    8080  char *appargv[] = {appName};
    8181  TApplication app(appName, &appargc, appargv);
     
    129129  Double_t x, y, z, t; 
    130130
    131   pdg = TDatabasePDG::Instance()
     131  pdg = TDatabasePDG::Instance();
    132132 
    133133  while(ReadParticle())
    134134  {
    135     if(status == 1 || status == 2)
     135    candidate = factory->NewCandidate();
     136
     137    candidate->PID = pid;
     138
     139    candidate->Status = status;
     140
     141    pdgParticle = pdg->GetParticle(pid);
     142    candidate->Charge = pdgParticle ? Int_t(pdgParticle->Charge()/3.0) : -999;
     143    candidate->Mass = pdgParticle ? pdgParticle->Mass() : -999.9;
     144
     145    candidate->Momentum.SetPxPyPzE(px, py, pz, e);
     146
     147    candidate->Position.SetXYZT(x, y, z, t);
     148
     149    allParticleOutputArray->Add(candidate);
     150
     151    if(!pdgParticle) return;
     152
     153    if(status == 1)
    136154    {
    137       candidate = factory->NewCandidate();
    138 
    139       candidate->PID = pid;
    140 
    141       candidate->Status = status;
    142 
    143      
    144       pdgParticle = pdg->GetParticle(fPID);
    145       candidate->Charge = pdgParticle ? Int_t(pdgParticle->Charge()/3.0) : -999;
    146       candidate->Mass = pdgParticle ? pdgParticle->Mass() : -999.9;
    147  
    148       candidate->Momentum.SetPxPyPzE(px, py, pz, e);
    149 
    150       candidate->Position.SetXYZT(x, y, z, t);
    151 
    152       allParticleOutputArray->Add(candidate);
    153 
    154       if(!pdgParticle) return;
    155 
    156       if(status == 1)
    157       {
    158         stableParticleOutputArray->Add(candidate);
    159       }
    160       else if(status == 2)
    161       {
    162         partonOutputArray->Add(candidate);
    163       }
     155      stableParticleOutputArray->Add(candidate);
     156    }
     157    else if(status == 2)
     158    {
     159      partonOutputArray->Add(candidate);
    164160    }
    165161  }
     
    175171  while((candidate = static_cast<Candidate*>(iteratorJets.Next())))
    176172  {
    177     const TLorentzVector &momentum = candidate->GetMomentum();
     173    const TLorentzVector &momentum = candidate->Momentum;
    178174  }
    179175}