- Timestamp:
- Nov 27, 2008, 8:55:10 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SmearUtil.cc
r55 r61 444 444 // the 'muon' variable will be changed by the function 445 445 float pt = muon.Pt(); // before smearing 446 float ptS = gRandom->Gaus(pt, MU_SmearPt*pt ); // after smearing // \sigma/E = C + N/E + S/\sqrt{E} 447 448 muon.SetPtEtaPhiE(ptS, muon.Eta(), muon.Phi(), ptS*cosh(muon.Eta())); 446 float ptS=pt; 447 448 if(fabs(muon.Eta()) < MAX_MU ) 449 { 450 ptS = gRandom->Gaus(pt, MU_SmearPt*pt ); // after smearing // \sigma/E = C + N/E + S/\sqrt{E} 451 } 452 muon.SetPtEtaPhiE(ptS, muon.Eta(), muon.Phi(), ptS*cosh(muon.Eta())); 449 453 450 454 if(muon.E() < 0)muon.SetPxPyPzE(0,0,0,0); // no negative values after smearing ! … … 619 623 charge = 0; 620 624 else charge = (sign(pid)); 621 cout<<"charge "<<charge<<endl;622 625 return charge; 623 626
Note:
See TracChangeset
for help on using the changeset viewer.