Fork me on GitHub

Changeset 6fbd089 in git for modules/PileUpMerger.cc


Ignore:
Timestamp:
Jun 2, 2016, 3:36:31 PM (8 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
9fb48ad
Parents:
ab3bdd9
Message:

fill gen vertex

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/PileUpMerger.cc

    rab3bdd9 r6fbd089  
    116116  TParticlePDG *pdgParticle;
    117117  Int_t pid, nch, nvtx = -1;
    118   Float_t x, y, z, t, vx, vy;
     118  Float_t x, y, z, t, vx, vy, vz, vt;
    119119  Float_t px, py, pz, e, pt;
    120120  Double_t dz, dphi, dt, sumpt2;
     
    136136  vx = 0.0;
    137137  vy = 0.0;
     138  vz = 0.0;
     139  vt = 0.0;
     140 
    138141  numberOfParticles = fInputArray->GetEntriesFast();
    139142  nch = 0;
     
    147150    t = candidate->Position.T();
    148151    pt = candidate->Momentum.Pt();
     152   
     153    vz += z+dz;
     154    vt += t+dt;
     155   
    149156    candidate->Position.SetZ(z + dz);
    150157    candidate->Position.SetT(t + dt);
     
    162169    vx /= numberOfParticles;
    163170    vy /= numberOfParticles;
     171    vz /= numberOfParticles;
     172    vt /= numberOfParticles;
     173 
    164174  }
    165175
     
    168178
    169179  vertex = factory->NewCandidate();
    170   vertex->Position.SetXYZT(vx, vy, dz, dt);
     180  vertex->Position.SetXYZT(vx, vy, vz, vt);
    171181  vertex->ClusterIndex = nvtx;
    172182  vertex->ClusterNDF = nch;
    173183  vertex->SumPT2 = sumpt2;
    174   vertex->GenSumPT2 = sumpt2;  
     184  vertex->GenSumPT2 = sumpt2;
    175185 
    176186  fVertexOutputArray->Add(vertex);
Note: See TracChangeset for help on using the changeset viewer.