Changeset 50edcdbf in git
- Timestamp:
- Jun 4, 2016, 8:06:02 PM (8 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 3f8df25
- Parents:
- 7bcca65
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/PileUpMerger.cc
r7bcca65 r50edcdbf 118 118 Float_t x, y, z, t, vx, vy, vz, vt; 119 119 Float_t px, py, pz, e, pt; 120 Double_t dz, dphi, dt, sumpt2 ;120 Double_t dz, dphi, dt, sumpt2, dz0, dt0; 121 121 Int_t numberOfEvents, event, numberOfParticles; 122 122 Long64_t allEntries, entry; … … 132 132 fFunction->GetRandom2(dz, dt); 133 133 134 dz0 = -1.0e6; 135 dt0 = -1.0e6; 136 134 137 dt *= c_light*1.0E3; // necessary in order to make t in mm/c 135 138 dz *= 1.0E3; // necessary in order to make z in mm 139 136 140 vx = 0.0; 137 141 vy = 0.0; … … 151 155 pt = candidate->Momentum.Pt(); 152 156 153 vz += z+dz; 154 vt += t+dt; 155 156 candidate->Position.SetZ(z + dz); 157 candidate->Position.SetT(t + dt); 157 // take postion and time from first stable particle 158 if (dz0 < -999999.0) 159 dz0 = z; 160 if (dt0 < -999999.0) 161 dt0 = t; 162 163 // cancel any possible offset in position and time the input file 164 candidate->Position.SetZ(z - dz0 + dz); 165 candidate->Position.SetT(t - dt0 + dt); 166 167 vz += z - dz0 + dz; 168 vt += t - dt0 + dt; 169 158 170 fParticleOutputArray->Add(candidate); 159 171 … … 170 182 vy /= numberOfParticles; 171 183 vz /= numberOfParticles; 172 vt /= numberOfParticles; 173 184 vt /= numberOfParticles; 174 185 } 175 186 … … 256 267 vx += candidate->Position.X(); 257 268 vy += candidate->Position.Y(); 269 vz += z+dz; 270 vt += t+dt; 258 271 259 272 ++numberOfParticles;
Note:
See TracChangeset
for help on using the changeset viewer.